:root {
  --blk: #0e0b09;
  --ink: #1a1512;
  --ink2: #241d18;
  --cream: #f3e6d0;
  --latte: #d9b48a;
  --caramel: #b9814d;
  --espresso: #5a3a22;
  --neon: #ffcf8a;
  --green: #8fd3a8;
  --pix: "Press Start 2P", monospace;
  --body: "Outfit", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--blk); color: var(--cream); font-family: var(--body); overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
#app { position: fixed; inset: 0; overflow: hidden; overflow: clip; }

/* ---------- scenes ---------- */
.scene { position: absolute; inset: 0; overflow: hidden; overflow: clip; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s .6s; }
.scene.active { opacity: 1; visibility: visible; transition: opacity .6s ease; }

/* ---------- BLK logo ---------- */
.blk-logo { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; border: 3px solid currentColor; color: var(--cream); line-height: 1; }
.blk-logo .ar { font-family: "Cairo", sans-serif; font-weight: 900; }
.blk-logo .en { font-family: "Oswald", Impact, sans-serif; font-weight: 700; letter-spacing: .02em; }
.blk-logo.big { width: 118px; height: 132px; border-width: 4px; }
.blk-logo.big .ar { font-size: 40px; margin-top: -6px; }
.blk-logo.big .en { font-size: 48px; margin-top: 4px; }
.blk-logo.small { width: 48px; height: 54px; border-width: 2px; flex: none; }
.blk-logo.small .ar { font-size: 15px; } .blk-logo.small .en { font-size: 19px; margin-top: 2px; }
.blk-logo.tiny { width: 34px; height: 38px; border-width: 2px; flex: none; }
.blk-logo.tiny .ar { font-size: 11px; } .blk-logo.tiny .en { font-size: 13px; margin-top: 1px; }
.neon { color: var(--neon); text-shadow: 0 0 10px rgba(255, 190, 110, .9), 0 0 30px rgba(255, 160, 80, .5); box-shadow: 0 0 18px rgba(255, 180, 100, .55), inset 0 0 18px rgba(255, 180, 100, .35); animation: flicker 5s infinite; }
@keyframes flicker { 0%, 92%, 100% { opacity: 1 } 93% { opacity: .55 } 94% { opacity: 1 } 96% { opacity: .7 } 97% { opacity: 1 } }

.logo-img { display: block; flex: none; }
.logo-img.big { height: 140px; }
.logo-img.small { height: 54px; }
.logo-img.tiny { height: 38px; }
.neon-img { filter: drop-shadow(0 0 8px rgba(255, 190, 110, .9)) drop-shadow(0 0 26px rgba(255, 160, 80, .5)); animation: flicker 5s infinite; }

/* ---------- arcade button ---------- */
.btn-arcade {
  font-family: var(--pix); font-size: 14px; letter-spacing: .04em; color: var(--blk);
  background: var(--neon); padding: 16px 24px; position: relative;
  box-shadow: 0 -4px 0 0 var(--neon), 0 4px 0 0 var(--neon), -4px 0 0 0 var(--neon), 4px 0 0 0 var(--neon), 0 8px 0 0 var(--espresso), 0 0 30px rgba(255, 190, 110, .45);
  transition: transform .12s ease, filter .12s ease;
}
.btn-arcade:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn-arcade:active { transform: translateY(4px); box-shadow: 0 -4px 0 0 var(--neon), 0 4px 0 0 var(--neon), -4px 0 0 0 var(--neon), 4px 0 0 0 var(--neon), 0 2px 0 0 var(--espresso); }
.btn-arcade.small { font-size: 10px; padding: 12px 16px; }
.btn-arcade.ghost { background: transparent; color: var(--neon); box-shadow: inset 0 0 0 3px var(--neon); }
.pulse { animation: pulse 1.1s steps(2, jump-none) infinite; }
@keyframes pulse { 50% { filter: brightness(.75); } }

/* ---------- 1. boot ---------- */
.boot-bg {
  position: absolute; inset: -10%;
  background:
    radial-gradient(60% 50% at 50% 40%, rgba(185, 129, 77, .28), transparent 70%),
    linear-gradient(transparent 0 96%, rgba(255, 207, 138, .07) 96%) 0 0 / 100% 44px,
    linear-gradient(90deg, transparent 0 96%, rgba(255, 207, 138, .07) 96%) 0 0 / 44px 100%,
    var(--blk);
  transform: perspective(600px) rotateX(18deg); animation: gridmove 6s linear infinite;
}
@keyframes gridmove { to { background-position: 0 0, 0 44px, 44px 0, 0 0; } }
.boot-inner { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 24px 16px; }
.kicker { font-family: var(--pix); font-size: 10px; color: var(--latte); letter-spacing: .12em; line-height: 1.8; }
.title { font-family: var(--pix); font-size: clamp(34px, 7vw, 72px); line-height: 1.15; color: var(--cream); text-shadow: 4px 4px 0 var(--espresso), 8px 8px 0 rgba(0, 0, 0, .6); }
.title span { color: var(--neon); }
.boot-cup { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; border: 3px solid var(--latte); box-shadow: 0 0 0 6px var(--ink), 0 0 40px rgba(255, 190, 110, .35); animation: float 3.4s ease-in-out infinite; }
.boot-cup img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.35) translateY(4%); }
@keyframes float { 50% { transform: translateY(-10px) rotate(3deg); } }
.credits { font-family: var(--pix); font-size: 8px; color: rgba(243, 230, 208, .5); letter-spacing: .1em; line-height: 1.8; }

/* ---------- 2. map ---------- */
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #15110e; }
.map-hud { position: absolute; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 16px; pointer-events: none; }
.map-hud.top { top: 0; } .map-hud.bottom { bottom: 0; justify-content: center; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
.gps-chip { font-family: var(--pix); font-size: 9px; letter-spacing: .08em; background: rgba(14, 11, 9, .85); border: 2px solid var(--latte); padding: 10px 12px; display: flex; gap: 10px; align-items: center; line-height: 1.6; }
.gps-chip .dot { width: 9px; height: 9px; background: var(--green); border-radius: 50%; box-shadow: 0 0 10px var(--green); animation: pulse 1s infinite; flex: none; }
.compass { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--latte); background: rgba(14, 11, 9, .85); display: grid; place-items: center; font-family: var(--pix); font-size: 10px; color: var(--neon); animation: sway 6s ease-in-out infinite; flex: none; }
@keyframes sway { 50% { transform: rotate(14deg); } }
.branch-card { pointer-events: auto; display: flex; gap: 14px; align-items: center; background: rgba(14, 11, 9, .9); border: 2px solid var(--latte); padding: 12px 18px 12px 12px; min-width: min(380px, 100%); box-shadow: 6px 6px 0 rgba(0, 0, 0, .5); transition: transform .25s ease; }
.branch-card.pop { animation: cardpop .35s ease; }
@keyframes cardpop { 40% { transform: scale(1.05); } }
.bc-name { font-family: var(--pix); font-size: 11px; color: var(--neon); line-height: 1.6; }
.bc-info { font-size: 14px; color: var(--latte); margin-top: 4px; }

.pin { cursor: pointer; }
.pin .pin-body { transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); transform-box: fill-box; transform-origin: 50% 100%; }
.pin:hover .pin-body, .pin.sel .pin-body { transform: scale(1.18) translateY(-6px); }
.pin .ring { transform-box: fill-box; transform-origin: center; animation: ring 2s ease-out infinite; }
@keyframes ring { from { transform: scale(.4); opacity: .9; } to { transform: scale(2.4); opacity: 0; } }
.you-ring { transform-box: fill-box; transform-origin: center; animation: ring 1.6s ease-out infinite; }
.route { stroke-dasharray: 18 12; animation: march .6s linear infinite; }
@keyframes march { to { stroke-dashoffset: -30; } }

/* ---------- 3. branch ---------- */
.branch-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(7px) brightness(.5) saturate(1.1); animation: kenburns 24s ease-in-out infinite alternate; }
@keyframes kenburns { to { transform: scale(1.12) translate(-1%, -1%); } }
.branch-shade { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: linear-gradient(180deg, rgba(14, 11, 9, .5), transparent 18%), linear-gradient(90deg, transparent 50%, rgba(14, 11, 9, .35)); }
.bokeh { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bokeh i { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255, 207, 138, .55), rgba(255, 207, 138, 0) 70%); animation: drift linear infinite; }
@keyframes drift { from { transform: translateY(20px); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } to { transform: translateY(-120px); opacity: 0; } }

.stage { position: absolute; inset: 0; }
.branch-bg, .bokeh { display: none; }
#zee3d { width: 100%; height: 100%; display: block; }
.laptop-hint {
  position: absolute; left: 30%; top: 70%; transform: translateX(-50%); z-index: 2;
  font-family: var(--pix); font-size: 9px; line-height: 1.6; color: var(--blk); background: var(--cream); padding: 10px 12px;
  box-shadow: 4px 4px 0 var(--espresso); opacity: 0; pointer-events: none; transition: opacity .4s; white-space: nowrap;
}
.laptop-hint::after { content: ""; position: absolute; top: -6px; left: calc(50% - 6px); border: 6px solid transparent; border-bottom-color: var(--cream); border-top: 0; }
.laptop-hint.show { opacity: 1; pointer-events: auto; animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateX(-50%) translateY(-6px); } }

.hud { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 16px; padding: 14px 16px; z-index: 3; }
.hud-player { display: flex; gap: 10px; align-items: center; background: rgba(14, 11, 9, .82); border: 2px solid var(--latte); padding: 8px 14px 8px 8px; }
.pname { font-family: var(--pix); font-size: 11px; color: var(--neon); }
.pname small { font-size: 7px; color: var(--latte); margin-left: 4px; }
.prole { font-size: 12px; color: var(--latte); margin-top: 4px; }
.hud-meter { margin-left: auto; display: flex; align-items: center; gap: 10px; background: rgba(14, 11, 9, .82); border: 2px solid var(--latte); padding: 8px 10px; }
.mlabel { font-family: var(--pix); font-size: 7px; color: var(--latte); }
.meter { width: 120px; height: 14px; background: #2a211b; border: 2px solid var(--cream); position: relative; overflow: hidden; }
.meter i { position: absolute; inset: 0; width: 0%; background: repeating-linear-gradient(90deg, var(--caramel) 0 8px, var(--latte) 8px 10px); transition: width .8s cubic-bezier(.3, 1.4, .5, 1); }
.meter-cup { width: 26px; height: 26px; object-fit: cover; border-radius: 50%; border: 2px solid var(--cream); }
.hud-time { display: flex; background: rgba(14, 11, 9, .82); border: 2px solid var(--latte); }
.hud-time button { font-family: var(--pix); font-size: 9px; padding: 0 12px; height: 40px; color: var(--latte); transition: background .2s, color .2s; }
.hud-time button span { font-size: 8px; }
.hud-time button + button { border-left: 2px solid rgba(217, 180, 138, .4); }
.hud-time button:hover { color: var(--cream); background: #2e251f; }
.hud-time button.on { background: var(--neon); color: var(--blk); }
#timeFade { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 9; transition: opacity .35s ease; }
#timeFade.on { opacity: .85; }
@media (max-width: 820px) { .hud-time button span { display: none; } .hud-time button { padding: 0 10px; font-size: 14px; } }
.hud-btn { width: 44px; height: 44px; background: rgba(14, 11, 9, .82); border: 2px solid var(--latte); font-size: 18px; }
.hud-btn:hover { background: var(--ink2); }

.arrival { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 18px; z-index: 5; pointer-events: none; opacity: 0; }
.arrival.show { animation: arrive 2.2s ease forwards; }
@keyframes arrive { 0% { opacity: 0; transform: scale(.9); } 15%, 75% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.05); } }
.polaroid { background: var(--cream); padding: 10px 10px 36px; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); transform: rotate(-3deg); position: relative; }
.polaroid img { display: block; width: min(240px, 60vw); aspect-ratio: 4 / 5; object-fit: cover; }
.polaroid span { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-family: var(--pix); font-size: 8px; color: var(--blk); }
.arrived-tag { font-family: var(--pix); font-size: 12px; color: var(--neon); text-shadow: 3px 3px 0 var(--blk); }

.dialogue, .finale-card {
  position: absolute; right: 4%; top: 50%; width: min(520px, 44%);
  transform: translate(30px, -45%); opacity: 0; pointer-events: none; transition: opacity .45s ease, transform .45s cubic-bezier(.3, 1.3, .5, 1);
  background: rgba(14, 11, 9, .92); border: 3px solid var(--cream); padding: 30px 22px 20px;
  box-shadow: 0 0 0 3px var(--blk), 8px 8px 0 3px rgba(0, 0, 0, .55); z-index: 4;
}
.dialogue.show, .finale-card.show { opacity: 1; pointer-events: auto; transform: translate(0, -50%); }
.nametag { position: absolute; top: -16px; left: 18px; font-family: var(--pix); font-size: 11px; background: var(--neon); color: var(--blk); padding: 8px 12px; box-shadow: 3px 3px 0 var(--espresso); }
.dlg-text { font-size: 18px; line-height: 1.55; min-height: 5.2em; color: var(--cream); }
.dlg-text .cursor { display: inline-block; width: 9px; height: 1em; background: var(--neon); vertical-align: -2px; margin-left: 2px; animation: pulse .7s infinite; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.choice {
  text-align: left; font-size: 14px; font-weight: 600; padding: 12px 12px; line-height: 1.3;
  background: var(--ink2); border: 2px solid rgba(217, 180, 138, .45); color: var(--cream);
  transition: transform .15s ease, border-color .15s, background .15s; display: flex; gap: 8px; align-items: flex-start;
  opacity: 0; transform: translateY(8px); animation: rise .35s ease forwards;
}
.choice::before { content: "▶"; font-size: 10px; color: var(--neon); margin-top: 3px; }
.choice:hover { border-color: var(--neon); background: #2e251f; transform: translateX(3px); }
.choice.done { color: rgba(243, 230, 208, .55); }
.choice.done::before { content: "✓"; color: var(--green); }
.choice.wide { grid-column: 1 / -1; }
.choice.gold { background: var(--neon); color: var(--blk); border-color: var(--neon); font-family: var(--pix); font-size: 10px; line-height: 1.6; box-shadow: 0 0 24px rgba(255, 190, 110, .45); }
.choice.gold::before { color: var(--blk); }
.choice.gold:hover { background: #ffd99e; }
.choice.alt { border-style: dashed; }
.steps-bar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-family: var(--pix); font-size: 8px; color: var(--latte); margin-bottom: 2px; }
.steps-bar i { display: flex; gap: 4px; }
.steps-bar b { width: 14px; height: 8px; background: #2a211b; border: 1px solid rgba(217, 180, 138, .5); }
.steps-bar b.ok { background: var(--green); border-color: var(--green); }
.steps-bar b.now { background: var(--neon); border-color: var(--neon); animation: pulse .8s infinite; }
.choice .lv { font-family: var(--pix); font-size: 7px; color: var(--latte); background: rgba(0, 0, 0, .35); padding: 4px 5px; margin-right: 2px; flex: none; align-self: center; }
.choice.next { border-color: var(--neon); box-shadow: 0 0 0 1px var(--neon), 0 0 18px rgba(255, 190, 110, .35); }
.choice.next::before { animation: pulse .8s infinite; }
.choice.locked { opacity: .45 !important; cursor: not-allowed; border-style: dashed; filter: grayscale(.6); }
.choice.locked::before { content: ""; margin: 0; }
.choice.locked:hover { transform: none; border-color: rgba(217, 180, 138, .45); background: var(--ink2); }
.choice.unlocked { animation: rise .35s ease forwards, unlock .9s ease .1s; }
@keyframes unlock { 0% { box-shadow: 0 0 0 0 rgba(255, 207, 138, .9); } 100% { box-shadow: 0 0 0 14px rgba(255, 207, 138, 0); } }
@keyframes rise { to { opacity: 1; transform: none; } }

.fc-top { font-family: var(--pix); font-size: 12px; color: var(--neon); text-align: center; margin-bottom: 16px; text-shadow: 0 0 12px rgba(255, 190, 110, .7); }
.fc-score { display: flex; justify-content: space-between; align-items: center; font-family: var(--pix); font-size: 9px; color: var(--latte); border-top: 2px dashed rgba(217, 180, 138, .4); border-bottom: 2px dashed rgba(217, 180, 138, .4); padding: 12px 0; margin: 14px 0 18px; }
.fc-score b { color: var(--neon); font-size: 12px; }
.fc-btns { display: flex; flex-wrap: wrap; gap: 16px 14px; }
.fc-btns .btn-arcade { flex: 1 1 auto; text-align: center; }

/* ---------- laptop brain ---------- */
.mind { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px; background: rgba(8, 6, 5, .7); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; }
.mind.open { opacity: 1; visibility: visible; transition: opacity .35s; }
.laptop-frame { width: min(1100px, 100%); height: min(720px, 100%); background: #1b1614; border: 10px solid #2c2522; border-radius: 16px; box-shadow: 0 0 0 2px #4a403a, 0 30px 80px rgba(0, 0, 0, .7); display: flex; flex-direction: column; transform: scale(.85) rotateX(14deg); transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); overflow: hidden; }
.mind.open .laptop-frame { transform: none; }
.titlebar { display: flex; align-items: center; gap: 7px; padding: 10px 12px; background: #120e0c; border-bottom: 2px solid #2c2522; font-family: var(--pix); font-size: 9px; color: var(--latte); }
.titlebar i { width: 11px; height: 11px; border-radius: 50%; background: #e0715a; } .titlebar i:nth-child(2) { background: var(--neon); } .titlebar i:nth-child(3) { background: var(--green); }
.titlebar span { margin-left: 8px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titlebar button { font-family: var(--pix); font-size: 11px; padding: 6px 9px; background: #2c2522; color: var(--cream); }
.titlebar button:hover { background: #e0715a; }
.mind-body { position: relative; flex: 1; overflow: hidden; background: radial-gradient(circle at 50% 50%, #2a1f18, #110d0b 70%); }
.mind-body::before { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(255, 207, 138, .12) 1px, transparent 1.5px) 0 0 / 22px 22px; }
.brain-title { position: absolute; top: 16px; left: 0; right: 0; text-align: center; font-family: var(--pix); font-size: 16px; color: var(--neon); text-shadow: 0 0 14px rgba(255, 190, 110, .7); z-index: 2; pointer-events: none; }
.brain-title small { display: block; margin-top: 10px; font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--latte); text-shadow: none; }
.brain-wrap { position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%); }
#brainSvg { width: 100%; height: 100%; display: block; overflow: visible; }
.brain-outline { animation: brainGlow 3s ease-in-out infinite; }
@keyframes brainGlow { 50% { filter: drop-shadow(0 0 22px rgba(255, 190, 110, .55)); } }
.brain-link { fill: none; stroke: var(--neon); stroke-width: 2; stroke-dasharray: 4 10; opacity: .45; animation: march 1.4s linear infinite; }
.spark { fill: #fff3d6; filter: drop-shadow(0 0 6px #ffcf8a); }
.spot { position: absolute; width: 34px; height: 34px; transform: translate(-50%, -50%) scale(0); z-index: 3; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.mind.open .spot { transform: translate(-50%, -50%) scale(1); }
.spot .dot { position: relative; width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--pix); font-size: 9px; color: var(--blk); background: radial-gradient(circle at 35% 35%, #fff3d6, var(--neon) 55%, var(--caramel)); box-shadow: 0 0 18px rgba(255, 190, 110, .9); transition: transform .2s; }
.spot .dot::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--neon); animation: ring 2.2s ease-out infinite; }
.spot .lbl { font-size: 13px; font-weight: 800; white-space: nowrap; color: var(--cream); background: rgba(14, 11, 9, .85); border: 1px solid rgba(255, 207, 138, .45); padding: 6px 10px; transition: background .2s, color .2s; position: absolute; top: 50%; left: calc(100% + 10px); transform: translateY(-50%); }
.spot.left .lbl { left: auto; right: calc(100% + 10px); }
.spot:hover { z-index: 4; }
.spot:hover .dot { transform: scale(1.2); }
.spot:hover .lbl { background: var(--neon); color: var(--blk); }
.spot.seen .dot { background: radial-gradient(circle at 35% 35%, #e9fff1, var(--green) 60%, #4f9a6c); box-shadow: 0 0 18px rgba(143, 211, 168, .8); }
.spot.seen .dot::after { border-color: var(--green); }
.md-num { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-family: var(--pix); font-size: 18px; color: var(--blk); background: radial-gradient(circle at 35% 35%, #fff3d6, var(--neon) 55%, var(--caramel)); box-shadow: 0 0 40px rgba(255, 190, 110, .8); animation: float 3s ease-in-out infinite; }
.mind-detail .md-tag { font-family: var(--pix); font-size: 9px; color: var(--latte); letter-spacing: .1em; }
.dlg-link { color: var(--neon); font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.dlg-link:hover { color: #fff; background: rgba(255, 207, 138, .18); }
.dlg-link::after { content: " ↗"; font-size: .8em; }
@media (max-width: 700px) {
  .spot .lbl { display: none; }
  .spot, .spot .dot { width: 28px; height: 28px; font-size: 8px; }
  .brain-title { font-size: 12px; }
}
.mind-detail { position: absolute; inset: 38px 0 0 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 30px 20px; background: rgba(17, 13, 11, .94); opacity: 0; visibility: hidden; transform: scale(1.05); transition: all .3s ease; }
.mind-detail.open { opacity: 1; visibility: visible; transform: none; }
.mind-detail h3 { font-family: var(--pix); font-size: 16px; color: var(--neon); line-height: 1.5; }
.mind-detail p { font-size: 18px; line-height: 1.6; max-width: 520px; color: var(--cream); }

/* ---------- fx ---------- */
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 15; }
#iris { position: fixed; inset: 0; z-index: 30; pointer-events: none; background: var(--blk); clip-path: circle(0% at 50% 50%); }
#iris.close { pointer-events: auto; animation: irisIn .55s ease-in forwards; }
#iris.open { animation: irisOut .6s ease-out forwards; }
@keyframes irisIn { from { clip-path: circle(0% at var(--ix, 50%) var(--iy, 50%)); } to { clip-path: circle(150% at var(--ix, 50%) var(--iy, 50%)); } }
@keyframes irisOut { from { clip-path: circle(150% at 50% 50%); } to { clip-path: circle(0% at 50% 50%); } }
.crt { position: fixed; inset: 0; pointer-events: none; z-index: 40; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
.crt::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, .55)); }
#app[data-scene="scene-branch"] .mute { right: auto; left: 14px; }
.mute { position: fixed; right: 14px; bottom: 14px; z-index: 41; width: 42px; height: 42px; background: rgba(14, 11, 9, .85); border: 2px solid var(--latte); font-size: 16px; }

/* ---------- mobile ---------- */
@media (max-width: 820px) {
  .dialogue, .finale-card { left: 16px; right: 16px; width: auto; top: auto; bottom: 16px; transform: translateY(30px); padding: 26px 16px 16px; }
  .choices { max-height: 30vh; overflow-y: auto; padding: 2px 4px 2px 2px; }
  .finale-card { max-height: 60%; overflow-y: auto; padding-top: 20px; }
  .finale-card .fc-top { margin-bottom: 10px; }
  .dialogue.show, .finale-card.show { transform: none; }
  .dlg-text { font-size: 16px; min-height: 4.6em; }
  .choices { grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
  .choice { font-size: 14px; padding: 10px; }
  .hud { padding: 10px 12px; gap: 8px; }
  .prole { display: none; }
  .meter { width: 64px; }
  .mlabel { display: none; }
  .mute { bottom: auto; top: 12px; right: 66px; width: 40px; height: 40px; }
  #app[data-scene="scene-branch"] .mute { display: none; }
        }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
