/* Baker's Game board — same green-baize texture as FreeCell/Solitaire (per-game
   texture is allowed, ARCHITECTURE.md §6), scoped under .bk-root. Eight columns,
   four free cells and four foundations across the top. Reuses the shared card
   SVGs. Identical layout to FreeCell; only the stacking rule differs (same suit). */

.bk-root {
  --felt: #1b6b49; --felt-hi: #2a7f5b; --gold: #d8b65c;
  --line: rgba(253, 252, 247, 0.22);
  --cw: clamp(30px, 11vw, 76px);
  --ch: calc(var(--cw) * 1.45);
  --gap: clamp(4px, 1.2vw, 10px);
  --r: calc(var(--cw) * 0.041);
  position: relative;
  padding: clamp(12px, 3vw, 26px) clamp(6px, 2vw, 18px);
  border-radius: var(--radius-md);
  background: var(--felt);
  background-image: radial-gradient(ellipse 80% 70% at 50% 24%, var(--felt-hi), var(--felt) 74%);
  color: #eaf3ed; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(20, 17, 14, 0.25), var(--shadow-sm);
}
@media (prefers-color-scheme: dark) { .bk-root { --felt: #144d36; --felt-hi: #1d6046; } }
.bk-root.mode-dark { --felt: #144d36; --felt-hi: #1d6046; }

.bk-board { max-width: calc(var(--cw) * 8 + var(--gap) * 7); margin: 0 auto; position: relative; }
.bk-top {
  display: grid; grid-template-columns: repeat(8, var(--cw)); gap: var(--gap);
  margin-bottom: calc(var(--gap) * 1.7);
}
.bk-slot {
  width: var(--cw); height: var(--ch); border-radius: var(--r); border: 1.5px solid var(--line);
  position: relative; display: grid; place-items: center;
  color: rgba(253, 252, 247, 0.24); font-size: calc(var(--cw) * 0.44);
}
.bk-found { box-shadow: inset 0 0 0 1px rgba(216, 182, 92, 0.18); }
.bk-cols { display: grid; grid-template-columns: repeat(8, var(--cw)); gap: var(--gap); }
.bk-pile { position: relative; min-height: var(--ch); width: var(--cw); }
.bk-pile > .bk-base { position: absolute; inset: 0 0 auto 0; height: var(--ch); border-radius: var(--r); border: 1.5px solid var(--line); }

.bk-root .card {
  position: absolute; left: 0; width: var(--cw); height: var(--ch); border-radius: var(--r);
  user-select: none; touch-action: none;
  box-shadow: 0 -1px 0 rgba(20, 17, 14, 0.16), 0 -4px 7px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.12);
  transition: top 0.17s cubic-bezier(0.2, 0.7, 0.3, 1), left 0.17s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.bk-root .cf { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; object-fit: fill; z-index: 2; }
.bk-root .card.lift { box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.16), 0 14px 28px rgba(0, 0, 0, 0.38); }
.bk-root .card.hint { outline: 3px solid var(--gold); outline-offset: 1px; border-radius: var(--r); z-index: 40; animation: bk-hint 0.6s ease-in-out 2; }
@keyframes bk-hint { 0%, 100% { outline-color: var(--gold); } 50% { outline-color: transparent; } }

.bk-sound {
  position: absolute; inset-block-start: 6px; inset-inline-end: 6px; z-index: 55;
  inline-size: 30px; block-size: 30px; border-radius: 50%; padding: 0;
  border: 1px solid rgba(253, 252, 247, 0.22); background: rgba(0, 0, 0, 0.18);
  color: #eaf3ed; font-size: 15px; line-height: 1; cursor: pointer;
  display: grid; place-items: center; opacity: 0.65;
}
.bk-sound:hover { opacity: 1; }
.bk-sound.on { background: rgba(216, 182, 92, 0.22); border-color: rgba(216, 182, 92, 0.5); opacity: 1; }

.bk-drag { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 50; }
.bk-drag .card { transition: none; }
.bk-win { position: absolute; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }

@media (prefers-reduced-motion: reduce) { .bk-root .card { transition: none; } .bk-root .card.hint { animation: none; } }
.bk-root.no-motion .card { transition: none; }
