:root {
  --cols: 7;
  --rows: 7;

  --gap: 6px;
  --side-pad: clamp(12px, 4vw, 24px);
  --board-pad: clamp(6px, 1.8vw, 16px);

  --container-max-w: min(960px, 100vw);
  --tileW: calc(
    (var(--container-max-w) - var(--side-pad) * 2 - var(--board-pad) * 2 - (var(--cols) - 1) * var(--gap))
      / var(--cols)
  );

  --chrome: clamp(120px, 28vh, 240px);
  --tileH: calc(
    (100dvh - var(--chrome) - var(--board-pad) * 2 - (var(--rows) - 1) * var(--gap) - var(--side-pad) * 2)
      / var(--rows)
  );

  --tile: clamp(32px, min(var(--tileW), var(--tileH)), 72px);

  font-family: 'Caveat', cursive, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  --vowel-bg: #dbeafe;
  --vowel-fg: #0c4a6e;
  --vowel-border: #93c5fd;
  --vowel-shadow: #bfdbfe;
  --vowel-selected-bg: #bfdbfe;

  --scrim: rgba(0,0,0,.32);
  --bank-bg: rgba(255,255,240,.98);
  --bank-border: #e1c699;
}

@supports (height: 100svh) { :root { --svh: 100svh; } }
@supports not (height: 100svh) { :root { --svh: 100dvh; } }

* { box-sizing: border-box; }
html, body { height: var(--svh); }

body {
  margin: 0;
  background: #fdf6e3;
  color: #3e2f1c;
  display: grid;
  place-items: center;
  min-height: var(--svh);
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
           env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow-x: hidden;

  background-image: repeating-linear-gradient(
    to bottom,
    #fdf6e3,
    #fdf6e3 22px,
    #f6e8c3 23px
  );
}

.container { width: var(--container-max-w); padding: var(--side-pad); margin-inline: auto; }

.card {
  background: rgba(255, 255, 240, 0.9);
  border: 2px solid #e1c699;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,.15);
}

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #c8a97e;
  background: #fffdf5;
  color: #3e2f1c;
  font-family: inherit;
  min-width: min(280px, 100%);
}

.btn {
  padding: 10px 16px;
  border-radius: 10px;
  background: #d4a45f;
  color: white;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ========== Play Area ========== */
.board {
  display: block;
  margin: 12px auto 0;
  inline-size: fit-content;
  max-inline-size: 100%;
  padding: var(--board-pad);
  border: none;
  border-radius: 14px;
  background-color: rgba(255, 255, 240, 0.95);
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--tile));
  gap: var(--gap);
  justify-content: center;
  max-width: 100%;
}

/* ========== Tiles ========== */
.tile {
  width: var(--tile);
  height: var(--tile);
  display: grid;
  place-items: center;
  border-radius: max(10px, calc(var(--tile) * 0.18));
  border: 1px solid #c8a97e;
  background: #fffdf5;

  /* Stable, non-cursive font for letters */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-variant-ligatures: none;
  font-synthesis: none;

  font-size: clamp(16px, calc(var(--tile) * 0.38), 28px);
  font-weight: 700;
  letter-spacing: .5px;

  cursor: pointer;
  user-select: none;
  -webkit-touch-callout: none;
  box-shadow: inset 0 0 0 2px #f3d8a1;

  position: relative;
  transition: transform 220ms ease, opacity 220ms ease;
  will-change: transform;
}
.tile.empty { opacity: .2; border-style: dashed; }
.tile.selected { outline: 3px solid #ffcc66; background: #ffeeb5; }

/* Vowel styling */
.tile[data-vowel="1"] {
  background: var(--vowel-bg);
  color: var(--vowel-fg);
  border-color: var(--vowel-border);
  box-shadow: inset 0 0 0 2px var(--vowel-shadow);
}
.tile[data-vowel="1"].selected {
  background: var(--vowel-selected-bg);
  outline-color: var(--vowel-border);
}

/* ========== Misc UI ========== */
.badge {
  background: #fff4d1;
  border: 1px solid #e1c699;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.word { font-family: 'Courier New', monospace; font-size: clamp(14px, 2.6vw, 18px); }
.feedback { min-height: 22px; opacity: .9; }
hr { border-color: #e1c699; opacity: .5; margin: 16px 0; }
.small { opacity: .8; font-size: 12px; }

@media (max-width: 480px) {
  .card { padding: 12px; }
  .row { gap: 8px; }
  .btn, .input { flex: 1 1 auto; }
}

/* Hints (optional) */
.grid[data-hints="on"] .tile[data-pos]::after {
  content: "";
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: rgba(212, 164, 95, 0.9);
  box-shadow: 0 0 0 2px rgba(255, 253, 245, 0.9);
}
.grid[data-hints="on"] .tile[data-pos="first"]::after { top: 6px; left: 6px; }
.grid[data-hints="on"] .tile[data-pos="last"]::after  { top: 6px; right: 6px; }
.grid[data-hints="on"] .tile[data-pos="only"]::after  { top: 50%; left: 50%; transform: translate(-50%, -50%); }

.grid[data-hints="on"] .tile[data-pos] {
  box-shadow: inset 0 0 0 2px #f3d8a1, 0 0 0 1px rgba(212,164,95,0.15);
}

/* Collapse animation */
.tile.falling { transition: transform 220ms cubic-bezier(.2,.8,.2,1), opacity 180ms ease; }

/* Success pop */
.tile.swap-pop { animation: swapPop 220ms cubic-bezier(.2,.8,.2,1); }
@keyframes swapPop {
  0%   { transform: scale(.9); }
  60%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* NEW: quick wiggle used when word not in dictionary */
.tile.shake { animation: tileWiggle 120ms ease-in-out 0s 3; }
@keyframes tileWiggle {
  0%   { transform: translateX(0) rotate(0); }
  30%  { transform: translateX(-3px) rotate(-1deg); }
  70%  { transform: translateX(3px) rotate(1deg); }
  100% { transform: translateX(0) rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
  .tile.shake { animation: none; }
}

/* Avoid stray scrollbars */
html, body { overscroll-behavior-x: contain; }

/* ===== Lives HUD ===== */
.lives-badge { display: inline-flex; align-items: center; gap: 6px; }
.lives { display: inline-flex; gap: 8px; }
.lives .life {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 6px; border-radius: 999px;
  border: 1px solid var(--bank-border);
  background: #fffef6;
  font-weight: 700;
}
.lives .life small { font-weight: 700; font-size: 10px; opacity: .8; }
.lives .life.dead { opacity: .45; }

/* ===== Swap Overlay ===== */
body.swap-dim #app { filter: brightness(.75); transition: filter 150ms ease; }

#swapOverlay {
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: 0; transform: translateY(6px);
  transition: opacity 160ms ease, transform 180ms ease;
  z-index: 999;
}
#swapOverlay.open { opacity: 1; transform: translateY(0); pointer-events: auto; }

.swap-scrim {
  position: absolute; inset: 0;
  background: var(--scrim);
  backdrop-filter: blur(1px);
}

.swap-bank {
  position: absolute;
  left: 50%; bottom: clamp(16px, 6vh, 48px);
  transform: translateX(-50%);
  background: var(--bank-bg);
  border: 2px solid var(--bank-border);
  border-radius: 14px;
  padding: 10px 12px;
  min-width: 220px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

/* Bank tiles use the same stable font as board tiles */
.bank-title { font-weight: 700; text-align: center; margin-bottom: 6px; }
.bank-grid {
  display: grid;
  grid-template-columns: repeat(5, 40px);
  gap: 8px;
  justify-content: center;
}
.bank-tile {
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--vowel-border);
  background: var(--vowel-bg);
  color: var(--vowel-fg);
  box-shadow: inset 0 0 0 2px var(--vowel-shadow);
  display: grid; place-items: center;
  position: relative;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-variant-ligatures: none;
  font-synthesis: none;
  font-weight: 900;
}
.bank-tile[data-disabled="1"] { opacity: .35; filter: grayscale(0.3); }
.bank-letter { font-size: 18px; line-height: 1; }
.bank-count {
  position: absolute; right: -6px; top: -6px;
  width: 18px; height: 18px; border-radius: 999px;
  border: 1px solid var(--bank-border);
  background: #fffef6; color: #3e2f1c;
  font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
}
.bank-tile.hover {
  outline: 3px solid #93c5fd;
  transform: translateY(-1px);
  transition: transform 120ms ease, outline-color 120ms ease;
}
.bank-tip { text-align: center; font-size: 12px; opacity: .75; margin-top: 6px; }

/* Drag Ghost: zero transition for zero lag */
.drag-ghost {
  position: fixed; left: 0; top: 0;
  transform: translate3d(-9999px,-9999px,0) scale(1);
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-variant-ligatures: none;
  font-synthesis: none;
  font-weight: 900; font-size: 22px;
  background: #fffdf5;
  border: 2px solid #c8a97e;
  box-shadow: 0 6px 22px rgba(0,0,0,.25), inset 0 0 0 2px #f3d8a1;
  transition: none;
  will-change: transform;
  pointer-events: none;
}
.drag-ghost.in { animation: ghostPop 160ms ease-out; }
@keyframes ghostPop {
  from { transform: scale(.8); opacity: .6; }
  to   { transform: scale(1); opacity: 1; }
}

/* ===== How To Play overlay ===== */

/* Use the same dim effect as your swap overlay */
body.howto-dim #app { filter: brightness(.75); transition: filter 150ms ease; }

#howtoOverlay {
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: 0; transform: translateY(6px);
  transition: opacity 160ms ease, transform 180ms ease;
  z-index: 1001; /* above other UI */
  touch-action: none;
}
#howtoOverlay.open { opacity: 1; transform: translateY(0); pointer-events: auto; }

.howto-scrim {
  position: absolute; inset: 0;
  background: var(--scrim, rgba(0,0,0,.32));
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  touch-action: none;
}

.howto-panel {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: var(--bank-bg, rgba(255,255,240,.98));
  border: 2px solid var(--bank-border, #e1c699);
  border-radius: 14px;
  padding: clamp(12px, 2.4vw, 18px);
  width: min(94vw, var(--howtoW, 880px));
  max-width: var(--container-max-w, 960px);
  height: var(--howtoH, 520px);
  max-height: calc(var(--svh, 100dvh) - var(--side-pad, 16px) * 2);
  display: flex; flex-direction: column; gap: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  touch-action: none;
}

.howto-header h2 {
  margin: 4px 0 0;
  font-size: clamp(20px, 3.6vw, 26px);
}

.howto-tagline {
  margin: 6px 0 2px;
  opacity: .85;
  font-weight: 600;
}

.howto-table {
  flex: 1;
  overflow: auto;
  padding-right: 2px;
  display: grid;
  gap: clamp(10px, 1.6vw, 14px);
}

.howto-row {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 12px;
  align-items: center;
  background: #fffdf5;
  border: 1px solid #e1c699;
  border-radius: 12px;
  padding: 10px;
}

.howto-copy { display: grid; gap: 4px; }
.howto-rule { font-weight: 800; }
.howto-desc { opacity: .9; }

.howto-gif {
  aspect-ratio: 4 / 3;
  min-height: 100px;
  border: 2px dashed #e1c699;
  border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800;
  opacity: .4;
  user-select: none;
  -webkit-user-select: none;
}

.howto-footer {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

/* Responsive: stack rows on narrow screens */
@media (max-width: 560px) {
  .howto-row { grid-template-columns: 1fr; }
}


/* --- Mobile drag/refresh mitigation --- */
.tile { touch-action: none; -webkit-touch-callout: none; }
body.swap-dim { overscroll-behavior: none; touch-action: none; }
#swapOverlay, .swap-scrim, .swap-bank, .drag-ghost { touch-action: none; }
html, body { overscroll-behavior-y: contain; }

/* --- Prevent text selection & iOS callout on interactive tiles/bank/ghost --- */
.tile,
.tile *,
.bank-tile,
.bank-tile *,
.drag-ghost {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
#swapOverlay, #swapOverlay * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* ===== How To Play overlay (tabs) ===== */

body.howto-dim #app { filter: brightness(.75); transition: filter 150ms ease; }

#howtoOverlay {
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: 0; transform: translateY(6px);
  transition: opacity 160ms ease, transform 180ms ease;
  z-index: 1001;
  touch-action: none;
}
#howtoOverlay.open { opacity: 1; transform: translateY(0); pointer-events: auto; }

.howto-scrim {
  position: absolute; inset: 0;
  background: var(--scrim, rgba(0,0,0,.32));
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  touch-action: none;
}

.howto-panel {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: var(--bank-bg, rgba(255,255,240,.98));
  border: 2px solid var(--bank-border, #e1c699);
  border-radius: 14px;
  padding: clamp(12px, 2.4vw, 18px);
  width: min(94vw, var(--howtoW, 880px));
  max-width: var(--container-max-w, 960px);
  height: var(--howtoH, 520px);
  max-height: calc(var(--svh, 100dvh) - var(--side-pad, 16px) * 2);
  display: grid;
  grid-template-rows: auto auto 1fr auto; /* header, tabs, body, footer */
  gap: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  touch-action: none;
}

.howto-header h2 {
  margin: 4px 0 0;
  font-size: clamp(20px, 3.6vw, 26px);
}

/* Tabs */
.howto-tabs {
  display: flex; gap: 6px; align-items: center;
  border-bottom: 1px solid #e1c699;
  padding-bottom: 6px;
}
.howto-tab {
  appearance: none; border: 1px solid #e1c699;
  background: #fffdf5;
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, background .08s ease;
}
.howto-tab.is-active {
  background: #ffeec7;
  box-shadow: 0 2px 0 #e1c699 inset;
}
.howto-tab:focus-visible {
  outline: 2px solid #a07a3a; outline-offset: 2px;
}

/* Body area */
.howto-body {
  overflow: hidden;
  border-radius: 10px;
  background: #fffdf5;
  border: 1px solid #e1c699;
  padding: 10px;
  display: grid;
}
.howto-tabpanel { overflow: auto; }
.is-hidden { display: none !important; }

.howto-tagline {
  margin: 6px 0 2px;
  opacity: .85;
  font-weight: 600;
}

/* Consistent media sizing across how-to rows */
:root {
  /* width of the dashed box; tweak to taste */
  --howto-media-w: clamp(160px, 28vw, 260px);
  /* aspect ratio of the media box */
  --howto-media-aspect: 16/9;
}

/* Two-column rows: copy + fixed-width media box */
.howto-table { display: grid; gap: 16px; }
.howto-row {
  display: grid;
  grid-template-columns: 1fr var(--howto-media-w);
  gap: 16px;
  align-items: center;
}

/* The dashed placeholder box */
.howto-gif {
  width: 100%;
  aspect-ratio: var(--howto-media-aspect);
  border: 2px dashed var(--ink-20, #ead4a8);
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: transparent;   /* no tinting behind the SVG */
  opacity: 1 !important;     /* guard against inherited fades */
  isolation: isolate;        /* prevent parent blend effects */
}

/* Make the media always fit the dashed box */
.howto-gif > .howto-media,
.howto-gif > img.howto-media,
.howto-gif > svg.howto-media {
  width: 100%;
  height: 100%;
  object-fit: contain;        /* preserve aspect without cropping */
  display: block;
  opacity: 1 !important;      /* ensure not translucent */
  mix-blend-mode: normal !important;
  filter: none !important;
  pointer-events: none;       /* keep the UI feeling non-interactive */
  user-select: none;
}

/* Optional: tighten layout on narrow screens */
@media (max-width: 520px) {
  :root { --howto-media-w: clamp(140px, 42vw, 220px); }
  .howto-row { gap: 12px; }
}


/* Groups table */
.howto-table {
  display: grid;
  gap: clamp(10px, 1.6vw, 14px);
}
.howto-row {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 12px;
  align-items: center;
  background: #fffef8;
  border: 1px solid #e1c699;
  border-radius: 12px;
  padding: 10px;
}
.howto-copy { display: grid; gap: 4px; }
.howto-rule { font-weight: 800; }
.howto-desc { opacity: .9; }
.howto-gif {
  aspect-ratio: 4 / 3;
  min-height: 100px;
  border: 2px dashed #e1c699;
  border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800; opacity: .4;
  user-select: none; -webkit-user-select: none;
}

/* Scoring text */
.howto-scoring {
  font-weight: 800;
  text-align: center;
  padding: 12px 6px;
  background: #fffef3;
  border: 1px dashed #e1c699;
  border-radius: 10px;
}

/* Footer */
.howto-footer {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

/* Responsive: stack rows on narrow screens */
@media (max-width: 560px) {
  .howto-row { grid-template-columns: 1fr; }
}


/* ===== Letter-hop feedback (mis-grouping / blocked hop) ===== */
:root {
  --hop-rust: #9a3d2f;
  --hop-rust-tint: rgba(154, 61, 47, 0.18);
}
.tile.hop-bad {
  animation:
    tileWiggle 120ms ease-in-out 0s 3,
    hopFlash   160ms ease-in-out 0s 2;
}
@keyframes hopFlash {
  0%, 100% {
    outline: 0 solid transparent;
    box-shadow: inset 0 0 0 2px #f3d8a1;
  }
  50% {
    outline: 3px solid var(--hop-rust);
    box-shadow:
      inset 0 0 0 3px var(--hop-rust),
      0 0 0 3px var(--hop-rust-tint);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tile.hop-bad { animation: hopFlash 180ms ease-in-out 0s 2; }
}

/* auth-styles.css - Authentication UI styles */

/* Auth Modal */
#authModal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--side-pad);
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.auth-container {
  position: relative;
  width: min(400px, 100vw - 32px);
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card {
  background: rgba(255, 255, 240, 0.98);
  border: 2px solid #e1c699;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.auth-card h2 {
  margin: 0 0 16px;
  text-align: center;
  color: #3e2f1c;
  font-size: 24px;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e1c699;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: inherit;
  font-weight: 600;
  color: #8b6b47;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.auth-tab:hover {
  color: #3e2f1c;
}

.auth-tab.active {
  color: #3e2f1c;
  border-bottom-color: #d4a45f;
}

/* Auth Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #c8a97e;
  border-radius: 10px;
  background: #fffdf5;
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.2s;
}

.auth-field input:focus {
  outline: none;
  border-color: #d4a45f;
  box-shadow: 0 0 0 3px rgba(212, 164, 95, 0.1);
}

.auth-error {
  color: #d32f2f;
  font-size: 14px;
  text-align: center;
  min-height: 20px;
  margin: 4px 0;
}

.auth-submit {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Auth Footer */
.auth-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e1c699;
}

.auth-skip {
  background: none;
  border: none;
  color: #8b6b47;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
}

.auth-skip:hover {
  color: #3e2f1c;
}

.auth-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0e6d2;
  border: 1px solid #e1c699;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
  display: grid;
  place-items: center;
}

.auth-close:hover {
  background: #e1c699;
  transform: scale(1.1);
}

/* User Info Display */
.user-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #fff4d1;
  border: 1px solid #e1c699;
  border-radius: 999px;
  font-size: 14px;
}

.user-info .username {
  font-weight: 600;
  color: #3e2f1c;
}

.user-info .logout-btn {
  background: none;
  border: none;
  color: #8b6b47;
  cursor: pointer;
  font-size: 12px;
  text-decoration: underline;
}

.user-info .logout-btn:hover {
  color: #d32f2f;
}

/* Stats Display */
.stats-panel {
  background: rgba(255, 255, 240, 0.9);
  border: 1px solid #e1c699;
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.stat-item {
  text-align: center;
  padding: 8px;
  background: #fffdf5;
  border-radius: 8px;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #d4a45f;
}

.stat-label {
  font-size: 12px;
  color: #8b6b47;
  margin-top: 4px;
}