.sol { --cw: 72px; --ch: 100px; --ov: 26px; --gap: 8px; max-width: 840px; margin: 0 auto; padding: 8px 6px 14px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.sol-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.sol-stats { display: flex; gap: 16px; font-size: 13px; color: #8aa3c4; font-variant-numeric: tabular-nums; }
.sol-stats b { color: #fff; margin-left: 4px; }
.sol-tools { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #8aa3c4; flex-wrap: wrap; }
.sol-btn { background: #0b1328; color: #dfe9ff; border: 1px solid #1c2b4a; border-radius: 8px; padding: 7px 13px; font-weight: 700; font-size: 13px; cursor: pointer; transition: border-color .15s, background-color .15s, opacity .15s, transform .1s; }
.sol-btn:hover:not(:disabled) { border-color: #55d6ff; }
.sol-btn:active:not(:disabled) { transform: scale(0.97); }
.sol-btn:disabled { opacity: 0.4; cursor: default; }
.sol-btn-primary { background: #ffd166; color: #1a1200; border-color: #ffd166; }
.sol-btn-primary:hover:not(:disabled) { background: #ffe08a; border-color: #ffe08a; }
/* segmented control for the draw mode */
.sol-seg { display: inline-flex; background: #0b1328; border: 1px solid #1c2b4a; border-radius: 8px; padding: 2px; }
.sol-seg label { position: relative; cursor: pointer; }
.sol-seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.sol-seg span { display: block; padding: 5px 10px; border-radius: 6px; font-weight: 600; font-size: 12.5px; color: #8aa3c4; transition: background-color .15s, color .15s; }
.sol-seg input:checked + span { background: #1c2b4a; color: #fff; }
.sol-seg input:focus-visible + span { outline: 2px solid #55d6ff; outline-offset: 1px; }
.sol-table { position: relative; background: radial-gradient(ellipse at 50% 30%, #1a4a63, #0c2a40 70%); border: 1px solid #2d5f7a; border-radius: 12px; padding: 12px; min-height: calc(var(--ch) * 2 + var(--ov) * 12 + 40px); touch-action: manipulation; }
.sol-row { display: grid; grid-template-columns: repeat(7, var(--cw)); gap: var(--gap); justify-content: space-between; }
.sol-top { margin: 0 0 var(--topgap, 16px); }
.sol-pile { position: relative; width: var(--cw); height: var(--ch); border-radius: calc(var(--cw) * 0.08); transition: box-shadow .12s; }
.sol-top .sol-pile, .sol-col:empty { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); background: rgba(0,0,0,0.08); }
.sol-pile.sol-target { box-shadow: 0 0 0 2px #55d6ff; }
.sol-col.sol-target:not(:empty) { box-shadow: none; }
.sol-col.sol-target .sol-card:last-child { box-shadow: 0 0 0 2px #55d6ff, 0 1px 2px rgba(0,0,0,0.4); }
.sol-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.28); font-size: calc(var(--cw) * 0.34); font-weight: 800; }
.sol-stock { cursor: pointer; }
.sol-stock .sol-empty { opacity: 0.35; transition: opacity .15s; }
.sol-stock.sol-recycle .sol-empty { opacity: 1; }
.sol-stock:focus-visible { outline: 2px solid #55d6ff; outline-offset: 2px; }
.sol-col { height: auto; min-height: var(--ch); }
.sol-card { position: absolute; left: 0; width: var(--cw); height: var(--ch); border-radius: calc(var(--cw) * 0.08); background: #fdfdf8; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.4); color: #1a1a1a; font-weight: 800; cursor: grab; overflow: hidden; touch-action: none; will-change: transform; }
.sol-card.red { color: #c8202f; }
.sol-card .c { position: absolute; left: calc(var(--cw) * 0.07); top: calc(var(--cw) * 0.035); display: flex; align-items: baseline; gap: calc(var(--cw) * 0.02); font-size: calc(var(--cw) * 0.25); line-height: 1.1; letter-spacing: -0.04em; white-space: nowrap; }  /* rank and suit on one line so they stay readable under the next card */
.sol-card .c small { font-size: calc(var(--cw) * 0.21); letter-spacing: 0; }
.sol-card .big { position: absolute; right: calc(var(--cw) * 0.08); bottom: calc(var(--cw) * 0.02); font-size: calc(var(--cw) * 0.44); opacity: 0.9; }
.sol-card.down { background: repeating-linear-gradient(45deg, #1c3f7a 0 6px, #244d93 6px 12px); border: calc(var(--cw) * 0.04 + 1px) solid #fdfdf8; box-sizing: border-box; cursor: default; touch-action: manipulation; }
.sol-stock .sol-card.down { cursor: pointer; }
.sol-card.sel { box-shadow: inset 0 0 0 3px #ffd166, 0 1px 2px rgba(0,0,0,0.4); }
.sol-drag { position: absolute; z-index: 60; pointer-events: none; }
.sol-drag .sol-card { box-shadow: 0 0 0 0.5px rgba(0,0,0,0.25), 0 10px 24px rgba(0,0,0,0.45); cursor: grabbing; }
.sol-win { position: absolute; inset: 0; background: rgba(2,5,14,0.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; border-radius: 12px; z-index: 70; padding: 16px; animation: sol-fade .25s ease-out; }
.sol-win-box { background: #0b1328; border: 1px solid #244b6b; border-radius: 14px; padding: 24px 28px; text-align: center; color: #dfe9ff; max-width: 360px; box-shadow: 0 20px 50px rgba(0,0,0,0.5); animation: sol-pop .35s cubic-bezier(.2,1.3,.4,1); }
.sol-win-box h3 { margin: 0 0 8px; color: #fff; font-size: 24px; }
.sol-win-box p { margin: 0 0 10px; }
.sol-win-box .sol-win-stats { color: #8aa3c4; font-size: 13px; margin: 0 0 16px; }
.sol-help { color: #8aa3c4; font-size: 12px; line-height: 1.55; margin: 10px 0 0; }
.sol-help kbd { background: #16213a; color: #bfe9ff; border-radius: 3px; padding: 0 5px; font-family: inherit; font-size: 11.5px; }
@keyframes sol-fade { from { opacity: 0; } }
@keyframes sol-pop { from { opacity: 0; transform: scale(0.9); } }
@media (max-width: 560px) { .sol-table { padding: 8px; } .sol-stats { gap: 12px; } .sol-help { font-size: 11.5px; } .sol-card.down { border-width: 2px; } }
@media (hover: none) { .sol-keys { display: none; } }
@media (prefers-reduced-motion: reduce) { .sol-win, .sol-win-box { animation: none; } }
.sol [hidden] { display: none !important; }
/* full-screen play: the table fills the space under a compact bar; cards size from width and height (see fit()) */
.is-immersive .sol { display: flex; flex-direction: column; max-width: none; width: 100%; padding: 6px 0 max(6px, env(safe-area-inset-bottom, 0px)); }
.is-immersive .sol-bar { flex: none; margin: 0 0 6px; gap: 6px 10px; }
.is-immersive .sol-table { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 10px; }
.is-immersive .sol-row { justify-content: center; }
.is-immersive .sol-help { display: none; }
.is-immersive .sol-stats { font-size: 12.5px; gap: 12px; }
.is-immersive .sol-btn { padding: 6px 11px; }
.is-immersive .sol-seg span { padding: 4px 9px; }
.sol-table.sol-wide { display: grid; grid-template-columns: var(--cw) auto var(--cw) var(--cw); grid-template-rows: var(--ch) auto 1fr; gap: var(--gap); justify-content: center; align-items: start; }
.sol-wide .sol-top { display: contents; }
.sol-wide .sol-gap { display: none; }
.sol-wide [data-pile="stock"] { grid-area: 1 / 1; } .sol-wide [data-pile="waste"] { grid-area: 2 / 1; }
.sol-wide [data-pile="f0"] { grid-area: 1 / 3; } .sol-wide [data-pile="f1"] { grid-area: 1 / 4; } .sol-wide [data-pile="f2"] { grid-area: 2 / 3; } .sol-wide [data-pile="f3"] { grid-area: 2 / 4; }
.sol-wide .sol-tableau { grid-column: 2; grid-row: 1 / span 3; margin: 0 calc(var(--gap) * 1.5); }
@media (max-height: 500px) { .is-immersive .sol-table { padding: 6px 10px; } .is-immersive .sol-bar { margin-bottom: 4px; } }
