:root {
      color-scheme: dark;
      --bg: #050811;
      --panel: rgba(11, 20, 36, .72);
      --panel-deep: rgba(7, 14, 27, .88);
      --line: rgba(125, 162, 199, .17);
      --muted: #91a1b6;
      --text: #e7f2ff;
      --blue: #2879d0;
      --cyan: #66e4ee;
      --green: #64d5b2;
      --amber: #e8ad58;
      --red: #ee685f;
      --heading: "Orbitron", "Exo 2", "Segoe UI", sans-serif;
      --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
      font-family: Inter, "Segoe UI", Arial, sans-serif;
      font-synthesis: none;
      text-rendering: optimizeLegibility;
    }

    * { box-sizing: border-box; }
    html, body { min-width: 320px; min-height: 100%; margin: 0; }
    body {
      min-height: 100vh;
      overflow-x: hidden;
      color: var(--text);
      background: radial-gradient(ellipse at 50% 25%, #0c1930 0, var(--bg) 62%);
      transition: background 1.2s ease;
    }
    body.warning-mode {
      background: radial-gradient(ellipse at 50% 25%, #351b24 0, #160e19 50%, #080910 100%);
    }
    button, input { font: inherit; }
    button:focus-visible, input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
    button { color: inherit; }
    .starfield, .vignette { position: fixed; inset: 0; pointer-events: none; }
    .starfield { z-index: -2; }
    .vignette { z-index: 4; opacity: 0; background: radial-gradient(ellipse at center, transparent 40%, rgba(119, 24, 35, .3)); transition: opacity 1s ease; }
    body.warning-mode .vignette { opacity: 1; }

    .boot, .login-screen, .cinematic {
      position: fixed;
      z-index: 10;
      inset: 0;
      display: grid;
      place-items: center;
      background: radial-gradient(ellipse at center, rgba(14, 32, 57, .82), rgba(4, 8, 16, .72));
      transition: opacity .8s ease, visibility .8s ease;
    }
    .boot.done, .login-screen.hidden, .cinematic.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
    .boot-mark { color: var(--cyan); font: 500 18px var(--heading); letter-spacing: .3em; animation: breathe 1.6s ease infinite; }
    .boot-mark::after { display: block; width: 42px; height: 1px; margin: 17px auto; content: ""; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); animation: line-in 1.2s ease both; }
    @keyframes breathe { 50% { opacity: .48; } }
    @keyframes line-in { from { width: 0; opacity: 0; } to { width: 42px; opacity: 1; } }

    .login-card {
      position: relative;
      width: min(390px, calc(100vw - 32px));
      padding: 34px 32px 30px;
      border: 1px solid rgba(138, 179, 214, .18);
      border-radius: 15px;
      background: rgba(8, 17, 31, .75);
      box-shadow: 0 22px 80px rgba(0, 0, 0, .35), inset 0 1px rgba(255,255,255,.04);
      backdrop-filter: blur(18px);
      animation: card-arrive 1s cubic-bezier(.16, 1, .3, 1) both;
    }
    @keyframes card-arrive { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
    .login-brand { text-align: center; }
    .login-symbol { display: grid; width: 54px; height: 54px; margin: 0 auto 17px; place-items: center; border: 1px solid rgba(102, 228, 238, .42); border-radius: 50%; color: var(--cyan); box-shadow: 0 0 28px rgba(102, 228, 238, .09); font: 500 21px var(--heading); }
    .login-title { margin: 0; font: 500 18px var(--heading); letter-spacing: .2em; }
    .login-subtitle { margin: 9px 0 28px; color: var(--muted); font: 10px var(--mono); letter-spacing: .12em; }
    .login-form { display: grid; gap: 14px; }
    .field-label { display: grid; gap: 7px; color: #b6c4d5; font: 10px var(--mono); letter-spacing: .07em; }
    .field-input { width: 100%; height: 43px; padding: 0 12px; border: 1px solid rgba(122, 159, 197, .2); border-radius: 7px; background: rgba(2, 8, 17, .55); color: var(--text); font-size: 13px; }
    .field-input:focus { border-color: rgba(102, 228, 238, .55); outline: none; box-shadow: 0 0 0 3px rgba(102, 228, 238, .08); }
    .login-submit { height: 42px; margin-top: 5px; border: 1px solid rgba(102, 228, 238, .35); border-radius: 7px; background: rgba(22, 65, 91, .36); color: #c9f7f8; cursor: pointer; font-size: 11px; letter-spacing: .1em; transition: background .2s, border .2s; }
    .login-submit:hover { border-color: rgba(102, 228, 238, .7); background: rgba(22, 91, 117, .44); }
    .login-message { min-height: 14px; margin: 0; color: #d98e84; font-size: 11px; text-align: center; }
    .access-granted { position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; background: rgba(6, 20, 30, .96); color: var(--green); font: 500 13px var(--mono); letter-spacing: .15em; opacity: 0; pointer-events: none; transition: opacity .45s; }
    .login-card.granted .access-granted { opacity: 1; }

    .cinematic { z-index: 9; overflow: hidden; background: transparent; opacity: 0; visibility: hidden; }
    .cinematic.active { opacity: 1; visibility: visible; }
    .cinematic::before { position: absolute; inset: -50%; content: ""; opacity: 0; background: repeating-conic-gradient(from 0deg, rgba(104,224,242,.12) 0deg .18deg, transparent .18deg 2.4deg); mask-image: radial-gradient(ellipse at center, #000 0, transparent 56%); }
    .cinematic.active::before { animation: fly-through 2.5s cubic-bezier(.15,.7,.25,1) both; }
    @keyframes fly-through { 15% { opacity: .55; transform: scale(.2) rotate(0deg); } 75% { opacity: .38; } to { opacity: 0; transform: scale(2.4) rotate(14deg); } }
    .cinematic-title { position: absolute; top: 46%; left: 50%; color: #dffbff; font: 400 clamp(18px, 3vw, 30px) var(--heading); letter-spacing: .28em; opacity: 0; transform: translate(-50%, -50%) scale(.8); text-shadow: 0 0 28px rgba(102,228,238,.5); }
    .cinematic.active .cinematic-title { animation: title-flash 2.5s ease both; }
    @keyframes title-flash { 18% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 75% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -50%) scale(1.12); } }
    .dashboard { width: min(1600px, 100%); min-height: 100vh; margin: 0 auto; padding: 24px clamp(14px, 2.5vw, 38px) 25px; opacity: 0; transform: translateY(12px); transition: opacity .85s ease, transform .85s ease; }
    body.login-active .dashboard { opacity: .43; transform: none; }
    .dashboard.ready { opacity: 1; transform: none; }
    .dashboard .layout > *, .dashboard .masthead, .dashboard .threat-banner { opacity: 0; transform: translateY(14px); }
    body.login-active .dashboard .layout > *, body.login-active .dashboard .masthead { opacity: 1; transform: none; }
    .dashboard.ready .layout > *, .dashboard.ready .masthead { animation: panel-arrive .8s cubic-bezier(.16, 1, .3, 1) both; }
    .dashboard.ready .layout > :nth-child(1) { animation-delay: .08s; }
    .dashboard.ready .layout > :nth-child(2) { animation-delay: .16s; }
    .dashboard.ready .layout > :nth-child(3) { animation-delay: .24s; }
    .dashboard.ready .layout > :nth-child(4) { animation-delay: .32s; }
    .dashboard.ready .layout > :nth-child(5) { animation-delay: .4s; }
    .dashboard .threat-banner.visible { opacity: 1; visibility: visible; transform: none; }
    @keyframes panel-arrive { to { opacity: 1; transform: translateY(0); } }
    .masthead { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 54px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
    .brand { display: flex; align-items: center; gap: 12px; cursor: default; user-select: none; }
    .brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(102, 228, 238, .34); border-radius: 50%; color: var(--cyan); font: 500 15px var(--heading); }
    .brand-name { font: 500 15px var(--heading); letter-spacing: .17em; }
    .brand-sub { margin-top: 4px; color: #8293a8; font: 9px var(--mono); letter-spacing: .1em; }
    .mission-status { display: flex; align-items: center; gap: 9px; color: #b6c5d6; font: 10px var(--mono); letter-spacing: .04em; }
    .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px rgba(100, 213, 178, .62); }
    body.warning-mode .status-dot { background: var(--red); box-shadow: 0 0 10px rgba(238, 104, 95, .7); animation: breathe .9s infinite; }
    .mission-time { color: #8297af; font: 10px var(--mono); }

    .threat-banner { display: flex; align-items: center; gap: 9px; max-height: 0; margin: 0; padding: 0 13px; overflow: hidden; border: 0 solid rgba(238,104,95,.3); border-radius: 7px; background: rgba(122,34,41,.16); color: #f0aaa0; font-size: 12px; opacity: 0; visibility: hidden; transition: all .6s ease; }
    .threat-banner.visible { max-height: 56px; margin: 12px 0 0; padding: 11px 13px; border-width: 1px; opacity: 1; visibility: visible; }
    .threat-banner .status-dot { background: var(--red); }

    .layout { display: grid; grid-template-columns: minmax(245px, .82fr) minmax(370px, 1.28fr) minmax(280px, .9fr); grid-template-areas: "left body right" "chart chart log"; gap: 15px; padding-top: 17px; align-items: stretch; }
    .column { display: grid; gap: 15px; align-content: start; }
    .left-column { grid-area: left; }
    .body-column { grid-area: body; min-width: 0; }
    .right-column { grid-area: right; }
    .chart-panel { grid-area: chart; min-height: 225px; }
    .log-panel { grid-area: log; min-height: 225px; }
    .panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: linear-gradient(145deg, var(--panel), rgba(7, 14, 26, .62)); box-shadow: inset 0 1px rgba(255,255,255,.025); backdrop-filter: blur(8px); }
    .panel-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 45px; padding: 12px 15px 10px; border-bottom: 1px solid rgba(125,162,199,.1); }
    .panel-title { margin: 0; color: #c8d8e8; font: 500 10px var(--heading); letter-spacing: .12em; }
    .panel-meta { color: #77899d; font: 9px var(--mono); }
    .panel-content { padding: 14px 15px; }
    .training-note { margin: 0; color: #93a8bd; font-size: 10px; line-height: 1.55; }
    .training-note strong { color: #c1d5e5; font-weight: 500; }
    .vitals-grid { display: grid; gap: 13px; }
    .vital { padding: 9px 0 10px; border-bottom: 1px solid rgba(125,162,199,.1); }
    .vital:last-child { border-bottom: 0; }
    .vital-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
    .vital-name { color: #9cacc0; font-size: 11px; }
    .vital-value { color: var(--green); font: 500 22px var(--mono); transition: color .35s; }
    .vital-value.warning { color: var(--amber); }
    .vital-value.critical { color: var(--red); }
    .vital-unit { margin-left: 4px; color: #8596a9; font: 10px var(--mono); }
    .vital-reference { margin-top: 5px; color: #6f8094; font: 9px var(--mono); }
    .meter { height: 2px; margin-top: 9px; overflow: hidden; border-radius: 3px; background: rgba(123,153,181,.14); }
    .meter-fill { width: 10%; height: 100%; border-radius: inherit; background: var(--green); transition: width .5s ease, background .4s ease; }
    .meter-fill.warning { background: var(--amber); }
    .meter-fill.critical { background: var(--red); }
    .spacecraft-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 10px; }
    .telemetry-label { color: #8395aa; font: 9px var(--mono); }
    .telemetry-value { margin-top: 5px; color: #d6e4f2; font: 12px var(--mono); }
    .weather-credit { color: #71859b; font: 9px var(--mono); }

    .body-panel { display: flex; min-height: 625px; flex-direction: column; }
    .body-head { position: relative; z-index: 1; }
    .body-stage { position: relative; flex: 1; min-height: 480px; overflow: hidden; touch-action: none; cursor: grab; }
    .body-stage.dragging { cursor: grabbing; }
    .body-stage canvas { display: block; width: 100%; height: 100%; }
    .body-caption { position: absolute; right: 12px; bottom: 10px; left: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #6f869e; font: 9px var(--mono); pointer-events: none; }
    .body-caption .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
    .organ-tooltip { position: absolute; z-index: 2; display: none; min-width: 138px; padding: 9px 11px; border: 1px solid rgba(134,177,210,.25); border-radius: 7px; background: rgba(5,12,23,.9); box-shadow: 0 10px 24px rgba(0,0,0,.28); pointer-events: none; backdrop-filter: blur(8px); }
    .organ-tooltip.visible { display: block; }
    .tooltip-name { color: #a7bdcf; font-size: 10px; }
    .tooltip-value { margin-top: 4px; color: var(--cyan); font: 11px var(--mono); }

    .doctor-status { display: flex; align-items: center; gap: 8px; color: #b3c2d2; font: 10px var(--mono); }
    .risk-row { display: flex; align-items: center; gap: 10px; margin: 16px 0 14px; }
    .risk-label { color: #8799ad; font: 9px var(--mono); }
    .risk-track { flex: 1; height: 2px; overflow: hidden; background: rgba(125,162,199,.17); }
    .risk-fill { width: 5%; height: 100%; background: var(--green); transition: width .5s, background .4s; }
    .risk-number { color: var(--green); font: 14px var(--mono); }
    .doctor-summary { min-height: 54px; color: #c0cedb; font-size: 12px; line-height: 1.55; }
    .doctor-subhead { margin: 15px 0 8px; color: #889bb0; font: 9px var(--mono); letter-spacing: .06em; }
    .action-list { display: grid; gap: 7px; padding: 0; margin: 0; list-style: none; }
    .action-list li { position: relative; padding-left: 13px; color: #b0c0d0; font-size: 10px; line-height: 1.45; }
    .action-list li::before { position: absolute; top: 0; left: 1px; color: var(--cyan); content: "·"; }
    .recovery-progress { height: 2px; margin-top: 14px; overflow: hidden; background: rgba(125,162,199,.13); }
    .recovery-progress span { display: block; width: 0; height: 100%; background: var(--green); transition: width .5s ease; }

    .chat-area { display: flex; min-height: 300px; flex-direction: column; }
    .chat-log { display: flex; flex: 1; min-height: 190px; max-height: 355px; flex-direction: column; gap: 10px; overflow-y: auto; padding: 14px 15px; scrollbar-color: #35485e transparent; }
    .chat-message { max-width: 94%; align-self: flex-start; padding: 9px 11px; border: 1px solid rgba(125,162,199,.1); border-radius: 8px 8px 8px 2px; background: rgba(3,10,19,.32); color: #c1cedb; font-size: 11px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
    .chat-message.user { align-self: flex-end; border-color: rgba(102,228,238,.16); background: rgba(22,65,91,.18); color: #d4edf1; }
    .chat-form { display: flex; gap: 8px; padding: 0 13px 13px; }
    .chat-input { flex: 1; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid rgba(125,162,199,.17); border-radius: 6px; background: rgba(2,8,16,.48); color: var(--text); font-size: 11px; }
    .chat-input::placeholder { color: #78899e; }
    .send-button { width: 53px; height: 38px; border: 1px solid rgba(102,228,238,.2); border-radius: 6px; background: rgba(20,54,71,.35); color: #b8e4e6; cursor: pointer; font: 10px var(--mono); transition: background .2s; }
    .send-button:hover { background: rgba(20,74,92,.5); }

    .chart-wrap { height: 164px; padding: 7px 12px 11px; }
    .chart-wrap canvas { display: block; width: 100%; height: 100%; }
    .event-log { display: flex; max-height: 174px; flex-direction: column; gap: 10px; overflow: auto; padding: 13px 15px; }
    .event { display: grid; grid-template-columns: 50px 1fr; gap: 9px; color: #9cacc0; font-size: 10px; line-height: 1.45; }
    .event-time { color: #71869b; font: 9px var(--mono); }
    .event.warn { color: #e5ba79; }
    .event.good { color: #83ceb5; }
    .footer { margin-top: 14px; color: #687b90; font: 9px var(--mono); text-align: right; }

    .injection-control { position: fixed; z-index: 15; right: 23px; bottom: 21px; display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(151,183,208,.16); border-radius: 50%; background: rgba(142,173,201,.09); color: rgba(170,211,226,.48); cursor: pointer; opacity: .38; box-shadow: 0 0 15px rgba(102,228,238,.05); transition: opacity .25s, color .25s, background .25s, box-shadow .25s; }
    .injection-control:hover, .injection-control:focus-visible, .injection-control[aria-pressed="true"] { opacity: .9; color: var(--cyan); background: rgba(102,228,238,.1); box-shadow: 0 0 18px rgba(102,228,238,.18); }
    .pulse-icon { position: relative; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px currentColor; }
    .pulse-icon::after { position: absolute; inset: -5px; border: 1px solid currentColor; border-radius: inherit; content: ""; opacity: .38; animation: pulse-ring 2.8s ease-out infinite; }
    @keyframes pulse-ring { to { transform: scale(2.2); opacity: 0; } }
    .spinner { display: inline-block; width: 8px; height: 8px; border: 1px solid rgba(102,228,238,.28); border-top-color: var(--cyan); border-radius: 50%; animation: spin .75s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }

    @media (max-width: 980px) {
      .layout { grid-template-columns: minmax(230px, .82fr) minmax(330px, 1.18fr); grid-template-areas: "left body" "right body" "chart chart" "log log"; }
      .body-panel { grid-row: span 2; }
      .right-column { grid-area: right; }
    }
    @media (max-width: 720px) {
      .dashboard { padding: 14px 12px 22px; }
      .masthead { gap: 8px; }
      .brand-sub { display: none; }
      .mission-status { margin-left: auto; font-size: 9px; }
      .mission-time { display: none; }
      .layout { grid-template-columns: minmax(0,1fr); grid-template-areas: "body" "left" "right" "chart" "log"; gap: 12px; }
      .body-panel { grid-row: auto; min-height: 0; }
      .body-stage { min-height: min(80vh, 590px); }
      .left-column { grid-template-columns: 1fr 1fr; }
      .training-note { font-size: 9px; }
      .chart-panel, .log-panel { min-height: 205px; }
      .footer { padding-right: 36px; text-align: left; }
      .injection-control { right: 12px; bottom: 12px; }
    }
    @media (max-width: 430px) {
      .left-column { grid-template-columns: 1fr; }
      .spacecraft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .login-card { padding: 29px 23px 24px; }
      .body-stage { min-height: 430px; }
      .panel-content { padding-right: 13px; padding-left: 13px; }
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    }
    .boot-caption { margin-top: 20px; color: var(--muted); font: 10px var(--mono); letter-spacing: .12em; text-align: center; }
    .boot-mark { position: relative; }
    .boot-mark::first-letter { color: #e9f8ff; }
    .login-logo { display: block; width: 70px; height: 70px; margin: 0 auto 15px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 30px rgba(0,229,255,.16); }
    .credential-hint { margin: 2px 0 0; color: #8197ad; font: 9px var(--mono); text-align: center; }
    .login-scan { height: 38px; border: 1px solid rgba(102,228,238,.18); border-radius: 7px; color: #a4c4d2; background: rgba(15,35,51,.42); cursor: pointer; font-size: 10px; letter-spacing: .08em; }
    .login-scan:hover { border-color: rgba(102,228,238,.5); color: var(--cyan); }
    .scan-line { position: absolute; z-index: 1; left: 28px; right: 28px; height: 2px; top: 54%; opacity: 0; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); pointer-events: none; }
    .login-card.scanning .scan-line { opacity: .8; animation: scan 1.7s ease-in-out infinite alternate; }
    @keyframes scan { from { transform: translateY(-45px); } to { transform: translateY(45px); } }
    .brand-logo { width: 38px; height: 38px; border: 1px solid rgba(102,228,238,.3); border-radius: 50%; object-fit: cover; }
    .top-actions { display: flex; align-items: center; gap: 8px; }
    .top-action { min-height: 30px; padding: 0 9px; border: 1px solid rgba(125,162,199,.16); border-radius: 6px; background: rgba(18,31,49,.55); color: #a8bdce; cursor: pointer; font: 9px var(--mono); }
    .top-action:hover, .top-action[aria-pressed="true"] { border-color: rgba(102,228,238,.4); color: var(--cyan); }
    .skip-intro { position: absolute; right: 28px; bottom: 24px; padding: 9px 13px; border: 1px solid rgba(125,162,199,.25); border-radius: 6px; color: var(--text); background: rgba(8,17,31,.7); cursor: pointer; font: 10px var(--mono); }
    .layout { grid-template-areas: "left body right" "chart chart log"; }
    .left-column { max-height: calc(100vh - 116px); overflow-y: auto; scrollbar-width: none; }
    .left-column::-webkit-scrollbar { display: none; }
    .vitals-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; }
    .vitals-grid .training-note { grid-column: 1 / -1; }
    .vitals-grid .vital { min-width: 0; min-height: 64px; padding: 7px 0 6px; border-bottom: 1px solid rgba(125,162,199,.08); }
    .vitals-grid .vital-line { align-items: flex-start; flex-direction: column; gap: 1px; }
    .vitals-grid .vital-name { font-size: 10px; white-space: nowrap; }
    .vitals-grid .vital-value { font-size: 17px; }
    .vitals-grid .vital-unit { font-size: 9px; }
    .vitals-grid .vital-reference { margin-top: 2px; font-size: 8px; white-space: nowrap; }
    .vitals-grid .meter { margin-top: 5px; }
    .vitals-grid .vital:nth-child(n + 7) .vital-reference { display: none; }
    .vitals-grid .vital:nth-child(n + 7) { min-height: 50px; }
    .spacecraft-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
    .spacecraft-grid .telemetry-label { font-size: 8px; }
    .spacecraft-grid .telemetry-value { font-size: 10px; }
    .right-column { gap: 11px; }
    .right-column .panel-header { min-height: 39px; padding: 9px 12px 8px; }
    .right-column .panel-content { padding: 11px 12px; }
    .right-column .doctor-subhead { margin: 10px 0 6px; }
    .right-column .doctor-summary { min-height: 0; font-size: 11px; }
    .right-column .action-list { gap: 4px; }
    .right-column .chat-area { min-height: 260px; }
    .vital.warning .vital-value, .vital.warning .vital-reference { color: var(--amber); }
    .vital.critical .vital-value, .vital.critical .vital-reference { color: var(--red); }
    .telemetry-value.warning { color: var(--amber); }
    .telemetry-value.critical { color: var(--red); }
    .source-panel .panel-content { padding-top: 12px; padding-bottom: 12px; }
    .source-card { display: grid; gap: 6px; color: #b7c8d8; font: 10px var(--mono); line-height: 1.5; }
    .source-card strong { color: #def5ff; font-weight: 500; }
    .source-card a { color: var(--cyan); text-decoration: none; }
    .source-card[data-severity="watch"] { color: var(--amber); }
    .research-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
    .research-list li { display: grid; gap: 3px; color: #91a1b6; font-size: 10px; line-height: 1.35; }
    .research-list strong { color: #d3e2ef; font-weight: 500; }
    .research-list span { color: var(--cyan); font: 9px var(--mono); }
    .research-list a { color: var(--cyan); font: 9px var(--mono); text-decoration: none; }
    .research-list a:hover { text-decoration: underline; }
    .provider-error { color: #f0ad88 !important; }
    .ai-source { display: flex; min-height: 25px; align-items: center; gap: 8px; padding: 5px 15px; color: #e8ad58; font: 9px var(--mono); }
    .data-badge { border: 1px solid rgba(102,228,238,.25); border-radius: 10px; padding: 2px 7px; color: var(--cyan); }
    .data-badge.simulated { border-color: rgba(232,173,88,.35); color: var(--amber); }
    .research-panel { max-height: 210px; overflow-y: auto; }
    .footer { max-width: 1500px; margin-inline: auto; padding: 0 15px; color: #8799ad; line-height: 1.5; }
    .body-stage canvas { touch-action: none; }
    .body-stage.dragging { cursor: grabbing; }
    .login-message.denied { color: var(--red); }
    .login-card.shake { animation: denied-shake .36s ease; }
    @keyframes denied-shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-4px); } }
    .event { overflow-wrap: anywhere; }
    .organ-detail { position: absolute; z-index: 4; left: 16px; bottom: 20px; display: grid; width: min(230px, calc(100% - 32px)); gap: 5px; padding: 12px; border: 1px solid rgba(102,228,238,.3); border-radius: 9px; background: rgba(5,12,24,.9); box-shadow: 0 8px 26px rgba(0,0,0,.32); backdrop-filter: blur(12px); }
    .organ-detail strong { color: #e2f5ff; font: 10px var(--mono); }
    .organ-detail > span { color: var(--cyan); font: 12px var(--mono); }
    .organ-detail small { color: #91a1b6; font: 9px var(--mono); }
    .organ-detail canvas { width: 100%; height: 48px; }
    .organ-detail[hidden] { display: none; }
    .quick-questions { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 12px 0; }
    .quick-question { border: 1px solid rgba(125,162,199,.16); border-radius: 12px; padding: 4px 8px; color: #a7bfd0; background: rgba(15,28,44,.48); cursor: pointer; font-size: 9px; }
    .quick-question:hover { color: var(--cyan); border-color: rgba(102,228,238,.36); }
    @media (max-width: 980px) {
      .left-column { max-height: calc(100vh - 116px); overflow-y: auto; }
      .layout { grid-template-columns: minmax(220px, .82fr) minmax(320px, 1.18fr); grid-template-areas: "left body" "right right" "chart chart" "log log"; }
      .body-panel { grid-row: auto; }
      .right-column { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    }
    @media (max-width: 720px) {
      .masthead { flex-wrap: wrap; }
      .top-actions { margin-left: auto; }
      .left-column { max-height: none; overflow: visible; grid-template-columns: 1fr; }
      .right-column { grid-template-columns: minmax(0, 1fr); }
      .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "body" "left" "right" "chart" "log"; }
      .source-panel { min-width: 0; }
      .login-card { overflow: hidden; }
    }
  