/* Shared controls stay outside the painted scene and remain available in silence. */
[hidden]{display:none!important}html,body{overflow:auto;min-height:100%;height:auto;background:#0a151b}#game-shell{min-height:100dvh;height:auto;display:flex;flex-direction:column;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
#game{order:2;width:100%;height:auto;aspect-ratio:16/9;max-height:65dvh;object-fit:contain;flex:none}.hud{position:static;order:0;padding:14px 18px;align-items:center;width:100%;gap:12px;background:#10242a;pointer-events:auto}.hud #objective{font-size:16px;letter-spacing:0;max-width:650px}.hud.faded{opacity:1!important;pointer-events:auto!important}.hud.faded>div:first-child{opacity:.35}.meters{flex-wrap:wrap;font-size:12px}.meters button{min-width:48px;min-height:48px}.meters input[type=range]{min-height:44px;width:100px}.utility{order:1;display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;padding:8px 14px;background:#10242a}
button{cursor:pointer;font:inherit;min-width:48px;min-height:48px;border:1px solid #a18d55;background:#142e35;color:#f0e6d2;padding:8px 14px}button:focus-visible,a:focus-visible{outline:3px solid #d4af37;outline-offset:3px}.touch{position:static;display:flex;order:5;padding:12px;gap:10px;pointer-events:auto;background:#10242a;touch-action:none;user-select:none}.touch button{min-width:58px;min-height:52px;font-size:14px}.touch button.pressed{background:#347065;box-shadow:inset 0 -4px #d4af37}.touch div{flex-wrap:wrap}.panel{top:150px;bottom:100px;overflow:auto;padding:20px}.panel small{display:block!important;font-size:15px;line-height:1.5}.panel button{letter-spacing:0}.panel h1,.panel h2{font-size:clamp(24px,4vw,46px)}#caption{position:static;transform:none;order:3;max-width:none;min-height:72px;width:100%;margin:0;font-size:18px;opacity:1;background:#07171c;text-align:center}#caption:not(.show){visibility:hidden}#audio-notice{order:4;padding:14px;background:#35281b;border:1px solid #d4af37;max-height:40dvh;overflow:auto}#audio-notice p{margin:8px 0;line-height:1.5}.choicebar{position:static!important;transform:none!important;order:4;display:flex;justify-content:center;gap:12px;padding:12px}.asset-block{inset:150px 12px 100px;background:#10242a;z-index:10;align-items:flex-start;text-align:left}.asset-block ul{overflow-wrap:anywhere;max-width:100%;padding-left:22px}.asset-block a{color:#9fe0cc}dialog{color:#f0e6d2;background:#10242a;border:1px solid #d4af37;max-width:min(520px,92vw);padding:24px}dialog::backdrop{background:#000b}#rotate-hint{display:none!important}
@media(max-width:600px){.hud{padding:10px;align-items:flex-start;flex-wrap:wrap}.hud #objective{font-size:14px}.hud strong{font-size:15px}.utility{justify-content:flex-start;padding:8px;gap:6px}.utility button{font-size:13px;padding:6px 9px}.meters span{display:none}.meters i{width:70px}.panel{top:195px;bottom:130px;min-height:280px;justify-content:flex-start}.panel p{font-size:14px;line-height:1.4}.panel button{margin:8px}.touch{padding:8px;gap:6px}.touch button{font-size:12px;padding:8px;min-width:50px}.touch div{gap:5px}#caption{font-size:16px;min-height:130px}.asset-block{inset:195px 8px 110px}.asset-block h1{font-size:25px}.choicebar{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
/* wait-cue: a control that is not usable yet reads as dimmed, and the objective says "Listen…" */
.touch button.locked,.choicebar button.locked{opacity:.34;filter:saturate(.3);cursor:default}
@keyframes listenPulse{0%,100%{opacity:.55}50%{opacity:1}}
#objective.listening{color:#65c8c0;animation:listenPulse 1.9s ease-in-out infinite}

/* ================= HYBRID LAYOUT =================
   WIDE + LANDSCAPE  -> full-bleed cinematic: the painted scene fills the view, chrome overlaid.
   NARROW or PORTRAIT -> the stacked, mobile-safe layout above stays in force (nothing covers the art).
   Touch pad shows only on touch devices in this mode; mouse/keyboard users get the clean scene. */
@media (min-width:900px) and (orientation:landscape){
  html,body{overflow:hidden;background:#000}
  #game-shell{position:relative;display:block;height:100dvh;padding:0;background:#000}
  #game{position:absolute;inset:0;width:100%;height:100%;max-height:none;aspect-ratio:auto;object-fit:contain;background:#000;z-index:1}

  .hud{position:absolute;top:0;left:0;right:0;order:0;padding:16px 22px 40px;background:linear-gradient(#000c,#0000);pointer-events:none;z-index:6}
  .hud>div:first-child{text-shadow:0 2px 10px #000}
  .hud #objective{max-width:60vw}
  .hud .meters{pointer-events:auto}

  .utility{position:absolute;top:60px;right:14px;left:auto;width:auto;order:0;padding:0;gap:8px;background:transparent;justify-content:flex-end;z-index:21}
  .utility button{background:#0b1c22d9}

  #caption{position:absolute;left:50%;bottom:88px;transform:translateX(-50%);order:0;width:min(900px,84vw);min-height:0;margin:0;padding:14px 26px;background:#06141af2;border-left:3px solid #d4af37;box-shadow:0 8px 32px #000b;text-align:center;z-index:8}
  #caption:not(.show){visibility:hidden}

  .choicebar{position:absolute!important;left:50%;bottom:184px;transform:translateX(-50%)!important;order:0;padding:0;background:transparent;z-index:9}

  #audio-notice{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);order:0;width:min(560px,88vw);max-height:70dvh;z-index:22}

  .panel{position:absolute;inset:0;order:0;z-index:20}

  .touch{display:flex;position:absolute;left:0;right:0;bottom:0;order:0;justify-content:center;gap:12px;padding:10px 12px 14px;background:linear-gradient(#0000,#000a);z-index:10;pointer-events:none}
  .touch div{pointer-events:auto}
}
/* mouse/keyboard (fine pointer): no on-screen touch pad, so the scene reads clean and captions sit lower */
@media (min-width:900px) and (orientation:landscape) and (pointer:fine){
  .touch{display:none}
  #caption{bottom:8%}
  .choicebar{bottom:calc(8% + 92px)}
}
