/* The Classics shelf: the game pages (/classics/<id>/). Two looks: frost (the default, TC Arcade's ice)
   and classic (green felt, plain cards) — html[data-look="classic"], set by assets/js/classic.js. */
.classic-page { padding-bottom: 20px; }
.classic-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.classic-bar h1 { margin: 0; font-size: 1.6em; }
.classic-bar .muted { font-size: .95em; }
.classic-stats { display: flex; gap: 14px; color: var(--muted); }
.classic-stats b { color: var(--text); font-size: 1.1em; }
.classic-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.classic-win { text-align: center; margin: 14px auto; max-width: 620px; }
.classic-win-stats { display: flex; gap: 18px; justify-content: center; font-size: 1.15em; }
.classic-board { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.classic-board p { flex-basis: 100%; margin: 0; }

/* ── the card table ── */
.sol-table { position: relative; width: 100%; max-width: 820px; margin: 0 auto; min-height: 420px; border-radius: 16px; touch-action: none; user-select: none; -webkit-user-select: none;
  background: radial-gradient(900px 500px at 50% -10%, #0e4a6b, transparent 70%), linear-gradient(180deg, #0a2236, #041019); border: 1px solid #2b5a78; box-shadow: inset 0 0 60px #00000088; }
html[data-look="classic"] .sol-table { background: radial-gradient(900px 600px at 50% 30%, #1f7a3f, #0f4d26 75%); border-color: #0b3a1c; }
.slot { position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); border-radius: 8%/6%; border: 2px dashed #7dd3fc44; color: #7dd3fc55; display: grid; place-items: center; font-size: calc(var(--cw) * .4); }
html[data-look="classic"] .slot { border-color: #ffffff33; color: #ffffff40; }
.stock-slot { cursor: pointer; }
.stock-slot.recycle::after { content: '↻'; color: #7dd3fcaa; font-size: calc(var(--cw) * .5); }
html[data-look="classic"] .stock-slot.recycle::after { color: #ffffffaa; }

.card { position: absolute; left: 0; top: 0; width: var(--cw); height: var(--ch); border-radius: 8%/6%; cursor: pointer; transition: transform .18s ease-out;
  background: linear-gradient(160deg, #ffffff, #e6f4fc); border: 1px solid #7dd3fc; box-shadow: 0 2px 6px #0007; font-family: system-ui, sans-serif; overflow: hidden; }
html[data-look="classic"] .card { background: #fdfdfb; border-color: #9ca3af; }
.card.red { color: #dc2626; } .card.black { color: #0f172a; }
.card .ci { position: absolute; top: 4%; left: 7%; display: grid; justify-items: center; line-height: .95; }
.card .ci b { font-size: calc(var(--cw) * .26); font-weight: 800; letter-spacing: -.04em; }
.card .ci i { font-style: normal; font-size: calc(var(--cw) * .22); }
.card .ci2 { top: auto; left: auto; bottom: 4%; right: 7%; transform: rotate(180deg); }
.card .cb { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--cw) * .5); padding-top: 26%; }
.card .cb b { font-size: calc(var(--cw) * .34); display: block; margin-bottom: -.4em; }
.card.down { cursor: default; border-color: #0c4a6e;
  background: url('../img/iceman.png') center 58% / 46% auto no-repeat, repeating-linear-gradient(45deg, #0b4f78 0 6px, #0a4468 6px 12px); }
.card.down > span { visibility: hidden; }
html[data-look="classic"] .card.down { border-color: #7f1d1d; background: repeating-linear-gradient(45deg, #b91c1c 0 5px, #991b1b 5px 10px); box-shadow: inset 0 0 0 4px #fff, 0 2px 6px #0007; }
.card.nope { animation: nope .3s; }
@keyframes nope { 25% { margin-left: -5px; } 75% { margin-left: 5px; } }
.sol-table.won .card { box-shadow: 0 0 14px #7dd3fc; }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }

/* the page's text under the table */
.classic-info { max-width: 820px; margin: 22px auto 0; }
.classic-info h2 { margin: 18px 0 6px; }
.classic-info ul { padding-left: 1.2em; display: grid; gap: 4px; }
/* the share text and buttons in the result (as on /daily/) */
.classic-win .ice-share { display: inline-block; max-width: 100%; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 6px auto; font: inherit; line-height: 1.5; }
.classic-win .ice-share-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ── FreeCell, Spider (assets/js/cardtable.js) ── */
.classic-tip { min-height: 1.4em; margin: -4px 0 6px; color: var(--muted); font-size: .92em; }
/* the corner index on one line ("10♠"), so a fanned card shows its suit too */
.sol-table.cardtable .card .ci { display: flex; align-items: baseline; gap: 1px; top: 3%; left: 6%; }
.sol-table.cardtable .card .ci2 { top: auto; left: auto; }
.sol-table.cardtable .card .cb b { display: none; }   /* the corner says J, Q or K; the middle keeps just the suit, clear of the fan */
/* narrow cards (phones, Spider's ten columns): a bigger index, no bottom index or middle letter */
.sol-table.narrow .card .ci { gap: 0; top: 2%; left: 5%; }
.sol-table.narrow .card .ci b { font-size: calc(var(--cw) * .36); }
.sol-table.narrow .card .ci i { font-size: calc(var(--cw) * .32); }
.sol-table.narrow .card .ci2 { display: none; }
.sol-table.narrow .card .cb { font-size: calc(var(--cw) * .6); padding-top: 30%; }
.sol-table.narrow .card.down { background-size: 70% auto, auto; }
.found-slot, .done-slot { font-size: calc(var(--cw) * .4); }

/* ── Minesweeper ── */
.ms-table { width: 100%; display: flex; justify-content: center; }
.ms-board { display: grid; grid-template-columns: repeat(var(--cols), var(--cs)); gap: 1px; padding: 6px; border-radius: 14px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  background: linear-gradient(180deg, #0a2236, #041019); border: 1px solid #2b5a78; box-shadow: inset 0 0 40px #00000088; }
.ms-cell { width: var(--cs); height: var(--cs); display: grid; place-items: center; border-radius: 3px; font: 800 calc(var(--cs) * .6) / 1 system-ui, sans-serif; touch-action: manipulation; cursor: default; }
.ms-cell.hidden, .ms-cell.flag { cursor: pointer; background: linear-gradient(160deg, #e0f4fe, #8fd0f0); box-shadow: inset 0 -2px #4f9fc9, inset 0 1px #fff; }
.ms-cell.hidden:hover { filter: brightness(1.08); }
.ms-cell.flag { font-size: calc(var(--cs) * .55); }
.ms-cell.open { background: #0d3049; color: #e0f2fe; }
.ms-cell.n1 { color: #60a5fa; } .ms-cell.n2 { color: #4ade80; } .ms-cell.n3 { color: #f87171; } .ms-cell.n4 { color: #c084fc; }
.ms-cell.n5 { color: #fb923c; } .ms-cell.n6 { color: #2dd4bf; } .ms-cell.n7 { color: #f1f5f9; } .ms-cell.n8 { color: #94a3b8; }
.ms-cell.mine { font-size: calc(var(--cs) * .6); background: #23577a; }
.ms-cell.boom { background: #dc2626; }
.ms-cell.wrong { background: linear-gradient(160deg, #e0f4fe, #8fd0f0); color: #dc2626; }
.ms-cell.start { color: #0369a1; font-size: calc(var(--cs) * .7); box-shadow: inset 0 -2px #4f9fc9, inset 0 1px #fff, 0 0 0 2px #fde047; }
.ms-cell.pulse { animation: ms-pulse .5s 2; }
@keyframes ms-pulse { 50% { transform: scale(1.25); box-shadow: 0 0 14px #fde047; } }
.ms-board.flagging .ms-cell.hidden { background: linear-gradient(160deg, #fef9c3, #f5d77a); box-shadow: inset 0 -2px #c9a227, inset 0 1px #fff; }
.ms-board.won { box-shadow: inset 0 0 40px #00000088, 0 0 22px #7dd3fc; }
.ms-level { padding-right: 10px; }
html[data-look="classic"] .ms-board { background: #bdbdbd; border: 3px solid; border-color: #fff #7b7b7b #7b7b7b #fff; border-radius: 4px; box-shadow: none; gap: 0; }
html[data-look="classic"] .ms-cell { border-radius: 0; }
html[data-look="classic"] .ms-cell.hidden, html[data-look="classic"] .ms-cell.flag, html[data-look="classic"] .ms-cell.wrong { background: #c0c0c0; border: 3px solid; border-color: #fff #7b7b7b #7b7b7b #fff; box-shadow: none; }
html[data-look="classic"] .ms-cell.start { box-shadow: inset 0 0 0 2px #0a7a2f; color: #0a7a2f; }
html[data-look="classic"] .ms-cell.open { background: #b4b4b4; border: 1px solid #8a8a8a; }
html[data-look="classic"] .ms-cell.boom { background: #ff2020; }
html[data-look="classic"] .ms-cell.n1 { color: #0000ff; } html[data-look="classic"] .ms-cell.n2 { color: #008000; } html[data-look="classic"] .ms-cell.n3 { color: #ff0000; }
html[data-look="classic"] .ms-cell.n4 { color: #000080; } html[data-look="classic"] .ms-cell.n5 { color: #800000; } html[data-look="classic"] .ms-cell.n6 { color: #008080; }
html[data-look="classic"] .ms-cell.n7 { color: #000; } html[data-look="classic"] .ms-cell.n8 { color: #808080; }
html[data-look="classic"] .ms-board.flagging .ms-cell.hidden { background: #e8d98a; }
@media (prefers-reduced-motion: reduce) { .ms-cell.pulse { animation: none; } }

/* ── Sudoku ── */
.sd-wrap { width: 100%; max-width: 540px; margin: 0 auto; display: grid; gap: 10px; }
.sd-board { display: grid; grid-template-columns: repeat(9, var(--cs)); grid-auto-rows: var(--cs); justify-content: center; padding: 3px; border-radius: 10px; user-select: none; -webkit-user-select: none;
  background: #7dd3fc; width: max-content; margin: 0 auto; box-shadow: 0 0 24px #0ea5e944; }
.sd-cell { position: relative; display: grid; place-items: center; background: #0b2438; color: #7dd3fc; font: 700 calc(var(--cs) * .56) / 1 system-ui, sans-serif; cursor: pointer;
  border-right: 1px solid #1e4a66; border-bottom: 1px solid #1e4a66; touch-action: manipulation; }
.sd-cell:nth-child(9n) { border-right: 0; } .sd-cell:nth-child(n+73) { border-bottom: 0; }
.sd-cell.bx { border-right: 3px solid #7dd3fc; } .sd-cell.by { border-bottom: 3px solid #7dd3fc; }
.sd-cell.given { color: #f0f9ff; font-weight: 800; }
.sd-cell.user { color: #38bdf8; }
.sd-cell.peer { background: #10324d; }
.sd-cell.same { background: #155e75; }
.sd-cell.sel { background: #0e7490; box-shadow: inset 0 0 0 2px #fde047; }
.sd-cell.clash { color: #f87171; }
.sd-cell.hinted { text-decoration: underline 2px #fde047; text-underline-offset: 3px; }
.sd-notes { position: absolute; inset: 2px; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); }
.sd-notes i { font: 600 calc(var(--cs) * .24) / 1 system-ui, sans-serif; font-style: normal; display: grid; place-items: center; color: #94c9e6; }
.sd-board.won { box-shadow: 0 0 30px #7dd3fc; }
.sd-pad { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; width: min(100%, calc(var(--cs) * 9 + 30px)); margin: 0 auto; }
.sd-key { position: relative; padding: 10px 0 12px; border-radius: 10px; border: 1px solid #2b5a78; background: linear-gradient(180deg, #13405f, #0b2438); color: #e0f2fe; font: 800 1.35em system-ui, sans-serif; cursor: pointer; touch-action: manipulation; }
.sd-key:active { transform: translateY(1px); filter: brightness(1.2); }
.sd-key small { position: absolute; right: 4px; bottom: 2px; font-size: .45em; font-weight: 600; color: #7dd3fc; }
.sd-key.done { opacity: .35; }
.sd-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
html[data-look="classic"] .sd-board { background: #111; box-shadow: none; border-radius: 4px; }
html[data-look="classic"] .sd-cell { background: #fff; color: #1d4ed8; border-color: #c8c8c8; }
html[data-look="classic"] .sd-cell.bx { border-right-color: #111; } html[data-look="classic"] .sd-cell.by { border-bottom-color: #111; }
html[data-look="classic"] .sd-cell.given { color: #111; }
html[data-look="classic"] .sd-cell.peer { background: #eef2f7; }
html[data-look="classic"] .sd-cell.same { background: #d6e4f5; }
html[data-look="classic"] .sd-cell.sel { background: #bcd4f0; box-shadow: inset 0 0 0 2px #1d4ed8; }
html[data-look="classic"] .sd-cell.clash { color: #dc2626; }
html[data-look="classic"] .sd-notes i { color: #555; }
html[data-look="classic"] .sd-key { background: #f4f4f4; color: #1d4ed8; border-color: #bbb; }
html[data-look="classic"] .sd-key small { color: #666; }

/* ── Word Search ── */
.ws-layout { display: flex; gap: 18px; justify-content: center; align-items: flex-start; flex-wrap: wrap; }
.ws-box { position: relative; flex: none; border-radius: 14px; background: linear-gradient(180deg, #0c2a40, #061522); border: 1px solid #2b5a78; box-shadow: inset 0 0 40px #00000077; }
.ws-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(var(--n), var(--cs)); grid-auto-rows: var(--cs); gap: var(--gap); padding: 6px; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.ws-cell { display: grid; place-items: center; font: 800 calc(var(--cs) * .6) / 1 system-ui, sans-serif; color: #e0f2fe; letter-spacing: 0; }
.ws-marks { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; }
.ws-marks line { stroke-linecap: round; }
.ws-found { stroke: hsl(var(--h) 85% 55% / .45); }
.ws-live { stroke: #fde04788; }
.ws-box.nope { animation: nope .3s; }
.ws-box.won { box-shadow: inset 0 0 40px #00000077, 0 0 24px #7dd3fc; }
.ws-side { flex: 1 1 220px; max-width: 360px; }
.ws-side h2 { margin: 0 0 2px; }
.ws-words { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ws-words li { padding: 4px 10px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); font-weight: 700; letter-spacing: .04em; font-size: .92em; }
.ws-words li.found { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); background: hsl(var(--h) 70% 45% / .25); border-color: hsl(var(--h) 80% 60% / .6); }
html[data-look="classic"] .ws-box { background: #fffdf6; border-color: #c9c2a8; box-shadow: none; }
html[data-look="classic"] .ws-cell { color: #1f2937; font-family: Georgia, 'Times New Roman', serif; font-weight: 700; }
html[data-look="classic"] .ws-found { stroke: hsl(var(--h) 80% 60% / .4); }
html[data-look="classic"] .ws-live { stroke: #f59e0b66; }
@media (max-width: 640px) { .ws-side { max-width: none; } }

/* ── Checkers ── */
.dr-wrap { display: flex; justify-content: center; }
.dr-board { position: relative; width: min(100%, 560px); aspect-ratio: 1; display: grid; grid-template: repeat(8, 1fr) / repeat(8, 1fr); border-radius: 10px; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  border: 3px solid #2b5a78; box-shadow: 0 0 28px #0ea5e933; }
.dr-sq.light { background: #cfe9f7; } .dr-sq.dark { background: #134a6b; }
.dr-sq.last { box-shadow: inset 0 0 0 100px #fde04722; }
.dr-sq.dest { position: relative; cursor: pointer; }
.dr-sq.dest::after { content: ''; position: absolute; inset: 36%; border-radius: 50%; background: #fde047cc; box-shadow: 0 0 10px #fde047; }
.dr-piece { position: absolute; left: 0; top: 0; width: var(--sq); height: var(--sq); display: grid; place-items: center; pointer-events: none; transition: transform .2s ease-out, opacity .25s; }
.dr-piece::before { content: ''; width: 76%; height: 76%; border-radius: 50%; box-shadow: 0 3px 6px #0009, inset 0 -4px 0 #0003, inset 0 0 0 calc(var(--sq) * .06) #ffffff33; }
.dr-piece.s0::before { background: radial-gradient(circle at 35% 30%, #ffffff, #bae6fd 55%, #38bdf8); }
.dr-piece.s1::before { background: radial-gradient(circle at 35% 30%, #fed7aa, #f97316 55%, #b91c1c); }
.dr-piece.king::after { content: '♛'; position: absolute; font-size: calc(var(--sq) * .42); line-height: 1; color: #fde047; text-shadow: 0 1px 2px #000a; }
.dr-piece.s0.king::after { color: #0369a1; text-shadow: 0 1px 0 #fff; }
.dr-piece.sel::before { box-shadow: 0 0 0 3px #fde047, 0 0 16px #fde047, 0 3px 6px #0009; }
.dr-piece.can::before { animation: dr-glow 1.2s infinite; }
@keyframes dr-glow { 50% { box-shadow: 0 0 0 3px #fde047aa, 0 0 18px #fde047, 0 3px 6px #0009; } }
.dr-piece.gone { opacity: .25; }
.dr-piece.nope, .dr-sq.nope { animation: nope .3s; }
.dr-status { min-height: 1.5em; margin: -2px 0 8px; font-weight: 700; text-align: center; }
.dr-status[data-side="0"]::before, .dr-status[data-side="1"]::before { content: ''; display: inline-block; width: .8em; height: .8em; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.dr-status[data-side="0"]::before, .dr-dot.s0 { background: radial-gradient(circle at 35% 30%, #fff, #38bdf8); }
.dr-status[data-side="1"]::before, .dr-dot.s1 { background: radial-gradient(circle at 35% 30%, #fed7aa, #b91c1c); }
.dr-dot { display: inline-block; width: .8em; height: .8em; border-radius: 50%; vertical-align: -1px; }
html[data-look="classic"] .dr-board { border-color: #5b3a1e; box-shadow: none; }
html[data-look="classic"] .dr-sq.light { background: #f3e2c3; } html[data-look="classic"] .dr-sq.dark { background: #2f6b3a; }
html[data-look="classic"] .dr-piece.s0::before, html[data-look="classic"] .dr-status[data-side="0"]::before, html[data-look="classic"] .dr-dot.s0 { background: radial-gradient(circle at 35% 30%, #6b7280, #111827 60%); }
html[data-look="classic"] .dr-piece.s1::before, html[data-look="classic"] .dr-status[data-side="1"]::before, html[data-look="classic"] .dr-dot.s1 { background: radial-gradient(circle at 35% 30%, #fca5a5, #dc2626 55%, #7f1d1d); }
html[data-look="classic"] .dr-piece.s0.king::after { color: #fde047; text-shadow: 0 1px 2px #000; }
@media (prefers-reduced-motion: reduce) { .dr-piece { transition: none; } .dr-piece.can::before { animation: none; box-shadow: 0 0 0 3px #fde047aa; } }

/* ── Chess ── */
.ch-status { min-height: 1.5em; margin: -2px 0 8px; font-weight: 700; text-align: center; }
.ch-status[data-side]:not([data-side=""])::before { content: ''; display: inline-block; width: .8em; height: .8em; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1px solid #7dd3fc; }
.ch-status[data-side="1"]::before { background: #f0f9ff; } .ch-status[data-side="-1"]::before { background: #0f2a44; }
.ch-layout { display: flex; gap: 18px; justify-content: center; align-items: flex-start; flex-wrap: wrap; }
.ch-boardwrap { position: relative; width: min(100%, 560px); display: flex; flex-direction: column; gap: 4px; }
.ch-boardwrap.flipped .ch-took.top { order: 3; } .ch-boardwrap.flipped .ch-board { order: 2; } .ch-boardwrap.flipped .ch-took.bottom { order: 1; }
.ch-board { width: 100%; aspect-ratio: 1; display: grid; grid-template: repeat(8, 1fr) / repeat(8, 1fr); border-radius: 8px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  border: 3px solid #2b5a78; box-shadow: 0 0 28px #0ea5e933; --light: #d6edf9; --dark: #4a88b0; }
.ch-sq { position: relative; display: grid; place-items: center; cursor: pointer; }
.ch-sq.light { background: var(--light); } .ch-sq.dark { background: var(--dark); }
.ch-sq.last { box-shadow: inset 0 0 0 100px #fde04738; }
.ch-sq.sel { box-shadow: inset 0 0 0 100px #fde04766; }
.ch-sq.check { background: radial-gradient(circle, #ef4444 0%, #ef444488 45%, transparent 75%), var(--dark); }
.ch-sq.light.check { background: radial-gradient(circle, #ef4444 0%, #ef444488 45%, transparent 75%), var(--light); }
.ch-sq.dot::after { content: ''; position: absolute; width: 28%; height: 28%; border-radius: 50%; background: #0f172a44; }
.ch-sq.cap::after { content: ''; position: absolute; inset: 4%; border-radius: 50%; border: 5px solid #0f172a44; }
.ch-sq.lift { z-index: 5; }
.ch-sq.nope { animation: nope .3s; }
.ch-rank, .ch-file { position: absolute; font: 700 10px/1 system-ui, sans-serif; opacity: .7; pointer-events: none; }
.ch-rank { top: 3px; left: 3px; } .ch-file { bottom: 2px; right: 4px; }
.ch-sq.light .ch-rank, .ch-sq.light .ch-file { color: var(--dark); } .ch-sq.dark .ch-rank, .ch-sq.dark .ch-file { color: var(--light); }
.ch-piece { width: 94%; height: 94%; pointer-events: none; transition: transform .12s; }
.ch-piece.dragging { transition: none; z-index: 10; position: relative; transform-origin: center; filter: drop-shadow(0 6px 6px #0008); }
.ch-piece svg, .ch-mini svg { width: 100%; height: 100%; display: block; }
.pc { stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; fill: var(--pf); stroke: var(--ps); }
.pc .pd { fill: var(--pd); stroke: none; } .pc .pd-line { fill: none; stroke: var(--pd); stroke-width: 1.6; }
.ch-piece.w, .ch-mini.w { --pf: #f0f9ff; --ps: #0c4a6e; --pd: #0c4a6e; }
.ch-piece.b, .ch-mini.b { --pf: #0f2a44; --ps: #7dd3fc; --pd: #7dd3fc; }
.ch-took { min-height: 22px; display: flex; align-items: center; gap: 1px; flex-wrap: wrap; }
.ch-took b { margin-left: 6px; font-size: .85em; color: var(--muted); }
.ch-mini { width: 20px; height: 20px; display: inline-block; margin-right: -5px; }
.ch-promo { position: absolute; inset: 30% 6%; z-index: 20; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 12px; border-radius: 14px; background: #0b1d2ee6; border: 1px solid #7dd3fc; box-shadow: 0 10px 40px #000a; }
.ch-promo p { flex-basis: 100%; margin: 0; text-align: center; font-weight: 700; }
.ch-promo-btn { width: 64px; height: 64px; border-radius: 12px; border: 1px solid #2b5a78; background: #d6edf9; cursor: pointer; padding: 4px; }
.ch-promo-btn .ch-piece { display: block; width: 100%; height: 100%; }
.ch-side { flex: 1 1 220px; max-width: 320px; }
.ch-side h2 { margin: 0 0 6px; }
.ch-moves { list-style: none; padding: 8px 10px; margin: 0; max-height: 360px; overflow-y: auto; border-radius: 10px; background: var(--card2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ch-moves li { display: grid; grid-template-columns: 2.6em 1fr 1fr; gap: 4px; padding: 2px 0; }
.ch-moves li.muted { display: block; }
.ch-side-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ch-side-btns [data-armed] { background: #b91c1c; color: #fff; }
html[data-look="classic"] .ch-board { --light: #f0d9b5; --dark: #b58863; border-color: #5b3a1e; box-shadow: none; }
html[data-look="classic"] .ch-piece.w, html[data-look="classic"] .ch-mini.w { --pf: #ffffff; --ps: #1f2937; --pd: #1f2937; }
html[data-look="classic"] .ch-piece.b, html[data-look="classic"] .ch-mini.b { --pf: #1f2937; --ps: #000000; --pd: #e5e7eb; }
html[data-look="classic"] .ch-promo-btn { background: #f0d9b5; border-color: #b58863; }
@media (max-width: 640px) { .ch-side { max-width: none; } .ch-moves { max-height: 200px; } }
@media (prefers-reduced-motion: reduce) { .ch-piece { transition: none; } }

/* ── Video Poker ── */
.vp-machine { max-width: 640px; margin: 0 auto; padding: 14px; border-radius: 18px; background: linear-gradient(180deg, #0c2a40, #061522); border: 1px solid #2b5a78; box-shadow: inset 0 0 50px #00000077, 0 0 24px #0ea5e922; }
.vp-pays { width: 100%; border-collapse: collapse; font-size: .86em; font-variant-numeric: tabular-nums; margin-bottom: 12px; }
.vp-pays th, .vp-pays td { padding: 3px 6px; text-align: right; color: #bae6fd; }
.vp-pays th:first-child, .vp-pays td:first-child { text-align: left; color: #e0f2fe; font-weight: 700; }
.vp-pays th { font-size: .85em; color: #7dd3fc; }
.vp-pays .on { background: #0ea5e933; color: #fff; font-weight: 800; }
.vp-pays tr.win td { background: #fde04740; color: #fff; }
.vp-hand { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; --cw: min(104px, calc((100vw - 90px) / 5)); --ch: calc(var(--cw) * 1.4); }
.vp-slot { display: grid; justify-items: center; gap: 4px; }
.vp-hand .card { position: relative; transform: none; padding: 0; font: inherit; }
.vp-hand .card.held { transform: translateY(-8px); box-shadow: 0 0 0 3px #fde047, 0 6px 12px #0008; }
.vp-hand .card.flip { animation: vp-flip .32s both; }
@keyframes vp-flip { from { transform: rotateY(90deg); opacity: .3; } to { transform: none; opacity: 1; } }
.vp-hand .card:disabled { cursor: default; }
.vp-held { min-height: 1.2em; font: 800 .8em/1 system-ui, sans-serif; letter-spacing: .12em; color: #fde047; }
.vp-msg { min-height: 1.5em; text-align: center; font-weight: 700; margin: 10px 0; }
.vp-controls { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.vp-main { min-width: 130px; font-size: 1.1em; }
.vp-note { text-align: center; margin: 10px 0 0; }
.vp-again { text-align: center; margin: 8px 0 0; }
html[data-look="classic"] .vp-machine { background: radial-gradient(800px 500px at 50% 0%, #1f7a3f, #0f4d26 75%); border-color: #0b3a1c; box-shadow: none; }
html[data-look="classic"] .vp-pays th, html[data-look="classic"] .vp-pays td { color: #fef3c7; }
html[data-look="classic"] .vp-pays th:first-child, html[data-look="classic"] .vp-pays td:first-child { color: #fff; }
html[data-look="classic"] .vp-pays .on { background: #00000033; }
@media (prefers-reduced-motion: reduce) { .vp-hand .card.flip { animation: none; } }

/* ── Mini Crossword ── */
.cw-layout { display: flex; gap: 22px; justify-content: center; align-items: flex-start; flex-wrap: wrap; }
.cw-main { width: min(100%, 380px); display: grid; gap: 8px; }
.cw-bar { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 8px; border-radius: 12px; background: #0e7490; color: #f0f9ff; }
.cw-bar span { flex: 1; line-height: 1.3; }
.cw-step { flex: none; width: 32px; height: 32px; border-radius: 8px; border: 0; background: #ffffff22; color: inherit; font-size: 1.3em; cursor: pointer; }
.cw-grid { display: grid; grid-template: repeat(5, 1fr) / repeat(5, 1fr); aspect-ratio: 1; border: 3px solid #7dd3fc; border-radius: 8px; overflow: hidden; background: #7dd3fc; gap: 2px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.cw-cell { position: relative; display: grid; place-items: center; background: #eaf6fd; color: #0b2438; font: 800 clamp(22px, 9vw, 40px)/1 system-ui, sans-serif; text-transform: uppercase; cursor: pointer; }
.cw-cell small { position: absolute; top: 3px; left: 5px; font-size: 12px; font-weight: 700; color: #2b5a78; }
.cw-cell.blk { background: #0b2438; cursor: default; }
.cw-cell.word { background: #b9e3f7; }
.cw-cell.sel { background: #fde047; color: #0f172a; } .cw-cell.sel small { color: #334155; }
.cw-cell.bad span { color: #dc2626; text-decoration: line-through; }
.cw-cell.rev span { color: #0369a1; }
.cw-grid.won { box-shadow: 0 0 24px #7dd3fc; }
.cw-lists { flex: 1 1 260px; max-width: 420px; display: grid; gap: 10px; }
.cw-lists h2 { margin: 0 0 4px; font-size: 1.05em; }
.cw-lists ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.cw-lists li { padding: 5px 8px; border-radius: 8px; cursor: pointer; line-height: 1.3; }
.cw-lists li b { display: inline-block; min-width: 1.4em; }
.cw-lists li.on { background: #155e75; color: #f0f9ff; }
.cw-lists li.full { color: var(--muted); } .cw-lists li.on.full { color: #d6edf9; }
.cw-keys { display: grid; gap: 6px; }
.cw-keys div { display: flex; gap: 4px; justify-content: center; }
.cw-keys button { flex: 1; max-width: 36px; height: 46px; border-radius: 8px; border: 1px solid #2b5a78; background: #13405f; color: #e0f2fe; font: 800 1.05em system-ui, sans-serif; cursor: pointer; touch-action: manipulation; padding: 0; }
.cw-keys button[data-k="⌫"], .cw-keys button[data-k="⇄"] { max-width: 52px; flex: 1.5; }
html[data-look="classic"] .cw-grid { background: #111; border-color: #111; border-radius: 2px; }
html[data-look="classic"] .cw-cell { background: #fff; color: #111; font-family: Georgia, 'Times New Roman', serif; }
html[data-look="classic"] .cw-cell small { color: #444; font-family: system-ui, sans-serif; }
html[data-look="classic"] .cw-cell.blk { background: #111; }
html[data-look="classic"] .cw-cell.word { background: #d6e4f5; }
html[data-look="classic"] .cw-cell.sel { background: #fde047; }
html[data-look="classic"] .cw-bar { background: #d6e4f5; color: #111; }
html[data-look="classic"] .cw-step { background: #00000014; }
html[data-look="classic"] .cw-lists li.on { background: #d6e4f5; color: #111; }
html[data-look="classic"] .cw-keys button { background: #f4f4f4; color: #111; border-color: #bbb; }
@media (max-width: 640px) { .cw-lists { max-width: none; } }

/* ── a Classic's badge toast ── */
.classic-toast { position: fixed; left: 50%; top: calc(76px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: .7em; padding: .5em 1.1em .5em .6em;
  background: linear-gradient(135deg, #0c3a5a, #1a1a3d); border: 1px solid #7dd3fc; border-radius: 999px; box-shadow: 0 8px 30px #000a; white-space: nowrap; animation: classicToastIn .4s cubic-bezier(.2, 1.4, .4, 1); }
.classic-toast small { display: block; color: #7dd3fc; font-size: .72em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.classic-toast b { font-family: var(--font-head); }
.classic-toast .toast-icon { font-size: 1.6em; }
.classic-toast.out { opacity: 0; transition: opacity .5s; }
@keyframes classicToastIn { from { transform: translate(-50%, -20px); opacity: 0; } }

/* ── vs the computer (Chess, Checkers) ── */
.vs-panel { margin: 0 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card2); }
.vs-panel > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 8px 12px; cursor: pointer; list-style: none; }
.vs-panel > summary::-webkit-details-marker { display: none; }
.vs-panel > summary::after { content: '▾ change'; margin-left: auto; font-size: .8em; color: var(--muted); }
.vs-panel[open] > summary::after { content: '▴'; }
.vs-body { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 0 10px 10px; }
.vs-panel .chips { gap: 5px; }
.vs-panel .chip { cursor: pointer; font: inherit; font-size: .85em; font-weight: 700; }
.vs-panel[data-mode="two"] .vs-ai { display: none; }
.vs-record { font-size: .85em; color: var(--muted); }
@media (max-width: 600px) { .classic-tools { gap: 6px; } .classic-tools .btn.small { padding: .45em .75em; font-size: .85em; } }
.ch-sq.hint, .dr-sq.hint { box-shadow: inset 0 0 0 4px #4ade80, inset 0 0 0 100px #4ade8033; }
.ch-status.thinking::after, .dr-status.thinking::after { content: ' ●'; animation: thinkPulse 1s infinite; color: #7dd3fc; }
@keyframes thinkPulse { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .ch-status.thinking::after, .dr-status.thinking::after { animation: none; } }

/* ── Texas Hold'em (/classics/texas-holdem/) ── */
.he-status { min-height: 1.4em; margin: 0 0 6px; font-size: .9em; color: var(--muted); text-align: center; }
.he-status[data-flash] { color: #fde047; font-weight: 700; }
.he-layout { display: grid; gap: 8px; }
.he-table { position: relative; height: 450px; max-width: 860px; width: 100%; margin: 0 auto; --cw: 40px; --ch: calc(var(--cw) * 1.4); }
.he-felt { position: absolute; inset: 15% 7% 13%; border-radius: 50%; background: radial-gradient(70% 60% at 50% 40%, #12425f, #0a2436 70%, #071a28); border: 10px solid #1b4a66; box-shadow: inset 0 0 50px #000a, 0 0 0 2px #7dd3fc55, 0 0 30px #0ea5e933; }
html[data-look="classic"] .he-felt { background: radial-gradient(70% 60% at 50% 40%, #1f7a3f, #0f4d26 75%); border-color: #5b3a1e; box-shadow: inset 0 0 50px #0008, 0 0 0 2px #2a1a0c; }
.he-center { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px; }
.he-board { display: flex; gap: 6px; }
.he-board .card, .he-cards .card { position: relative; left: auto; top: auto; transform: none; cursor: default; flex: none; }
.he-spot { width: var(--cw); height: var(--ch); border-radius: 8%/6%; border: 1.5px dashed #7dd3fc44; }
html[data-look="classic"] .he-spot { border-color: #ffffff33; }
.he-board .card.flip { animation: vp-flip .32s both; }
.he-pot { font: 800 1em/1 var(--font-head, system-ui); color: #fde047; background: #0008; padding: .3em .8em; border-radius: 99px; font-variant-numeric: tabular-nums; }
.he-pot[hidden] { display: none; }
.he-seat { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 3px; width: 118px; z-index: 1; }
.he-seat.p0 { left: 50%; top: 84%; } .he-seat.p1 { left: 11%; top: 66%; } .he-seat.p2 { left: 11%; top: 25%; }
.he-seat.p3 { left: 50%; top: 10%; } .he-seat.p4 { left: 89%; top: 25%; } .he-seat.p5 { left: 89%; top: 66%; }
.he-cards { display: flex; gap: 3px; min-height: var(--ch); }
.he-seat.me .he-cards { --cw: 54px; --ch: calc(var(--cw) * 1.4); }
.he-cards .card.dim { opacity: .4; }
.he-plate { display: grid; justify-items: center; gap: 1px; width: 100%; padding: 4px 6px; border-radius: 10px; background: #061522ee; border: 1.5px solid #2b5a78; color: var(--text, #e0f2fe); font: inherit; cursor: pointer; }
.he-plate:disabled { cursor: default; }
html[data-look="classic"] .he-plate { background: #1a1a1aee; border-color: #444; }
.he-name { font-size: .85em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.he-stack { font: 800 .95em/1.1 system-ui, sans-serif; color: #fde047; font-variant-numeric: tabular-nums; }
.he-style { font-size: .66em; letter-spacing: .06em; text-transform: uppercase; color: #7dd3fc; }
.he-seat.toact .he-plate { border-color: #fde047; box-shadow: 0 0 0 2px #fde04766, 0 0 18px #fde04755; animation: he-pulse 1.2s ease-in-out infinite; }
@keyframes he-pulse { 50% { box-shadow: 0 0 0 2px #fde04722, 0 0 8px #fde04722; } }
.he-seat.win .he-plate { border-color: #4ade80; box-shadow: 0 0 0 3px #4ade8066, 0 0 22px #4ade80aa; }
.he-seat.folded .he-plate, .he-seat.out .he-plate { opacity: .5; }
.he-seat.out:not(.shown) .he-cards { visibility: hidden; }
.he-seat.allin .he-stack::after { content: ' · all in'; font-size: .75em; color: #f472b6; }
/* the label after an action, the bet in front, the dealer button: each on the side of the seat facing open felt */
.he-say { position: absolute; top: 100%; margin-top: 3px; white-space: nowrap; font: 700 .78em/1 system-ui, sans-serif; padding: .28em .6em; border-radius: 99px; background: #0ea5e9; color: #04121c; z-index: 2; }
.he-say[hidden], .he-bet[hidden], .he-dealer[hidden] { display: none; }
.he-seat.win .he-say { background: #4ade80; }
.he-seat.p0 .he-say { top: auto; bottom: 8px; right: calc(100% + 8px); margin: 0; }
.he-seat.p3 .he-say { top: 50%; left: calc(100% + 8px); margin: 0; }
.he-bet { position: absolute; font: 800 .82em/1 system-ui, sans-serif; color: #fff; background: #0b2233; border: 2px dashed #fde047; border-radius: 99px; padding: .25em .55em; white-space: nowrap; z-index: 2; font-variant-numeric: tabular-nums; }
.he-seat.p0 .he-bet { bottom: calc(100% + 6px); } .he-seat.p3 .he-bet { top: calc(100% + 6px); }
.he-seat.p1 .he-bet, .he-seat.p2 .he-bet { left: calc(100% + 6px); top: 35%; }
.he-seat.p4 .he-bet, .he-seat.p5 .he-bet { right: calc(100% + 6px); top: 35%; }
.he-dealer { position: absolute; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 900 .72em/1 system-ui, sans-serif; color: #111; background: #fff; box-shadow: 0 1px 4px #0008; z-index: 3; bottom: 6px; }
.he-seat.p0 .he-dealer { bottom: auto; top: 4px; left: -30px; }
.he-seat.p1 .he-dealer, .he-seat.p2 .he-dealer { right: -28px; } .he-seat.p3 .he-dealer, .he-seat.p4 .he-dealer, .he-seat.p5 .he-dealer { left: -28px; }
.he-side { display: grid; gap: 8px; align-content: start; max-width: 640px; width: 100%; margin: 0 auto; }
.he-hint { margin: 0; padding: 6px 10px; border-radius: 10px; background: #0ea5e91a; border: 1px solid #0ea5e955; text-align: center; }
.he-hint[hidden], .he-wait[hidden] { display: none; }
.he-wait { margin: 0; text-align: center; color: var(--muted); font-size: .92em; min-height: 1.4em; }
.he-controls { display: grid; gap: 8px; }
.he-controls[hidden] { display: none; }
.he-acts { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.he-acts .btn { font-size: 1.05em; padding: .7em .6em; }
.he-acts .btn[hidden] { display: none; }
.he-fold { background: #7f1d1d; border-color: #b91c1c; }
.he-sizer { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; }
.he-sizer[hidden] { display: none; }
.he-sizer input[type=range] { flex: 1 1 100%; accent-color: #fde047; height: 28px; }
.he-next { text-align: center; margin: 0; }
.he-next[hidden] { display: none; }
@media (min-width: 980px) {
  .he-layout { grid-template-columns: minmax(0, 1fr) 260px; align-items: center; }
  .he-side { align-self: stretch; align-content: center; }
  .he-acts { grid-template-columns: 1fr; }
  .he-sizer .btn { flex: 1 1 calc(50% - 6px); }
}
@media (max-width: 600px) {
  .he-table { height: 400px; --cw: 28px; }
  .he-felt { inset: 13% 9% 17%; border-radius: 42% / 32%; border-width: 7px; }
  .he-seat { width: 84px; gap: 2px; }
  .he-seat.me .he-cards { --cw: 44px; }
  .he-seat.p0 { top: 86%; } .he-seat.p1 { left: 15%; top: 66%; } .he-seat.p2 { left: 15%; top: 34%; }
  .he-seat.p3 { top: 11%; } .he-seat.p4 { left: 85%; top: 34%; } .he-seat.p5 { left: 85%; top: 66%; }
  .he-board { gap: 3px; } .he-center { top: 50%; gap: 5px; }
  /* small cards: a big rank and suit, no middle pip, so they read at a glance */
  .he-board .card .cb, .he-seat:not(.me) .card .cb { display: none; }
  .he-board .card .ci, .he-seat:not(.me) .card .ci { inset: 0; top: 0; left: 0; display: grid; place-content: center; justify-items: center; line-height: 1; }
  .he-board .card .ci b, .he-seat:not(.me) .card .ci b { font-size: calc(var(--cw) * .46); }
  .he-board .card .ci i, .he-seat:not(.me) .card .ci i { font-size: calc(var(--cw) * .42); }
  .he-plate { padding: 3px 4px; border-radius: 8px; }
  .he-name { font-size: .74em; } .he-stack { font-size: .82em; } .he-style { font-size: .58em; }
  .he-say { font-size: .7em; white-space: normal; width: max-content; max-width: 132px; text-align: center; line-height: 1.15; }
  .he-seat.p1 .he-say, .he-seat.p2 .he-say { left: 0; } .he-seat.p4 .he-say, .he-seat.p5 .he-say { right: 0; }
  .he-seat.p3 .he-say { max-width: 96px; }
  .he-pot { font-size: .85em; }
  .he-seat.p1 .he-bet, .he-seat.p2 .he-bet { left: calc(100% + 2px); }
  .he-seat.p4 .he-bet, .he-seat.p5 .he-bet { right: calc(100% + 2px); }
  .he-bet { font-size: .72em; }
  .he-hint { font-size: .88em; padding: 5px 8px; }
  .he-side { min-height: 112px; }
  .he-controls:not([data-open]) .he-sizer { display: none; }
  .he-sizer { gap: 5px; } .he-sizer .btn { padding: .4em .7em; font-size: .82em; } .he-sizer input[type=range] { height: 24px; }
  .he-acts .btn { padding: .75em .4em; }
}
@media (prefers-reduced-motion: reduce) { .he-board .card.flip, .he-seat.toact .he-plate { animation: none; } }
