/* FactDash styles: mobile-first, big tap targets, gentle motion (off when reduced motion is on). */

:root {
  --blue: #3d5afe;
  --blue-700: #2236b8;
  --blue-100: #dde3ff;
  --blue-50: #eef1ff;
  --sun: #ffb703;
  --sun-300: #ffc93c;
  --sun-50: #fff6db;
  --coral: #ff6b6b;
  --mint: #12b886;
  --mint-700: #0a7655;
  --mint-50: #e3f9f1;
  --grape: #6d3df5;
  --grape-50: #f1ecff;
  --ink: #1b1f3b;
  --ink-2: #474c6b;
  --ink-3: #6b7090;
  --paper: #ffffff;
  --bg: #f3f5ff;
  --line: #e3e6f5;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius: 18px;
  --shadow-card: 0 2px 0 rgba(27, 31, 59, 0.05), 0 12px 30px rgba(43, 54, 140, 0.1);
  --font-display: 'Baloo 2', 'Nunito', ui-rounded, 'Arial Rounded MT Bold', system-ui, sans-serif;
  --font-body: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tap: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(circle at 1px 1px, rgba(61, 90, 254, 0.09) 1.2px, transparent 0);
  background-size: 22px 22px;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0;
}

p {
  margin: 0;
}

img,
svg {
  max-width: 100%;
}

.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  vertical-align: -0.2em;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
}
.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 4px solid var(--sun);
  outline-offset: 3px;
}
/* Headings get focus on screen changes (for screen readers); they don't need a ring. */
h1[tabindex='-1']:focus {
  outline: none;
}

[hidden] {
  display: none !important;
}

/* ---------------- layout ---------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 16px 4px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 40px;
  height: 40px;
}
.brand-name {
  font: 800 1.6rem/1 var(--font-display);
  letter-spacing: -0.01em;
}
.brand-name span {
  color: var(--blue);
}

.wallet-chip,
.coin-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 800 1.2rem/1 var(--font-display);
  text-decoration: none;
  box-shadow: 0 3px 0 var(--line);
}
.wallet-chip .ico,
.coin-chip .ico {
  width: 26px;
  height: 26px;
}

.main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px 24px;
}
body[data-screen='shop'] .main,
body[data-screen='board'] .main {
  max-width: 980px;
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: screen-in 0.25s ease-out;
}

.footer {
  text-align: center;
  padding: 12px 16px max(16px, env(safe-area-inset-bottom));
  color: var(--ink-3);
  font-size: 0.95rem;
}

/* The Dash gets the whole screen: no top bar, no footer. */
body[data-screen='dash'] .topbar,
body[data-screen='dash'] .footer {
  display: none;
}

.card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.boot {
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 18vh 0;
  color: var(--ink-2);
  font-size: 1.2rem;
}
.boot-mark {
  animation: bob 1.2s ease-in-out infinite;
}

.noscript {
  text-align: center;
}

/* ---------------- buttons ---------------- */

.btn {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--tap);
  padding: 0 1.4rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 800 1.15rem/1 var(--font-display);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  box-shadow: 0 5px 0 var(--line);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--line);
}
.btn .ico {
  width: 1.4em;
  height: 1.4em;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 0 var(--blue-700);
}
.btn-primary:active {
  box-shadow: 0 2px 0 var(--blue-700);
}
.btn-soft {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 5px 0 var(--blue-100), inset 0 0 0 3px var(--blue-100);
}
.btn-soft:active {
  box-shadow: 0 1px 0 var(--blue-100), inset 0 0 0 3px var(--blue-100);
}
.btn-ghost {
  background: transparent;
  box-shadow: none;
  color: var(--ink-2);
  padding: 0 0.8rem;
}
.btn-ghost:active {
  box-shadow: none;
}
.btn-lg {
  min-height: 64px;
  font-size: 1.3rem;
  padding: 0 1.8rem;
}
.btn-xl {
  width: 100%;
  max-width: 420px;
  min-height: 92px;
  font-size: 2.1rem;
  border-radius: 30px;
  box-shadow: 0 8px 0 var(--blue-700);
}
.btn-xl:active {
  box-shadow: 0 3px 0 var(--blue-700);
  transform: translateY(5px);
}
.btn-sm {
  min-height: 44px;
  font-size: 1rem;
  padding: 0 1rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #fff;
  color: var(--ink-2);
  box-shadow: 0 4px 0 var(--line);
}
.icon-btn .ico {
  width: 28px;
  height: 28px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--sun-50);
  font: 800 1.1rem/1.2 var(--font-display);
}
.chip .ico {
  width: 26px;
  height: 26px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 0.95rem;
}
.pill-owned {
  background: var(--mint-50);
  color: var(--mint-700);
}

.meter {
  display: block;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: var(--blue-50);
  overflow: hidden;
  box-shadow: inset 0 0 0 2px var(--blue-100);
}
.meter > span {
  display: block;
  height: 100%;
  min-width: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sun), #ff8a3d);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.5rem;
}
.section-title .ico {
  width: 30px;
  height: 30px;
}

.screen-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
.screen-head > :first-child {
  justify-self: start;
}
.screen-head > :last-child {
  justify-self: end;
}
.screen-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 2rem;
}
.screen-title .ico {
  width: 34px;
  height: 34px;
  color: var(--blue);
}

/* ---------------- start screen ---------------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 28px 20px 26px;
  border-radius: var(--radius-xl);
}
.hero-art {
  width: 170px;
  height: 170px;
}
.hero-art .mascot {
  width: 100%;
  height: 100%;
  animation: bob 2.4s ease-in-out infinite;
}
.hero-medal .medal {
  width: 150px;
  height: 175px;
}
.hero-title {
  font-size: clamp(2rem, 7vw, 2.8rem);
}
.hero-sub {
  color: var(--ink-2);
  font-size: 1.25rem;
}
.hero-action {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.hero-action.is-stacked {
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Play again, at the bottom of the results card */
.play-again {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.play-again-sub {
  margin: 0;
  font: 800 1.05rem/1.3 var(--font-display);
  color: var(--grape);
  text-align: center;
}

.side-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.goal {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--ink);
}
.goal--pick {
  justify-content: center;
  color: var(--ink-2);
  font-size: 1.1rem;
}
.goal--pick .ico {
  width: 30px;
  height: 30px;
}
.goal-art {
  flex: none;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 18px;
  background: var(--sun-50);
}
.goal-art img {
  width: 64px;
  max-height: 64px;
  object-fit: contain;
}
.goal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.goal-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: 0.95rem;
}
.goal-text {
  font: 800 1.2rem/1.2 var(--font-display);
}

/* ---------------- the Dash ---------------- */

.dash-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding-top: max(4px, env(safe-area-inset-top));
}

.track-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.track {
  --p: 0;
  position: relative;
  height: 44px;
}
.track-line {
  position: absolute;
  left: 0;
  right: 30px;
  top: 50%;
  height: 16px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 3px var(--blue-100);
  overflow: hidden;
}
.track-fill {
  width: calc(var(--p) * 100%);
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sun), #ff8a3d);
  transition: width 0.4s ease;
}
.track-runner {
  position: absolute;
  top: 50%;
  left: calc((100% - 30px) * var(--p));
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%);
  transition: left 0.4s ease;
  filter: drop-shadow(0 3px 0 rgba(27, 31, 59, 0.15));
}
.track-runner .ico,
.track-flag .ico {
  width: 100%;
  height: 100%;
}
.track-flag {
  position: absolute;
  right: 0;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translateY(-65%);
}
.track-count {
  font: 800 1.1rem/1 var(--font-display);
  white-space: nowrap;
  color: var(--ink-2);
  text-align: center;
  padding-right: 30px;
}

.problem-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 26px 12px;
  border-radius: var(--radius-xl);
}
.problem-card.is-in {
  animation: card-in 0.25s ease-out;
}
.tag {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--grape-50);
  color: var(--grape);
  font: 800 0.95rem/1.3 var(--font-display);
}
.problem {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.3em;
  font: 800 clamp(2.9rem, 13vw, 5.6rem) / 1 var(--font-display);
  letter-spacing: -0.01em;
}
.po {
  color: var(--blue);
}
.answer-box {
  min-width: 2.1em;
  padding: 0.12em 0.25em 0.04em;
  border-radius: 22px;
  border: 4px dashed var(--blue-100);
  background: var(--blue-50);
  color: #aab3e6;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.answer-box.has-value {
  border-style: solid;
  border-color: var(--blue);
  background: #fff;
  color: var(--ink);
}
.answer-box.is-waiting {
  animation: glow 0.6s ease;
}
.answer-box.is-right {
  border-color: var(--mint);
  background: var(--mint-50);
  color: var(--mint-700);
  animation: pop 0.35s ease;
}
.answer-box.is-reveal {
  border-style: solid;
  border-color: var(--grape);
  background: var(--grape-50);
  color: var(--grape);
}

.burst {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding-top: 10px;
  pointer-events: none;
  opacity: 0;
}
.burst.is-on {
  animation: burst 0.75s ease-out forwards;
}
.burst-star .ico {
  width: 40px;
  height: 40px;
}
.burst-text {
  font: 800 1.6rem/40px var(--font-display);
  color: var(--mint-700);
}
.burst-coins {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 800 1.3rem/40px var(--font-display);
  color: #b86e00;
}
.burst-coins .ico {
  width: 28px;
  height: 28px;
}

.pad-area {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.key {
  appearance: none;
  min-height: 66px;
  border: 3px solid var(--blue-100);
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  font: 800 2.1rem/1 var(--font-display);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  box-shadow: 0 5px 0 var(--blue-100);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.key:active,
.key.is-pressed {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--blue-100);
}
.key-clear {
  background: var(--blue-50);
  color: var(--ink-2);
  font-size: 1.25rem;
}
.key-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-color: transparent;
  background: #0e9f73;
  color: #fff;
  font-size: 1.6rem;
  box-shadow: 0 5px 0 var(--mint-700);
}
.key-go:active,
.key-go.is-pressed {
  box-shadow: 0 1px 0 var(--mint-700);
}
.key-go .ico {
  width: 30px;
  height: 30px;
}

/* After a miss: the fact with its answer on top, the same problem again underneath to type. */
.problem-card.is-learning {
  gap: 10px;
  padding-top: 54px;
}
.problem-card.is-learning .problem {
  font-size: clamp(2.2rem, 9.5vw, 4.2rem);
}
.learn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding-top: 12px;
  border-top: 3px dashed #e1d6ff;
  animation: card-in 0.25s ease-out;
}
.learn-line {
  font: 800 1.2rem/1.3 var(--font-display);
  color: var(--grape);
  text-align: center;
}

@media (min-height: 760px) {
  .key {
    min-height: 78px;
  }
  .problem-card {
    min-height: 230px;
  }
}

@media (max-height: 640px) {
  .problem-card {
    min-height: 150px;
    padding: 20px 10px;
  }
  .key {
    min-height: 56px;
  }
}

/* iPad / desktop in landscape: problem on the left, keypad on the right. */
@media (min-width: 900px) and (orientation: landscape) {
  body[data-screen='dash'] .main {
    max-width: 1080px;
  }
  #screen-dash {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    grid-template-areas: 'top top' 'card pad';
    align-items: center;
    gap: 24px;
  }
  #screen-dash .dash-top {
    grid-area: top;
  }
  #screen-dash .problem-card {
    grid-area: card;
    min-height: 340px;
  }
  #screen-dash .pad-area {
    grid-area: pad;
  }
}

/* ---------------- results ---------------- */

.results {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  border-radius: var(--radius-xl);
}
.results-title {
  font-size: clamp(1.9rem, 6.5vw, 2.6rem);
}
.results-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.medal-wrap .medal {
  width: 140px;
  height: 163px;
  animation: medal-in 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
.badge-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
}
.badge-name {
  font-size: 2rem;
  color: var(--blue);
}
.badge-msg {
  color: var(--ink-2);
  font-size: 1.15rem;
}
.score {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
}
.score-num {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
}
.score-of {
  font-size: 1.6rem;
  color: var(--ink-2);
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 10px;
  width: 100%;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 6px;
  line-height: 1.2;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink-2);
}
.stat .ico {
  width: 34px;
  height: 34px;
}
.stat b {
  font: 800 1.8rem/1.1 var(--font-display);
  color: var(--ink);
}

.nextup {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nextup-sub {
  color: var(--ink-2);
}
.fact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fact-chip {
  padding: 8px 14px;
  border-radius: 14px;
  background: var(--grape-50);
  color: var(--grape);
  font: 800 1.35rem/1 var(--font-display);
}
.all-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
}
.levelup {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--sun-50);
  font: 800 1.15rem/1.3 var(--font-display);
}

/* ---------------- shop ---------------- */

.wallet-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  background: linear-gradient(135deg, var(--sun-50), #fff);
}
.wallet-big {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
}
.wallet-big .ico {
  width: 44px;
  height: 44px;
}
.wallet-big b {
  font-size: 2.4rem;
  line-height: 1;
}
.wallet-big span {
  font-size: 1.2rem;
  color: var(--ink-2);
}
.wallet-hint {
  color: var(--ink-2);
}

.shelf {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shelf-title {
  font-size: 1.5rem;
  padding-left: 4px;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 14px;
}
.item-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 12px 16px;
  border-radius: 22px;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.item-card.is-goal {
  box-shadow: 0 0 0 4px var(--sun), var(--shadow-card);
}
.goal-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--sun);
  font: 800 0.85rem/1.4 var(--font-display);
  white-space: nowrap;
  z-index: 1;
}
.goal-star {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(27, 31, 59, 0.12);
}
.goal-star .ico {
  width: 30px;
  height: 30px;
}
.item-art {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  background: var(--blue-50);
}
.item-art img {
  width: 78%;
  max-height: 78%;
  object-fit: contain;
}
.item-art--scene img {
  width: 100%;
  max-height: none;
  border-radius: 14px;
}
.item-name {
  font-size: 1.15rem;
}
.item-price {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 800 1.25rem/1 var(--font-display);
}
.item-price .ico {
  width: 24px;
  height: 24px;
}
.item-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: auto;
}
.btn-buy {
  width: 100%;
}
.save-label {
  font: 800 1.05rem/1.2 var(--font-display);
  color: var(--blue-700);
}
.meter-text {
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* ---------------- modal ---------------- */

.modal {
  width: min(92vw, 440px);
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 30px;
  color: var(--ink);
  box-shadow: 0 30px 60px rgba(27, 31, 59, 0.3);
}
.modal::backdrop {
  background: rgba(27, 31, 59, 0.45);
}
.modal[open] {
  animation: card-in 0.22s ease-out;
}
.modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 26px 22px 24px;
  text-align: center;
}
.modal-art {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border-radius: 26px;
  background: var(--blue-50);
}
.modal-art img {
  width: 82%;
  max-height: 82%;
  object-fit: contain;
}
.modal-art--scene {
  width: 220px;
  height: 165px;
}
.modal-art--scene img {
  width: 100%;
  max-height: none;
  border-radius: 20px;
}
.modal-art--icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  color: var(--grape);
}
.modal-art--icon svg {
  width: 64px;
  height: 64px;
}
.modal-art.is-bouncy img {
  animation: medal-in 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
.modal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
}
.modal-title {
  font-size: 1.7rem;
}
.modal-sub {
  color: var(--ink-2);
  font-size: 1.15rem;
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 6px;
}

/* ---------------- My Board ---------------- */

.board-frame {
  padding: 10px;
  border-radius: 28px;
  background: linear-gradient(145deg, #c98d52, #a8703c);
  box-shadow: var(--shadow-card), inset 0 2px 0 rgba(255, 255, 255, 0.3);
}
.board {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.18);
}
@supports not (aspect-ratio: 4 / 3) {
  .board {
    height: 0;
    padding-bottom: 75%;
  }
}
.board--cork {
  background-color: #d9a066;
  background-image: radial-gradient(rgba(120, 70, 20, 0.28) 1.2px, transparent 1.7px),
    radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1.5px);
  background-size: 14px 14px, 19px 19px;
  background-position: 0 0, 7px 9px;
}
.board--color {
  background-image: radial-gradient(rgba(255, 255, 255, 0.5) 1.5px, transparent 2px);
  background-size: 22px 22px;
}
.board--scene {
  background-size: cover;
  background-position: center;
}
.board-item {
  position: absolute;
  padding: 0;
  border: 0;
  background: none;
  cursor: grab;
  touch-action: none;
  transform: translate(-50%, -50%);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.board-item img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.board-item:focus-visible {
  outline-offset: 2px;
  border-radius: 12px;
}
.board-item.is-dragging {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.1) rotate(-3deg);
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.25));
  transition: none;
}
.board-item.is-new {
  animation: place-in 0.4s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
.board-item.is-leaving {
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.board-item.is-hello {
  animation: hello 0.5s ease;
}
.board-hint {
  text-align: center;
  color: var(--ink-2);
}

.board-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.bg-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  flex: 1 1 320px;
  min-width: 0;
}
.bg-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 6px 14px 6px 6px;
  border: 3px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 800 1rem/1 var(--font-display);
  cursor: pointer;
}
.bg-chip.is-active {
  border-color: var(--blue);
  background: var(--blue-50);
}
.bg-chip--round {
  padding: 4px;
  min-height: 0;
}
.bg-chip--round.is-active {
  box-shadow: 0 0 0 3px var(--blue-50);
}
.bg-swatch {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(27, 31, 59, 0.12);
}
.bg-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bg-swatch--cork {
  background-color: #d9a066;
  background-image: radial-gradient(rgba(120, 70, 20, 0.35) 1.2px, transparent 1.7px);
  background-size: 8px 8px;
}

.stuff {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stuff-tray {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.tray-item {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  padding: 10px;
  border: 3px solid var(--blue-100);
  border-radius: 22px;
  background: var(--blue-50);
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 4px 0 var(--blue-100);
}
.tray-item:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--blue-100);
}
.tray-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.tray-item.is-out {
  background: #fff;
  border-style: dashed;
}
.tray-count {
  position: absolute;
  top: -10px;
  right: -10px;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font: 800 1.05rem/32px var(--font-display);
  text-align: center;
}
.tray-item.is-out .tray-count {
  background: var(--mint);
}
.tray-empty,
.tray-note {
  color: var(--ink-2);
  font-size: 1.1rem;
}
.tray-note {
  width: 100%;
}

/* ---------------- confetti ---------------- */

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 50;
}
.confetti-bit {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 14px;
  border-radius: 3px;
  animation: confetti-fall 2.4s ease-in forwards;
}

/* ---------------- admin page ---------------- */

.admin .main {
  max-width: 900px;
}
.admin-title {
  font-size: 2rem;
}
.admin-lead {
  color: var(--ink-2);
  font-weight: 600;
}
.admin .card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.admin h2 {
  font-size: 1.4rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-wide {
  grid-column: 1 / -1;
}
.field label,
.field .label {
  font-size: 0.95rem;
  color: var(--ink-2);
}
.field input[type='text'],
.field input[type='number'],
.field input[type='password'],
.field select {
  min-height: 48px;
  padding: 0 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: 700 1.05rem var(--font-body);
}
.field input:focus,
.field select:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 4px var(--blue-100);
}
.field .help {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-3);
}
.field .help.is-alert {
  color: #b42318;
}
.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  font-weight: 700;
  cursor: pointer;
}
.toggle input {
  width: 26px;
  height: 26px;
  accent-color: var(--blue);
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.admin-status {
  font-weight: 700;
}
.admin-status.is-ok {
  color: var(--mint-700);
}
.admin-status.is-alert {
  color: #b42318;
}
.pin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.pin-row .field {
  flex: 1;
  min-width: 180px;
}
.table-wrap {
  overflow-x: auto;
}
.history {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}
.history th,
.history td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.history th {
  color: var(--ink-3);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.history td.num {
  font-variant-numeric: tabular-nums;
}
.history .muted {
  color: var(--ink-3);
  font-weight: 600;
}
.preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.preview-list li {
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--blue-50);
  font: 800 1rem/1 var(--font-display);
}
.preview-list li.is-nextup {
  background: var(--grape-50);
  color: var(--grape);
}
.preview-list li.is-focus {
  background: var(--sun-50);
}
.note {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-3);
}

/* ---------------- motion ---------------- */

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}
@keyframes bob {
  50% {
    transform: translateY(-8px);
  }
}
@keyframes pop {
  40% {
    transform: scale(1.15);
  }
}
@keyframes glow {
  50% {
    box-shadow: 0 0 0 8px var(--sun-50);
    border-color: var(--sun);
  }
}
@keyframes burst {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.7);
  }
  25% {
    opacity: 1;
    transform: translateY(-4px) scale(1.08);
  }
  70% {
    opacity: 1;
    transform: translateY(-8px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-16px) scale(1);
  }
}
@keyframes medal-in {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(-12deg);
  }
}
@keyframes place-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
  }
}
@keyframes hello {
  30% {
    transform: translate(-50%, -50%) scale(1.15);
  }
  60% {
    transform: translate(-50%, -50%) scale(0.95);
  }
}
@keyframes confetti-fall {
  0% {
    transform: translate(0, 0) rotate(0);
    opacity: 1;
  }
  100% {
    transform: translate(var(--drift, 0), 105vh) rotate(var(--spin, 360deg));
    opacity: 0.9;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .burst.is-on {
    animation: none;
    opacity: 1;
  }
}

/* ---------------- small phones ---------------- */

@media (max-width: 420px) {
  .screen-head .btn-ghost span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .screen-title {
    font-size: 1.7rem;
  }
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .item-card {
    padding: 12px 8px 14px;
  }
  .side-actions .btn {
    padding: 0 0.6rem;
    font-size: 1.12rem;
    gap: 0.35rem;
    white-space: nowrap;
  }
  .dash-top {
    gap: 8px;
  }
  .tray-item {
    width: 80px;
    height: 80px;
  }
}

/* ---------------- kid app: gate screens ---------------- */

.gate-grownups {
  text-align: center;
  font-size: 0.95rem;
}
.gate-grownups a {
  color: var(--ink-3);
}

/* kid login (username + PIN) */
.kid-login {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 360px;
  margin: 6px auto 0;
  text-align: left;
}
.kid-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font: 700 1.05rem var(--font-display);
  color: var(--ink);
}
.kid-field input {
  min-height: var(--tap);
  padding: 0 16px;
  border: 3px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: 800 1.35rem var(--font-body);
  letter-spacing: 0.02em;
}
.kid-field input[type='password'] {
  letter-spacing: 0.3em;
}
.kid-field input:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 4px var(--blue-100);
}
.kid-login-msg {
  min-height: 1.4em;
  margin: 0;
  text-align: center;
  font-weight: 700;
  color: var(--grape);
}
.kid-login .btn {
  align-self: center;
}
.switch-player {
  text-align: center;
  margin: 4px 0 0;
}
.switch-player .link-btn {
  color: var(--ink-3);
  font-weight: 700;
}

/* ---------------- grown-up pages: home, legal, sign-in, parent ---------------- */

body.site {
  font-weight: 600;
}
.site-header {
  max-width: 1080px;
  flex-wrap: wrap;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.site-nav a:not(.btn) {
  padding: 10px 10px;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 800;
}
.site-nav a:not(.btn):hover {
  color: var(--blue);
}
.site-nav .btn {
  min-height: 46px;
  font-size: 1rem;
}
.site-main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 16px 32px;
}
.site a {
  color: var(--blue);
}
.site .btn-primary,
.site .btn-primary:visited {
  color: #fff;
}
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}
.site-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 16px max(22px, env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-3);
  font-size: 0.95rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.site-footer a {
  color: var(--ink-2);
  font-weight: 700;
}

.device-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 4px 0 18px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--sun-50);
  font-weight: 800;
}

/* home hero */
.home-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  padding: 24px 0 36px;
}
.home-hero h1 {
  font-size: clamp(2.4rem, 6.4vw, 3.9rem);
  letter-spacing: -0.02em;
}
.home-hero h1 span {
  color: var(--blue);
}
.home-lead {
  margin-top: 14px;
  font-size: 1.22rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 34em;
}
.home-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}
.home-fine {
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 0.98rem;
}

.mock {
  justify-self: center;
  width: min(100%, 340px);
  padding: 14px;
  border-radius: 40px;
  background: var(--ink);
  box-shadow: 0 24px 60px rgba(27, 31, 59, 0.25);
  transform: rotate(2deg);
}
.mock-screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 14px 16px;
  border-radius: 28px;
  background: var(--bg);
}
.mock-top {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 800 0.95rem/1 var(--font-display);
  color: var(--ink-3);
}
.mock-track {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: var(--blue-50);
  overflow: hidden;
}
.mock-track span {
  display: block;
  width: 60%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sun), #ff8a3d);
}
.mock-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 130px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-card);
  font: 800 2.6rem/1 var(--font-display);
}
.mock-card .ans {
  display: inline-block;
  min-width: 1.6em;
  margin-left: 0.2em;
  padding: 0.08em 0.2em;
  border-radius: 14px;
  background: var(--mint-50);
  color: var(--mint-700);
  text-align: center;
}
.mock-praise {
  position: absolute;
  top: -12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--sun-300);
  font-size: 1rem;
  transform: rotate(-4deg);
}
.mock-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.mock-keys span {
  display: grid;
  place-items: center;
  height: 44px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 0 var(--line);
  font: 800 1.3rem/1 var(--font-display);
}
.mock-keys .go {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 3px 0 var(--blue-700);
}

/* home sections */
.home-section {
  padding: 34px 0;
}
.home-section > h2 {
  font-size: clamp(1.9rem, 4.5vw, 2.6rem);
  text-align: center;
}
.home-section > .section-lead {
  max-width: 40em;
  margin: 10px auto 0;
  text-align: center;
  color: var(--ink-2);
  font-size: 1.12rem;
  line-height: 1.55;
}
.steps,
.features,
.prices {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}
.steps {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  counter-reset: step;
}
.step,
.feature {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font: 800 1.4rem/1 var(--font-display);
}
.step h3,
.feature h3 {
  font-size: 1.35rem;
}
.step p,
.feature p {
  color: var(--ink-2);
  line-height: 1.55;
}
.features {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--blue-50);
  font-size: 1.7rem;
}
.feature-art {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.feature-art img {
  width: 54px;
  height: 54px;
}
.report-mock {
  margin: 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 0.98rem;
  line-height: 1.6;
}
.report-mock b {
  color: var(--blue);
}

.prices {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.price {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  align-items: center;
}
.price.is-best {
  box-shadow: 0 0 0 4px var(--blue), var(--shadow-card);
}
.price-name {
  font: 800 1.3rem/1 var(--font-display);
}
.price-amount {
  font: 800 3rem/1 var(--font-display);
  color: var(--ink);
}
.price-amount small {
  font-size: 1.1rem;
  color: var(--ink-3);
}
.price-note {
  color: var(--ink-3);
}
.price-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  line-height: 1.9;
}
.price .btn {
  width: 100%;
}
.prices-fine {
  margin-top: 16px;
  text-align: center;
  color: var(--ink-3);
}

.faq {
  max-width: 760px;
  margin: 24px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq details {
  padding: 4px 20px;
}
.faq summary {
  cursor: pointer;
  padding: 14px 0;
  font: 800 1.2rem/1.3 var(--font-display);
  list-style-position: outside;
}
.faq details p {
  padding: 0 0 16px;
  color: var(--ink-2);
  line-height: 1.6;
}

.cta-band {
  margin: 20px 0 10px;
  padding: 34px 22px;
  border-radius: var(--radius-xl);
  background: var(--blue);
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.cta-band h2 {
  font-size: clamp(1.8rem, 4.5vw, 2.4rem);
}
.cta-band p {
  opacity: 0.92;
  font-size: 1.1rem;
}
.cta-band .btn {
  background: var(--sun-300);
  color: var(--ink) !important;
  box-shadow: 0 6px 0 #d99a00;
}

/* legal pages */
.legal {
  max-width: 820px;
  margin: 8px auto 0;
  padding: 28px clamp(18px, 4vw, 40px);
  line-height: 1.65;
  color: var(--ink-2);
}
.legal h1 {
  font-size: clamp(2rem, 5vw, 2.6rem);
  color: var(--ink);
}
.legal h2 {
  margin: 28px 0 8px;
  font-size: 1.45rem;
  color: var(--ink);
}
.legal p,
.legal ul {
  margin: 0 0 12px;
}
.legal ul {
  padding-left: 1.3em;
}
.legal li {
  margin-bottom: 6px;
}
.legal .updated {
  margin-top: 6px;
  color: var(--ink-3);
}
.legal .summary {
  margin: 18px 0 6px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--blue-50);
  color: var(--ink);
}
.placeholder {
  background: #fff3cd;
  border-radius: 6px;
  padding: 0 4px;
  color: #8a5300;
}

/* sign-in and sign-up */
.auth-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 500px;
  margin: 10px auto 0;
}
.auth-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 26px 24px;
}
.auth-card h1 {
  font-size: 2rem;
}
.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-card .btn {
  width: 100%;
}
.field input[type='email'] {
  min-height: 48px;
  padding: 0 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: 700 1.05rem var(--font-body);
}
.code-input {
  letter-spacing: 0.4em;
  font-size: 1.5rem !important;
  text-align: center;
}
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-2);
  cursor: pointer;
}
.consent input {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 2px;
  accent-color: var(--blue);
}
.notice {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 0.93rem;
  line-height: 1.55;
  color: var(--ink-2);
}
.notice b {
  color: var(--ink);
}
.auth-alt {
  text-align: center;
  color: var(--ink-3);
}

/* parent page additions */
.plan-card.is-alert {
  box-shadow: 0 0 0 3px #f5b4a8, var(--shadow-card);
}
.plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.kid-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.kid-tab {
  min-height: 46px;
  font-size: 1.05rem;
}
.kid-tab[aria-selected='true'] {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 5px 0 var(--blue-700);
}
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.link-box {
  flex: 1 1 260px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg);
  font: 700 0.95rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
}
.danger-zone {
  border: 2px dashed #f5b4a8;
}
.btn-danger {
  background: #fff;
  color: #b42318;
  box-shadow: 0 5px 0 #f5d0c9, inset 0 0 0 3px #f5d0c9;
}
.link-btn {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.signed-in {
  color: var(--ink-3);
  font-size: 0.95rem;
}

@media (min-width: 860px) {
  .home-hero {
    grid-template-columns: 1.15fr 0.85fr;
    padding: 40px 0 48px;
  }
}
@media (max-width: 560px) {
  .site-nav .nav-hide-sm {
    display: none;
  }
  .site-header {
    flex-wrap: nowrap;
  }
  .site-header .brand-mark {
    width: 34px;
    height: 34px;
  }
  .site-header .brand-name {
    font-size: 1.35rem;
  }
  .site-nav {
    flex-wrap: nowrap;
    gap: 2px;
  }
  .site-nav a:not(.btn) {
    padding: 10px 6px;
  }
  .site-nav .btn {
    min-height: 42px;
    padding: 0 0.85rem;
    font-size: 0.92rem;
    white-space: nowrap;
  }
}

/* ---------------- spooky mode: the 666 easter egg (Poppy only for now) ---------------- */

body.spooky {
  --blue: #e11d2a;
  --blue-700: #ff4d57;
  --blue-100: #5c1218;
  --blue-50: #24080b;
  --grape: #ff3b47;
  --grape-50: #2a090c;
  --mint: #ff3b47;
  --mint-700: #ff8a8a;
  --mint-50: #2a090c;
  --coral: #ff3b47;
  --ink: #f6e7e7;
  --ink-2: #d8adad;
  --ink-3: #a97a7a;
  --paper: #150708;
  --bg: #080203;
  --line: #3b1216;
  --shadow-card: 0 2px 0 rgba(0, 0, 0, 0.5), 0 12px 30px rgba(225, 29, 42, 0.2);
  background-image: radial-gradient(circle at 1px 1px, rgba(225, 29, 42, 0.22) 1.2px, transparent 0);
}
body.spooky .coin-chip,
body.spooky .btn-soft,
body.spooky .icon-btn,
body.spooky .track-line,
body.spooky .answer-box.has-value,
body.spooky .key,
body.spooky .item-card,
body.spooky .bg-chip,
body.spooky .tray-item.is-out,
body.spooky .kid-field input {
  background: var(--paper);
}
body.spooky .answer-box {
  color: #8a4a4f;
}
body.spooky .key-go {
  background: #b3121d;
  box-shadow: 0 5px 0 #5c0a10;
}
body.spooky .key-go:active,
body.spooky .key-go.is-pressed {
  box-shadow: 0 1px 0 #5c0a10;
}
body.spooky .learn {
  border-top-color: var(--blue-100);
}
