/* Opening stations 1-5: live scenes (opening.js). 2D transforms only, no will-change (iPhone memory rule). */

/* ---------- 1 · Groundhog chat ---------- */
.gh { position:absolute; background:var(--panel); border:1px solid var(--line); border-radius:22px; overflow:hidden;
  box-shadow:0 50px 100px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04); }
.gh .bar { height:50px; display:flex; align-items:center; gap:9px; padding:0 20px; border-bottom:1px solid var(--line);
  font-family:var(--mono); font-size:16px; letter-spacing:.14em; text-transform:uppercase; color:var(--mist); }
.gh .bar i { width:11px; height:11px; border-radius:50%; background:var(--line); }
.gh .bar span { margin-left:10px; } .gh .bar em { margin-left:auto; font-style:normal; color:var(--amber); }
.gh .body { position:relative; padding:28px 30px; display:grid; gap:18px; align-content:start; height:calc(100% - 50px); }
.gh .msg { max-width:86%; padding:16px 20px; border-radius:20px; font-family:var(--ui); font-size:24px; line-height:1.4; }
.gh .me { justify-self:end; background:rgba(var(--accent-rgb),.22); border:1px solid rgba(var(--accent-rgb),.45); color:var(--ink); border-bottom-right-radius:6px; }
.gh .ai { justify-self:start; background:rgba(255,255,255,.05); border:1px solid var(--line); color:var(--mist); border-bottom-left-radius:6px; }
.gh .msg:empty { display:none; }
.gh .caret::after { content:""; display:inline-block; width:3px; height:1em; margin-left:3px; vertical-align:-3px; background:var(--accent-soft); animation:opBlink .8s steps(1) infinite; }
.gh .wipe { position:absolute; inset:0; background:var(--panel); display:grid; place-items:center; opacity:0; pointer-events:none;
  font-family:var(--mono); font-size:22px; letter-spacing:.2em; text-transform:uppercase; color:var(--red); }
.gh .wipe.on { opacity:1; }
.gh .wipe.fade { transition:opacity .5s ease; }
.ghCount { position:absolute; font-family:var(--disp); font-weight:700; letter-spacing:-.04em; line-height:.85; color:var(--ink); opacity:.08; font-size:300px; white-space:nowrap; }

/* ---------- 2 · Glue Tax ---------- */
.fail .stat { margin-top:18px; font-family:var(--mono); font-size:17px; letter-spacing:.1em; text-transform:uppercase; color:var(--mist); min-height:1.4em; transition:color .3s; }
.fail.broke { border-color:rgba(248,113,113,.55); box-shadow:0 0 0 1px rgba(248,113,113,.25), 0 40px 80px rgba(0,0,0,.55), 0 0 60px rgba(248,113,113,.12); }
.fail.broke .stat { color:var(--red); }
.fail .ico { position:absolute; right:24px; top:22px; width:46px; height:46px; display:grid; place-items:center; border-radius:50%;
  border:1.5px solid var(--line); color:var(--mist); font-family:var(--mono); font-weight:700; font-size:18px; transition:all .3s; }
.fail.broke .ico { border-color:var(--red); color:var(--red); background:rgba(248,113,113,.1); }
.fail .shake { animation:opShake .45s ease; }
.tally { display:flex; align-items:baseline; gap:22px; }
.tally b { font-family:var(--disp); font-size:150px; letter-spacing:-.04em; line-height:.9; color:var(--red); font-variant-numeric:tabular-nums; }
.tally span { font-family:var(--ui); font-weight:700; font-size:40px; line-height:1.15; color:var(--ink); }
.tally small { display:block; margin-top:8px; font-family:var(--mono); font-weight:400; font-size:17px; letter-spacing:.12em; text-transform:uppercase; color:var(--mist); }

/* ---------- 3 · Session start typed ---------- */
.boot .ln { display:flex; gap:12px; opacity:0; transition:opacity .25s; }
.boot .ln.on { opacity:1; }
.boot .ln b { color:var(--ink); }
.boot .ln .ok { margin-left:auto; color:var(--mint); opacity:0; transition:opacity .25s; }
.boot .ln.done .ok { opacity:1; }
.boot .say { margin-top:26px; color:var(--ink); font-family:var(--ui); font-weight:700; font-size:34px; line-height:1.3; min-height:2.6em; }
.boot .say .gr { color:var(--mint); }

/* ---------- 4 · reveal tile icons ---------- */
.tile svg .an-line { stroke-dasharray:20; animation:opWrite 2.4s ease-in-out infinite; }
.tile svg .an-line:nth-of-type(3) { animation-delay:.3s; } .tile svg .an-line:nth-of-type(4) { animation-delay:.6s; }
.tile svg .an-sq { animation:opFill 3.2s ease-in-out infinite; }
.tile svg .an-sq:nth-of-type(2) { animation-delay:.4s; } .tile svg .an-sq:nth-of-type(3) { animation-delay:.8s; } .tile svg .an-sq:nth-of-type(4) { animation-delay:1.2s; }
.tile svg .an-br { animation:opNudge 2s ease-in-out infinite; transform-box:fill-box; transform-origin:center; }
.tile svg .an-br.r { animation-name:opNudgeR; }
.tile svg .an-bar { transform-box:fill-box; transform-origin:center; animation:opVoice 1.1s ease-in-out infinite; }
.tile svg .an-bar:nth-of-type(2) { animation-delay:.15s; } .tile svg .an-bar:nth-of-type(3) { animation-delay:.3s; }
.tile svg .an-bar:nth-of-type(4) { animation-delay:.45s; } .tile svg .an-bar:nth-of-type(5) { animation-delay:.6s; } .tile svg .an-bar:nth-of-type(6) { animation-delay:.75s; }

/* ---------- 5 · Vault: a note writes itself ---------- */
.note { position:absolute; background:#FBFAFF; color:#17163A; border-radius:20px; padding:26px 30px; box-shadow:0 50px 100px rgba(0,0,0,.6);
  font-family:var(--ui); transition:transform .8s cubic-bezier(.6,0,.3,1), opacity .8s ease; }
.note h6 { margin:0 0 14px; font-family:var(--mono); font-size:15px; letter-spacing:.16em; text-transform:uppercase; color:#6D5BD0; }
.note .nl { font-size:22px; line-height:1.45; min-height:1.45em; }
.note .nl b { font-weight:700; }
.note.filed { transform:translate(260px, -120px) scale(.35) rotate(6deg); opacity:0; }
.drift { animation:opDrift 7s ease-in-out infinite; }
.drift.d2 { animation-delay:-1.5s; } .drift.d3 { animation-delay:-3s; } .drift.d4 { animation-delay:-4.5s; } .drift.d5 { animation-delay:-6s; }
.pill.flash { background:rgba(52,211,153,.18); border-color:var(--mint); color:var(--mint); box-shadow:0 0 30px rgba(52,211,153,.3); }

@keyframes opBlink { 50% { opacity:0; } }
@keyframes opShake { 20% { transform:translateX(-6px); } 40% { transform:translateX(6px); } 60% { transform:translateX(-4px); } 80% { transform:translateX(3px); } }
@keyframes opWrite { 0% { stroke-dashoffset:20; } 50%, 100% { stroke-dashoffset:0; } }
@keyframes opFill { 0%, 100% { fill:transparent; } 40%, 60% { fill:rgba(167,139,250,.45); } }
@keyframes opNudge { 50% { transform:translateX(-3px); } }
@keyframes opNudgeR { 50% { transform:translateX(3px); } }
@keyframes opVoice { 50% { transform:scaleY(.35); } }
@keyframes opDrift { 50% { transform:translate(0, -14px); } }
@media (prefers-reduced-motion: reduce) { .tile svg *, .drift { animation:none !important; } }
