/* Grill Lovorka - delight features: embers, 360° walk, mini-game, phone tilt,
   ambient sound toggle, easter eggs. Uses the design tokens from site.css (:root).
   Every class is prefixed .lvd- ; defaults on site-core hooks use :where() so the
   page styles can override them. */

/* ─── shared ─────────────────────────────────────────────────────────────── */

.lvd-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

html.lvd-lock { overflow: hidden; padding-right: var(--lvd-gap, 0); }

/* ─── embers (hero canvas) ───────────────────────────────────────────────── */

:where(canvas[data-feature="embers"]) {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
canvas.lvd-embers {
  mix-blend-mode: screen;
  transition: filter var(--dur-4) var(--ease-out);
}
canvas.lvd-embers.is-boosted { filter: brightness(1.5) saturate(1.2); }

/* ─── ambient sound toggle ───────────────────────────────────────────────── */

.lvd-sound {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  min-height: 40px;
  padding: .5em 1em .5em .8em;
  border: 1px solid rgb(246 238 226 / .18);
  border-radius: 999px;
  background: rgb(246 238 226 / .04);
  color: var(--c-cream);
  font: 600 .875rem/1 var(--font-body);
  letter-spacing: .01em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-spring);
}
.lvd-sound:hover { background: rgb(246 238 226 / .09); border-color: rgb(243 156 74 / .55); }
.lvd-sound:active { transform: scale(.95); }
.lvd-sound:focus-visible { outline: 2px solid var(--c-ember); outline-offset: 3px; }
.lvd-sound.is-on { border-color: rgb(243 156 74 / .55); box-shadow: 0 0 22px rgb(243 156 74 / .18); }
.lvd-sound__icon { display: grid; }
.lvd-sound__flame { width: 1.15em; height: 1.15em; color: var(--c-muted); transition: color var(--dur-2), filter var(--dur-2), transform var(--dur-3) var(--ease-spring); }
.lvd-sound__core { fill: #FFE2A8; opacity: 0; transition: opacity var(--dur-2); }
.lvd-sound.is-on .lvd-sound__flame { color: var(--c-ember); filter: drop-shadow(0 0 5px rgb(243 156 74 / .8)); transform: scale(1.12); }
.lvd-sound.is-on .lvd-sound__core { opacity: 1; }
/* the muted speaker (off) and the equalizer (on) share one slot, so the label never moves */
.lvd-sound__eq { display: inline-grid; place-items: center; height: 14px; }
.lvd-sound__eq > * { grid-area: 1 / 1; }
.lvd-sound__muted {
  width: 15px;
  height: 15px;
  color: var(--c-muted);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-spring);
}
.lvd-sound:hover .lvd-sound__muted { color: var(--c-cream); }
.lvd-sound.is-on .lvd-sound__muted { opacity: 0; transform: scale(.5); }
.lvd-sound__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.lvd-sound__eq i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--c-ember);
  opacity: 0;
  transform-origin: 50% 100%;
  transform: scaleY(0);
  transition: transform 90ms linear, opacity var(--dur-2);
}
.lvd-sound.is-on .lvd-sound__eq i { opacity: 1; transform: scaleY(var(--lvl, .45)); transition: transform 90ms linear, opacity var(--dur-2) var(--dur-1); }
.lvd-sound.is-on:not(.is-live) .lvd-sound__eq i { animation: lvd-eq-wait 1.6s var(--ease-in-out) infinite; }
.lvd-sound.is-on.is-offscreen .lvd-sound__eq i { animation-play-state: paused; }
.lvd-sound__eq i:nth-child(2) { animation-delay: -.3s; }
.lvd-sound__eq i:nth-child(3) { animation-delay: -.6s; }
.lvd-sound__eq i:nth-child(4) { animation-delay: -.9s; }
.lvd-sound__eq i:nth-child(5) { animation-delay: -1.2s; }
@keyframes lvd-eq-wait { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(.6); } }

/* ─── phone mockup tilt ──────────────────────────────────────────────────── */

.lvd-phone {
  position: relative;
  transform-style: preserve-3d;
  transform: perspective(1100px) rotateX(calc(var(--rx, 0) * 1deg)) rotateY(calc(var(--ry, 0) * 1deg)) translateZ(calc(var(--lift, 0) * 16px));
  will-change: transform;
}
.lvd-phone > img, .lvd-phone > picture { position: relative; display: block; transform: translateZ(0); }
.lvd-phone__shadow {
  position: absolute;
  left: 14%; right: 14%; bottom: -3%;
  height: 7%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / .6), rgb(0 0 0 / 0));
  filter: blur(8px);
  transform: translate3d(calc(var(--ry, 0) * -1.6px), 0, -60px) scaleX(calc(1 + var(--lift, 0) * .06));
  pointer-events: none;
}
.lvd-phone__glare {
  position: absolute;
  pointer-events: none;
  transform: translateZ(1px);
  background:
    radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgb(255 255 255 / .5), rgb(255 255 255 / .1) 32%, rgb(255 255 255 / 0) 60%),
    linear-gradient(115deg, rgb(255 255 255 / 0) 32%, rgb(255 255 255 / .14) 46%, rgb(255 255 255 / 0) 56%);
  mix-blend-mode: soft-light;
  opacity: var(--glare, .32);
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
}
/* the shadow filter sits on the animated svg itself, so the compositor moves the filtered
   leaf as a whole (a filter on its parent would be re-painted on every frame of the float) */
.lvd-phone__leaf { position: absolute; display: block; pointer-events: none; color: var(--c-laurel); }
.lvd-phone__leaf svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 8px 10px rgb(0 0 0 / .35)); animation: lvd-leaf-float 7s var(--ease-in-out) infinite; }
.lvd-phone__leaf--1 { top: 9%; left: -11%; width: 17%; transform: translateZ(80px) rotate(-30deg); }
.lvd-phone__leaf--2 { bottom: 16%; right: -9%; width: 12%; color: #7d8a44; opacity: .9; transform: translateZ(-40px) rotate(155deg); }
.lvd-phone__leaf--2 svg { filter: blur(.6px) drop-shadow(0 6px 8px rgb(0 0 0 / .3)); }
.lvd-phone__leaf--2 svg { animation-duration: 9s; animation-delay: -3s; }
.lvd-phone.is-offscreen .lvd-phone__leaf svg { animation-play-state: paused; }
.lvd-phone.is-static { transform: none; }
.lvd-phone.is-static .lvd-phone__leaf svg { animation: none; }
@keyframes lvd-leaf-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8%) rotate(8deg); } }

/* ─── 360° virtual walk ──────────────────────────────────────────────────── */

:where([data-feature="vr"], .lvd-vr) {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 300px;
  max-height: 82vh;
  overflow: hidden;
  border-radius: var(--radius-l);
  background: var(--c-night);
}
.lvd-vr { isolation: isolate; container-type: inline-size; -webkit-tap-highlight-color: transparent; }
@media (max-width: 640px) { :where([data-feature="vr"], .lvd-vr) { aspect-ratio: 4 / 5; max-height: 72vh; } }
.lvd-vr [data-vr-poster] { transition: opacity var(--dur-3) var(--ease-out), visibility 0s; }
.lvd-vr.is-live [data-vr-poster] { opacity: 0; visibility: hidden; transition: opacity var(--dur-3) var(--ease-out), visibility 0s var(--dur-3); }
.lvd-vr__view { position: absolute; inset: 0; z-index: 1; }
.lvd-vr__canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: grab;
  touch-action: pan-y;
  outline: none;
  transition: opacity .8s var(--ease-out);
}
.lvd-vr.is-live .lvd-vr__canvas { opacity: 1; }
.lvd-vr.is-dragging .lvd-vr__canvas { cursor: grabbing; }
.lvd-vr__canvas:focus-visible { outline: 3px solid var(--c-ember); outline-offset: -3px; }
.lvd-vr.is-fullscreen .lvd-vr__canvas { touch-action: none; }
.lvd-vr__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 85% 75% at 50% 50%, rgb(20 15 12 / 0) 55%, rgb(20 15 12 / .5)),
    linear-gradient(to top, rgb(20 15 12 / .6), rgb(20 15 12 / 0) 30%),
    linear-gradient(to bottom, rgb(20 15 12 / .45), rgb(20 15 12 / 0) 24%);
}

.lvd-vr__loader {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .7rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-2), visibility 0s var(--dur-2);
}
.lvd-vr.is-loading .lvd-vr__loader { opacity: 1; visibility: visible; transition: opacity var(--dur-2); }
.lvd-vr__shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgb(246 238 226 / 0) 30%, rgb(246 238 226 / .1) 50%, rgb(246 238 226 / 0) 70%) 0 0 / 250% 100%;
  animation: lvd-shimmer 1.5s linear infinite paused;
}
/* runs only while something is loading and on screen (a hidden loader would still tick) */
.lvd-vr.is-loading:not(.is-offscreen) .lvd-vr__shimmer { animation-play-state: running; }
.lvd-vr__loadtext {
  position: relative;
  padding: .55rem 1rem;
  border-radius: 999px;
  background: rgb(20 15 12 / .65);
  backdrop-filter: blur(8px);
  color: var(--c-cream);
  font: 600 .9rem/1 var(--font-body);
}
.lvd-vr__progress { position: relative; width: 140px; height: 3px; border-radius: 3px; overflow: hidden; background: rgb(246 238 226 / .18); }
.lvd-vr__progress i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--c-red), var(--c-ember)); transition: transform var(--dur-2) var(--ease-out); }
@keyframes lvd-shimmer { from { background-position: 125% 0; } to { background-position: -125% 0; } }

.lvd-vr__hint {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
  padding: 1rem 1.25rem .9rem;
  border-radius: var(--radius-m);
  background: rgb(20 15 12 / .5);
  backdrop-filter: blur(8px);
  color: var(--c-cream);
  font: 600 .95rem/1.25 var(--font-body);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -40%) scale(.96);
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
}
.lvd-vr.is-live:not(.is-engaged):not(.is-loading) .lvd-vr__hint { opacity: 1; transform: translate(-50%, -50%); transition-delay: .4s; }
.lvd-vr__hand { display: block; width: 40px; height: 40px; color: var(--c-cream); animation: lvd-swipe 2.4s var(--ease-in-out) infinite paused; }
/* the hand waves only while its hint is shown and the viewer is on screen (it freezes while fading out) */
.lvd-vr.is-live:not(.is-engaged):not(.is-loading):not(.is-offscreen) .lvd-vr__hand { animation-play-state: running; }
.lvd-vr__hand svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 6px rgb(0 0 0 / .4)); }
@keyframes lvd-swipe { 0%, 100% { transform: translateX(-18px) rotate(-8deg); } 50% { transform: translateX(18px) rotate(8deg); } }

.lvd-vr__top, .lvd-vr__bottom {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  padding: clamp(.6rem, 2.2cqi, 1.1rem);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
}
.lvd-vr__top { top: 0; align-items: flex-start; transform: translateY(-8px); }
.lvd-vr__bottom { bottom: 0; align-items: flex-end; transform: translateY(8px); }
.lvd-vr.is-live .lvd-vr__top, .lvd-vr.is-live .lvd-vr__bottom { opacity: 1; transform: none; }
.lvd-vr__top > *, .lvd-vr__bottom > * { pointer-events: auto; }
.lvd-vr__title {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0;
  padding: .35rem .9rem .35rem .4rem;
  border-radius: 999px;
  background: rgb(20 15 12 / .55);
  backdrop-filter: blur(10px);
  color: var(--c-cream);
  font: italic 500 1.05rem/1 var(--font-display);
}
.lvd-vr__badge { padding: .32rem .5rem; border-radius: 999px; background: var(--c-red-fill); color: #fff; font: 700 .7rem/1 var(--font-body); font-style: normal; letter-spacing: .05em; }
.lvd-vr__compass {
  width: 46px;
  height: 46px;
  padding: 4px;
  border: 1px solid rgb(246 238 226 / .18);
  border-radius: 50%;
  background: rgb(20 15 12 / .55);
  backdrop-filter: blur(10px);
  color: var(--c-cream);
  cursor: pointer;
  transition: transform var(--dur-2) var(--ease-spring), border-color var(--dur-2);
}
.lvd-vr__compass:hover { transform: scale(1.08); border-color: rgb(243 156 74 / .6); }
.lvd-vr__compass svg { display: block; width: 100%; height: 100%; }
.lvd-vr__dial { fill: none; stroke: rgb(246 238 226 / .28); stroke-width: 1.5; }
.lvd-vr__cone { fill: rgb(243 156 74 / .5); stroke: var(--c-ember); stroke-width: 1; stroke-linejoin: round; }
.lvd-vr__scenes, .lvd-vr__controls {
  display: flex;
  gap: .3rem;
  padding: .3rem;
  border-radius: 999px;
  background: rgb(20 15 12 / .58);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgb(0 0 0 / .25);
}
.lvd-vr__scenes { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.lvd-vr__scenes::-webkit-scrollbar { display: none; }
.lvd-vr__scene {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: .5rem;
  padding: .22rem .9rem .22rem .22rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgb(246 238 226 / .78);
  font: 600 .85rem/1 var(--font-body);
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2), transform var(--dur-2) var(--ease-spring);
}
.lvd-vr__scene img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgb(246 238 226 / .2); transition: box-shadow var(--dur-2), transform var(--dur-3) var(--ease-spring); }
.lvd-vr__scene:hover { background: rgb(246 238 226 / .1); color: var(--c-cream); }
.lvd-vr__scene:hover img { transform: scale(1.08); }
.lvd-vr__scene:active { transform: scale(.96); }
.lvd-vr__scene[aria-pressed="true"] { background: var(--c-cream); color: var(--c-ink); }
.lvd-vr__scene[aria-pressed="true"] img { box-shadow: 0 0 0 2px var(--c-red); }
.lvd-vr__btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--c-cream);
  cursor: pointer;
  transition: background var(--dur-2), color var(--dur-2), transform var(--dur-2) var(--ease-spring);
}
.lvd-vr__btn svg { width: 20px; height: 20px; }
.lvd-vr__btn:hover { background: rgb(246 238 226 / .12); }
.lvd-vr__btn:active { transform: scale(.9); }
.lvd-vr__btn:disabled { opacity: .35; cursor: default; }
.lvd-vr__btn[aria-pressed="true"]:not([data-act="spin"]) { color: var(--c-ember); }
.lvd-vr__btn[data-act="spin"][aria-pressed="true"] .lvd-vr__i-play,
.lvd-vr__btn[data-act="spin"][aria-pressed="false"] .lvd-vr__i-pause,
.lvd-vr.is-fullscreen .lvd-vr__i-enter,
.lvd-vr:not(.is-fullscreen) .lvd-vr__i-exit { display: none; }
.lvd-vr__scene:focus-visible, .lvd-vr__btn:focus-visible, .lvd-vr__compass:focus-visible, .lvd-vr__retry:focus-visible { outline: 2px solid var(--c-ember); outline-offset: 2px; }
.lvd-vr__error[hidden] { display: none; }
.lvd-vr__error {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .9rem;
  padding: 1.5rem;
  background: rgb(20 15 12 / .82);
  color: var(--c-cream);
  text-align: center;
}
.lvd-vr__error p { margin: 0; max-width: 32ch; }
.lvd-vr__retry { padding: .65rem 1.3rem; border: 0; border-radius: 999px; background: var(--c-red-fill); color: #fff; font: 700 .95rem/1 var(--font-body); cursor: pointer; }
.lvd-vr:fullscreen { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; border-radius: 0; }
.lvd-vr.is-pseudo-fs { position: fixed; inset: 0; z-index: var(--z-modal); width: auto; height: auto; max-height: none; aspect-ratio: auto; border-radius: 0; }
@container (max-width: 600px) {
  .lvd-vr__scene { padding: .22rem; }
  .lvd-vr__scene span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .lvd-vr__btn[data-act="in"], .lvd-vr__btn[data-act="out"] { display: none; }
  .lvd-vr__title { font-size: .95rem; }
  .lvd-vr__hint { font-size: .88rem; }
}

/* ─── mini-game: Grill Crush ─────────────────────────────────────────────── */

/* reserve roughly the game's size before the module mounts (no layout jump) */
:where([data-feature="minigame"]:empty) { min-height: 680px; border-radius: var(--radius-l); background: #1d140f; }
@media (max-width: 760px) { :where([data-feature="minigame"]:empty) { min-height: 0; aspect-ratio: 3 / 4.4; } }

.lvd-mg {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  border-radius: var(--radius-l);
  background:
    radial-gradient(120% 60% at 30% 100%, rgb(243 156 74 / .12), transparent 60%),
    linear-gradient(180deg, #2c1f17, #160f0b 70%);
  box-shadow: var(--shadow-2), inset 0 1px 0 rgb(255 255 255 / .06);
  color: var(--c-cream);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}
/* on phones the panel takes most of the gutter: every pixel goes to the board */
@media (max-width: 520px) { .mini-wrap > .lvd-mg { margin-inline: calc(8px - var(--gutter)); border-radius: var(--radius-m); } }

.lvd-mg__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem clamp(.75rem, 2.5cqi, 1.5rem);
  border-bottom: 1px solid rgb(246 238 226 / .08);
  background: linear-gradient(180deg, rgb(255 255 255 / .05), rgb(255 255 255 / 0));
}
.lvd-mg__brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .8rem; min-width: 0; margin: 0; }
.lvd-mg__name { color: var(--c-cream); font: 800 1.2rem/1.1 var(--font-display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.01em; }
.lvd-mg__best { color: var(--c-gold); font-size: .82rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.lvd-mg__tools { display: flex; flex: none; gap: .4rem; }
.lvd-mg__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgb(246 238 226 / .14);
  border-radius: 50%;
  background: rgb(246 238 226 / .05);
  color: var(--c-cream);
  cursor: pointer;
  transition: background var(--dur-2), border-color var(--dur-2), transform var(--dur-2) var(--ease-spring), opacity var(--dur-2);
}
.lvd-mg__icon svg { width: 20px; height: 20px; }
.lvd-mg__icon:hover:not(:disabled) { background: rgb(246 238 226 / .12); border-color: rgb(243 156 74 / .5); }
.lvd-mg__icon:active:not(:disabled) { transform: scale(.9); }
.lvd-mg__icon:disabled { opacity: .35; cursor: default; }
.lvd-mg__icon--close:hover { transform: rotate(90deg); }
.lvd-mg__icon:not(.is-muted) .lvd-mg__x, .lvd-mg__icon.is-muted .lvd-mg__wave { display: none; }
.lvd-mg__icon.is-muted { color: var(--c-muted); }

.lvd-mg__body {
  display: grid;
  gap: clamp(1rem, 3cqi, 2.25rem);
  padding: clamp(.5rem, 2.5cqi, 1.5rem);
}
@container (min-width: 760px) {
  .lvd-mg__body { grid-template-columns: minmax(0, 460px) minmax(0, 1fr); align-items: center; }
}

/* the board: a 3:4 canvas (logical 360 × 480) */
.lvd-mg__stage {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-m);
  background: #1b1714;
  box-shadow: 0 18px 40px rgb(0 0 0 / .45), 0 0 0 1px rgb(246 238 226 / .07), 0 0 60px rgb(243 156 74 / .08);
}
.lvd-mg__canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: manipulation; /* the page still scrolls over the demo */
  user-select: none;
  -webkit-user-select: none;
}
.lvd-mg.is-playing .lvd-mg__canvas { touch-action: none; cursor: pointer; }
.lvd-mg__stage:has(.lvd-mg__canvas:focus-visible)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 0 3px var(--c-gold);
  pointer-events: none;
}

/* start / menu / pause / game-over screens over the board */
.lvd-mg__screen[hidden] { display: none; }
.lvd-mg__screen {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: clamp(.6rem, 3cqi, 1.25rem);
  background: radial-gradient(ellipse at 50% 55%, rgb(20 15 12 / .66), rgb(20 15 12 / .9));
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease-out);
}
.lvd-mg__screen.is-in { opacity: 1; }
.lvd-mg__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  width: min(100%, 340px);
  padding: 1.35rem 1.2rem 1.25rem;
  border: 1px solid rgb(246 238 226 / .1);
  border-top: 5px solid var(--c-red-fill);
  border-radius: var(--radius-m);
  background: linear-gradient(180deg, rgb(58 42 32 / .95), rgb(30 23 19 / .97));
  box-shadow: var(--shadow-2), 0 0 0 1px rgb(0 0 0 / .35);
  text-align: center;
  transform: translateY(14px) scale(.97);
  transition: transform var(--dur-3) var(--ease-spring);
}
.lvd-mg__screen.is-in .lvd-mg__card { transform: none; }
.lvd-mg__card--small { width: min(100%, 280px); }
.lvd-mg__card--small .lvd-mg__title { font-size: 1.75rem; }
.lvd-mg__card > * { margin: 0; }
.lvd-mg__kicker { color: var(--c-ember); font: 600 1.3rem/1 var(--font-hand); }
.lvd-mg__title { color: var(--c-cream); font: 800 2.1rem/1 var(--font-display); font-variation-settings: "SOFT" 100, "WONK" 1; letter-spacing: -.01em; text-wrap: balance; }
.lvd-mg__lead { max-width: 30ch; color: rgb(246 238 226 / .8); font-size: .95rem; line-height: 1.45; text-wrap: pretty; }
.lvd-mg__note { max-width: 30ch; color: rgb(246 238 226 / .6); font-size: .8rem; line-height: 1.4; }
.lvd-mg__note[hidden] { display: none; }
.lvd-mg__stars { display: inline-flex; align-items: center; gap: .35rem; color: var(--c-cream); font: 800 1.15rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.lvd-mg__stars svg { width: 22px; height: 22px; color: #FFD166; filter: drop-shadow(0 0 6px rgb(255 209 102 / .45)); }
.lvd-mg__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 46px;
  padding: .7rem 1.35rem;
  border: 1px solid rgb(246 238 226 / .22);
  border-radius: 999px;
  background: rgb(246 238 226 / .04);
  color: var(--c-cream);
  font: 700 1rem/1.1 var(--font-body);
  cursor: pointer;
  transition: transform var(--dur-2) var(--ease-spring), background var(--dur-2), box-shadow var(--dur-2), border-color var(--dur-2);
}
.lvd-mg__btn svg { flex: none; width: 20px; height: 20px; }
.lvd-mg__btn:hover { transform: translateY(-2px); border-color: rgb(246 238 226 / .45); background: rgb(246 238 226 / .1); }
.lvd-mg__btn:active { transform: scale(.96); }
.lvd-mg__btn--primary { border-color: transparent; background: var(--c-red-fill); color: #fff; box-shadow: 0 10px 26px rgb(230 58 52 / .38), inset 0 1px 0 rgb(255 255 255 / .22); }
.lvd-mg__btn--primary:hover { background: var(--c-red-deep); border-color: transparent; box-shadow: 0 14px 34px rgb(230 58 52 / .5), inset 0 1px 0 rgb(255 255 255 / .22); }
.lvd-mg__btn--primary svg { color: #FFE2A8; }
.lvd-mg__btn:focus-visible, .lvd-mg__icon:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 3px; }
.lvd-mg__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .2rem; }
.lvd-mg__actions--stack { flex-direction: column; align-items: stretch; width: 100%; }
.lvd-mg__final { display: flex; align-items: baseline; gap: .4rem; color: var(--c-gold); font: 800 3.4rem/1 var(--font-display); font-variant-numeric: tabular-nums; text-shadow: 0 0 34px rgb(243 156 74 / .45); }
.lvd-mg__final small { color: rgb(246 238 226 / .6); font: 600 1rem/1 var(--font-body); text-shadow: none; }
.lvd-mg__reached { color: var(--c-cream); font-weight: 600; }
.lvd-mg__record[hidden] { display: none; }
.lvd-mg__record { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border-radius: 999px; background: var(--c-red-fill); color: #fff; font: 800 .85rem/1 var(--font-body); letter-spacing: .04em; text-transform: uppercase; animation: lvd-pop .7s var(--ease-spring) .4s both; }
.lvd-mg__record svg { width: 16px; height: 16px; color: #FFE2A8; }

/* how to play: next to the board on wide screens, under it on phones */
.lvd-mg__side { display: grid; gap: .9rem; align-content: start; max-width: 34rem; margin-inline: auto; }
.lvd-mg__side > * { margin: 0; }
.lvd-mg__how-title { color: var(--c-cream); font: 800 1.45rem/1.1 var(--font-display); font-variation-settings: "SOFT" 100, "WONK" 1; }
.lvd-mg__how-lead { color: rgb(246 238 226 / .78); font-size: .95rem; line-height: 1.5; }
.lvd-mg__legend { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.lvd-mg__legend li { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: .75rem; padding: .45rem .7rem .45rem .45rem; border: 1px solid rgb(246 238 226 / .06); border-radius: var(--radius-s); background: rgb(246 238 226 / .04); }
.lvd-mg__legend p { margin: 0; color: rgb(246 238 226 / .76); font-size: .88rem; line-height: 1.38; }
.lvd-mg__legend strong { color: var(--c-cream); font-weight: 700; }
.lvd-mg__ico { display: block; width: 44px; height: 44px; border-radius: 10px; background: #1b1613; }
/* keyboard help stays for screen readers (canvas aria-describedby) but is not shown */
.lvd-mg__keys { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@container (max-width: 759px) {
  .lvd-mg__side { padding: 0 .35rem .35rem; }
  .lvd-mg__legend { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
}
@container (max-width: 420px) {
  .lvd-mg__bar { padding-block: .55rem; }
  .lvd-mg__icon { width: 38px; height: 38px; }
  .lvd-mg__card { gap: .55rem; padding: 1.1rem .9rem 1rem; }
  .lvd-mg__title { font-size: 1.85rem; }
  .lvd-mg__lead { font-size: .9rem; }
  .lvd-mg__final { font-size: 2.8rem; }
  .lvd-mg__btn { min-height: 44px; padding: .6rem 1.1rem; font-size: .95rem; }
  .lvd-mg__legend li { gap: .6rem; }
  .lvd-mg__legend p { font-size: .84rem; }
}

/* modal version */
.lvd-mg-dialog {
  width: min(1080px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--c-cream);
  opacity: 0;
  transform: translateY(24px) scale(.96);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-spring);
}
.lvd-mg-dialog.is-in { opacity: 1; transform: none; }
.lvd-mg-dialog::backdrop { background: rgb(12 8 6 / .74); backdrop-filter: blur(6px); opacity: 0; transition: opacity var(--dur-2) var(--ease-out); }
.lvd-mg-dialog.is-in::backdrop { opacity: 1; }
.lvd-mg-dialog .lvd-mg { max-height: calc(100dvh - 32px); overflow: auto; box-shadow: 0 30px 80px rgb(0 0 0 / .55), 0 0 0 1px rgb(246 238 226 / .08); }
.lvd-mg-dialog .lvd-mg__stage { width: min(100%, 460px, calc((100dvh - 32px - 64px - 3rem) * .75)); }
@media (max-width: 640px) {
  .lvd-mg-dialog { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; }
  .lvd-mg-dialog__body, .lvd-mg-dialog .lvd-mg { height: 100%; max-height: none; }
  .lvd-mg-dialog .lvd-mg { border-radius: 0; }
  .lvd-mg-dialog .lvd-mg__bar { padding-top: max(.55rem, env(safe-area-inset-top)); }
  .lvd-mg-dialog .lvd-mg__stage { width: min(100%, calc((100dvh - 64px - 1rem - env(safe-area-inset-top)) * .75)); }
}

/* ─── easter eggs ────────────────────────────────────────────────────────── */

.lvd-egg-counter.is-bump { animation: lvd-bump .7s var(--ease-spring); }
html.lvd-holding [data-egg="hero"] { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

.lvd-fx { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; }
.lvd-fx-title {
  position: fixed;
  inset: 0;
  z-index: 97;
  display: grid;
  place-items: center;
  padding: 1rem;
  pointer-events: none;
  text-align: center;
  opacity: 0;
  transform: scale(.55);
  transition: opacity .3s var(--ease-out), transform .9s var(--ease-spring);
}
.lvd-fx-title span {
  font: 900 clamp(2.6rem, 11vw, 8rem)/.95 var(--font-display);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  letter-spacing: -.02em;
  color: transparent;
  background: linear-gradient(180deg, #FFF6D8 8%, #F6C25B 38%, #F39C4A 62%, #E63A34 92%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 28px rgb(243 156 74 / .85)) drop-shadow(0 5px 0 rgb(110 26 21 / .9));
}
.lvd-fx-title.is-in { opacity: 1; transform: none; }
.lvd-fx-title.is-out { opacity: 0; transform: scale(1.12) translateY(-24px); transition: opacity .5s var(--ease-in-out), transform .6s var(--ease-in-out); }

.lvd-bellows {
  position: fixed;
  z-index: 95;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: -39px 0 0 -39px;
  pointer-events: none;
  opacity: 0;
  transform: scale(.55);
  transition: opacity .2s var(--ease-out), transform .4s var(--ease-spring);
}
.lvd-bellows.is-in { opacity: 1; transform: none; }
.lvd-bellows > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.lvd-bellows > svg:last-child { position: relative; width: 30px; height: 30px; filter: drop-shadow(0 2px 4px rgb(0 0 0 / .5)); }
.lvd-bellows__track { fill: rgb(20 15 12 / .5); stroke: rgb(246 238 226 / .25); stroke-width: 4; }
.lvd-bellows__fill { fill: none; stroke: var(--c-ember); stroke-width: 4.5; stroke-linecap: round; stroke-dasharray: 170; stroke-dashoffset: 170; filter: drop-shadow(0 0 5px var(--c-ember)); }
.lvd-bellows.is-in .lvd-bellows__fill { stroke-dashoffset: 0; transition: stroke-dashoffset 1.26s linear; }
.lvd-bellows.is-out { opacity: 0; transform: scale(.7); }
.lvd-bellows.is-done { animation: lvd-ring-done .65s var(--ease-out) forwards; }

.lvd-hero-flash {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 75% at 50% 112%, rgb(255 160 70 / .6), rgb(230 58 52 / .22) 45%, rgb(230 58 52 / 0) 72%);
  mix-blend-mode: screen;
  animation: lvd-flash 2.6s var(--ease-out) forwards;
}

.lvd-leaf { position: fixed; left: 0; top: 0; z-index: 96; width: 22px; height: 14px; margin: -7px 0 0 -11px; pointer-events: none; will-change: transform; }
.lvd-leaf svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 2px 2px rgb(0 0 0 / .3)); }

.lvd-wreath { position: fixed; left: 0; top: 0; z-index: calc(var(--z-header, 50) + 1); pointer-events: none; }
.lvd-wreath svg { display: block; overflow: visible; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .35)); }
.lvd-wreath__stem { fill: none; stroke: #4b5428; stroke-width: 2.2; stroke-linecap: round; }
.lvd-wreath__leaf { transform-origin: 0 0; }
.lvd-wreath__berry { fill: #2b1a2c; stroke: rgb(255 255 255 / .25); stroke-width: .6; transform-box: fill-box; transform-origin: center; }
.lvd-wreath__bow { transform-box: fill-box; transform-origin: center; }

.lvd-egg-sizzle { animation: lvd-sizzle 1.3s linear both; }
.lvd-egg-spin { animation: lvd-spin 1.15s var(--ease-spring) both; }

.lvd-toasts {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: var(--z-toast, 120);
  display: grid;
  gap: .5rem;
  width: min(92vw, 440px);
  pointer-events: none;
  translate: -50% 0;
}
.lvd-toast {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1rem;
  border: 1px solid rgb(246 238 226 / .12);
  border-radius: var(--radius-m);
  background: rgb(30 23 19 / .96);
  box-shadow: var(--shadow-2);
  color: var(--c-cream);
  font: 500 .92rem/1.4 var(--font-body);
  opacity: 0;
  transform: translateY(16px) scale(.96);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-spring);
}
.lvd-toast.is-in { opacity: 1; transform: none; }
.lvd-toast__icon { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgb(246 238 226 / .08); }

/* ─── keyframes ──────────────────────────────────────────────────────────── */

@keyframes lvd-bump { 0% { transform: scale(1); } 35% { transform: scale(1.28); } 100% { transform: scale(1); } }
@keyframes lvd-pop { 0% { opacity: 0; transform: scale(.4) rotate(-8deg); } 100% { opacity: 1; transform: none; } }
@keyframes lvd-ring-done {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.1); }
}
@keyframes lvd-flash { 0% { opacity: 0; } 14% { opacity: 1; } 100% { opacity: 0; } }
@keyframes lvd-sizzle {
  0% { translate: 0 0; filter: none; }
  6% { translate: -2px 1px; filter: drop-shadow(0 0 6px rgb(243 156 74 / .95)) drop-shadow(0 0 18px rgb(230 58 52 / .7)) saturate(1.4); }
  12% { translate: 2px -1px; }
  18% { translate: -2px -1px; }
  24% { translate: 2px 1px; }
  30% { translate: -1px 1px; }
  36% { translate: 1px -1px; }
  42% { translate: -1px 0; }
  50% { translate: 0 0; filter: drop-shadow(0 0 6px rgb(243 156 74 / .9)) drop-shadow(0 0 16px rgb(230 58 52 / .6)) saturate(1.3); }
  100% { translate: 0 0; filter: none; }
}
@keyframes lvd-spin {
  0% { rotate: y 0deg; scale: 1; }
  35% { scale: 1.3; }
  100% { rotate: y 720deg; scale: 1; }
}

/* ─── reduced motion ─────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .lvd-sound__eq i, .lvd-vr__hand, .lvd-vr__shimmer, .lvd-phone__leaf svg,
  .lvd-egg-counter.is-bump, .lvd-mg__record { animation: none !important; }
  .lvd-mg__screen, .lvd-mg__card, .lvd-mg-dialog, .lvd-mg-dialog::backdrop, .lvd-vr__top, .lvd-vr__bottom,
  .lvd-vr__hint, .lvd-vr__canvas, .lvd-toast, .lvd-fx-title, .lvd-bellows { transition-duration: 1ms !important; }
  .lvd-mg__card, .lvd-mg-dialog { transform: none; }
  .lvd-mg__btn, .lvd-mg__icon { transition-duration: 1ms !important; }
  .lvd-mg__btn:hover { transform: none; }
}
