@font-face { font-family: 'Hanken Grotesk'; src: url('../fonts/HankenGrotesk-wght.ttf') format('truetype'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('../fonts/HankenGrotesk-Italic-wght.ttf') format('truetype'); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  --night: #120A20;
  --plum: #4A3442;
  --purple: #6B3FD6;
  --violet: #964BFF;
  --lavender: #CEC8FF;
  --cream: #FBF8F3;
  --muted: #BDB6E3;
  --poison: #C8FF5A;
  --ink: #1C1028;
  --rays: #FF893A;   
  --brown: #371F1A;  
  --beam: 150px;
  --lx: -999px;
  --ly: -999px;
  --pad: clamp(16px, 3vw, 32px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--night); color: var(--cream); overflow: hidden; }
body { font-family: 'Hanken Grotesk', system-ui, sans-serif; font-weight: 400; -webkit-font-smoothing: antialiased; }
button, a { font: inherit; }
[hidden] { display: none !important; }


.bar { position: fixed; z-index: 30; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 16px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--pad) 14px; pointer-events: none; }
.bar > * { pointer-events: auto; }
.logo { height: 22px; width: auto; }
.bar-title { font-weight: 600; font-size: 13px; letter-spacing: 0.02em; color: var(--muted); }
.doors { display: flex; gap: 6px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.doors li { width: 14px; height: 20px; border-radius: 7px 7px 2px 2px; border: 1.5px solid rgba(206, 200, 255, 0.45); }
.doors li.done { background: var(--rays); border-color: var(--rays); }
.doors li.here { border-color: var(--poison); }


.pill { appearance: none; border-radius: 999px; padding: 10px 20px; font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
  border: 1.5px solid transparent; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s ease, background .2s ease; }
.pill:active { transform: scale(0.97); }
.pill.primary { background: var(--poison); color: var(--ink); }
.pill.primary:hover { background: #D8FF82; }
.pill.ghost { background: rgba(18, 10, 32, 0.55); color: var(--cream); border-color: rgba(206, 200, 255, 0.4); }
.pill.ghost:hover { border-color: var(--lavender); }
.pill.big { padding: 14px 28px; font-size: 17px; }
.pill:focus-visible, .text-link:focus-visible { outline: 2px solid var(--poison); outline-offset: 3px; }
.text-link { color: var(--rays); font-weight: 600; font-size: 15px; text-decoration: none; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }


.stage { position: fixed; inset: 0; overflow: hidden; cursor: none; touch-action: none; }
.stage.lit, .stage.screen-on { cursor: default; }
.scene { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.scene .bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.sprites { position: absolute; inset: 0; }
.sprite { position: absolute; transform-origin: 50% 100%; user-select: none; -webkit-user-drag: none; pointer-events: none;
  filter: drop-shadow(0 1.2vh 1.2vh rgba(14, 8, 18, 0.45)); }
.glow { position: absolute; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .8s ease;
  mix-blend-mode: screen; }
.found .glow.when-found, .lit .glow.when-found { opacity: 1; animation: pulse 2.4s ease-in-out infinite; }
.glow-pulse { animation: glowpulse 3.2s ease-in-out infinite; mix-blend-mode: screen; opacity: 0.2; }


.dark { position: absolute; inset: 0; pointer-events: none; background: rgba(8, 4, 14, 0.965);
  -webkit-mask-image: radial-gradient(circle var(--beam) at var(--lx) var(--ly), transparent 0, transparent 45%, rgba(0,0,0,0.55) 72%, #000 100%);
  mask-image: radial-gradient(circle var(--beam) at var(--lx) var(--ly), transparent 0, transparent 45%, rgba(0,0,0,0.55) 72%, #000 100%);
  transition: opacity .9s ease; }
.lit .dark, .screen-on .dark { opacity: 0; }
.found .dark { opacity: 0.38; }
.stage.found { cursor: default; }
.caption.at-top { bottom: auto; top: 64px; }

.hint { position: absolute; z-index: 10; top: 64px; left: 50%; transform: translateX(-50%); margin: 0; padding: 8px 16px;
  border-radius: 999px; background: rgba(18, 10, 32, 0.6); color: var(--muted); font-size: 15px; white-space: nowrap;
  transition: opacity .4s ease; pointer-events: none; }


.caption { position: absolute; z-index: 20; left: 50%; bottom: max(var(--pad), env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(760px, calc(100% - 2 * var(--pad))); padding: 20px 24px; border-radius: 20px;
  background: rgba(18, 10, 32, 0.86); border: 1px solid rgba(150, 75, 255, 0.45); backdrop-filter: blur(6px);
  animation: rise .6s ease both; cursor: default; }
.room-label { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; color: var(--poison); }
.line1 { margin: 0 0 8px; font-weight: 800; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; }
.line2 { margin: 0 0 16px; font-size: clamp(16px, 1.5vw, 18px); line-height: 1.5; color: var(--muted); }
.caption-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.caption-actions .pill { margin-left: auto; }


.screen { position: absolute; z-index: 25; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 96px var(--pad) var(--pad); cursor: default;
  background: radial-gradient(ellipse at 50% 45%, rgba(18, 10, 32, 0.25), rgba(18, 10, 32, 0.78) 70%); }
.kicker { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; color: var(--poison); }
.title { margin: 0 0 16px; font-weight: 800; font-size: clamp(40px, 6.4vw, 76px); line-height: 1.02; letter-spacing: -0.01em;
  text-shadow: 0 4px 24px rgba(18, 10, 32, 0.6); }
.lede { margin: 0 0 28px; max-width: 560px; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.5; color: var(--cream);
  text-shadow: 0 2px 12px rgba(18, 10, 32, 0.8); }
.small-note { margin: 18px 0 0; font-size: 13px; color: var(--muted); max-width: 420px; line-height: 1.5; }
.exit-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.exit .title { font-size: clamp(32px, 4.8vw, 56px); max-width: 860px; }
.dawn .scene { filter: brightness(1.12) saturate(1.05); transition: filter 1.6s ease; }
.dawn .scene::after { content: ''; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(to bottom, rgba(255, 196, 160, 0.0) 0%, rgba(255, 196, 160, 0.55) 70%, rgba(255, 220, 190, 0.35) 88%); }

.fade { position: absolute; inset: 0; z-index: 40; background: #05030A; opacity: 0; pointer-events: none; transition: opacity .55s ease; }
.fade.on { opacity: 1; }

.draft-ribbon .short { display: none; }
@media (max-width: 640px) { .draft-ribbon .short { display: inline; } }
.draft-ribbon { position: fixed; z-index: 50; left: 50%; top: 0; transform: translateX(-50%); padding: 4px 14px;
  border-radius: 0 0 10px 10px; background: var(--poison); color: var(--ink); font-size: 13px; font-weight: 600; }


@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.2%); } }
@keyframes sip { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-0.8%) rotate(-0.6deg); } }
@keyframes stir { 0%, 100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-0.6%) scaleY(1.008); } }
@keyframes sway { 0%, 100% { transform: rotate(-0.9deg); } 50% { transform: rotate(0.9deg); } }
@keyframes rattle { 0%, 86%, 100% { transform: translateX(0); } 88% { transform: translateX(-0.5%); } 90% { transform: translateX(0.5%); }
  92% { transform: translateX(-0.4%); } 94% { transform: translateX(0.3%); } }
@keyframes pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes glowpulse { 0%, 100% { opacity: 0; } 50% { opacity: 0.45; } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
.found .hint { opacity: 0 !important; }
.a-float { animation: float 4.2s ease-in-out infinite; }
.a-float.d1 { animation-delay: -1.1s; } .a-float.d2 { animation-delay: -2.3s; } .a-float.d3 { animation-delay: -3.2s; }
.a-sip { animation: sip 3.6s ease-in-out infinite; }
.a-stir { animation: stir 2.8s ease-in-out infinite; }
.a-sway { animation: sway 5s ease-in-out infinite; }
.a-rattle { animation: rattle 2.6s linear infinite; }
.found-sprite.a-rattle { animation: none; }


.pano { position: absolute; bottom: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.pano-fig { position: absolute; left: 0; top: 0; width: 100%; animation: panofloat 4.4s ease-in-out infinite; }
.pano-fig img { display: block; width: 100%; height: auto; max-width: none; user-select: none; }
.pano-gate { right: max(4vw, var(--pad)); width: min(44vw, 74vh); aspect-ratio: 0.814 / 0.6; overflow: visible; } 
.pano-gate .pano-fig { aspect-ratio: 0.814; }
.pano-light, .pano-halo { position: absolute; left: var(--gx, 50.9%); top: var(--gy, 31.2%); border-radius: 50%; transform: translate(-50%, -50%); }
.pano-light { width: 15%; aspect-ratio: 1; animation: flicker 1.9s ease-in-out infinite;
  background: radial-gradient(circle, #FFFBEF 0%, #FDF7E6 22%, #FAA91D 52%, rgba(255, 137, 58, 0.55) 66%, rgba(255, 137, 58, 0) 72%); }
.pano-halo { width: 90%; aspect-ratio: 1; mix-blend-mode: screen; opacity: 0.75;
  background: radial-gradient(circle, rgba(255, 190, 110, 0.55) 0%, rgba(255, 137, 58, 0.22) 30%, rgba(255, 137, 58, 0) 62%); }
@keyframes panofloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.2%); } }
@keyframes flicker { 0%, 100% { opacity: 0.94; } 45% { opacity: 1; } 60% { opacity: 0.88; } }
.screen.intro { align-items: flex-start; text-align: left; padding-left: max(7vw, var(--pad)); }
.intro-body { position: relative; z-index: 2; max-width: 560px; transition: opacity .4s ease; }
.intro .small-note { max-width: 460px; }

.intro.handover .intro-body { opacity: 0; }
.intro.handover .pano-light { animation: handover .75s cubic-bezier(.5, 0, .25, 1) forwards; }
.intro.handover .pano-halo { opacity: 0; transition: opacity .5s ease; }
@keyframes handover { 0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  70% { transform: translate(calc(-50% + var(--hx, 0px)), calc(-50% + var(--hy, 0px))) scale(5); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--hx, 0px)), calc(-50% + var(--hy, 0px))) scale(12); opacity: 0; } }


.screen.exit { align-items: flex-start; text-align: left; padding-left: max(7vw, var(--pad)); padding-right: var(--pad);
  overflow-y: auto; touch-action: pan-y; color: var(--brown);
  background: linear-gradient(180deg, rgba(184, 215, 254, 0.93) 0%, rgba(179, 154, 245, 0.9) 50%, rgba(211, 170, 201, 0.9) 74%, rgba(253, 219, 191, 0.95) 100%); }
.exit-body { position: relative; z-index: 2; max-width: 600px; }
.exit .title { color: var(--brown); text-shadow: none; max-width: 600px; }
.exit .title em { font-style: italic; font-weight: 400; }
.exit .lede { color: var(--brown); text-shadow: none; margin-bottom: 20px; }
.met-label { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; color: rgba(55, 31, 26, 0.72); }
.met { list-style: none; margin: 0 0 20px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.met li { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
.met img { width: 40px; height: 40px; flex: none; object-fit: contain; max-width: none; filter: drop-shadow(0 3px 4px rgba(55, 31, 26, 0.25)); }
.brand-line { margin: 0 0 20px; max-width: 540px; font-size: 15px; line-height: 1.5; }
.exit-actions { justify-content: flex-start; }
.exit .pill.primary { background: var(--brown); color: var(--cream); }
.exit .pill.primary:hover { background: #4E2C24; }
.exit .pill.ghost { background: rgba(255, 253, 254, 0.35); color: var(--brown); border-color: rgba(55, 31, 26, 0.35); }
.exit .pill.ghost:hover { border-color: var(--brown); }
.exit .small-note { color: rgba(55, 31, 26, 0.72); }
.pano-exit { right: max(4vw, var(--pad)); width: min(40vw, 70vh); aspect-ratio: 1.2 / 0.62; }
.pano-exit .pano-fig { aspect-ratio: 1.2; }


.game-layer { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.game-layer canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage.game-lit, .stage.game-dark { cursor: default; }
.stage.game-dark { cursor: none; }
.stage.game-lit .dark { opacity: 0.2; }
.stage.game-lit.uv-on .dark { opacity: 0.8; }
.stage.game-lit.uv-on.found .dark { opacity: 0.55; }
.stage.game-dark .dark { opacity: 0; transition: none; }
.pumpkin { position: absolute; left: 0; top: 0; transform-origin: 50% 100%; will-change: transform; }
.pumpkin img { position: absolute; top: 0; height: 100%; max-width: none; user-select: none; transition: opacity .45s ease;
  filter: drop-shadow(0 1vh 1vh rgba(14, 8, 18, 0.45)); }
.pumpkin .fresh { left: 0; width: 100%; animation: candle 2.8s ease-in-out infinite; }
.pumpkin .soft { opacity: 0; }
.pumpkin.rot .soft { opacity: 1; filter: drop-shadow(0 0 10px rgba(150, 75, 255, 0.95)) drop-shadow(0 0 22px rgba(150, 75, 255, 0.6)); }
.pumpkin.rot .fresh { opacity: 0; }
@keyframes candle { 0%, 100% { filter: drop-shadow(0 1vh 1vh rgba(14, 8, 18, 0.45)) brightness(1); }
  40% { filter: drop-shadow(0 1vh 1vh rgba(14, 8, 18, 0.45)) brightness(1.06); }
  55% { filter: drop-shadow(0 1vh 1vh rgba(14, 8, 18, 0.45)) brightness(0.97); } }
.uv-pool { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 50%; pointer-events: none; opacity: 0;
  transition: opacity .4s ease;
  background: radial-gradient(circle, rgba(150, 75, 255, 0.55) 0%, rgba(150, 75, 255, 0.24) 36%, rgba(150, 75, 255, 0) 66%); }
.uv-pool.on { opacity: 1; animation: uvpulse 1.4s ease-in-out infinite; }
@keyframes uvpulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
.pick-ring { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 50%; border: 3px solid var(--poison);
  box-shadow: 0 0 14px rgba(200, 255, 90, 0.55); opacity: 0; transition: opacity .3s ease; }
.pick-ring.on { opacity: 1; }
.spook { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; opacity: 0; transition: opacity .8s ease; }
.spook.on { opacity: 1; }
.spook img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; transition: opacity .35s ease;
  filter: drop-shadow(0 0 16px rgba(206, 200, 255, 0.45)); }
.spook .scary { opacity: 0; }
.spook.true .scary { opacity: 1; }
.spook.true .cute { opacity: 0; }


.web { position: absolute; inset: 0; pointer-events: none; }
.web canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.web-risk { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 50% 50%; will-change: transform; user-select: none;
  filter: drop-shadow(0 1vh 1vh rgba(14, 8, 18, 0.45)); transition: opacity .9s ease, filter .6s ease; }
.web-risk.beyond { opacity: 0; }
.web-risk.beyond.on { opacity: 1; }
.web-risk.lit { filter: drop-shadow(0 0 10px rgba(200, 255, 90, 0.7)) drop-shadow(0 1vh 1vh rgba(14, 8, 18, 0.45)); }
.web-spider { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 50% 0; will-change: transform; opacity: 0;
  filter: drop-shadow(0 0 18px rgba(150, 75, 255, 0.55)) drop-shadow(0 1.2vh 1.4vh rgba(14, 8, 18, 0.5)); }
.web-spider.on { opacity: 1; }
.stage.web-seen { cursor: default; }
.stage.web-seen .dark { opacity: 0.62; }
.stage.web-awake .dark { opacity: 0.28; }
.stage.web-awake #bgGlow { animation: glowstrong 2.6s ease-in-out infinite; }
.stage.lit .dark, .stage.screen-on .dark { opacity: 0; }
@keyframes glowstrong { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.demo-hand { position: absolute; z-index: 12; left: -99px; top: -99px; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%; border: 2px solid var(--cream); background: rgba(251, 248, 243, 0.22); pointer-events: none;
  opacity: 0; transition: opacity .3s ease, transform .15s ease; }
.demo-hand.on { opacity: 0.9; }
.demo-hand.press { transform: scale(0.78); }

@media (max-width: 640px) {
  .bar-title { display: none; }
  .bar { gap: 10px; }
  .bar .pill { padding: 7px 14px; font-size: 13px; }
  .doors { gap: 4px; }
  .doors li { width: 10px; height: 15px; }
  .draft-ribbon { left: var(--pad); top: 50px; transform: none; border-radius: 8px; font-size: 11px; padding: 3px 8px; }
  .draft-ribbon .long { display: none; }
  .hint { top: 58px; font-size: 13px; }
  .caption { padding: 16px 18px; }
}
@media (max-width: 760px) {
  .screen.intro { align-items: center; text-align: center; justify-content: flex-start; padding: 84px var(--pad) 0; }
  .intro .small-note { margin-left: auto; margin-right: auto; }
  .pano-gate { right: auto; left: 50%; transform: translateX(-50%); width: min(92vw, 52vh); }
  .screen.exit { align-items: stretch; justify-content: flex-start; padding: 70px var(--pad) 28px; }
  .pano-exit { position: relative; right: auto; bottom: auto; flex: none; width: min(62vw, 240px); margin: 0 auto 6px; }
  .exit .title { font-size: 30px; }
  
  .exit-body { display: flex; flex-direction: column; }
  .exit-actions, .exit .small-note { order: 1; }
  .met-label { order: 2; margin-top: 24px; }
  .met { order: 3; }
  .brand-line { order: 4; margin-bottom: 0; }
  .exit .lede { font-size: 15px; }
  .met { gap: 8px 12px; }
  .met li { font-size: 13px; }
  .met img { width: 34px; height: 34px; }
}
@media (max-width: 760px) and (max-height: 700px) { .intro .small-note { display: none; } .intro .lede { margin-bottom: 18px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}



.screen.welcome { z-index: 26; background: radial-gradient(ellipse at 50% 46%, rgba(18, 10, 32, 0.66), rgba(18, 10, 32, 0.28) 78%); }
.welcome-body { display: flex; flex-direction: column; align-items: center; max-width: 820px; }
.welcome-logo { height: 34px; width: auto; }
.presents { margin: 10px 0 18px; font-size: 13px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); }
.welcome .title { margin-bottom: 12px; }
.welcome .lede { margin-bottom: 28px; }
.steps { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; width: 100%; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 12px 16px; border-radius: 16px;
  background: rgba(18, 10, 32, 0.7); border: 1px solid rgba(206, 200, 255, 0.18); font-size: 14px; font-weight: 600; line-height: 1.3; }
.step-icon, .howto-icon { display: inline-flex; width: 32px; height: 32px; color: var(--rays); }
.step-icon svg, .howto-icon svg, .step-icon img, .howto-icon img { width: 100%; height: 100%; max-width: none; object-fit: contain; }
.welcome .small-note { margin-top: 16px; }


.intro-body { padding: 26px 28px 24px; border-radius: 22px; background: rgba(18, 10, 32, 0.84); border: 1px solid rgba(150, 75, 255, 0.4);
  backdrop-filter: blur(6px); max-width: 470px; }
.intro-body::after { content: ''; position: absolute; right: -15px; top: 46%; width: 0; height: 0;
  border-top: 14px solid transparent; border-bottom: 14px solid transparent; border-left: 16px solid rgba(18, 10, 32, 0.84); }
.intro .title { font-size: clamp(28px, 3.4vw, 42px); margin-bottom: 14px; }
.intro .lede { font-size: clamp(16px, 1.4vw, 18px); text-shadow: none; margin-bottom: 22px; }


.stage.howto-on .dark { opacity: 0.55; }
.stage.howto-on { cursor: default; }
.howto { position: absolute; z-index: 22; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 2 * var(--pad))); padding: 22px 24px 24px; border-radius: 20px;
  background: rgba(18, 10, 32, 0.9); border: 1px solid rgba(150, 75, 255, 0.45); backdrop-filter: blur(6px); animation: pop .45s ease both; }
.howto-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.howto-head .room-label { margin: 2px 0 0; }
.howto-title { margin: 6px 0 10px; font-weight: 800; font-size: clamp(22px, 2.4vw, 26px); }
.howto-text { margin: 0 0 20px; font-size: clamp(15px, 1.4vw, 17px); line-height: 1.55; color: var(--cream); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)); } to { opacity: 1; transform: translate(-50%, -50%); } }


.rim { position: absolute; inset: 0; z-index: 1; pointer-events: none; mix-blend-mode: screen; transition: opacity .6s ease;
  background: radial-gradient(circle var(--beam) at var(--lx) var(--ly), transparent 0, transparent 52%, rgba(255, 137, 58, 0.26) 62%, rgba(255, 137, 58, 0.08) 74%, transparent 86%); }
.stage.lit .rim, .stage.screen-on .rim, .stage.found .rim, .stage.howto-on .rim, .stage.game-dark .rim, .stage.game-lit .rim, .stage.web-awake .rim { opacity: 0; }


.sprite.decor { filter: drop-shadow(0 0.8vh 0.9vh rgba(14, 8, 18, 0.55)); }


.uv-pool { background: radial-gradient(circle, rgba(255, 170, 110, 0.5) 0%, rgba(150, 75, 255, 0.45) 26%, rgba(150, 75, 255, 0.22) 44%, rgba(150, 75, 255, 0) 66%); }


#roomLink { display: inline-flex; align-items: center; gap: 8px; }
#roomLink::before { content: ''; width: 13px; height: 18px; flex: none; background: url('../assets/panorays-symbol-orange.svg') center / contain no-repeat; }


.exit-logo { display: block; height: 24px; width: auto; margin: 0 0 18px; }
.met li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #C2551A; text-decoration: none; }
.row-link::before { content: ''; width: 9px; height: 13px; flex: none; background: url('../assets/panorays-symbol-orange.svg') center / contain no-repeat; }
.row-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.row-link:focus-visible { outline: 2px solid var(--brown); outline-offset: 2px; }
.met-label { color: #C2551A; }

@media (max-width: 760px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
  .steps li { padding: 12px 10px; font-size: 13px; gap: 8px; }
  .step-icon { width: 26px; height: 26px; }
  .screen.welcome { justify-content: flex-start; padding-top: 76px; overflow-y: auto; touch-action: pan-y; }
  .intro-body { padding: 20px; }
  .intro-body::after { display: none; }
  .howto { top: auto; bottom: max(var(--pad), env(safe-area-inset-bottom)); transform: translateX(-50%); animation: none; }
}
body.at-exit .bar .logo, body.at-exit .bar-title { visibility: hidden; }


.g-char { position: absolute; left: 0; top: 0; max-width: none; user-select: none; pointer-events: none; will-change: transform;
  transform-origin: 50% 100%; filter: drop-shadow(0 1.2vh 1.2vh rgba(14, 8, 18, 0.45)); }
.spook.blink { opacity: 0; transition: opacity .35s ease; }


.goal { position: absolute; z-index: 10; top: 104px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column;
  align-items: center; gap: 8px; pointer-events: none; }
.goal-icons { display: flex; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(18, 10, 32, 0.6); }
.goal-icon { display: inline-flex; width: 22px; height: 22px; color: rgba(206, 200, 255, 0.35); transition: color .25s ease, transform .25s ease; }
.goal-icon svg { width: 100%; height: 100%; }
.goal-icon.on { color: var(--rays); transform: scale(1.12); }
.goal-icon.bad { color: #E2475A; }
.goal-timer { width: min(260px, 60vw); height: 6px; border-radius: 3px; background: rgba(206, 200, 255, 0.22); overflow: hidden; }
.goal-timer span { display: block; height: 100%; width: 100%; background: var(--poison); border-radius: 3px; }
.goal-timer.low span { background: #E2475A; }
#demoHand { position: absolute; z-index: 21; }
.fx { position: absolute; z-index: 21; pointer-events: none; transform: translate(-50%, -50%); }
.fx-hit { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--rays); animation: fxring .6s ease-out forwards; }
.fx-bad { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #E2475A; animation: fxring .6s ease-out forwards; }
.fx-miss { font-size: 13px; font-weight: 600; color: var(--muted); animation: fxpuff .7s ease-out forwards; }
@keyframes fxring { from { opacity: 1; transform: translate(-50%, -50%) scale(.6); } to { opacity: 0; transform: translate(-50%, -50%) scale(2.4); } }
@keyframes fxpuff { from { opacity: 1; transform: translate(-50%, -50%); } to { opacity: 0; transform: translate(-50%, -110%); } }
@media (max-width: 640px) { .goal { top: 92px; } .goal-icon { width: 18px; height: 18px; } }
.stage.game-dim .dark { opacity: 0.62; }
.game-top { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }
.goal-icons { flex-wrap: wrap; justify-content: center; max-width: min(520px, 86vw); }
.fx-slip { color: #FFB27A; font-size: 14px; }


.mansion-door { position: absolute; perspective: 700px; pointer-events: none; }
.door-in { position: absolute; inset: 0; border-radius: 50% 50% 0 0 / 44% 44% 0 0; opacity: 0; transition: opacity .6s ease .2s;
  background: radial-gradient(ellipse at 50% 75%, #FFE2B8 0%, #FF893A 30%, #6A2A12 70%, #1B0A08 100%); box-shadow: 0 0 40px rgba(255, 137, 58, 0.6); }
.mansion-door .leaf { position: absolute; top: 0; height: 100%; width: 50%; max-width: none; transition: transform 1.15s cubic-bezier(.55, 0, .3, 1) .15s; backface-visibility: hidden; }
.mansion-door .leaf.left { left: 0; transform-origin: 0 50%; }
.mansion-door .leaf.right { right: 0; transform-origin: 100% 50%; }
.door-opening .mansion-door .leaf.left { transform: rotateY(-105deg); }
.door-opening .mansion-door .leaf.right { transform: rotateY(105deg); }
.door-opening .door-in { opacity: 1; }
.stage.door-opening .scene { transition: transform 1.25s cubic-bezier(.6, 0, .9, .4) .55s; }
.door-opening #welcome { opacity: 0; transition: opacity .45s ease; pointer-events: none; }

.screen.welcome { background: radial-gradient(ellipse at 50% 44%, rgba(18, 10, 32, 0.62), rgba(18, 10, 32, 0.12) 72%); }
.welcome .lede { max-width: 600px; margin-bottom: 30px; }

.screen.welcome { align-items: flex-start; text-align: left; padding-left: max(7vw, var(--pad));
  background: linear-gradient(90deg, rgba(18, 10, 32, 0.78) 0%, rgba(18, 10, 32, 0.45) 45%, rgba(18, 10, 32, 0.05) 75%); }
.welcome-body { align-items: flex-start; max-width: 560px; }
.welcome .title { font-size: clamp(40px, 5.4vw, 68px); }
@media (max-width: 760px) {
  .screen.welcome { align-items: center; text-align: center; padding-left: var(--pad);
    background: linear-gradient(180deg, rgba(18, 10, 32, 0.82) 0%, rgba(18, 10, 32, 0.55) 55%, rgba(18, 10, 32, 0.1) 80%); }
  .welcome-body { align-items: center; }
}


.lives { display: flex; gap: 4px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.lives + .doors { margin-left: 14px; }
.lives li { width: 18px; height: 18px; color: #E2475A; transition: color .3s ease, opacity .3s ease; }
.lives li svg { width: 100%; height: 100%; }
.lives li.lost { color: rgba(206, 200, 255, 0.28); }
.lives li.hit { animation: lifehit .7s ease; }
@keyframes lifehit { 0%, 100% { transform: scale(1); } 20% { transform: scale(1.5) rotate(-12deg); } 40% { transform: scale(0.8) rotate(10deg); } 60% { transform: rotate(-6deg); } }

.screen.gameover { z-index: 27; background: radial-gradient(ellipse at 50% 45%, rgba(18, 10, 32, 0.72), rgba(8, 4, 14, 0.94) 72%); }
.gameover-body { display: flex; flex-direction: column; align-items: center; max-width: 620px; }
.gameover .exit-actions { justify-content: center; }
@media (max-width: 640px) { .lives li { width: 14px; height: 14px; } .lives { gap: 2px; } .doors { display: none; } }


.music-btn { appearance: none; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(18, 10, 32, 0.55); border: 1.5px solid rgba(206, 200, 255, 0.4); color: var(--cream); cursor: pointer; padding: 0; }
.music-btn svg { width: 18px; height: 18px; }
.music-btn .slash { opacity: 0; }
.music-btn.off .slash { opacity: 1; }
.music-btn.off { color: var(--muted); }
.music-btn:hover { border-color: var(--lavender); }
.music-btn:focus-visible { outline: 2px solid var(--poison); outline-offset: 3px; }
@media (max-width: 640px) { .music-btn { width: 32px; height: 32px; } }
.lives[hidden] + .doors { margin-left: auto; }


.greet { margin: 0 0 10px; font-weight: 600; font-size: clamp(18px, 1.8vw, 22px); color: var(--poison); }

.screen.rules { z-index: 26; background: radial-gradient(ellipse at 50% 45%, rgba(18, 10, 32, 0.72), rgba(8, 4, 14, 0.92) 75%); }
.rules-body { display: flex; flex-direction: column; align-items: center; max-width: 980px; width: 100%; }
.rules .title { font-size: clamp(34px, 4.4vw, 54px); margin-bottom: 28px; }
.rules-grid { list-style: none; margin: 0 0 32px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; width: 100%; }
.rules-grid li { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 18px; border-radius: 18px; text-align: center;
  background: rgba(18, 10, 32, 0.75); border: 1px solid rgba(206, 200, 255, 0.2); }
.rules-grid b { font-weight: 800; font-size: 18px; }
.rules-grid span:last-child { font-size: 14px; line-height: 1.5; color: var(--muted); }
.rule-icon { display: inline-flex; width: 40px; height: 40px; color: var(--rays); }
.rule-icon svg, .rule-icon img { width: 100%; height: 100%; max-width: none; object-fit: contain; }
@media (max-width: 760px) { .rules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .rules-grid li { padding: 16px 12px; } .screen.rules { justify-content: flex-start; padding-top: 80px; overflow-y: auto; touch-action: pan-y; } }

.icon-btn { appearance: none; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  background: rgba(18, 10, 32, 0.55); border: 1.5px solid rgba(206, 200, 255, 0.4); color: var(--cream); cursor: pointer; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { border-color: var(--lavender); }
.icon-btn:focus-visible { outline: 2px solid var(--poison); outline-offset: 3px; }
@media (max-width: 640px) { .icon-btn { width: 32px; height: 32px; } }

.g-panel { position: absolute; z-index: 22; left: 50%; bottom: max(var(--pad), env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(560px, calc(100% - 2 * var(--pad))); padding: 20px 22px; border-radius: 18px; cursor: default;
  background: rgba(18, 10, 32, 0.94); border: 1px solid rgba(150, 75, 255, 0.5); backdrop-filter: blur(6px); animation: rise .35s ease both; }
.g-panel h3 { margin: 0 0 12px; font-weight: 800; font-size: 20px; }
.g-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: 15px; }
.g-panel dt { color: var(--muted); }
.g-panel dd { margin: 0; }
.g-panel .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; letter-spacing: 0.02em; }
.g-panel .verify { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.5; }
.g-panel .verify.ok { background: rgba(47, 158, 91, 0.18); border: 1px solid rgba(47, 158, 91, 0.6); }
.g-panel .verify.bad { background: rgba(226, 71, 90, 0.18); border: 1px solid rgba(226, 71, 90, 0.65); }
.g-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.g-actions .pill { padding: 9px 16px; font-size: 14px; }
.g-actions .pill:disabled { opacity: 0.4; cursor: default; }
.g-panel .eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--poison); }
.ings { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ings li { display: flex; gap: 12px; align-items: flex-start; }
.ings li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; line-height: 1.4; }
.ings li b { font-size: 15px; }
.ings li span { color: var(--muted); }
.ing { flex: none; width: 44px; height: 44px; border-radius: 12px; background: rgba(206, 200, 255, 0.1); display: inline-flex; align-items: center; justify-content: center; }
.ing svg, .ing img { width: 32px; height: 32px; max-width: none; object-fit: contain; }
.insp { margin-top: 4px; padding: 6px 9px; border-radius: 8px; font-size: 13px; }
.insp.ok { background: rgba(47, 158, 91, 0.2); color: #CFF5DB; }
.insp.bad { background: rgba(226, 71, 90, 0.2); color: #FFD2D8; }
.clock { height: 5px; border-radius: 3px; background: rgba(206, 200, 255, 0.2); overflow: hidden; margin: 0 0 14px; }
.clock span { display: block; height: 100%; width: 100%; background: var(--poison); }

.screen.exit { background: linear-gradient(180deg, rgba(196, 220, 254, 0.96) 0%, rgba(190, 170, 245, 0.95) 50%, rgba(220, 186, 210, 0.95) 74%, rgba(253, 225, 200, 0.97) 100%); }
.exit-body { max-width: min(1040px, 92vw); width: 100%; }
.exit .title { font-size: clamp(36px, 4.6vw, 60px); max-width: 1040px; margin-bottom: 16px; }
.exit .lede { max-width: 760px; font-size: clamp(17px, 1.6vw, 20px); margin-bottom: 28px; }
.met { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; margin-bottom: 28px; }
.met li { padding: 14px 16px; border-radius: 16px; background: rgba(255, 253, 250, 0.55); gap: 14px; font-size: 15px; }
.met img { width: 64px; height: 64px; }
.row-link { font-size: 13px; }
.exit-actions { gap: 14px; }
.exit .pill.primary.big { padding: 18px 34px; font-size: 18px; box-shadow: 0 10px 24px rgba(55, 31, 26, 0.25); }
.pano-exit { display: none; }
@media (max-width: 760px) { .met { grid-template-columns: 1fr; } .met img { width: 48px; height: 48px; } }
@media (min-width: 900px) { .g-panel.brew-card { left: max(var(--pad), 4vw); transform: none; width: min(470px, 42vw); top: 50%; bottom: auto; transform: translateY(-46%); animation: none; } }


@keyframes g-shake { 0%,100% { translate: 0 0; } 20% { translate: -7px 2px; } 40% { translate: 6px -3px; } 60% { translate: -5px 1px; } 80% { translate: 4px -1px; } }
.g-shake { animation: g-shake .45s linear; }
@media (prefers-reduced-motion: reduce) { .g-shake { animation: none; } }


.howto-text p { margin: 0 0 10px; }
.howto-text .howto-context { color: var(--cream); opacity: .82; }
.howto-text .howto-sub { margin: 14px 0 4px; font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--poison); }


.g-panel dd { min-width: 0; overflow-wrap: anywhere; }
