/* Nunito, bundled (SIL Open Font License, see fonts/OFL.txt). */
@font-face { font-family: "Nunito"; font-weight: 600; font-display: block; src: url("../fonts/nunito-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: block; src: url("../fonts/nunito-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: block; src: url("../fonts/nunito-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 900; font-display: block; src: url("../fonts/nunito-latin-900-normal.woff2") format("woff2"); }

/* ---- colour themes ------------------------------------------------------
   Every screen colour comes from these tokens. Cards, dialogs and the spice
   colours stay the same in every theme. data-theme is set on <html>. */
:root,
:root[data-theme="kitchen"] {
  --bg-top: #7a4a2c;
  --bg-mid: #4a2a18;
  --bg-bottom: #24130b;
  --cream: #fff4e2;            /* main text on the background */
  --cream-dim: rgba(255, 244, 226, 0.7);
  --ink-faint: rgba(255, 244, 226, 0.4);
  --wood-light: #b3743f;
  --wood-dark: #6e3d1f;
  --glass-edge: rgba(255, 240, 220, 0.6);
  --glass-tint: rgba(255, 255, 255, 0.16);
  --glass-tint-mid: rgba(255, 255, 255, 0.05);
  --glass-inner: rgba(0, 0, 0, 0.18);
  --rim-a: rgba(255, 245, 230, 0.85);
  --rim-b: rgba(200, 185, 165, 0.7);
  --surface: rgba(255, 255, 255, 0.14);
  --surface-2: rgba(255, 255, 255, 0.06);
  --surface-edge: rgba(255, 255, 255, 0.2);
  --surface-drop: rgba(0, 0, 0, 0.25);
  --title: #ffd27a;
  --title-shadow: #a8591a;
  --title2: #fff4e2;
  --title2-shadow: #7a4626;
  --level-shadow: rgba(0, 0, 0, 0.3);
  --toast-bg: rgba(30, 15, 7, 0.92);
  --toast-ink: #fff4e2;
  --secret: #3b2a22;
  --secret-ink: rgba(255, 244, 226, 0.55);
  --dim: rgba(20, 10, 4, 0.6);
  --drop: rgba(0, 0, 0, 0.4);
}

/* Bright sky and sunshine: the most child-friendly look. */
:root[data-theme="sunny"] {
  --bg-top: #fff3c4;
  --bg-mid: #a9e0ff;
  --bg-bottom: #5fb8ef;
  --cream: #1f3b66;
  --cream-dim: rgba(31, 59, 102, 0.72);
  --ink-faint: rgba(31, 59, 102, 0.45);
  --wood-light: #f7c27e;
  --wood-dark: #cf8440;
  --glass-edge: rgba(255, 255, 255, 0.95);
  --glass-tint: rgba(255, 255, 255, 0.45);
  --glass-tint-mid: rgba(255, 255, 255, 0.25);
  --glass-inner: rgba(31, 59, 102, 0.22);
  --rim-a: #ffffff;
  --rim-b: #d9e9f5;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-2: rgba(255, 255, 255, 0.6);
  --surface-edge: rgba(255, 255, 255, 0.9);
  --surface-drop: rgba(31, 59, 102, 0.25);
  --title: #ff8a1f;
  --title-shadow: #c2500c;
  --title2: #ffffff;
  --title2-shadow: #2f78bd;
  --level-shadow: rgba(255, 255, 255, 0.6);
  --toast-bg: rgba(31, 59, 102, 0.94);
  --toast-ink: #ffffff;
  --secret: #4d6488;
  --secret-ink: rgba(255, 255, 255, 0.75);
  --dim: rgba(20, 40, 70, 0.45);
  --drop: rgba(31, 59, 102, 0.3);
}

/* Pink and purple sweets. */
:root[data-theme="candy"] {
  --bg-top: #ffe0f3;
  --bg-mid: #ffa6d6;
  --bg-bottom: #b98cff;
  --cream: #5b1a5e;
  --cream-dim: rgba(91, 26, 94, 0.72);
  --ink-faint: rgba(91, 26, 94, 0.45);
  --wood-light: #fff2f8;
  --wood-dark: #f29ac8;
  --glass-edge: rgba(255, 255, 255, 0.95);
  --glass-tint: rgba(255, 255, 255, 0.42);
  --glass-tint-mid: rgba(255, 255, 255, 0.22);
  --glass-inner: rgba(91, 26, 94, 0.22);
  --rim-a: #ffffff;
  --rim-b: #f6d5ea;
  --surface: rgba(255, 255, 255, 0.75);
  --surface-2: rgba(255, 255, 255, 0.55);
  --surface-edge: rgba(255, 255, 255, 0.9);
  --surface-drop: rgba(91, 26, 94, 0.25);
  --title: #ffffff;
  --title-shadow: #d63384;
  --title2: #ffe36e;
  --title2-shadow: #8b3fd1;
  --level-shadow: rgba(255, 255, 255, 0.6);
  --toast-bg: rgba(91, 26, 94, 0.94);
  --toast-ink: #ffffff;
  --secret: #8a5a8f;
  --secret-ink: rgba(255, 255, 255, 0.75);
  --dim: rgba(60, 10, 60, 0.45);
  --drop: rgba(91, 26, 94, 0.3);
}

/* Deep blue night sky. */
:root[data-theme="night"] {
  --bg-top: #3c52b0;
  --bg-mid: #1c2766;
  --bg-bottom: #0b1030;
  --cream: #eef2ff;
  --cream-dim: rgba(238, 242, 255, 0.72);
  --ink-faint: rgba(238, 242, 255, 0.4);
  --wood-light: #7d6ad8;
  --wood-dark: #3b2f86;
  --glass-edge: rgba(220, 230, 255, 0.6);
  --glass-tint: rgba(255, 255, 255, 0.14);
  --glass-tint-mid: rgba(255, 255, 255, 0.05);
  --glass-inner: rgba(0, 0, 0, 0.25);
  --rim-a: rgba(235, 240, 255, 0.85);
  --rim-b: rgba(170, 180, 220, 0.7);
  --surface: rgba(255, 255, 255, 0.13);
  --surface-2: rgba(255, 255, 255, 0.05);
  --surface-edge: rgba(255, 255, 255, 0.2);
  --surface-drop: rgba(0, 0, 0, 0.3);
  --title: #ffd76a;
  --title-shadow: #8a5a00;
  --title2: #eef2ff;
  --title2-shadow: #2a3a8a;
  --level-shadow: rgba(0, 0, 0, 0.35);
  --toast-bg: rgba(10, 14, 40, 0.94);
  --toast-ink: #eef2ff;
  --secret: #2b3260;
  --secret-ink: rgba(238, 242, 255, 0.55);
  --dim: rgba(5, 8, 25, 0.6);
  --drop: rgba(0, 0, 0, 0.45);
}

:root {
  --accent: #f2a93b;
  --accent-dark: #c9781a;
  --jw: 56px;
  --jh: 134px;
  --gap: 14px;
  --lift: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  /* Nunito has Latin letters only; Indian scripts fall back to the phone's
     own Noto fonts (Android) or Nirmala UI (Windows). */
  font-family: "Nunito", "Segoe UI Rounded", "Arial Rounded MT Bold",
    "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Malayalam", "Noto Sans Kannada",
    "Noto Sans Devanagari", "Nirmala UI", system-ui, sans-serif;
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-top) 0%, var(--bg-mid) 55%, var(--bg-bottom) 100%);
  background-color: var(--bg-mid);
  color: var(--cream);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  /* Capacitor's SystemBars sets --safe-area-inset-* on Android WebViews
     that don't report env() values; use whichever is larger. */
  padding:
    max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px), 8px) 0
    max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px));
}
.screen[hidden] { display: none; }

button { font: inherit; color: inherit; }

.icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--surface-edge), 0 2px 0 var(--surface-drop);
  cursor: pointer;
}
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- home ---- */
.home-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px 0; position: relative; z-index: 2; }
/* Install (browser version): a small pill under the top bar, out of the way of the jars */
.install-btn {
  position: absolute; right: 16px; top: calc(100% + 8px);
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px 0 10px;
  border: 0; border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--surface-edge), 0 2px 0 var(--surface-drop);
  font-size: 14px; font-weight: 800; cursor: pointer;
}
.install-btn[hidden] { display: none; }
.install-btn:active { transform: scale(0.95); }
.install-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* Very short screens: only the arrow, so it stays clear of the jars */
@media (max-height: 540px) {
  .install-btn { width: 34px; padding: 0; justify-content: center; }
  .install-btn span { display: none; }
}
.home-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  text-align: center;
}
.hero-jars { display: flex; gap: 14px; align-items: flex-end; position: relative; z-index: 1; }
.hero-jar {
  position: relative;
  width: 62px;
  height: 104px;
  border: 3px solid var(--glass-edge);
  border-radius: 14px 14px 16px 16px;
  background: linear-gradient(to top, var(--a) 0 22%, var(--b) 22% 44%, var(--c2) 44% 66%, var(--d) 66% 88%, transparent 88%);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.12), 0 6px 12px rgba(0, 0, 0, 0.3);
  animation: bob 3s ease-in-out infinite;
}
.hero-jar.tall { height: 126px; animation-delay: -1s; }
.hero-jar:nth-child(3) { animation-delay: -2s; }
.hero-mascot { width: 96px; margin-left: 4px; animation: bob 3s ease-in-out infinite; animation-delay: -1.5s; }
@media (max-width: 380px) {
  .hero-jars { gap: 10px; }
  .hero-jar { width: 54px; }
  .hero-mascot { width: 84px; margin-left: 0; }
}
.hero-jar::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 6px;
  right: 6px;
  height: 14px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(#e7b65a, #a8701e);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4);
}
.hero-jar i {
  position: absolute;
  left: 9px;
  top: 10px;
  bottom: 12px;
  width: 7px;
  border-radius: 4px;
  background: linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.08));
}
.hero-shelf {
  width: 340px;
  max-width: 94%;
  height: 14px;
  margin-top: -3px;
  border-radius: 3px;
  background: linear-gradient(var(--wood-light), var(--wood-dark));
  box-shadow: 0 10px 16px var(--drop), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.logo {
  margin-top: 30px;
  font-size: 52px;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.01em;
  color: var(--title);
  text-shadow: 0 3px 0 var(--title-shadow), 0 6px 14px var(--drop);
}
.logo span { display: block; color: var(--title2); font-size: 0.78em; text-shadow: 0 3px 0 var(--title2-shadow), 0 6px 14px var(--drop); }
.tagline { margin-top: 14px; font-size: 16px; font-weight: 700; color: var(--cream-dim); }
.home-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 24px 12px;
}
.primary.big {
  max-width: 300px;
  padding: 14px 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.1;
  font-size: 26px;
}
.primary.big small { font-size: 14px; font-weight: 800; opacity: 0.75; }
.secondary {
  width: 100%;
  max-width: 300px;
  padding: 12px;
  border: 0;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--surface-edge), 0 3px 0 var(--surface-drop);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.greet {
  max-width: 300px;
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--surface-edge);
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.greet[hidden] { display: none; }
.home-foot { text-align: center; font-size: 12px; color: var(--ink-faint); font-weight: 700; padding: 6px 0 16px; }

/* ---- header ---- */
.top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 4px;
}
.level-box { text-align: center; }
.level { font-size: 24px; font-weight: 800; text-shadow: 0 2px 0 var(--level-shadow); white-space: nowrap; }
.level-sub { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 2px; }
.level-tag {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.level-tag[hidden] { display: none; }
.level-tag.easy { background: #3e9b4f; color: #fff; }
.level-tag.medium { background: #e8871e; color: #fff; }
.level-tag.hard { background: #d62839; color: #fff; }
.level-tag.mystery { background: #7a2e8e; color: #fff; }
.top-right { display: flex; align-items: center; justify-content: flex-end; }
.moves { font-size: 13px; color: var(--cream-dim); font-weight: 700; white-space: nowrap; }

/* ---- level 1 guide ---- */
#app { position: relative; }
/* Floats above the tool bar so the jars don't move when it appears or goes. */
#coach {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(100px + max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px)));
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  z-index: 5;
  padding: 9px 16px;
  border-radius: 14px;
  background: #fff4e2;
  color: #4a2a18;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  animation: pop 0.35s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}
#coach[hidden] { display: none; }

/* ---- board ---- */
#board {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  padding: 8px 8px;
  min-height: 0;
}

.row { display: flex; flex-direction: column; align-items: center; }
.row-jars {
  display: flex;
  gap: var(--gap);
  align-items: flex-end;
  justify-content: center;
  padding: 0 10px;
  position: relative;
  z-index: 1;
}
.shelf {
  height: 12px;
  width: 100%;
  max-width: calc(100% - 16px);
  margin-top: -3px;
  border-radius: 3px;
  background: linear-gradient(var(--wood-light), var(--wood-dark));
  box-shadow: 0 8px 12px var(--drop), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ---- jar ---- */
.jar {
  position: relative;
  width: var(--jw);
  height: var(--jh);
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.18s ease;
  outline: none;
}
.jar.selected { transform: translateY(calc(var(--lift) * -1)); }
.jar.flying { z-index: 10; }
.jar.shake { animation: shake 0.3s; }
.jar.hint-from .glass, .jar.hint-to .glass { animation: hintPulse 0.9s ease-in-out 3; }

.jar .rim {
  position: absolute;
  top: 2%;
  left: 9%;
  right: 9%;
  height: 7%;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(var(--rim-a), var(--rim-b));
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
  z-index: 3;
}
.jar .lid {
  position: absolute;
  top: -1%;
  left: 8%;
  right: 8%;
  height: 11%;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(#e7b65a, #a8701e);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -3px 0 rgba(0, 0, 0, 0.2), 0 2px 3px rgba(0, 0, 0, 0.35);
  z-index: 4;
  opacity: 0;
  transform: translateY(-160%);
  transition: transform 0.35s cubic-bezier(0.3, 1.5, 0.5, 1), opacity 0.2s;
  pointer-events: none;
}
.jar.done .lid { opacity: 1; transform: translateY(0); }

.jar .glass {
  position: absolute;
  top: 7%;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid var(--glass-edge);
  border-radius: 14px 14px 16px 16px / 12px 12px 16px 16px;
  background: linear-gradient(90deg, var(--glass-tint), var(--glass-tint-mid) 45%, var(--glass-tint));
  box-shadow: inset 0 0 0 1px var(--glass-inner), 0 4px 8px var(--surface-drop);
  overflow: hidden;
}
.jar .glass::after {
  content: "";
  position: absolute;
  left: 13%;
  top: 9%;
  bottom: 12%;
  width: 10%;
  border-radius: 6px;
  background: linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.05));
  z-index: 2;
  pointer-events: none;
}
.jar .fill {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 3px;
  top: 11%;
}
.layer {
  position: absolute;
  left: 0;
  right: 0;
  /* 1px overlap hides sub-pixel gaps between stacked layers. */
  height: calc(25% + 1px);
  background-color: var(--c);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.22) 0.8px, transparent 1.4px),
    radial-gradient(rgba(0, 0, 0, 0.16) 0.8px, transparent 1.4px);
  background-size: 5px 5px, 7px 6px;
  background-position: 0 0, 2px 3px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.18);
  transform-origin: bottom;
}
.layer.bottom { border-radius: 0 0 12px 12px / 0 0 13px 13px; }
.layer.same { box-shadow: none; }
.layer.secret {
  background-color: var(--secret);
  background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.05) 0 4px, transparent 4px 8px);
  color: var(--secret-ink);
  font-weight: 900;
  font-size: max(11px, calc(var(--jw) * 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}
.layer.reveal { animation: reveal 0.45s ease-out both; }
.layer.in { animation: grow 0.38s ease-out both; }
.layer.out { animation: shrink 0.38s ease-in both; }

.jar .label {
  position: absolute;
  left: 50%;
  bottom: 13%;
  transform: translateX(-50%) scale(0.6);
  opacity: 0;
  padding: 2px 5px;
  border-radius: 3px;
  background: #fbf3e1;
  color: #4a2a18;
  font-size: max(8px, calc(var(--jw) * 0.16));
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  z-index: 3;
  transition: transform 0.3s 0.15s, opacity 0.3s 0.15s;
  pointer-events: none;
}
.jar.done .label { opacity: 1; transform: translateX(-50%) scale(1); }

/* ---- spice sticker: the picture colours in from the bottom as the jar fills ---- */
.jar .sticker {
  position: absolute;
  left: 50%;
  top: 20%;
  width: max(66%, min(86%, 40px));
  aspect-ratio: 1;
  transform: translateX(-50%) scale(0.3);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.35));
  transition: transform 0.35s cubic-bezier(0.3, 1.5, 0.5, 1), opacity 0.2s;
}
.jar .sticker.on { opacity: 1; transform: translateX(-50%) scale(1); }
.sticker .st-shape { position: absolute; inset: 0; width: 100%; height: 100%; fill: #fbf3e1; stroke-width: 2; }
.sticker[data-style="round"] .st-shape { stroke: #e0bf86; }
.sticker[data-style="label"] .st-shape { stroke: #d9a441; }
.sticker[data-style="hex"] .st-shape { fill: #f3f8fc; stroke: #8fc2e6; }
.sticker[data-style="flower"] .st-shape { fill: #fff4f8; stroke: #f2a1c2; }
.sticker .st-art { position: absolute; inset: 14%; }
.sticker .st-art svg { display: block; width: 100%; height: 100%; }
.sticker .st-base { filter: grayscale(1); opacity: 0.28; }
.sticker .st-color { clip-path: inset(var(--cut, 100%) 0 0 0); transition: clip-path 0.45s ease 0.15s; }
.jar .sticker.full { animation: stickerDone 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) 0.2s; }
.sticker.full .st-shape { stroke: #ffc93c; stroke-width: 3; }
.sticker.full::after {
  content: "";
  position: absolute;
  top: -8%;
  right: -10%;
  width: 34%;
  height: 34%;
  background: #ffc93c;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: twinkle 1.6s ease-in-out infinite;
}
body.idle .sticker.full::after { animation: none; }
@keyframes stickerDone { 40% { transform: translateX(-50%) scale(1.2) rotate(-6deg); } }
@keyframes twinkle { 50% { transform: scale(0.6) rotate(45deg); opacity: 0.6; } }

/* ---- pouring stream ---- */
#stream {
  position: fixed;
  left: 0;
  top: 0;
  width: 6px;
  height: 0;
  border-radius: 3px;
  background-color: var(--c, #fff);
  background-image: radial-gradient(rgba(255, 255, 255, 0.25) 0.8px, transparent 1.4px);
  background-size: 4px 4px;
  transform-origin: top;
  z-index: 9;
  opacity: 0;
  pointer-events: none;
}
#stream.on { opacity: 1; animation: flow 0.38s ease-out both; }

/* ---- tools ---- */
.tools {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px 18px;
}
.tool {
  position: relative;
  flex: 1;
  max-width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 4px 8px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(var(--surface), var(--surface-2));
  box-shadow: inset 0 1px 0 var(--surface-edge), 0 3px 0 var(--surface-drop);
  color: var(--cream);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.tool:active { transform: translateY(2px); box-shadow: inset 0 1px 0 var(--surface-edge), 0 1px 0 var(--surface-drop); }
.tool:disabled { opacity: 0.4; }
.tool svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.badge {
  position: absolute;
  top: -5px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--accent);
  color: #3a1f0c;
  font-size: 12px;
  line-height: 20px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

/* ---- toast ---- */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(110px + max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px)));
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--toast-bg);
  color: var(--toast-ink);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 20;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---- win overlay ---- */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--dim);
  z-index: 30;
  animation: fadeIn 0.25s both;
}
.overlay[hidden] { display: none; }
.card {
  width: 100%;
  max-width: 320px;
  padding: 26px 22px 22px;
  border-radius: 22px;
  background: linear-gradient(#fff7e8, #f3dfbd);
  color: #4a2a18;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  animation: pop 0.4s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}
.card h2 { font-size: 26px; font-weight: 900; margin: 10px 0 4px; }
.card p { font-size: 15px; font-weight: 700; color: #7a5236; margin-bottom: 18px; }
.card h2:first-child { margin-top: 0; }
/* Mascot (baby elephant, drawn by js/mascot.js) */
.card-mascot { width: 124px; margin: 0 auto 2px; animation: bob 2.4s ease-in-out infinite; }
.card-mascot svg, .hero-mascot svg { display: block; width: 100%; height: auto; }
.mascot .m-eye { transform-box: fill-box; transform-origin: center; animation: blink 4.6s ease-in-out infinite; }
.hero-mascot .m-eye { animation-delay: -2s; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
.text-btn {
  margin-top: 10px;
  padding: 8px 16px;
  border: 0;
  background: none;
  color: #7a5236;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

/* ---- settings ---- */
.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px;
  border-bottom: 1px solid rgba(74, 42, 24, 0.12);
  font-size: 17px;
  font-weight: 800;
  text-align: left;
}
.setting:last-of-type { margin-bottom: 18px; }
/* ---- player profile (settings row + welcome dialog) ---- */
.profile-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 6px;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: rgba(201, 120, 26, 0.12);
  color: #4a2a18;
  text-align: left;
  cursor: pointer;
}
.profile-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(var(--accent), var(--accent-dark));
  color: #3a1f0c;
  font-size: 18px;
  font-weight: 900;
}
.profile-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.profile-text b { font-size: 17px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-text small { font-size: 13px; font-weight: 700; color: #7a5236; }
.profile-row svg { flex: none; width: 20px; height: 20px; fill: none; stroke: #9a7a5e; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.card .field-label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 800; color: #7a5236; text-align: left; }
.field {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e5cfa8;
  border-radius: 12px;
  background: #fff;
  color: #3a2214;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  user-select: text;
  -webkit-user-select: text;
}
.field:focus { outline: none; border-color: var(--accent-dark); }
.lang-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 18px; }
.lang-pick {
  padding: 10px 6px;
  border: 2px solid #ecd9b8;
  border-radius: 12px;
  background: #fff;
  color: #4a2a18;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}
.lang-pick[aria-checked="true"] { border-color: var(--accent-dark); background: #fff1d6; box-shadow: 0 2px 0 var(--accent-dark); }
.profile h2 { margin-top: 10px; }
/* Long dialogs (welcome with keyboard open) can scroll. */
.overlay { overflow-y: auto; }
.overlay .card { margin: auto; }

.card .setting-label { margin: 8px 0 8px; font-size: 13px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; color: #9a7a5e; text-align: left; }
.theme-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 6px 0 14px;
  border-bottom: 1px solid rgba(74, 42, 24, 0.12);
}
.theme-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  color: #4a2a18;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.theme-pick i {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: radial-gradient(120% 90% at 50% 0%, var(--t1), var(--t2) 60%, var(--t3));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5), 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.15s, transform 0.15s;
}
/* A tiny spice jar inside each swatch. */
.theme-pick i::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 16px;
  height: 22px;
  transform: translateX(-50%);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 4px 4px 5px 5px;
  background: linear-gradient(to top, #d62839 0 30%, #f2c230 30% 60%, #3e9b4f 60% 90%, transparent 90%);
}
.theme-pick[aria-checked="true"] i {
  transform: scale(1.06);
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--accent-dark), 0 3px 6px rgba(0, 0, 0, 0.25);
}
.switch {
  position: relative;
  width: 52px;
  height: 30px;
  border: 0;
  border-radius: 15px;
  background: #cdb89a;
  cursor: pointer;
  transition: background 0.2s;
}
.switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}
.switch[aria-checked="true"] { background: #3e9b4f; }
.switch[aria-checked="true"] i { transform: translateX(22px); }
.fine { margin: 14px 0 0 !important; font-size: 12px !important; color: #9a7a5e !important; line-height: 1.7; }
.fine a { color: #c9781a; font-weight: 800; }

/* ---- coins + wardrobe ---- */
.coin {
  flex: none;
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffdc5c 0 42%, #f0b400 43% 52%, #ffd23f 53%);
  box-shadow: inset 0 0 0 2px #c98a00, 0 1px 0 rgba(0, 0, 0, 0.2);
}
.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 16px 0 10px;
  border: 0;
  border-radius: 21px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--surface-edge), 0 2px 0 var(--surface-drop);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.coin-pill:active { transform: scale(0.95); }
.card .coin-pill.in-card {
  height: auto;
  margin: 2px 0 4px;
  padding: 5px 14px 5px 8px;
  background: #fff1d6;
  box-shadow: none;
  color: #8f5210;
  font-size: 16px;
  cursor: default;
}
.secondary.dress { display: flex; align-items: center; justify-content: center; gap: 8px; }
.secondary.dress svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero-mascot { cursor: pointer; }
.card p.win-coins {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -6px 0 14px;
  padding: 5px 14px 5px 8px;
  border-radius: 16px;
  background: #fff1d6;
  color: #8f5210;
  font-size: 17px;
  font-weight: 900;
  animation: pop 0.5s 0.3s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}
.card p.win-coins[hidden] { display: none; }
.coin-news {
  display: block;
  width: 100%;
  margin: -4px 0 14px;
  padding: 9px 10px;
  border: 2px dashed var(--accent-dark);
  border-radius: 12px;
  background: #fff;
  color: #8f5210;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}
.coin-news[hidden] { display: none; }
.wardrobe h2 { margin-bottom: 2px; }
.wardrobe-stage { width: 112px; margin: 0 auto; }
.wardrobe-stage.cheer { animation: pop 0.45s cubic-bezier(0.3, 1.5, 0.5, 1); }
.wardrobe-stage svg, .outfit-pick svg { display: block; width: 100%; height: auto; }
.card .wardrobe-name { margin: 0 0 10px; font-size: 18px; font-weight: 900; color: #4a2a18; }
.outfit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.outfit-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 4px 2px 4px;
  border: 2px solid #ecd9b8;
  border-radius: 12px;
  background: #fff;
  color: #8f5210;
  cursor: pointer;
}
.outfit-pick .m-eye { animation: none; }
.outfit-pick.locked svg { opacity: 0.5; }
.outfit-pick.locked { color: #9a7a5e; }
.outfit-pick[aria-checked="true"] { border-color: var(--accent-dark); background: #fff1d6; box-shadow: 0 2px 0 var(--accent-dark); }
.outfit-tag { display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 18px; font-size: 13px; font-weight: 900; }
.outfit-tag .coin { width: 13px; height: 13px; box-shadow: inset 0 0 0 1.5px #c98a00; }
.outfit-tag svg { width: 18px !important; height: 18px; fill: none; stroke: #3e9b4f; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.outfit-pick.worn .outfit-tag { padding: 0 8px; border-radius: 9px; background: #3e9b4f; }
.outfit-pick.worn .outfit-tag svg { stroke: #fff; }
.primary:disabled { opacity: 0.6; cursor: default; }
.primary:disabled:active { transform: none; box-shadow: 0 4px 0 #8f5210; }
.card .wardrobe-help { margin: 10px 0 0; font-size: 13px; color: #9a7a5e; }
.wardrobe .text-btn { margin-top: 4px; }
@media (max-height: 700px) {
  .wardrobe-stage { width: 84px; }
  .outfit-grid { gap: 4px; }
  .card .wardrobe-help { display: none; }
  .card-mascot { width: 100px; }
}

/* ---- Ellie: greeting, win dance, stuck wobble ---- */
.card p.ellie-hi {
  display: inline-block;
  position: relative;
  margin: 2px 0 0;
  padding: 5px 14px;
  border-radius: 14px;
  background: #fff;
  color: #4a2a18;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 2px 0 #ecd9b8;
}
.card p.ellie-hi::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top: 0;
  border-bottom-color: #fff;
}
.card-mascot { transform-origin: 50% 100%; }
.card-mascot.dance { animation: dance 1.5s ease-in-out 0.25s 1 both, bob 2.4s ease-in-out 1.75s infinite; }
.card-mascot.wobble { animation: wobble 1.1s ease-in-out 0.15s 2 both, bob 2.4s ease-in-out 2.4s infinite; }
@keyframes dance {
  0% { transform: none; }
  12% { transform: translateY(3px) scale(1.08, 0.9); }
  24% { transform: translateY(-22px) rotate(-8deg) scale(0.96, 1.06); }
  36% { transform: translateY(2px) scale(1.06, 0.92); }
  48% { transform: translateY(-22px) rotate(8deg) scale(0.96, 1.06); }
  60% { transform: translateY(2px) scale(1.06, 0.92); }
  74% { transform: translateY(-14px) rotate(-4deg); }
  88% { transform: translateY(0) scale(1.03, 0.97); }
  100% { transform: none; }
}
@keyframes wobble {
  0%, 100% { transform: none; }
  20% { transform: rotate(-6deg); }
  40% { transform: rotate(5deg); }
  60% { transform: rotate(-4deg); }
  80% { transform: rotate(2deg); }
}

/* confetti shower over the level-complete card */
.confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 40; }
.confetti i {
  position: absolute;
  top: -24px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  background: var(--c);
  animation: fall var(--d) cubic-bezier(0.25, 0.4, 0.6, 1) var(--delay) both;
}
.confetti i.round { width: 10px; height: 10px; border-radius: 50%; }
.confetti i.coin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffdc5c 0 42%, #f0b400 43% 52%, #ffd23f 53%);
  box-shadow: inset 0 0 0 2px #c98a00;
}
@keyframes fall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  30% { transform: translate3d(var(--x), 32vh, 0) rotate(calc(var(--r) * 0.3)); }
  60% { transform: translate3d(calc(var(--x) * -1), 66vh, 0) rotate(calc(var(--r) * 0.6)); }
  100% { transform: translate3d(var(--x), 108vh, 0) rotate(var(--r)); }
}

/* stuck card */
.stuck .card-mascot { margin-bottom: 0; }
.stuck p { margin-bottom: 12px; }
.stuck-actions { display: flex; justify-content: center; gap: 8px; margin-bottom: 6px; }
.stuck-btn {
  flex: 1 1 0;
  max-width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px 8px;
  border: 2px solid #ecd9b8;
  border-radius: 14px;
  background: #fff;
  color: #4a2a18;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}
.stuck-btn[hidden] { display: none; }
.stuck-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stuck-btn.best {
  border-color: var(--accent-dark);
  background: linear-gradient(var(--accent), var(--accent-dark));
  color: #3a1f0c;
  box-shadow: 0 3px 0 #8f5210;
  animation: hintPulse 1.4s ease-in-out 0.8s 3;
}
.stuck-btn:active { transform: translateY(2px); }

/* ---- Hard-level clock ---- */
.clock {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px 2px 5px;
  border-radius: 10px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.6s;
}
.clock[hidden] { display: none; }
.clock svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.clock.hurry { background: #ffd8a8; color: #8f3a00; animation: hintPulse 1s ease-in-out infinite; }
.clock.up { background: #d62839; color: #fff; }
.card p.win-fast {
  margin: -8px 0 10px;
  color: #c9781a;
  font-size: 15px;
  font-weight: 900;
}
.card p.win-fast span:first-child { color: #ffc93c; font-size: 20px; text-shadow: 0 1px 0 #c98a00; }
.card p.win-fast[hidden] { display: none; }

/* ---- wardrobe characters ---- */
.char-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 4px; }
.tile-art { display: block; width: 100%; }
.wardrobe .setting-label { margin: 2px 0 6px; }

/* ---- splash ---- */
#splash {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-top) 0%, var(--bg-mid) 55%, var(--bg-bottom) 100%);
  background-color: var(--bg-mid);
  transition: opacity 0.4s;
}
#splash[hidden] { display: none; }
#splash.out { opacity: 0; pointer-events: none; }
.splash-stage { display: flex; flex-direction: column; align-items: center; }
.splash-jars { display: flex; gap: 12px; align-items: flex-end; }
.splash-jar {
  position: relative;
  width: 52px;
  height: 84px;
  border: 3px solid var(--glass-edge);
  border-radius: 12px 12px 14px 14px;
  background: linear-gradient(to top, var(--a) 0 80%, transparent 80%);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.12), 0 6px 12px rgba(0, 0, 0, 0.25);
  animation: dropIn 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}
.splash-jar.tall { height: 104px; animation-delay: 0.15s; }
.splash-jar:nth-child(3) { animation-delay: 0.3s; }
.splash-jar::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 5px;
  right: 5px;
  height: 12px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(#e7b65a, #a8701e);
}
.splash-jar i { position: absolute; left: 7px; top: 8px; bottom: 10px; width: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.45); }
.splash-mascot { width: 92px; margin-left: 4px; transform-origin: 50% 100%; animation: popIn 0.7s 0.55s cubic-bezier(0.3, 1.6, 0.5, 1) both, dance 1.3s 1.25s ease-in-out both; }
.splash-mascot svg { display: block; width: 100%; height: auto; }
.splash-shelf {
  width: 300px;
  max-width: 86vw;
  height: 14px;
  margin-top: -3px;
  border-radius: 3px;
  background: linear-gradient(var(--wood-light), var(--wood-dark));
  box-shadow: 0 10px 16px var(--drop);
  animation: fadeIn 0.3s both;
}
.splash-logo { text-align: center; animation: logoIn 0.7s 0.9s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
@keyframes dropIn { from { transform: translateY(-70vh); } }
@keyframes popIn { from { transform: scale(0); opacity: 0; } }
@keyframes logoIn { from { transform: translateY(40px) scale(0.6); opacity: 0; } }

/* ---- "next level" loader: walk the shelf / pour the spice / hop the jars ---- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-top) 0%, var(--bg-mid) 55%, var(--bg-bottom) 100%);
  background-color: var(--bg-mid);
  animation: fadeIn 0.15s both;
  transition: opacity 0.25s;
}
.loader[hidden] { display: none; }
.loader.out { opacity: 0; pointer-events: none; }
.ld-title {
  min-height: 52px;
  margin-bottom: 26px;
  font-size: 44px;
  font-weight: 900;
  color: var(--title);
  text-shadow: 0 3px 0 var(--title-shadow), 0 6px 14px var(--drop);
  opacity: 0;
}
.ld-title.show { opacity: 1; animation: logoIn 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
.ld-stage { position: relative; width: min(300px, 86vw); height: 160px; }
.ld-char svg { display: block; width: 100%; height: auto; transform-origin: 50% 100%; }
.ld-char.waddle svg { animation: waddle 0.28s ease-in-out infinite alternate; }
.ld-stage.done .ld-char svg { animation: ldJump 0.6s cubic-bezier(0.3, 1.5, 0.5, 1); }
.ld-shelf {
  position: absolute;
  left: -10px;
  right: -10px;
  bottom: 0;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(var(--wood-light), var(--wood-dark));
  box-shadow: 0 10px 16px var(--drop);
}
.ld-fill { height: 100%; width: 0; background-repeat: no-repeat; position: relative; }
.ld-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1.5px) 0 0 / 6px 6px,
    linear-gradient(rgba(255, 255, 255, 0.35), transparent 45%);
}
.ld-lid {
  position: absolute;
  top: -9px;
  left: 3px;
  right: 3px;
  height: 9px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(#e7b65a, #a8701e);
}
.ld-stage.done .ld-lid { animation: lidPop 0.6s ease-out forwards; }

/* 1. walk the shelf: the character pushes a jar; the shelf fills behind it */
.ld-walk .ld-mover { position: absolute; left: 0; bottom: 32px; width: 104px; display: flex; align-items: flex-end; gap: 2px; }
.ld-walk .ld-char { width: 72px; }
.ld-jar {
  position: relative;
  flex: none;
  width: 26px;
  height: 34px;
  margin-bottom: 1px;
  border: 2px solid var(--glass-edge);
  border-radius: 6px 6px 8px 8px;
  background: linear-gradient(to top, var(--a) 0 72%, var(--glass-tint) 72%);
}
.ld-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  height: 18px;
  overflow: hidden;
  border: 2px solid var(--glass-edge);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  background: var(--glass-tint);
}

/* 2. pour the spice: a tipped jar fills a long glass tube */
.ld-pourer { position: absolute; inset: 0; }
.ld-pour .ld-char { position: absolute; left: 70px; bottom: 37px; width: 72px; }
.ld-bigjar {
  position: absolute;
  left: 22px;
  bottom: 80px;
  width: 40px;
  height: 54px;
  border: 3px solid var(--glass-edge);
  border-radius: 9px 9px 12px 12px;
  background: linear-gradient(to top, var(--a) 0 70%, var(--glass-tint) 70%);
  transform-origin: 50% 100%;
  animation: tipJar 0.22s ease-out forwards;
}
.ld-pour .ld-bigjar .ld-lid { display: none; }
.ld-stream {
  position: absolute;
  left: 9px;
  bottom: 28px;
  width: 7px;
  height: 34px;
  border-radius: 4px;
  transform-origin: 50% 0;
  animation: streamIn 0.15s 0.17s both;
}
.ld-tube {
  position: absolute;
  left: 0;
  right: 10px;
  bottom: 0;
  height: 34px;
  border: 3px solid var(--glass-edge);
  border-radius: 17px;
  background: var(--glass-tint);
}
.ld-tube .ld-fill { border-radius: 14px; max-width: 100%; }
.ld-cork {
  position: absolute;
  right: -13px;
  top: 2px;
  width: 13px;
  height: 24px;
  border-radius: 3px 6px 6px 3px;
  background: linear-gradient(90deg, #e7b65a, #a8701e);
  transform: scale(0);
}
.ld-pour.done .ld-cork { animation: popIn 0.35s cubic-bezier(0.3, 1.6, 0.5, 1) both; transform: none; }
.ld-pour.done .ld-bigjar { animation: untipJar 0.3s ease-out both; }
.ld-pour.done .ld-stream { opacity: 0; transition: opacity 0.15s; }

/* 3. hop the jars: each jar fills when the character lands on it */
.ld-jars { position: absolute; right: 0; bottom: 14px; display: flex; gap: 10px; }
.ld-sjar {
  position: relative;
  width: 40px;
  height: 54px;
  border: 3px solid var(--glass-edge);
  border-radius: 8px 8px 10px 10px;
  background: var(--glass-tint);
}
.ld-sjar::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 4px;
  right: 4px;
  height: 9px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(#e7b65a, #a8701e);
}
.ld-sjar::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 2px;
  height: 0;
  border-radius: 4px 4px 6px 6px;
  background: var(--a);
  transition: height 0.2s ease-out;
}
.ld-sjar.lit::after { height: 80%; }
.ld-sjar.lit { animation: jarLand 0.3s ease-out; box-shadow: 0 0 16px var(--a); }
.ld-hop .ld-mover { position: absolute; left: 0; bottom: 14px; width: 54px; }
.ld-hop .ld-char { width: 54px; }

@keyframes waddle { from { transform: rotate(-7deg); } to { transform: translateY(-3px) rotate(7deg); } }
@keyframes ldJump {
  0% { transform: none; }
  40% { transform: translateY(-26px) scale(0.95, 1.06); }
  70% { transform: translateY(0) scale(1.08, 0.92); }
  100% { transform: none; }
}
@keyframes lidPop { to { transform: translate(14px, -46px) rotate(220deg); opacity: 0; } }
@keyframes tipJar { to { transform: rotate(-125deg); } }
@keyframes untipJar { from { transform: rotate(-125deg); } to { transform: translateY(43px); } }
@keyframes streamIn { from { transform: scaleY(0); } }
@keyframes jarLand { 40% { transform: scale(1.08, 0.9); } }

/* Resting: after 20 s without a touch the always-moving decorations stop,
   so the phone doesn't redraw the screen for nothing (js/game.js wakeUp). */
body.idle .hero-jar, body.idle .hero-mascot, body.idle .card-mascot,
body.idle .mascot .m-eye, body.idle .clock.hurry { animation: none !important; }

/* ---- how to play ---- */
.how { text-align: left; }
.how h2 { text-align: center; margin-bottom: 12px; }
.how ol { padding-left: 22px; margin-bottom: 12px; font-size: 16px; font-weight: 700; line-height: 1.4; }
.how ol li { margin-bottom: 6px; }
.how-extra { list-style: none; margin-bottom: 18px; font-size: 14px; font-weight: 600; color: #6b4a33; line-height: 1.5; }
.primary {
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(var(--accent), var(--accent-dark));
  color: #3a1f0c;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 4px 0 #8f5210;
  cursor: pointer;
}
.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #8f5210; }

/* ---- confetti ---- */
.spark {
  position: fixed;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
  pointer-events: none;
  z-index: 25;
  animation: burst 0.9s ease-out forwards;
}

@keyframes grow { from { transform: scaleY(0); } }
@keyframes shrink { to { transform: scaleY(0); } }
@keyframes flow { from { transform: scaleY(0); } }
@keyframes shake {
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}
@keyframes hintPulse {
  50% { box-shadow: 0 0 0 4px var(--accent), 0 0 18px var(--accent); }
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-6px); } }
/* A tapped character squishes and hops while it makes its sound. */
.card-mascot, .wardrobe-stage { cursor: pointer; }
.hero-mascot.boop, .card-mascot.boop, .wardrobe-stage.boop, .char-pick.boop svg {
  animation: boop 0.45s cubic-bezier(0.3, 1.4, 0.5, 1);
  transform-origin: 50% 100%;
}
@keyframes boop {
  0% { transform: none; }
  30% { transform: scale(1.12, 0.88); }
  65% { transform: scale(0.94, 1.08) translateY(-8px); }
  100% { transform: none; }
}
@keyframes reveal {
  0% { filter: brightness(2.2); transform: scaleX(0.6); }
  60% { transform: scaleX(1.06); }
}
@keyframes pop { from { transform: scale(0.7); opacity: 0; } }
@keyframes burst {
  to { transform: translate(var(--dx), var(--dy)) scale(0.3); opacity: 0; }
}

/* ---- level road: the 5 levels of a round (Easy, Easy, Medium, Medium, Hard) ---- */
.road {
  display: flex;
  width: 100%;
  max-width: 300px;
  padding: 9px 4px 6px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--surface-edge);
}
.road:empty { display: none; }
.road .stop {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.road .stop.easy { --c: #3e9b4f; }
.road .stop.medium { --c: #e8871e; }
.road .stop.hard { --c: #d62839; }
/* the path between two stops */
.road .stop + .stop::before {
  content: '';
  position: absolute;
  top: 14px;
  right: 50%;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.18;
}
.road .stop.done + .stop::before { background: #3e9b4f; opacity: 0.8; }
.road b {
  position: relative;
  z-index: 1;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
  opacity: 0.55;
}
.road .stop.done b, .road .stop.now b { opacity: 1; }
.road .stop.now b {
  transform: scale(1.15);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c), inset 0 -3px 0 rgba(0, 0, 0, 0.18);
  animation: roadNow 1.6s ease-in-out infinite;
}
.road .tick {
  position: absolute;
  top: -6px;
  right: -7px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.road .tick svg { display: block; width: 100%; height: 100%; fill: none; stroke: #3e9b4f; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.road .stop.just .tick { animation: tickPop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 0.5s both; }
.road small {
  display: block;
  width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}
.road .stop.now small { opacity: 1; }
html:not([lang="en"]) .road small { letter-spacing: 0; font-size: 9.5px; }
/* Shorter phones: make room for the road so every home button still shows. */
@media (max-height: 780px) {
  .home-hero .hero-jars { transform: scale(0.8); transform-origin: 50% 100%; margin-top: -26px; }
  .home-hero .logo { margin-top: 12px; font-size: 44px; }
  .home-hero .tagline { margin-top: 8px; font-size: 15px; }
  .home-actions { gap: 10px; }
  .home-actions .primary.big { padding: 10px 18px 9px; font-size: 24px; }
  .home-actions .secondary { padding: 10px; }
  .home-foot { padding: 4px 0 8px; }
}
@media (max-height: 680px) {
  .home-hero .tagline, .home-foot { display: none; }
  .home-hero .logo { margin-top: 6px; font-size: 40px; }
  .greet { padding: 4px 14px; font-size: 15px; }
}
.road.in-card { margin: 0 auto 16px; background: rgba(74, 42, 24, 0.07); box-shadow: none; color: #4a2a18; }
body.idle .road .stop.now b { animation: none; }
@keyframes roadNow { 50% { transform: scale(1.22); } }
@keyframes tickPop { from { transform: scale(0); } }

/* ---- time's up (Hard levels) ---- */
.timeup .card-mascot { margin-bottom: 0; }
.card p.timeup-clock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 2px 0 0;
  padding: 3px 10px 3px 7px;
  border-radius: 12px;
  background: #d62839;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}
.timeup-clock svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.timeup .primary { display: flex; align-items: center; justify-content: center; gap: 8px; }
.timeup .primary svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---- restart: the jars drop back onto the shelf, the button spins ---- */
#board.restarting .jar { animation: jarReset 0.5s cubic-bezier(0.3, 1.4, 0.5, 1) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
#btn-restart.spin svg { animation: spinBack 0.6s ease-in-out; }
@keyframes jarReset { from { transform: translateY(-36px) scale(0.85); opacity: 0; } }
@keyframes spinBack { to { transform: rotate(-360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .mascot .m-eye { animation: none; }
}

/* ==== 1.3: shop, Masala Sort Plus, daily gift, coin prices, grown-up check ==== */
[hidden] { display: none !important; }
#toast { z-index: 45; } /* above the shop, so the thank-you message shows */

/* home: coin counter opens the shop, daily gift, Dress up + Shop */
.bar-right { display: flex; gap: 10px; }
.coin-pill { padding-right: 8px; }
.card .coin-pill.in-card { padding-right: 14px; }
.pill-plus {
  width: 24px;
  height: 24px;
  margin-left: 2px;
  border-radius: 50%;
  background: #3e9b4f;
  color: #fff;
  font-size: 18px;
  line-height: 24px;
  text-align: center;
}
.icon-btn.gift { position: relative; }
.icon-btn.gift .dot {
  display: none;
  position: absolute;
  top: -3px;
  right: -3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #e53935;
  box-shadow: 0 0 0 2px #fff;
}
.icon-btn.gift.ready .dot { display: block; }
.icon-btn.gift.ready svg { animation: giftWiggle 2.6s ease-in-out infinite; }
body.idle .icon-btn.gift.ready svg { animation: none; }
@keyframes giftWiggle {
  0%, 68%, 100% { transform: rotate(0); }
  74% { transform: rotate(-14deg) scale(1.1); }
  82% { transform: rotate(12deg) scale(1.1); }
  90% { transform: rotate(-6deg); }
}
.home-row { display: flex; gap: 10px; width: 100%; max-width: 300px; }
.home-row .secondary { flex: 1 1 0; min-width: 0; padding-left: 6px; padding-right: 6px; gap: 6px; }
.home-row .secondary svg { flex: none; }
.home-row .secondary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* a coin price on a tool badge or a button */
.badge.pay { display: inline-flex; align-items: center; gap: 2px; padding: 0 5px 0 3px; background: #fff1d6; }
.badge .coin, .price .coin { width: 12px; height: 12px; box-shadow: inset 0 0 0 1.5px #c98a00; }
.price { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 900; color: #8f5210; }
.stuck-btn.best .price { color: #3a1f0c; }
.card-alt {
  width: 100%;
  margin-top: 10px;
  padding: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid #ecd9b8;
  border-radius: 14px;
  background: #fff;
  color: #4a2a18;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}
.card-alt:active { transform: translateY(2px); }
.card-alt .price { padding: 2px 8px 2px 5px; border-radius: 10px; background: #fff1d6; font-size: 14px; }
.card-alt .price .coin { width: 14px; height: 14px; }

/* lifted jar: a jar that stays up after a pour glows softly */
.jar.held { filter: drop-shadow(0 0 7px rgba(255, 201, 60, 0.95)); }

/* win card */
.win-coins .x2 {
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 9px;
  background: linear-gradient(#9b7bea, #6c47c9);
  color: #fff;
  font-size: 12px;
}
.coin-news.plus-news { border-color: #7e57c2; color: #5e35b1; }

/* spend coins card */
.spend-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 6px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff1d6;
  color: #c9781a;
}
.spend-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card p.spend-sub { margin: 8px 0 0; color: #d62839; }
.spend .primary { margin-top: 12px; }
.primary.with-coin { display: flex; align-items: center; justify-content: center; gap: 8px; }

/* shop */
.card.shop { max-width: 340px; padding: 22px 16px 18px; }
.shop h2 { margin-bottom: 2px; }
.shop-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 10px;
  padding: 9px 12px;
  border: 2px solid #ecd9b8;
  border-radius: 14px;
  background: #fff;
  color: #4a2a18;
  text-align: left;
  cursor: pointer;
}
.shop-row.ready { border-color: var(--accent-dark); background: #fff7e0; }
.shop-row:active { transform: translateY(2px); }
.shop-ico { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #ffe3e8; color: #d62839; }
.shop-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.shop-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shop-row-text b { font-size: 16px; font-weight: 900; }
.shop-row-text small { font-size: 13px; font-weight: 700; color: #7a5236; }
.shop-tag { flex: none; padding: 4px 10px; border-radius: 10px; background: #3e9b4f; color: #fff; font-size: 13px; font-weight: 900; }
.plus-card {
  margin: 0 0 12px;
  padding: 12px;
  border: 2px solid #b79cf0;
  border-radius: 16px;
  background: linear-gradient(160deg, #f3ecff, #dccbff);
  text-align: left;
}
.plus-head { display: flex; align-items: center; gap: 10px; }
.plus-art { flex: none; width: 86px; }
.plus-art svg { display: block; width: 100%; height: auto; }
.plus-text { min-width: 0; }
.plus-text h3 { margin-bottom: 5px; font-size: 18px; font-weight: 900; color: #4527a0; }
.plus-text ul { list-style: none; font-size: 13px; font-weight: 800; color: #4a2a18; line-height: 1.3; }
.plus-text li { position: relative; margin-bottom: 4px; padding-left: 18px; }
.plus-text li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 3px;
  width: 9px;
  height: 5px;
  border-left: 3px solid #3e9b4f;
  border-bottom: 3px solid #3e9b4f;
  transform: rotate(-45deg);
}
.primary.buy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  margin-top: 10px;
  padding: 8px 12px 9px;
  background: linear-gradient(#9b7bea, #6c47c9);
  color: #fff;
  box-shadow: 0 4px 0 #4527a0;
}
.primary.buy:active { box-shadow: 0 1px 0 #4527a0; }
.primary.buy:disabled:active { transform: none; box-shadow: 0 4px 0 #4527a0; }
.primary.buy .buy-price { font-size: 21px; line-height: 1.15; }
.primary.buy small { font-size: 12px; font-weight: 800; opacity: 0.92; }
.card p.plus-have { margin: 10px 0 0; text-align: center; color: #4527a0; font-weight: 900; }
.bag-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.bag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 5px 6px;
  border: 2px solid #ecd9b8;
  border-radius: 14px;
  background: #fff;
  color: #4a2a18;
  cursor: pointer;
}
.bag:active { transform: translateY(2px); }
.bag:disabled { opacity: 0.6; cursor: default; }
.bag:disabled:active { transform: none; }
.bag b { font-size: 17px; font-weight: 900; }
.bag-art { display: flex; align-items: flex-end; justify-content: center; height: 30px; }
.bag-art .coin { margin: 0 -4px; }
.bag-art .coin:nth-child(2) { transform: translateY(-7px); z-index: 1; }
.bag .buy-price {
  width: 100%;
  padding: 4px 2px;
  border-radius: 9px;
  background: linear-gradient(var(--accent), var(--accent-dark));
  color: #3a1f0c;
  font-size: 14px;
  font-weight: 900;
}
.card p.shop-note { margin: 0 0 10px; font-size: 13px; }
.card p.shop-fine { margin: 0 0 4px !important; line-height: 1.4; }
.shop .text-btn { margin-top: 0; }
.shop > .primary { margin-top: 8px; }

/* wardrobe: the character that comes with Plus */
.char-grid { grid-template-columns: repeat(5, 1fr); gap: 4px; }
.outfit-tag.plus-chip { padding: 0 6px; border-radius: 9px; background: #7e57c2; color: #fff; font-size: 11px; }

/* grown-up check */
.card p.gate-q { margin: 0 0 12px; font-size: 30px; font-weight: 900; color: #4a2a18; }
.gate-q b {
  display: inline-block;
  min-width: 66px;
  min-height: 40px;
  padding: 0 8px;
  border-bottom: 3px solid var(--accent-dark);
  vertical-align: bottom;
}
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.key {
  padding: 11px 0;
  border: 2px solid #ecd9b8;
  border-radius: 12px;
  background: #fff;
  color: #4a2a18;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}
.key:active { transform: translateY(2px); }
.key.ok { border-color: #2e7d3a; background: #3e9b4f; color: #fff; }
.card.shake { animation: shake 0.3s; }
/* longer words in other languages: keep the shop rows compact */
html:not([lang="en"]) .shop-row-text b { font-size: 15px; line-height: 1.25; }
html:not([lang="en"]) .shop-row-text small { font-size: 12px; }
html:not([lang="en"]) .plus-text ul { font-size: 12px; }
html:not([lang="en"]) .plus-art { width: 70px; }
html:not([lang="en"]) .shop-tag { padding: 4px 8px; font-size: 12px; }

/* ==== My report: player level, four numbers, last 7 days ==== */
.card.report { max-width: 340px; padding: 22px 16px 18px; }
.rank {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin: 8px 0 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 2px #ecd9b8;
}
.rank-stars { display: flex; gap: 4px; }
.rank-stars i { width: 30px; height: 30px; }
.rank-stars svg { display: block; width: 100%; height: 100%; fill: #eadfcd; stroke: #d9c7a8; stroke-width: 1.2; stroke-linejoin: round; }
.rank-stars i.on svg { fill: #ffc93c; stroke: #c98a00; }
.rank-name { font-size: 24px; font-weight: 900; line-height: 1.2; color: #4a2a18; }
.rank-bar { width: 100%; height: 10px; margin: 4px 0 2px; border-radius: 5px; background: #eadfcd; overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--accent), var(--accent-dark)); }
.rank small { font-size: 13px; font-weight: 800; color: #7a5236; }
.rank small.rank-tip { font-size: 12px; font-weight: 700; color: #9a7a5e; line-height: 1.35; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 8px 8px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 2px #ecd9b8;
  min-width: 0;
}
.stat b { font-size: 21px; font-weight: 900; line-height: 1.15; color: #4a2a18; }
.stat span { font-size: 13px; font-weight: 800; color: #7a5236; line-height: 1.25; }
.stat small { margin-top: 2px; font-size: 11px; font-weight: 700; color: #9a7a5e; line-height: 1.3; }
.week {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 118px;
  padding: 8px 8px 6px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 2px #ecd9b8;
}
.week-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #7a5236;
  cursor: pointer;
}
.week-col.picked { background: #fff1d6; }
.week-num { height: 16px; font-size: 12px; font-weight: 900; line-height: 16px; color: #4a2a18; }
.week-bar {
  width: 16px;
  margin-top: auto;
  border-radius: 4px 4px 0 0;
  background: var(--accent-dark);
  border-bottom: 2px solid #d9c7a8;
  box-sizing: content-box;
}
.week-col.none .week-bar { background: none; }
.week-day { margin-top: 4px; font-size: 12px; font-weight: 800; line-height: 16px; }
.week-col.now .week-day { padding: 0 6px; border-radius: 8px; background: #4a2a18; color: #fff; }
.card p.week-note { margin: 8px 0 0; font-size: 13px; }
.report .fine { margin: 8px 0 12px !important; line-height: 1.4; }
html:not([lang="en"]) .stat b { font-size: 18px; }
html:not([lang="en"]) .stat span { font-size: 12px; }
