:root{color-scheme:dark;--bg:#000;--fg:#fff;--muted:#9aa0a6;--accent:#8ab4ff;--panel:#1b1d22}
*{box-sizing:border-box}
html,body{height:100%;margin:0;background:var(--bg);color:var(--fg);font:20px/1.5 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}
[hidden]{display:none!important}
#idle{min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;padding:2rem;text-align:center}
.brand{font-size:3rem;font-weight:700;letter-spacing:.04em}
.muted{color:var(--muted)}.small{font-size:.8rem;max-width:34rem}
.code{font:700 clamp(2.5rem,9vw,5.5rem)/1.1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.12em}
h2{font-size:1rem;color:var(--muted);margin:1rem 0 .4rem;font-weight:600}
ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem;align-items:center}
li{display:flex;gap:.75rem;align-items:center}
button{font:600 1rem system-ui;padding:.8rem 1.6rem;border:0;border-radius:2rem;background:var(--accent);color:#0b1a33;cursor:pointer}
button.secondary,li button{background:var(--panel);color:var(--fg)}
button:focus-visible{outline:3px solid #fff;outline-offset:2px}
kbd{background:var(--panel);border-radius:.3rem;padding:.05rem .4rem}
.actions{display:flex;gap:.75rem;flex-wrap:wrap;justify-content:center}

#stage{position:fixed;inset:0;background:#000;overflow:auto}
#stage img,#stage video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000}
#stage iframe{position:absolute;inset:0;width:100%;height:100%;border:0;background:#000}
#stage .card{max-width:64rem;margin:0 auto;padding:3.5rem 4rem 4rem}
#stage .card .title{color:var(--muted);font-size:1.1rem;margin-bottom:1rem}
#stage .card h1{font-size:2.6rem;line-height:1.2;margin:.6rem 0}
#stage .card h2{font-size:2rem;margin:.6rem 0;color:var(--fg)}
#stage .card h3{font-size:1.6rem;margin:.6rem 0}
#stage .card p,#stage .card li{font-size:1.5rem;line-height:1.5;margin:.6rem 0}
#stage .card ul,#stage .card ol{align-items:flex-start;display:block;padding-left:2rem;list-style:revert}
#stage .msg{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:1.6rem;color:var(--muted)}
#badge{position:fixed;top:1rem;right:1rem;z-index:5;background:rgba(27,29,34,.85);border-radius:1.2rem;padding:.5rem 1rem;font-size:.95rem}
#badge::before{content:"✦ ";color:var(--accent)}
#stage .slide{max-width:none;min-height:100%;display:flex;flex-direction:column;justify-content:center;padding:6vh 8vw}
#stage .slide h1{font-size:3.4rem}#stage .slide h2{font-size:2.6rem}#stage .slide h3{font-size:2.1rem}
#stage .slide p,#stage .slide li{font-size:2rem}
#stage .counter{position:fixed;right:1.5rem;bottom:1rem;color:var(--muted);font-size:.95rem;z-index:4}
#toast{position:fixed;left:50%;bottom:2.5rem;transform:translateX(-50%);z-index:6;max-width:min(48rem,90vw);background:rgba(27,29,34,.92);border-radius:1.4rem;padding:.9rem 1.5rem;font-size:1.3rem;box-shadow:0 .5rem 2rem rgba(0,0,0,.5)}
#toast .who{font-size:.85rem;color:var(--muted)}#toast .who::before{content:"✦ ";color:var(--accent)}
.lead{font-size:1.25rem;max-width:40rem}
#demo{max-width:44rem;text-align:left}
#linking.offline .code{opacity:.3}
#demo .steps{padding-left:1.4rem;margin:.5rem 0;display:block}#demo .steps li{display:list-item;margin:.35rem 0}
#demo code{background:var(--panel);border-radius:.4rem;padding:.1rem .45rem;user-select:all}
body.demo .code{font-size:clamp(2.5rem,10vw,8rem);white-space:nowrap}
li .who{min-width:12rem;text-align:left}
#stage .card li{display:list-item}

/* video controls: bottom bar inside the 5% safe area, large targets for a TV remote or a mouse */
#controls{position:fixed;left:5vw;right:5vw;bottom:4vh;z-index:7;display:flex;flex-wrap:wrap;align-items:center;gap:.8rem 1rem;padding:.8rem 1.2rem;border-radius:1.2rem;background:rgba(15,17,21,.86);box-shadow:0 .5rem 2rem rgba(0,0,0,.5)}
#controls button{min-width:3.4rem;min-height:3rem;padding:.4rem .9rem;font-size:1.15rem;border-radius:.8rem;background:var(--panel);color:var(--fg)}
#controls button:focus-visible{outline:3px solid #fff}
#c-toggle{min-width:4.2rem!important;font-size:1.35rem!important;background:var(--accent)!important;color:#0b1a33!important}
#c-track{order:-1;flex:1 0 100%;height:.6rem;border-radius:.3rem;background:rgba(255,255,255,.22);cursor:pointer;position:relative}
#c-track::before{content:"";position:absolute;inset:-1rem 0}
#c-fill{height:100%;width:0;border-radius:.3rem;background:var(--accent)}
#c-time{font-variant-numeric:tabular-nums;color:var(--muted);margin-left:auto;font-size:1.1rem}
#c-hotzone{position:fixed;left:0;right:0;bottom:0;height:22vh;z-index:6}
