:root {
  --bg: #06060b;
  --ink: #f4ecd8;
  --dim: rgba(244, 236, 216, .62);
  --gold: #f5c26b;
  --gold-text: #f5c26b;
  --focus: #f5c26b;
  --line: rgba(244, 236, 216, .16);
  --hud-grad: rgba(0, 0, 0, .67);
  --chip-bg: rgba(0, 0, 0, .53);
  --chip-bg-hover: rgba(0, 0, 0, .8);
  --hint-bg: rgba(0, 0, 0, .73);
  --scrim: rgba(0, 0, 0, .73);
  --panel: #11111a;
  --field: #0a0a10;
  --panel-shadow: 0 30px 80px #000;
  --store-base: #05050a;
  --a-mix: 100%;
  --h2-shadow: 0 0 40px color-mix(in srgb, var(--a) 60%, transparent);
  --intro-shadow: 0 2px 30px #000;
  --err: #ff8a8a;
  --ok: #8de6b0;
  --logo-glow: rgba(240, 120, 50, .85);
  --logo-glow-soft: rgba(214, 74, 8, .55);
  /* Dark halo beneath the warm bloom: seats the mark against the HUD instead
     of letting it float. Held steady while the warm glow pulses. */
  --logo-dark: rgba(0, 0, 0, .8);
  --logo-dark-soft: rgba(0, 0, 0, .5);
  color-scheme: dark;
  --display: 'Cinzel', Georgia, serif;
  --body: 'Inter', system-ui, sans-serif;
}
:root[data-theme="light"] {
  --bg: #f6f2e9;
  --ink: #1d1a14;
  --dim: rgba(29, 26, 20, .72);
  --gold: #c98a12;
  --gold-text: #7a4f00;
  --focus: #7a4f00;
  --line: rgba(29, 26, 20, .18);
  --hud-grad: rgba(246, 242, 233, .88);
  --chip-bg: rgba(255, 253, 248, .78);
  --chip-bg-hover: rgba(255, 253, 248, .95);
  --hint-bg: rgba(255, 253, 248, .92);
  --scrim: rgba(246, 242, 233, .8);
  --panel: #fffdf8;
  --field: #ffffff;
  --panel-shadow: 0 30px 80px rgba(60, 40, 10, .25);
  --store-base: #f6f2e9;
  --a-mix: 55%;
  --h2-shadow: none;
  --intro-shadow: 0 2px 24px rgba(255, 253, 248, .9);
  --err: #b3261e;
  --ok: #11693a;
  /* On a pale background a bright halo reads as a mistake, so the mark casts a
     dark glow instead. Matches lobbyTexture()'s light-mode treatment in art.js. */
  --logo-glow: rgba(28, 16, 6, .42);
  --logo-glow-soft: rgba(40, 22, 8, .26);
  --logo-dark: rgba(58, 20, 0, .38);
  --logo-dark-soft: rgba(58, 20, 0, .2);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f2e9;
    --ink: #1d1a14;
    --dim: rgba(29, 26, 20, .72);
    --gold: #c98a12;
    --gold-text: #7a4f00;
    --focus: #7a4f00;
    --line: rgba(29, 26, 20, .18);
    --hud-grad: rgba(246, 242, 233, .88);
    --chip-bg: rgba(255, 253, 248, .78);
    --chip-bg-hover: rgba(255, 253, 248, .95);
    --hint-bg: rgba(255, 253, 248, .92);
    --scrim: rgba(246, 242, 233, .8);
    --panel: #fffdf8;
    --field: #ffffff;
    --panel-shadow: 0 30px 80px rgba(60, 40, 10, .25);
    --store-base: #f6f2e9;
    --a-mix: 55%;
    --h2-shadow: none;
    --intro-shadow: 0 2px 24px rgba(255, 253, 248, .9);
    --err: #b3261e;
    --ok: #11693a;
    --logo-glow: rgba(28, 16, 6, .42);
    --logo-glow-soft: rgba(40, 22, 8, .26);
    --logo-dark: rgba(58, 20, 0, .38);
    --logo-dark-soft: rgba(58, 20, 0, .2);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html { background: var(--bg); }
html.locked, html.locked body { overflow: hidden; }
body { margin: 0; color: var(--ink); font-family: var(--body); background: var(--bg); -webkit-font-smoothing: antialiased; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
#spacer { height: 650vh; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* HUD */
.hud { position: fixed; inset: 0 0 auto 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 14px 20px; pointer-events: none; background: linear-gradient(var(--hud-grad), transparent); }
.hud > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 700; letter-spacing: .08em; white-space: nowrap; }
/* Brand mark glow: stacked drop-shadows bloom around the emblem's alpha, not a box.
   The pulse is switched off by the reduced-motion rule at the end of this file. */
.brand img {
  width: 34px; height: 34px; object-fit: contain;
  filter: drop-shadow(0 0 2px var(--logo-dark)) drop-shadow(0 2px 7px var(--logo-dark-soft))
          drop-shadow(0 0 3px var(--logo-glow)) drop-shadow(0 0 9px var(--logo-glow-soft));
  animation: logo-pulse 3.6s ease-in-out infinite;
}
@keyframes logo-pulse {
  0%, 100% { filter: drop-shadow(0 0 2px var(--logo-dark)) drop-shadow(0 2px 7px var(--logo-dark-soft))
                     drop-shadow(0 0 3px var(--logo-glow)) drop-shadow(0 0 9px var(--logo-glow-soft)); }
  50%      { filter: drop-shadow(0 0 2px var(--logo-dark)) drop-shadow(0 2px 7px var(--logo-dark-soft))
                     drop-shadow(0 0 6px var(--logo-glow)) drop-shadow(0 0 18px var(--logo-glow-soft)); }
}
.brand .dim { color: var(--dim); }
.brand:focus-visible { border-radius: 8px; }
#dirs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
#dirs button { background: var(--chip-bg); color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: .78rem; backdrop-filter: blur(6px); transition: .2s; }
#dirs button b { color: color-mix(in srgb, var(--a) var(--a-mix), var(--ink)); margin-right: 6px; font-weight: 600; }
#dirs button small { margin-left: 7px; color: var(--dim); font-size: .7rem; font-variant-numeric: tabular-nums; }
.finder { margin-left: auto; margin-right: 10px; }
.finder input { width: 190px; max-width: 100%; background: var(--chip-bg); color: var(--ink); border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; font: inherit; font-size: .8rem; backdrop-filter: blur(6px); transition: border-color .2s, width .2s; }
.finder input::placeholder { color: var(--dim); }
.finder input:focus { border-color: var(--gold); width: 240px; }
.finder input[aria-invalid=true] { border-color: var(--err); }
.in-store .finder { opacity: 0; pointer-events: none; }
.no-gl .finder { display: none; }
#dirs button:hover, #dirs button.on { border-color: var(--a); background: var(--chip-bg-hover); }
.in-store #dirs { opacity: 0; pointer-events: none; }

/* intro / hint / progress / loading */
#intro { position: fixed; z-index: 3; left: 0; right: 0; bottom: 7vh; text-align: center; padding: 0 20px; pointer-events: none; text-shadow: var(--intro-shadow); }
#intro h1 { font: 700 clamp(2rem, 6vw, 4.2rem)/1.05 var(--display); margin: .2em 0; letter-spacing: .03em; }
#intro .sub { color: var(--dim); max-width: 34rem; margin: 0 auto; }
.eyebrow { font: 600 .72rem var(--body); letter-spacing: .24em; text-transform: uppercase; color: var(--gold-text); margin: 0; }
.scroll-cue { margin: 26px auto 0; width: 22px; height: 36px; border: 2px solid var(--dim); border-radius: 14px; position: relative; }
.scroll-cue span { position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; background: var(--ink); border-radius: 2px; animation: cue 1.6s infinite; }
@keyframes cue { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }
#hint { position: fixed; z-index: 4; left: 50%; bottom: 8vh; transform: translate(-50%, 10px); padding: 10px 20px; background: var(--hint-bg); border: 1px solid var(--gold); color: var(--gold-text); border-radius: 99px; letter-spacing: .08em; font-size: .85rem; opacity: 0; transition: .25s; pointer-events: none; }
#hint.on { opacity: 1; transform: translate(-50%, 0); }
@media (pointer:coarse) { #hint.on { pointer-events: auto; cursor: pointer; padding: 14px 24px; font-size: .95rem; } }
#progress { position: fixed; z-index: 4; right: 10px; top: 88px; bottom: 24px; width: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
#progress i { display: block; height: 100%; background: var(--gold); transform-origin: top; transform: scaleY(0); }
.in-store #progress, .in-store #intro { opacity: 0 !important; }
#loading { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: var(--bg); font: 500 1rem var(--display); letter-spacing: .2em; color: var(--gold-text); transition: opacity .7s; }
#loading.gone { opacity: 0; pointer-events: none; }

/* no-WebGL fallback: directory only */
.no-gl #spacer, .no-gl #progress { display: none; }
.no-gl #intro { position: static; padding-top: 120px; }
.no-gl #dirs { position: fixed; z-index: 6; left: 20px; right: 20px; top: auto; bottom: 20px; justify-content: center; }

/* store overlay */
#store { position: fixed; inset: 0; z-index: 10; overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s; background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--a, #333) 22%, var(--store-base)), var(--store-base) 70%); }
#store.open { opacity: 1; visibility: visible; }
.store-inner { --a: #888; --b: #444; --a-text: color-mix(in srgb, var(--a) var(--a-mix), var(--ink)); position: relative; min-height: 100%; padding: 90px 6vw 80px; max-width: 1100px; margin: 0 auto; isolation: isolate; }
.store-inner .back { position: fixed; z-index: 12; top: 16px; left: 18px; background: var(--chip-bg-hover); border: 1px solid var(--a); color: var(--ink); padding: 9px 16px; border-radius: 99px; backdrop-filter: blur(8px); transition: .2s; }
.store-inner .back:hover { background: var(--a); color: #000; }
.store-inner .hero { padding: 6vh 0 4vh; }
.store-inner .eyebrow { color: var(--a-text); }
.store-inner h2 { font: 700 clamp(2.6rem, 9vw, 6.5rem)/1 var(--display); margin: .15em 0 .1em; color: var(--ink); text-shadow: var(--h2-shadow); overflow-wrap: anywhere; }
.store-inner .tag { font-size: clamp(1.1rem, 2.4vw, 1.6rem); color: color-mix(in srgb, var(--b) var(--a-mix), var(--ink)); margin: 0 0 1.6em; }
.cta { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.btn { background: var(--a, var(--gold)); color: #0a0a0f; border: 0; padding: 14px 28px; border-radius: 99px; font-weight: 600; letter-spacing: .04em; transition: transform .2s, box-shadow .2s; box-shadow: 0 8px 30px color-mix(in srgb, var(--a, var(--gold)) 40%, transparent); }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
a.btn { display: inline-block; text-decoration: none; text-align: center; line-height: 1.2; }
.btn.ghost { background: transparent; color: var(--a-text, var(--ink)); border: 1.5px solid var(--a, var(--gold)); box-shadow: none; padding: 12.5px 26px; }
.btn.ghost:hover { background: color-mix(in srgb, var(--a, var(--gold)) 16%, transparent); color: var(--ink); }
.btn.ghost:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
@media (max-width: 560px) { .cta .btn { flex: 1 1 100%; } }
.btn:disabled { opacity: .5; cursor: default; }
.pill { padding: 10px 18px; border: 1px dashed var(--dim); border-radius: 99px; color: var(--dim); }
.price { color: var(--dim); font-size: .92rem; }
.store-inner .body { max-width: 46rem; border-top: 1px solid var(--line); padding-top: 2rem; }
.store-inner h3 { font: 600 .74rem var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--a-text); margin: 2em 0 .8em; }
.store-inner .body > h3:first-child { margin-top: 0; }
.store-inner p { line-height: 1.7; color: var(--dim); font-size: 1.05rem; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { border: 1px solid color-mix(in srgb, var(--a) 50%, transparent); border-radius: 99px; padding: 7px 14px; font-size: .9rem; color: var(--ink); }
.signals { margin: 0; padding-left: 1.1em; color: var(--dim); line-height: 1.65; }
.signals li { margin-bottom: .8em; }
.signals a { color: var(--a-text); white-space: nowrap; }

/* per-store atmosphere (behind content) */
.fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
/* Baseline glow for the category stores (they have no bespoke effect): a soft wash of the store's own accent. */
.store-inner .fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 70% 45% at 50% 0%, color-mix(in srgb, var(--a) 20%, transparent), transparent 70%); }
[data-theme=swami] .fx::before { content: ''; position: absolute; left: 50%; top: 18%; width: 70vmin; height: 70vmin; transform: translateX(-50%); border-radius: 50%; background: conic-gradient(from 0deg, transparent, color-mix(in srgb, var(--b) 40%, transparent), transparent 30%, color-mix(in srgb, var(--a) 40%, transparent), transparent 60%); filter: blur(30px); animation: spin 18s linear infinite; }
[data-theme=swami] .fx::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(transparent 0 5px, #0004 5px 6px); }
[data-theme=bollywood] .fx::before { content: ''; position: absolute; inset: 12px; border: 10px dotted var(--a); border-radius: 18px; filter: drop-shadow(0 0 8px var(--a)); animation: bulbs 1.1s steps(2) infinite; opacity: .8; }
[data-theme=bollywood] .fx::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--b) 35%, transparent), transparent 55%); }
[data-theme=bollywood] h2 { font-family: 'Bebas Neue', Impact, sans-serif; letter-spacing: .04em; }
[data-theme=temple] .fx::before { content: ''; position: absolute; left: 50%; bottom: -20%; width: 120vmin; height: 80vmin; transform: translateX(-50%); background: radial-gradient(ellipse at center, color-mix(in srgb, var(--a) 45%, transparent), transparent 65%); animation: flicker 3.2s ease-in-out infinite; }
[data-theme=temple] .fx::after { content: 'ॐ'; position: absolute; right: 6vw; top: 12vh; font-size: 40vmin; color: color-mix(in srgb, var(--b) 9%, transparent); line-height: 1; }
[data-theme=portfolio] { font-family: 'JetBrains Mono', monospace; }
[data-theme=portfolio] h2 { font-family: 'JetBrains Mono', monospace; font-weight: 500; }
[data-theme=portfolio] .fx { background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 40px; mask-image: radial-gradient(circle at 50% 20%, #000, transparent 75%); }
[data-theme=soon] .fx { border: 2px dashed var(--line); margin: 70px 4vw 30px; }
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }
@keyframes bulbs { 50% { opacity: .35; } }
@keyframes flicker { 0%, 100% { opacity: .8; } 40% { opacity: 1; } 60% { opacity: .65; } }

/* modal */
#modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: var(--scrim); backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: .25s; }
#modal.open { opacity: 1; visibility: visible; }
#buy-form { position: relative; width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--panel-shadow); display: grid; gap: 14px; }
#buy-form h3 { margin: 0; font: 700 1.4rem var(--display); }
#buy-form .note { margin: 0; color: var(--dim); font-size: .88rem; line-height: 1.5; }
#buy-form label { display: grid; gap: 6px; font-size: .82rem; color: var(--dim); }
#buy-form input { background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--ink); font: inherit; font-size: 1rem; }
#buy-form input:focus { border-color: var(--gold); }
#buy-form input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
#buy-form .note.consent { font-size: .78rem; color: var(--dim); }
#buy-form .x:hover { color: var(--ink); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
#buy-form .x { position: absolute; top: 10px; right: 14px; background: none; border: 0; font-size: 1.8rem; color: var(--dim); line-height: 1; }
#buy-form .btn { --a: var(--gold); width: 100%; }
.err { margin: 0; color: var(--err); font-size: .85rem; min-height: 0; }
.ok { margin: 0; color: var(--ok); font-size: .92rem; }

/* theme toggle */
.theme-toggle { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 50%; background: var(--chip-bg); color: var(--ink); border: 1px solid var(--line); backdrop-filter: blur(6px); transition: border-color .2s, background-color .2s; flex: none; }
.theme-toggle:hover { border-color: var(--gold); background: var(--chip-bg-hover); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
.theme-toggle[aria-pressed="false"] .i-sun { display: block; }
.theme-toggle[aria-pressed="false"] .i-moon { display: none; }
.in-store .theme-toggle { opacity: 0; pointer-events: none; }

/* skip link */
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 16px; background: var(--ink); color: var(--bg); font: 600 .9rem var(--body); text-decoration: none; border-radius: 8px; border: 2px solid var(--gold); transform: translateY(-250%); transition: transform .15s; }
.skip-link:focus, .skip-link:focus-visible { transform: none; outline: 3px solid var(--focus); outline-offset: 3px; }

/* catalogue: crawlable list, visible without WebGL/JS or when revealed by the skip link */
.catalogue { max-width: 46rem; margin: 0 auto; padding: 96px 6vw 110px; color: var(--ink); font: 400 1.02rem/1.7 var(--body); position: relative; z-index: 2; }
.catalogue:focus { outline: 2px solid var(--focus); outline-offset: -8px; }
.catalogue h2 { font: 700 clamp(1.7rem, 5vw, 2.5rem)/1.15 var(--display); letter-spacing: .02em; margin: 0 0 .5em; }
.catalogue > p { color: var(--dim); margin: 0 0 2rem; }
.catalogue article { padding: 1.4rem 0 1.5rem 1.2rem; border-top: 1px solid var(--line); border-left: 3px solid var(--gold); margin-bottom: 1.2rem; }
.catalogue h3 { font: 700 clamp(1.2rem, 3.4vw, 1.5rem)/1.2 var(--display); letter-spacing: .04em; color: var(--gold-text); margin: 2.4rem 0 .6rem; }
.catalogue h4 { font: 700 clamp(1.4rem, 4vw, 1.9rem)/1.2 var(--display); margin: 0 0 .3em; overflow-wrap: anywhere; }
.catalogue article p { margin: 0 0 .7em; color: var(--dim); }
.catalogue article strong { color: var(--gold-text); font-weight: 600; }
.catalogue article p:last-child { margin-bottom: 0; font-size: .86rem; letter-spacing: .06em; text-transform: uppercase; }
.catalogue.catalogue-open { position: fixed; inset: 0; z-index: 40; overflow-y: auto; background: var(--bg); max-width: none; padding-left: max(6vw, calc((100vw - 46rem) / 2)); padding-right: max(6vw, calc((100vw - 46rem) / 2)); }
.no-gl .catalogue { padding-top: 40px; }

/* domain facts table */
dl.facts { margin: 0; border-top: 1px solid var(--line); }
dl.facts > div { display: grid; grid-template-columns: minmax(7rem, 12rem) 1fr; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
dl.facts dt { font: 600 .74rem var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--a-text); padding-top: .2em; }
dl.facts dd { margin: 0; color: var(--ink); line-height: 1.55; overflow-wrap: anywhere; }

@media (max-width: 700px) {
  .hud { flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px 14px; }
    .theme-toggle { position: absolute; top: 10px; right: 14px; }
  #dirs { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  #dirs button { white-space: nowrap; }
  .finder { margin: 0; width: calc(100% - 56px); }
  .finder input, .finder input:focus { width: 100%; }
  #intro { bottom: 5vh; }
  #progress { top: 110px; right: 6px; }
}
@media (max-width: 560px) {
  dl.facts > div { grid-template-columns: 1fr; gap: .15rem; }
  .catalogue article { padding-left: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* The guide (js/guide.js): a flat 2D animated character, drawn as SVG. The hat and head stand out above a round
   frame; the body is clipped to the frame below its equator. Pointer-transparent; hidden inside a store. */
#guide { position: fixed; left: 20px; bottom: 20px; z-index: 4; width: 150px; pointer-events: none; transition: opacity .3s; filter: drop-shadow(0 8px 12px rgba(0,0,0,.4)); }
#guide svg { display: block; width: 100%; height: auto; overflow: visible; }
#guide .g-plate { stroke: var(--gold); stroke-width: 2.5; }
#guide .g-body { transform-box: fill-box; transform-origin: 50% 100%; animation: g-breathe 3.6s ease-in-out infinite; }
#guide .g-sway { transform-box: fill-box; transform-origin: 50% 100%; animation: g-sway 7s ease-in-out infinite; }
#guide .g-lid { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); animation: g-blink 5.2s infinite; }
#guide .g-lid + .g-lid { animation-delay: .01s; }
#guide #g-brows { transition: transform .25s; }
#guide #g-brows.up { animation: g-brows .6s ease-out; }
#guide .g-tip { transform-box: fill-box; transform-origin: 20% 100%; transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
#guide.tipping .g-tip { transform: translate(-6px, -13px) rotate(-14deg); }
@keyframes g-breathe { 50% { transform: translateY(2.5px) scale(1.012); } }
@keyframes g-sway { 25% { transform: rotate(1.3deg); } 75% { transform: rotate(-1.3deg); } }
@keyframes g-blink { 0%, 92%, 100% { transform: scaleY(0); } 95% { transform: scaleY(1); } }
@keyframes g-brows { 40% { transform: translateY(-4px); } }
#guide.still * { animation: none !important; transition: none !important; }
.in-store #guide, .no-gl #guide { opacity: 0; visibility: hidden; }
@media (max-width: 700px) { #guide { width: 96px; left: 8px; bottom: 12px; } }

/* The guide's speech bubble: to the right of the character on desktop, above it on phones. Its buttons are clickable. */
#guide .g-say { position: absolute; left: calc(100% + 14px); bottom: 34px; width: min(300px, 42vw); pointer-events: auto; padding: 14px 16px 12px;
  background: var(--chip-bg-hover, rgba(0,0,0,.8)); color: var(--ink); border: 1.5px solid var(--gold); border-radius: 16px; backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0,0,0,.35); opacity: 0; transform: translateY(6px) scale(.98); transition: opacity .25s, transform .25s; font-size: .92rem; line-height: 1.5; }
#guide .g-say.on { opacity: 1; transform: none; }
#guide .g-say::before { content: ''; position: absolute; left: -9px; bottom: 26px; width: 14px; height: 14px; background: inherit; border-left: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: rotate(45deg); }
#guide .g-say p { margin: 0 0 10px; min-height: 2.9em; }
#guide .g-ctl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#guide .g-ctl button { font: 600 .74rem var(--body); color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; cursor: pointer; }
#guide .g-ctl button:hover { border-color: var(--gold); }
#guide .g-ctl button[aria-pressed=true] { border-color: var(--gold); color: var(--gold-text); }
#guide #g-close { margin-left: auto; padding: 2px 9px; font-size: 1rem; line-height: 1; }
#guide #g-mouth { transform-box: fill-box; transform-origin: 50% 0; }
#guide.talking #g-mouth { animation: g-talk .26s ease-in-out infinite; }
@keyframes g-talk { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.45); } }
@media (max-width: 700px) { #guide .g-say { left: 0; bottom: calc(100% + 6px); width: calc(100vw - 24px); } #guide .g-say::before { left: 40px; bottom: -8px; transform: rotate(-45deg); border-left: 0; border-bottom: 1.5px solid var(--gold); border-right: 1.5px solid var(--gold); } }
#guide .g-vname { margin: -4px 0 8px; font-size: .72rem; color: var(--dim); line-height: 1.35; }

/* walking-in transition */
#enter-fx { position: fixed; inset: 0; z-index: 6; pointer-events: none; opacity: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 55%, var(--fx, #f5c26b) 0%, rgba(0,0,0,0) 55%); }
#enter-fx .fx-cap { color: #fff; letter-spacing: .08em; font-size: 1rem; text-shadow: 0 2px 14px rgba(0,0,0,.7); padding: 0 24px; text-align: center; }
#enter-fx.go { animation: enterfx 1s ease-in forwards; }
@keyframes enterfx { 0% { opacity: 0; transform: scale(.6); } 45% { opacity: .85; } 100% { opacity: 0; transform: scale(2.4); } }
