/* reservationhatao.com — v5. One system: obsidian, ivory, champagne. */
@font-face { font-family: "Bodoni Moda"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/bodoni-moda-latin.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300 600; font-display: swap; src: url(fonts/inter-latin.woff2) format("woff2"); }
@font-face { font-family: "Mukta"; font-weight: 500; font-display: swap; src: url(../v4/fonts/mukta-400-devanagari.woff2) format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Mukta"; font-weight: 700; font-display: swap; src: url(../v4/fonts/mukta-700-devanagari.woff2) format("woff2"); unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FF; }

:root {
  --bg: #0a0908; --bg2: #13100d;
  --ink: #efe9dd; --ink-2: rgba(239, 233, 221, .66); --ink-3: rgba(239, 233, 221, .4);
  --gold: #c8a96e; --gold-2: #ead6a6; --line: rgba(200, 169, 110, .3); --hair: rgba(239, 233, 221, .16);
  --serif: "Bodoni Moda", "Bodoni 72", Didot, "Didot LT STD", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --deva: "Mukta", "Noto Sans Devanagari", "Kohinoor Devanagari", sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1); --ease-io: cubic-bezier(.76, 0, .24, 1); --ease-out: cubic-bezier(.16, 1, .3, 1);
  --st: env(safe-area-inset-top, 0px); --sr: env(safe-area-inset-right, 0px); --sb: env(safe-area-inset-bottom, 0px); --sl: env(safe-area-inset-left, 0px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; overscroll-behavior: none; }
body { font-family: var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 1px solid var(--gold-2); outline-offset: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }

/* film grain over everything, very quiet */
.grain { position: fixed; inset: -60%; z-index: 90; pointer-events: none; opacity: .065;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.1s steps(6) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }

/* ================= 1 · ENTRANCE ================= */
.entrance { position: fixed; inset: 0; z-index: 30; overflow: hidden;
  background: radial-gradient(90% 60% at 50% 56%, #1a1511 0%, #0e0c0a 55%, #070605 100%); }
.world { position: absolute; inset: 0; transform-origin: 50% 52%;
  transform: translate3d(calc(var(--px, 0) * -10px), calc(var(--py, 0) * -6px), 0); transition: transform .9s var(--ease-out); }
.hall { position: absolute; inset: 0; }
.doorway { --dh: min(76svh, 132vw, 820px); --dw: calc(var(--dh) * .5);
  position: absolute; left: 50%; top: 52%; width: var(--dw); height: var(--dh); transform: translate(-50%, -50%); }
.frame { position: absolute; inset: calc(var(--dw) * -.07); bottom: 0; border: 1px solid var(--line); border-bottom: 0;
  border-radius: calc(var(--dw) * .57) calc(var(--dw) * .57) 0 0; }
.frame::after { content: ""; position: absolute; inset: calc(var(--dw) * -.045); bottom: 0; border: 1px solid rgba(200, 169, 110, .12); border-bottom: 0; border-radius: calc(var(--dw) * .615) calc(var(--dw) * .615) 0 0; }
.portal { position: absolute; inset: 0; overflow: hidden; perspective: 1100px; perspective-origin: 50% 50%;
  border-radius: calc(var(--dw) * .5) calc(var(--dw) * .5) 0 0;
  background: #0b0907; box-shadow: 0 0 0 1px rgba(200, 169, 110, .22); }
.beyond { position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(70% 55% at 50% 62%, #fff7e4 0%, #f6dca6 18%, #c8914a 42%, #4a2f15 72%, #140d07 100%); }
.beyond-core { position: absolute; left: 50%; top: 62%; width: 40%; height: 30%; transform: translate(-50%, -50%); border-radius: 50%; background: #fffaf0; filter: blur(18px); opacity: .8; }
.beyond-rays { position: absolute; inset: -20%; opacity: .25; mix-blend-mode: screen;
  background: repeating-conic-gradient(from 0deg at 50% 70%, rgba(255, 240, 210, .0) 0deg 7deg, rgba(255, 240, 210, .35) 8deg 9deg, rgba(255, 240, 210, 0) 10deg 16deg); filter: blur(6px); }
.leaf { position: absolute; top: 0; bottom: 0; width: 50%; will-change: transform;
  background:
    linear-gradient(180deg, rgba(255, 220, 160, .05), transparent 30%, transparent 70%, rgba(0, 0, 0, .35)),
    linear-gradient(90deg, #1b1611 0%, #120f0c 45%, #171310 100%); }
.leaf-l { left: 0; transform-origin: 0 50%; box-shadow: inset -1px 0 0 rgba(0, 0, 0, .6); }
.leaf-r { right: 0; transform-origin: 100% 50%; box-shadow: inset 1px 0 0 rgba(0, 0, 0, .6); }
.panel { position: absolute; left: 17%; right: 15%; border: 1px solid rgba(200, 169, 110, .2);
  box-shadow: inset 0 0 0 5px rgba(0, 0, 0, .18), inset 0 0 0 6px rgba(200, 169, 110, .08), 0 1px 0 rgba(255, 230, 190, .04); }
.leaf-r .panel { left: 15%; right: 17%; }
.p1 { top: 31%; bottom: 43%; } .p2 { top: 61%; bottom: 7%; }
.leaf-l .p1 { border-top-left-radius: 100% 30%; } .leaf-r .p1 { border-top-right-radius: 100% 30%; }
.handle { position: absolute; top: 50%; width: 2px; height: 11%; border-radius: 2px;
  background: linear-gradient(180deg, #8a6c3c, #f2dcab 45%, #7a5d31); box-shadow: 0 0 10px rgba(242, 210, 150, .25); }
.leaf-l .handle { right: 9%; } .leaf-r .handle { left: 9%; }
.seam { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px;
  background: linear-gradient(180deg, transparent 8%, rgba(255, 214, 150, .55) 45%, rgba(255, 236, 200, .9) 80%, rgba(255, 214, 150, .4));
  box-shadow: 0 0 14px 2px rgba(255, 196, 110, .28); animation: seam 4.5s ease-in-out infinite; }
@keyframes seam { 0%, 100% { opacity: .55 } 50% { opacity: 1 } }
.sconce { position: absolute; top: 40%; width: calc(var(--dw) * .7); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 214, 150, .38) 0%, rgba(255, 190, 110, .1) 30%, transparent 66%); animation: flick 5s ease-in-out infinite; }
.sconce::after { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: #fff2d6; box-shadow: 0 0 12px 4px rgba(255, 210, 140, .6); }
.s-l { left: calc(var(--dw) * -.42); } .s-r { left: calc(var(--dw) * 1.42); animation-delay: -2.3s; }
@keyframes flick { 0%, 100% { opacity: .85 } 40% { opacity: 1 } 55% { opacity: .78 } 70% { opacity: .95 } }
.floor { position: absolute; left: 0; right: 0; top: calc(52% + min(76svh, 132vw, 820px) / 2); bottom: 0;
  background: radial-gradient(60% 90% at 50% 0%, rgba(255, 205, 140, .1), transparent 70%), linear-gradient(180deg, rgba(200, 169, 110, .22), rgba(200, 169, 110, 0) 1px); }
.veil { position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 52%, rgba(10, 9, 8, .45), rgba(7, 6, 5, .82)); pointer-events: none; }
.spill { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: radial-gradient(80% 70% at 50% 58%, #fff3da 0%, #e9c58a 35%, #6e4a22 80%, #24180c 100%); }

.front { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--st) + 24px) calc(var(--sr) + 20px) calc(var(--sb) + 24px) calc(var(--sl) + 20px);
  transform: translate3d(calc(var(--px, 0) * 8px), calc(var(--py, 0) * 5px), 0); transition: transform .9s var(--ease-out); }
.crest { width: clamp(38px, 5vh, 52px); height: auto; color: var(--gold); margin-bottom: clamp(18px, 4.2vh, 44px);
  animation: rise 1.4s var(--ease-out) .1s both; }
.wordmark { margin: 0; font-family: var(--serif); font-weight: 700; font-size: var(--wm, 13vw); line-height: .9; letter-spacing: -.012em;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: .04em; font-variation-settings: "opsz" 30;
  filter: drop-shadow(0 .18em .5em rgba(0, 0, 0, .55)); }
.wm-line { display: block; white-space: nowrap; padding: 0 .02em .02em;
  background: linear-gradient(100deg, #e8e0cf 0%, #e8e0cf 38%, #fffaf0 45.5%, #e2c387 50%, #fffaf0 54.5%, #e8e0cf 62%, #e8e0cf 100%);
  background-size: 300% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  animation: rise 1.6s var(--ease-out) .25s both, sweep 8s var(--ease-io) 1.8s infinite; }
.wm-b { animation-delay: .4s, 2.05s; }
.wm-line em { font-style: normal; font-weight: 400;
  background: linear-gradient(100deg, #b7955a, #ecd8a8 50%, #b7955a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.one-line .wordmark { flex-direction: row; gap: 0; }
@keyframes sweep { 0% { background-position: 100% 0 } 38%, 100% { background-position: 0% 0 } }
@keyframes rise { from { opacity: 0; transform: translateY(.35em); filter: blur(8px) } to { opacity: 1; transform: none; filter: blur(0) } }
.enter { position: relative; margin-top: clamp(30px, 6.5vh, 72px); width: 196px; height: 58px; border-radius: 999px; overflow: hidden;
  border: 1px solid rgba(200, 169, 110, .6); color: var(--gold-2); background: rgba(10, 9, 8, .38);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-family: var(--sans); font-weight: 500; font-size: 12.5px; letter-spacing: .48em; text-indent: .48em;
  transition: color .45s var(--ease), background-color .45s var(--ease), border-color .45s var(--ease), transform .45s var(--ease);
  animation: rise 1.4s var(--ease-out) .7s both; }
.enter-ring { position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 238, 200, .28) 50%, transparent 70%); background-size: 260% 100%; animation: sheen 3.8s var(--ease-io) 2.2s infinite; }
@keyframes sheen { 0% { background-position: 130% 0 } 45%, 100% { background-position: -30% 0 } }
.enter-label { position: relative; }
.enter:hover, .enter:focus-visible { background: var(--gold-2); color: #0a0908; border-color: var(--gold-2); }
.enter:active { transform: scale(.97); }
.enter-hint { margin: 16px 0 0; display: flex; align-items: center; gap: 7px; font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-3);
  animation: rise 1.4s var(--ease-out) .9s both; }
.enter-hint svg { width: 14px; height: 14px; }

/* the arrival (2.8 s). Classes set by main.js */
.opening .front { opacity: 0; transform: translateY(-2%) scale(.96); filter: blur(6px); transition: opacity .7s var(--ease), transform .9s var(--ease), filter .7s var(--ease); }
.opening .veil { opacity: 0; transition: opacity .9s var(--ease) .1s; }
.opening .seam { animation: none; opacity: 1; box-shadow: 0 0 30px 6px rgba(255, 204, 130, .55); transition: box-shadow .5s; }
.opening .leaf-l { animation: leafL 1.55s cubic-bezier(.65, 0, .25, 1) .45s both; }
.opening .leaf-r { animation: leafR 1.55s cubic-bezier(.65, 0, .25, 1) .45s both; }
.opening .beyond { animation: on 1.1s var(--ease) .5s both; }
.opening .world { animation: push 1.9s cubic-bezier(.7, 0, .2, 1) .95s both; }
.opening .spill { animation: spill 1.25s var(--ease) 1.75s both; }
.opening .crest, .opening .wm-line, .opening .enter, .opening .enter-hint { animation-play-state: paused; }
@keyframes leafL { to { transform: rotateY(-96deg); filter: brightness(.55) } }
@keyframes leafR { to { transform: rotateY(96deg); filter: brightness(.55) } }
@keyframes on { from { opacity: 0 } to { opacity: 1 } }
@keyframes push { from { transform: scale(1) } to { transform: scale(5.2) translateY(-1.5%) } }
@keyframes spill { 0% { opacity: 0 } 55% { opacity: .92 } 100% { opacity: .0 } }
.entered .entrance { opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), visibility 0s .8s; pointer-events: none; }
.reduce.opening .front, .reduce.opening .world, .reduce.opening .leaf, .reduce.opening .beyond, .reduce.opening .spill { animation: none; transition: none; }
.reduce .entrance { transition: opacity .6s linear, visibility 0s .6s; }

/* ================= chrome ================= */
.chrome { position: fixed; z-index: 40; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
  padding: calc(var(--st) + 12px) calc(var(--sr) + clamp(14px, 3vw, 40px)) 0 calc(var(--sl) + clamp(20px, 5vw, 56px));
  opacity: 0; visibility: hidden; transition: opacity 1s var(--ease) .3s, visibility 0s 1.3s; pointer-events: none; }
.entered .chrome { opacity: 1; visibility: visible; transition: opacity 1s var(--ease) .5s, visibility 0s; }
.chrome > * { pointer-events: auto; }
.count { margin: 0; display: flex; align-items: center; gap: 12px; font-size: 11.5px; letter-spacing: .22em; color: var(--ink-2); font-variant-numeric: tabular-nums; transition: opacity .6s; }
.count span:first-child { color: var(--ink); }
.count-rule { position: relative; width: clamp(44px, 9vw, 96px); height: 1px; background: var(--hair); overflow: hidden; }
.count-rule b { position: absolute; inset: 0; background: var(--gold); transform-origin: 0 50%; transform: scaleX(var(--p, .2)); transition: transform .9s var(--ease-out); }
.chrome-r { display: flex; align-items: center; gap: 2px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); position: relative; transition: color .3s, background-color .3s; }
.icon-btn:hover { color: var(--ink); background: rgba(239, 233, 221, .06); }
.icon-btn svg { width: 21px; height: 21px; }
.chip { height: 32px; margin-right: 6px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--hair); color: var(--ink-2); font-size: 13px; line-height: 1; transition: border-color .3s, color .3s; }
.chip:hover { border-color: var(--line); color: var(--ink); }
.lang .lang-hi { font-family: var(--deva); font-weight: 500; font-size: 14px; }
.lang .lang-en { display: none; font-size: 11px; letter-spacing: .2em; }
.lang[aria-pressed="true"] .lang-hi { display: none; } .lang[aria-pressed="true"] .lang-en { display: inline; }
/* sound toggle: waves = enabled, bars = playing now, x = muted */
.sound .x { display: none; } .sound .eq { display: none; }
.sound[aria-pressed="false"] .waves { display: none; } .sound[aria-pressed="false"] .x { display: inline; } .sound[aria-pressed="false"] { color: var(--ink-3); }
.playing .sound[aria-pressed="true"] .waves { display: none; }
.playing .sound[aria-pressed="true"] .eq { display: flex; }
.eq { position: absolute; left: 26px; top: 15px; height: 13px; width: 12px; gap: 2px; align-items: flex-end; }
.eq i { flex: 1; background: var(--gold-2); border-radius: 1px; height: 40%; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.35s; } .eq i:nth-child(3) { animation-delay: -.7s; }
@keyframes eq { 0%, 100% { height: 25% } 50% { height: 100% } }
.playing .sound svg { transform: translateX(-4px); }
.is-final .count, .is-final .lang { opacity: 0; visibility: hidden; transition: opacity .6s, visibility 0s .6s; }

/* ================= 2 · QUIZ ================= */
.gate { position: fixed; inset: 0; z-index: 10; overflow: hidden;
  background: radial-gradient(110% 60% at 50% -12%, rgba(234, 200, 140, .14), transparent 62%), radial-gradient(80% 50% at 50% 115%, rgba(200, 169, 110, .06), transparent 70%), var(--bg); }
.gate-inner { height: 100%; max-width: 1180px; margin: 0 auto; display: grid; grid-template-rows: auto 1fr auto; align-items: center;
  padding: calc(var(--st) + 84px) calc(var(--sr) + clamp(24px, 7vw, 96px)) calc(var(--sb) + clamp(24px, 6.5vh, 72px)) calc(var(--sl) + clamp(24px, 7vw, 96px)); }
.q-kicker { margin: 0; display: flex; align-items: center; gap: 14px; font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--gold); }
.q-kicker::before { content: ""; width: 28px; height: 1px; background: var(--gold); opacity: .7; }
.q-wrap { align-self: center; padding: 3vh 0; }
.question { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(2.3rem, 10.6vw, 6rem); line-height: 1.05; letter-spacing: -.02em;
  max-width: 13ch; text-wrap: balance; color: var(--ink); font-variation-settings: "opsz" 12; outline: none; }
.question[data-len="l"] { font-size: clamp(2.05rem, 8.9vw, 5.2rem); max-width: 15ch; }
.question:lang(hi) { font-family: var(--deva); font-weight: 700; font-size: clamp(2rem, 8.6vw, 4.8rem); line-height: 1.32; letter-spacing: 0; max-width: 16ch; }
.question.out { opacity: 0; transform: translateY(-16px); filter: blur(8px); transition: opacity .38s var(--ease), transform .45s var(--ease), filter .38s; }
.question.in { animation: qin .85s var(--ease-out) both; }
@keyframes qin { from { opacity: 0; transform: translateY(22px); filter: blur(10px) } to { opacity: 1; transform: none; filter: blur(0) } }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 560px; }
.ans { position: relative; height: clamp(58px, 8.2vh, 72px); border: 1px solid rgba(239, 233, 221, .24); border-radius: 2px; overflow: hidden;
  font-size: 12.5px; font-weight: 500; letter-spacing: .4em; text-indent: .4em; text-transform: uppercase; color: var(--ink);
  transition: border-color .35s var(--ease), color .35s var(--ease), transform .25s var(--ease); }
.ans::before { content: ""; position: absolute; inset: 0; background: var(--gold-2); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .45s var(--ease-out); }
.ans span { position: relative; }
.ans:hover { border-color: var(--gold); color: var(--gold-2); }
.ans:active { transform: scale(.985); }
.ans.ok { color: #0a0908; border-color: var(--gold-2); } .ans.ok::before { transform: scaleY(1); }
.ans.bad { animation: shake .42s var(--ease); border-color: rgba(220, 120, 90, .6); }
@keyframes shake { 20% { transform: translateX(-6px) } 45% { transform: translateX(5px) } 70% { transform: translateX(-3px) } }
.ans:disabled { cursor: default; }
.gate.leaving { opacity: 0; transform: scale(1.04); filter: blur(10px); transition: opacity 1.1s var(--ease), transform 1.4s var(--ease), filter 1.1s; }
.gate.arrive .q-kicker, .gate.arrive .answers { animation: rise 1.1s var(--ease-out) .2s both; }
.gate.arrive .answers { animation-delay: .45s; }
@media (min-width: 900px) { .answers { max-width: 520px; } }
@media (max-height: 520px) and (orientation: landscape) {
  .gate-inner { padding-top: calc(var(--st) + 60px); padding-bottom: calc(var(--sb) + 14px); grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; column-gap: 36px; }
  .q-kicker { grid-column: 1 / -1; }
  .question, .question[data-len="l"], .question:lang(hi) { font-size: min(clamp(1.5rem, 4.8vw, 3.2rem), 11vh); max-width: 20ch; }
  .answers { grid-template-columns: 1fr; width: 200px; align-self: center; }
  .ans { height: 54px; }
}

/* wrong answer: the original green strongman (kept from v4) */
.nope { position: fixed; inset: 0; z-index: 50; overflow: hidden; cursor: pointer; }
.nope-flash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 70%, rgba(184, 255, 60, .32), transparent 60%), radial-gradient(rgba(10, 30, 6, .55) 1.5px, transparent 1.8px) 0 0 / 10px 10px, rgba(4, 12, 3, .8); }
.nope-fig { position: absolute; left: 50%; bottom: 0; width: min(96vw, 76vh, 620px); transform: translateY(105%); margin-left: calc(min(96vw, 76vh, 620px) / -2); }
.nope-svg { display: block; width: 100%; height: auto; overflow: visible; }
.n-burst { transform-box: fill-box; transform-origin: center; }
.n-arm { transform-box: view-box; transform-origin: 352px 470px; }
.n-finger { transform-box: view-box; transform-origin: 309px 200px; }
.n-hand { transform-box: view-box; transform-origin: 318px 222px; }
.n-head { transform-box: view-box; transform-origin: 200px 282px; }
.n-mouth { transform-box: view-box; transform-origin: 200px 222px; }

/* ================= 3 · FINAL SCENE ================= */
.final { position: fixed; inset: 0; z-index: 20; opacity: 0; transition: opacity 1.8s var(--ease); background: #08080a; }
.final.on { opacity: 1; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.fallback { display: none; position: absolute; inset: 0; place-items: center; perspective: 900px;
  background: radial-gradient(60% 50% at 50% 45%, #2a2118, #0a0908 70%); }
.no-webgl .fallback { display: grid; } .no-webgl #scene { display: none; }
.fb-cube { position: relative; width: 120px; height: 120px; transform-style: preserve-3d; animation: fbspin 18s linear infinite; }
.fb-cube i { position: absolute; inset: 0; border: 1px solid rgba(234, 214, 166, .45); background: linear-gradient(135deg, rgba(234, 214, 166, .12), rgba(10, 9, 8, .6)); }
.fb-cube i:nth-child(1) { transform: translateZ(60px) } .fb-cube i:nth-child(2) { transform: rotateY(180deg) translateZ(60px) } .fb-cube i:nth-child(3) { transform: rotateY(90deg) translateZ(60px) }
.fb-cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(60px) } .fb-cube i:nth-child(5) { transform: rotateX(90deg) translateZ(60px) } .fb-cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(60px) }
@keyframes fbspin { to { transform: rotateX(360deg) rotateY(720deg) } }
.reduce .fb-cube { animation-duration: 120s; }

.dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 0 calc(var(--sr) + 16px) calc(var(--sb) + clamp(18px, 4.2vh, 44px)) calc(var(--sl) + 16px); pointer-events: none; }
.dock > * { pointer-events: auto; }
.social { display: flex; align-items: center; gap: clamp(2px, 1vw, 10px); opacity: 0; transform: translateY(8px); transition: opacity 1.6s var(--ease) .5s, transform 1.6s var(--ease) .5s; }
.soc { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: rgba(239, 233, 221, .58); transition: color .3s, transform .35s var(--ease), background-color .3s; }
.soc svg { width: 18px; height: 18px; }
.soc:hover, .soc:focus-visible { color: var(--gold-2); transform: translateY(-2px); background: rgba(239, 233, 221, .05); }
.study { min-height: 50px; padding: 0 30px; border-radius: 999px; border: 1px solid rgba(239, 233, 221, .26);
  background: rgba(10, 9, 8, .32); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-family: var(--serif); font-weight: 500; font-size: 17px; letter-spacing: .01em; color: var(--ink); font-variation-settings: "opsz" 11;
  opacity: 0; transform: translateY(8px); transition: opacity 1.6s var(--ease) .2s, transform 1.6s var(--ease) .2s, border-color .35s, background-color .35s, color .35s; }
.study:hover, .study:focus-visible { border-color: var(--gold); color: var(--gold-2); }
.study[aria-pressed="true"] { border-color: rgba(234, 214, 166, .5); color: var(--gold-2); }
.study[aria-pressed="true"] .study-label::before { content: "✓  "; }
.ui-ready .social, .ui-ready .study { opacity: 1; transform: none; }
.study-done { margin: -4px 0 0; height: 14px; font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); opacity: 0; transition: opacity .8s var(--ease); pointer-events: none; }
.studying .study-done { opacity: .9; }
.studying #scene { filter: saturate(.6) brightness(.82); transition: filter 2.4s var(--ease); }
.spotify-slot { width: min(380px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; align-items: center; opacity: 0; transition: opacity 1.2s var(--ease); }
.spotify-slot.on { opacity: 1; }
.sp-hint { margin: 0; font-size: 10.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-2); animation: pulse 2.4s ease-in-out infinite; }
.sp-hint b { font-weight: 500; }
@keyframes pulse { 0%, 100% { opacity: .55 } 50% { opacity: 1 } }
.sp-frame { width: 100%; height: 80px; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px rgba(234, 214, 166, .35), 0 16px 40px rgba(0, 0, 0, .5); }
.sp-frame iframe { display: block; width: 100%; height: 80px; border: 0; }
.sp-playing .sp-hint { display: none; }
@media (max-height: 520px) and (orientation: landscape) {
  .dock { flex-direction: row; justify-content: center; gap: 18px; padding-bottom: calc(var(--sb) + 12px); }
  .study-done { position: absolute; bottom: 4px; }
}

/* info dialog */
.info { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 40px 32px 24px; border: 1px solid var(--line); border-radius: 4px;
  background: linear-gradient(180deg, #15120f, #0c0a09); color: var(--ink); box-shadow: 0 40px 120px rgba(0, 0, 0, .7); }
.info::backdrop { background: rgba(5, 4, 3, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.info[open] { animation: rise .6s var(--ease-out) both; }
.info-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink-2); }
.info-close svg { width: 20px; height: 20px; }
.info-mark { margin: 0 0 22px; font-family: var(--serif); font-weight: 700; font-size: 24px; letter-spacing: -.01em; font-variation-settings: "opsz" 14; }
.info-mark em { font-style: normal; font-weight: 400; color: var(--gold); }
.info-links { list-style: none; margin: 0; padding: 0; }
.info-links li + li { border-top: 1px solid var(--hair); }
.info-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; text-decoration: none; font-size: 15px; color: var(--ink); transition: color .3s; }
.info-links a:hover, .info-links a:focus-visible { color: var(--gold-2); }
.info-links a span:last-child { color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.info-links svg { width: 17px; height: 17px; flex: none; margin-right: 12px; vertical-align: -3px; color: var(--gold); }

.noscript { position: fixed; inset: 0; z-index: 100; overflow: auto; padding: 40px 24px; background: var(--bg); font-size: 16px; line-height: 1.6; }
.ns-mark { font-family: var(--serif); font-weight: 700; font-size: clamp(28px, 8vw, 64px); margin: 0 0 24px; }

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .wm-line, .crest, .enter, .enter-hint { animation: none !important; }
  .enter-ring, .seam, .sconce, .sp-hint, .eq i { animation: none !important; }
  .world, .front { transition: none; transform: none; }
}

/* ---------- v6 owner playlist: a quiet "♪ Playlist" pill → a small glass player + song sheet ---------- */
.pl-slot { width: min(400px, 100%); display: flex; justify-content: center; opacity: 0; transform: translateY(8px); transition: opacity 1.4s var(--ease) .3s, transform 1.4s var(--ease) .3s; }
.pl-slot.on { opacity: 1; transform: none; }
.pl { width: 100%; display: flex; justify-content: center; }
.pl[data-state="pill"] .pl-card { display: none; }
.pl:not([data-state="pill"]) .pl-pill { display: none; }
.pl-pill { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; padding: 0 8px 0 18px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(10, 9, 8, .38); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--gold-2);
  font-size: 11px; letter-spacing: .28em; text-transform: uppercase; transition: border-color .3s, background-color .3s; }
.pl-pill:hover, .pl-pill:focus-visible { border-color: var(--gold); background: rgba(20, 17, 13, .5); }
.pl-note { font-size: 14px; letter-spacing: 0; color: var(--gold); }
.pl-pt { margin-right: -.28em; }
.pl-n { min-width: 26px; height: 26px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: rgba(200, 169, 110, .16); color: var(--gold-2); font-size: 11px; letter-spacing: .04em; margin-left: 4px; }
.pl-eq { display: none; }
.pl-card { position: relative; z-index: 2; width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px; border-radius: 18px;
  border: 1px solid rgba(239, 233, 221, .14); background: rgba(14, 12, 10, .62); -webkit-backdrop-filter: blur(18px) saturate(1.15); backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(239, 233, 221, .05); text-align: left; animation: plIn .5s var(--ease-out); }
@keyframes plIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.pl-media { flex: 0 0 112px; border-radius: 10px; overflow: hidden; background: #000; }
.pl-media[data-type="none"] { display: none; }
.pl-yt { aspect-ratio: 16 / 9; width: 100%; }
.pl-yt iframe, .pl-yt > div { display: block; width: 100% !important; height: 100% !important; border: 0; }
.pl-media[data-type="spotify"] { flex-basis: 100%; background: transparent; }
.pl-media[data-type="spotify"] .pl-yt, .pl-media[data-type="youtube"] .pl-sp { display: none; }
.pl-sp iframe { display: block; width: 100%; height: 80px; border: 0; border-radius: 12px; }
.pl-bar { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 4px; }
.pl-now { flex: 1 1 auto; min-width: 0; padding-left: 4px; }
.pl-k { display: block; font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-title { display: block; margin-top: 3px; font-size: 13.5px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-ctl { display: flex; flex: none; }
.pl-b { width: 40px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--ink-2); transition: color .25s, background-color .25s; }
.pl-b:hover, .pl-b:focus-visible { color: var(--ink); background: rgba(239, 233, 221, .07); }
.pl-b svg { width: 19px; height: 19px; }
.pl-play { color: var(--gold-2); }
.needs-tap .pl-play { color: #14100a; background: linear-gradient(180deg, #ead6a6, #c8a96e); border-radius: 999px; width: 44px; animation: plPulse 2s ease-in-out infinite; }
@keyframes plPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(234, 214, 166, .45); } 50% { box-shadow: 0 0 0 8px rgba(234, 214, 166, 0); } }
.pl-hint { flex-basis: 100%; margin: -2px 0 2px; text-align: center; font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-2); }
.pl-sheet { display: none; flex-basis: 100%; min-height: 0; }
.pl-sh { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 4px 6px; border-top: 1px solid var(--hair); margin-top: 2px;
  font-size: 10.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-2); }
.pl-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; max-height: 100%; }
.pl-item { width: 100%; min-height: 52px; display: grid; grid-template-columns: 30px minmax(0, 1fr) 32px; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 12px; text-align: left; transition: background-color .25s; }
.pl-item:hover, .pl-item:focus-visible { background: rgba(239, 233, 221, .06); }
.pl-i { font-family: var(--serif); font-size: 14px; color: var(--ink-3); text-align: center; }
.pl-it { min-width: 0; }
.pl-it b { display: block; font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-it small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-ic { display: grid; place-items: center; color: var(--ink-3); }
.pl-ic svg { width: 15px; height: 15px; }
.pl-item.cur .pl-i, .pl-item.cur .pl-ic, .pl-item.cur b { color: var(--gold-2); }
.pl-item.broken { opacity: .45; }
/* open: the song sheet */
.pl[data-state="open"]::before { content: ""; position: fixed; inset: 0; z-index: 1; background: rgba(5, 4, 3, .42); animation: plFade .4s var(--ease); }
@keyframes plFade { from { opacity: 0; } }
.pl[data-state="open"] .pl-card { position: fixed; left: 50%; bottom: calc(var(--sb) + 12px); transform: translateX(-50%); width: min(460px, calc(100vw - 24px - var(--sl) - var(--sr)));
  max-height: calc(100dvh - var(--st) - var(--sb) - 84px); flex-wrap: nowrap; flex-direction: column; align-items: stretch; animation: plUp .45s var(--ease-out); background: rgba(14, 12, 10, .8); }
@keyframes plUp { from { opacity: 0; transform: translate(-50%, 16px); } }
.pl[data-state="open"] .pl-media { flex: none; }
.pl[data-state="open"] .pl-media[data-type="youtube"] .pl-yt { min-height: 180px; }
.pl[data-state="open"] .pl-bar { flex: none; }
.pl[data-state="open"] .pl-sheet { display: flex; flex-direction: column; flex: 1 1 auto; }
@media (max-width: 359px) { .pl-media { flex-basis: 84px; } .pl-b { width: 36px; } .pl:not([data-state="open"]) .pl-next { display: none; } }
/* desktop: the player lives bottom-left, out of the room's way */
@media (min-width: 900px) and (min-height: 521px) {
  .pl-slot { position: fixed; left: calc(var(--sl) + 28px); bottom: calc(var(--sb) + 28px); width: 360px; justify-content: flex-start; }
  .pl { justify-content: flex-start; }
  .pl[data-state="open"]::before { display: none; }
  .pl[data-state="open"] .pl-card { position: relative; left: auto; bottom: auto; transform: none; width: 100%; max-height: calc(100dvh - 140px); animation: plIn .45s var(--ease-out); }
  .pl[data-state="open"] .pl-list { max-height: 44vh; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .pl-slot { position: fixed; top: calc(var(--st) + 58px); left: calc(var(--sl) + 16px); width: 320px; justify-content: flex-start; }
  .pl { justify-content: flex-start; }
  .pl[data-state="open"] .pl-card { max-height: calc(100dvh - 24px); bottom: auto; top: 12px; left: calc(var(--sl) + 16px); transform: none; width: 340px; animation: plIn .45s var(--ease-out); }
  .pl[data-state="open"] .pl-media[data-type="youtube"] .pl-yt { min-height: 0; }
}
.reduce .pl-card, .reduce .pl[data-state="open"] .pl-card, .reduce .needs-tap .pl-play { animation: none; }
