: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(4px, 1.5vw, 12px) 24px; max-width: 760px; margin: 0 auto; }
.page__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; 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 10px; 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); }

/* top row: foundations (left) + stock (right) */
.sp-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; min-height: 26px; }
.sp-foundations { display: flex; gap: 4px; }
.sp-found { width: 18px; height: 26px; border-radius: 4px; border: 1.5px solid var(--slot); }
.sp-found.done { background: var(--accent); border-color: transparent; }
.sp-stock { display: flex; align-items: center; }
.sp-stock.sp-live { cursor: pointer; }
.sp-info { font-size: 12px; color: var(--dim); }

/* tableau: 10 columns */
.sp-tableau { display: flex; justify-content: center; gap: 3px; align-items: flex-start; }
.sp-col { display: flex; flex-direction: column; align-items: center; min-height: 20px; }
.sp-slot { border: 1.5px dashed var(--slot); border-radius: 6px; }

.sp-grab { cursor: grab; touch-action: none; }
.sp-dragging { cursor: grabbing; position: relative; z-index: 100; box-shadow: 0 8px 22px rgba(0,0,0,0.5); }
.sp-target { outline: 2px solid var(--accent); outline-offset: -1px; border-radius: 7px; }
.sp-hint { box-shadow: 0 0 0 3px var(--accent); position: relative; z-index: 40; animation: spPulse 0.85s ease-in-out 2; }
.sp-hint-target { outline: 2px dashed var(--accent); outline-offset: 1px; border-radius: 7px; }
@keyframes spPulse { 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.45); } }

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