*{box-sizing:border-box}
:root{color-scheme:dark;--ink:#eee5d0;--gold:#e8bf7a;--muted:#b4b4a2;--back:#111912;--line:#394039;--sans:"Inter","Helvetica Neue",Arial,sans-serif;--serif:"Baskervville",Baskerville,"Iowan Old Style",Georgia,serif}
html,body{margin:0;min-height:100%;background:#101610;color:var(--ink);font:16px/1.35 var(--sans)}
button,a,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit;font:inherit}button:disabled{cursor:wait;opacity:.55}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid #f6cd88;outline-offset:4px}button, a{touch-action:manipulation}button svg,a svg{width:19px;height:19px;display:block;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}button{border:0;background:transparent}
.defs{display:none}
.app{max-width:1800px;min-height:100svh;margin:auto;display:flex;flex-direction:column;background:radial-gradient(ellipse at 25% 0%,#20271d,transparent 46%),#101710}
header{height:66px;min-height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(18px,4vw,78px);border-bottom:1px solid #34392c;background:#151c15}
.brand{display:flex;gap:11px;align-items:center;font:700 clamp(18px,2vw,24px)/1 var(--serif);text-transform:uppercase;letter-spacing:.075em}.brand svg{width:34px;height:34px;color:var(--gold)}
.header-actions,.header-actions button,.playback,.asset,.camera,.play,.hand{display:flex;align-items:center}.header-actions{gap:13px}.header-actions button{font-size:14px;gap:9px;padding:8px 4px;color:#d6d9c8}.header-actions button:hover,.asset:hover,.chapters button:hover{color:#ffe1a8}.divider{height:17px;border-left:1px solid #424838}.header-actions .icononly{padding:8px}
.live-link{color:var(--gold);font-size:13px;line-height:1.15;text-decoration:underline;text-underline-offset:3px}
main{display:flex;flex:1;flex-direction:column}
.stage{position:relative;height:clamp(375px,calc(100svh - 240px),920px);min-height:0;overflow:hidden;isolation:isolate;background:#172017;border-bottom:1px solid #716142}
.viewport,.viewport img,.viewport video{position:absolute;inset:0;width:100%;height:100%;display:block}.viewport img,.viewport video{object-fit:cover;object-position:50% 12%}.grain{pointer-events:none;position:absolute;inset:0;background:linear-gradient(0deg,rgba(7,14,9,.67),transparent 25%,transparent 86%,rgba(8,10,8,.22)),linear-gradient(90deg,rgba(12,15,9,.14),transparent 24%,transparent 78%,rgba(12,15,9,.13))}
.location,.actor,.camera{position:absolute;z-index:1}.location{top:clamp(17px,2.8vw,36px);left:clamp(18px,4vw,78px);height:29px;display:flex;align-items:center;gap:9px;padding:0 12px;text-transform:uppercase;font-size:11px;font-weight:650;letter-spacing:.16em;border:1px solid #e9d7b550;border-radius:2px;color:#f5e9cb;background:#151b13b5}
.location i{display:block;width:6px;height:6px;background:#d8b779;transform:rotate(45deg)}
.actor{bottom:clamp(18px,2.6vw,38px);left:clamp(18px,4vw,78px);text-shadow:0 2px 18px #080f09}.eyebrow{font:650 11px/1.4 var(--sans);color:#ddbc81;letter-spacing:.19em;text-transform:uppercase}.actor h1{font:normal clamp(37px,4.6vw,71px)/1 var(--serif);margin:5px 0 0;letter-spacing:-.044em;color:#fff3d9}.camera{gap:9px;bottom:clamp(21px,2.7vw,40px);right:clamp(18px,4vw,78px);border:1px solid #cabf9a65;border-radius:4px;padding:9px 13px;color:#eee8d5;background:#192018cf;font-size:14px}.camera:hover{background:#343d2c}.loading{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#172118eb;border:1px solid #635e48;border-radius:3px;padding:9px 15px;font-size:14px}.loading:empty{display:none}
.console{margin:auto 0;display:flex;flex-direction:column;justify-content:center;padding:18px clamp(18px,4vw,78px) 19px;background:linear-gradient(120deg,#1c251a,#151d16 59%,#182118);border-bottom:1px solid #363b2c;min-height:174px}
.controlrow,.bottomrow,.timebar{display:flex;align-items:center;justify-content:space-between}.hand{gap:17px}.hand-picker label{display:block}.select-wrap{position:relative;display:inline-block}.select-wrap:after{content:"";position:absolute;right:3px;top:45%;width:7px;height:7px;border-right:1.5px solid var(--gold);border-bottom:1.5px solid var(--gold);transform:rotate(45deg);pointer-events:none}
.hand select{appearance:none;display:block;margin:0;padding:2px 23px 3px 0;border:0;background:transparent;border-radius:3px;color:var(--ink);font:normal clamp(27px,2.4vw,36px)/1.12 var(--serif);letter-spacing:-.035em;cursor:pointer}.hand select:focus-visible{outline:2px solid var(--gold);outline-offset:3px}.hand select:hover{color:#ffe1a8}.hand option{background:#1c251a;color:var(--ink);font:16px var(--sans)}.hand .eyebrow{color:#bcb493}
.cards{position:relative;width:56px;height:46px;margin-left:4px}.pcard{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;width:30px;height:41px;font:700 18px/.83 var(--serif);border-radius:3px;border:1px solid #bdb39d;background:#eee5ce;box-shadow:0 1px 5px #0a0e0f7a}.pcard small{font-size:14px;line-height:1}.pcard.black{left:1px;top:4px;transform:rotate(-14deg);color:#17211b}.pcard.red{left:23px;top:0;transform:rotate(8deg);color:#9d392d}
.playback{gap:12px}.speed{border:1px solid #535a49;border-radius:4px;height:44px;min-width:47px;font-size:15px;font-variant-numeric:tabular-nums}.speed:hover{border-color:#9c9d7e}.play{justify-content:center;gap:10px;min-width:155px;height:44px;padding:0 18px;background:#e6bd79;color:#1c2015;font-size:15px;font-weight:650;border:1px solid #edce96;border-radius:4px;box-shadow:inset 0 1px #fff2ce52}.play:hover{background:#f3cd89}.play svg{width:17px;height:17px}
.timebar{margin:15px 0 3px;gap:19px}.trackwrap{flex:1;display:flex;position:relative;align-items:center;height:23px}.counter{font:13px/1 ui-monospace,Menlo,monospace;font-variant-numeric:tabular-nums;white-space:nowrap;color:#e8e5d6}.counter>span+span{color:#9caa97}
input[type=range]{--progress:0%;appearance:none;width:100%;height:22px;cursor:pointer;margin:0;background:transparent;z-index:2;position:absolute}input[type=range]::-webkit-slider-runnable-track{height:4px;border-radius:8px;background:linear-gradient(to right,var(--gold) var(--progress),#59604f var(--progress))}input[type=range]::-webkit-slider-thumb{appearance:none;width:12px;height:12px;margin-top:-4px;background:#f6d096;border:2px solid #eee0b4;border-radius:50%}input[type=range]::-moz-range-track{background:#59604f;height:4px;border-radius:8px}input[type=range]::-moz-range-progress{background:var(--gold);height:4px}input[type=range]::-moz-range-thumb{background:#f6d096;width:9px;height:9px;border:1px solid #eee0b4;border-radius:50%}
.chapters{display:flex;flex-wrap:wrap;gap:clamp(12px,2vw,30px)}.chapters button{padding:3px 0;display:flex;align-items:center;gap:7px;color:#a9b09e;font-size:13px}.chapters button:before{content:"";width:5px;height:5px;border:1px solid #78836d;transform:rotate(45deg)}.chapters button.active{color:#f1d6a2}.chapters button.active:before{background:#d4b479;border-color:#d4b479}.asset{gap:7px;color:#b0b8a8;font-size:13px;text-decoration:none}.asset svg{width:15px;height:15px}
@media(max-width:640px){header{height:56px;min-height:56px}.brand{gap:6px;font-size:18px}.brand svg{width:29px;height:29px}.header-actions{gap:6px}.header-actions button span{display:none}.actor{bottom:23px}.actor h1{font-size:36px}.eyebrow{letter-spacing:.14em;font-size:10px}.console{padding:18px 17px 22px;min-height:177px}.stage{height:calc(100svh - 233px);min-height:290px;max-height:820px}.hand{gap:10px}.cards{transform:scale(.8);transform-origin:left center;width:42px;margin-left:1px}.hand select{font-size:clamp(19px,5.5vw,25px);padding-right:18px}.playback{gap:6px}.speed{min-width:36px;height:40px}.play{min-width:110px;height:40px;padding:0 10px;font-size:14px;gap:6px}.play svg{width:14px}.chapters{gap:12px}.chapters button,.asset{font-size:12px}.chapters button{gap:4px}.timebar{gap:10px}.location{top:15px;font-size:10px}.camera{font-size:13px;padding:8px 9px}.camera svg{width:16px}}
@media(max-width:370px){.chapters{gap:8px}.asset{font-size:0}.hand{gap:4px}.pcard{transform-origin:bottom}.app .speed{min-width:31px}.play{min-width:101px}}
@media(max-height:580px) and (min-width:641px){header{height:44px;min-height:44px}.stage{height:calc(100svh - 178px);min-height:200px}.console{min-height:134px;padding-top:9px;padding-bottom:10px}.timebar{margin-top:6px}.actor h1{font-size:36px}.location{top:12px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important}}


.cards .pcard:after{content:"";position:absolute;inset:0;border:2px solid #dec79f;border-radius:3px;background:repeating-linear-gradient(45deg,transparent 0 3px,#d2ad883d 3px 4px),repeating-linear-gradient(-45deg,#833e30 0 3px,#b37a594d 3px 4px),#803d2d;opacity:1;transition:opacity .1s linear .12s}
.cards.revealed .pcard:after{opacity:0}
.cards.revealed .pcard{animation:turn-card .36s ease-in-out both}
.cards.revealed .pcard.red{animation-delay:.09s}
@keyframes turn-card{0%{scale:1 1}48%{scale:.08 1}100%{scale:1 1}}
@media(prefers-reduced-motion:reduce){.cards.revealed .pcard{animation:none}.cards .pcard:after{transition:none}}
[hidden]{display:none!important}

.stage{container-type:size}
@media(max-width:640px) and (orientation:portrait){.stage{height:min(calc(100svh - 233px),100vw)}.console{margin:0}.app{min-height:100svh}}
@container(min-aspect-ratio:215/100){.viewport img,.viewport video{object-fit:contain;background:#172017}}

.idle-picker { display: flex; align-items: center; gap: 9px; }
.idle-picker label { font-size: 14px; color: var(--muted); }
.idle-picker select {
  display: block; appearance: none; cursor: pointer; border: 1px solid #535a49;
  border-radius: 4px; background: #1c251c; color: var(--ink);
  min-height: 36px; padding: 4px 29px 4px 11px; font: 14px var(--sans);
}
.idle-picker .select-wrap::after { right: 11px; top: 40%; width: 6px; height: 6px; }
.idle-picker select:hover { border-color: #98977c; }
.idle-picker select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 640px) {
  .idle-picker { align-items: flex-start; flex-direction: column; gap: 0; }
  .idle-picker label { font-size: 12px; }
  .idle-picker select { font-size: 14px; min-height: 28px; padding: 1px 20px 2px 0; border: 0; background: transparent; }
  .idle-picker .select-wrap::after { right: 4px; }
}
@media (max-width: 450px) {
  header { padding-inline: 10px; }
  .brand { gap: 4px; font-size: 15px; }
  .brand svg { width: 23px; }
  .header-actions { gap: 4px; }
  .header-actions .icononly { padding-inline: 4px; }
}
.viewport video.departing{pointer-events:none;z-index:1;opacity:0;transition:opacity .14s ease-out}
