/* Chinese Checkers — Cozy Alpaca Studio (dedicated star board; no Board Template) */
:root {
  --cream: #f7f1e8;
  --ink: #3d3429;
  --soft: #8b7355;
  --accent: #c4785a;
  --panel: #fffaf3;
  --shadow: rgba(61, 52, 41, 0.15);
  --wood: #c9a66b;
  --wood-dark: #a67c42;
  --hole: #5c4030;
  --step: #e8c547;
  --hop: #5aabb8;
  --selected: #c4785a;
  --peg-white: #f5f2ea;
  --peg-red: #c45c5c;
  --peg-black: #2e2a28;
  --peg-blue: #4a7ab5;
  --peg-green: #5a9a6a;
  --peg-yellow: #e0c04a;
}

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

body {
  flex-direction: column;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(160deg, #f0e6d6 0%, #e4d5c0 50%, #d9cbb8 100%);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  padding: 0 0 2rem;
}

.app { width: 100%; max-width: 640px; align-self: center; margin-top: 1.25rem; padding: 0 1rem; }

.header { text-align: center; margin-bottom: 0.75rem; position: relative; }
.header h1 {
  font-weight: 600;
  font-size: 1.75rem;
  letter-spacing: 0.02em;
}
.tagline { font-size: 0.85rem; color: var(--soft); margin-top: 0.15rem; }

.is-hidden { display: none !important; }

.setup, .play-ui {
  background: var(--panel);
  border-radius: 12px;
  padding: 1.1rem 1rem 1.2rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 8px var(--shadow);
}

.setup { text-align: center; }
.setup-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.35rem; }
.setup-note { font-size: 0.85rem; color: var(--soft); margin-bottom: 0.9rem; line-height: 1.4; }

.side-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.btn {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px var(--shadow);
  transition: transform 0.1s, filter 0.1s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(0.98); }
.btn.secondary {
  background: #e8ddd0;
  color: var(--ink);
}
.btn.side-btn { min-width: 9.5rem; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
}
.status {
  flex: 1 1 12rem;
  font-size: 0.95rem;
  font-weight: 600;
  min-height: 1.4em;
}

#board-host {
  display: flex;
  justify-content: center;
  overflow: visible;
  padding: 0.25rem 0 0.5rem;
}

.cc-board {
  position: relative;
  margin: 0 auto;
  flex-shrink: 0;
}

.cc-wood {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background-color: #3a2416;
  background-image: url("../assets/board/walnut.png");
  background-size: cover;
  background-position: center;
  box-shadow:
    inset 0 0 0 3px rgba(20, 12, 8, 0.45),
    0 6px 18px var(--shadow);
  z-index: 0;
}
.cc-inlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-color: #f3ece0;
  background-image: url("../assets/board/ivory.png");
  background-size: cover;
  background-position: center;
  filter:
    drop-shadow(0 0 0 1.5px #c4a35a)
    drop-shadow(0 0 0 3px rgba(90, 60, 28, 0.55));
}
.cc-garnet {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(20, 10, 8, 0.55));
}

.cc-hole {
  position: absolute;
  z-index: 3;
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #6b4a38 0%, var(--hole) 70%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cc-hole:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* selected / hl-step / hl-hop moved to S5 section (after camps) */
/* S2 — six home camps visually distinct; mid-board stays neutral wood holes */
.cc-hole.camp-white { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(245, 242, 234, 0.55); }
.cc-hole.camp-red { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(196, 92, 92, 0.45); }
.cc-hole.camp-black { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(80, 72, 68, 0.5); }
.cc-hole.camp-blue { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(74, 122, 181, 0.45); }
.cc-hole.camp-green { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(90, 154, 106, 0.45); }
.cc-hole.camp-yellow { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), inset 0 0 0 2px rgba(224, 192, 74, 0.5); }
.cc-hole.mid-board { /* empty mid-board — no camp ring */ }

.cc-hole.camp-white::before,
.cc-hole.camp-red::before,
.cc-hole.camp-black::before,
.cc-hole.camp-blue::before,
.cc-hole.camp-green::before,
.cc-hole.camp-yellow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
}
.cc-hole.camp-white::before { background: radial-gradient(circle, #f5f2ea 0%, transparent 70%); }
.cc-hole.camp-red::before { background: radial-gradient(circle, #c45c5c 0%, transparent 70%); }
.cc-hole.camp-black::before { background: radial-gradient(circle, #5a5450 0%, transparent 70%); }
.cc-hole.camp-blue::before { background: radial-gradient(circle, #4a7ab5 0%, transparent 70%); }
.cc-hole.camp-green::before { background: radial-gradient(circle, #5a9a6a 0%, transparent 70%); }
.cc-hole.camp-yellow::before { background: radial-gradient(circle, #e0c04a 0%, transparent 70%); }

.cc-hole.goal-tint::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: rgba(74, 122, 181, 0.12);
  pointer-events: none;
  z-index: 0;
}

.cc-peg {
  position: relative;
  z-index: 2;
  width: 78%;
  height: 78%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.cc-peg.has-sprite img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.cc-peg.has-sprite.home-hint-peg img,
.cc-peg.home-hint-peg.has-sprite img {
  filter:
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35))
    drop-shadow(0 0 6px rgba(196, 120, 90, 0.55));
}
.cc-peg-ball {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow:
    inset 0 -2px 3px rgba(0, 0, 0, 0.25),
    inset 0 2px 3px rgba(255, 255, 255, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.2);
}

.peg-white .cc-peg-ball { background: radial-gradient(circle at 35% 30%, #fff, var(--peg-white) 55%, #d8d0c4); }
.peg-red .cc-peg-ball { background: radial-gradient(circle at 35% 30%, #e88888, var(--peg-red) 55%, #8a3030); }
.peg-black .cc-peg-ball { background: radial-gradient(circle at 35% 30%, #5a5450, var(--peg-black) 55%, #1a1614); }
.peg-blue .cc-peg-ball { background: radial-gradient(circle at 35% 30%, #7a9ecc, var(--peg-blue) 55%, #2a4a70); }
.peg-green .cc-peg-ball { background: radial-gradient(circle at 35% 30%, #8cbc98, var(--peg-green) 55%, #2e5a3a); }
.peg-yellow .cc-peg-ball { background: radial-gradient(circle at 35% 30%, #f0d878, var(--peg-yellow) 55%, #a08820); }

.hint {
  font-size: 0.8rem;
  color: var(--soft);
  text-align: center;
  margin-top: 0.35rem;
  line-height: 1.35;
  min-height: 2.4em;
}

/* S3 — brief illegal-move feedback */
.hint.illegal {
  color: #a04840;
  font-weight: 600;
  animation: cc-illegal-flash 0.35s ease-in-out 2;
}
@keyframes cc-illegal-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.legend {
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--soft);
  margin-top: 0.4rem;
}
.legend span::before {
  content: "";
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  margin-right: 0.3rem;
  vertical-align: -0.05rem;
}
.legend .lg-step::before { background: var(--step); }
.legend .lg-hop::before { background: var(--hop); }

@media (max-width: 520px) {
  .app { max-width: 100%; }
  .cc-board {
    transform-origin: top center;
  }
}

/* S4 — win banner + frozen board */
.win-banner {
  text-align: center;
  padding: 0.85rem 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #f3e6c8 0%, #e8d4a8 50%, #dfc690 100%);
  border: 2px solid rgba(196, 120, 90, 0.55);
  box-shadow: 0 2px 10px var(--shadow);
}
.win-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
}
.win-sub {
  font-size: 0.85rem;
  color: var(--soft);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}
.play-ui.is-game-over .cc-board {
  opacity: 0.92;
  filter: saturate(0.92);
}
.play-ui.is-game-over .cc-hole {
  cursor: default;
}
.play-ui.is-game-over .cc-hole.selected,
.play-ui.is-game-over .cc-hole.hl-step,
.play-ui.is-game-over .cc-hole.hl-hop {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45);
}

/* S4 — clearer target-camp highlight for current human */
.cc-hole.goal-tint::after {
  inset: 12%;
  background: rgba(74, 122, 181, 0.18);
  box-shadow: 0 0 0 1.5px rgba(74, 122, 181, 0.35);
}
.status.is-win {
  color: var(--accent);
  font-size: 1.05rem;
}

.legend .lg-goal::before {
  background: rgba(74, 122, 181, 0.55);
  box-shadow: inset 0 0 0 1px rgba(74, 122, 181, 0.8);
}

/* ——— S5 UX polish ——— */

/* Legal highlights AFTER camp wash so gold/teal rings beat camp box-shadow on goal holes.
   Also mute goal-tint wash slightly when a highlight is active so the ring reads clearly. */
.cc-hole.selected {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px var(--selected);
  z-index: 4;
}
.cc-hole.hl-step {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px var(--step);
  z-index: 4;
}
.cc-hole.hl-hop {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px var(--hop);
  z-index: 4;
}
.cc-hole.hl-step.hl-hop {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px var(--hop);
  z-index: 4;
}
.cc-hole.hl-step.goal-tint::after,
.cc-hole.hl-hop.goal-tint::after,
.cc-hole.selected.goal-tint::after {
  opacity: 0.4;
}

/* Chess-style last-move teaching cue (S8): dark start → mid landings → sky end; full path */
.cc-hole.last-from {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(40, 75, 130, 0.85);
  background: radial-gradient(circle at 40% 35%, rgba(45, 80, 130, 0.72) 0%, rgba(30, 60, 110, 0.55) 70%);
  z-index: 3;
}
.cc-hole.last-mid {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(70, 140, 195, 0.82);
  background: radial-gradient(circle at 40% 35%, rgba(90, 160, 210, 0.68) 0%, rgba(55, 115, 170, 0.5) 70%);
  z-index: 3;
}
.cc-hole.last-to {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(110, 190, 235, 0.92);
  background: radial-gradient(circle at 40% 35%, rgba(150, 215, 245, 0.75) 0%, rgba(110, 190, 235, 0.5) 70%);
  z-index: 3;
}
/* Selected / legal highlights beat last-move blues when overlapping */
.cc-hole.last-from.selected,
.cc-hole.last-mid.selected,
.cc-hole.last-to.selected {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px var(--selected);
  z-index: 4;
}
.cc-hole.last-from.hl-step,
.cc-hole.last-mid.hl-step,
.cc-hole.last-to.hl-step {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px var(--step);
  z-index: 4;
}
.cc-hole.last-from.hl-hop,
.cc-hole.last-mid.hl-hop,
.cc-hole.last-to.hl-hop,
.cc-hole.last-from.hl-step.hl-hop,
.cc-hole.last-mid.hl-step.hl-hop,
.cc-hole.last-to.hl-step.hl-hop {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px var(--hop);
  z-index: 4;
}
.cc-hole.last-from.goal-tint::after,
.cc-hole.last-mid.goal-tint::after,
.cc-hole.last-to.goal-tint::after {
  opacity: 0.35;
}

.legend .lg-last::before {
  background: linear-gradient(
    90deg,
    rgba(40, 75, 130, 0.9) 0%,
    rgba(40, 75, 130, 0.9) 28%,
    rgba(70, 140, 195, 0.88) 28%,
    rgba(70, 140, 195, 0.88) 58%,
    rgba(110, 190, 235, 0.95) 58%,
    rgba(110, 190, 235, 0.95) 100%
  );
}

/* ——— S6 players + CPUs ——— */

.setup-subtitle {
  font-size: 1rem;
  font-weight: 600;
  margin: 1rem 0 0.35rem;
}
.setup-note-tight { margin-bottom: 0.65rem; }
.seat-summary {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--soft);
  margin-top: 0.25rem;
  line-height: 1.35;
}
.color-step { margin-top: 0.25rem; }
.back-btn { margin-top: 0.85rem; }

.btn.peg-tone-white { background: #a89f90; color: #fff; }
.btn.peg-tone-red { background: var(--peg-red); }
.btn.peg-tone-black { background: var(--peg-black); }
.btn.peg-tone-blue { background: var(--peg-blue); }
.btn.peg-tone-green { background: var(--peg-green); }
.btn.peg-tone-yellow { background: #c4a82e; color: #2a2410; }

/* Static blocker pegs — dimmed landmarks */
.cc-peg.peg-blocker {
  opacity: 0.72;
  filter: saturate(0.85);
}
.cc-peg.peg-blocker .cc-peg-ball {
  box-shadow:
    inset 0 -2px 3px rgba(0, 0, 0, 0.3),
    inset 0 2px 3px rgba(255, 255, 255, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.25);
}

.legend .lg-block::before {
  background: #9a8b78;
  box-shadow: inset 0 0 0 1px rgba(80, 70, 55, 0.5);
  opacity: 0.75;
}

/* Human home start-hint: soft color glow on home pegs */
.cc-hole.home-hint {
  z-index: 3;
}
.cc-peg.home-hint-peg .cc-peg-ball {
  box-shadow:
    inset 0 -2px 3px rgba(0, 0, 0, 0.25),
    inset 0 2px 3px rgba(255, 255, 255, 0.35),
    0 0 0 3px rgba(196, 120, 90, 0.45),
    0 0 10px rgba(196, 120, 90, 0.35);
}
.peg-white.home-hint-peg .cc-peg-ball {
  box-shadow:
    inset 0 -2px 3px rgba(0, 0, 0, 0.25),
    inset 0 2px 3px rgba(255, 255, 255, 0.35),
    0 0 0 3px rgba(245, 242, 234, 0.85),
    0 0 12px rgba(245, 242, 234, 0.55);
}
.peg-red.home-hint-peg .cc-peg-ball {
  box-shadow:
    inset 0 -2px 3px rgba(0, 0, 0, 0.25),
    inset 0 2px 3px rgba(255, 255, 255, 0.35),
    0 0 0 3px rgba(196, 92, 92, 0.7),
    0 0 12px rgba(196, 92, 92, 0.45);
}
.peg-black.home-hint-peg .cc-peg-ball {
  box-shadow:
    inset 0 -2px 3px rgba(0, 0, 0, 0.25),
    inset 0 2px 3px rgba(255, 255, 255, 0.35),
    0 0 0 3px rgba(80, 72, 68, 0.75),
    0 0 12px rgba(80, 72, 68, 0.45);
}
.peg-blue.home-hint-peg .cc-peg-ball {
  box-shadow:
    inset 0 -2px 3px rgba(0, 0, 0, 0.25),
    inset 0 2px 3px rgba(255, 255, 255, 0.35),
    0 0 0 3px rgba(74, 122, 181, 0.75),
    0 0 12px rgba(74, 122, 181, 0.45);
}
.peg-green.home-hint-peg .cc-peg-ball {
  box-shadow:
    inset 0 -2px 3px rgba(0, 0, 0, 0.25),
    inset 0 2px 3px rgba(255, 255, 255, 0.35),
    0 0 0 3px rgba(90, 154, 106, 0.75),
    0 0 12px rgba(90, 154, 106, 0.45);
}
.peg-yellow.home-hint-peg .cc-peg-ball {
  box-shadow:
    inset 0 -2px 3px rgba(0, 0, 0, 0.25),
    inset 0 2px 3px rgba(255, 255, 255, 0.35),
    0 0 0 3px rgba(224, 192, 74, 0.8),
    0 0 12px rgba(224, 192, 74, 0.5);
}

/* After 5s: gentle flash twice, then JS clears classes */
.cc-hole.home-hint-flash .cc-peg.home-hint-flash-peg .cc-peg-ball,
.cc-peg.home-hint-flash-peg .cc-peg-ball,
.cc-peg.home-hint-flash-peg.has-sprite img {
  animation: cc-home-flash 0.5s ease-in-out 2;
}
@keyframes cc-home-flash {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.35); transform: scale(1.08); }
}


/* ——— S7 color-pick / idle hint rings / multi-finish ——— */

.standings {
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--ink);
  background: rgba(255, 250, 243, 0.65);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  margin: 0.5rem auto 0.75rem;
  text-align: left;
  white-space: pre-wrap;
  line-height: 1.45;
  max-width: 22rem;
  border: 1px solid rgba(196, 120, 90, 0.25);
}
.standings-live {
  margin: 0 0 0.55rem;
  background: rgba(255, 250, 243, 0.9);
}

.legend .lg-finished::before {
  background: transparent;
  box-shadow: 0 0 0 2px rgba(196, 120, 90, 0.55);
  opacity: 0.85;
}

/* Washed-out rings in human color around all ten home marbles (idle hint) */
.cc-hole.home-hint-ring {
  z-index: 3;
}
.cc-hole.home-hint-ring-white {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(245, 242, 234, 0.55);
}
.cc-hole.home-hint-ring-red {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(196, 92, 92, 0.4);
}
.cc-hole.home-hint-ring-black {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(80, 72, 68, 0.4);
}
.cc-hole.home-hint-ring-blue {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(74, 122, 181, 0.4);
}
.cc-hole.home-hint-ring-green {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(90, 154, 106, 0.4);
}
.cc-hole.home-hint-ring-yellow {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(224, 192, 74, 0.45);
}

/* Finished-team washed color rings on their marbles' holes */
.cc-hole.finished-ring {
  z-index: 2;
}
.cc-hole.finished-ring-white {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 2.5px rgba(245, 242, 234, 0.5);
}
.cc-hole.finished-ring-red {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 2.5px rgba(196, 92, 92, 0.38);
}
.cc-hole.finished-ring-black {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 2.5px rgba(80, 72, 68, 0.4);
}
.cc-hole.finished-ring-blue {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 2.5px rgba(74, 122, 181, 0.38);
}
.cc-hole.finished-ring-green {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 2.5px rgba(90, 154, 106, 0.38);
}
.cc-hole.finished-ring-yellow {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 2.5px rgba(224, 192, 74, 0.42);
}
.cc-peg.peg-finished {
  opacity: 0.88;
  filter: saturate(0.75);
}

/* Legal / selected still beat finished + home rings */
.cc-hole.finished-ring.selected,
.cc-hole.home-hint-ring.selected {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px var(--selected);
  z-index: 4;
}
.cc-hole.finished-ring.hl-step,
.cc-hole.home-hint-ring.hl-step {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px var(--step);
  z-index: 4;
}
.cc-hole.finished-ring.hl-hop,
.cc-hole.home-hint-ring.hl-hop,
.cc-hole.finished-ring.hl-step.hl-hop,
.cc-hole.home-hint-ring.hl-step.hl-hop {
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 0 0 3px var(--hop);
  z-index: 4;
}


/* —— Mute + Stats (board-game branding; place-focused) —— */
.mute-btn {
  position: absolute;
  top: 0;
  right: 0;
  appearance: none;
  border: none;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px var(--shadow);
  z-index: 2;
  min-width: 3.6rem;
}
.mute-btn:hover { filter: brightness(1.03); }
.mute-btn.is-muted {
  background: #e8dcc8;
  color: var(--soft);
  box-shadow: inset 0 0 0 1px rgba(61, 52, 41, 0.12);
}

.stats-btn {
  position: absolute;
  top: 0;
  left: 0;
  appearance: none;
  border: none;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px var(--shadow);
  z-index: 2;
  min-width: 3.6rem;
}
.stats-btn:hover { filter: brightness(1.03); }
.stats-btn.is-open {
  background: #e8dcc8;
  box-shadow: inset 0 0 0 1px rgba(61, 52, 41, 0.12);
}

.stats-panel {
  background: var(--panel);
  border-radius: 12px;
  padding: 0.85rem 0.95rem 0.95rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 8px var(--shadow);
}
.stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.stats-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.stats-close {
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
}
.stats-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}
.stats-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  background: #f0e6d6;
  border-radius: 8px;
  padding: 0.28rem 0.55rem;
  font-size: 0.8rem;
  box-shadow: inset 0 0 0 1px rgba(61, 52, 41, 0.06);
}
.stats-k {
  color: var(--soft);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.stats-v {
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stats-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 0.35rem;
}
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.stats-table th,
.stats-table td {
  text-align: right;
  padding: 0.28rem 0.4rem;
  border-bottom: 1px solid rgba(61, 52, 41, 0.08);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stats-table thead th {
  color: var(--soft);
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.stats-table tbody th {
  text-align: left;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0;
}
.stats-table thead th:first-child {
  text-align: left;
}
.stats-note {
  font-size: 0.72rem;
  color: var(--soft);
  line-height: 1.35;
  margin-top: 0.25rem;
}

/* Studio bar — match First Fleece / Meadow Takeover */
#studio-bar {
  position: relative;
  z-index: 20;
  align-self: stretch;
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: #1c2619;
  color: #c9d4b8;
  font-family: Nunito, system-ui, sans-serif;
  font-size: 0.92rem;
  box-sizing: border-box;
  margin: 0;
}
#studio-bar a {
  color: #f7efe3;
  font-weight: 700;
  text-decoration: none;
  margin-right: 0.45rem;
}
#studio-bar a:hover { text-decoration: underline; }
