.mission-dialog { width:min(940px,calc(100% - 26px)); }
.mission-brief { font-size:1rem; }
.mission-scene { position:relative; overflow:hidden; border:1px solid #58736a; border-radius:6px; background:#10232b; }
.mission-scene canvas { display:block; width:100%; height:auto; image-rendering:pixelated; }
.mission-scene canvas:focus-visible { outline:2px solid var(--yellow); outline-offset:-3px; }
.mission-scene canvas:focus:not(:focus-visible) { outline:none; }
.shelter-layout { display:grid; align-items:start; gap:12px; }
.shelter-room { min-width:0; }
@media (min-width:761px) {
  .shelter-layout:not(.is-wiring) {
    width:min(100%,max(590px,calc((100dvh - 325px)*960/483)));
    margin-inline:auto;
  }
}
.shelter-layout.is-wiring { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.shelter-scene { border-color:#748c80; border-radius:6px 6px 0 0; }
.shelter-light { position:absolute; inset:10px auto auto 10px; padding:4px 9px; border:1px solid #748c80; border-radius:4px; background:#112b33ef; color:#e8e4cd; font-size:.875rem; pointer-events:none; }
.shelter-light.is-lit { color:#ffe6a8; border-color:#c89e58; background:#342c21f2; }
.shelter-objects { position:absolute; inset:0; pointer-events:none; }
.shelter-hotspot { pointer-events:auto; position:absolute; top:var(--y); left:var(--x); transform:translate(-50%,-100%); min-height:38px; padding:4px 9px; border:1px solid #94b1a2; border-radius:4px; background:#122b34f5; color:#fff4d5; font-size:.875rem; white-space:nowrap; }
.shelter-hotspot::after { content:""; position:absolute; top:100%; left:50%; width:5px; height:5px; transform:translateX(-50%); background:#e3bb75; border:1px solid #142c35; }
.shelter-hotspot:hover,.shelter-hotspot:focus-visible { background:#2e4a46; border-color:#f9da98; }
.shelter-workbench { transform:translate(-50%,0); background:#f4cd87; border-color:#f9dc9e; color:#213039; font-weight:800; box-shadow:0 3px #866c47; }
.shelter-workbench:hover,.shelter-workbench:focus-visible { background:#ffe1a1; color:#213039; }
.shelter-workbench::after { display:none; }
.shelter-dialogue { padding:10px 12px; border:1px solid #748c80; border-top:0; border-radius:0 0 6px 6px; background:#182f34; }
.shelter-speaker { color:#edd19c; font-size:.875rem; font-weight:700; }
.shelter-line { margin:2px 0 0; line-height:1.45; }
.shelter-panel { min-width:0; padding:12px; border:1px solid #58736a; border-radius:6px; background:#183138; }
.shelter-panel-head { display:flex; align-items:center; justify-content:space-between; gap:6px; }
#dialog-body .shelter-panel-head h3 { margin:0; font-size:1.05rem; }
.shelter-back { min-height:36px; padding:4px 8px; font-size:.875rem; }
.shelter-panel .board-scroll { margin-top:8px; }
.shelter-components { position:relative; height:27px; color:#d9e4cf; font-size:.875rem; font-weight:600; }
.shelter-components span { position:absolute; bottom:0; transform:translateX(-50%); }
.shelter-components span:nth-child(1) { left:13%; }
.shelter-components span:nth-child(2) { left:45%; }
.shelter-components span:nth-child(3) { left:85%; }
.shelter-panel .board { min-width:0; }
.shelter-panel .node { display:grid; place-items:center; width:clamp(24px, 5vw, 31px); height:clamp(24px, 5vw, 31px); font-weight:800; color:#edf1d9; }
.shelter-panel .node:hover,.shelter-panel .node[aria-pressed=true] { color:#142a31; }
.shelter-panel .node:disabled { opacity:.72; }
.shelter-panel .mission-tools { margin-bottom:0; }
.shelter-continue { margin-top:10px; }
@media (max-width:760px) {
  .shelter-layout.is-wiring { grid-template-columns:minmax(0,1fr); }
  .shelter-layout.is-wiring .shelter-scene { border-radius:6px; }
  .shelter-layout.is-wiring .shelter-dialogue { display:none; }
}
@media (max-width:490px) {
  .shelter-hotspot { min-height:32px; padding:2px 5px; font-size:.875rem; }
  .shelter-light { inset:5px auto auto 5px; padding:2px 5px; font-size:.8125rem; }
  .shelter-panel { padding:8px; }
}
@media (max-width:370px) {
  .shelter-hotspot[data-level=battery] { transform:translate(-66%,-100%); }
  .shelter-hotspot[data-level=battery]::after { left:66%; }
  .shelter-hotspot[data-level=lamp] { transform:translate(-12%,-100%); }
  .shelter-hotspot[data-level=lamp]::after { left:12%; }
}
.radio-scene canvas { cursor:grab; touch-action:none; }
.radio-scene canvas:active { cursor:grabbing; }
.radio-reticle { position:absolute; top:50%; left:50%; width:12px; height:12px; transform:translate(-50%,-50%); pointer-events:none; }
.radio-reticle::before,.radio-reticle::after { content:""; position:absolute; background:#f3df9e; }
.radio-reticle::before { top:5px; width:12px; height:2px; }
.radio-reticle::after { left:5px; height:12px; width:2px; }
.view-label { position:absolute; bottom:8px; left:50%; transform:translateX(-50%); max-width:95%; width:max-content; border:1px solid #74948b; border-radius:4px; padding:4px 8px; color:#ffde97; background:#0f262eea; font-size:.875rem; text-align:center; pointer-events:none; }
.mission-caption { color:#bed1c3; font-size:.875rem; margin:8px 0 0; }
.mission-tools { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin:9px 0; }
.mission-tools :is(.secondary,.primary) { font-size:.875rem; min-height:36px; }
.mission-tools .primary { padding:6px 12px; }
.motion-pad { display:flex; gap:4px; touch-action:none; }
.motion-pad button { min-width:32px; }
.mission-feedback { color:#e1e6d4; font-size:.9375rem; }
.meter-log { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); list-style:none; gap:7px; padding:0; margin:6px 0 0; }
.meter-log:empty { display:none; }
#dialog-body .meter-log li { margin:0; padding:8px; border:1px solid #3c5859; border-radius:4px; color:#c8daca; background:#11272e; font-size:.875rem; }
.road-diagram { overflow:hidden; margin-top:10px; border:1px solid #476260; background:#12252b; border-radius:5px; }
.road-diagram canvas { display:block; width:min(100%,660px); height:auto; margin:0 auto; }
.rescue-banner { display:grid; place-items:center; min-height:76px; margin-bottom:12px; border-radius:5px; background:repeating-linear-gradient(176deg,#4e7d8455 0 2px,transparent 2px 23px),#163f4e; color:#efca7d; font-size:2.6rem; }
.mission-success { color:#f2dda4; font-size:1.1rem; }
.rescue-report { padding-left:25px; color:#d5e5d3; }
.rescue-report p { margin:2px 0 10px; font-size:.9375rem; }
@media(max-width:600px) {
  .meter-log { grid-template-columns:1fr; }
  .view-label { bottom:3px; font-size:.75rem; }
}
.radio-scene canvas { aspect-ratio:1280/670; image-rendering:auto; }
.radio-scene .radio-reticle { top:47.5%; }
.radio-channel { position:absolute; top:11px; left:11px; padding:5px 8px; border:1px solid #8e9a80; border-radius:4px; background:#0f272eec; color:#edd0a6; font-size:.8125rem; pointer-events:none; }
.radio-channel::before { content:""; display:inline-block; margin-right:6px; width:7px; height:7px; border-radius:50%; background:#e29c72; }
.radio-channel.online { color:#c7eab0; }
.radio-channel.online::before { background:#a9dc8e; box-shadow:0 0 6px #a9dc8e; }
.radio-meter { position:absolute; right:3.3%; bottom:0; width:clamp(102px,22%,180px); padding:8px 8px 6px; border:2px solid #dfba74; border-bottom:0; border-radius:9px 9px 0 0; box-shadow:0 4px 15px #06191fb0; background:#b98d50; transform:rotate(-4deg); transform-origin:bottom right; pointer-events:none; }
.meter-face { display:grid; min-height:44px; padding:4px 6px; border:3px solid #3d4b42; border-radius:4px; background:#c8d3a5; color:#213629; box-shadow:inset 0 1px 4px #4a59487a; }
.meter-face span { font:700 clamp(8px,1.7vw,11px) ui-monospace,monospace; text-transform:uppercase; }
.meter-face strong { font:700 clamp(12px,2.35vw,19px) ui-monospace,monospace; white-space:nowrap; }
.meter-case { display:flex; align-items:center; justify-content:center; gap:8px; margin-top:5px; }
.meter-case i { width:9px; height:9px; border:2px solid #db9162; border-radius:50%; background:#603a34; box-shadow:0 0 0 1px #40342b; }
.meter-case i:nth-child(2) { background:#253f40; border-color:#70837d; }
.radio-meter .meter-face { box-shadow:inset 0 2px 3px #4a594880,0 1px #d9b37c; }
.meter-case span { margin-left:auto; color:#293a36; font:700 10px ui-monospace,monospace; }
@media(max-width:500px) {
  .radio-channel { top:6px; left:6px; font-size:.75rem; }
  .radio-scene:has(.radio-meter:not([hidden])) .view-label { left:5px; transform:none; max-width:58%; }
  .radio-meter { right:2%; padding:4px; }
  .meter-face { min-height:35px; }
}
.road-hud { position:absolute; display:flex; flex-wrap:wrap; align-items:center; gap:5px; inset:8px 8px auto; pointer-events:none; }
.road-hud :is(strong,span) { border:1px solid #829b92; padding:4px 7px; border-radius:4px; color:#e6e6d0; background:#142e38e8; font-size:.8125rem; line-height:1.2; }
.road-hud strong { background:#e7c182; color:#26383a; border-color:#e7c182; margin-right:auto; }
.road-hud .lamp-on { background:#273d35f2; border-color:#dbb975; color:#ffdf9c; }
.road-work { border:1px solid #46676a; border-radius:6px; background:#19343c; padding:8px 9px; }
.road-work > p { margin:0 0 6px; color:#e0e8d8; font-size:.9375rem; }
.road-work .mission-tools { margin:0; }
.road-schematic { margin-top:9px; color:#d1ded2; }
.road-schematic summary { width:max-content; max-width:100%; font-size:.875rem; }
@media(max-width:480px) {
  .road-hud { inset:5px 5px auto; gap:3px; }
  .road-hud :is(strong,span) { padding:3px 4px; font-size:.72rem; }
}
