/* The playable board — styled after the in-game frame: gold rim, navy tiles. */
.play { position: relative; padding: 110px 0 120px; background: linear-gradient(180deg, #8ed46a 0%, #5cb83f 100%); overflow: hidden; }
.play::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background: url(/assets/img/orchard.webp) center 40% / cover no-repeat;
  mask: linear-gradient(180deg, #000, transparent 85%); -webkit-mask: linear-gradient(180deg, #000, transparent 85%);
}
.play::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 70% 50%, rgba(255, 246, 200, .55), transparent 70%); pointer-events: none; }
.play-grid { position: relative; z-index: 1; display: grid; gap: 40px; align-items: center; }
@media (min-width: 980px) { .play-grid { grid-template-columns: .9fr 1.1fr; gap: 56px; } }
.play-copy { background: rgba(255, 246, 220, .92); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-lg); border: 4px solid #fff; }
.play-copy p:not(.eyebrow) { font-size: 1.08rem; color: var(--ink-soft); }
.goal-legend { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.goal-legend li { display: flex; align-items: center; gap: 12px; font-weight: 900; }
.goal-legend img { width: 40px; }

.board-shell {
  --n: 7; --size: min(92vw, 540px);
  position: relative; justify-self: center; width: var(--size);
  padding: 12px; border-radius: 30px;
  background: linear-gradient(180deg, #ffe48a, #f5b10f 60%, #d98a00);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .7), inset 0 -6px 0 #b86f00, 0 40px 60px -25px rgba(40, 20, 0, .6), 0 0 0 4px #fff3c4;
}
.board-hud { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin-bottom: 10px; }
.hud-buzz { width: 62px; height: 62px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fff7d0, #ffd34d); border: 4px solid #fff; box-shadow: 0 4px 0 #c47f00; display: grid; place-items: center; overflow: hidden; }
.hud-buzz img { width: 78%; transform: translateY(4px); }
.hud-goals, .hud-moves { background: var(--cream); border-radius: 18px; padding: 6px 14px; box-shadow: inset 0 -3px 0 #e8cf8a; display: flex; align-items: center; gap: 12px; min-height: 56px; }
.hud-label { font-weight: 900; color: var(--ribbon); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.goal { position: relative; display: inline-flex; align-items: center; }
.goal img { width: 36px; transition: transform .3s var(--ease-spring); }
.goal b { position: absolute; right: -10px; bottom: -6px; min-width: 24px; padding: 0 5px; border-radius: 999px; background: var(--wood); color: #fff; font-size: .78rem; text-align: center; line-height: 20px; }
.goal.bump img { transform: scale(1.35); }
.goal.done b { background: var(--leaf); }
.goal.done b::after { content: " ✓"; }
.hud-moves { flex-direction: column; gap: 0; padding: 4px 14px; }
.hud-moves b { font-family: Coiny, sans-serif; font-weight: 400; font-size: 1.7rem; line-height: 1; color: var(--ribbon-dark); }
.hud-moves.low b { color: #e0303a; animation: shake .5s; }

.board {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 18px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  background: #1e3364;
  background-image: linear-gradient(45deg, rgba(255, 255, 255, .05) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .05) 75%), linear-gradient(45deg, rgba(255, 255, 255, .05) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .05) 75%);
  background-size: calc(200% / var(--n)) calc(200% / var(--n));
  background-position: 0 0, calc(100% / var(--n)) calc(100% / var(--n));
  box-shadow: inset 0 4px 14px rgba(0, 0, 0, .45);
}
.pc {
  position: absolute; left: 0; top: 0; width: calc(100% / var(--n)); height: calc(100% / var(--n));
  display: grid; place-items: center; cursor: grab; will-change: transform;
  transform: translate(calc(var(--x) * 100%), calc(var(--y) * 100%));
  transition: transform var(--dur, .22s) var(--ease, cubic-bezier(.3, 0, .3, 1));
}
.pc img { width: 84%; height: 84%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .35)); transition: transform .2s var(--ease-spring), opacity .2s; }
.pc.sel img { transform: scale(1.18); filter: drop-shadow(0 0 10px #fff6a0) drop-shadow(0 3px 2px rgba(0, 0, 0, .35)); }
.pc.hint img { animation: hint 1s ease-in-out infinite; }
.pc.pop img { transform: scale(0) rotate(40deg); opacity: 0; transition: transform .28s cubic-bezier(.5, -0.5, .7, 1), opacity .28s; }
.pc.born img { animation: born .45s var(--ease-spring); }
.pc.is-special img { animation: special-glow 1.6s ease-in-out infinite; }
.pc.land img { animation: land .3s ease-out; }
@keyframes hint { 50% { transform: scale(1.15) rotate(-6deg); } }
@keyframes born { from { transform: scale(2.2); opacity: 0; } }
@keyframes land { 40% { transform: scale(1.1, .86) translateY(6%); } }
@keyframes special-glow { 50% { filter: drop-shadow(0 0 12px #fff3a0) drop-shadow(0 3px 2px rgba(0, 0, 0, .35)); } }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.board.shake { animation: shake .35s; }

.board-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; border-radius: 30px; }
.board-callout {
  position: absolute; left: 50%; top: 52%; translate: -50% -50%; pointer-events: none; white-space: nowrap;
  font: 400 clamp(2rem, 7vw, 3.4rem)/1 Coiny, sans-serif; color: #fff; -webkit-text-stroke: .14em #b3420a; paint-order: stroke fill;
  text-shadow: 0 .08em 0 #6b2205; opacity: 0;
}
.board-callout.show { animation: callout 1.1s var(--ease-out); }
@keyframes callout { 0% { opacity: 0; transform: scale(.3) rotate(-8deg); } 25% { opacity: 1; transform: scale(1.12) rotate(2deg); } 40% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-40px); } }

.board-end {
  position: absolute; inset: 0; border-radius: 30px; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 20px; text-align: center;
  background: radial-gradient(circle at 50% 35%, rgba(255, 240, 180, .97), rgba(255, 196, 40, .96));
  animation: end-in .6s var(--ease-spring);
}
.board-end[hidden] { display: none; }
.board-end img { width: min(200px, 44%); animation: hover 3s ease-in-out infinite; }
.board-end h3 { font-size: clamp(2rem, 6vw, 2.8rem); }
.board-end p { max-width: 34ch; font-weight: 800; color: var(--wood); }
@keyframes end-in { from { opacity: 0; transform: scale(.85); } }
