:root {color-scheme:dark; font:16px/1.5 system-ui,sans-serif; color:#f4f3ee; background:#111; --accent:#ffda35}
* {box-sizing:border-box}
body,h1,p {margin:0}
header,main {width:min(100% - 40px, 1024px); margin-inline:auto}
header {height:72px; display:flex; align-items:center; justify-content:space-between}
.brand {display:flex; align-items:center; gap:10px; font-size:1.25rem; font-weight:750; letter-spacing:-.045em}
.brand img {border-radius:8px}
.settings {position:relative; z-index:5}
button,select,summary {font:inherit; cursor:pointer; color:inherit}
summary {padding:10px 0 10px 12px; font-size:.88rem; color:#ccc}
.settings-menu {position:absolute; right:0; top:100%; display:grid; gap:14px; min-width:190px; padding:16px; background:#242424; border:1px solid #414141; border-radius:12px}
.settings-menu label {display:grid; gap:6px; font-size:.85rem}
select,.settings-menu button {background:#333; border:1px solid #515151; border-radius:6px; padding:8px}
#stage {position:relative; isolation:isolate; background:#000; border-radius:12px; overflow:hidden; display:flex; flex-direction:column}
.screen {position:relative; width:100%; height:clamp(200px,56.25vw,576px); max-height:70vh; background:#000}
video {display:block; width:100%; height:100%; object-fit:contain}
#actions {position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; gap:9px; padding:20px; overflow:auto; background:#0004}
#actions[data-state="slow"] {pointer-events:none; background:transparent}
#actions[data-state="slow"] button {pointer-events:auto}
#actions button:first-child {margin-top:auto}
#actions button:last-child {margin-bottom:auto}
#actions button {flex:none; width:min(100%,350px); min-height:44px; overflow-wrap:anywhere; padding:10px 16px; border-radius:9px; background:#242424e8; border:1px solid #ffffff65; font-weight:600}
#actions .play {width:auto; padding-inline:24px; border:0; border-radius:30px; color:#15130a; background:var(--accent)}
#actions .play::before {content:""; display:inline-block; margin-right:9px; border-block:6px solid transparent; border-left:9px solid currentColor}
#actions .replay-scene {width:auto; background:#191919c9; font-size:1.12rem}
#player-tools {display:flex; align-items:center; gap:4px; padding:2px 10px; background:#1b1b1b}
#player-tools button {min-height:44px; display:flex; align-items:center; gap:7px; padding:6px 10px; color:#ddd; background:transparent; border:0; font-size:.86rem}
#player-tools button:last-child {margin-left:auto}
#player-tools svg {width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round}
#status {position:absolute; top:10px; left:50%; transform:translateX(-50%); width:max-content; max-width:90%; padding:6px 12px; pointer-events:none; border-radius:6px; color:white; background:#161616e8; text-align:center; font-size:.88rem}
#status:empty,[hidden] {display:none!important}
.story-info {padding:20px 0 40px; max-width:70ch}
h1 {font-size:clamp(1.45rem,3vw,2.3rem); line-height:1.15; letter-spacing:-.035em; overflow-wrap:anywhere}
#tags {display:flex; flex-wrap:wrap; gap:6px; margin-top:12px}
#tags span {border-radius:5px; background:#282828; color:#ddd; padding:3px 9px; font-size:.8rem}
#synopsis {margin-top:12px; line-height:1.65; color:#bbb; white-space:pre-line; overflow-wrap:anywhere}
#map {position:absolute; inset:0; width:100%; height:100%; z-index:3; border:0; background:#111}
#stage.landscape {position:fixed; inset:0; width:100vw; height:100vh; height:100dvh; z-index:20; border-radius:0}
.landscape .screen {flex:1; min-height:0; max-height:none}
button:focus-visible,summary:focus-visible,select:focus-visible {outline:3px solid var(--accent); outline-offset:-3px}
@media(max-width:600px) {
  main {width:100%} header {height:58px}
  #stage {border-radius:0} .story-info {padding:18px 20px 32px}
  .screen {height:auto; aspect-ratio:var(--film-ratio,16/9); max-height:65vh; max-height:65svh; min-height:190px}
}
@media(orientation:portrait) {
  #stage.landscape {inset:0 auto auto 100%; width:100vh; width:100dvh; height:100vw; transform-origin:0 0; transform:rotate(90deg)}
}
