/* ===== AngkorSMP — cartoony Angkor Wat / jungle Minecraft theme ===== */
@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Press+Start+2P&family=Noto+Sans:wght@400;600;700&family=Kantumruy+Pro:wght@400;600;700&display=swap");
/* Kantumruy Pro carries the Khmer glyphs - it sits in every font stack after
   the Latin faces so the site reads properly with the language set to ខ្មែរ. */

/* ---------------------------------------------------------------
   Theming. DARK is the default (plain :root); light is opt-in via
   <html data-theme="light">, set by the ☀️/🌙 toggle in the nav.
   Brand accents (gold, moss, terracotta) stay the same in both.
   --------------------------------------------------------------- */
:root {
  /* shared brand accents */
  --gold: #f7b537;
  --gold-light: #ffd873;
  --gold-deep: #c2760f;
  --jungle: #2f8a4a;
  --jungle-dark: #1f6636;
  --moss: #6bb544;
  --moss-dark: #438029;
  --moss-light: #99d66d;
  --flower-pink: #ff9ec4;
  --flower-white: #fffaf0;
  /* nav + footer stay dark stone in both themes, so these never flip */
  --link-accent: #9fe07a;
  --on-dark: #f8ecd3;
  --on-dark-soft: #d8c39c;
  --bar-bg: linear-gradient(180deg, #2a1c0e, #150e06);
  --radius: 18px;
  --nav-h: 72px;

  /* --- DARK theme (default): jungle night --- */
  --cream: #1d1409;
  --cream-dark: #2c2013;
  --ink: #f8ecd3;
  --ink-soft: #cdb28a;
  --brown: #8a6238;
  --brown-dark: #ffd873;
  --brown-darkest: #100a04;
  --terracotta: #ff8f5e;
  --success: #7ad06a;
  --sky-top: #3a4f6b;
  --sky-bottom: #23324a;
  --sky-deep: #14202f;
  --input-bg: #33251c;
  --tagline-shadow: 0 2px 6px rgba(0, 0, 0, 0.75), 0 1px 2px rgba(0, 0, 0, 0.9);

  --stone-light: #74593a;
  --stone: #5d4527;
  --stone-mid: #48331a;
  --stone-dark: #8a6a3f;
  --stone-darkest: #120c06;

  --stone-surface:
    radial-gradient(circle at 16% 20%, rgba(255, 235, 200, 0.14) 0%, transparent 5%),
    radial-gradient(circle at 74% 62%, rgba(0, 0, 0, 0.22) 0%, transparent 6%),
    radial-gradient(circle at 42% 82%, rgba(255, 235, 200, 0.09) 0%, transparent 4%),
    radial-gradient(circle at 86% 22%, rgba(0, 0, 0, 0.2) 0%, transparent 5%),
    radial-gradient(circle at 30% 48%, rgba(0, 0, 0, 0.16) 0%, transparent 4%),
    linear-gradient(155deg, var(--stone-light) 0%, var(--stone) 55%, var(--stone-mid) 100%);
  --stone-bevel: inset 0 2px 0 rgba(255, 224, 176, 0.24), inset 0 -3px 0 rgba(0, 0, 0, 0.4);

  --wood-surface:
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.14) 0 2px, transparent 2px 9px),
    linear-gradient(155deg, #8f6339 0%, #6f4a28 55%, #58391d 100%);
  --wood-bevel: inset 0 2px 0 rgba(255, 214, 156, 0.28), inset 0 -3px 0 rgba(0, 0, 0, 0.42);

  --shadow-hard: 4px 4px 0 rgba(0, 0, 0, 0.45), 5px 8px 14px rgba(0, 0, 0, 0.35);
  --press-shadow: 0 5px 0 var(--stone-darkest), 0 7px 12px rgba(0, 0, 0, 0.4);
  --press-shadow-active: 0 1px 0 var(--stone-darkest);
}

/* --- LIGHT theme: warm parchment daylight --- */
:root[data-theme="light"] {
  --link-accent: #2f7d1f;
  --cream: #fff3d9;
  --cream-dark: #ffe4ad;
  --ink: #3a2210;
  --ink-soft: #6b4423;
  --brown: #7a4a22;
  --brown-dark: #40230f;
  --brown-darkest: #2a1608;
  --terracotta: #d9542f;
  --success: #2f8a4a;
  --sky-top: #ffe9b8;
  --sky-bottom: #f7a238;
  --sky-deep: #c9631f;
  --input-bg: #fffdf7;
  --tagline-shadow: none;

  --stone-light: #fbeecb;
  --stone: #f0d99a;
  --stone-mid: #dfb96a;
  --stone-dark: #a8783f;
  --stone-darkest: #6b4726;

  --stone-surface:
    radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.4) 0%, transparent 5%),
    radial-gradient(circle at 74% 62%, rgba(0, 0, 0, 0.08) 0%, transparent 6%),
    radial-gradient(circle at 42% 82%, rgba(255, 255, 255, 0.22) 0%, transparent 4%),
    radial-gradient(circle at 86% 22%, rgba(0, 0, 0, 0.07) 0%, transparent 5%),
    radial-gradient(circle at 30% 48%, rgba(0, 0, 0, 0.05) 0%, transparent 4%),
    linear-gradient(155deg, var(--stone-light) 0%, var(--stone) 55%, var(--stone-mid) 100%);
  --stone-bevel: inset 0 2px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 0 rgba(0, 0, 0, 0.16);

  --wood-surface:
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0 2px, transparent 2px 9px),
    linear-gradient(155deg, #c9945c 0%, #a8723f 55%, #8a5a30 100%);
  --wood-bevel: inset 0 2px 0 rgba(255, 224, 176, 0.5), inset 0 -3px 0 rgba(0, 0, 0, 0.25);

  --shadow-hard: 4px 4px 0 rgba(107, 71, 38, 0.28), 5px 8px 14px rgba(107, 71, 38, 0.16);
  --press-shadow: 0 5px 0 var(--stone-darkest), 0 7px 12px rgba(107, 71, 38, 0.22);
  --press-shadow-active: 0 1px 0 var(--stone-darkest);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Noto Sans", "Kantumruy Pro", system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
}

h1, h2, h3, .brand {
  font-family: "Baloo 2", "Kantumruy Pro", "Noto Sans", sans-serif;
  color: var(--brown-dark);
  letter-spacing: 0.01em;
  font-weight: 800;
}

.pixel-text {
  font-family: "Press Start 2P", monospace;
  letter-spacing: 0.02em;
}

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

a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Small carved temple-frieze border used between sections. */
.khmer-strip {
  height: 20px;
  background-image: url("/images/site/khmer-pattern.svg");
  background-repeat: repeat-x;
  background-size: 34px 20px;
  background-position: center;
}

.flower-accent {
  position: absolute;
  width: 30px;
  height: 30px;
  pointer-events: none;
  animation: flower-sway 5s ease-in-out infinite;
}
@keyframes flower-sway {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background:
    repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0 2px, transparent 2px 26px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.12) 0 2px, transparent 2px 58px),
    var(--bar-bg);
  border-bottom: 4px solid var(--gold);
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; width: 100%; position: relative; }

/* ☀️/🌙 theme switch + EN/ខ្មែរ language switch, just left of the nav links. */
.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 0.6rem;
}
.theme-toggle {
  height: 42px;
  width: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--on-dark);
  background: linear-gradient(180deg, #7d5936, #5c3f22);
  border: 2px solid var(--stone-darkest);
  box-shadow: 0 3px 0 var(--stone-darkest);
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.15s;
}
.theme-toggle:hover { transform: translateY(-2px) scale(1.06); }
.theme-toggle:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--stone-darkest); }

/* Language switch - a custom dropdown card styled the same as the mobile
   nav menu, instead of a native <select> that pops the OS picker. */
.lang-dropdown { position: relative; display: inline-flex; flex-shrink: 0; }
.lang-toggle {
  height: 42px;
  width: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0;
  border-radius: 10px;
  cursor: pointer;
  font-family: "Baloo 2", "Kantumruy Pro", sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--on-dark);
  background: linear-gradient(180deg, #7d5936, #5c3f22);
  border: 2px solid var(--stone-darkest);
  box-shadow: 0 3px 0 var(--stone-darkest);
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.15s;
}
.lang-toggle::after { content: "▾"; font-size: 0.7rem; opacity: 0.85; }
.lang-toggle:hover { transform: translateY(-2px) scale(1.06); }
.lang-toggle:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--stone-darkest); }
.lang-toggle:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.lang-menu {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 150px;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background: var(--stone-surface);
  border: 3px solid var(--stone-darkest);
  border-radius: 16px;
  box-shadow: var(--stone-bevel), 0 10px 24px rgba(0, 0, 0, 0.45);
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(.34,1.4,.64,1);
  z-index: 120;
}
.lang-menu.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.lang-option {
  display: flex;
  width: 100%;
  height: 42px;
  justify-content: center;
  align-items: center;
  color: var(--on-dark);
  font-weight: 700;
  font-family: "Baloo 2", "Kantumruy Pro", sans-serif;
  font-size: 0.95rem;
  border-radius: 10px;
  background: linear-gradient(180deg, #7d5936, #5c3f22);
  border: 2px solid var(--stone-darkest);
  box-shadow: 0 3px 0 var(--stone-darkest);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.15s;
}
.lang-option:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--stone-darkest); }
.lang-option.active {
  background: var(--stone-surface);
  color: var(--ink);
  border-color: var(--gold);
  box-shadow: var(--stone-bevel), 0 3px 0 var(--gold-deep);
}
@media (max-width: 760px) {
  .nav-tools { margin-left: auto; margin-right: 0.5rem; gap: 0.3rem; }
  .lang-toggle { font-size: 0.8rem; }
}

/* Vine tendrils hanging just below the nav wall. */
.nav-vine {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 20px;
  background-image: url("/images/site/vine-drape.svg");
  background-repeat: repeat-x;
  background-size: 150px 20px;
  pointer-events: none;
}
.site-nav .brand {
  color: var(--gold-light);
  font-weight: 800;
  font-size: 1.3rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.35);
}
.site-nav .brand img { height: 42px; width: 42px; object-fit: contain; }
.nav-links { display: flex; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--on-dark);
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 10px;
  background: linear-gradient(180deg, #7d5936, #5c3f22);
  border: 2px solid var(--stone-darkest);
  box-shadow: 0 3px 0 var(--stone-darkest);
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.15s;
}
.nav-links a:hover { transform: translateY(-2px) scale(1.04); }
.nav-links a.active { background: var(--stone-surface); color: var(--ink); border-color: var(--gold); box-shadow: var(--stone-bevel), 0 3px 0 var(--gold-deep); }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold-light);
  font-size: 1.8rem;
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; order: 3; }

  /* Clean dropdown card anchored under the hamburger on the right.
     Every entry is the same height/width with its label centred. */
  .nav-links {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    left: auto;
    width: 190px;
    background: var(--stone-surface);
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem;
    gap: 0.4rem;
    border: 3px solid var(--stone-darkest);
    border-radius: 16px;
    box-shadow: var(--stone-bevel), 0 10px 24px rgba(0, 0, 0, 0.45);
    transform: translateY(-6px) scale(0.97);
    transform-origin: top right;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.22s cubic-bezier(.34,1.4,.64,1);
    z-index: 120;
  }
  .nav-links.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
  .nav-links li { display: block; width: 100%; }
  .nav-links a {
    display: flex;
    width: 100%;
    height: 46px;
    justify-content: center;   /* label centred in every button */
    align-items: center;
    gap: 0.45rem;
    padding: 0;
    border-radius: 11px;
    font-size: 0.98rem;
    white-space: nowrap;
  }
  .nav-links a:hover { transform: none; }
  .nav-links a:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--stone-darkest); }

}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 60%, var(--sky-deep) 100%);
  padding: 2.75rem 1.25rem 0;
  text-align: center;
  overflow: hidden;
}
/* soft warm glow behind the logo, like sun filtering through the canopy */
.hero::before {
  content: "";
  position: absolute;
  top: -10%;
  left: 50%;
  width: 640px;
  height: 640px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 244, 214, 0.85) 0%, rgba(255, 216, 115, 0.35) 45%, rgba(255, 216, 115, 0) 72%);
  pointer-events: none;
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }

.firefly {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff3b0;
  box-shadow: 0 0 8px 3px rgba(255, 243, 176, 0.9);
  opacity: 0;
  animation: firefly-float 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
@keyframes firefly-float {
  0% { opacity: 0; transform: translate(0, 0) scale(0.8); }
  15% { opacity: 0.9; }
  50% { opacity: 0.5; transform: translate(14px, -22px) scale(1.1); }
  85% { opacity: 0.9; }
  100% { opacity: 0; transform: translate(-10px, -40px) scale(0.8); }
}

/* Hangs like jungle vines/fronds draping in from the top corners. */
.leaf-corner {
  position: absolute;
  top: -1.5rem;
  width: 150px;
  height: 150px;
  opacity: 0.92;
  pointer-events: none;
  z-index: 2;
}
.leaf-corner.left { left: -1.5rem; transform: scaleY(-1); }
.leaf-corner.right { right: -1.5rem; transform: scale(-1, -1); }
@media (max-width: 600px) { .leaf-corner { width: 95px; height: 95px; } }

.hero-logo-full {
  max-width: 420px;
  width: 80%;
  margin: 0 auto 0.75rem;
  filter: drop-shadow(4px 6px 0 rgba(42, 22, 8, 0.25));
}
.hero p.tagline {
  color: var(--brown-dark);
  font-weight: 600;
  margin: 0 auto 1.5rem;
  max-width: 42ch;
  font-size: 1.05rem;
  text-shadow: var(--tagline-shadow);
}

.hero-actions {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
/* Carved sandstone tablet with a colored icon "chip" - matches the
   stone-slab menu button look of the reference art direction. */
.action-btn {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
  min-width: 230px;
  padding: 0.7rem 1.3rem 0.7rem 0.7rem;
  border-radius: 14px;
  border: 3px solid var(--stone-darkest);
  cursor: pointer;
  font-weight: 800;
  font-family: "Baloo 2", sans-serif;
  text-decoration: none;
  color: #fff3e0;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
  text-align: left;
  background: var(--wood-surface);
  box-shadow: var(--wood-bevel), var(--press-shadow);
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.15s;
}
.action-btn:hover { transform: scale(1.05) rotate(-1deg); }
.action-btn:active { transform: translateY(4px); box-shadow: var(--wood-bevel), var(--press-shadow-active); }
.action-btn::after {
  content: "";
  position: absolute;
  left: -8px;
  top: -10px;
  width: 38px;
  height: 38px;
  background: url("/images/site/moss-sprig.svg") no-repeat center / contain;
  transform: scaleY(-1);
  pointer-events: none;
}
.action-btn .btn-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border: 2px solid var(--stone-darkest);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}
.action-btn.telegram .btn-icon { background: #229ed9; }
.action-btn.server-ip .btn-icon { background: linear-gradient(180deg, var(--gold-light), var(--gold)); }
.action-btn.store .btn-icon { background: linear-gradient(180deg, var(--moss-light), var(--moss)); }
.action-btn .btn-text { display: flex; flex-direction: column; gap: 0.1rem; }
.action-btn small { font-weight: 600; opacity: 0.85; font-size: 0.72rem; color: #ffe8c2; }
.action-btn .ip-text { font-size: 1.05rem; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--brown-darkest);
  border: 3px solid var(--gold);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  margin: 0 auto 2rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--on-dark);
  box-shadow: var(--shadow-hard);
}
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: #888; border: 2px solid rgba(0,0,0,0.3); }
.status-dot.online { background: #57d97a; box-shadow: 0 0 8px #57d97a; }
.status-dot.offline { background: #e2513a; }

.hero-silhouette {
  /* cancel the hero's horizontal padding so the treeline reaches both edges */
  width: calc(100% + 2.5rem);
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  max-width: none;
  height: 110px;
  display: block;
  margin-top: 1.5rem;
  position: relative;
  z-index: 1;
}
@media (max-width: 520px) { .hero-silhouette { height: 65px; } }

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--brown-darkest);
  color: var(--gold-light);
  border: 3px solid var(--gold);
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  box-shadow: var(--shadow-hard);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 999;
  font-weight: 700;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Sections ---------- */
.section { padding: 1.5rem 0 3rem; }
.section h2 { text-align: center; font-size: 1.9rem; margin-bottom: 1.75rem; }
.section h2::after {
  content: "";
  display: block;
  width: 130px;
  height: 11px;
  margin: 0.75rem auto 0;
  border-radius: 6px;
  border: 2px solid var(--stone-darkest);
  background:
    radial-gradient(circle at 7px 50%, var(--stone-darkest) 0 3px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 7px) 50%, var(--stone-darkest) 0 3px, transparent 3.5px),
    var(--stone-surface);
  box-shadow: var(--stone-bevel);
}

/* Heading with its carved divider suppressed (used when a subtitle follows). */
.section h2.no-rule { margin-bottom: 0.2rem; }
.section h2.no-rule::after { display: none; }
.section-subtitle {
  text-align: center;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  color: var(--terracotta);
  margin: 0 0 1.4rem;
}
.section-subtitle::after {
  content: "";
  display: block;
  width: 130px;
  height: 11px;
  margin: 0.7rem auto 0;
  border-radius: 6px;
  border: 2px solid var(--stone-darkest);
  background:
    radial-gradient(circle at 7px 50%, var(--stone-darkest) 0 3px, transparent 3.5px),
    radial-gradient(circle at calc(100% - 7px) 50%, var(--stone-darkest) 0 3px, transparent 3.5px),
    var(--stone-surface);
  box-shadow: var(--stone-bevel);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 340px));
  gap: 1.1rem;
  justify-content: center;
  max-width: 760px;
  margin: 0 auto;
}
.info-card {
  position: relative;
  background: var(--stone-surface);
  border: 3px solid var(--stone-darkest);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--stone-bevel), var(--shadow-hard);
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1);
}
.info-card:hover { transform: translateY(-4px) rotate(-0.6deg); }
.info-card::after {
  content: "";
  position: absolute;
  top: -10px;
  left: -8px;
  width: 36px;
  height: 36px;
  background: url("/images/site/moss-sprig.svg") no-repeat center / contain;
  transform: scaleY(-1);
  pointer-events: none;
}
.info-card .value { font-family: "Baloo 2", serif; font-weight: 800; font-size: 1.6rem; color: var(--terracotta); }
.info-card .label { color: var(--ink-soft); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.info-card.stacked .stat-divider { height: 2px; background: rgba(0, 0, 0, 0.22); border-radius: 2px; margin: 0.9rem 0; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35); }
.info-card.stacked .sub-value { font-family: "Baloo 2", serif; font-weight: 700; font-size: 1.2rem; color: var(--moss-dark); }
.info-card.stacked .sub-label { color: var(--ink-soft); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }

.welcome-box {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.1rem;
  font-weight: 600;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  max-width: 980px;
  margin: 0 auto 2.5rem;
}
.feature-card {
  position: relative;
  background: var(--stone-surface);
  border: 3px solid var(--stone-darkest);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  text-align: center;
  box-shadow: var(--stone-bevel), var(--shadow-hard);
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1);
  text-decoration: none;
  display: block;
}
.feature-card:hover { transform: translateY(-4px) rotate(0.6deg); }
.feature-card::after {
  content: "";
  position: absolute;
  top: -10px;
  right: -8px;
  width: 34px;
  height: 34px;
  background: url("/images/site/moss-sprig.svg") no-repeat center / contain;
  transform: scale(-1, -1);
  pointer-events: none;
}
.feature-card .feature-icon {
  font-size: 1.7rem;
  margin: 0 auto 0.5rem;
  width: 2.8rem;
  height: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.3), rgba(0, 0, 0, 0.14) 70%);
  border: 2px solid var(--stone-darkest);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), inset 0 -2px 0 rgba(0, 0, 0, 0.15), 0 2px 0 var(--stone-dark);
}
.feature-card .feature-title { font-family: "Baloo 2", sans-serif; font-weight: 800; color: var(--brown-dark); font-size: 1.02rem; margin-bottom: 0.2rem; }
.feature-card .feature-desc { color: var(--ink-soft); font-size: 0.85rem; font-weight: 600; }
a.feature-card.linked { border-color: var(--moss); }
a.feature-card.linked .feature-title { color: var(--link-accent); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bar-bg);
  color: var(--on-dark-soft);
  text-align: center;
  padding: 2rem 1.25rem;
  font-size: 0.85rem;
  border-top: 4px solid var(--gold);
}
.site-footer a { color: var(--gold-light); text-decoration: none; font-weight: 700; }

/* ---------- Store ---------- */
.store-tabs {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.store-tabs button {
  background: var(--stone-surface);
  border: 3px solid var(--stone-darkest);
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-weight: 800;
  font-family: "Baloo 2", sans-serif;
  cursor: pointer;
  color: var(--ink-soft);
  box-shadow: var(--stone-bevel), 0 4px 0 var(--stone-darkest), 0 7px 12px rgba(42, 22, 8, 0.22);
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.15s;
}
.store-tabs button:hover { transform: scale(1.06); }
.store-tabs button:active { transform: translateY(3px); box-shadow: var(--stone-bevel), 0 1px 0 var(--stone-darkest); }
.store-tabs button.active { background: linear-gradient(180deg, var(--moss-light), var(--moss)); border-color: var(--moss-dark); color: #fff; box-shadow: var(--stone-bevel), 0 4px 0 var(--moss-dark); }

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.4rem;
}
.item-card {
  position: relative;
  background: var(--stone-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--stone-bevel), var(--shadow-hard);
  display: flex;
  flex-direction: column;
  border: 3px solid var(--stone-darkest);
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1);
}
.item-card:hover { transform: translateY(-5px) rotate(-0.5deg); }
.item-image-wrap { position: relative; }
.item-card img { width: 100%; height: 170px; object-fit: contain; padding: 0.5rem; background: var(--cream-dark); border-bottom: 3px solid var(--stone-darkest); }
/* ✨ Twinkling stars around the item art. Drawn in CSS (no image file) so
   they glow the same gold in both themes and never show a dark edge. */
.item-card .sparkle {
  position: absolute;
  width: 20px;
  height: 20px;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(circle at 50% 50%, #fffdf3 0%, var(--gold-light) 42%, var(--gold) 100%);
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  filter: drop-shadow(0 0 5px rgba(255, 205, 90, 0.95));
  animation: sparkle-twinkle 2.2s ease-in-out infinite;
}
.item-card .sparkle-1 { top: 12px;  left: 13%;  animation-delay: 0s; }
.item-card .sparkle-2 { top: 34px;  right: 12%; width: 14px; height: 14px; animation-delay: 0.55s; }
.item-card .sparkle-3 { bottom: 18px; left: 22%; width: 13px; height: 13px; animation-delay: 1.1s; }
.item-card .sparkle-4 { top: 50%;   right: 6%;  width: 11px; height: 11px; animation-delay: 1.65s; }
@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.45) rotate(0deg); }
  45%      { opacity: 1;    transform: scale(1.2) rotate(35deg); }
  70%      { opacity: 0.55; transform: scale(0.85) rotate(60deg); }
}
@media (prefers-reduced-motion: reduce) {
  .item-card .sparkle { animation: none; opacity: 0.85; }
}
.item-card .item-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.item-card h3 { margin: 0; font-size: 1.1rem; color: var(--brown-dark); }
.item-card p { margin: 0; color: var(--ink-soft); font-size: 0.88rem; flex: 1; }
.item-card .price { font-family: "Baloo 2", sans-serif; color: var(--terracotta); font-size: 1.25rem; font-weight: 800; }
.item-card .item-actions { display: flex; gap: 0.5rem; align-items: center; }
.buy-btn {
  flex: 1;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--brown-darkest);
  border: 3px solid var(--stone-darkest);
  padding: 0.6rem;
  border-radius: 10px;
  font-weight: 800;
  font-family: "Baloo 2", sans-serif;
  cursor: pointer;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 4px 0 var(--stone-darkest), 0 7px 12px rgba(42, 22, 8, 0.22);
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.15s;
}
.buy-btn:hover { transform: scale(1.05); }
.buy-btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 1px 0 var(--stone-darkest); }
.info-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 8px;
  border: 3px solid var(--stone-darkest);
  background: linear-gradient(180deg, var(--moss-light), var(--moss));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  font-family: "Baloo 2", serif;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 4px 0 var(--stone-darkest), 0 7px 12px rgba(42, 22, 8, 0.22);
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.15s;
}
.info-btn:hover { transform: scale(1.1) rotate(8deg); }
.info-btn:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 1px 0 var(--stone-darkest); }

.empty-note { text-align: center; color: var(--ink-soft); padding: 2rem; font-weight: 600; }

/* ---------- Modals ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 22, 8, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--stone-surface);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
  box-shadow: var(--stone-bevel), 8px 8px 0 rgba(42, 22, 8, 0.4), 10px 16px 20px rgba(42, 22, 8, 0.25);
  border: 4px solid var(--stone-darkest);
}
.modal-box.wide { max-width: 640px; }
.modal-box::before {
  content: "";
  position: absolute;
  top: -14px;
  left: -12px;
  width: 44px;
  height: 44px;
  background: url("/images/site/moss-sprig.svg") no-repeat center / contain;
  transform: scaleY(-1);
  pointer-events: none;
}
.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  background: var(--terracotta);
  border: 2px solid var(--brown-darkest);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  font-weight: 800;
}
.modal-box h3 { margin-top: 0; }
.modal-box video, .modal-box iframe.video-embed {
  width: 100%;
  aspect-ratio: 16/9;
  border: 3px solid var(--brown-dark);
  border-radius: 10px;
  margin-bottom: 1rem;
  background: #000;
}
.modal-box .info-text { white-space: pre-line; color: var(--ink-soft); font-weight: 600; }

/* Buy flow */
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.field[hidden] { display: none; }
.field label { font-weight: 800; font-size: 0.9rem; color: var(--brown-dark); }
.field input[type="text"] {
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 3px solid var(--stone-darkest);
  font-size: 1rem;
  background: var(--input-bg);
  color: var(--ink);
}
.edition-toggle { display: flex; border-radius: 999px; overflow: hidden; border: 3px solid var(--brown-dark); }
.edition-toggle button {
  flex: 1;
  padding: 0.6rem;
  border: none;
  background: var(--input-bg);
  cursor: pointer;
  font-weight: 800;
  color: var(--brown-dark);
}
.edition-toggle button.active { background: linear-gradient(180deg, var(--moss-light), var(--moss)); color: #fff; }
.preview-name { font-size: 0.85rem; color: var(--ink-soft); font-weight: 600; }
.continue-btn, .primary-btn {
  width: 100%;
  padding: 0.85rem;
  border: 3px solid var(--stone-darkest);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--brown-darkest);
  font-weight: 800;
  font-family: "Baloo 2", sans-serif;
  cursor: pointer;
  font-size: 1.05rem;
  box-shadow: var(--press-shadow);
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.15s;
}
.continue-btn:hover, .primary-btn:hover { transform: scale(1.03); }
.continue-btn:active, .primary-btn:active { transform: translateY(4px); box-shadow: var(--press-shadow-active); }
.continue-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.back-link { background: none; border: none; color: var(--brown-dark); cursor: pointer; font-weight: 700; padding: 0.3rem 0; }

.qr-box { text-align: center; }
.qr-box img { width: 220px; height: 220px; margin: 0 auto 1rem; border: 4px solid var(--brown-darkest); box-shadow: var(--shadow-hard); border-radius: 10px; background: #fff; padding: 6px; }
.qr-meta { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--ink-soft); margin: 0.5rem 0; font-weight: 600; }
.qr-status { margin-top: 0.75rem; font-weight: 800; color: var(--terracotta); }

.success-box { text-align: center; }
.success-icon { font-size: 3rem; }
.success-box .receipt {
  text-align: left;
  background: var(--input-bg);
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
  border: 3px solid var(--brown-dark);
}
.success-box .receipt div { display: flex; justify-content: space-between; padding: 0.3rem 0; border-bottom: 1px dashed var(--brown-dark); font-size: 0.9rem; }
.success-box .receipt div:last-child { border-bottom: none; }
.tg-support-btn { display: inline-block; margin-top: 0.5rem; background: #229ed9; color: #fff; padding: 0.65rem 1.2rem; border-radius: 10px; text-decoration: none; font-weight: 800; border: 3px solid var(--stone-darkest); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 4px 0 var(--stone-darkest), 0 7px 12px rgba(42, 22, 8, 0.22); }

/* ---------- Map page ---------- */
.map-wrap { padding: 0.6rem 1.25rem 1.25rem; }
/* The map page has no .section wrapper, so it centres its own heading. */
.map-wrap h2 { text-align: center; font-size: 1.9rem; margin: 0 0 0.2rem; }
.map-wrap .section-subtitle { margin-bottom: 0.9rem; }
.map-age {
  text-align: center;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  color: var(--terracotta);
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}
.map-frame-holder {
  position: relative;
  width: 100%;
  height: 75vh;
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hard);
  background: var(--brown-darkest);
  border: 4px solid var(--stone-darkest);
}
.map-frame-holder iframe { width: 100%; height: 100%; border: none; }
.map-fallback {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--on-dark);
  text-align: center;
  padding: 1.5rem;
}
.map-fallback.show { display: flex; }
.map-fallback a { background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: var(--brown-darkest); padding: 0.7rem 1.4rem; border-radius: 10px; font-weight: 800; text-decoration: none; border: 3px solid var(--stone-darkest); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), 0 4px 0 var(--stone-darkest); }

/* ---------- Checkout & success pages ---------- */
.checkout-wrap { max-width: 720px; }
.checkout-panel {
  background: var(--stone-surface);
  border: 3px solid var(--stone-darkest);
  border-radius: var(--radius);
  box-shadow: var(--stone-bevel), var(--shadow-hard);
  padding: 1.5rem;
  position: relative;
}
.checkout-panel::after {
  content: "";
  position: absolute;
  top: -10px;
  right: -8px;
  width: 36px;
  height: 36px;
  background: url("/images/site/moss-sprig.svg") no-repeat center / contain;
  transform: scale(-1, -1);
  pointer-events: none;
}

.checkout-summary {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 1.1rem;
  border-bottom: 2px dashed var(--stone-dark);
}
.checkout-item-img {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 12px;
  border: 3px solid var(--stone-darkest);
  background: var(--cream-dark);
}
.checkout-summary-text { flex: 1; min-width: 0; }
.checkout-summary-text h3 { margin: 0 0 0.25rem; }
.checkout-summary-text p { margin: 0 0 0.6rem; color: var(--ink-soft); font-size: 0.9rem; font-weight: 600; }
.checkout-rows div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  padding: 0.22rem 0;
  color: var(--ink-soft);
  font-weight: 600;
}
.checkout-rows strong { color: var(--ink); }
.checkout-rows .price { color: var(--terracotta); font-family: "Baloo 2", sans-serif; font-size: 1.1rem; }

.checkout-step { padding: 1.25rem 0 0; }
.checkout-step h3 { margin: 0 0 0.3rem; font-size: 1.1rem; }
.checkout-hint { color: var(--ink-soft); font-size: 0.88rem; font-weight: 600; margin: 0 0 0.8rem; }
.checkout-hint.centered { text-align: center; margin-top: 0.7rem; }
.checkout-hint a { color: var(--terracotta); font-weight: 800; }

.checkout-khqr {
  width: min(280px, 80%);
  margin: 0 auto;
  border-radius: 12px;
  border: 4px solid var(--stone-darkest);
  background: #fff;
  padding: 8px;
  box-shadow: var(--shadow-hard);
}

.file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  border: 3px dashed var(--stone-dark);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.06);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.file-drop:hover, .file-drop.dragging {
  border-color: var(--moss);
  background: rgba(107, 181, 68, 0.12);
  transform: translateY(-2px);
}
.file-drop-icon { font-size: 2rem; }
.file-drop-text { font-weight: 700; color: var(--ink-soft); font-size: 0.9rem; word-break: break-all; }
.file-preview {
  max-width: 220px;
  max-height: 220px;
  border-radius: 10px;
  border: 3px solid var(--stone-darkest);
  margin-top: 0.4rem;
}

#submit-btn { margin-top: 1.4rem; letter-spacing: 0.06em; }
#submit-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.success-panel { text-align: center; }
.success-title { margin: 0.3rem 0 0.6rem; }
.success-panel .receipt {
  text-align: left;
  background: var(--input-bg);
  border-radius: 10px;
  padding: 1rem;
  margin: 1.2rem 0;
  border: 3px solid var(--stone-dark);
}
.success-panel .receipt div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem 0;
  border-bottom: 1px dashed var(--stone-dark);
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-weight: 600;
}
.success-panel .receipt div:last-child { border-bottom: none; }
.success-panel .receipt strong { color: var(--ink); }
.success-actions { margin-top: 1.2rem; }
.success-actions .continue-btn { display: inline-block; width: auto; padding: 0.85rem 2.2rem; text-decoration: none; }

/* Buy Now row inside the "!" info popup */
.info-buy-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 2px dashed var(--stone-dark);
}
.info-buy-row .price { font-family: "Baloo 2", sans-serif; font-size: 1.4rem; font-weight: 800; color: var(--terracotta); }
.info-buy-btn { flex: 1; width: auto; }

@media (max-width: 560px) {
  .checkout-summary { flex-direction: column; align-items: center; text-align: center; }
  .checkout-rows div { justify-content: space-between; }
  .info-buy-row { flex-direction: column; align-items: stretch; }
  .info-buy-row .price { text-align: center; }
}

/* Coming-soon placeholder items in the Other category */
.item-card.coming-soon { opacity: 0.82; }
.item-card.coming-soon:hover { transform: none; }
.item-card.coming-soon .price { color: var(--ink-soft); }
.buy-btn:disabled,
.info-buy-btn:disabled {
  background: linear-gradient(180deg, var(--stone-light), var(--stone-mid));
  color: var(--ink-soft);
  cursor: not-allowed;
  opacity: 0.75;
}
.buy-btn:disabled:hover,
.info-buy-btn:disabled:hover { transform: none; }

/* ---------- Save-KHQR button ---------- */
.khqr-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
}
.save-khqr-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  color: var(--ink);
  background: var(--stone-surface);
  border: 3px solid var(--stone-darkest);
  box-shadow: var(--stone-bevel), 0 4px 0 var(--stone-darkest), 0 7px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.15s;
}
.save-khqr-btn:hover { transform: scale(1.05); }
.save-khqr-btn:active { transform: translateY(3px); box-shadow: var(--stone-bevel), 0 1px 0 var(--stone-darkest); }
.khqr-save-hint { margin: 0; font-size: 0.8rem; text-align: center; }

/* ---------- Games page ---------- */
.games-wrap { max-width: 860px; }

.games-gate { max-width: 460px; margin: 0 auto; text-align: center; }
.games-gate h3 { margin: 0.4rem 0 0.4rem; font-size: 1.35rem; }
.games-gate-icon { font-size: 2.8rem; line-height: 1; }
.games-gate .field { text-align: left; margin-top: 1.1rem; }
.games-gate .preview-name { display: block; margin-top: 0.35rem; }
.games-disclaimer { margin-top: 0.9rem; font-size: 0.8rem; opacity: 0.85; }

.player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  margin-bottom: 1.1rem;
}
.player-id { display: flex; align-items: center; gap: 0.8rem; }
.player-avatar {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.3), rgba(0,0,0,0.14) 70%);
  border: 2px solid var(--stone-darkest);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.4), inset 0 -2px 0 rgba(0,0,0,0.15);
}
.player-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; color: var(--ink-soft); }
.player-name { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 1.25rem; color: var(--brown-dark); }

.games-stats { margin-bottom: 1.1rem; max-width: none; }
.games-stats .info-card .value { color: var(--gold); }
.games-stats .info-card .sub-label { color: var(--terracotta); opacity: 0.9; }



.games-list-heading { text-align: center; margin: 0 0 1.2rem; font-size: 1.3rem; }
.game-card .game-icon {
  font-size: 3rem;
  text-align: center;
  padding: 1.6rem 0;
  background: var(--cream-dark);
  border-bottom: 3px solid var(--stone-darkest);
}

@media (max-width: 620px) {
  .player-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .player-id { justify-content: center; }
}

/* =========================================================
   Mini-game panel + the three games
   ========================================================= */
body.game-open { overflow: hidden; }

.game-overlay { padding: 0.75rem; }
.game-panel {
  background: var(--stone-surface);
  border: 4px solid var(--stone-darkest);
  border-radius: var(--radius);
  box-shadow: var(--stone-bevel), 8px 8px 0 rgba(0,0,0,0.4);
  width: 100%;
  max-width: 720px;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.game-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 3px solid var(--stone-darkest);
  background: rgba(0,0,0,0.14);
  flex-shrink: 0;
}
.game-panel-head h3 { margin: 0; font-size: 1.15rem; }
.game-panel-head .modal-close { position: static; }
.game-panel-body { padding: 1rem; overflow-y: auto; }

/* intro + result screens */
.game-screen { text-align: center; padding: 0.5rem 0 0.25rem; }
.game-screen-icon { font-size: 3.2rem; line-height: 1; }
.game-screen h3 { margin: 0.4rem 0 0.5rem; font-size: 1.4rem; }
.game-reward-note { color: var(--ink-soft); font-weight: 700; font-size: 0.9rem; margin: 0.9rem 0 1.2rem; }
.game-go-btn { max-width: 260px; margin: 0 auto; }
.result-score { display: flex; flex-direction: column; gap: 0.1rem; margin: 0.6rem 0 0.3rem; }
.result-score-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--ink-soft); }
.result-score-value { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 2.2rem; color: var(--brown-dark); }
.coins-won {
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: var(--gold);
  text-shadow: 0 2px 0 rgba(0,0,0,0.35);
  margin: 0.4rem 0 0.2rem;
}
.coins-won span { font-size: 1rem; color: var(--ink-soft); text-shadow: none; }
.result-detail { text-align: left; margin: 1rem 0; background: var(--input-bg); border: 3px solid var(--stone-dark); border-radius: 10px; padding: 0.9rem; }
.result-detail div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.28rem 0; border-bottom: 1px dashed var(--stone-dark); font-size: 0.88rem; color: var(--ink-soft); font-weight: 600; }
.result-detail div:last-child { border-bottom: none; }
.result-detail strong { color: var(--ink); text-align: right; }
.result-actions { display: flex; flex-direction: column; gap: 0.5rem; align-items: center; }
.result-actions .continue-btn { max-width: 260px; }

/* shared HUD strip */
.game-hud {
  display: flex;
  justify-content: space-around;
  gap: 0.5rem;
  padding: 0.6rem 0.5rem;
  margin-bottom: 0.75rem;
  background: rgba(0,0,0,0.16);
  border: 3px solid var(--stone-darkest);
  border-radius: 12px;
}
.hud-cell { display: flex; flex-direction: column; align-items: center; min-width: 60px; }
.hud-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--ink-soft); }
.hud-value { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 1.15rem; color: var(--brown-dark); }
.game-hint { text-align: center; font-size: 0.78rem; color: var(--ink-soft); font-weight: 600; margin: 0.6rem 0 0; }

.game-stage {
  position: relative;
  width: 100%;
  height: min(58vh, 400px);
  border: 3px solid var(--stone-darkest);
  border-radius: 12px;
  overflow: hidden;
  background: #2f5a2a;
  touch-action: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.game-canvas { display: block; width: 100%; height: 100%; -webkit-tap-highlight-color: transparent; outline: none; }

/* --- Lava Run --- */
.lava-stage {
  background:
    linear-gradient(180deg, #1a1220 0%, #2a1a26 45%, #3a1e1c 100%);
  cursor: none;
  touch-action: none;
}

.float-text {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  pointer-events: none;
  animation: float-up 0.7s ease-out forwards;
  text-shadow: 0 2px 3px rgba(0,0,0,0.6);
}
.float-text.good { color: #b6ff7a; }
.float-text.bad { color: #ff7a6b; }
@keyframes float-up { to { transform: translate(-50%, -180%); opacity: 0; } }

/* --- Block Breaker --- */
.bb-target {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.7rem;
  margin-bottom: 0.75rem;
  border: 3px solid var(--stone-darkest);
  border-radius: 12px;
  background: rgba(0,0,0,0.16);
}
.bb-target-label { font-size: 0.72rem; letter-spacing: 0.14em; font-weight: 800; color: var(--ink-soft); }
.bb-target-block {
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--bb, var(--gold));
  text-shadow: 0 2px 0 rgba(0,0,0,0.4);
}
.bb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.55rem; }
.bb-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  aspect-ratio: 1;
  padding: 0.25rem;
  cursor: pointer;
  border: 3px solid var(--stone-darkest);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bb) 28%, transparent);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.2), 0 3px 0 var(--stone-darkest);
  transition: transform 0.12s, opacity 0.15s;
  touch-action: manipulation;
}
.bb-cell:hover:not(:disabled) { transform: translateY(-2px) scale(1.03); }
.bb-cell:disabled { cursor: default; }
.bb-cell.hit { opacity: 0.25; transform: scale(0.86); }
.bb-cell.miss { animation: bb-shake 0.26s; border-color: #ff4d3d; }
@keyframes bb-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.bb-emoji { font-size: 1.5rem; line-height: 1; }
.bb-name { font-size: 0.6rem; font-weight: 700; color: var(--ink); text-align: center; line-height: 1.1; }

@media (max-width: 560px) {
  .game-panel-body { padding: 0.7rem; }
  .game-stage { height: min(52vh, 340px); }
  .hud-value { font-size: 1rem; }
  .bb-grid { grid-template-columns: repeat(3, 1fr); gap: 0.45rem; }
  .bb-name { font-size: 0.55rem; }
  .result-score-value { font-size: 1.8rem; }
}

/* ---------- Daily coin progress (hub cards, intro + result screens) ---------- */
.daily-progress { margin: 0.6rem 0 0.9rem; text-align: center; }
.daily-progress-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}
.daily-progress.complete .daily-progress-label { color: var(--gold-deep); }
.daily-bar {
  height: 12px;
  border: 3px solid var(--stone-darkest);
  border-radius: 999px;
  background: var(--input-bg);
  overflow: hidden;
}
.daily-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--moss), var(--gold));
  transition: width 0.4s ease;
}
.daily-progress.complete .daily-bar i { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.daily-progress-note {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.35;
}

/* ---------- Wind Charge Dodge ---------- */
.dodge-stage {
  background:
    radial-gradient(circle at 50% 120%, rgba(255,255,255,0.10) 0%, transparent 60%),
    linear-gradient(180deg, #23405e 0%, #1a2f47 60%, #14243a 100%);
  cursor: none;
}

/* ---------- Diamond Rush ---------- */
.mine-grid {
  position: relative;
  display: grid;
  gap: 0.45rem;
  padding: 0.55rem;
  border: 3px solid var(--stone-darkest);
  border-radius: 14px;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.10) 0 3px, transparent 3px 22px),
    linear-gradient(180deg, #4a4038, #322a24);
  transition: transform 0.12s;
}
.mine-grid.mine-boom { animation: mine-boom 0.3s; }
@keyframes mine-boom {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(255,80,40,0); }
  40% { box-shadow: inset 0 0 50px 12px rgba(255,90,40,0.7); transform: translateX(-4px); }
  70% { transform: translateX(4px); }
}
.mine-grid.mine-shift .mine-cell:not(.mined) { animation: mine-shift 0.26s; }
@keyframes mine-shift { from { transform: translateY(-8px) scale(0.9); opacity: 0.4; } }
.mine-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  padding: 0;
  cursor: pointer;
  border: 3px solid #241d18;
  border-radius: 8px;
  background: linear-gradient(180deg, #6f6157, #55483f);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.16), 0 3px 0 #241d18;
  transition: transform 0.1s, opacity 0.15s, background 0.15s;
  touch-action: manipulation;
}
.mine-cell:hover:not(.mined) { transform: translateY(-2px) scale(1.04); }
.mine-cell:active:not(.mined) { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(255,255,255,0.16), 0 1px 0 #241d18; }
.mine-cell.mined {
  cursor: default;
  background: linear-gradient(180deg, #1d1713, #120e0b);
  box-shadow: inset 0 3px 8px rgba(0,0,0,0.8);
}
.mine-cell.tnt { background: linear-gradient(180deg, #8a4030, #5f2a1e); border-color: #3d160f; }
.mine-emoji { font-size: 1.7rem; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.55)); }

/* ---------- Build It! ---------- */
.build-banner {
  text-align: center;
  font-family: "Baloo 2", "Kantumruy Pro", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  min-height: 1.6em;
}
.build-banner.memorise { color: var(--gold-light); }
.build-banner.building { color: var(--moss-light); }
.build-banner.review { color: var(--ink-soft); }
.build-banner.perfect { color: var(--gold); animation: build-pop 0.4s; }
@keyframes build-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.18); } }
.build-grid {
  display: grid;
  gap: 0.35rem;
  max-width: 340px;
  margin: 0 auto;
  padding: 0.45rem;
  border: 3px solid var(--stone-darkest);
  border-radius: 14px;
  background: rgba(0,0,0,0.22);
}
.build-grid.showing { box-shadow: 0 0 18px 4px rgba(255, 205, 90, 0.45); }
.build-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  padding: 0;
  border: 3px solid var(--stone-darkest);
  border-radius: 7px;
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  transition: transform 0.1s, background 0.12s;
  touch-action: manipulation;
}
.build-cell.filled { background: var(--stone-surface); box-shadow: inset 0 2px 0 rgba(255,255,255,0.2); }
.build-cell:hover:not(:disabled) { transform: scale(1.06); }
.build-cell:disabled { cursor: default; }
.build-cell.mark-right { border-color: var(--moss); box-shadow: 0 0 10px rgba(107,181,68,0.8); }
.build-cell.mark-wrong { border-color: #ff4d3d; box-shadow: 0 0 10px rgba(255,77,61,0.8); }
.build-cell.mark-missed { border-style: dashed; border-color: var(--gold); }
.build-emoji { font-size: 1.5rem; line-height: 1; }

.build-palette {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 0.8rem 0 0.6rem;
}
.build-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-width: 62px;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  border: 3px solid var(--stone-darkest);
  border-radius: 10px;
  background: linear-gradient(180deg, #7d5936, #5c3f22);
  box-shadow: 0 3px 0 var(--stone-darkest);
  transition: transform 0.12s, box-shadow 0.12s;
  touch-action: manipulation;
}
.build-swatch:hover:not(:disabled) { transform: translateY(-2px); }
.build-swatch:disabled { opacity: 0.5; cursor: default; }
.build-swatch.active { border-color: var(--gold); box-shadow: 0 3px 0 var(--gold-deep), 0 0 12px rgba(255,205,90,0.6); }
.build-swatch-name { font-size: 0.58rem; font-weight: 700; color: var(--on-dark); line-height: 1.1; }
.build-done { max-width: 240px; margin: 0 auto; }
.build-done:disabled { opacity: 0.45; cursor: default; }

@media (max-width: 560px) {
  .mine-grid { gap: 0.34rem; padding: 0.4rem; }
  .mine-cell { border-width: 2px; }
  .mine-emoji { font-size: 1.35rem; }
  .build-grid { gap: 0.28rem; max-width: 300px; }
  .build-cell { border-width: 2px; }
  .build-emoji { font-size: 1.2rem; }
  .build-swatch { min-width: 54px; padding: 0.32rem 0.4rem; }
  .build-banner { font-size: 0.95rem; }
  .daily-progress-label { font-size: 0.72rem; }
}

/* ---------- Khmer typography ----------
   The small-caps look (uppercase + letter-spacing) is an English design
   device. Khmer is a cluster script: letter-spacing pulls its vowels and
   diacritics away from the consonants they belong to, so both are switched
   off wherever the page is set to ខ្មែរ. */
html[lang="km"] .info-card .label,
html[lang="km"] .info-card.stacked .sub-label,
html[lang="km"] .player-label,
html[lang="km"] .result-score-label,
html[lang="km"] .hud-label,
html[lang="km"] .bb-target-label,
html[lang="km"] .section-subtitle,
html[lang="km"] #submit-btn {
  text-transform: none;
  letter-spacing: 0;
}
html[lang="km"] .section-subtitle { letter-spacing: 0.06em; }
/* Khmer needs a little more room between lines than Latin does. */
html[lang="km"] body { line-height: 1.75; }
html[lang="km"] .daily-progress-label,
html[lang="km"] .game-hint,
html[lang="km"] .checkout-hint { line-height: 1.7; }

/* ---------- Points leaderboard ---------- */
.board-panel { padding: 1rem 1.1rem 1.2rem; }
.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}
.board-head h3 { margin: 0; font-size: 1.1rem; }
.board-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.board-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border: 3px solid var(--stone-darkest);
  border-radius: 10px;
  background: var(--input-bg);
  font-weight: 700;
  font-size: 0.9rem;
}
.board-row.is-you { border-color: var(--gold); box-shadow: 0 0 10px rgba(255, 205, 90, 0.45); }
.board-rank { font-family: "Baloo 2", "Kantumruy Pro", sans-serif; font-size: 1.05rem; text-align: center; color: var(--ink-soft); }
.board-name { color: var(--ink); overflow-wrap: anywhere; }
.board-points { font-family: "Baloo 2", "Kantumruy Pro", sans-serif; font-weight: 800; color: var(--gold-deep); }
.board-you {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--gold);
  color: #3a2a12;
  font-size: 0.66rem;
  font-weight: 800;
  vertical-align: middle;
}
.board-empty { color: var(--ink-soft); font-size: 0.88rem; text-align: center; padding: 0.6rem; }

/* full table inside the modal */
.board-table-wrap { max-height: 55vh; overflow-y: auto; overflow-x: auto; margin: 0.6rem 0; border: 3px solid var(--stone-darkest); border-radius: 12px; }
.board-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.board-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.5rem 0.6rem;
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
  background: var(--bar-bg);
  border-bottom: 3px solid var(--stone-darkest);
}
.board-table td { padding: 0.45rem 0.6rem; border-bottom: 1px dashed var(--stone-dark); font-weight: 700; color: var(--ink); }
.board-table tr:last-child td { border-bottom: none; }
.board-table tr.is-you td { background: color-mix(in srgb, var(--gold) 22%, transparent); }
.board-table td.board-rank { width: 48px; text-align: center; }
.board-table td.board-points { text-align: right; white-space: nowrap; }
html[lang="km"] .board-table th { text-transform: none; letter-spacing: 0; }

/* the name-change button while the 24h lock is on */
.back-link.locked { opacity: 0.65; cursor: not-allowed; }

@media (max-width: 560px) {
  .board-head { flex-direction: column; align-items: stretch; text-align: center; }
  .board-row { grid-template-columns: 36px 1fr auto; font-size: 0.84rem; padding: 0.4rem 0.5rem; }
  .board-table { font-size: 0.82rem; }
}

/* =========================================================
   Games hub — Points / Coins cards, plays left, countdown
   ========================================================= */
.board-mini-title {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
html[lang="km"] .board-mini-title { text-transform: none; letter-spacing: 0; }
.board-list.mini { gap: 0.28rem; text-align: left; }
.board-list.mini .board-row { padding: 0.3rem 0.5rem; font-size: 0.82rem; grid-template-columns: 30px 1fr auto; }
.board-view-full {
  margin-top: 0.55rem;
  padding: 0.3rem 0.9rem;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--on-dark);
  background: linear-gradient(180deg, #7d5936, #5c3f22);
  border: 2px solid var(--stone-darkest);
  border-radius: 999px;
  box-shadow: 0 2px 0 var(--stone-darkest);
  cursor: pointer;
  transition: transform 0.15s;
}
.board-view-full:hover { transform: translateY(-1px); }
.games-stats .info-card.stacked { padding-bottom: 1rem; }

.sub-value.cap-reached { color: var(--gold); }

/* plays-left pips on each game card */
.plays-left { margin: 0.55rem 0 0.7rem; text-align: center; }
.plays-pips { display: flex; justify-content: center; gap: 4px; margin-bottom: 0.3rem; }
.plays-pips i {
  width: 15px;
  height: 9px;
  border-radius: 3px;
  border: 2px solid var(--stone-darkest);
  background: var(--moss);
}
.plays-pips i.spent { background: var(--input-bg); opacity: 0.7; }
.plays-label { font-size: 0.74rem; font-weight: 700; color: var(--ink-soft); }
.plays-left.none .plays-label { color: var(--terracotta); }
.game-card.spent { opacity: 0.72; }
.game-card .buy-btn:disabled { cursor: not-allowed; opacity: 0.7; }

/* 3… 2… 1… GO! */
.countdown-screen { padding: 2rem 0 1rem; }
.countdown-number {
  font-family: "Baloo 2", "Kantumruy Pro", sans-serif;
  font-weight: 800;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 4px 0 var(--gold-deep), 0 8px 18px rgba(0,0,0,0.5);
  margin: 0.5rem 0 1rem;
}
.countdown-number.pop { animation: countdown-pop 0.75s ease-out; }
.countdown-number.go { color: var(--moss-light); font-size: 3.4rem; animation: countdown-go 0.4s ease-out; }
@keyframes countdown-pop {
  0% { transform: scale(1.6); opacity: 0; }
  25% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.92); opacity: 0.75; }
}
@keyframes countdown-go {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* =========================================================
   Store — profile bar, rank button states, confirmation
   ========================================================= */
.store-profile { margin-bottom: 1.4rem; }
.store-profile .player-avatar img { width: 100%; height: 100%; object-fit: contain; }
.store-profile-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.3rem; }
.profile-chip {
  display: inline-block;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  border: 2px solid var(--stone-darkest);
  background: var(--input-bg);
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--ink);
}
.profile-chip.coins { color: var(--gold-deep); }
.profile-chip[hidden] { display: none; }

/* rank buttons: upgrade / the one you hold / one you're past */
.buy-btn.rank-upgrade {
  background: linear-gradient(180deg, var(--moss-light), var(--moss));
  color: #1d3a12;
}
.buy-btn.rank-current {
  background: linear-gradient(180deg, var(--stone-light), var(--stone-mid));
  color: var(--ink-soft);
  border-color: var(--stone-dark);
  box-shadow: 0 3px 0 var(--stone-dark);
}
.buy-btn.rank-lower {
  background: linear-gradient(180deg, #e2584a, #b32f22);
  color: #fff1ee;
  border-color: #6d1a12;
  box-shadow: 0 3px 0 #6d1a12;
}
.buy-btn.rank-current:hover, .buy-btn.rank-lower:hover { transform: none; }
.info-buy-btn.rank-current, .info-buy-btn.rank-lower { opacity: 0.95; }

.confirm-head { text-align: center; margin-bottom: 0.9rem; }
.confirm-icon {
  width: 108px;
  height: 108px;
  object-fit: contain;
  margin-bottom: 0.3rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}
.confirm-head h3 { margin: 0; font-size: 1.3rem; }
.confirm-tag {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: var(--moss);
  color: #10290a;
  font-size: 0.72rem;
  font-weight: 800;
}
.confirm-rows { margin: 0 0 1rem; }
.confirm-actions { display: flex; flex-direction: column; gap: 0.5rem; align-items: center; }
.confirm-actions .continue-btn { max-width: 260px; }

/* =========================================================
   Block Breaker + Diamond Rush textures
   ========================================================= */
.bb-target-tex {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  border: 2px solid var(--stone-darkest);
  border-radius: 5px;
}
.bb-tex {
  width: 100%;
  max-width: 46px;
  aspect-ratio: 1;
  image-rendering: pixelated;
  border: 2px solid var(--stone-darkest);
  border-radius: 5px;
  pointer-events: none;
}
.bb-cell { gap: 0.25rem; background: rgba(0,0,0,0.14); }
.bb-grid.bb-levelup { animation: bb-levelup 0.35s ease-out; }
@keyframes bb-levelup {
  0% { transform: scale(1); filter: brightness(1); }
  45% { transform: scale(1.04); filter: brightness(1.5); }
  100% { transform: scale(1); filter: brightness(1); }
}
.mine-tex {
  width: 100%;
  max-width: 44px;
  aspect-ratio: 1;
  image-rendering: pixelated;
  pointer-events: none;
}
.mine-cell { background: linear-gradient(180deg, #55483f, #3d332c); }

/* =========================================================
   TNT Escape + Block Parkour stages
   ========================================================= */
.tnt-stage { background: linear-gradient(180deg, #2a2018 0%, #1c1510 100%); cursor: none; touch-action: none; }
.parkour-stage {
  background: linear-gradient(180deg, #6fa8dc 0%, #a8cf7e 62%, #4e8a3c 100%);
  cursor: pointer;
  touch-action: none;
}
.parkour-stage.stage-hurt { animation: stage-hurt 0.22s; }
@keyframes stage-hurt {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(255,60,40,0); }
  50% { box-shadow: inset 0 0 60px 10px rgba(255,60,40,0.55); }
}

@media (max-width: 560px) {
  .countdown-number { font-size: 3.4rem; }
  .confirm-icon { width: 84px; height: 84px; }
  .board-list.mini .board-row { font-size: 0.76rem; grid-template-columns: 26px 1fr auto; }
}

/* Change-name modal: the live cooldown note that replaces a silent block */
.cooldown-note {
  padding: 0.55rem 0.8rem;
  margin: -0.2rem 0 0.9rem;
  border-radius: 10px;
  border: 2px solid var(--gold-deep);
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  color: var(--gold-deep);
  font-weight: 700;
  text-align: center;
}
#change-name-save:disabled {
  background: linear-gradient(180deg, var(--stone-light), var(--stone-mid));
  color: var(--ink-soft);
  cursor: not-allowed;
  opacity: 0.85;
}
#change-name-save:disabled:hover { transform: none; }
