/* Stack the Scoop - iScream Gelato
   Washed pastels, disciplined. No pure white, no pure black: everything sits
   between --cream and --ink. Coral is the only warm accent and it is only
   allowed in motion, never as a static fill. Pastels are backgrounds and
   shapes; text is always --ink or --ink-soft so contrast clears AA. */

:root {
  --cream: #FDF9F4;
  --cream-deep: #F5EDE4;
  --pink: #F2CFD6;
  --pink-ink: #D99AA8;
  --pistachio: #CFE0D0;
  --pistachio-ink: #9FC0A6;
  --sky: #D2E1EC;
  --sky-ink: #9DBBD1;
  --butter: #F7E7C4;
  --coral: #EFA795;
  --ink: #4B423E;
  --ink-soft: #8A7E78;

  /* Candy tier: saturated versions of the brand washes, for the title
     screen and the big glossy buttons. Body text stays ink on cream. */
  --candy-pink: #F58BAB;
  --candy-pink-deep: #D95F8B;
  --candy-mint: #7FCA96;
  --candy-mint-deep: #57A873;
  --candy-sky: #7FB5E0;
  --candy-sky-deep: #5990BE;
  --candy-butter: #F7C86B;
  --candy-butter-deep: #DFA23E;
  --candy-coral: #F2795B;
  --gloss: rgba(255, 252, 248, 0.85);

  --shadow: 0 6px 18px rgba(75, 66, 62, 0.08);
  --radius: 18px;
  --radius-sm: 12px;

  /* 12 / 14 / 16 / 20 / 28 / 40 / 64 */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.5rem;
  --fs-3xl: 4rem;

  --display: 'Baloo 2', 'Fredoka', 'Trebuchet MS', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.sts-root, .sts-root * { box-sizing: border-box; }

/* The hidden attribute must always win, even against display:flex/grid
   utility classes - this bug bit the game shell once already. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* ---------------------------------------------------------------- motion */
/* One spring curve everywhere, so the whole app moves like one object. */
:root { --spring: cubic-bezier(0.34, 1.56, 0.64, 1); --ease: cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes score-bump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.22); color: var(--coral); }
  100% { transform: scale(1); }
}
@keyframes pulse-low {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.12); }
}
@keyframes hero-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-7px) rotate(-0.6deg); }
}
@keyframes banner-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes order-tick {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: none; }
}
@keyframes life-pop {
  0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); }
}
@keyframes lt-bounce {
  0%, 100% { transform: translateY(0) rotate(var(--tilt, 0deg)); }
  50%      { transform: translateY(-12px) rotate(var(--tilt, 0deg)); }
}
@keyframes blob-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(4vw, -3vh) scale(1.12); }
  66%      { transform: translate(-3vw, 3vh) scale(0.94); }
}
@keyframes float-drift {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-26px) rotate(8deg); }
}
@keyframes spr-fall {
  0%   { transform: translateY(-8vh) rotate(0deg); opacity: 0; }
  12%  { opacity: 1; }
  100% { transform: translateY(108vh) rotate(320deg); opacity: 0.9; }
}
@keyframes play-throb {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.045); }
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 0.9;  transform: scale(1.08); }
}

/* Inside WordPress the theme owns <body>. The game paints its own ground
   on its root, and the full-screen shell paints its own. */
.sts-root {
  font-family: var(--body);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.sts-title-screen {
  background:
    radial-gradient(60vmax 60vmax at 8% 0%, rgba(245, 139, 171, 0.20), transparent 60%),
    radial-gradient(50vmax 50vmax at 95% 12%, rgba(127, 202, 150, 0.16), transparent 60%),
    radial-gradient(70vmax 70vmax at 50% 100%, rgba(127, 181, 224, 0.18), transparent 65%),
    linear-gradient(180deg, #FDEEF3 0%, #FDF4E6 50%, #EAF2F9 100%);
}

body.is-playing { overflow: hidden; }

:where(.sts-root) :where(h1, h2, h3) {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
}

/* Fluid type: comfortable on a 320px phone, generous on a desktop. */
:where(.sts-root) :where(h1) { font-size: clamp(1.75rem, 4.5vw + 0.8rem, 2.5rem); }
:where(.sts-root) :where(h2) { font-size: clamp(1.35rem, 2.5vw + 0.6rem, 1.75rem); }
:where(.sts-root) :where(h3) { font-size: var(--fs-lg); }

:where(.sts-root) :where(p) { margin: 0 0 1em; }

:where(.sts-root) :where(a) { color: var(--ink); text-decoration-color: var(--pink-ink); text-underline-offset: 3px; }
:where(.sts-root) :where(a:hover) { text-decoration-color: var(--coral); }

:focus-visible {
  outline: 3px solid var(--sky-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--cream-deep);
  padding: 12px 18px;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip:focus { left: 0; }

.sts-root .wrap { max-width: none; margin: 0; padding: 0; }

/* ------------------------------------------------------------------ chrome */

.site-header {
  padding: 18px 0;
  border-bottom: 2px solid var(--cream-deep);
  background: var(--cream);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand {
  font-family: var(--display);
  font-size: var(--fs-lg);
  font-weight: 600;
  text-decoration: none;
}
.site-nav { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a { font-size: var(--fs-sm); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current='page'] { text-decoration: underline; }

.site-footer {
  margin-top: 56px;
  padding: 0 0 40px;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
}
.site-footer a { color: var(--ink); }
.credits-card { text-align: center; }
.credits-card img { border-radius: 50%; margin-bottom: 6px; }

/* -------------------------------------------------------------------- hero */

.hero { padding: 40px 0 24px; }
.hero-copy > * { animation: fade-up 500ms var(--ease) backwards; }
.hero-copy > *:nth-child(2) { animation-delay: 60ms; }
.hero-copy > *:nth-child(3) { animation-delay: 120ms; }
.hero-copy > *:nth-child(4) { animation-delay: 180ms; }
.hero-copy > *:nth-child(5) { animation-delay: 240ms; }

.hero-art {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  aspect-ratio: 16 / 10;
  margin: 0 auto 24px;
  border-radius: var(--radius);
  background: var(--cream-deep);
  box-shadow: var(--shadow);
  animation: fade-up 500ms var(--ease) 120ms backwards,
             hero-bob 6s ease-in-out 700ms infinite;
}
.hero-lede { font-size: var(--fs-lg); color: var(--ink-soft); max-width: 46ch; }

/* Tablet and up: hero copy beside the art instead of stacked. */
@media (min-width: 820px) {
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 36px;
    align-items: center;
  }
  .hero-grid .hero-art { margin: 0; }
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin: 24px 0; }

.btn {
  position: relative;
  font-family: var(--display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: #FFFDFA;
  text-shadow: 0 2px 0 rgba(75, 66, 62, 0.25);
  background: linear-gradient(180deg, #F9A8C0 0%, var(--candy-pink) 45%, var(--candy-pink-deep) 100%);
  border: none;
  border-radius: 999px;
  padding: 14px 34px;
  cursor: pointer;
  box-shadow:
    0 5px 0 var(--candy-pink-deep),
    0 12px 24px rgba(217, 95, 139, 0.32),
    inset 0 2px 2px rgba(255, 255, 255, 0.5);
  transition: transform 140ms var(--spring), box-shadow 140ms var(--ease), filter 140ms ease;
  min-height: 52px;
  touch-action: manipulation;              /* kills the 300ms tap delay feel */
  -webkit-tap-highlight-color: transparent;
}
.btn::before {                             /* gloss streak */
  content: '';
  position: absolute;
  left: 10%; right: 10%; top: 7%; height: 42%;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gloss), rgba(255, 252, 248, 0.04));
  pointer-events: none;
}
.btn:hover { transform: translateY(-2px) scale(1.02); filter: brightness(1.05); }
.btn:active {
  transform: translateY(4px) scale(0.98);
  box-shadow: 0 1px 0 var(--candy-pink-deep), 0 4px 10px rgba(217, 95, 139, 0.28),
    inset 0 2px 2px rgba(255, 255, 255, 0.5);
  transition-duration: 50ms;
}
.btn[disabled] { opacity: 0.7; cursor: progress; transform: none; }
.btn-secondary {
  font-size: var(--fs-md);
  padding: 12px 24px;
  background: linear-gradient(180deg, #A5CBEC 0%, var(--candy-sky) 45%, var(--candy-sky-deep) 100%);
  box-shadow: 0 5px 0 var(--candy-sky-deep), 0 12px 24px rgba(89, 144, 190, 0.32),
    inset 0 2px 2px rgba(255, 255, 255, 0.5);
}
.btn-secondary:active { box-shadow: 0 1px 0 var(--candy-sky-deep), 0 4px 10px rgba(89, 144, 190, 0.28),
    inset 0 2px 2px rgba(255, 255, 255, 0.5); }
.btn-quiet {
  background: rgba(253, 249, 244, 0.8);
  border: 2px solid var(--ink-soft);
  color: var(--ink);
  text-shadow: none;
  font-family: var(--body);
  font-size: var(--fs-sm);
  padding: 9px 18px;
  min-height: 40px;
  box-shadow: none;
}
.btn-quiet::before { content: none; }
.btn-quiet:active { transform: translateY(1px) scale(0.97); box-shadow: none; }

.note { font-size: var(--fs-sm); color: var(--ink-soft); }
.error { color: var(--ink); background: var(--pink); border: 2px solid var(--pink-ink);
  padding: 12px 16px; border-radius: var(--radius-sm); font-size: var(--fs-sm); }

.banner {
  background: var(--butter);
  border: 2px solid var(--coral);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: var(--fs-sm);
  margin-bottom: 16px;
  animation: banner-in 400ms var(--spring) backwards;
}

/* ------------------------------------------------------------- title screen */
/* The landing has to read as a game the second it loads: candy sky, floating
   scoops, a bouncing logo, one enormous glossy PLAY button. */

.title-screen {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 30px 16px 34px;
  margin: 0;
  /* inside a page the lobby sizes to content; Elementor's Min height
     control can push it to a full screen when that is the design */
  min-height: 0;
  border-radius: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.title-screen > * { position: relative; z-index: 2; }
.ts-sky { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

/* pre-blurred color blobs: radial gradients, no filter, cheap on phones */
.blob { position: absolute; border-radius: 50%; animation: blob-drift 16s ease-in-out infinite; }
.blob-pink   { width: 46vmin; height: 46vmin; left: -12vmin; top: -10vmin;
  background: radial-gradient(circle, rgba(245, 139, 171, 0.5), transparent 70%); }
.blob-mint   { width: 40vmin; height: 40vmin; right: -10vmin; top: 8vmin;
  background: radial-gradient(circle, rgba(127, 202, 150, 0.42), transparent 70%);
  animation-delay: -5s; }
.blob-sky    { width: 52vmin; height: 52vmin; left: 4vmin; bottom: -18vmin;
  background: radial-gradient(circle, rgba(127, 181, 224, 0.4), transparent 70%);
  animation-delay: -9s; }
.blob-butter { width: 34vmin; height: 34vmin; right: 2vmin; bottom: -6vmin;
  background: radial-gradient(circle, rgba(247, 200, 107, 0.45), transparent 70%);
  animation-delay: -12s; }

/* floating scoops and one cherry, drawn in pure CSS */
.fl { position: absolute; border-radius: 50%; animation: float-drift 7s ease-in-out infinite; }
.fl-scoop { width: 58px; height: 58px; border: 3px solid rgba(75, 66, 62, 0.12);
  box-shadow: inset -8px -10px 0 rgba(75, 66, 62, 0.06), 0 8px 18px rgba(75, 66, 62, 0.10); }
.fl-1 { left: 7%;  top: 14%; background: var(--pink); animation-delay: -1s; }
.fl-2 { right: 9%; top: 20%; background: var(--pistachio); width: 44px; height: 44px; animation-delay: -3.4s; }
.fl-3 { left: 13%; bottom: 16%; background: var(--butter); width: 38px; height: 38px; animation-delay: -5.2s; }
.fl-cherry { width: 30px; height: 30px; background: var(--candy-coral);
  border: 3px solid rgba(75, 66, 62, 0.14); box-shadow: 0 8px 18px rgba(75, 66, 62, 0.10); }
.fl-4 { right: 14%; bottom: 22%; animation-delay: -2.2s; }

/* sprinkles raining very slowly down the whole screen */
.spr { position: absolute; width: 7px; height: 18px; border-radius: 4px; top: -20px;
  animation: spr-fall 11s linear infinite; }
.spr-1 { left: 6%;  background: var(--candy-pink);   animation-delay: 0s; }
.spr-2 { left: 18%; background: var(--candy-sky);    animation-delay: -2.5s; }
.spr-3 { left: 31%; background: var(--candy-mint);   animation-delay: -5s; }
.spr-4 { left: 44%; background: var(--candy-butter); animation-delay: -7.5s; }
.spr-5 { left: 58%; background: var(--candy-coral);  animation-delay: -1.2s; }
.spr-6 { left: 71%; background: var(--candy-pink);   animation-delay: -6.3s; }
.spr-7 { left: 83%; background: var(--candy-sky);    animation-delay: -3.8s; }
.spr-8 { left: 93%; background: var(--candy-mint);   animation-delay: -8.7s; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { display: block; border-radius: 50%; }

.ts-logo {
  width: clamp(96px, 16vw, 136px);
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(75, 66, 62, 0.18));
  animation: hero-bob 5s ease-in-out infinite;
  margin-bottom: 2px;
}

.ts-kicker {
  font-family: var(--display);
  font-size: var(--fs-sm);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 4px;
}

/* ---- start screen: logo, icon stat tiles ---- */
.start-card { text-align: center; }
.start-logo {
  width: 88px;
  height: 88px;
  margin: -6px auto 4px;
  filter: drop-shadow(0 6px 14px rgba(75, 66, 62, 0.16));
  animation: hero-bob 5s ease-in-out infinite;
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 4px;
}
.stat-tile {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  text-align: left;
  background: var(--cream);
  border: 2px solid var(--cream-deep);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  animation: pop-in 300ms var(--spring) backwards;
}
.stat-tile:nth-child(2) { animation-delay: 50ms; }
.stat-tile:nth-child(3) { animation-delay: 100ms; }
.stat-tile:nth-child(4) { animation-delay: 150ms; }
.tile-icon {
  grid-row: 1 / 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}
.tile-pink   .tile-icon { background: var(--pink);      color: #B14D6E; }
.tile-coral  .tile-icon { background: #FBDDD2;          color: #C75B3F; }
.tile-mint   .tile-icon { background: var(--pistachio); color: #4E7D5B; }
.tile-butter .tile-icon { background: var(--butter);    color: #A87A2A; }
.tile-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-soft);
  line-height: 1.3;
}
.tile-value {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-md);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.2;
}
.label-icon {
  width: 24px; height: 24px;
  background: var(--sky);
  color: #3D658C;
  vertical-align: middle;
  margin-right: 4px;
}
.start-card label { text-align: center; }

.ts-title { margin: 0 0 6px; line-height: 0.95; font-size: clamp(3rem, 10vw + 1rem, 6rem); }
.ts-word { display: inline-block; white-space: nowrap; }
.ts-word-small { font-size: 0.42em; vertical-align: middle; margin: 0 0.25em; }
.lt {
  display: inline-block;
  animation: lt-bounce 2.4s ease-in-out infinite;
  animation-delay: calc(var(--d) * 110ms);
  text-shadow:
    0 4px 0 rgba(75, 66, 62, 0.14),
    0 10px 22px rgba(75, 66, 62, 0.18);
}
/* letter colours drawn from the badge: brand pink, navy, and the three
   scoop pastels deepened enough to hold on cream */
.lt.c1 { color: #D05080; --tilt: -3deg; }   /* I SCREAM pink */
.lt.c2 { color: #DFA23E; --tilt: 2deg; }    /* butter scoop, deepened */
.lt.c3 { color: #6FA383; --tilt: -2deg; }   /* sage scoop, deepened */
.lt.c4 { color: #1E4373; --tilt: 3deg; }    /* GELATO navy */
.lt.c5 { color: #E8846B; --tilt: -1deg; }   /* salmon scoop */

.ts-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 18px;
}

.ts-art {
  width: min(78vw, 380px);
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(75, 66, 62, 0.16);
  margin-bottom: 26px;
  animation: hero-bob 5s ease-in-out infinite;
  border: 4px solid rgba(255, 252, 248, 0.9);
}

/* ---- the candy buttons: glossy, bumpy, pressable ---- */
.btn-candy {
  position: relative;
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-lg);
  letter-spacing: 0.04em;
  color: #FFFDFA;
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(75, 66, 62, 0.25);
  --sts-btn-top: #F9A8C0;
  --sts-btn-mid: var(--candy-pink);
  --sts-btn-deep: var(--candy-pink-deep);
  --sts-btn-lift: 6px;
  background: linear-gradient(180deg, var(--sts-btn-top) 0%, var(--sts-btn-mid) 45%, var(--sts-btn-deep) 100%);
  border: none;
  border-radius: 999px;
  padding: 16px 40px;
  cursor: pointer;
  box-shadow:
    0 var(--sts-btn-lift) 0 var(--sts-btn-deep),
    0 14px 28px rgba(217, 95, 139, 0.38),
    inset 0 2px 2px rgba(255, 255, 255, 0.5);
  transition: transform 140ms var(--spring), box-shadow 140ms var(--ease), filter 140ms ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn-candy::before {                    /* the gloss streak */
  content: '';
  position: absolute;
  left: 10%; right: 10%; top: 7%; height: 42%;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gloss), rgba(255, 252, 248, 0.04));
  pointer-events: none;
}
.btn-candy:hover { transform: translateY(-2px) scale(1.03); filter: brightness(1.05); }
.btn-candy:active {
  transform: translateY(calc(var(--sts-btn-lift) - 1px)) scale(0.98);
  box-shadow:
    0 1px 0 var(--sts-btn-deep),
    0 4px 10px rgba(217, 95, 139, 0.30),
    inset 0 2px 2px rgba(255, 255, 255, 0.5);
  transition-duration: 50ms;
}
.btn-candy[disabled] { opacity: 0.7; cursor: progress; animation: none; }

.btn-candy-sky {
  background: linear-gradient(180deg, #A5CBEC 0%, var(--candy-sky) 45%, var(--candy-sky-deep) 100%);
  box-shadow: 0 6px 0 var(--candy-sky-deep), 0 14px 28px rgba(89, 144, 190, 0.38),
    inset 0 2px 2px rgba(255, 255, 255, 0.5);
}
.btn-candy-sky:active { box-shadow: 0 1px 0 var(--candy-sky-deep), 0 4px 10px rgba(89, 144, 190, 0.3),
    inset 0 2px 2px rgba(255, 255, 255, 0.5); }
.btn-candy-mint {
  background: linear-gradient(180deg, #A4DCB4 0%, var(--candy-mint) 45%, var(--candy-mint-deep) 100%);
  box-shadow: 0 6px 0 var(--candy-mint-deep), 0 14px 28px rgba(87, 168, 115, 0.38),
    inset 0 2px 2px rgba(255, 255, 255, 0.5);
}
.btn-candy-mint:active { box-shadow: 0 1px 0 var(--candy-mint-deep), 0 4px 10px rgba(87, 168, 115, 0.3),
    inset 0 2px 2px rgba(255, 255, 255, 0.5); }
.btn-candy-butter {
  background: linear-gradient(180deg, #FBD98F 0%, var(--candy-butter) 45%, var(--candy-butter-deep) 100%);
  box-shadow: 0 6px 0 var(--candy-butter-deep), 0 14px 28px rgba(223, 162, 62, 0.38),
    inset 0 2px 2px rgba(255, 255, 255, 0.5);
}
.btn-candy-butter:active { box-shadow: 0 1px 0 var(--candy-butter-deep), 0 4px 10px rgba(223, 162, 62, 0.3),
    inset 0 2px 2px rgba(255, 255, 255, 0.5); }

.btn-candy-sm { font-size: var(--fs-md); padding: 12px 26px; }

.btn-play-big {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  padding: 20px 74px;
  letter-spacing: 0.12em;
  animation: play-throb 2s ease-in-out infinite;
}
.btn-play-big::after {                  /* soft glow ring behind PLAY */
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: 999px;
  background: radial-gradient(ellipse, rgba(245, 139, 171, 0.4), transparent 70%);
  z-index: -1;
  animation: glow-pulse 2s ease-in-out infinite;
  pointer-events: none;
}

.ts-links { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }

/* ---- round icon buttons: the game-lobby nav ---- */
.icon-nav {
  display: flex;
  gap: clamp(14px, 4vw, 30px);
  justify-content: center;
  align-items: flex-start;
  margin-top: 24px;
  flex-wrap: wrap;
}
.icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn .disc {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(58px, 9vw, 72px);
  height: clamp(58px, 9vw, 72px);
  border-radius: 50%;
  color: #FFFDFA;
  background: linear-gradient(180deg, #A5CBEC 0%, var(--candy-sky) 45%, var(--candy-sky-deep) 100%);
  box-shadow:
    0 5px 0 var(--candy-sky-deep),
    0 12px 22px rgba(89, 144, 190, 0.35),
    inset 0 2px 2px rgba(255, 255, 255, 0.55);
  transition: transform 140ms var(--spring), filter 140ms ease, box-shadow 140ms var(--ease);
}
.icon-btn .disc::before {
  content: '';
  position: absolute;
  left: 16%; right: 16%; top: 8%; height: 38%;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gloss), rgba(255, 252, 248, 0.05));
}
.icon-btn:hover .disc { transform: translateY(-3px) scale(1.06); filter: brightness(1.06); }
.icon-btn:active .disc {
  transform: translateY(3px) scale(0.96);
  box-shadow: 0 1px 0 var(--candy-sky-deep), 0 4px 8px rgba(89, 144, 190, 0.3),
    inset 0 2px 2px rgba(255, 255, 255, 0.55);
}
.icon-btn.is-pink .disc {
  background: linear-gradient(180deg, #F9A8C0 0%, var(--candy-pink) 45%, var(--candy-pink-deep) 100%);
  box-shadow: 0 5px 0 var(--candy-pink-deep), 0 12px 22px rgba(217, 95, 139, 0.35),
    inset 0 2px 2px rgba(255, 255, 255, 0.55);
}
.icon-btn.is-pink:active .disc { box-shadow: 0 1px 0 var(--candy-pink-deep), 0 4px 8px rgba(217, 95, 139, 0.3),
    inset 0 2px 2px rgba(255, 255, 255, 0.55); }
.icon-btn.is-mint .disc {
  background: linear-gradient(180deg, #A4DCB4 0%, var(--candy-mint) 45%, var(--candy-mint-deep) 100%);
  box-shadow: 0 5px 0 var(--candy-mint-deep), 0 12px 22px rgba(87, 168, 115, 0.35),
    inset 0 2px 2px rgba(255, 255, 255, 0.55);
}
.icon-btn.is-mint:active .disc { box-shadow: 0 1px 0 var(--candy-mint-deep), 0 4px 8px rgba(87, 168, 115, 0.3),
    inset 0 2px 2px rgba(255, 255, 255, 0.55); }
.icon-btn.is-butter .disc {
  background: linear-gradient(180deg, #FBD98F 0%, var(--candy-butter) 45%, var(--candy-butter-deep) 100%);
  box-shadow: 0 5px 0 var(--candy-butter-deep), 0 12px 22px rgba(223, 162, 62, 0.35),
    inset 0 2px 2px rgba(255, 255, 255, 0.55);
}
.icon-btn.is-butter:active .disc { box-shadow: 0 1px 0 var(--candy-butter-deep), 0 4px 8px rgba(223, 162, 62, 0.3),
    inset 0 2px 2px rgba(255, 255, 255, 0.55); }
.icon-btn .icon-label {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-xs);
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(253, 249, 244, 0.8);
}

/* ---- ribbon sticker headers: section titles that read as game UI ---- */
.ribbon {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.15rem, 2.4vw + 0.5rem, 1.55rem);
  color: #FFFDFA;
  text-shadow: 0 2px 0 rgba(75, 66, 62, 0.25);
  background: linear-gradient(180deg, #F9A8C0 0%, var(--candy-pink) 45%, var(--candy-pink-deep) 100%);
  border-radius: 16px;
  padding: 10px 26px;
  transform: rotate(-1.5deg);
  box-shadow: 0 4px 0 var(--candy-pink-deep), 0 10px 20px rgba(217, 95, 139, 0.3);
  margin: 0 0 18px;
}
.ribbon.is-sky { background: linear-gradient(180deg, #A5CBEC 0%, var(--candy-sky) 45%, var(--candy-sky-deep) 100%);
  box-shadow: 0 4px 0 var(--candy-sky-deep), 0 10px 20px rgba(89, 144, 190, 0.3); transform: rotate(1.2deg); }
.ribbon.is-mint { background: linear-gradient(180deg, #A4DCB4 0%, var(--candy-mint) 45%, var(--candy-mint-deep) 100%);
  box-shadow: 0 4px 0 var(--candy-mint-deep), 0 10px 20px rgba(87, 168, 115, 0.3); transform: rotate(-1deg); }
.ribbon.is-butter { background: linear-gradient(180deg, #FBD98F 0%, var(--candy-butter) 45%, var(--candy-butter-deep) 100%);
  box-shadow: 0 4px 0 var(--candy-butter-deep), 0 10px 20px rgba(223, 162, 62, 0.3); transform: rotate(1.5deg); }

/* ---- content panels: every block of copy lives in a game card ---- */
.panel-card {
  background: rgba(253, 249, 244, 0.88);
  border: 3px solid rgba(255, 252, 248, 0.95);
  border-radius: 26px;
  box-shadow: 0 10px 30px rgba(75, 66, 62, 0.10);
  padding: clamp(18px, 4vw, 30px);
}
.panel-card > p:last-child { margin-bottom: 0; }

/* ---- subpage top bar: back button plus a title sticker, no nav links ---- */
.game-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0 6px;
  flex-wrap: wrap;
}
.game-topbar .ribbon { margin: 0; }
.back-btn .disc { width: 52px; height: 52px; }

/* ---- scroll hint at the bottom of the lobby ---- */
@keyframes hint-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50%      { transform: translateY(8px); opacity: 1; }
}
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  color: var(--ink-soft);
  animation: hint-bounce 1.6s ease-in-out infinite;
  font-size: var(--fs-xs);
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- leaderboard podium: the top three as a game result screen ---- */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 12px; margin: 20px 0 26px; }
.podium-slot { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 1 150px; }
.podium-name { font-family: var(--display); font-weight: 600; font-size: var(--fs-sm);
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-score { font-variant-numeric: tabular-nums; font-size: var(--fs-xs); color: var(--ink-soft); }
.podium-block {
  width: 100%;
  border-radius: 14px 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-xl);
  color: #FFFDFA;
  text-shadow: 0 2px 0 rgba(75, 66, 62, 0.25);
  box-shadow: inset 0 3px 3px rgba(255, 255, 255, 0.45);
}
.podium-1 .podium-block { height: 96px; background: linear-gradient(180deg, #FBD98F, var(--candy-butter-deep)); }
.podium-2 .podium-block { height: 72px; background: linear-gradient(180deg, #A5CBEC, var(--candy-sky-deep)); }
.podium-3 .podium-block { height: 56px; background: linear-gradient(180deg, #F7B6A0, #D96F4E); }

.ts-chips {
  list-style: none;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0;
  margin: 22px 0 0;
}
.ts-chips li {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--ink);
  background: rgba(255, 252, 248, 0.8);
  border: 2px solid var(--pink-ink);
  border-radius: 999px;
  padding: 7px 16px;
  box-shadow: 0 3px 0 rgba(217, 154, 168, 0.5);
}
.ts-chips li:nth-child(2) { border-color: var(--sky-ink); box-shadow: 0 3px 0 rgba(157, 187, 209, 0.5); }
.ts-chips li:nth-child(3) { border-color: var(--pistachio-ink); box-shadow: 0 3px 0 rgba(159, 192, 166, 0.5); }

/* ------------------------------------------------------------------ blocks */

section { margin: 48px 0; }

.card {
  background: var(--cream-deep);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.steps { padding-left: 1.2em; }
.steps li { margin-bottom: 10px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.faq details {
  background: var(--cream-deep);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq summary { font-family: var(--display); font-weight: 600; cursor: pointer; }
.faq p { margin: 10px 0 0; }

table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--cream-deep); }
th { font-family: var(--display); font-weight: 600; }
td.num { font-variant-numeric: tabular-nums; text-align: right; }
tr.is-you { background: var(--butter); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------- game shell */

/* display:grid would beat the UA's [hidden]{display:none}, leaving an
   invisible-looking shell parked over the page and eating every click. */
.shell[hidden] { display: none; }

.shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--cream);
  display: grid;
  grid-template-rows: auto 1fr;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.shell-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 2px solid var(--cream-deep);
  flex-wrap: wrap;
}
.shell-bar .spacer { margin-left: auto; }

.stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
}

.canvas-wrap {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#game-canvas {
  display: block;
  touch-action: none;             /* no double tap zoom, no scroll steal */
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--cream);
}

/* HUD sits over the top of the play field on a phone, and moves into the
   side margins on a wide screen instead of covering the game. */
.panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 14px;
  pointer-events: none;
}
.panel > * { pointer-events: auto; }

.panel-left, .panel-right {
  position: absolute;
  top: 0;
  z-index: 2;
  width: 50%;
}
.panel-left { left: 0; }
.panel-right { right: 0; align-items: flex-end; text-align: right; }

.stat-label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 0;
}
.stat-value {
  font-family: var(--display);
  font-size: var(--fs-xl);
  font-weight: 600;
  font-variant-numeric: tabular-nums;   /* digits must not jitter */
  margin: 0;
  line-height: 1;
}
#hud-score { transform-origin: left center; }
#hud-score.bump { animation: score-bump 300ms var(--ease); }
#hud-timer.is-low { color: var(--coral); animation: pulse-low 800ms ease-in-out infinite; }

.hud-block {
  background: rgba(253, 249, 244, 0.78);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  backdrop-filter: blur(8px) saturate(1.1);
  border: 2px solid var(--cream-deep);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  animation: pop-in 320ms var(--spring) backwards;
}

.lives { display: flex; gap: 6px; }
.life {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--pink);
  border: 2px solid var(--pink-ink);
  transition: background 250ms ease, border-color 250ms ease, transform 250ms var(--spring);
}
.life.is-lost { background: transparent; border-color: var(--cream-deep); transform: scale(0.8); }

.order-card { max-width: 240px; }
.order-list { list-style: none; margin: 8px 0 0; padding: 0; }
.order-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  padding: 3px 6px;
  border-radius: 8px;
  opacity: 0.55;
  animation: order-tick 220ms var(--ease) backwards;
  transition: background 180ms ease, opacity 180ms ease;
}
.order-item:nth-child(2) { animation-delay: 30ms; }
.order-item:nth-child(3) { animation-delay: 60ms; }
.order-item:nth-child(4) { animation-delay: 90ms; }
.order-item:nth-child(5) { animation-delay: 120ms; }
.order-item:nth-child(6) { animation-delay: 150ms; }
.order-item:nth-child(7) { animation-delay: 180ms; }
.panel-right .order-item { flex-direction: row-reverse; }
.order-item.is-next { opacity: 1; background: var(--sky); font-weight: 700; }
.order-item.is-done { opacity: 1; text-decoration: line-through; color: var(--ink-soft); }
.order-item canvas { flex: none; }

#hud-drip {
  background: var(--butter);
  border: 2px solid var(--coral);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: var(--fs-xs);
}

/* ------------------------------------------------------- cup picker tiles */
.picker-label { font-size: var(--fs-sm); margin: 14px 0 8px; }
.cup-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 8px;
}
.cup-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  width: 86px;
  padding: 8px 4px 8px;
  border-radius: 14px;
  border: 3px solid var(--cream-deep);
  background: var(--cream);
  cursor: pointer;
  font-family: var(--body);
  transition: transform 140ms var(--spring), border-color 140ms ease, box-shadow 140ms ease;
  -webkit-tap-highlight-color: transparent;
}
.cup-tile:hover { transform: translateY(-2px); }
.cup-tile.is-selected {
  border-color: var(--candy-pink);
  box-shadow: 0 4px 0 rgba(217, 95, 139, 0.4), 0 8px 18px rgba(217, 95, 139, 0.25);
  background: #FDF3F6;
}
.cup-tile.is-locked { opacity: 0.55; cursor: not-allowed; }
.cup-tile.is-locked:hover { transform: none; }
.cup-tile canvas { display: block; }
.cup-auto {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  font-family: var(--display);
  font-weight: 600;
  color: var(--sky-ink);
  border: 3px dashed var(--sky-ink);
  border-radius: 12px;
}
.cup-name { font-size: 0.62rem; font-weight: 700; color: var(--ink); line-height: 1.15; text-align: center; }
.cup-mult { font-size: 0.62rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.cup-lock { position: absolute; top: 6px; right: 8px; font-size: 14px; }

/* ---------------------------------------------------------- party screens */
.party-row { display: flex; gap: 10px; margin-top: 10px; }
.party-row .btn { flex: 1; margin-top: 0; }
.btn-party { font-size: var(--fs-md); padding: 12px 10px; }
.btn-party-mint {
  background: linear-gradient(180deg, #A4DCB4 0%, var(--candy-mint) 45%, var(--candy-mint-deep) 100%);
  box-shadow: 0 5px 0 var(--candy-mint-deep), 0 12px 24px rgba(87, 168, 115, 0.32),
    inset 0 2px 2px rgba(255, 255, 255, 0.5);
}
.btn-party-sky {
  background: linear-gradient(180deg, #A5CBEC 0%, var(--candy-sky) 45%, var(--candy-sky-deep) 100%);
  box-shadow: 0 5px 0 var(--candy-sky-deep), 0 12px 24px rgba(89, 144, 190, 0.32),
    inset 0 2px 2px rgba(255, 255, 255, 0.5);
}

.party-code {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-3xl);
  letter-spacing: 0.18em;
  margin: 0 0 6px;
  color: #D05080;
  text-shadow: 0 3px 0 rgba(75, 66, 62, 0.12);
  font-variant-numeric: tabular-nums;
}
.lobby-players { list-style: none; padding: 0; margin: 14px 0 6px; display: grid; gap: 8px; }
.lobby-players li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cream);
  border: 2px solid var(--cream-deep);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 700;
  animation: pop-in 260ms var(--spring) backwards;
  text-align: left;
}
.lobby-players .dot {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid rgba(75, 66, 62, 0.15);
}
.lobby-players .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-players .tag {
  margin-left: auto;
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------- countdown */
@keyframes count-pop {
  0%   { transform: scale(2.4); opacity: 0; }
  25%  { transform: scale(1);   opacity: 1; }
  85%  { transform: scale(0.94); opacity: 1; }
  100% { transform: scale(0.6); opacity: 0; }
}
.countdown {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(253, 249, 244, 0.55);
  pointer-events: none;
}
.countdown span {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(6rem, 30vw, 12rem);
  color: #D05080;
  text-shadow: 0 6px 0 rgba(75, 66, 62, 0.15), 0 16px 40px rgba(217, 95, 139, 0.4);
  animation: count-pop 1s var(--ease) both;
}

/* -------------------------------------------------------------- attacks */
.attack-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  pointer-events: auto;
}
.attack-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  font-size: 24px;
  cursor: pointer;
  background: linear-gradient(180deg, #F9A8C0 0%, var(--candy-pink) 45%, var(--candy-pink-deep) 100%);
  box-shadow: 0 4px 0 var(--candy-pink-deep), 0 8px 16px rgba(217, 95, 139, 0.3),
    inset 0 2px 2px rgba(255, 255, 255, 0.5);
  transition: transform 140ms var(--spring), opacity 140ms ease, box-shadow 140ms ease;
  -webkit-tap-highlight-color: transparent;
}
.attack-btn:not([disabled]):hover { transform: translateY(-2px) scale(1.07); }
.attack-btn:not([disabled]):active {
  transform: translateY(3px) scale(0.95);
  box-shadow: 0 1px 0 var(--candy-pink-deep), 0 3px 6px rgba(217, 95, 139, 0.25),
    inset 0 2px 2px rgba(255, 255, 255, 0.5);
}
.attack-btn[disabled] { opacity: 0.35; cursor: default; filter: grayscale(0.4); }
.shield-badge {
  font-size: 22px;
  animation: pulse-low 900ms ease-in-out infinite;
}
.attack-count {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-lg);
  color: var(--ink);
  background: var(--butter);
  border: 2px solid var(--candy-butter-deep);
  border-radius: 999px;
  min-width: 34px;
  text-align: center;
  padding: 2px 8px;
  font-variant-numeric: tabular-nums;
}

.peer-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.peer-list li {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
}
.peer-list .who { font-weight: 700; max-width: 90px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.peer-list .pts { margin-left: auto; color: var(--ink-soft); }
.peer-list li.is-me .who { color: #D05080; }
.peer-list li.is-done { opacity: 0.6; }

@keyframes toast-in {
  0%   { transform: translate(-50%, -18px); opacity: 0; }
  12%  { transform: translate(-50%, 0);     opacity: 1; }
  85%  { transform: translate(-50%, 0);     opacity: 1; }
  100% { transform: translate(-50%, -12px); opacity: 0; }
}
.attack-toast {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 64px);
  left: 50%;
  z-index: 70;
  margin: 0;
  background: var(--butter);
  border: 2px solid var(--candy-butter-deep);
  border-radius: 999px;
  padding: 9px 20px;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--fs-sm);
  box-shadow: 0 8px 22px rgba(75, 66, 62, 0.2);
  animation: toast-in 2.6s var(--ease) both;
  pointer-events: none;
  max-width: 90vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------- screens */

.screen {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(253, 249, 244, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fade-up 200ms var(--ease);
}
.screen[hidden] { display: none; }
.screen-inner {
  background: var(--cream-deep);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(75, 66, 62, 0.16);
  padding: 28px;
  max-width: 420px;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  text-align: center;
  animation: pop-in 320ms var(--spring);
}
.screen-inner .btn { width: 100%; margin-top: 10px; }
.screen-inner label { display: block; text-align: left; font-size: var(--fs-sm); margin-top: 14px; }
.screen-inner input[type='text'], .screen-inner select {
  width: 100%;
  font-family: var(--body);
  font-size: var(--fs-md);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--sky-ink);
  background: var(--cream);
  color: var(--ink);
  margin-top: 6px;
}
.screen-inner .checkline {
  display: flex; gap: 10px; align-items: flex-start;
  text-align: left; font-size: var(--fs-sm); margin-top: 14px;
}
.screen-inner .checkline input { margin-top: 4px; width: 20px; height: 20px; }

.big-score {
  font-family: var(--display);
  font-size: var(--fs-3xl);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin: 6px 0 4px;
}

/* Compact lobby on phones: the whole title screen must fit one screenful. */
@media (max-width: 480px), (max-height: 740px) {
  .ts-logo { width: 84px; margin-bottom: 0; }
  .ts-kicker { margin-bottom: 0; letter-spacing: 0.16em; }
  .ts-title { font-size: clamp(2.5rem, 13vw, 3.4rem); }
  .ts-art { width: min(64vw, 300px); margin-bottom: 14px; }
  .btn-play-big { padding: 16px 58px; }
  .icon-nav { margin-top: 16px; gap: 10px; }
  .icon-btn { width: 76px; }
  .icon-btn .icon-label { font-size: 0.66rem; }
  .ts-chips { margin-top: 12px; gap: 7px; }
  .ts-chips li { padding: 5px 12px; font-size: var(--fs-xs); }
  .title-screen { padding-top: 22px; padding-bottom: 40px; }
}

/* Phones first: tighten the HUD so the play area stays big, and keep every
   control inside the thumb zone. */
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .cta-row .btn { flex: 1 1 auto; text-align: center; }
  .site-nav { gap: 12px; }

  .shell-bar { padding: 6px 8px; gap: 6px; flex-wrap: nowrap; }
  .shell-bar .brand { display: none; }   /* the cone label and controls matter more mid-game */
  .btn-quiet { padding: 8px 12px; font-size: var(--fs-xs); }

  .panel { padding: 8px 10px; gap: 8px; }
  .hud-block { padding: 6px 10px; border-radius: 10px; }
  .stat-value { font-size: var(--fs-lg); }
  .stat-label { font-size: 0.65rem; }
  .order-card { max-width: 172px; }
  .order-item { font-size: var(--fs-xs); gap: 6px; padding: 2px 5px; }
  .order-item canvas { width: 26px !important; height: 26px !important; }
  .life { width: 13px; height: 13px; }
  .note { font-size: var(--fs-xs); }
  .screen { padding: 12px; }
  .screen-inner { padding: 20px; }
  .big-score { font-size: var(--fs-2xl); }
}

/* Tables never force the page to scroll sideways. */
@media (max-width: 640px) {
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Desktop and landscape: keep the 9:16 field centred, put the HUD in the
   margins rather than over the game. Same game, better use of the space. */
@media (min-width: 900px) and (min-aspect-ratio: 3/4) {
  .stage { grid-template-columns: minmax(200px, 1fr) auto minmax(200px, 1fr); align-items: center; }
  .panel-left, .panel-right { position: static; width: auto; }
  .panel-right { align-items: flex-end; }
  .canvas-wrap { height: 100%; }
  .order-card { max-width: 260px; }
}

/* The wobble is a mechanic, not decoration, so it is tamed rather than
   removed. Everything purely decorative stops. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .btn:hover { transform: none; }
}


/* ------------------------------------------------------- WordPress build */

/* Embed mode: the game lives inside the page at a set height. */
.sts-mode-embed { position: relative; min-height: var(--sts-embed-h, 80vh); }
body.sts-embedded .shell {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

/* Theme defense: common theme resets that would break the game's buttons
   and lists get overridden inside the root and the shell. */
.sts-root button, .shell button { text-transform: none; letter-spacing: inherit; }
.sts-root ul, .shell ul, .sts-root ol, .shell ol { margin: 0; padding: 0; }
.sts-root img, .shell img { max-width: 100%; height: auto; }
.shell, .shell * { box-sizing: border-box; }
.shell { font-family: var(--body); font-size: var(--fs-md); line-height: 1.6; color: var(--ink); }
.shell h2 { font-family: var(--display); font-weight: 600; color: var(--ink); }

/* Elementor editor: keep the preview calm - no throbbing Play, no sprinkles
   raining over the control panel. */
.elementor-editor-active .btn-play-big { animation: none; }
.elementor-editor-active .spr { display: none; }

/* The skip link and page-only chrome have no job inside a widget. */
.sts-root .skip, .sts-root .scroll-hint { display: none; }
