:root { --felt: #35654d; --dim: rgba(255,255,255,0.6); --accent: #ffd166; --slot: rgba(255,255,255,0.18); color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; background: var(--felt); color: #fff; font: 15px/1.4 system-ui, -apple-system, sans-serif; -webkit-text-size-adjust: 100%; }
.page { padding: 8px clamp(6px, 2vw, 14px) 24px; max-width: 720px; margin: 0 auto; }
.page__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
.page__head h1 { font-size: 17px; margin: 0; }

.k-controls { display: flex; gap: 6px; align-items: center; }
.k-controls button { font: inherit; font-size: 13px; padding: 5px 11px; border-radius: 8px; cursor: pointer; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); color: #fff; }
.k-controls button.primary { background: var(--accent); color: #1a1a1a; border-color: transparent; font-weight: 700; }
.k-controls .gear { font-size: 16px; padding: 4px 9px; line-height: 1; }
.k-controls button:active { transform: translateY(1px); }

/* pyramid board — cards are absolutely positioned by the UI */
.pyr-board { position: relative; margin: 4px auto 0; }
.pyr-board .card { transition: box-shadow 120ms ease, filter 120ms ease; }
.pyr-live { cursor: pointer; }
.pyr-covered { filter: brightness(0.72) saturate(0.9); }        /* de-emphasize cards you can't play yet */
.pyr-board .pyr-live:hover { filter: brightness(1.05); }
.pyr-sel { box-shadow: 0 0 0 3px var(--accent), 0 4px 14px rgba(0,0,0,0.45); }
.pyr-hint { animation: pyrPulse 0.85s ease-in-out 2; }
@keyframes pyrPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,209,102,0); } 50% { box-shadow: 0 0 0 6px rgba(255,209,102,0.5); } }

/* stock + waste */
.pyr-stockwaste { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.pyr-pile { position: relative; }
.pyr-stock.pyr-live { cursor: pointer; }
.pyr-slot { display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--slot); border-radius: 8px; font-size: 20px; color: var(--slot); }
.pyr-info { font-size: 12px; color: var(--dim); margin-left: auto; }

.pyr-win { text-align: center; font-size: 20px; font-weight: 800; color: var(--accent); margin-top: 18px; }
.pyr-nomoves { animation: pyrShake 0.42s ease; }
@keyframes pyrShake { 20% { transform: translateX(-4px); } 60% { transform: translateX(4px); } 100% { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .pyr-hint, .pyr-nomoves { animation: none; } }
