/* Eight Off board — same green-baize texture as Solitaire/FreeCell (per-game
   texture is allowed, ARCHITECTURE.md §6), scoped under .eo-root. Eight tableau
   columns, EIGHT free cells and four foundations across the top (twelve slots),
   every card face up. The top row is the widest, so it drives the card size and
   the eight columns centre beneath it. Reuses the shared card SVGs. */

.eo-root {
  --felt: #1b6b49; --felt-hi: #2a7f5b; --gold: #d8b65c;
  --line: rgba(253, 252, 247, 0.22);
  --cw: clamp(28px, 7.4vw, 64px);
  --ch: calc(var(--cw) * 1.45);
  --gap: clamp(4px, 1vw, 9px);
  --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) { .eo-root { --felt: #144d36; --felt-hi: #1d6046; } }
.eo-root.mode-dark { --felt: #144d36; --felt-hi: #1d6046; }

/* board width follows the twelve top slots; the tableau centres inside it */
.eo-board { max-width: calc(var(--cw) * 12 + var(--gap) * 11); margin: 0 auto; position: relative; }
.eo-top {
  display: grid; grid-template-columns: repeat(12, var(--cw)); gap: var(--gap);
  justify-content: center;
  margin-bottom: calc(var(--gap) * 1.7);
}
.eo-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);
}
.eo-found { box-shadow: inset 0 0 0 1px rgba(216, 182, 92, 0.18); }
.eo-cols { display: grid; grid-template-columns: repeat(8, var(--cw)); gap: var(--gap); justify-content: center; }
.eo-pile { position: relative; min-height: var(--ch); width: var(--cw); }
.eo-pile > .eo-base { position: absolute; inset: 0 0 auto 0; height: var(--ch); border-radius: var(--r); border: 1.5px solid var(--line); }

.eo-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);
}
.eo-root .cf { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; display: block; object-fit: fill; z-index: 2; }
.eo-root .card.lift { box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.16), 0 14px 28px rgba(0, 0, 0, 0.38); }
.eo-root .card.hint { outline: 3px solid var(--gold); outline-offset: 1px; border-radius: var(--r); z-index: 40; animation: eo-hint 0.6s ease-in-out 2; }
@keyframes eo-hint { 0%, 100% { outline-color: var(--gold); } 50% { outline-color: transparent; } }

.eo-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;
}
.eo-sound:hover { opacity: 1; }
.eo-sound.on { background: rgba(216, 182, 92, 0.22); border-color: rgba(216, 182, 92, 0.5); opacity: 1; }

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

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