/* ============================================================
   Word Chomp! — garden word dig
   Hand-built styles: sunny dirt-patch palette, chunky woodcraft UI.
   Fonts are embedded in assets/fonts.css; no runtime network calls.
   ============================================================ */

:root {
  --ink: #4a2a12;
  --ink-soft: #6d5132;
  --ink-faint: #937a56;
  --line: #5a3319;
  --cream: #fff8e7;
  --cream-deep: #f3e6c8;
  --paper: #fffdf5;
  --green: #5aa83f;
  --green-dark: #2f6b25;
  --green-deep: #24501d;
  --green-bright: #7ed957;
  --green-soft: #e5f5d6;
  --yellow: #ffd23f;
  --yellow-deep: #dba712;
  --coral: #ff8a3d;
  --coral-dark: #c85a1b;
  --sky: #8ed8f3;
  --wood: #b5793c;
  --wood-dark: #7b4a22;
  --shadow-soft: 0 10px 30px rgba(51, 71, 25, 0.16);
  --shadow-hard: 0 6px 0 rgba(90, 51, 25, 0.22);
  --font-display: "Baloo 2", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;
}

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

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  background: #8ed8c2;
}

body.modal-open {
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

svg {
  display: block;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

::selection {
  color: var(--ink);
  background: #ffe88a;
}

:focus-visible {
  outline: 3px solid #1d5c2b;
  outline-offset: 3px;
}

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

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ------------------------------------------------------------
   Sky, hills, and garden dressing
   ------------------------------------------------------------ */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    #8fdaf5 0%,
    #b7ebdf 30%,
    #e7f5c7 58%,
    #bfe08a 76%,
    #8fc85c 100%
  );
}

.sun {
  position: absolute;
  top: -4vw;
  right: 5vw;
  width: clamp(170px, 19vw, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle at 37% 35%,
    #fffef0 0 15%,
    #fff4ab 36%,
    #ffe066 58%,
    rgba(255, 215, 80, 0) 71%
  );
  box-shadow: 0 0 110px 60px rgba(255, 231, 126, 0.36);
  animation: sun-breathe 9s ease-in-out infinite;
}

.cloud {
  position: absolute;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  filter: blur(0.2px);
  box-shadow: 0 12px 24px rgba(72, 123, 143, 0.07);
  animation: cloud-drift 48s ease-in-out infinite alternate;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: inherit;
}

.cloud::before {
  left: 12%;
  bottom: 8%;
  width: 48%;
  height: 170%;
}

.cloud::after {
  right: 12%;
  bottom: 0;
  width: 38%;
  height: 135%;
}

.cloud-one {
  top: 12%;
  left: 4%;
  width: 158px;
}

.cloud-two {
  top: 27%;
  right: 20%;
  width: 122px;
  height: 34px;
  opacity: 0.62;
  animation-duration: 64s;
  animation-direction: alternate-reverse;
}

.cloud-three {
  top: 4%;
  left: 43%;
  width: 94px;
  height: 28px;
  opacity: 0.5;
  animation-duration: 72s;
}

.hill {
  position: absolute;
  border-radius: 50% 50% 0 0;
  pointer-events: none;
}

.hill-far {
  left: -24%;
  bottom: 7%;
  width: 145%;
  height: 52%;
  background: linear-gradient(180deg, #b6e18c 0%, #86c765 82%);
  opacity: 0.58;
  transform: rotate(-2.5deg);
}

.hill-mid {
  left: -12%;
  bottom: -3%;
  width: 118%;
  height: 43%;
  background: linear-gradient(180deg, #91d169 0%, #64ae46 100%);
  opacity: 0.82;
  transform: rotate(1.5deg);
}

.hill-near {
  right: -26%;
  bottom: -12%;
  width: 98%;
  height: 40%;
  background: linear-gradient(180deg, #82c45b 0%, #4f9637 100%);
}

.grass-fringe {
  position: absolute;
  right: -2%;
  bottom: 0;
  left: -2%;
  height: 9%;
  opacity: 0.4;
  background-image: repeating-linear-gradient(
    96deg,
    transparent 0 13px,
    #2f6b25 13px 15px,
    transparent 15px 28px
  );
  mask-image: linear-gradient(180deg, transparent, #000 70%);
}

.daisy {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffe05c;
  box-shadow:
    0 -9px 0 2px #fffdf2,
    8px -3px 0 2px #fffdf2,
    6px 7px 0 2px #fffdf2,
    -6px 7px 0 2px #fffdf2,
    -8px -3px 0 2px #fffdf2;
  opacity: 0.8;
}

.daisy-one {
  left: 7vw;
  bottom: 7vh;
  transform: scale(0.85) rotate(12deg);
}

.daisy-two {
  right: 10vw;
  bottom: 4vh;
  transform: scale(1.1) rotate(-6deg);
}

.daisy-three {
  left: 48vw;
  bottom: 2vh;
  transform: scale(0.65) rotate(18deg);
  opacity: 0.55;
}

/* ------------------------------------------------------------
   Shell and top bar
   ------------------------------------------------------------ */

.app {
  position: relative;
  width: min(1200px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 24px 20px;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 2px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-tile {
  display: grid;
  width: 43px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(180deg, #ffe899, #f7bd3c);
  box-shadow: 0 4px 0 #c58a1a;
  color: var(--line);
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.55);
  transform: rotate(-3deg);
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  color: #28481e;
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.brand-copy small {
  color: #4c6b35;
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.best-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 41px;
  padding: 7px 13px;
  border: 2.5px solid rgba(90, 51, 25, 0.82);
  border-radius: 999px;
  background: rgba(255, 250, 235, 0.88);
  box-shadow: 0 4px 0 rgba(90, 51, 25, 0.15);
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.best-pill b {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.09rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-transform: none;
}

.trophy-icon {
  width: 17px;
  height: 17px;
  color: #bd8510;
}

.icon-btn {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 2.5px solid rgba(90, 51, 25, 0.82);
  border-radius: 50%;
  background: rgba(255, 250, 235, 0.88);
  box-shadow: 0 4px 0 rgba(90, 51, 25, 0.15);
  color: var(--ink);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease;
  backdrop-filter: blur(6px);
}

.icon-btn:hover {
  background: #fffdf7;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(90, 51, 25, 0.17);
}

.icon-btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(90, 51, 25, 0.15);
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-off-icon {
  display: none;
}

body.is-muted .sound-on-icon {
  display: none;
}

body.is-muted .sound-off-icon {
  display: block;
}

.stage {
  flex: 1;
}

.screen {
  animation: screen-in 0.35s ease both;
}

/* ------------------------------------------------------------
   Home
   ------------------------------------------------------------ */

.home-screen {
  padding: 8px 0 26px;
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
  gap: 22px;
  align-items: center;
  overflow: hidden;
  padding: 44px 34px 42px 46px;
  border: 4px solid var(--line);
  border-radius: 36px;
  background:
    radial-gradient(rgba(122, 74, 36, 0.07) 1px, transparent 1.3px) 0 0 / 15px 15px,
    linear-gradient(115deg, #fffdf5 0%, #fff8e7 58%, #fff4d7 100%);
  box-shadow:
    0 12px 0 rgba(90, 51, 25, 0.24),
    0 32px 60px rgba(46, 77, 26, 0.2);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px dashed rgba(146, 112, 65, 0.28);
  border-radius: 27px;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #4a7735;
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6fc64b;
  box-shadow: 0 0 0 4px rgba(111, 198, 75, 0.16);
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(58px, 8.5vw, 108px);
  font-weight: 800;
  letter-spacing: 0.005em;
  line-height: 0.76;
  transform: rotate(-1.5deg);
}

.logo-line {
  display: flex;
  align-items: baseline;
}

.logo-line i {
  display: inline-block;
  font-style: normal;
  line-height: 0.92;
  transform: translateY(0) rotate(var(--r, 0deg));
  text-shadow:
    0 4px 0 var(--ink),
    0 8px 0 rgba(90, 51, 25, 0.22);
  -webkit-text-stroke: 3px var(--stroke, var(--line));
  paint-order: stroke fill;
}

.logo-word {
  color: #f5ffe8;
  --stroke: #31541f;
}

.logo-word i:nth-child(1) {
  --r: -3deg;
}

.logo-word i:nth-child(2) {
  --r: 2deg;
}

.logo-word i:nth-child(3) {
  --r: -1.5deg;
}

.logo-word i:nth-child(4) {
  --r: 2.5deg;
}

.logo-chomp {
  margin-top: -0.02em;
  margin-left: 0.3em;
  color: var(--yellow);
  --stroke: #5a3319;
}

.logo-chomp i:nth-child(1) {
  --r: 2deg;
}

.logo-chomp i:nth-child(2) {
  --r: -1.5deg;
}

.logo-chomp i:nth-child(3) {
  --r: 1deg;
}

.logo-chomp i:nth-child(4) {
  --r: -2deg;
}

.logo-chomp i:nth-child(5) {
  --r: 1.5deg;
}

.logo-chomp .bang {
  color: #ff8a3d;
  --r: -5deg;
  margin-left: 0.02em;
  animation: bang-wiggle 4.5s ease-in-out infinite;
}

.hero-desc {
  max-width: 535px;
  margin-bottom: 22px;
  color: #6b5739;
  font-size: clamp(0.94rem, 1.15vw, 1.04rem);
  font-weight: 600;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin: 18px 0 0;
  color: #63804b;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-meta span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #91b96e;
}

.home-art {
  position: relative;
  display: grid;
  min-height: 430px;
  place-items: center;
}

.art-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(370px, 100%);
  aspect-ratio: 1;
  border: 2px dashed rgba(122, 153, 80, 0.46);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 44%, #fff9ce 0 24%, #ffed99 48%, rgba(255, 233, 139, 0) 68%),
    repeating-conic-gradient(
      from 0deg,
      rgba(255, 255, 255, 0.4) 0deg 10deg,
      transparent 10deg 25deg
    );
  transform: translate(-50%, -50%);
  opacity: 0.9;
}

.home-mascot {
  position: relative;
  z-index: 2;
  width: clamp(238px, 25vw, 310px);
  height: auto;
  margin-top: 86px;
  filter: drop-shadow(0 16px 18px rgba(77, 52, 20, 0.22));
  animation: mascot-bob 5.5s ease-in-out infinite;
}

.home-bubble {
  position: absolute;
  top: 4px;
  left: 50%;
  z-index: 3;
  width: min(232px, 76%);
  padding: 11px 15px;
  border: 2.5px solid var(--line);
  border-radius: 17px;
  background: #fffdf5;
  box-shadow: 0 5px 0 rgba(90, 51, 25, 0.16);
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.4;
  transform: translateX(-50%) rotate(-2deg);
}

.home-bubble::after {
  content: "";
  position: absolute;
  bottom: -11px;
  left: 50%;
  width: 15px;
  height: 15px;
  border-right: 2.5px solid var(--line);
  border-bottom: 2.5px solid var(--line);
  background: #fffdf5;
  transform: translateX(-50%) rotate(45deg);
}

.home-bubble strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.1;
}

.home-bubble span {
  display: block;
  margin-top: 2px;
}

.floating-tiles {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.float-tile {
  position: absolute;
  display: grid;
  width: clamp(36px, 4.2vw, 49px);
  aspect-ratio: 1;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffe899, #f7bd3c);
  box-shadow:
    0 5px 0 #c58a1a,
    0 9px 14px rgba(70, 44, 14, 0.16);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(21px, 2.4vw, 29px);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.55);
}

.ft-one {
  top: 24%;
  left: 1%;
  transform: rotate(-13deg);
}

.ft-two {
  top: 9%;
  right: 4%;
  transform: rotate(8deg);
  background: linear-gradient(180deg, #e6ffcf, #b7e58f);
  box-shadow:
    0 5px 0 #7eb452,
    0 9px 14px rgba(70, 44, 14, 0.14);
}

.ft-three {
  right: 0;
  bottom: 24%;
  transform: rotate(11deg);
  background: linear-gradient(180deg, #ffd7b0, #ffab63);
  box-shadow:
    0 5px 0 #cc702d,
    0 9px 14px rgba(70, 44, 14, 0.14);
}

.ft-four {
  bottom: 9%;
  left: 6%;
  transform: rotate(-6deg);
  background: linear-gradient(180deg, #d8f1ff, #92cef2);
  box-shadow:
    0 5px 0 #5e9fc8,
    0 9px 14px rgba(70, 44, 14, 0.14);
}

.garden-badge {
  position: absolute;
  right: 8%;
  bottom: 7%;
  z-index: 3;
  padding: 6px 12px;
  border: 2.5px solid var(--line);
  border-radius: 999px;
  background: #ffd23f;
  box-shadow: 0 4px 0 #c58a1a;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  transform: rotate(3deg);
}

.home-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.strip-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 15px 15px 14px;
  border: 3px solid rgba(90, 51, 25, 0.9);
  border-radius: 20px;
  background: rgba(255, 252, 242, 0.93);
  box-shadow: 0 6px 0 rgba(90, 51, 25, 0.18);
  backdrop-filter: blur(4px);
}

.strip-card h2 {
  margin: 1px 0 3px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.1;
}

.strip-card p {
  margin: 0;
  color: #786448;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.5;
}

.strip-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid rgba(90, 51, 25, 0.78);
  border-radius: 12px;
  transform: rotate(-3deg);
}

.strip-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.strip-icon-yellow {
  background: #ffe89a;
  color: #84600f;
}

.strip-icon-coral {
  background: #ffd4b6;
  color: #a44d18;
}

.strip-icon-green {
  background: #d7f0bd;
  color: #3f7228;
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 3px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease,
    filter 0.12s ease;
  user-select: none;
}

.btn:hover {
  filter: brightness(1.035);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(3px);
}

.btn-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  background: linear-gradient(180deg, #8ada62 0%, #5bb341 100%);
  box-shadow:
    0 6px 0 #2f7b27,
    inset 0 2px 0 rgba(255, 255, 255, 0.4);
  color: #1d3b12;
  text-shadow: 0 1px 0 rgba(222, 255, 198, 0.7);
}

.btn-primary:active {
  box-shadow:
    0 2px 0 #2f7b27,
    inset 0 2px 0 rgba(255, 255, 255, 0.4);
}

.btn-secondary {
  background: linear-gradient(180deg, #ffe58a 0%, #f7c33f 100%);
  box-shadow:
    0 6px 0 #c08c15,
    inset 0 2px 0 rgba(255, 255, 255, 0.48);
}

.btn-secondary:active {
  box-shadow:
    0 2px 0 #c08c15,
    inset 0 2px 0 rgba(255, 255, 255, 0.48);
}

.btn-hint {
  background: linear-gradient(180deg, #ffb26b 0%, #ff8a3d 100%);
  box-shadow:
    0 6px 0 #b95418,
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
  color: #4a240d;
}

.btn-hint:active {
  box-shadow:
    0 2px 0 #b95418,
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

.btn-ghost {
  background: #fffdf6;
  box-shadow:
    0 5px 0 #d0bd94,
    inset 0 2px 0 rgba(255, 255, 255, 0.8);
  color: #7a5f3b;
}

.btn-ghost:active {
  box-shadow:
    0 2px 0 #d0bd94,
    inset 0 2px 0 rgba(255, 255, 255, 0.8);
}

.btn-xl {
  min-height: 57px;
  padding: 15px 25px;
  border-radius: 16px;
  font-size: 1.28rem;
  box-shadow:
    0 7px 0 #2f7b27,
    inset 0 2px 0 rgba(255, 255, 255, 0.45);
}

.btn-xl:active {
  box-shadow:
    0 3px 0 #2f7b27,
    inset 0 2px 0 rgba(255, 255, 255, 0.45);
}

.btn:disabled {
  cursor: not-allowed;
  filter: saturate(0.4);
  opacity: 0.56;
  transform: none;
}

.cost {
  display: inline-block;
  margin-left: 1px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(74, 36, 13, 0.13);
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.4;
}

.key-hint {
  display: inline-grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  margin-left: 2px;
  padding: 0 4px;
  border: 2px solid rgba(29, 59, 18, 0.34);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.22);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

/* ------------------------------------------------------------
   Game HUD
   ------------------------------------------------------------ */

.game-screen {
  padding: 4px 0 10px;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 18px;
  align-items: start;
}

.game-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
}

.game-head {
  display: grid;
  grid-template-areas: "round timer score quit";
  grid-template-columns: auto minmax(130px, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 10px 15px;
  border: 3px solid var(--line);
  border-radius: 19px;
  background:
    radial-gradient(rgba(122, 74, 36, 0.055) 1px, transparent 1.2px) 0 0 / 12px 12px,
    rgba(255, 248, 231, 0.94);
  box-shadow: var(--shadow-hard);
  backdrop-filter: blur(5px);
}

.round-badge {
  grid-area: round;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-right: 15px;
  border-right: 2px dashed #d7c39b;
}

.round-badge span {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1;
}

.round-badge small {
  color: #8b7350;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timer-block {
  grid-area: timer;
  min-width: 0;
}

.timer-line {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.03rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.timer-icon {
  width: 17px;
  height: 17px;
  color: #937847;
}

.timer-track {
  height: 8px;
  margin-top: 6px;
  overflow: hidden;
  border: 1.5px solid rgba(90, 51, 25, 0.55);
  border-radius: 999px;
  background: #e9dcc0;
  box-shadow: inset 0 1px 2px rgba(90, 51, 25, 0.15);
}

.timer-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #74cc4e, #4a9e35);
  transition:
    width 0.12s linear,
    background 0.25s ease;
}

.timer-fill.is-warn {
  background: linear-gradient(90deg, #ffd45b, #f2b42c);
}

.timer-fill.is-low {
  background: linear-gradient(90deg, #ff8b61, #e44a2f);
  animation: timer-pulse 0.8s ease-in-out infinite;
}

.timer-block.is-urgent #timeText {
  color: #bf3521;
  animation: timer-text-pulse 0.8s ease-in-out infinite;
}

.score-block {
  grid-area: score;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-left: 15px;
  border-left: 2px dashed #d7c39b;
}

.score-block small {
  color: #8b7350;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.score-block b {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.score-block b.is-bumping {
  animation: score-bump 0.28s cubic-bezier(0.2, 1.7, 0.4, 1);
}

.quit-btn {
  grid-area: quit;
  width: 36px;
  height: 36px;
  border-width: 2px;
  background: #fffdf6;
}

.quit-btn .icon {
  width: 18px;
  height: 18px;
  color: #866747;
}

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

.board-card {
  position: relative;
  overflow: hidden;
  padding: 17px 20px 12px;
  border: 4px solid var(--line);
  border-radius: 27px;
  background:
    radial-gradient(rgba(122, 74, 36, 0.07) 1px, transparent 1.25px) 0 0 / 14px 14px,
    linear-gradient(180deg, #fffdf5, #fff8e7);
  box-shadow:
    0 10px 0 rgba(90, 51, 25, 0.28),
    0 22px 40px rgba(48, 72, 20, 0.18);
}

.board-card::before {
  content: "";
  position: absolute;
  inset: 9px;
  z-index: 0;
  border: 2px dashed rgba(143, 113, 64, 0.22);
  border-radius: 19px;
  pointer-events: none;
}

.board-card > * {
  position: relative;
  z-index: 1;
}

.board-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 3px;
}

.board-label {
  color: #8b7658;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.found-counter {
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef7e1;
  color: #547137;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-transform: uppercase;
}

.trail-wrap {
  margin: 4px 0 8px;
}

.trail {
  --p: 0;
  position: relative;
  height: 35px;
  margin: 2px 1px 1px;
}

.trail-bed {
  position: absolute;
  top: 13px;
  right: 2.2%;
  left: 2.2%;
  height: 13px;
  border: 2px solid #7b5b35;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 248, 231, 0.46) 0 3px,
      transparent 3px 12px
    ),
    linear-gradient(180deg, #d7c092, #c5aa79);
  box-shadow: inset 0 2px 3px rgba(90, 51, 25, 0.17);
}

.trail-fill {
  position: absolute;
  top: 13px;
  left: 2.2%;
  width: 0%;
  height: 13px;
  border: 2px solid #427a2e;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.22) 0 4px,
      transparent 4px 12px
    ),
    linear-gradient(180deg, #88d661, #52a93a);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    0 1px 0 rgba(46, 92, 28, 0.15);
  transition:
    width 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.08),
    background 0.3s ease;
}

.trail-tick {
  position: absolute;
  top: 15px;
  z-index: 2;
  width: 9px;
  height: 9px;
  border: 2px solid #7b5b35;
  border-radius: 50%;
  background: #fff8e7;
  transform: translateX(-50%);
}

.tick-one {
  left: 26%;
}

.tick-two {
  left: 50%;
}

.tick-three {
  left: 74%;
}

.trail-carrot {
  position: absolute;
  top: -5px;
  right: -2px;
  z-index: 2;
  width: 37px;
  height: 37px;
  filter: drop-shadow(0 2px 1px rgba(90, 51, 25, 0.2));
  transform-origin: 70% 80%;
}

.trail-marker {
  position: absolute;
  top: -4px;
  left: 2.2%;
  z-index: 4;
  width: 33px;
  height: 33px;
  padding: 2px;
  border: 2.5px solid var(--line);
  border-radius: 50%;
  background: #fff8e7;
  box-shadow:
    0 3px 0 rgba(90, 51, 25, 0.3),
    0 5px 10px rgba(90, 51, 25, 0.16);
  transform: translateX(-50%);
  transition: left 0.5s cubic-bezier(0.2, 0.8, 0.3, 1.08);
}

.trail-marker svg {
  width: 100%;
  height: 100%;
}

.trail-marker.is-hopping {
  animation: marker-hop 0.36s ease;
}

.trail-marker.is-finished {
  animation: marker-cheer 0.55s ease-in-out 2;
}

.trail-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 1px 2px 0;
  color: #846c4c;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.trail-caption b {
  color: #45642e;
  font-weight: 900;
}

.trail-goal {
  color: #a18a67;
  font-weight: 700;
  font-style: italic;
}

.tray-wrap {
  position: relative;
}

.word-tray {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 7px 0 12px;
  padding: 10px 13px;
  overflow: hidden;
  border: 3px dashed #b99a68;
  border-radius: 18px;
  background:
    radial-gradient(rgba(122, 74, 36, 0.06) 1px, transparent 1.2px) 0 0 / 12px 12px,
    #f4e8cd;
  box-shadow: inset 0 2px 7px rgba(90, 51, 25, 0.09);
}

.tray-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #a1875c;
  font-family: var(--font-display);
  font-size: clamp(0.94rem, 1.7vw, 1.12rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
}

.tray-caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 2px;
  border-radius: 2px;
  background: #8daf68;
  animation: caret-blink 1.1s step-end infinite;
}

.tray-tile {
  display: grid;
  width: clamp(40px, 6vw, 52px);
  height: clamp(46px, 6.6vw, 58px);
  flex: 0 0 auto;
  place-items: center;
  border: 3px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(180deg, #fffbe8, #f3ddaa);
  box-shadow:
    0 4px 0 #c9a85c,
    inset 0 2px 0 rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(23px, 3.6vw, 32px);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.5);
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease;
  animation: tray-tile-in 0.16s ease both;
}

.tray-tile:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 0 #c9a85c,
    inset 0 2px 0 rgba(255, 255, 255, 0.7);
}

.tray-tile:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 #c9a85c,
    inset 0 2px 0 rgba(255, 255, 255, 0.7);
}

.tray-wrap.is-shaking .word-tray {
  animation: tray-shake 0.34s ease;
  border-color: #d97a54;
  background: #ffefe4;
}

.fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.float-score {
  position: absolute;
  top: 25%;
  left: 50%;
  z-index: 4;
  color: #3b7b26;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 800;
  line-height: 1;
  text-shadow:
    0 2px 0 #fff8e7,
    0 0 12px rgba(255, 248, 231, 0.85);
  white-space: nowrap;
  pointer-events: none;
  animation: float-score 0.95s ease-out forwards;
}

.float-score.is-bonus {
  color: #b77a00;
  font-size: clamp(1.55rem, 3.6vw, 2.15rem);
  text-shadow:
    0 2px 0 #fff8e7,
    0 0 16px rgba(255, 210, 63, 0.6);
}

.rack-wrap {
  margin: 3px 0 12px;
}

.rack {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(3px, 0.75vw, 9px);
  padding: clamp(7px, 1.2vw, 12px) clamp(7px, 1.8vw, 20px) clamp(9px, 1.6vw, 15px);
  border: 4px solid var(--line);
  border-radius: 18px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.055) 0 2px,
      transparent 2px 15px
    ),
    linear-gradient(180deg, #c98a4b 0%, #b2733a 56%, #9f612d 100%);
  box-shadow:
    0 7px 0 #6f4522,
    inset 0 2px 0 rgba(255, 255, 255, 0.32),
    inset 0 -7px 12px rgba(70, 35, 10, 0.18);
}

.tile {
  display: grid;
  width: clamp(34px, 8.1vw, 75px);
  aspect-ratio: 1;
  flex: 0 1 auto;
  place-items: center;
  padding: 0;
  border: 3px solid var(--line);
  border-radius: clamp(8px, 1.1vw, 13px);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.35), transparent 35%),
    linear-gradient(180deg, #ffe48e 0%, #f8c44c 68%, #f0b32f 100%);
  box-shadow:
    0 6px 0 #c58a1a,
    0 8px 8px rgba(63, 39, 12, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.62);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(20px, 4.7vw, 44px);
  font-weight: 800;
  line-height: 1;
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.5),
    0 -1px 0 rgba(255, 255, 255, 0.15);
  transform: rotate(var(--tilt, 0deg));
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    opacity 0.18s ease,
    filter 0.18s ease;
  will-change: transform;
}

.tile:nth-child(7n + 1) {
  --tilt: -2deg;
}

.tile:nth-child(7n + 2) {
  --tilt: 1.6deg;
}

.tile:nth-child(7n + 3) {
  --tilt: -1deg;
}

.tile:nth-child(7n + 4) {
  --tilt: 2.2deg;
}

.tile:nth-child(7n + 5) {
  --tilt: -0.6deg;
}

.tile:nth-child(7n + 6) {
  --tilt: -2.4deg;
}

.tile:nth-child(7n + 7) {
  --tilt: 0.8deg;
}

.tile:hover {
  z-index: 2;
  transform: translateY(-5px) rotate(var(--tilt, 0deg));
  box-shadow:
    0 11px 0 #c58a1a,
    0 14px 13px rgba(63, 39, 12, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.62);
}

.tile:active {
  transform: translateY(3px) rotate(var(--tilt, 0deg));
  box-shadow:
    0 2px 0 #c58a1a,
    0 4px 5px rgba(63, 39, 12, 0.18),
    inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

.tile.is-used {
  z-index: 1;
  opacity: 0.38;
  filter: saturate(0.48);
  transform: translateY(4px) rotate(var(--tilt, 0deg)) scale(0.95);
  box-shadow:
    0 3px 0 #c58a1a,
    inset 0 2px 0 rgba(255, 255, 255, 0.4);
}

.tile.is-used:hover {
  opacity: 0.55;
  transform: translateY(1px) rotate(var(--tilt, 0deg)) scale(0.96);
}

.tile:focus-visible {
  outline-color: #fff8e7;
  box-shadow:
    0 0 0 3px #1d5c2b,
    0 6px 0 #c58a1a;
}

.rack.is-shuffling .tile {
  animation: tile-shuffle 0.34s cubic-bezier(0.2, 0.9, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 22ms);
}

.board-actions {
  display: grid;
  grid-template-columns: auto auto auto minmax(150px, 1fr);
  gap: 9px;
  align-items: center;
}

.board-actions .btn {
  min-height: 43px;
  padding: 9px 14px;
  font-size: 0.93rem;
}

.board-actions .btn-submit {
  justify-self: end;
  min-width: min(205px, 100%);
  padding-inline: 20px;
  font-size: 1.04rem;
}

.board-foot {
  display: flex;
  min-height: 20px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 12px;
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px dashed rgba(143, 113, 64, 0.3);
  color: #a08a67;
  font-size: 0.64rem;
  font-weight: 700;
}

.key-tip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 8px;
}

kbd {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid #cdbb97;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #fffdf6;
  color: #82694a;
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.4;
}

.live-message {
  margin-left: auto;
  color: #4a7b30;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-align: right;
}

.live-message.is-bad {
  color: #b74a2b;
}

.live-message.is-gold {
  color: #a47200;
}

/* ------------------------------------------------------------
   Word garden panel
   ------------------------------------------------------------ */

.words-card {
  padding: 14px 16px 12px;
  border: 3px solid rgba(90, 51, 25, 0.9);
  border-radius: 21px;
  background:
    radial-gradient(rgba(122, 74, 36, 0.055) 1px, transparent 1.2px) 0 0 / 13px 13px,
    rgba(255, 251, 239, 0.94);
  box-shadow: 0 6px 0 rgba(90, 51, 25, 0.17);
  backdrop-filter: blur(4px);
}

.words-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.words-head h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}

.words-head span {
  color: #947d5a;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.found-list {
  max-height: 302px;
  overflow: auto;
  padding-right: 5px;
  scrollbar-width: thin;
  scrollbar-color: #cdb88f transparent;
}

.found-list::-webkit-scrollbar {
  width: 8px;
}

.found-list::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #cdb88f;
  background-clip: padding-box;
}

.found-group {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(143, 113, 64, 0.22);
}

.found-group:last-child {
  border-bottom: 0;
}

.found-len {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  margin-top: 1px;
  border: 1.5px solid #b8d39f;
  border-radius: 50%;
  background: #edf7e3;
  color: #58773f;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 1px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 4px 2px 8px;
  border: 2px solid #6ba04b;
  border-radius: 999px;
  background: #e7f5d7;
  color: #31521f;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.chip-points {
  padding: 0 5px;
  border-radius: 999px;
  background: #fff8e7;
  color: #8b6b37;
  font-size: 0.59rem;
  font-weight: 900;
  letter-spacing: 0;
}

.chip.is-hinted {
  border-style: dashed;
  background: #f7f2df;
  border-color: #bcae84;
  color: #7e6b47;
}

.chip.is-hinted .chip-points {
  background: #eee4c8;
  color: #9a875f;
}

.chip.is-chomp {
  border-color: #b07c10;
  background: linear-gradient(180deg, #fff3b0, #ffd23f);
  color: #5a3319;
  box-shadow: 0 2px 0 rgba(197, 138, 26, 0.55);
}

.chip.is-chomp .chip-points {
  background: rgba(255, 255, 255, 0.6);
  color: #815d13;
}

.chip.is-bonus-word {
  border-style: dashed;
  border-color: #3b93a8;
  background: #e3f7fb;
  color: #155363;
}

.chip.is-bonus-word::before {
  content: "★";
  color: #248ba5;
  font-size: 0.7em;
}

.chip.is-bonus-word .chip-points {
  background: #c9edf4;
  color: #176477;
}

.chip.is-new {
  animation: chip-pop 0.34s cubic-bezier(0.2, 1.55, 0.4, 1) both;
}

.empty-garden {
  display: flex;
  min-height: 83px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  color: #9a855f;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
}

.empty-garden svg {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  opacity: 0.8;
}

.empty-garden strong {
  display: block;
  color: #7c6b4b;
  font-family: var(--font-display);
  font-size: 0.96rem;
  line-height: 1.15;
}

.empty-garden span {
  display: block;
  margin-top: 2px;
}

/* ------------------------------------------------------------
   Side mascot and tips
   ------------------------------------------------------------ */

.game-side {
  position: sticky;
  top: 14px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.mascot-card {
  position: relative;
  overflow: hidden;
  padding: 12px 14px 9px;
  border: 3px solid var(--line);
  border-radius: 23px;
  background:
    radial-gradient(circle at 50% 38%, #fffdf1 0 22%, transparent 58%),
    radial-gradient(rgba(122, 74, 36, 0.06) 1px, transparent 1.2px) 0 0 / 12px 12px,
    #f9efd5;
  box-shadow: 0 6px 0 rgba(90, 51, 25, 0.25);
}

.mascot-stage {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 77px;
}

.speech-bubble {
  position: absolute;
  top: 0;
  right: 2px;
  left: 2px;
  z-index: 2;
  min-height: 61px;
  padding: 9px 12px;
  border: 2.5px solid var(--line);
  border-radius: 15px;
  background: #fffdf5;
  box-shadow: 0 4px 0 rgba(90, 51, 25, 0.15);
  color: #6b5535;
  font-size: 0.77rem;
  font-weight: 800;
  line-height: 1.38;
  text-align: center;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 13px;
  height: 13px;
  border-right: 2.5px solid var(--line);
  border-bottom: 2.5px solid var(--line);
  background: #fffdf5;
  transform: translateX(-50%) rotate(45deg);
}

.speech-bubble.is-popping {
  animation: speech-pop 0.3s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.side-mascot {
  width: min(180px, 86%);
  height: auto;
  margin-top: 5px;
  filter: drop-shadow(0 9px 10px rgba(77, 52, 20, 0.19));
}

.mascot-card.is-talking .side-mascot {
  animation: mascot-bounce 0.48s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.mascot-name {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-top: -2px;
  padding-bottom: 1px;
}

.mascot-name strong {
  color: #5f4625;
  font-family: var(--font-display);
  font-size: 0.98rem;
  line-height: 1;
}

.mascot-name span {
  color: #a18a65;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tips-card {
  padding: 13px 15px 12px;
  border: 2.5px solid rgba(90, 51, 25, 0.82);
  border-radius: 19px;
  background: rgba(255, 248, 227, 0.9);
  box-shadow: 0 5px 0 rgba(90, 51, 25, 0.15);
  backdrop-filter: blur(4px);
}

.tips-card h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  color: #6d4d28;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
}

.tips-card h3::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #84c65e;
  box-shadow: 0 0 0 3px rgba(132, 198, 94, 0.17);
}

.tips-card ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tips-card li {
  position: relative;
  padding-left: 13px;
  color: #7f6b4d;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.45;
}

.tips-card li::before {
  content: "";
  position: absolute;
  top: 0.51em;
  left: 1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b4cb95;
}

.tips-card b {
  color: #4d7334;
  font-weight: 900;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */

.page-foot {
  padding: 17px 8px 2px;
  color: rgba(44, 73, 30, 0.7);
  font-size: 0.67rem;
  font-weight: 700;
  text-align: center;
}

.page-foot p {
  margin: 0;
}

.page-foot em {
  font-style: normal;
  font-weight: 900;
}

/* ------------------------------------------------------------
   Modals
   ------------------------------------------------------------ */

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 46, 19, 0.56);
  opacity: 0;
  transition: opacity 0.22s ease;
  backdrop-filter: blur(5px);
}

.modal {
  position: relative;
  width: min(635px, 100%);
  max-height: min(86vh, 780px);
  overflow: auto;
  padding: 27px 28px 22px;
  border: 4px solid var(--line);
  border-radius: 27px;
  background:
    radial-gradient(rgba(122, 74, 36, 0.055) 1px, transparent 1.2px) 0 0 / 14px 14px,
    var(--cream);
  box-shadow:
    0 12px 0 rgba(74, 42, 18, 0.3),
    0 35px 70px rgba(20, 35, 10, 0.32);
  opacity: 0;
  transform: translateY(16px) scale(0.975);
  transition:
    opacity 0.22s ease,
    transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.05);
  scrollbar-width: thin;
  scrollbar-color: #cdb88f transparent;
}

.modal::-webkit-scrollbar {
  width: 9px;
}

.modal::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #cdb88f;
  background-clip: padding-box;
}

.modal-layer.is-open .modal-backdrop {
  opacity: 1;
  animation: backdrop-arrive 0.22s ease both;
}

.modal-layer.is-open .modal {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: modal-arrive 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.05) both;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid rgba(90, 51, 25, 0.4);
  border-radius: 50%;
  background: #fffdf5;
  color: #82694a;
  transition:
    background 0.12s ease,
    transform 0.12s ease;
}

.modal-close:hover {
  background: #ffefd0;
  transform: rotate(5deg);
}

.modal-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
}

#modalContent > h2 {
  margin: 0 0 7px;
  padding-right: 25px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.modal-kicker {
  margin: 0 0 3px;
  color: #739257;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.modal-lede {
  margin: 0 0 16px;
  color: #786448;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.55;
}

.rule-list {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.rule {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  color: #765e3d;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.48;
}

.rule-num {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  margin-top: 1px;
  border: 2px solid #8fbc6d;
  border-radius: 50%;
  background: #eaf7dc;
  color: #49752d;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
}

.rule b {
  color: #4f3a21;
  font-weight: 900;
}

.score-table {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 4px 0 17px;
}

.score-cell {
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 7px 3px 5px;
  border: 2px solid #d2bb8c;
  border-radius: 10px;
  background: #fffdf6;
  text-align: center;
}

.score-cell b {
  color: #5a411f;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1;
}

.score-cell span {
  color: #977f59;
  font-size: 0.57rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.rule-callout {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 2px 0 18px;
  padding: 10px 12px;
  border: 2px dashed #c4a970;
  border-radius: 12px;
  background: #fff7e2;
  color: #7b633e;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5;
}

.rule-callout svg {
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 17px;
}

.modal-actions .btn {
  min-height: 43px;
  font-size: 0.94rem;
}

.modal-actions .btn-primary {
  min-width: 145px;
}

/* Round summary */

.summary-head {
  margin-bottom: 14px;
}

.summary-head h2 {
  margin: 0 0 4px;
  padding-right: 20px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.summary-head .summary-sub {
  margin: 0;
  color: #7f6b4a;
  font-size: 0.84rem;
  font-weight: 700;
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
}

.summary-stat {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
  padding: 10px 11px 9px;
  border: 2px solid #ddc89d;
  border-radius: 13px;
  background: rgba(255, 253, 246, 0.8);
}

.summary-stat b {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.summary-stat span {
  color: #9a835e;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.summary-stat.is-good b {
  color: #3d7b28;
}

.summary-stat.is-bonus b {
  color: #ad7800;
}

.new-best {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  padding: 5px 10px;
  border: 2px solid #c38d11;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff3b0, #ffd23f);
  box-shadow: 0 3px 0 rgba(197, 138, 26, 0.4);
  color: #664410;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  transform: rotate(-1deg);
}

.finish-modal .new-best {
  display: flex;
  width: max-content;
  margin: 0 auto 12px;
}

.missed-block {
  margin-top: 2px;
}

.missed-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 5px;
}

.missed-title h3 {
  margin: 0;
  color: #6b522f;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.missed-title span {
  color: #9c8662;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.missed-groups {
  max-height: 206px;
  overflow: auto;
  padding: 7px 9px;
  border: 2px dashed #d3bc8f;
  border-radius: 13px;
  background: #fffcf2;
  scrollbar-width: thin;
  scrollbar-color: #cdb88f transparent;
}

.missed-groups::-webkit-scrollbar {
  width: 8px;
}

.missed-groups::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #cdb88f;
  background-clip: padding-box;
}

.missed-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0;
}

.missed-len {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #efe6d1;
  color: #8d7753;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.chip.is-missed {
  border-color: #cebea0;
  background: #f5f0e3;
  color: #77684e;
  font-weight: 700;
}

.missed-more {
  margin: 3px 0 0;
  color: #9a8764;
  font-size: 0.66rem;
  font-weight: 700;
  font-style: italic;
}

.cleared-note {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 2px 0 5px;
  padding: 11px 12px;
  border: 2px solid #a9cd8a;
  border-radius: 13px;
  background: #edf8df;
  color: #4f7037;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.45;
}

.cleared-note svg {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.cleared-note b {
  display: block;
  color: #3e6326;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.15;
}

/* Final run summary */

.finish-hero {
  padding: 7px 0 15px;
  text-align: center;
}

.finish-kicker {
  margin: 0 0 2px;
  color: #76965b;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.finish-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.finish-number {
  margin: 2px 0 2px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 10vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.finish-label {
  margin: 0;
  color: #99815a;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.finish-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 15px;
}

.finish-note {
  margin: 0 0 4px;
  color: #7d6747;
  font-size: 0.83rem;
  font-weight: 600;
  text-align: center;
}

/* Leave-run confirmation */

.confirm-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 3px 0 15px;
  padding: 11px 14px;
  border: 2px dashed #d0b98c;
  border-radius: 13px;
  background: #fffbf0;
}

.confirm-score span {
  color: #8b7550;
  font-size: 0.78rem;
  font-weight: 800;
}

.confirm-score b {
  color: #5a411f;
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.modal-actions .btn-quiet {
  min-width: auto;
}

/* ------------------------------------------------------------
   Confetti
   ------------------------------------------------------------ */

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 130;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -18px;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: 0.95;
  animation: confetti-fall var(--dur, 2.4s) cubic-bezier(0.15, 0.6, 0.35, 1)
    var(--delay, 0s) forwards;
}

/* ------------------------------------------------------------
   Motion
   ------------------------------------------------------------ */

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes backdrop-arrive {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modal-arrive {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes sun-breathe {
  0%,
  100% {
    filter: brightness(1);
    transform: scale(1);
  }
  50% {
    filter: brightness(1.035);
    transform: scale(1.02);
  }
}

@keyframes cloud-drift {
  from {
    transform: translateX(-10px);
  }
  to {
    transform: translateX(18px);
  }
}

@keyframes mascot-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-0.4deg);
  }
  50% {
    transform: translateY(-8px) rotate(0.5deg);
  }
}

@keyframes mascot-bounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  35% {
    transform: translateY(-10px) scale(1.035, 0.98);
  }
  65% {
    transform: translateY(0) scale(0.99, 1.015);
  }
}

@keyframes bang-wiggle {
  0%,
  86%,
  100% {
    transform: rotate(-5deg);
  }
  89% {
    transform: rotate(7deg) scale(1.08);
  }
  92% {
    transform: rotate(-8deg);
  }
  95% {
    transform: rotate(4deg);
  }
}

@keyframes timer-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.67;
  }
}

@keyframes timer-text-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.62;
  }
}

@keyframes score-bump {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.18) rotate(-2deg);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes caret-blink {
  0%,
  48% {
    opacity: 1;
  }
  49%,
  100% {
    opacity: 0;
  }
}

@keyframes tray-tile-in {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tray-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-7px) rotate(-0.4deg);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(3px);
  }
}

@keyframes float-score {
  0% {
    opacity: 0;
    transform: translate(-50%, 12px) scale(0.8);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -4px) scale(1.08);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -56px) scale(1);
  }
}

@keyframes marker-hop {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) rotate(0);
  }
  42% {
    transform: translateX(-50%) translateY(-9px) rotate(-5deg);
  }
  70% {
    transform: translateX(-50%) translateY(-2px) rotate(3deg);
  }
}

@keyframes marker-cheer {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) rotate(0) scale(1);
  }
  50% {
    transform: translateX(-50%) translateY(-9px) rotate(-6deg) scale(1.12);
  }
}

@keyframes tile-shuffle {
  0% {
    opacity: 0.4;
    transform: translateY(7px) rotate(6deg) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(var(--tilt, 0deg)) scale(1);
  }
}

@keyframes chip-pop {
  0% {
    opacity: 0;
    transform: scale(0.65) rotate(-2deg);
  }
  65% {
    opacity: 1;
    transform: scale(1.08) rotate(1deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes speech-pop {
  0% {
    transform: scale(0.96);
  }
  55% {
    transform: scale(1.025);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes confetti-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -4vh, 0) rotate(0);
  }
  8% {
    opacity: 1;
  }
  100% {
    opacity: 0.9;
    transform: translate3d(var(--dx, 0px), 108vh, 0) rotate(var(--rot, 540deg));
  }
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 1060px) {
  .game-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .home-hero {
    grid-template-columns: minmax(0, 1.06fr) minmax(295px, 0.94fr);
    padding: 36px 28px 34px 36px;
  }

  .home-art {
    min-height: 390px;
  }

  .logo {
    font-size: clamp(56px, 9vw, 92px);
  }
}

@media (max-width: 1000px) {
  .game-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
  }

  .game-side {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 13px;
  }
}

@media (max-width: 900px) {
  .home-hero {
    grid-template-columns: 1fr;
    padding: 32px 28px 18px;
    gap: 4px;
  }

  .home-art {
    min-height: 355px;
    margin-top: -2px;
  }

  .home-mascot {
    width: min(275px, 54vw);
    margin-top: 86px;
  }

  .home-bubble {
    top: 10px;
    left: 50%;
    width: min(230px, 70%);
    transform: translateX(-50%) rotate(-1.4deg);
  }

  .home-bubble::after {
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%) rotate(45deg);
  }

  .floating-tiles {
    display: none;
  }

  .garden-badge {
    right: calc(50% - 170px);
    bottom: 10px;
  }

  .home-strip {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .strip-card {
    padding: 12px 14px;
  }

  .strip-card p {
    max-width: 560px;
  }

  .game-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
  }

  .game-side {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 13px;
  }

  .mascot-stage {
    padding-top: 70px;
  }

  .side-mascot {
    width: 158px;
  }

  .tips-card {
    align-self: stretch;
  }

  .found-list {
    max-height: 260px;
  }
}

@media (max-width: 700px) {
  .app {
    padding: 0 14px 16px;
  }

  .topbar {
    padding: 13px 1px 10px;
  }

  .brand-tile {
    width: 37px;
    height: 40px;
    border-radius: 9px;
    font-size: 23px;
  }

  .brand-copy strong {
    font-size: 1.05rem;
  }

  .brand-copy small {
    font-size: 0.53rem;
  }

  .best-pill {
    min-height: 37px;
    padding: 6px 10px;
    font-size: 0.59rem;
  }

  .best-pill b {
    font-size: 0.96rem;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
  }

  .home-screen {
    padding-top: 2px;
  }

  .home-hero {
    padding: 27px 20px 13px;
    border-radius: 27px;
  }

  .home-hero::before {
    inset: 7px;
    border-radius: 21px;
  }

  .logo {
    font-size: clamp(53px, 15.5vw, 78px);
  }

  .hero-desc {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .hero-actions {
    gap: 8px;
  }

  .btn-xl {
    min-height: 52px;
    flex: 1 1 175px;
    padding: 13px 18px;
    font-size: 1.14rem;
  }

  .hero-actions .btn-secondary {
    flex: 0 0 auto;
  }

  .home-art {
    min-height: 320px;
  }

  .home-mascot {
    width: min(245px, 63vw);
    margin-top: 88px;
  }

  .home-bubble {
    font-size: 0.72rem;
    padding: 8px 11px;
  }

  .home-bubble strong {
    font-size: 0.92rem;
  }

  .garden-badge {
    right: 6%;
    bottom: 6%;
    font-size: 0.73rem;
  }

  .game-head {
    grid-template-areas:
      "round score quit"
      "timer timer timer";
    grid-template-columns: 1fr auto auto;
    gap: 8px 12px;
    padding: 9px 12px;
  }

  .timer-block {
    padding-top: 1px;
  }

  .round-badge {
    padding-right: 10px;
  }

  .score-block {
    padding-left: 10px;
  }

  .board-card {
    padding: 14px 13px 10px;
    border-radius: 23px;
  }

  .board-card::before {
    inset: 7px;
    border-radius: 17px;
  }

  .found-counter {
    font-size: 0.57rem;
  }

  .trail-goal {
    display: none;
  }

  .trail-caption {
    font-size: 0.61rem;
  }

  .word-tray {
    min-height: 74px;
    gap: 4px;
    padding: 8px;
    border-radius: 15px;
  }

  .tray-tile {
    width: clamp(35px, 10.5vw, 47px);
    height: clamp(41px, 12vw, 52px);
    font-size: clamp(20px, 6.3vw, 28px);
    border-width: 2.5px;
    border-radius: 9px;
  }

  .rack {
    gap: 4px;
    padding: 7px 7px 9px;
    border-width: 3px;
    border-radius: 15px;
  }

  .tile {
    width: clamp(33px, 9.4vw, 66px);
    border-width: 2.5px;
    border-radius: 9px;
    box-shadow:
      0 5px 0 #c58a1a,
      0 7px 7px rgba(63, 39, 12, 0.18),
      inset 0 2px 0 rgba(255, 255, 255, 0.62);
    font-size: clamp(19px, 5.7vw, 37px);
  }

  .board-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .board-actions .btn {
    padding: 8px 9px;
    font-size: 0.83rem;
  }

  .board-actions .btn-submit {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    min-height: 45px;
    font-size: 0.98rem;
  }

  .key-hint {
    display: none;
  }

  .board-foot {
    margin-top: 9px;
    padding-top: 7px;
  }

  .key-tip {
    display: none;
  }

  .live-message {
    width: 100%;
    margin-left: 0;
    font-size: 0.7rem;
    text-align: left;
  }

  .words-card {
    padding: 12px 13px 10px;
    border-radius: 18px;
  }

  .found-list {
    max-height: 240px;
  }

  .chip {
    font-size: 0.72rem;
  }

  .game-side {
    grid-template-columns: 1fr;
  }

  .mascot-card {
    padding-top: 10px;
  }

  .mascot-stage {
    padding-top: 65px;
  }

  .side-mascot {
    width: 145px;
  }

  .tips-card {
    order: 2;
  }

  .mascot-name {
    margin-top: 0;
  }

  .page-foot {
    font-size: 0.61rem;
    padding-top: 13px;
  }

  .modal-layer {
    padding: 12px;
  }

  .modal {
    max-height: 90vh;
    padding: 21px 18px 17px;
    border-radius: 22px;
  }

  .modal-close {
    top: 9px;
    right: 9px;
  }

  .summary-stats,
  .finish-stats {
    gap: 6px;
  }

  .summary-stat {
    padding: 8px 8px 7px;
  }

  .summary-stat b {
    font-size: 1.22rem;
  }

  .summary-stat span {
    font-size: 0.54rem;
  }

  .score-table {
    gap: 4px;
  }

  .score-cell {
    padding: 6px 1px 5px;
  }

  .score-cell b {
    font-size: 0.94rem;
  }

  .score-cell span {
    font-size: 0.5rem;
  }

  .modal-actions {
    gap: 7px;
  }

  .modal-actions .btn {
    flex: 1 1 130px;
    font-size: 0.89rem;
  }

  .missed-groups {
    max-height: 180px;
  }
}

@media (max-width: 390px) {
  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    font-size: 0.98rem;
  }

  .best-pill {
    padding-inline: 8px;
  }

  .hero-meta {
    gap: 5px 10px;
    font-size: 0.59rem;
  }

  .logo {
    font-size: clamp(48px, 16vw, 66px);
  }

  .home-bubble {
    width: 76%;
  }

  .game-head {
    gap: 7px 8px;
    padding: 8px 10px;
  }

  .round-badge span {
    font-size: 0.98rem;
  }

  .score-block b {
    font-size: 1.25rem;
  }

  .timer-line {
    font-size: 0.95rem;
  }

  .board-label {
    font-size: 0.86rem;
  }

  .found-counter {
    padding: 2px 7px;
    font-size: 0.52rem;
  }

  .tile {
    width: clamp(31px, 9vw, 44px);
  }

  .tray-tile {
    width: 34px;
    height: 40px;
    font-size: 20px;
  }

  .board-actions .btn {
    font-size: 0.77rem;
    padding-inline: 6px;
  }

  .tray-placeholder {
    font-size: 0.85rem;
  }

  .trail {
    height: 32px;
  }

  .trail-marker {
    width: 30px;
    height: 30px;
  }

  .trail-carrot {
    width: 34px;
    height: 34px;
  }

  .modal {
    padding: 19px 15px 15px;
  }
}

@media (max-width: 360px) {
  .board-actions .btn-icon {
    display: none;
  }

  .board-actions .btn {
    padding-inline: 4px;
    font-size: 0.74rem;
  }

  .tile {
    width: clamp(29px, 8.6vw, 44px);
    font-size: clamp(17px, 5.2vw, 24px);
  }

  .tray-tile {
    width: 28px;
    height: 34px;
    font-size: 17px;
  }

  .word-tray {
    gap: 2px;
    padding: 6px;
  }

  .hero-actions .btn-xl,
  .hero-actions .btn-secondary {
    flex-basis: 100%;
  }

  .modal {
    padding: 17px 13px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .sun,
  .cloud,
  .home-mascot {
    animation: none !important;
  }
}
