/* cyrillic-ext */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("71777f27-059e-412c-8f5f-fbde75a98de1.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("0348bfc9-9db5-44c2-bee5-3ce75ca47c63.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("dd204a92-0883-4964-860a-066b5faf7fff.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("acbefbff-6569-4ad6-a5aa-32c61aa89fb4.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("23797d2e-6e95-4447-96bd-9e05e887f762.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("30b77d47-889f-41dc-8128-2ed6d3b42c43.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("e39666e3-6dbf-4157-850c-aed28eaf8e8a.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("a2da63bf-001b-4003-9ab6-dc2944b813fd.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("f5972cd3-d94d-401e-b3cd-0e36abf71c76.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("3aa4e94c-563f-4ee1-b4c6-a49a548f3776.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("62569918-6ef0-497d-b8b1-5f77918500d3.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("86a149c7-2a2b-46af-a91f-f57987646cd7.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("a8711118-8b5f-4bed-9ba8-6d15dc48edc0.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("c17f2e47-f3f2-43ea-9e7e-7f1960467466.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("2185b28d-2eda-42bb-b497-ff998d5330d4.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("3b9255ca-9560-492d-84f1-c9f228173c41.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("473cd4ab-3826-4831-b8df-ca36574def17.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("86a149c7-2a2b-46af-a91f-f57987646cd7.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("a8711118-8b5f-4bed-9ba8-6d15dc48edc0.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("c17f2e47-f3f2-43ea-9e7e-7f1960467466.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("2185b28d-2eda-42bb-b497-ff998d5330d4.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("3b9255ca-9560-492d-84f1-c9f228173c41.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("473cd4ab-3826-4831-b8df-ca36574def17.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("86a149c7-2a2b-46af-a91f-f57987646cd7.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("a8711118-8b5f-4bed-9ba8-6d15dc48edc0.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("c17f2e47-f3f2-43ea-9e7e-7f1960467466.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("2185b28d-2eda-42bb-b497-ff998d5330d4.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("3b9255ca-9560-492d-84f1-c9f228173c41.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("473cd4ab-3826-4831-b8df-ca36574def17.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ---- next block ---- */

/* ============================================================
   Clai · Florida Real Estate Trivia
   Build a home, brick by brick, one right answer at a time.
   ============================================================ */

:root {
  --paper:        #F6F4EE;
  --paper-2:      #FBFAF6;
  --paper-3:      #ECE7DA;
  --ink:          #17201C;
  --ink-2:        #2C342F;
  --ink-mute:     #5E6B64;
  --ink-dim:      #8E978F;
  --hair:         rgba(20,30,25,0.10);
  --hair-2:       rgba(20,30,25,0.18);
  --green:        #2F8F5E;
  --green-deep:   #1E6B43;
  --green-bright: #44BA82;
  --green-soft:   rgba(47,143,94,0.12);
  --mint:         #7FDCA7;
  --amber:        #E5B64A;
  --amber-deep:   #8A6513;
  --amber-soft:   rgba(229,182,74,0.18);
  --rust:         #C25A3A;
  --crimson:      #B23A2E;

  --font-sans:  "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Instrument Serif", "Fraunces", ui-serif, Georgia, serif;
  --font-script:"Caveat", "Brush Script MT", cursive;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  height: 100%;
  overscroll-behavior: none;
}
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01","cv11";
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

/* ============================================================
   Stage, the dark velvet table (matches Magic of Clai)
   ============================================================ */
.stage {
  position: fixed; inset: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 30%, #20302a 0%, #141a17 60%, #0b100e 100%);
}
.stage::before {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,0.10) 0 2px, transparent 2px 6px);
  pointer-events: none;
  mix-blend-mode: overlay;
}
.stage::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(140% 100% at 50% 50%, transparent 40%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}

/* Floating sparkles backdrop */
.sparkles {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.7;
}
.sparkle {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px 2px var(--amber);
  animation: drift 9s ease-in-out infinite;
  opacity: 0;
}
.sparkle.sparkle--green { background: var(--mint); box-shadow: 0 0 10px 2px var(--mint); }
.sparkle.sparkle--paper { background: var(--paper); box-shadow: 0 0 8px 2px var(--paper); width: 2.5px; height: 2.5px; }
@keyframes drift {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  20%  { opacity: 0.9; }
  50%  { opacity: 0.6; transform: translateY(-30px) scale(1); }
  80%  { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-60px) scale(0.7); }
}

/* ============================================================
   HUD
   ============================================================ */
.hud {
  position: absolute; left: 0; right: 0;
  padding: max(env(safe-area-inset-top), 14px) 16px 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
  z-index: 30;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud__brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 14px/1 var(--font-sans);
  color: var(--paper);
  flex: 0 0 auto;
}
.hud__wordmark {
  height: 20px;
  width: auto;
  display: block;
  filter: brightness(1.18) saturate(0.92);
}
.hud__brand .mono {
  font: 500 9px/1 var(--font-mono);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--mint);
  margin-left: 2px;
  padding: 4px 6px;
  border: 1px solid rgba(127,220,167,0.35);
  border-radius: 4px;
}
.hud__progress {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(246,244,238,0.08);
  border: 1px solid rgba(246,244,238,0.16);
  color: var(--paper);
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 7px 11px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex: 0 0 auto;
}
.hud__progress .pdot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(246,244,238,0.18);
  transition: background 240ms ease, box-shadow 240ms ease;
}
.hud__progress .pdot.on {
  background: var(--mint);
  box-shadow: 0 0 0 2.5px rgba(127,220,167,0.18);
}

/* Right-side cluster: lives pill + progress pill, stacked on phones */
.hud__right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Lives, mario-style hearts. Three pink-mint pips that drain to gray on each
   wrong answer. The "lost" heart pulses once via .heart.lost. */
.hud__lives {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(246,244,238,0.08);
  border: 1px solid rgba(246,244,238,0.16);
  color: var(--paper);
  padding: 7px 11px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hud__lives__label {
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  opacity: 0.78;
}
/* On narrow phones, shrink the lives pill so brand + right cluster don't
   collide. Hide the "Lives" label first, then squeeze padding. */
@media (max-width: 420px) {
  .hud__right { gap: 6px; }
  .hud__lives { padding: 6px 9px; gap: 6px; }
  .hud__lives__label { display: none; }
  .heart { font-size: 13px; }
}
@media (max-width: 340px) {
  .hud__lives { padding: 5px 8px; }
  .hud__progress { padding: 6px 9px; font-size: 10px; }
}
.hud__lives__row { display: inline-flex; gap: 4px; align-items: center; }
.heart {
  font-size: 14px;
  line-height: 1;
  transition: color 280ms ease, transform 280ms ease, text-shadow 280ms ease, opacity 280ms ease;
  display: inline-block;
}
.heart.on {
  color: #ff7a8a;
  text-shadow: 0 0 6px rgba(255,122,138,0.45);
}
.heart.off {
  color: rgba(246,244,238,0.22);
  text-shadow: none;
  transform: scale(0.92);
}
/* When a life is JUST lost, the empty slot runs a quick pop+shake so the
   player feels it. We animate the .lost class which is set for ~700ms. */
.heart.lost {
  animation: heart-lost 620ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes heart-lost {
  0%   { transform: scale(1.6); color: #ff7a8a; text-shadow: 0 0 18px rgba(255,122,138,0.95); }
  25%  { transform: scale(1.6) translateX(-3px); }
  45%  { transform: scale(1.6) translateX(3px); }
  70%  { transform: scale(1.2); color: #ff7a8a; text-shadow: 0 0 10px rgba(255,122,138,0.55); }
  100% { transform: scale(0.92); color: rgba(246,244,238,0.22); text-shadow: none; }
}
/* The entire lives pill gives a little nudge whenever its key changes
   (set on every life change + game start). Provides the at-a-glance
   "your lives just updated" cue the user asked for. */
.hud__lives {
  animation: lives-pulse 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes lives-pulse {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,122,138,0.0); }
  35%  { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(255,122,138,0.18); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,122,138,0.0); }
}
@keyframes heart-pop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.45); text-shadow: 0 0 14px rgba(255,122,138,0.9); }
  100% { transform: scale(0.92); }
}

/* ============================================================
   Game Over, out of lives overlay
   ============================================================ */
.gameover {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  z-index: 80;
  background: radial-gradient(120% 80% at 50% 30%, rgba(180,30,40,0.22), rgba(10,16,14,0.92) 65%, rgba(10,16,14,0.98));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: gameover-in 360ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes gameover-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
.gameover__inner {
  max-width: 520px;
  width: 100%;
  text-align: center;
  color: var(--paper);
  animation: gameover-rise 520ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes gameover-rise {
  0%   { opacity: 0; transform: translateY(18px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0)    scale(1); }
}
.gameover__eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: #ff7a8a;
  margin-bottom: 18px;
}
.gameover__eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #ff7a8a; box-shadow: 0 0 0 4px rgba(255,122,138,0.18);
}
.gameover__h {
  margin: 0 0 14px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(82px, 22vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  color: var(--paper);
  text-shadow: 0 6px 40px rgba(255,122,138,0.35);
  animation: gameover-h-slam 720ms cubic-bezier(0.16, 0.9, 0.2, 1.05) both;
}
@keyframes gameover-h-slam {
  0%   { opacity: 0; transform: scale(2.2); letter-spacing: 0.04em; filter: blur(8px); }
  55%  { opacity: 1; transform: scale(0.92); letter-spacing: -0.05em; filter: blur(0); }
  75%  { transform: scale(1.04); }
  100% { transform: scale(1); letter-spacing: -0.035em; }
}
/* On narrow phones the slam keyframe starts at scale(2.2) which can
   crop a 22vw headline against the viewport. Cap the size + tame the
   slam scale so the whole word stays on screen during the animation. */
@media (max-width: 480px) {
  .gameover__h {
    font-size: clamp(56px, 18vw, 96px);
    animation-name: gameover-h-slam-sm;
  }
}
@keyframes gameover-h-slam-sm {
  0%   { opacity: 0; transform: scale(1.5); letter-spacing: 0.04em; filter: blur(6px); }
  55%  { opacity: 1; transform: scale(0.95); letter-spacing: -0.04em; filter: blur(0); }
  75%  { transform: scale(1.03); }
  100% { transform: scale(1); letter-spacing: -0.03em; }
}
.gameover__h em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: #ff7a8a;
}
.gameover__sub {
  margin: 0 auto 24px;
  max-width: 38ch;
  font: 400 15px/1.55 var(--font-sans);
  color: rgba(246,244,238,0.78);
}
.gameover__stats {
  display: inline-flex;
  gap: 10px;
  margin: 0 auto 28px;
  flex-wrap: wrap;
  justify-content: center;
}
.gameover__stat {
  background: rgba(246,244,238,0.06);
  border: 1px solid rgba(246,244,238,0.14);
  border-radius: 14px;
  padding: 12px 16px;
  min-width: 132px;
}
.gameover__stat__num {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1;
  color: var(--paper);
}
.gameover__stat__num span {
  font-family: var(--font-mono);
  font-size: 13px;
  color: rgba(246,244,238,0.5);
  margin-left: 3px;
}
.gameover__stat__lab {
  margin-top: 6px;
  font: 500 9.5px/1 var(--font-mono);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(246,244,238,0.6);
}
.gameover__cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--paper);
  color: #17201C;
  font: 600 15px/1 var(--font-sans);
  padding: 14px 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 8px 30px rgba(255,122,138,0.22), 0 2px 0 rgba(0,0,0,0.15);
}
.gameover__cta:hover { transform: translateY(-1px); }
.gameover__cta:active { transform: translateY(0); }
.gameover__cta .arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
}
.gameover__fine {
  margin-top: 18px;
  font: 500 10px/1.4 var(--font-mono);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(246,244,238,0.45);
}

/* ============================================================
   Intro, the shovel, stuck in the dirt, waiting to dig
   ============================================================ */
.intro {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 0 24px;
  z-index: 20;
}
.intro__eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 18px;
}
.intro__eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 0 4px rgba(127,220,167,0.18);
}
.intro__h {
  margin: 0 0 14px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(40px, 10vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.038em;
  color: var(--paper);
  text-wrap: balance;
  max-width: 14ch;
}
.intro__h em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--mint);
}
.intro__sub {
  margin: 4px 0 36px;
  max-width: 32ch;
  font-size: clamp(14px, 3.6vw, 16px);
  line-height: 1.5;
  color: rgba(246,244,238,0.65);
  text-wrap: pretty;
}

/* Shovel, clickable, glowing, animated */
.shovel-button {
  background: transparent; border: 0; padding: 0; cursor: pointer;
  position: relative;
  display: grid; place-items: center;
  width: clamp(200px, 50vw, 280px);
  height: clamp(200px, 50vw, 280px);
  margin: 0 auto;
}
.shovel-button:focus { outline: none; }
.shovel-button:active { transform: scale(0.96); }

.shovel-button .halo {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(127,220,167,0.22), rgba(127,220,167,0) 70%);
  animation: halo-pulse 2.4s ease-in-out infinite;
}
@keyframes halo-pulse {
  0%, 100% { transform: scale(0.92); opacity: 0.7; }
  50%      { transform: scale(1.08); opacity: 1; }
}
.shovel-button .ring {
  position: absolute; inset: 14%;
  border: 1px solid rgba(127,220,167,0.35);
  border-radius: 50%;
  animation: ring 2.4s ease-out infinite;
}
.shovel-button .ring.r2 { animation-delay: 0.8s; }
@keyframes ring {
  0%   { transform: scale(0.85); opacity: 0.8; }
  100% { transform: scale(1.15); opacity: 0; }
}
.shovel-svg {
  position: relative;
  width: 60%;
  height: 60%;
  transform: rotate(-22deg);
  animation: shovel-wiggle 4.4s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(127,220,167,0.4));
}
@keyframes shovel-wiggle {
  0%, 100% { transform: rotate(-22deg) translateY(0); }
  46%      { transform: rotate(-18deg) translateY(-4px); }
  54%      { transform: rotate(-26deg) translateY(-2px); }
}
.intro__tap {
  margin-top: 22px;
  font-family: var(--font-script);
  font-size: 26px;
  color: var(--mint);
  animation: nudge 1.6s ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); opacity: 0.85; }
  50%      { transform: translateY(-4px); opacity: 1; }
}

/* ============================================================
   Play area, house at center, question card below
   ============================================================ */
.play {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center;
  padding-top: max(env(safe-area-inset-top), 58px);
  padding-bottom: 0;
  z-index: 10;
  overflow: hidden;
}

/* Big paper headline above the house in the "won" state, matches the
   .title-block--reveal vibe from the magic landing (Geist + serif italic em). */
.play-title {
  flex: 0 0 auto;
  width: 100%;
  max-width: 540px;
  padding: 4px 24px 6px;
  text-align: center;
  pointer-events: none;
  z-index: 12;
}
.play-title__eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--amber);
}
.play-title__eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 0 4px rgba(229,182,74,0.18);
}
.play-title__h {
  margin: 10px 0 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(28px, 7.2vw, 46px);
  line-height: 1;
  letter-spacing: -0.032em;
  color: var(--paper);
  text-wrap: balance;
  text-shadow: 0 2px 30px rgba(0,0,0,0.6);
}
.play-title__h em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--amber);
}

.house-zone {
  position: relative;
  width: 100%;
  max-width: 560px;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px 0;
}
.house-zone__ground-light {
  position: absolute;
  left: 50%; bottom: 6%;
  transform: translateX(-50%);
  width: 76%; height: 40px;
  background: radial-gradient(ellipse at center, rgba(127,220,167,0.18), rgba(127,220,167,0) 70%);
  pointer-events: none;
  z-index: 0;
}
.house-svg {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: min(86vw, 460px);
  max-height: 100%;
  display: block;
  z-index: 1;
  /* Let the SVG scale to fit its container without forcing aspect-ratio */
}

/* House piece entrance, drop, bounce, settle */
.piece {
  opacity: 0;
  transform-origin: center bottom;
  transform: translateY(-40px) scale(0.92);
}
.piece.shown {
  animation: piece-drop 700ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes piece-drop {
  0%   { opacity: 0; transform: translateY(-40px) scale(0.92); }
  60%  { opacity: 1; transform: translateY(4px) scale(1.02); }
  80%  { transform: translateY(-2px) scale(0.99); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
/* The door is the last piece, gets a glow when revealed */
.piece--door.shown {
  animation: piece-drop 700ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             door-glow 1.8s ease-in-out 700ms infinite;
}
@keyframes door-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(229,182,74,0)); }
  50%      { filter: drop-shadow(0 0 22px rgba(229,182,74,0.8)) drop-shadow(0 0 8px rgba(229,182,74,0.6)); }
}

/* Confetti / spark burst on correct answer */
.spark {
  position: absolute;
  left: 50%; top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mint);
  pointer-events: none;
  animation: spark-burst 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.spark.amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.spark.mint  { box-shadow: 0 0 8px var(--mint); }
@keyframes spark-burst {
  0%   { transform: translate(-50%, -50%) translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}

/* House shake on wrong answer */
.house-zone.shake .house-svg {
  animation: shake 360ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-6px); }
  40%, 60% { transform: translateX(6px); }
}

/* Door is clickable on win */
.door-hit {
  cursor: pointer;
}

/* ============================================================
   Question card (paper, slides up from bottom)
   ============================================================ */
.qcard {
  flex: 0 0 auto;
  width: 100%;
  max-width: 540px;
  padding: 0 12px;
  z-index: 11;
}
.qcard__inner {
  background: var(--paper);
  color: var(--ink);
  border-radius: 22px 22px 0 0;
  padding: 18px 20px max(env(safe-area-inset-bottom), 18px);
  box-shadow: 0 -22px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(20,30,25,0.18);
  animation: qcard-rise 520ms cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}
@media (min-width: 560px) {
  .qcard__inner {
    border-radius: 22px;
    margin-bottom: 14px;
    box-shadow: 0 22px 60px rgba(0,0,0,0.45), 0 0 0 1px rgba(20,30,25,0.18);
  }
}
@keyframes qcard-rise {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.qcard__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.qcard__kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--green-deep);
}
.qcard__kicker::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 4px rgba(47,143,94,0.14);
}
.qcard__count {
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--ink-dim);
}
.qcard__count b { color: var(--ink); font-weight: 600; }

.qcard__h {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(18px, 4.4vw, 22px);
  line-height: 1.18;
  letter-spacing: -0.016em;
  color: var(--ink);
  text-wrap: balance;
}
.qcard__h em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--green-deep);
}

.qcard__opts {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex; flex-direction: column;
  gap: 8px;
}
.opt {
  display: grid;
  grid-template-columns: 26px 1fr 22px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 13px;
  background: var(--paper-2);
  border: 1.5px solid var(--hair);
  cursor: pointer;
  text-align: left;
  font: 500 14.5px/1.3 var(--font-sans);
  color: var(--ink);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
  font-family: var(--font-sans);
  min-height: 46px;
}
.opt:hover { background: var(--paper); border-color: var(--hair-2); }
.opt:active { transform: scale(0.985); }
.opt:focus-visible { outline: none; border-color: var(--green-deep); box-shadow: 0 0 0 3px rgba(58,107,69,0.18); }
.opt.highlighted {
  background: var(--paper);
  border-color: var(--green-deep);
  box-shadow: 0 0 0 3px rgba(58,107,69,0.18);
}
.opt.highlighted .opt__letter {
  background: var(--green-deep);
  color: var(--paper);
  border-color: var(--green-deep);
}
.opt__letter {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  background: var(--paper-3);
  border: 1px solid var(--hair);
}
.opt__mark {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 160ms ease;
}
.opt__mark svg { width: 14px; height: 14px; }

.opt.correct {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green-deep);
}
.opt.correct .opt__letter {
  background: var(--green-deep);
  color: var(--paper);
  border-color: var(--green-deep);
}
.opt.correct .opt__mark { opacity: 1; color: var(--green-deep); }

.opt.wrong {
  background: rgba(178,58,46,0.08);
  border-color: rgba(178,58,46,0.45);
  color: var(--crimson);
  animation: shake 360ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
.opt.wrong .opt__letter {
  background: var(--crimson);
  color: var(--paper);
  border-color: var(--crimson);
}
.opt.wrong .opt__mark { opacity: 1; color: var(--crimson); }
.opt:disabled,
.opt.locked {
  cursor: default;
}

.qcard__foot {
  margin-top: 12px;
  display: flex; justify-content: space-between; align-items: center;
  min-height: 28px;
  gap: 10px;
}
.qcard__hint {
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  min-width: 0;
}
.qcard__hint.miss { color: var(--crimson); }
.qcard__hint.hit  { color: var(--green-deep); }
.qcard__hint b { font-weight: 600; }

.qcard__continue {
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 500 12.5px/1 var(--font-sans);
  letter-spacing: -0.005em;
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 160ms ease, transform 160ms ease;
  flex: none;
}
.qcard__continue:hover { background: var(--green-deep); }
.qcard__continue:active { transform: scale(0.97); }
.qcard__continue svg { width: 12px; height: 12px; }

/* The fact strip, shown after correct answer */
.fact {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--green-soft);
  border: 1px solid rgba(47,143,94,0.25);
  font: 500 12.5px/1.4 var(--font-sans);
  color: var(--green-deep);
  display: flex; align-items: flex-start; gap: 10px;
}
.fact__icon {
  flex: none;
  width: 16px; height: 16px;
  display: grid; place-items: center;
  margin-top: 1px;
  color: var(--green-deep);
}
.fact__icon svg { width: 16px; height: 16px; }

/* ============================================================
   Win overlay
   ============================================================ */
.win {
  position: fixed; inset: 0;
  z-index: 200;
  background: var(--paper);
  color: var(--ink);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: expand-in 700ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes expand-in {
  0%   { clip-path: circle(0% at 50% 70%); opacity: 0.6; }
  100% { clip-path: circle(150% at 50% 70%); opacity: 1; }
}
.win__inner {
  min-height: 100%;
  display: flex; flex-direction: column;
  padding: max(env(safe-area-inset-top), 24px) 28px max(env(safe-area-inset-bottom), 28px);
  max-width: 560px;
  margin: 0 auto;
}
.win__top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.win__brand { display: inline-flex; align-items: center; gap: 9px; }
.win__wordmark { height: 26px; }
.win__close {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(20,30,25,0.06);
  border: 1px solid var(--hair);
  color: var(--ink);
  cursor: pointer;
}
.win__close svg { width: 16px; height: 16px; }

.win__seal {
  margin: 8px auto 20px;
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--amber-soft);
  display: grid; place-items: center;
  position: relative;
}
.win__seal::before {
  content: ""; position: absolute; inset: 6px;
  border-radius: 50%;
  border: 1px dashed rgba(229,182,74,0.5);
  animation: spin 12s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.win__seal svg { width: 44px; height: 44px; color: var(--amber-deep); }

.win__kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 14px;
}
.win__kicker::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 0 4px rgba(229,182,74,0.18);
}
.win__h {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(36px, 9.5vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.034em;
  color: var(--ink);
  text-wrap: balance;
}
.win__h em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--amber-deep);
}
.win__sub {
  margin-top: 18px;
  font-size: clamp(15px, 3.8vw, 17px);
  line-height: 1.5;
  color: var(--ink-mute);
  max-width: 46ch;
  text-wrap: pretty;
}
.win__sub b { color: var(--ink); font-weight: 500; }

.win__prize {
  margin-top: 24px;
  background: linear-gradient(180deg, #FFF6E0 0%, #F5E9CB 100%);
  border: 1.5px solid rgba(138,101,19,0.3);
  border-radius: 18px;
  padding: 22px 22px 18px;
  position: relative;
  overflow: hidden;
}
.win__prize::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(138,101,19,0.03) 0 2px, transparent 2px 6px);
  pointer-events: none;
}
.win__prize__tag {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 10px;
}
.win__prize__tag::before { content: "★"; font-size: 14px; line-height: 1; }
.win__prize__value {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: #2C231A;
}
.win__prize__fine {
  margin-top: 8px;
  font: 500 11px/1.5 var(--font-mono);
  letter-spacing: 0.04em;
  color: #6A5728;
}

.win__points {
  margin: 26px 0 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 12px;
}
.win__points li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}
.win__points li::before {
  content: "·";
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  color: var(--amber-deep);
  text-align: center;
}

.win__footer {
  margin-top: auto;
  padding-top: 32px;
  display: flex; flex-direction: column; gap: 12px;
}
.win__cta {
  display: inline-flex; align-items: center; justify-content: space-between;
  width: 100%;
  height: 60px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font: 500 16px/1 var(--font-sans);
  background: var(--amber-deep);
  color: #FFF6E0;
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(138,101,19,0.32);
  font-family: var(--font-sans);
  transition: transform 160ms ease, background 160ms ease;
}
.win__cta:active { transform: scale(0.98); }
.win__cta:hover { background: #6E4F0E; }
.win__cta--ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hair-2);
}
.win__cta--ghost:hover { background: rgba(20,30,25,0.04); }
.win__cta .arrow {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
}
.win__cta--ghost .arrow { background: rgba(20,30,25,0.08); }
.win__cta .arrow svg { width: 14px; height: 14px; }

/* ============================================================
   Claim sheet
   ============================================================ */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 300;
  animation: fade-in 240ms ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 310;
  background: var(--paper);
  color: var(--ink);
  border-radius: 28px 28px 0 0;
  padding: 14px 24px max(env(safe-area-inset-bottom), 24px);
  max-height: 92dvh;
  overflow-y: auto;
  animation: slide-up 360ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -20px 60px rgba(0,0,0,0.4);
}
@keyframes slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

@media (min-width: 720px) {
  .sheet {
    left: 50%;
    right: auto;
    bottom: 50%;
    transform: translate(-50%, 50%);
    width: 480px;
    max-height: 86dvh;
    border-radius: 22px;
    animation: pop-in 360ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  @keyframes pop-in {
    from { transform: translate(-50%, 60%); opacity: 0; }
    to   { transform: translate(-50%, 50%); opacity: 1; }
  }
}

.sheet__handle { width: 44px; height: 4px; margin: 6px auto 16px; background: var(--hair-2); border-radius: 999px; }
.sheet__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet__kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--amber-deep);
}
.sheet__kicker::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 0 4px rgba(229,182,74,0.18);
}
.sheet__close {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(20,30,25,0.06);
  border: 1px solid var(--hair);
  color: var(--ink);
  cursor: pointer;
}
.sheet__close svg { width: 14px; height: 14px; }
.sheet__h {
  margin: 8px 0 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 30px;
  line-height: 1.04;
  letter-spacing: -0.028em;
  color: var(--ink);
}
.sheet__h em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--amber-deep); }
.sheet__sub { margin: 12px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-mute); }

.sheet__form { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font: 500 10.5px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.field input {
  font: 400 15px/1.4 var(--font-sans);
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--hair-2);
  border-radius: 12px;
  padding: 13px 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  font-family: var(--font-sans);
}
.field input:focus {
  border-color: var(--amber-deep);
  box-shadow: 0 0 0 4px rgba(229,182,74,0.18);
}
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sheet__submit {
  margin-top: 6px;
  height: 56px;
  border: 0;
  border-radius: 999px;
  background: var(--amber-deep);
  color: #FFF6E0;
  font: 500 15.5px/1 var(--font-sans);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-sans);
  transition: background 160ms ease;
}
.sheet__submit:hover { background: #6E4F0E; }
.sheet__fine {
  margin-top: 8px;
  font: 500 10px/1.5 var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  text-align: center;
}

.sheet__success { text-align: center; padding: 8px 0 12px; }
.sheet__success__seal {
  margin: 8px auto 18px;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--amber-soft);
  display: grid; place-items: center;
  position: relative;
}
.sheet__success__seal::before {
  content: ""; position: absolute; inset: 6px;
  border-radius: 50%;
  border: 1px dashed rgba(229,182,74,0.5);
  animation: spin 14s linear infinite;
}
.sheet__success__seal svg { width: 32px; height: 32px; color: var(--amber-deep); }
.sheet__signature {
  font-family: var(--font-script);
  font-size: 38px;
  color: var(--amber-deep);
  line-height: 1;
  margin-top: 8px;
}

/* ============================================================
   Responsive tweaks, keep house + question card in view on every phone
   ============================================================ */

/* Very small phones, hide the FL tag on the progress badge to make room */
@media (max-width: 380px) {
  .hud__brand .mono { display: none; }
  .hud__progress { padding: 6px 9px; font-size: 10px; }
  .hud__progress .pdot { width: 4px; height: 4px; }
  .qcard__inner { padding: 14px 16px max(env(safe-area-inset-bottom), 14px); }
  .opt { padding: 11px 12px; font-size: 14px; min-height: 44px; }
  .qcard__h { font-size: 17px; }
}

/* Short viewports (landscape phones, iPad with chrome) */
@media (max-height: 760px) {
  .play { padding-top: max(env(safe-area-inset-top), 52px); }
  .play-title { padding: 0 24px 2px; }
  .play-title__h { font-size: clamp(24px, 6vw, 36px); }
  .house-zone { padding-top: 0; }
  .qcard__inner { padding: 14px 18px max(env(safe-area-inset-bottom), 14px); }
  .qcard__opts { gap: 7px; margin-top: 12px; }
  .opt { padding: 10px 12px; font-size: 14px; min-height: 42px; }
  .qcard__h { font-size: clamp(16px, 4vw, 19px); }
  .fact { padding: 8px 12px; font-size: 12px; margin-top: 8px; }
  .qcard__foot { margin-top: 10px; min-height: 24px; }
}
@media (max-height: 640px) {
  .play { padding-top: max(env(safe-area-inset-top), 46px); }
  .hud { padding-top: max(env(safe-area-inset-top), 8px); }
  .hud__wordmark { height: 17px; }
  .play-title__h { font-size: clamp(20px, 5vw, 30px); }
  .play-title__eyebrow { font-size: 9px; }
  .qcard__h { font-size: 15.5px; }
  .opt { padding: 9px 12px; font-size: 13.5px; min-height: 40px; }
  .qcard__opts { gap: 6px; }
  .fact { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sparkle, .shovel-svg, .shovel-button .ring, .shovel-button .halo,
  .piece, .piece.shown, .piece--door.shown, .intro__tap {
    animation: none !important;
  }
}


/* ---- next block ---- */


/* iOS Safari zooms the page when a focused input's font-size is under 16px,
   which lets the page pan sideways. 16px controls on phones prevent the zoom;
   overflow-x:clip stops sideways panning from decorative elements (clip,
   unlike hidden, creates no scroll container). */
html,body{overflow-x:clip;}
@media (max-width:809px){
  input,select,textarea{font-size:16px !important;}
}
