:root{color-scheme:dark;--ink:#e3ebe3;--muted:#9bb2b2;--teal:#a0d8c3;--gold:#f1c381;--panel:#142c33;--line:#365057;--danger:#e79889;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none;font-size:16px}
*{box-sizing:border-box}body{margin:0;background:#091720;color:var(--ink);display:flex;justify-content:center;min-height:100dvh;overscroll-behavior:none}button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:disabled{opacity:.42;cursor:default}button:focus-visible,canvas:focus-visible{outline:2px solid var(--gold);outline-offset:-3px}button:hover:not(:disabled){filter:brightness(1.12)}button:active:not(:disabled){filter:brightness(1.25)}[hidden]{display:none!important}.app{width:100%;max-width:560px;height:100dvh;display:flex;flex-direction:column;position:relative;overflow:hidden;background:#0b1d26;border-inline:1px solid #30484c55}.masthead{height:62px;padding:12px 17px 10px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #66847c33;background:#132a31;flex-shrink:0;padding-top:max(12px,env(safe-area-inset-top))}.brand{display:flex;gap:10px;align-items:center}.brand-mark{font-size:42px;color:var(--gold);line-height:1;transform:rotate(-12deg)}h1{font-size:17px;letter-spacing:.17em;font-weight:650;margin:0}.brand p{font-size:9px;letter-spacing:.15em;color:#9fb8b7;margin:4px 0 0}.icon-button{width:36px;height:36px;display:grid;place-items:center;background:transparent;border:1px solid #708c8344;border-radius:50%;font-size:18px;color:#bfd9ce}.icon-button svg{width:18px;height:18px}.translucent{background:#17343ac0}.viewport{position:relative;flex:1;min-height:230px;isolation:isolate;overflow:hidden}#world{display:block;position:absolute;width:100%;height:100%;touch-action:none;user-select:none}.scene-top{position:absolute;inset:18px 17px auto;display:flex;justify-content:space-between;align-items:center;pointer-events:none}.scene-top button{pointer-events:auto}.room-title span{font-size:10px;letter-spacing:.13em;color:#a2babb;text-transform:uppercase}.room-title h2{font-size:25px;font-weight:550;margin:4px 0 0;letter-spacing:-.03em;color:#e8ece0;text-shadow:0 2px 15px #041820}.room-nav{position:absolute;top:83px;left:17px;display:flex;gap:5px}.room-nav button{background:#102a33b0;border:1px solid #54737955;border-radius:7px;padding:7px 11px;color:#a9bdbb;font-size:12px;min-height:34px}.room-nav button.active{background:#24453f;color:#c9e5d5;border-color:#648c7888}.zoom-controls{position:absolute;right:12px;bottom:53px;display:flex;flex-direction:column;background:#0c2630d9;border:1px solid #66857d55;border-radius:8px;overflow:hidden}.zoom-controls button{width:34px;height:34px;background:none;border:0;display:grid;place-items:center;font-size:21px;color:#b5d1c8}.zoom-controls button+button{border-top:1px solid #66857d33}.zoom-controls svg{width:17px;height:17px}.scene-caption{position:absolute;bottom:11px;left:17px;right:16px;display:flex;gap:9px;align-items:center;min-height:30px;font-size:12px;color:#b4c8c4;pointer-events:none}.caption-symbol{font-size:20px;color:#e7bd82}.scene-cta{position:absolute;bottom:58px;left:50%;transform:translateX(-50%);background:#eac386;color:#243b3e;border:1px solid #f1d6a9;border-radius:8px;padding:11px 15px;white-space:nowrap;font-size:14px;font-weight:650;box-shadow:0 3px 25px #05152080}.sim-state{position:absolute;top:126px;left:17px;font-size:12px;letter-spacing:.04em;color:#efbd94;background:#342d2aba;padding:6px 10px;border-radius:5px}.pause-banner{position:absolute;bottom:56px;left:50%;transform:translateX(-50%);text-align:center;color:var(--gold);background:#132930e8;border:1px solid #bd9c6880;border-radius:9px;padding:10px 18px;pointer-events:none;white-space:nowrap}.pause-banner span{font-size:12px;letter-spacing:.13em;font-weight:650;display:block}.pause-banner small{font-size:11px;color:#d9cfb6;display:block;margin-top:4px}.target-bar{position:absolute;bottom:9px;left:9px;right:9px;background:#3e514b;border:1px solid #89bfa6;border-radius:8px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 7px 6px 12px;font-size:13px}.target-bar button{padding:8px 12px;background:#233e3b;border:0;border-radius:5px;font-size:13px}.toast{position:absolute;bottom:47px;left:12px;right:55px;color:#e0e7d8;background:#1e3e43f5;border:1px solid #759b8b75;padding:11px 13px;border-radius:8px;font-size:13px;line-height:1.45;pointer-events:none;box-shadow:0 4px 20px #06141a66;z-index:5}.context-menu{position:absolute;z-index:8;left:16px;right:55px;bottom:52px;background:#1d373df5;border:1px solid #789f9180;border-radius:10px;padding:12px;box-shadow:0 6px 32px #06161ae0}.context-menu h3{margin:0 0 4px;font-size:16px}.context-menu p{font-size:13px;line-height:1.45;margin:0 0 10px;color:#bbcfca}.context-actions{display:flex;gap:6px;flex-wrap:wrap}.context-actions button{border:1px solid #6c8a7f80;border-radius:6px;background:#34534b;padding:9px 12px;font-size:13px}.context-close{position:absolute;right:6px;top:5px;border:0;background:none;font-size:21px;width:30px;height:30px}.command-deck{padding:11px 13px max(5px,env(safe-area-inset-bottom));background:linear-gradient(130deg,#1e373c,#132a33);border-top:1px solid #6d8e8177;flex-shrink:0;box-shadow:0 -10px 32px #03131e25}.crew-heading{display:flex;align-items:center;justify-content:space-between;margin:0 2px 9px}.crew-heading>span{font-size:10px;letter-spacing:.17em;font-weight:600;color:#b0c6bf}.crew-heading small{font-size:10px;color:#6f948e;margin-left:5px}.crew-heading button{border:0;background:none;color:#b4dcc6;font-size:12px;padding:4px 5px;margin:-4px 0}.crew-heading button::before{content:'○';margin-right:5px}.crew-heading button[aria-pressed=true]::before{content:'◉'}.crew-strip{margin-bottom:10px;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}.crew-card{padding:0;border:1px solid #55707770;background:#122a33;border-radius:7px;overflow:hidden;position:relative;min-width:0}.crew-card canvas{display:block;width:100%;height:auto;aspect-ratio:1}.crew-card .crew-name{display:block;padding:0 2px;font-size:clamp(10px,2.8vw,12px);line-height:20px;color:#cedbd3;background:#142b31}.crew-card.active{border-color:var(--gold);box-shadow:0 0 0 1px #edc27e55}.crew-card .health{display:block;position:relative;height:14px;width:100%;background:#13262e;overflow:hidden}.crew-card .health-fill{position:absolute;inset:0 auto 0 0;background:var(--crew-color);transition:width .12s}.crew-card .health-value{position:relative;display:block;line-height:14px;font-size:10px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;color:#fff;text-shadow:0 1px 2px #071820,0 0 3px #071820,1px 0 1px #071820,-1px 0 1px #071820}.crew-card.down canvas{filter:grayscale(1);opacity:.5}.crew-card .queue-badge{position:absolute;top:23px;right:3px;background:#f0c78b;color:#253832;border-radius:9px;min-width:16px;height:16px;line-height:16px;font-size:10px;font-weight:750}.actions{display:grid;grid-template-columns:1fr 1fr 1.18fr 1fr 1fr;gap:6px}.action{position:relative;min-height:62px;border:1px solid #506e6d77;border-radius:8px;background:#203b42;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;padding:6px 2px;font-size:11px;line-height:1.05;min-width:0}.action-icon{width:23px;height:23px;color:#bfdbcf;display:block}.action-icon svg{width:100%;height:100%}.skill-action{border-color:#b49e7080;background:#394d47;color:#f2d6a8}.skill-action .action-icon{color:#ecc488}.action small{font-size:9px;border-radius:3px;background:#102932;padding:1px 3px;color:#afd1c0}.action #skill-cooldown{position:absolute;right:4px;top:4px;font-size:11px;background:#263d3d;color:#f1c381}.action #skill-cooldown:empty{display:none}.command-footer{display:grid;grid-template-columns:1fr 1.5fr 1fr;align-items:center;gap:8px;margin-top:9px}.secondary-control{display:flex;align-items:center;justify-content:center;gap:6px;border:0;background:none;font-size:11px;min-height:39px;padding:0;color:#a9c3b8;white-space:nowrap}.secondary-control svg{width:15px;height:15px}.secondary-control>span:first-child{display:flex}.pause-button{background:#adccb6;border:1px solid #cbe0c6;border-radius:7px;min-height:40px;color:#233f3b;display:flex;justify-content:center;align-items:center;gap:8px;font-size:14px;font-weight:700}.pause-button svg{width:17px;height:17px;display:block}.pause-button.is-paused{background:#e6bd7b;border-color:#f5d6a3}.touch-hint{text-align:center;font-size:10px;letter-spacing:.02em;margin:8px 0 1px;color:#7f9b99}.no-js{position:absolute;inset:100px 20px;color:white;background:#713b34;padding:30px}dialog{background:#183038;border:1px solid #7c9b8988;color:var(--ink);border-radius:18px 18px 10px 10px;padding:0;width:min(530px,calc(100vw - 20px));max-height:85dvh;margin:auto auto 10px;box-shadow:0 -10px 100px #03121bc9;overflow:auto;overscroll-behavior:contain}dialog::backdrop{background:#04131b99;backdrop-filter:blur(3px)}.panel-header{position:sticky;top:0;z-index:1;background:#183038;padding:20px 20px 13px;display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #607f7544;gap:12px}.panel-header h2{margin:4px 0 0;font-size:24px;font-weight:550;letter-spacing:-.03em}.eyebrow{color:#9cbdae;letter-spacing:.12em;font-size:11px;text-transform:uppercase}.close-button{min-width:36px;height:36px;background:#25434a;border:1px solid #617e6d55;border-radius:50%;font-size:23px;line-height:1;display:grid;place-items:center}.panel-body{padding:18px 20px 24px}.panel-body p{font-size:15px;line-height:1.6;color:#c4d7cd;margin:0 0 15px}.panel-body p:last-child{margin-bottom:0}.dialogue-speaker{display:flex;gap:12px;align-items:center;margin-bottom:15px}.dialogue-speaker canvas{width:54px;height:54px;border-radius:10px;border:1px solid #769b8766}.dialogue-speaker strong{display:block;font-size:17px;margin-bottom:4px}.dialogue-speaker span{font-size:12px;color:#acc3b7}.dialogue-text{font-family:Georgia,serif;font-size:20px!important;line-height:1.6!important;color:#e5e8d6!important}.choices{display:flex;flex-direction:column;gap:9px;margin-top:20px}.choices button{padding:13px 14px;min-height:47px;border:1px solid #6e938577;border-radius:8px;background:#25433f;color:#d9e5cc;text-align:left;font-size:14px;line-height:1.5}.choices button::before{content:'◇';color:var(--gold);margin-right:9px}.choice-foot{font-size:11px!important;color:#8da99f!important;margin-top:16px!important;display:flex;justify-content:space-between}.panel-button{border:1px solid #cedec0;background:#b8d2b4;color:#244238;border-radius:8px;padding:12px 17px;font-weight:650;font-size:14px;min-height:45px}.panel-button.secondary{background:#28464a;border:1px solid #6b8f8280;color:#c8ddcd}.panel-button.danger{background:#513c38;border-color:#9f6d59;color:#ecc4b1}.panel-button:disabled{opacity:.45}.full{width:100%}.button-row{display:flex;gap:9px;margin-top:15px}.button-row>*{flex:1}.info-card{border:1px solid #62857855;border-radius:10px;padding:15px;background:#10283180;margin-bottom:12px}.info-card h3{font-size:16px;margin:0 0 7px;font-weight:600}.info-card p{font-size:14px;margin-bottom:0}.info-card .label{font-size:10px;letter-spacing:.1em;color:#97b9a8;text-transform:uppercase;margin-bottom:7px}.item-row{display:flex;gap:14px;align-items:flex-start;padding:15px 0;border-bottom:1px solid #6a897744}.item-row:last-child{border-bottom:0}.item-icon{width:39px;height:39px;flex-shrink:0;border:1px solid #6d95845a;border-radius:8px;display:grid;place-items:center;color:#b5d7bc}.item-icon svg{width:23px;height:23px}.item-row h3{font-size:15px;margin:0 0 4px}.item-row h3 small{font-size:12px;font-weight:400;color:#afc2ae}.item-row p{font-size:13px;line-height:1.45;margin:0 0 10px}.item-row .panel-button{padding:7px 12px;min-height:34px;font-size:12px}.inventory-target{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 0 13px}.inventory-target select{font:inherit;background:#27443f;border:1px solid #7b9f7e;color:#e6e9d4;padding:8px 12px;border-radius:6px;max-width:60%;font-size:14px}.inventory-target span{font-size:14px}.section-label{font-size:11px;text-transform:uppercase;letter-spacing:.13em;color:#aac3ac;margin:22px 0 5px}.equipment-row{display:flex;align-items:center;gap:10px;justify-content:space-between;padding:13px 0}.equipment-row strong{font-size:14px}.equipment-row p{font-size:12px;margin:3px 0 0;line-height:1.5}.equipment-row button{font-size:12px;padding:8px 12px;min-height:35px}.help-grid{display:grid;grid-template-columns:1fr 1.6fr;gap:14px 12px;font-size:14px;line-height:1.5;margin:15px 0}.help-grid dt{color:#e7d8ab}.help-grid dd{margin:0;color:#bed1c4}.log-entry{font-size:13px;line-height:1.5;color:#b9ccbf;padding:11px 0;border-bottom:1px solid #52716444}.log-entry small{font-size:10px;color:#7f9d97;margin-right:9px}.crew-sheet{display:flex;gap:14px;align-items:center}.crew-sheet canvas{width:88px;height:88px;border-radius:10px}.crew-sheet h3{font-size:20px;margin:0 0 5px}.crew-sheet span{font-size:13px;color:#acbfb4}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:17px 0}.stat-grid>div{background:#0f26308a;border:1px solid #52716655;border-radius:8px;text-align:center;padding:11px 5px}.stat-grid strong{display:block;font-size:22px;font-weight:500;color:#dfdcb8}.stat-grid span{display:block;margin-top:4px;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#9eb7a6}.queue-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #59766744}.queue-row b{font-size:13px;width:54px}.queue-row span{font-size:12px;color:#bfd2bf;line-height:1.5}.result-mark{font-size:44px;text-align:center;color:var(--gold);margin-bottom:10px}.result-title{text-align:center;font-size:24px;margin:0 0 10px}.result-copy{text-align:center}.result-title+.stat-grid{margin-top:20px}
@media(min-width:650px){body{align-items:center;background:radial-gradient(ellipse at 35% 35%,#1b343b,#06121c 75%)}.app{height:min(100dvh,1040px);box-shadow:0 0 90px #030d1677}.masthead{height:69px}.command-deck{padding-inline:18px}.action{min-height:66px;font-size:12px}.crew-card .crew-name{font-size:13px;line-height:22px}.touch-hint{font-size:11px}.crew-strip{gap:9px}.scene-top{inset-inline:22px}.room-nav{left:22px}.secondary-control{font-size:12px}dialog{margin:auto}.scene-caption{font-size:13px}.brand p{font-size:10px}}
@media(max-height:690px){.masthead{height:51px;padding-top:7px;padding-bottom:7px}.brand-mark{font-size:32px}h1{font-size:15px}.brand p{font-size:8px}.command-deck{padding-top:7px}.crew-heading{margin-bottom:6px}.crew-card canvas{max-height:43px}.crew-card .crew-name{line-height:18px;font-size:11px}.action{min-height:53px;gap:3px}.action-icon{width:19px;height:19px}.command-footer{margin-top:6px}.pause-button{min-height:34px}.secondary-control{min-height:34px}.touch-hint{margin-top:5px}.scene-top{top:10px}.room-title h2{font-size:22px}.room-nav{top:67px}.sim-state{top:108px}.viewport{min-height:190px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media(min-resolution:1dppx){.brand p{font-weight:500}}
.panel-feedback{background:#2f5046;color:#e3e8c9!important;border:1px solid #789a7966;border-radius:7px;padding:10px 12px;margin-top:16px!important;font-size:13px!important}
.action,.secondary-control{font-size:12px}.touch-hint{font-size:12px}.room-title span{font-size:11px}.crew-heading>span{font-size:11px}.action small{font-size:10px}.target-bar{font-size:14px}.toast{font-size:14px}.scene-caption{font-size:13px}

.crew-card{touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.crew-card.active{border-color:var(--gold);box-shadow:0 0 0 1px #edc27eaa}.crew-card.active .crew-name{background:#405049;color:#fff0c9}.crew-card:focus-visible{outline:2px solid var(--gold);outline-offset:2px}

/* Compact ship navigation and a colour-independent speaking indicator. */
.scene-top{align-items:flex-start;gap:12px}.room-title{min-width:0;padding-top:10px}.room-title span{display:block;line-height:1.5}.journal-button{position:absolute;left:12px;bottom:12px;width:40px;height:40px;z-index:3}.viewport.has-speech .journal-button{bottom:77px}.scene-caption{left:64px;right:55px}.sim-state{top:73px}.viewport.test-view .sim-state{top:113px}#test-tools{top:64px}.crew-card .speaker-pulse{display:none;position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2}.crew-card.speaking .speaker-pulse{display:block}.speaker-pulse rect{fill:none;stroke:#fff;stroke-width:1.6;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-dasharray:22 78;opacity:.7;animation:speaker-orbit 3.2s linear infinite,speaker-breathe 2.4s ease-in-out infinite}@keyframes speaker-orbit{to{stroke-dashoffset:-100}}@keyframes speaker-breathe{0%,100%{opacity:.45}50%{opacity:.85}}@media(prefers-reduced-motion:reduce){.speaker-pulse rect{animation:none;stroke-dasharray:none;opacity:.6}}

.crew-heading{justify-content:flex-end}.scene-top{z-index:10}.travel-control{position:relative;pointer-events:auto;flex-shrink:0}.travel-toggle{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:40px;min-width:100px;padding:8px 12px;background:#17343ae8;border:1px solid #6b918577;border-radius:8px;color:#dae7da;font-size:14px}.travel-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.4}.travel-toggle[aria-expanded=true]{background:#29473f;border-color:#a1bfa180}.travel-toggle[aria-expanded=true] svg{transform:rotate(180deg)}.travel-menu{position:absolute;right:0;top:calc(100% + 7px);width:190px;max-width:calc(100vw - 32px);padding:5px;background:#19363b;border:1px solid #73958399;border-radius:10px;box-shadow:0 10px 28px #03141ac0;overflow:hidden}.travel-menu button{display:block;width:100%;min-height:46px;padding:11px 14px;border:0;border-radius:6px;background:transparent;color:#dce5d5;text-align:left;font-size:14px}.travel-menu button+button{margin-top:2px}.travel-menu button[aria-current=location]{opacity:1;color:#dfc48c;background:#30483e;box-shadow:inset 2px 0 #d6bd88}.travel-menu button:hover:not(:disabled),.travel-menu button:focus-visible{background:#34544b;color:#f0e1bf;outline-offset:-2px}.travel-backdrop{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:0;background:transparent;z-index:9;cursor:default}
