/* Chatters Games — mesa de juegos. Tema oscuro cálido por defecto, claro según el sistema. */
:root {
  --bg: #14110e;
  --panel: #1e1a16;
  --panel-2: #29231d;
  --line: #3a3128;
  --text: #f1e9dc;
  --muted: #a89a86;
  --accent: #e9b949;      /* dorado de la marca */
  --accent-ink: #1b1408;
  --good: #6cc36c;
  --bad: #e36a55;
  /* materiales de los tableros (no cambian con el tema: un tablero es un objeto) */
  --sq-l: #ecd9b3; --sq-d: #a87a4f;
  --wood: #d8b47a; --felt: #2f7a52; --sea: #1f5e86; --hex: #e6dccb;
  --p-red: #d9533b; --p-blue: #3b7fd9; --p-yellow: #f2c230;
  --ink-0: #f6f1e7; --ink-1: #23201c;
  --display: "Fraunces", Georgia, serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --out: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f1e8; --panel: #fffaf2; --panel-2: #f0e7d8; --line: #e0d3bf;
    --text: #231d15; --muted: #75685a; --accent: #b7861b; --accent-ink: #fff;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--body); min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font: inherit; color: inherit; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
[hidden] { display: none !important; }

/* barra superior */
.bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; padding: 12px max(16px, calc((100% - 1180px) / 2));
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.mark { display: flex; align-items: center; gap: 10px; font: 700 20px/1 var(--display); color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.mark b { color: var(--accent); font-weight: 900; }
.mark .dot { width: 18px; height: 18px; border-radius: 4px; background: conic-gradient(var(--accent) 0 25%, var(--line) 0 50%, var(--accent) 0 75%, var(--line) 0); }
.bar nav { display: flex; gap: 18px; margin-left: auto; }
.bar nav a { color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; }
.bar nav a:hover { color: var(--text); }
.bar nav a.out::after { content: " ↗"; font-size: .85em; }
.lang { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--muted); }
.lang:hover { color: var(--text); border-color: var(--muted); }

/* portada */
.hero { padding: 56px 0 28px; }
.hero h1 { font: 900 clamp(34px, 5.6vw, 64px)/1.02 var(--display); margin: 0 0 16px; letter-spacing: -.025em; max-width: 14ch; }
.hero h1 em { font-style: italic; font-weight: 500; color: var(--accent); }
.lede { color: var(--muted); max-width: 58ch; margin: 0; font-size: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.chip { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 500; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: 1fr auto; gap: 4px 14px; padding: 16px; height: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none;
  transition: transform .2s var(--out), border-color .2s, background .2s; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card .art { grid-row: span 2; width: 64px; height: 64px; }
.card .art svg { width: 100%; height: 100%; display: block; border-radius: 8px; }
.card .txt b { display: block; font: 700 19px/1.2 var(--display); margin-bottom: 2px; }
.card .txt span { color: var(--muted); font-size: 14.5px; }
.card .meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.card .rec { background: var(--panel-2); border-radius: 6px; padding: 1px 6px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.ww { display: grid; gap: 4px; margin: 36px 0 8px; padding: 22px 24px; border-radius: var(--radius); text-decoration: none; color: #f2e3c6;
  background: radial-gradient(120% 140% at 0% 0%, #5a2316 0%, #2a120c 55%, #140a07 100%); border: 1px solid #5d3524; }
.ww-k { font: 900 22px/1.15 var(--display); color: #f0b44c; }
.ww-t { color: #d8c3a2; max-width: 60ch; }
.ww-b { font-weight: 700; color: #ffd48a; margin-top: 6px; }
.ww:hover .ww-b { text-decoration: underline; }
.foot { margin-top: 48px; border-top: 1px solid var(--line); padding: 22px 0 32px; color: var(--muted); font-size: 14px; }
.foot p { margin: 0 0 4px; }

/* mesa */
.table { padding: 18px 0 8px; }
.top { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.top h1 { font: 900 clamp(26px, 3.6vw, 38px)/1 var(--display); margin: 0; letter-spacing: -.02em; }
.back { color: var(--muted); text-decoration: none; font-weight: 500; }
.back:hover { color: var(--text); }
.play { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.board-area { display: flex; justify-content: center; }
.board { --size: min(100%, calc(100dvh - 150px), 680px); width: var(--size); container-type: inline-size; position: relative; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.side { display: grid; gap: 14px; position: sticky; top: 76px; }
.players { display: grid; gap: 8px; }
.pl { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.pl.on { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.pl.won { border-color: var(--good); box-shadow: inset 3px 0 0 var(--good); }
.pl .sw { width: 18px; height: 18px; border-radius: 50%; background: var(--c); border: 1px solid #0005; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 900; color: #fff; }
.pl .nm { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl .sc { font: 700 18px/1 var(--display); font-variant-numeric: tabular-nums; }
.status { margin: 0; min-height: 3em; }
.status .st { display: block; font: 700 19px/1.25 var(--display); }
.status .st.end { color: var(--accent); }
.status .sub { display: block; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 8px 14px; cursor: pointer; font-weight: 600; transition: background .15s, border-color .15s; }
.btn:hover:not(:disabled) { border-color: var(--muted); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { padding-inline: 11px; }
.rules { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 14.5px; color: var(--muted); }
.rules summary { cursor: pointer; font-weight: 700; color: var(--text); }
.rules p { margin: 8px 0 0; }
.record { margin: 0; font-size: 13.5px; color: var(--muted); }
.movelist { margin: 0; padding: 8px 12px 8px 40px; max-height: 210px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; font-variant-numeric: tabular-nums; font-size: 14.5px; }
.movelist li { padding: 1px 0; }
.movelist li span { display: inline-block; min-width: 76px; }
.movelist li::marker { color: var(--muted); }

/* diálogo de nueva partida */
dialog.setup { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--text); padding: 22px; width: min(440px, 100% - 24px); }
dialog.setup::backdrop { background: #0009; backdrop-filter: blur(2px); }
.setup h2 { font: 900 22px/1.2 var(--display); margin: 0 0 12px; }
.setup fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.setup legend { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-block; padding: 7px 12px; border-radius: 9px; border: 1px solid var(--line); cursor: pointer; background: var(--bg); }
.opt input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--bg)); font-weight: 600; }
.opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.setup .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* ---------- piezas comunes ---------- */
.grid { display: grid; width: 100%; aspect-ratio: 1; border-radius: 6px; overflow: hidden; box-shadow: 0 10px 30px #0006, 0 0 0 1px #0003; }
.cell { position: relative; border: 0; padding: 0; margin: 0; background: none; display: grid; place-items: center; cursor: default; aspect-ratio: 1; min-width: 0; }
.cell.can { cursor: pointer; }
.disc { width: 78%; aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 -3px 0 #0003, 0 2px 4px #0004; }
.hintmark { position: absolute; inset: 18%; border-radius: 50%; border: 3px dashed var(--accent); pointer-events: none; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes drop { from { transform: translateY(var(--from, -400%)); } to { transform: none; } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes flipd { 0% { transform: rotateY(90deg); } 100% { transform: none; } }
svg.bd { width: 100%; height: auto; display: block; overflow: visible; }
svg.bd .hit { cursor: pointer; }
svg.bd text { font-family: var(--body); }

/* ajedrez y damas */
.sq-l { background: var(--sq-l); } .sq-d { background: var(--sq-d); }
.cell .coord { position: absolute; font-size: clamp(8px, 1.7cqw, 12px); font-weight: 700; opacity: .7; pointer-events: none; }
.cell .coord.f { right: 3px; bottom: 1px; } .cell .coord.r { left: 3px; top: 1px; }
.sq-l .coord { color: var(--sq-d); } .sq-d .coord { color: var(--sq-l); }
.cell.last::before { content: ""; position: absolute; inset: 0; background: #f6d55c66; }
.cell.sel::before { content: ""; position: absolute; inset: 0; background: #7dc06d88; }
.cell.check::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, #ff3b2f 0%, #ff3b2f88 40%, transparent 72%); }
.cell .dotm { position: absolute; width: 28%; aspect-ratio: 1; border-radius: 50%; background: #1e3a1a55; pointer-events: none; }
.cell .ring { position: absolute; inset: 4%; border-radius: 50%; border: 5px solid #1e3a1a55; pointer-events: none; }
.piece { font-size: 10cqw; line-height: 1; position: relative; z-index: 1; font-family: "Noto Sans Symbols 2", "Segoe UI Symbol", "Apple Symbols", "DejaVu Sans", serif; pointer-events: none; font-variant-emoji: text; }
.piece.w { color: #fffdf8; -webkit-text-stroke: 1.4px #2a2219; paint-order: stroke fill; text-shadow: 0 2px 2px #0004; }
.piece.b { color: #22201d; -webkit-text-stroke: .6px #000; text-shadow: 0 1px 1px #fff3; }
.man { width: 76%; aspect-ratio: 1; border-radius: 50%; position: relative; z-index: 1; pointer-events: none;
  box-shadow: inset 0 -4px 0 #0004, inset 0 0 0 4px #ffffff22, 0 3px 6px #0005; display: grid; place-items: center; }
.man.p0 { background: radial-gradient(circle at 40% 35%, #fffaf0, #e2d4ba); }
.man.p1 { background: radial-gradient(circle at 40% 35%, #5a4c3e, #221b15); }
.man.k::after { content: "♛"; font-size: 5.2cqw; line-height: 1; color: var(--accent); text-shadow: 0 1px 0 #0006; }
.man.ghost { opacity: .35; }
.promo { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; background: #0008; border-radius: 6px; }
.promo .box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; text-align: center; }
.promo .row { display: flex; gap: 8px; }
.promo button { width: 64px; height: 64px; border-radius: 10px; border: 1px solid var(--line); background: var(--sq-l); cursor: pointer; font-size: 44px; line-height: 1; }

/* ajedrez: tablero de madera con marco y piezas dibujadas */
.chessframe { padding: 3.4%; border-radius: 14px; position: relative;
  background: linear-gradient(145deg, #6b4428, #3d2414 55%, #2a180c); box-shadow: 0 18px 40px #0008, inset 0 1px 0 #ffffff30, inset 0 -2px 0 #0006; }
.chessframe::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: repeating-linear-gradient(92deg, #ffffff06 0 2px, #0000 2px 7px, #00000010 7px 8px); }
.grid.chessbd { border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 2px #1d1007, 0 0 0 3px #a7845a66; position: relative; }
.grid.chessbd::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(155deg, #ffffff2e 0%, #ffffff0a 28%, #0000 45%, #0000 70%, #00000018 100%); }
.chessbd .sq-l { background: repeating-linear-gradient(97deg, #0000 0 5px, #8a5a2a0d 5px 6px, #0000 6px 11px), linear-gradient(135deg, #f3e3c3, #e3cb9f); }
.chessbd .sq-d { background: repeating-linear-gradient(97deg, #0000 0 4px, #00000014 4px 5px, #0000 5px 9px), linear-gradient(135deg, #a8723f, #84532b); }
.chessbd .cell .coord { font-size: clamp(8px, 1.6cqw, 12px); }
.chessbd .cell.last::before { background: radial-gradient(circle, #ffe08a66 0%, #f6c84a55 70%); box-shadow: inset 0 0 0 2px #f6c84a88; }
.chessbd .cell.sel::before { background: radial-gradient(circle, #a8f08c88, #6cc36c55 70%); box-shadow: inset 0 0 0 3px #6cc36ccc; }
.chessbd .cell .dotm { width: 26%; background: radial-gradient(circle at 40% 35%, #ffffffaa, #2b6b3a 60%); box-shadow: 0 1px 3px #0006; opacity: .85; z-index: 2; }
.chessbd .cell .ring { border: none; inset: 3%; box-shadow: inset 0 0 0 5px #2b6b3a99; z-index: 2; }
.chessbd .man { width: 78%; box-shadow: 0 4px 6px #0006, 0 1px 0 #0008, inset 0 -5px 0 #0003, inset 0 0 0 3px #ffffff1c, inset 0 0 0 7px #00000012; }
.chessbd .man::before { content: ""; position: absolute; inset: 10% 22% 52% 18%; border-radius: 50%; background: linear-gradient(#ffffffb0, #fff0); pointer-events: none; }
.chessbd .man.p0 { background: radial-gradient(circle at 38% 30%, #fffdf6, #efe3cb 45%, #bfa983); }
.chessbd .man.p1 { background: radial-gradient(circle at 38% 30%, #7b8594, #2d3138 45%, #0b0c0e); }
.chessbd .man.p1::before { background: linear-gradient(#ffffff60, #fff0); }
.pc3 { width: 100%; height: 100%; position: relative; z-index: 1; pointer-events: none; overflow: visible; transition: transform .18s var(--out), filter .18s; }
.pc3.lift { transform: translateY(-7%) scale(1.07); filter: drop-shadow(0 8px 6px #0006); }
.pc3.slide { animation: slide .32s var(--out); z-index: 4; }
@keyframes slide { from { transform: translate(var(--dx), var(--dy)); } }
.cell.can:hover .pc3 { transform: translateY(-3%) scale(1.03); }
.promo button { display: grid; place-items: center; padding: 4px; }
.promo button .pc3 { width: 100%; height: 100%; }

/* 4 en línea */
.c4 { background: linear-gradient(#3b7fd9, #2c66b6); padding: 2.2%; border-radius: 14px; box-shadow: 0 10px 30px #0006; }
.c4 .grid { box-shadow: none; aspect-ratio: 7 / 6; gap: 0; overflow: visible; }
.c4 .cell { aspect-ratio: auto; }
.c4 .hole { width: 82%; aspect-ratio: 1; border-radius: 50%; background: var(--bg); box-shadow: inset 0 3px 6px #0007; display: grid; place-items: center; overflow: hidden; }
.c4 .hole .disc { width: 100%; box-shadow: inset 0 -4px 0 #0003; }
.c4 .hole .disc.new { animation: drop .45s cubic-bezier(.4, 0, .6, 1.3); }
.c4 .col-hover .hole { box-shadow: inset 0 3px 6px #0007, 0 0 0 2px #fff4; }
.c4 .win .disc { box-shadow: inset 0 -4px 0 #0003, 0 0 0 4px #fff; }

/* reversi */
.rv { background: var(--felt); gap: 1px; padding: 1px; background-image: linear-gradient(#0003, #0003); }
.rv .cell { background: var(--felt); }
.rv .disc.p0 { background: radial-gradient(circle at 40% 35%, #4a4540, #121110); }
.rv .disc.p1 { background: radial-gradient(circle at 40% 35%, #fffdf6, #d9d2c4); }
.rv .disc.new { animation: pop .25s var(--out); }
.rv .disc.flip { animation: flipd .35s var(--out); }
.rv .dotm { width: 22%; aspect-ratio: 1; border-radius: 50%; background: #0004; }
.rv .last .disc { box-shadow: inset 0 -3px 0 #0003, 0 0 0 3px var(--accent); }

/* tres en raya */
.ttt { gap: 8px; background: var(--line); padding: 0; box-shadow: none; border-radius: 0; }
.ttt .cell { background: var(--bg); }
.ttt .cell.can:hover { background: var(--panel); }
.ttt svg { width: 62%; height: 62%; animation: pop .25s var(--out); }
.ttt .win { background: color-mix(in srgb, var(--accent) 20%, var(--bg)); }

/* batalla naval */
.bs { display: grid; gap: 18px; }
.bs .lbl { font-weight: 700; margin: 0 0 6px; display: flex; justify-content: space-between; gap: 8px; }
.bs .lbl small { color: var(--muted); font-weight: 500; }
.bs .grid { background: var(--sea); gap: 1px; padding: 1px; box-shadow: 0 8px 22px #0005; }
.bs .cell { background: color-mix(in srgb, var(--sea) 85%, #fff); }
.bs .cell.can:hover { background: color-mix(in srgb, var(--sea) 60%, #fff); }
.bs .ship { background: #8b96a3; }
.bs .ship.sunk { background: #5b3a33; }
.bs .ghost-ok { background: #7dc06d; } .bs .ghost-bad { background: #d96a5b; }
.bs .mk-miss::after { content: ""; width: 22%; aspect-ratio: 1; border-radius: 50%; background: #ffffffa0; }
.bs .mk-hit::after { content: "✕"; color: #ff5a3c; font-weight: 900; font-size: calc(var(--cs, 30px) * .7); line-height: 1; text-shadow: 0 0 6px #000; }
.bs .mk-new::after { animation: pop .3s var(--out); }
.bs .fleet { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bs .fleet span { display: inline-flex; gap: 2px; }
.bs .fleet i { width: 10px; height: 10px; background: #8b96a3; border-radius: 2px; }
.bs .fleet span.gone i { background: #5b3a33; }
.bs .fleet span.cur i { background: var(--accent); }
.bs .setup-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
/* ocho loco — cartas en HTML, medidas relativas al ancho de la mesa (cqw) */
.c8 { --cw: clamp(48px, 13.5cqw, 96px); position: relative; display: grid; gap: 4.5cqw; padding: 4cqw 3cqw 5cqw; border-radius: 22px;
  background: radial-gradient(120% 90% at 50% 40%, #2f7a52, #1d5136); box-shadow: inset 0 0 0 1px #0004, inset 0 2px 24px #0005; color: #f1efe6; }
.pc { width: var(--cw); aspect-ratio: 5 / 7; border-radius: calc(var(--cw) * .1); background: #fbf8f1; border: 1px solid #0003; box-shadow: 0 1px 2px #0005, 0 4px 10px #0002;
  position: relative; display: grid; place-items: center; font-family: Georgia, "Times New Roman", serif; flex: none; }
.pc.red { color: #c8382a; } .pc.blk { color: #1e1c1a; }
.pc .ix { position: absolute; top: 5%; left: 8%; display: grid; justify-items: center; font-weight: 700; font-size: calc(var(--cw) * .24); line-height: .95; }
.pc .ix i { font-style: normal; font-size: .8em; }
.pc .ix.b { top: auto; left: auto; bottom: 5%; right: 8%; transform: rotate(180deg); }
.pc .pip { font-size: calc(var(--cw) * .5); line-height: 1; }
.pc.back { background: repeating-linear-gradient(45deg, #a3362a 0 4px, #8a2b21 4px 8px); border: calc(var(--cw) * .06) solid #fbf8f1; }
.pc.empty { background: none; border: 2px dashed #ffffff40; box-shadow: none; }
.pc.sm { --cw: clamp(22px, 6cqw, 40px); }
.pc.sm .ix, .pc.sm .ix.b { display: none; } .pc.sm .pip { font-size: calc(var(--cw) * .55); }
.c8-opp { display: flex; justify-content: space-around; gap: 3cqw; flex-wrap: wrap; }
.c8-opp .seat { display: grid; justify-items: center; gap: 6px; padding: 8px 10px; border-radius: 14px; border: 1px solid transparent; transition: border-color .2s, background .2s; min-width: 0; }
.c8-opp .seat.on { border-color: var(--accent); background: #0002; }
.c8-opp .seat.won { border-color: var(--good); }
.c8-opp .fan { display: flex; min-height: calc(clamp(22px, 6cqw, 40px) * 1.4); }
.c8-opp .fan .pc + .pc { margin-left: calc(clamp(22px, 6cqw, 40px) * -.62); }
.c8-opp .who { display: flex; align-items: center; gap: 6px; font-size: clamp(12px, 2.6cqw, 15px); font-weight: 600; white-space: nowrap; }
.c8-opp .who i { width: 10px; height: 10px; border-radius: 50%; }
.c8-opp .last { font-size: 12px; font-weight: 800; color: var(--accent); animation: pulse 1.2s infinite; }
.c8-mid { display: flex; align-items: center; justify-content: center; gap: 6cqw; }
.c8 .stock { all: unset; position: relative; display: grid; justify-items: center; gap: 6px; cursor: default; border-radius: 10px; }
.c8 .stock.go { cursor: pointer; }
.c8 .stock.go .pc { box-shadow: 0 0 0 3px var(--accent), 0 6px 16px #0006; transition: transform .15s var(--out); }
.c8 .stock.go:hover .pc { transform: translateY(-3px); }
.c8 .stock:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.c8 .stock .lbl { font-size: 13px; font-weight: 700; opacity: .85; }
.c8 .disc { position: relative; width: calc(var(--cw) * 1.3); height: calc(var(--cw) * 1.4); display: grid; place-items: center; }
.c8 .disc .pc { position: absolute; transform: rotate(var(--r)); }
.c8 .disc .pc.top { animation: c8in .28s var(--out); }
@keyframes c8in { from { transform: translateY(-18px) rotate(calc(var(--r) - 14deg)) scale(1.06); opacity: .3; } }
.c8 .calls { display: grid; justify-items: center; gap: 2px; min-width: 70px; }
.c8 .suitnow { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; background: #fbf8f1; box-shadow: 0 2px 6px #0005; }
.c8 .suitnow.red { color: #c8382a; } .c8 .suitnow.blk { color: #1e1c1a; }
.c8 .suitnow.asked { box-shadow: 0 0 0 3px var(--accent), 0 2px 6px #0005; }
.c8 .calls small { font-size: 12.5px; opacity: .9; text-align: center; }
.c8 .dir { font-size: 22px; opacity: .8; }
.c8 .pen { font: 800 18px/1 var(--display); color: #ffd36b; background: #0005; padding: 3px 8px; border-radius: 999px; }
.c8-hand { display: flex; justify-content: center; padding: 10px 4px 2px; border-radius: 14px; border: 1px solid transparent;
  --step: min(calc(var(--cw) * .72), calc((100cqw - 8cqw - var(--cw)) / max(1, var(--n) - 1))); }
.c8-hand.on { border-color: #ffffff2a; background: #0001; }
.c8-hand .slot { all: unset; flex: none; width: var(--step); cursor: default; transition: transform .15s var(--out); }
.c8-hand .slot:last-child { width: var(--cw); }
.c8-hand .slot .pc { filter: brightness(.78) saturate(.7); }
.c8-hand .slot.ok { cursor: pointer; transform: translateY(-8px); }
.c8-hand .slot.ok .pc { filter: none; box-shadow: 0 0 0 2px var(--accent), 0 6px 14px #0006; }
.c8-hand .slot.ok:hover, .c8-hand .slot.ok:focus-visible { transform: translateY(-16px); }
.c8-hand .slot:focus-visible .pc { outline: 3px solid var(--accent); outline-offset: 2px; }
.c8-hand .slot.new .pc::after { content: ""; position: absolute; inset: -5px; border-radius: inherit; border: 2px dashed #fff8; }
.c8-hand:not(.on) .slot .pc { filter: none; }
.c8-pick { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; gap: 14px; text-align: center; border-radius: 22px; background: #0d1f16e6; backdrop-filter: blur(3px); padding: 16px; }
.c8-pick p { margin: 0; font: 700 clamp(16px, 3.4cqw, 22px)/1.25 var(--display); }
.c8-pick > div { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.c8-pick .suit { width: 78px; height: 92px; border-radius: 12px; border: 0; background: #fbf8f1; cursor: pointer; display: grid; place-content: center; gap: 4px; box-shadow: 0 3px 10px #0006; transition: transform .12s; }
.c8-pick .suit:hover, .c8-pick .suit:focus-visible { transform: translateY(-4px); }
.c8-pick .suit span { font-size: 38px; line-height: 1; } .c8-pick .suit small { font-size: 12px; font-weight: 700; }
.c8-pick .suit.red { color: #c8382a; } .c8-pick .suit.blk { color: #1e1c1a; }
.c8-pick .btn { justify-self: center; color: #f1efe6; background: transparent; border-color: #ffffff40; }

/* partidas online */
.btn.invite { border-color: var(--accent); color: var(--accent); }
.btn.big { padding: 12px 22px; font-size: 17px; }
.btn.wa { background: #25d366; border-color: #25d366; color: #0b2a17; text-decoration: none; }
.online .top .code { font: 700 15px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .14em; padding: 6px 10px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); }
.panel-msg { display: grid; gap: 14px; justify-items: start; padding: clamp(20px, 5cqw, 40px); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.panel-msg h2 { margin: 0; font: 800 clamp(22px, 4.4cqw, 32px)/1.15 var(--display); letter-spacing: -.015em; }
.panel-msg p { margin: 0; color: var(--muted); }
.panel-msg .kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: var(--accent); }
.field { display: grid; gap: 6px; width: min(100%, 360px); font-weight: 600; font-size: 14px; }
.field input, .linkbox input { font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); min-width: 0; }
.field input:focus, .linkbox input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.linkbox { display: flex; gap: 8px; width: 100%; }
.linkbox input { flex: 1; font-size: 14px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.sharebtns { display: flex; flex-wrap: wrap; gap: 8px; }
.seats { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; width: 100%; }
.seats li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); font-weight: 600; }
.seats li small { color: var(--muted); font-weight: 500; }
.seats li.empty { background: none; border: 1px dashed var(--line); color: var(--muted); font-weight: 500; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; margin-right: 6px; vertical-align: middle; }
.dot.on { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); }
.pl .wins { font-size: 13px; color: var(--muted); font-weight: 700; }
.err { color: var(--bad) !important; font-weight: 600; }
dialog.setup .hint { color: var(--muted); font-size: 14.5px; margin: 0 0 12px; }
dialog.setup .field { margin-bottom: 14px; }
.net-off .board::after { content: "Reconectando…"; position: absolute; top: 8px; right: 8px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 999px; }
html[lang=en] .net-off .board::after { content: "Reconnecting…"; }

@media (min-width: 900px) { .bs.two { grid-template-columns: 1fr 1fr; } }

@media (max-width: 860px) {
  .players:has(.pl:nth-child(3)) { grid-template-columns: 1fr 1fr; }
  .play { grid-template-columns: 1fr; }
  .side { position: static; }
  .board { --size: min(100%, 560px); }
  .hero { padding-top: 36px; }
}
@media (max-width: 480px) {
  .bar { gap: 12px; }
  .bar nav a:first-child { display: none; }
  .card { grid-template-columns: 52px 1fr; padding: 14px; }
  .card .art { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
