/* ===== SUPER POLISH PASS ===== */
:root{--radius:14px;--radius-sm:9px;--focus:#56a8ff;--green2:#4ee08a;--amber2:#f4bd3b;--red2:#ff5f6d}
html[data-theme="dark"]{--bg:#000;--panel:#050505;--surface:#050505;--surface-2:#090909;--surface-3:#0f0f10;--line:#242424;--ink:#f5f7fa;--muted:#9ca3ad;--blue:#4da3ff;--blue2:#1f78db}
html[data-theme="dark"],html[data-theme="dark"] body{background:#000!important}
html[data-theme="dark"] main{background:#000}
html[data-theme="dark"] .game-shell,html[data-theme="dark"] .game-card,html[data-theme="dark"] .library-hero,html[data-theme="dark"] .stats-page,html[data-theme="dark"] .about-page{background:#030303!important;border-color:#232323!important}
html[data-theme="dark"] .game-stage,html[data-theme="dark"] .chart,html[data-theme="dark"] .case-shell,html[data-theme="dark"] .trauma-layout,html[data-theme="dark"] .surgery-layout{background:#000!important}
html[data-theme="dark"] .chart-section,html[data-theme="dark"] .chart-section .content,html[data-theme="dark"] #surgeryPanel,html[data-theme="dark"] .surg-question,html[data-theme="dark"] .surg-equipment,html[data-theme="dark"] .surg-outcome,html[data-theme="dark"] .clinical-console,html[data-theme="dark"] .patient-card,html[data-theme="dark"] .body-view-card,html[data-theme="dark"] .side-panel,html[data-theme="dark"] .answer-panel{background:#050505!important;color:#f5f7fa!important;border-color:#242424!important}
html[data-theme="dark"] .chart-section h3,html[data-theme="dark"] .side-panel h3,html[data-theme="dark"] .game-head,html[data-theme="dark"] .body-config,html[data-theme="dark"] .anatomy-viewbar,html[data-theme="dark"] .trauma-top,html[data-theme="dark"] .surgery-banner,html[data-theme="dark"] .handoff-note{background:#080808!important;border-color:#242424!important;color:#f5f7fa!important}
html[data-theme="dark"] .secondary,html[data-theme="dark"] .choice,html[data-theme="dark"] .diagnosis-options button,html[data-theme="dark"] .dx-option,html[data-theme="dark"] .seg button,html[data-theme="dark"] .quick-actions button,html[data-theme="dark"] .trauma-tool,html[data-theme="dark"] .surg-tool{background:#080808!important;border-color:#292929!important;color:#e7ebef!important}
html[data-theme="dark"] .secondary:hover,html[data-theme="dark"] .choice:hover,html[data-theme="dark"] .diagnosis-options button:hover,html[data-theme="dark"] .dx-option:hover,html[data-theme="dark"] .quick-actions button:hover,html[data-theme="dark"] .trauma-tool:hover,html[data-theme="dark"] .surg-tool:hover{background:#111!important;border-color:#4da3ff!important}
html[data-theme="dark"] .answer-input,html[data-theme="dark"] input,html[data-theme="dark"] select{background:#050505!important;border-color:#303030!important;color:#f4f7fb!important}
html[data-theme="dark"] .answer-input::placeholder,html[data-theme="dark"] input::placeholder{color:#707780!important}
html[data-theme="dark"] .clinical-reply{background:#080808!important;border-color:#262626!important;color:#e8edf2!important}
html[data-theme="dark"] .clinical-reply.user{background:#07131e!important;border-color:#1f4263!important}
html[data-theme="dark"] .result-box,html[data-theme="dark"] .diagnosis-submit .content,html[data-theme="dark"] .equipment-head{background:#050505!important;border-color:#242424!important;color:#f5f7fa!important}

/* top level */
.topbar{border-bottom:1px solid var(--line)!important}.brand-mark{box-shadow:inset 0 0 0 1px #ffffff1e}.game-shell{border-radius:16px!important}.game-head{align-items:center}.game-head h1{font-size:26px!important}.game-head p{max-width:860px}
.primary{box-shadow:0 7px 20px #135db525}.primary:hover{box-shadow:0 9px 24px #135db538}.secondary{font-weight:650}
.super-version{font:700 9px ui-monospace,SFMono-Regular,monospace;letter-spacing:.12em;color:var(--muted);border:1px solid var(--line);padding:5px 7px;border-radius:999px}

/* home dashboard */
.super-home{display:grid;gap:20px}.super-hero{border:1px solid var(--line);border-radius:18px;min-height:360px;display:grid;grid-template-columns:1.08fr .92fr;overflow:hidden;background:var(--surface)}
.super-hero-copy{padding:48px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.super-hero-copy h1{font-size:clamp(42px,5vw,70px);line-height:.98;letter-spacing:-.055em;margin:14px 0 18px;max-width:720px}.super-hero-copy p{font-size:16px;color:var(--muted);max-width:620px;margin:0 0 24px}.super-hero-actions{display:flex;gap:10px;flex-wrap:wrap}
.super-hero-monitor{position:relative;min-height:320px;background:#000;display:grid;place-items:center;border-left:1px solid var(--line);overflow:hidden}.hero-monitor-card{width:min(90%,480px);border:1px solid #263238;border-radius:14px;background:#020303;overflow:hidden;box-shadow:0 24px 60px #0009}.hero-monitor-top{display:flex;justify-content:space-between;padding:10px 14px;border-bottom:1px solid #1e272b;color:#8e9ba1;font:700 9px ui-monospace,monospace;letter-spacing:.12em}.hero-monitor-wave{height:120px;position:relative;overflow:hidden;background:linear-gradient(#00100a22,#000)}.hero-monitor-wave svg{position:absolute;inset:0;width:145%;height:100%;animation:heroSweep 3.6s linear infinite}.hero-monitor-wave path{fill:none;stroke:#54efaa;stroke-width:2;filter:drop-shadow(0 0 5px #54efaa88)}.hero-monitor-numbers{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid #1e272b}.hero-monitor-numbers div{padding:14px;border-right:1px solid #1e272b}.hero-monitor-numbers div:last-child{border:0}.hero-monitor-numbers small{display:block;color:#67757a;font:700 9px ui-monospace,monospace}.hero-monitor-numbers b{display:block;font:800 27px ui-monospace,monospace;color:#eaf0f3}.hero-monitor-numbers div:first-child b{color:#54efaa}.hero-monitor-numbers div:nth-child(2) b{color:#53cdf5}.super-quickstats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.quickstat{border:1px solid var(--line);background:var(--surface);border-radius:12px;padding:14px 16px}.quickstat b{font-size:22px;display:block}.quickstat span{font-size:11px;color:var(--muted)}
.game-card{border-radius:14px!important}.game-card .card-art{height:126px}.game-card:hover{border-color:#3f6d99}.game-card .play-btn{font-weight:750}
@keyframes heroSweep{to{transform:translateX(-31%)}}

/* anatomy */
.anatomy-shell .game-stage{padding-top:18px}.body-stage-v3{grid-template-columns:minmax(0,1fr) 320px!important}.dual-body-board{gap:12px}.body-view-card{border-radius:12px!important}.body-view-card header{height:42px}.body-wrap-dual{height:min(62vw,690px)!important;max-height:690px!important}.body-wrap-dual img{object-fit:contain!important;mix-blend-mode:normal!important}
.body-hotspot.candidate-dot{opacity:1!important;width:38px!important;height:38px!important;z-index:8!important}.body-hotspot.candidate-dot:before{width:14px!important;height:14px!important;border:2px solid #fff!important;background:#168cff!important;box-shadow:0 0 0 2px #0763bf,0 0 0 7px #168cff22,0 0 18px #168cff55!important}.body-hotspot.candidate-dot:hover:before,.body-hotspot.candidate-dot:focus-visible:before{width:19px!important;height:19px!important;box-shadow:0 0 0 2px #98d0ff,0 0 0 9px #168cff33,0 0 22px #168cff77!important}.body-hotspot.candidate-dot:after{content:attr(data-choice);position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font:800 8px ui-monospace,monospace;color:#fff;z-index:2;pointer-events:none}.body-hotspot.candidate-dot:hover:after{font-size:10px}
.body-hotspot.candidate-dot.wrong:before{background:#e64454!important}.body-hotspot.candidate-dot.feedback-green:before{background:#2fbd68!important}.body-hotspot.candidate-dot.feedback-yellow:before{background:#d8a91d!important}.body-hotspot.candidate-dot.feedback-red:before{background:#e64454!important}
.body-side-panel .inside{display:grid;gap:12px}.anatomy-mini-guide{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.anatomy-mini-guide div{border:1px solid var(--line);background:var(--surface-2);border-radius:9px;padding:9px}.anatomy-mini-guide b{display:block;font-size:16px}.anatomy-mini-guide span{font-size:9px;color:var(--muted)}.attempt-box{margin-top:0!important}.advanced-panel{gap:14px!important}.closeup-stage{position:relative;height:310px;border:1px solid var(--line);border-radius:12px;background:#000;overflow:hidden;display:grid;place-items:center}.closeup-stage img{width:100%;height:100%;object-fit:contain}.closeup-locator{position:absolute;width:26px;height:26px;border-radius:50%;border:2px solid #fff;background:#278dff33;box-shadow:0 0 0 2px #278dff,0 0 0 8px #278dff22,0 0 22px #278dff99;transform:translate(-50%,-50%);animation:locatorPulse 1.6s ease-in-out infinite}.advanced-facts{display:grid;gap:8px}.advanced-fact{border:1px solid var(--line);background:var(--surface-2);border-radius:9px;padding:10px 11px}.advanced-fact small{display:block;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.1em}.advanced-fact b{display:block;margin-top:2px}.candidate-hint{color:var(--muted);font-size:11px}.candidate-hint strong{color:var(--ink)}
@keyframes locatorPulse{50%{box-shadow:0 0 0 2px #278dff,0 0 0 13px #278dff12,0 0 28px #278dffbb}}

/* bedside monitor */
.vital-monitor{background:#000!important;border:1px solid #24282b!important;border-radius:12px!important;overflow:hidden!important;box-shadow:inset 0 0 40px #000!important}.monitor-title{height:36px!important;padding:0 12px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;background:#020303!important;border-bottom:1px solid #1d2428!important;color:#849197!important}.monitor-title .monitor-mode{font:700 8px ui-monospace,monospace;letter-spacing:.1em;color:#5d686d}.monitor-screen{background:#000!important}.monitor-wave-row{height:104px!important;grid-template-columns:46px minmax(0,1fr) 112px!important}.monitor-wave-row.pleth-row,.monitor-wave-row.resp-row{height:68px!important}.bedside-wave{background:#000!important}.wave-label{padding-top:8px!important}.wave-number{background:#000!important}.wave-number b{font-size:34px!important}.resp-label,.yellow-num{color:#f1c84c!important}.monitor-bottom{background:#020303!important}.monitor-alarm{display:none;padding:6px 10px;background:#2a090d;color:#ff909b;border-bottom:1px solid #5e1d25;font:800 10px ui-monospace,monospace;letter-spacing:.08em}.vital-monitor.alarm .monitor-alarm{display:block}.monitor-beat-light{width:8px;height:8px;border-radius:50%;background:#50efa7;box-shadow:0 0 10px #50efa7}.monitor-beat-light.flash{animation:beatFlash .16s ease}.monitor-sweep{position:absolute;top:0;bottom:0;width:44px;background:linear-gradient(90deg,transparent,#ffffff0b,transparent);pointer-events:none;animation:monitorSweep 4.2s linear infinite}.monitor-wave-canvas-wrap{position:relative;min-width:0;overflow:hidden}.monitor-bottom b{font-size:18px!important}.vital-monitor .muted{color:#7c898e!important}
@keyframes beatFlash{50%{transform:scale(1.9);background:#d8fff0}}@keyframes monitorSweep{from{left:-44px}to{left:100%}}

/* diagnosis */
.case-shell{grid-template-columns:285px minmax(0,1fr)!important;align-items:start}.diagnosis-shell .patient-card{position:sticky;top:96px}.patient-card .avatar{height:220px!important;background:#000!important}.patient-card .avatar img{height:215px!important;mix-blend-mode:normal!important}.patient-card dl{padding:12px 14px!important}.patient-card .name{font-size:18px!important}.patient-status-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 12px;border-bottom:1px solid var(--line);background:var(--surface-2)}.patient-status-row span{font-size:9px;color:var(--muted);letter-spacing:.08em}.patient-status-row b{font-size:10px;color:#5cb1ff}.ai-case-loader{min-height:540px;display:grid;place-items:center;text-align:center}.ai-case-loader .loader-core{width:min(460px,90%);display:grid;gap:14px}.loader-ring{width:54px;height:54px;border:3px solid #1d1d1d;border-top-color:#4da3ff;border-radius:50%;animation:spin 1s linear infinite;margin:auto}.loader-bars{display:grid;gap:7px}.loader-bars i{height:8px;border-radius:999px;background:#101010;overflow:hidden;position:relative}.loader-bars i:after{content:"";position:absolute;inset:0;width:40%;background:#1e5ea0;animation:loadbar 1.35s ease-in-out infinite alternate}.loader-bars i:nth-child(2):after{animation-delay:.2s}.loader-bars i:nth-child(3):after{animation-delay:.35s}@keyframes spin{to{transform:rotate(360deg)}}@keyframes loadbar{to{transform:translateX(150%)}}
.clinical-console .content{gap:14px!important}.clinical-transcript{max-height:340px!important;scrollbar-width:thin}.clinical-reply{padding:11px 12px!important}.clinical-reply small.ai-source{float:none!important;display:inline-block;margin-left:8px;border:1px solid #244b6c;border-radius:999px;padding:1px 5px}.dx-mode-row{padding-bottom:10px;border-bottom:1px solid var(--line)}.diagnosis-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}.diagnosis-options button{min-height:52px}.result-box.show{padding:14px!important}

/* trauma */
.trauma-layout{grid-template-columns:300px minmax(0,1fr)!important;align-items:start}.trauma-left{position:sticky;top:96px}.trauma-avatar{height:500px!important;background:#000!important;padding:0!important}.trauma-body-wrap{height:500px!important;position:relative!important}.trauma-body-wrap img{height:96%!important;max-width:100%!important;mix-blend-mode:normal!important}.trauma-left .view-toggle{margin-top:8px}.injury-marker{width:22px!important;height:22px!important;background:#ff4454!important;border:2px solid #fff!important;box-shadow:0 0 0 2px #9e1822,0 0 0 7px #ff445424,0 0 18px #ff445466!important}.injury-marker span{display:none!important}.injury-marker:after{content:"";position:absolute;inset:6px;border-radius:50%;background:#fff}.injury-marker.treated{background:#39c66d!important;box-shadow:0 0 0 2px #1b713d,0 0 0 7px #39c66d20!important}.injury-marker.treated:after{content:"✓";inset:auto;left:50%;top:50%;transform:translate(-50%,-54%);background:transparent;color:#fff;font-size:10px;font-weight:900}.trauma-stepbar{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;margin:12px 0}.trauma-step{border:1px solid var(--line);background:var(--surface-2);border-radius:8px;padding:8px 9px;min-width:0}.trauma-step small{display:block;font-size:8px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.trauma-step b{display:block;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.trauma-step.done{border-color:#285c3c;background:#07140d}.trauma-step.done b{color:#79dea0}.trauma-step.active{border-color:#326b9f;background:#07121d}.trauma-step.active b{color:#78bfff}.debrief-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.debrief-card{border:1px solid var(--line);background:var(--surface-2);border-radius:10px;padding:13px}.debrief-card b{display:block;font-size:22px}.debrief-card span{font-size:10px;color:var(--muted)}.debrief-timeline{display:grid;gap:8px;margin-top:12px}.debrief-event{display:grid;grid-template-columns:34px 1fr;gap:9px;align-items:start;border:1px solid var(--line);border-radius:9px;padding:9px 10px;background:var(--surface-2)}.debrief-event>span{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#111;font-size:10px}.debrief-event.ok>span{color:#61da8b}.debrief-event.bad>span{color:#ff7e89}.tool-rack{grid-template-columns:repeat(2,minmax(0,1fr))!important}.trauma-tool{min-height:112px!important}.trauma-tool img{width:72px!important;height:72px!important;object-fit:contain!important;background:transparent!important}.tool-symbol{width:62px!important;height:62px!important;border:1px solid #292929;border-radius:9px;background:#050505;display:grid!important;place-items:center!important;color:#8fbae6;font:800 13px ui-monospace,monospace!important}

/* surgery */
.surgery-layout{grid-template-columns:280px minmax(0,1fr)!important;align-items:start}.surgery-patient{position:sticky!important;top:96px!important;background:#050505!important;border:1px solid var(--line)!important;border-radius:12px!important;overflow:hidden}.surgery-body{height:390px!important;width:100%!important;background:#000!important}.surgery-body img{height:100%!important;width:100%!important;object-fit:contain!important;mix-blend-mode:normal!important}.surgery-marker{width:20px!important;height:20px!important;background:#ff4858!important;border:2px solid #fff!important;box-shadow:0 0 0 2px #961d27,0 0 0 6px #ff485822!important}.surgery-marker span{display:none!important}.surgery-patient h2{padding:0 14px}.patient-facts{padding:0 14px 14px}.patient-facts span{background:#090909!important}.surgery-progress{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;margin:12px 0}.surgery-progress div{border:1px solid var(--line);background:#080808;border-radius:8px;padding:7px 8px}.surgery-progress small{display:block;color:var(--muted);font-size:8px;letter-spacing:.08em}.surgery-progress b{font-size:10px}.surgery-progress .done{border-color:#285c3c}.surgery-progress .done b{color:#7de1a2}.surgery-progress .active{border-color:#346c9f}.surgery-progress .active b{color:#78bfff}.surg-tool-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}.surg-tool{min-height:118px!important}.surg-tool-image{width:72px!important;height:72px!important}.surg-tool-image img{width:68px!important;height:68px!important}.final-score{font-size:68px!important;line-height:1}

/* tools */
.tool-stage{grid-template-columns:minmax(380px,1fr) 400px!important}.tool-image-box{min-height:500px!important;background:#000!important;border-color:#242424!important}.tool-image-box img{max-height:430px!important;background:transparent!important;mix-blend-mode:normal!important}.tool-lesson{margin-top:12px;border:1px solid var(--line);background:var(--surface-2);border-radius:9px;padding:11px 12px}.tool-lesson small{display:block;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.08em}.tool-lesson p{margin:4px 0 0}

/* doctordle */
.doctordle-wrap{max-width:900px;margin:auto}.doctordle-top{padding-bottom:16px;border-bottom:1px solid var(--line)}.clue-card{min-height:64px}.clue-card.revealed{animation:clueIn .25s ease both}.clue-card.locked{background:#030303!important}.dd-stem{margin:10px 0 0;font-size:16px;line-height:1.65;max-width:720px}.guess-history{margin-top:16px}.doctordle-entry{position:sticky;bottom:12px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:10px;z-index:5;box-shadow:0 12px 30px #0008}@keyframes clueIn{from{opacity:.3;transform:translateY(4px)}to{opacity:1;transform:none}}

/* stats */
.super-stats-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:16px}.stats-block{border:1px solid var(--line);background:var(--surface);border-radius:12px;padding:18px}.stats-block h2{margin:0 0 10px}.performance-bars{display:grid;gap:11px}.perf-row{display:grid;grid-template-columns:140px 1fr 52px;gap:10px;align-items:center}.perf-track{height:8px;border-radius:999px;background:var(--surface-3);overflow:hidden}.perf-track span{display:block;height:100%;background:var(--blue);border-radius:999px;transition:width .5s ease}.perf-row small{color:var(--muted)}

@media(max-width:980px){.super-hero{grid-template-columns:1fr}.super-hero-monitor{border-left:0;border-top:1px solid var(--line);min-height:260px}.super-quickstats{grid-template-columns:repeat(2,1fr)}.body-stage-v3,.case-shell,.trauma-layout,.surgery-layout{grid-template-columns:1fr!important}.body-side-panel,.diagnosis-shell .patient-card,.trauma-left,.surgery-patient{position:static!important}.surg-tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.super-stats-grid{grid-template-columns:1fr}}
@media(max-width:680px){.super-hero-copy{padding:28px 22px}.super-hero-copy h1{font-size:42px}.super-quickstats{grid-template-columns:1fr 1fr}.body-wrap-dual{height:72vw!important;min-height:350px!important}.body-hotspot.candidate-dot{width:42px!important;height:42px!important}.tool-rack,.diagnosis-options,.surg-tool-grid{grid-template-columns:1fr!important}.tool-stage{grid-template-columns:1fr!important}.trauma-stepbar,.surgery-progress{grid-template-columns:1fr 1fr}.debrief-grid{grid-template-columns:1fr 1fr}.perf-row{grid-template-columns:105px 1fr 42px}.monitor-wave-row{grid-template-columns:34px minmax(0,1fr) 84px!important}.wave-number b{font-size:27px!important}}

/* ===== V3.1 anatomy geometry correction =====
   All body plates are 1024x1536 (2:3). Give the overlay wrapper the same
   aspect ratio so percentage-based target coordinates are tied to the actual
   rendered image canvas, not to letterboxed empty space. */
.body-wrap-dual{
  display:block!important;
  width:min(100%,460px)!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:2 / 3!important;
  margin:0 auto!important;
}
.body-wrap-dual img{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
}
.body-view-card{display:flex!important;flex-direction:column!important}
.body-view-card>.body-wrap-dual{flex:0 0 auto!important}
@media(max-width:680px){
  .dual-body-board{grid-template-columns:repeat(2,minmax(250px,1fr))!important;overflow-x:auto!important;padding-bottom:4px}
  .body-wrap-dual{width:min(100%,420px)!important;height:auto!important;min-height:0!important}
}
.advanced-atlas{display:grid;gap:8px}.advanced-atlas-grid{display:flex;flex-wrap:wrap;gap:6px}.atlas-chip{border:1px solid var(--line);background:var(--surface-2);color:var(--ink);border-radius:999px;padding:6px 9px;font-size:10px;font-weight:800;cursor:pointer}.atlas-chip:hover,.atlas-chip:focus-visible{border-color:#278dff;background:#278dff14;color:#278dff;outline:none}html[data-theme="dark"] .atlas-chip{background:#090909!important;border-color:#292929!important;color:#e9edf2!important}html[data-theme="dark"] .atlas-chip:hover,html[data-theme="dark"] .atlas-chip:focus-visible{border-color:#278dff!important;background:#071321!important;color:#67b4ff!important}

/* ===== V3.3 launch hub + natural clinical conversation ===== */
.ai-source,.ai-badge{display:none!important}
body.hub-active{background:#000!important;overflow-x:hidden}
body.hub-active .topbar,body.hub-active footer{display:none!important}
body.hub-active main{width:100%!important;max-width:none!important;margin:0!important;min-height:100vh}
.launch-hub{min-height:100vh;background:#000;color:#f7f9fb;display:grid;place-items:center;position:relative;overflow:hidden;padding:clamp(24px,5vw,72px)}
.launch-hub:before{content:"";position:absolute;inset:-20%;background:radial-gradient(circle at 50% 38%,rgba(21,101,192,.18),transparent 28%),radial-gradient(circle at 20% 80%,rgba(23,147,255,.08),transparent 22%);animation:hubGlow 10s ease-in-out infinite alternate;pointer-events:none}
.hub-grid-bg{position:absolute;inset:0;opacity:.17;background-image:linear-gradient(#15334955 1px,transparent 1px),linear-gradient(90deg,#15334955 1px,transparent 1px);background-size:44px 44px;mask-image:radial-gradient(circle at center,#000 0 34%,transparent 76%);animation:hubGrid 18s linear infinite;pointer-events:none}
.hub-core{position:relative;z-index:1;width:min(980px,100%);display:grid;gap:36px}
.hub-brand{display:flex;align-items:center;gap:22px;padding-bottom:8px}
.hub-logo{width:78px;height:78px;border:1px solid #234c6e;background:#06111a;border-radius:20px;display:grid;place-items:center;box-shadow:0 0 0 1px #0a2c46,0 18px 50px #000}
.hub-logo img{width:58px;height:58px;object-fit:contain;filter:drop-shadow(0 0 18px #1597ff55)}
.hub-brand h1{margin:4px 0 8px;font-size:clamp(34px,6vw,64px);line-height:.98;letter-spacing:-.045em}
.hub-brand p{margin:0;color:#8e9ba7;font-size:16px}
.hub-choices{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.hub-choice{appearance:none;text-decoration:none;color:#f7f9fb;background:#050505;border:1px solid #242424;border-radius:18px;min-height:180px;padding:24px;display:grid;grid-template-columns:auto 1fr auto;align-items:end;gap:20px;text-align:left;cursor:pointer;position:relative;overflow:hidden;transition:transform .2s ease,border-color .2s ease,background .2s ease,box-shadow .2s ease}
.hub-choice:before{content:"";position:absolute;inset:0;background:linear-gradient(135deg,rgba(23,147,255,.14),transparent 42%);opacity:0;transition:opacity .2s ease}
.hub-choice:hover,.hub-choice:focus-visible{transform:translateY(-4px);border-color:#23577e;background:#080b0e;box-shadow:0 18px 60px rgba(0,0,0,.45)}
.hub-choice:hover:before,.hub-choice:focus-visible:before{opacity:1}
.hub-index{align-self:start;font:800 11px ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.14em;color:#4ea8f7;border:1px solid #17496e;border-radius:999px;padding:5px 8px;background:#06131d}
.hub-choice-copy{position:relative;z-index:1}.hub-choice-copy b{display:block;font-size:32px;letter-spacing:-.03em;margin-bottom:4px}.hub-choice-copy small{display:block;color:#86939f;font-size:14px}
.hub-arrow{font-size:34px;color:#55afff;transition:transform .2s ease}.hub-choice:hover .hub-arrow{transform:translate(4px,-4px)}
.hub-status{font:700 10px ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.15em;color:#53616b;display:flex;align-items:center;gap:8px}.hub-status span{width:7px;height:7px;border-radius:50%;background:#35d779;box-shadow:0 0 12px #35d779aa;animation:hubPulse 1.7s ease-in-out infinite}
.clinical-reply:not(.user):not(.system){font-size:14px;line-height:1.55}
.clinical-reply.user b{font-weight:700}
.clinical-reply.thinking{font-style:italic;color:#7f8c96}
.quick-actions{flex-wrap:wrap}
@keyframes hubGlow{to{transform:translate3d(3%,2%,0) scale(1.05)}}
@keyframes hubGrid{to{background-position:44px 44px}}
@keyframes hubPulse{50%{opacity:.35;transform:scale(.82)}}
@media(max-width:720px){.hub-brand{align-items:flex-start}.hub-logo{width:64px;height:64px;border-radius:16px}.hub-logo img{width:48px;height:48px}.hub-choices{grid-template-columns:1fr}.hub-choice{min-height:145px}.hub-choice-copy b{font-size:28px}}
@media(prefers-reduced-motion:reduce){.launch-hub:before,.hub-grid-bg,.hub-status span{animation:none!important}.hub-choice{transition:none!important}}

/* ===== V3.4 patient encounter rework ===== */
.dx-v5 .game-stage{padding:18px!important}
.dx-encounter{display:grid;grid-template-columns:286px minmax(0,1fr);gap:16px;align-items:start;background:#000}
.dx-patient-rail{position:sticky;top:76px;display:grid;gap:10px}
.dx-identity-card{border:1px solid #242424;background:#050505;border-radius:14px;overflow:hidden}
.dx-avatar-wrap{height:238px;position:relative;display:grid;place-items:end center;background:radial-gradient(circle at 50% 24%,#13283a 0,#071018 45%,#030303 76%);border-bottom:1px solid #242424;overflow:hidden}
.dx-avatar-wrap:after{content:"";position:absolute;inset:auto 0 0;height:52%;background:linear-gradient(transparent,#050505);pointer-events:none}
.dx-avatar-wrap img{height:228px;max-width:94%;object-fit:contain;filter:saturate(.62) contrast(1.03) brightness(.92);position:relative;z-index:0}
.dx-patient-identity{padding:15px 16px 12px;position:relative}.dx-patient-identity .eyebrow{color:#63b6ff}.dx-patient-identity h2{font-size:25px;line-height:1.05;margin:5px 0 4px;letter-spacing:-.03em}.dx-patient-identity p{margin:0;color:#8e98a1;font-size:12px}
.dx-room-status{position:absolute;right:14px;top:16px;display:flex;align-items:center;gap:6px;color:#8d989f;font:700 9px ui-monospace,SFMono-Regular,monospace;letter-spacing:.08em}.dx-room-status i{width:6px;height:6px;border-radius:50%;background:#42dc82;box-shadow:0 0 10px #42dc8277}
.dx-demographics{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #202020}.dx-demo{padding:11px 13px;border-right:1px solid #202020;border-bottom:1px solid #202020}.dx-demo:nth-child(2n){border-right:0}.dx-demo:nth-last-child(-n+2){border-bottom:0}.dx-demo small{display:block;color:#6f7a82;font:700 8px ui-monospace,SFMono-Regular,monospace;letter-spacing:.1em;text-transform:uppercase}.dx-demo b{display:block;margin-top:3px;color:#edf2f5;font-size:12px;font-weight:700}
.dx-new-patient{width:100%;height:42px;border-radius:10px!important}
.dx-workspace{min-width:0;display:grid;gap:12px}
.dx-brief-strip{display:grid;grid-template-columns:1.2fr .8fr;border:1px solid #242424;background:#050505;border-radius:12px;overflow:hidden}.dx-brief-block{padding:13px 15px;min-width:0}.dx-brief-block+ .dx-brief-block{border-left:1px solid #242424}.dx-brief-block small{display:block;color:#5f99ca;font:800 8px ui-monospace,SFMono-Regular,monospace;letter-spacing:.11em}.dx-brief-block b,.dx-brief-block span{display:block;margin-top:5px;line-height:1.45}.dx-brief-block b{font-size:14px}.dx-brief-block span{font-size:12px;color:#a3adb5}
.dx-interview-card{border:1px solid #262626;background:#030303;border-radius:14px;overflow:hidden}.dx-interview-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border-bottom:1px solid #242424;background:#050505}.dx-interview-head h2{margin:3px 0 0;font-size:18px}.dx-live-status{display:flex;align-items:center;gap:7px;color:#8b979e;font-size:10px;font-weight:700}.dx-live-status i{width:7px;height:7px;border-radius:50%;background:#46db87;box-shadow:0 0 11px #46db8777;animation:hubPulse 1.8s ease-in-out infinite}
.dx-action-deck{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px 14px;border-bottom:1px solid #202020;background:#020202}.dx-action-group{min-width:0}.dx-action-group>small{display:block;margin-bottom:7px;color:#6f7a82;font:800 8px ui-monospace,SFMono-Regular,monospace;letter-spacing:.12em}.dx-action-row{display:flex;flex-wrap:wrap;gap:6px}.dx-action-row button{appearance:none;border:1px solid #282828;background:#080808;color:#dce3e8;border-radius:999px;padding:7px 10px;font-size:10px;font-weight:750;cursor:pointer;transition:.16s ease}.dx-action-row button:hover,.dx-action-row button:focus-visible{background:#0c1620;border-color:#347ab3;color:#78c3ff;outline:none;transform:translateY(-1px)}
.dx-transcript{height:min(42vh,390px);min-height:300px;overflow:auto;display:flex;flex-direction:column;gap:12px;padding:16px 16px 20px;scroll-behavior:smooth;background:radial-gradient(circle at 20% 0,#06111a55,transparent 30%),#000}.dx-message{display:grid;grid-template-columns:32px minmax(0,1fr);gap:9px;max-width:84%;animation:dxMessageIn .18s ease both}.dx-message.you{align-self:flex-end;grid-template-columns:minmax(0,1fr) 32px}.dx-message.you .dx-msg-avatar{grid-column:2}.dx-message.you .dx-msg-body{grid-column:1;grid-row:1;text-align:left}.dx-msg-avatar{width:32px;height:32px;border-radius:10px;border:1px solid #2a2a2a;background:#0a0a0a;display:grid;place-items:center;color:#8ebce5;font:800 10px ui-monospace,SFMono-Regular,monospace}.dx-message.you .dx-msg-avatar{background:#092139;border-color:#194e7b;color:#8ccaff}.dx-msg-body{min-width:0}.dx-msg-meta{display:flex;align-items:center;gap:7px;margin:0 2px 4px;color:#7d8990;font-size:9px;font-weight:700}.dx-message.you .dx-msg-meta{justify-content:flex-end}.dx-msg-bubble{border:1px solid #262626;background:#080808;color:#edf1f4;border-radius:4px 13px 13px 13px;padding:10px 12px;font-size:13px;line-height:1.55;white-space:pre-wrap}.dx-message.you .dx-msg-bubble{background:#0a2237;border-color:#1b4d75;border-radius:13px 4px 13px 13px}.dx-message.result{max-width:92%;align-self:stretch;grid-template-columns:32px minmax(0,1fr)}.dx-message.result .dx-msg-avatar{background:#08130e;border-color:#1d4932;color:#69dda0}.dx-message.result .dx-msg-bubble{background:#050806;border-color:#21372b}.dx-message.result .dx-msg-meta{color:#6b9f80}.dx-message.thinking .dx-msg-bubble{color:#7d8990;font-style:italic}.dx-message.thinking .dx-msg-bubble:after{content:"";display:inline-block;width:26px;height:5px;margin-left:7px;border-radius:999px;background:linear-gradient(90deg,#33414a 20%,#8da0ab 50%,#33414a 80%);background-size:52px 5px;animation:thinkingSlide .9s linear infinite}.dx-message.error .dx-msg-bubble{border-color:#5d252c;background:#16080a;color:#ffc3c8}
.dx-opening-note{align-self:center;color:#657079;font-size:9px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;margin:0 0 -2px}
.dx-compose{border-top:1px solid #222;background:#050505;padding:11px}.dx-compose-inner{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end;border:1px solid #2c2c2c;background:#020202;border-radius:11px;padding:6px 6px 6px 11px;transition:border-color .16s,box-shadow .16s}.dx-compose-inner:focus-within{border-color:#287bc0;box-shadow:0 0 0 3px #1c79bd22}.dx-compose textarea{resize:none;min-height:38px;max-height:110px;padding:9px 2px;border:0!important;background:transparent!important;color:#f1f4f6!important;font:inherit;line-height:1.4;outline:none!important;box-shadow:none!important}.dx-compose textarea::placeholder{color:#65717a}.dx-compose button{height:38px;min-width:78px;border-radius:8px!important}.dx-compose-hint{display:flex;justify-content:space-between;gap:10px;padding:6px 4px 0;color:#58636b;font-size:9px}
.dx-bottom-grid{display:grid;grid-template-columns:.8fr 1.2fr;gap:12px}.dx-evidence-card,.dx-submit-card{border:1px solid #242424;background:#050505;border-radius:12px;overflow:hidden}.dx-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 13px;border-bottom:1px solid #222}.dx-card-head h3{margin:0;font-size:13px}.dx-card-head span{color:#6f7a82;font:700 9px ui-monospace,SFMono-Regular,monospace}.dx-evidence-body{padding:12px 13px;display:grid;gap:8px}.dx-evidence-empty{color:#7f8990;font-size:11px;line-height:1.5}.dx-evidence-chip{display:grid;grid-template-columns:auto 1fr;gap:8px;align-items:start;border:1px solid #232323;background:#080808;border-radius:8px;padding:8px 9px}.dx-evidence-chip b{font-size:9px;color:#70b8f4;text-transform:uppercase;letter-spacing:.08em}.dx-evidence-chip span{font-size:10px;color:#aab2b8;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dx-submit-body{padding:12px 13px}.dx-submit-card .diagnosis-options{grid-template-columns:1fr 1fr}.dx-submit-card .diagnosis-options button{min-height:44px;border-radius:9px!important}.dx-submit-card .result-box{margin-top:10px!important}.dx-submit-card .dx-mode-row{margin:0 0 10px}
@keyframes dxMessageIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media(max-width:1000px){.dx-encounter{grid-template-columns:1fr}.dx-patient-rail{position:static}.dx-identity-card{display:grid;grid-template-columns:180px 1fr}.dx-avatar-wrap{height:200px;grid-row:1 / span 2}.dx-patient-identity{align-self:end}.dx-demographics{align-self:start}.dx-new-patient{width:auto;justify-self:start}.dx-bottom-grid{grid-template-columns:1fr}}
@media(max-width:720px){.dx-v5 .game-stage{padding:10px!important}.dx-identity-card{display:block}.dx-avatar-wrap{height:190px}.dx-action-deck{grid-template-columns:1fr}.dx-brief-strip{grid-template-columns:1fr}.dx-brief-block+ .dx-brief-block{border-left:0;border-top:1px solid #242424}.dx-transcript{height:48vh;min-height:310px;padding:12px}.dx-message,.dx-message.result{max-width:96%}.dx-compose-inner{grid-template-columns:1fr}.dx-compose button{width:100%}.dx-compose-hint{display:none}.dx-submit-card .diagnosis-options{grid-template-columns:1fr}}
.dx-v5.game-shell{overflow:visible!important}.dx-v5 .game-stage{overflow:visible!important}.dx-demeanor{padding:10px 13px 12px;border-top:1px solid #202020;background:#030303}.dx-demeanor small{display:block;color:#6f7a82;font:700 8px ui-monospace,SFMono-Regular,monospace;letter-spacing:.1em;text-transform:uppercase}.dx-demeanor span{display:block;margin-top:4px;color:#b7c0c6;font-size:10px;line-height:1.45}
