/* Pick & Toe - pizarra tactica de baloncesto sobre pista pintada */
/* Tipografias alojadas en la propia web (sin llamadas a Google): Bricolage Grotesque (OFL) y Permanent Marker (Apache 2.0) */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800; font-stretch: 75% 100%;
  src: url(fonts/bricolage-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800; font-stretch: 75% 100%;
  src: url(fonts/bricolage-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Permanent Marker"; font-style: normal; font-display: swap; font-weight: 400;
  src: url(fonts/permanent-marker-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg0: #06242C;
  --bg1: #0A3541;
  --bg2: #12596A;
  --paper: #F4F6F3;
  --ink: #1B232B;
  --red: #FF5A47;
  --red-ink: #D93A2B;
  --blue: #5B93FF;
  --blue-ink: #1F58C9;
  --cinta: #FFD23F;
  --ball: #FF8A3D;
  --mint: #5CE0A6;
  --mute: #9FC0C8;
  --liga: var(--cinta);
  --turn: var(--red-ink);
  --colw: calc(var(--bw) + 20px);
  --bw: clamp(280px, min(calc(100vw - 48px), max(430px, calc(100svh - 402px))), 640px);
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --marker: "Permanent Marker", "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  color-scheme: dark;
}
body[data-league="nba"] { --liga: #FF6B57; }
body[data-league="acb"] { --liga: #35D6A0; }
body[data-league="euroleague"] { --liga: #9AA5FF; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100svh; position: relative;
  background: var(--bg0); color: #fff;
  font-family: var(--font); font-size: 17px; line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ico { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }

/* ---------- fondo: pista ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 70%); }
.court { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.court .lines { fill: none; stroke: rgba(255, 255, 255, .075); stroke-width: 5; stroke-linecap: round; }
.court .paint { fill: rgba(255, 255, 255, .028); }
.bg .glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 520px at 50% 18%, color-mix(in srgb, var(--liga) 17%, transparent), transparent 70%),
    radial-gradient(700px 500px at 100% 100%, rgba(255, 138, 61, .10), transparent 70%),
    radial-gradient(1200px 800px at 50% 50%, transparent 55%, rgba(0, 0, 0, .38) 100%);
  transition: background .5s;
}

/* ---------- cabecera ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1120px; margin: 0 auto; padding: 14px clamp(14px, 4vw, 32px); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; line-height: 1; }
.brand-ball { width: 38px; height: 38px; flex: none; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .25)); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover .brand-ball { transform: rotate(180deg) translateY(-2px); }
.brand-text { display: inline-flex; align-items: baseline; gap: 5px; font-size: clamp(25px, 5vw, 32px); font-weight: 800; font-stretch: 75%; letter-spacing: -.015em; text-transform: uppercase; }
.brand-text i { font-style: normal; font-weight: 800; font-stretch: 100%; color: var(--cinta); font-size: .9em; transform: rotate(-8deg); }
.top-actions { display: flex; gap: 6px; }
.iconbtn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .07); color: #fff; cursor: pointer; transition: background .15s, transform .1s; }
.iconbtn:hover { background: rgba(255, 255, 255, .14); }
.iconbtn:active { transform: scale(.94); }
.iconbtn .ico { width: 22px; height: 22px; }
.iconbtn[aria-pressed="false"] { color: var(--mute); }
:focus-visible { outline: 3px solid var(--cinta); outline-offset: 3px; }

main { max-width: 1120px; margin: 0 auto; padding: 0 clamp(14px, 4vw, 32px) 24px; }
.screen { display: block; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border: 0; border-radius: 12px 14px 12px 15px; font-weight: 700; line-height: 1.2; cursor: pointer; text-decoration: none; transition: transform .1s, box-shadow .1s, background .15s, border-color .15s; }
.btn.primary { background: var(--cinta); color: #241C00; box-shadow: 0 4px 0 #B8941B, 0 10px 24px rgba(255, 210, 63, .22); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 5px 0 #B8941B, 0 12px 28px rgba(255, 210, 63, .3); }
.btn.primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #B8941B; }
.btn.ghost { background: rgba(255, 255, 255, .05); color: #fff; border: 2px solid rgba(255, 255, 255, .26); padding: 9px 14px; }
.btn.ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }
.btn.small { padding: 8px 12px; font-size: 15px; }
.btn.quiet { background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; padding-left: 6px; padding-right: 6px; }
.btn.wide { width: 100%; padding: 15px 18px; font-size: 19px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ============================ INICIO ============================ */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: clamp(20px, 5vw, 56px); padding: clamp(8px, 3vw, 28px) 0 clamp(20px, 4vw, 40px); }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 5px 12px 5px 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }
.kicker .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--liga); box-shadow: 0 0 0 4px color-mix(in srgb, var(--liga) 28%, transparent); }
.hero h2 { margin: 0 0 14px; font-size: clamp(46px, 8.4vw, 92px); font-weight: 800; font-stretch: 75%; line-height: .92; letter-spacing: -.02em; text-wrap: balance; }
.hero h2 em { position: relative; font-family: var(--marker); font-style: normal; font-weight: 400; font-stretch: 100%; color: var(--cinta); white-space: nowrap; }
.hero h2 em::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: -.1em; height: .2em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9C40 3 80 12 120 6S180 4 197 8' fill='none' stroke='%23FF8A3D' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.lede { max-width: 46ch; margin: 0 0 22px; font-size: clamp(17px, 2.2vw, 20px); color: #D7E9ED; text-wrap: pretty; }
.lede b { color: #fff; }

.daily { display: flex; align-items: center; gap: 14px; width: min(100%, 440px); padding: 14px 14px 14px 16px; border: 0; border-radius: 20px; text-align: left; cursor: pointer; color: #231A00;
  background: linear-gradient(135deg, #FFD23F 0%, #FFB23F 55%, #FF8A3D 100%);
  box-shadow: 0 6px 0 #A8741A, 0 18px 40px rgba(255, 150, 40, .28); transition: transform .12s, box-shadow .12s; }
.daily:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #A8741A, 0 22px 46px rgba(255, 150, 40, .36); }
.daily:active { transform: translateY(4px); box-shadow: 0 2px 0 #A8741A; }
.daily-ico { display: grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 15px; background: rgba(35, 26, 0, .14); }
.daily-ico .ico { width: 28px; height: 28px; stroke-width: 2; }
.daily-text { flex: 1; min-width: 0; line-height: 1.15; }
.daily-text b { display: block; font-size: 21px; font-weight: 800; }
.daily-text small { display: block; margin-top: 3px; font-size: 14.5px; font-weight: 600; opacity: .78; }
.daily-go { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: #231A00; color: var(--cinta); }
.daily-go .ico { fill: currentColor; stroke: none; width: 20px; height: 20px; margin-left: 2px; }
.daily[data-done="1"] .daily-go .ico { margin-left: 0; }
.streakline { display: flex; align-items: center; gap: 6px; margin: 12px 2px 0; font-weight: 700; color: #FFD9A8; }
.streakline .ico { color: var(--ball); fill: rgba(255, 138, 61, .35); }

/* demo animada */
.hero-demo { justify-self: center; width: min(100%, 400px); transform: rotate(2deg); }
.demo-frame { padding: 8px; border-radius: 13px; background: linear-gradient(180deg, #E1E6E9, #B9C3C9); box-shadow: 0 2px 0 #8A959D, 0 26px 50px rgba(0, 0, 0, .45), inset 0 1px 0 #fff; }
.demo-board { position: relative; aspect-ratio: 1; border-radius: 6px; background: linear-gradient(112deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, .7) 49%, rgba(255, 255, 255, 0) 56%), var(--paper); }
.demo-board svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.demo-board .dmark path { fill: none; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .5s ease-out; }
.demo-board .dmark.x path { stroke: var(--red-ink); }
.demo-board .dmark.o path { stroke: var(--blue-ink); }
.demo-board .dmark.on path { stroke-dashoffset: 0; }
.demo-board .dname { font: 700 13px var(--font); fill: var(--ink); opacity: 0; transition: opacity .3s .3s; text-anchor: middle; }
.demo-board .dmark.on + .dname { opacity: 1; }
.demo-board .dstrike path { fill: none; stroke: var(--red-ink); stroke-width: 11; stroke-linecap: round; opacity: .85; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .6s ease-out; }
.demo-board .dstrike.on path { stroke-dashoffset: 0; }
.demo-cap { margin: 14px 0 0; text-align: center; font-family: var(--marker); font-size: 19px; color: var(--cinta); transform: rotate(-1.5deg); min-height: 1.5em; }

/* secciones */
.section-head { display: flex; align-items: center; gap: 12px; margin: clamp(18px, 3vw, 30px) 0 14px; }
.section-head h3 { margin: 0; font-size: 24px; font-weight: 800; font-stretch: 85%; letter-spacing: -.01em; }
.step { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--liga); color: #1A1A1A; font-weight: 800; font-size: 16px; transition: background .4s; }
.pool-info { margin-left: auto; font-size: 14.5px; color: var(--mute); text-align: right; }

.leagues { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.league { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 14px 13px; border: 2px solid rgba(255, 255, 255, .13); border-radius: 18px; background: rgba(255, 255, 255, .045); color: #fff; text-align: left; cursor: pointer; transition: transform .14s, border-color .2s, background .2s, box-shadow .2s; }
.league .lg-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; font-weight: 800; font-size: 15px; letter-spacing: .02em; color: #fff; background: var(--lc); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .2); }
.league b { font-size: 19px; font-weight: 800; font-stretch: 88%; line-height: 1.1; }
.league small { font-size: 13.5px; color: var(--mute); line-height: 1.25; }
.league[aria-checked="true"] { border-color: var(--lc); background: color-mix(in srgb, var(--lc) 16%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lc) 20%, transparent), 0 14px 34px rgba(0, 0, 0, .25); }
.league[aria-checked="true"]::after { content: ""; position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--lc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.500l4 4 8-9' fill='none' stroke='%23111' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.league[data-l="all"] { --lc: #FFD23F; }
.league[data-l="nba"] { --lc: #FF6B57; }
.league[data-l="acb"] { --lc: #35D6A0; }
.league[data-l="euroleague"] { --lc: #9AA5FF; }
.league[data-l="all"] .lg-ico { color: #231A00; }
.league[data-l="nba"] .lg-ico { color: #2A0B07; }
.league[data-l="acb"] .lg-ico { color: #05281D; }
.league[data-l="euroleague"] .lg-ico { color: #0E1450; }

.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.mode { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 2px solid rgba(255, 255, 255, .11); border-radius: 20px; background: linear-gradient(160deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)); color: #fff; text-align: left; cursor: pointer; overflow: hidden; transition: transform .15s, border-color .2s, box-shadow .2s; }
.mode::before { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--mc); opacity: .16; transition: transform .3s, opacity .3s; }
.mode:hover { transform: translateY(-3px) rotate(-.4deg); border-color: var(--mc); box-shadow: 0 16px 36px rgba(0, 0, 0, .3); }
.mode:hover::before { transform: scale(1.5); opacity: .24; }
.mode:active { transform: translateY(0) scale(.99); }
.mode .m-ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--mc); color: #14171A; }
.mode .m-ico .ico { width: 26px; height: 26px; stroke-width: 2; }
.mode b { font-size: 21px; font-weight: 800; font-stretch: 85%; line-height: 1.1; }
.mode p { margin: 0; font-size: 15px; line-height: 1.38; color: #C9DEE3; }
.mode .m-tag { position: absolute; top: 14px; right: 14px; padding: 2px 9px; border-radius: 99px; background: rgba(255, 255, 255, .12); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #fff; }
.mode[data-m="cpu"] { --mc: #8EE3FF; }
.mode[data-m="local"] { --mc: #FFB1A4; }
.mode[data-m="online"] { --mc: #B4F0A0; }
.mode[data-m="practice"] { --mc: #FFD98A; }

/* ============================ PARTIDA ============================ */
#game { display: flex; flex-direction: column; align-items: center; }
.gamebar { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: var(--colw); margin: 0 0 10px; }
.gametitle { display: flex; flex-direction: column; align-items: center; line-height: 1.15; text-align: center; min-width: 0; }
.gametitle b { font-size: 17px; font-weight: 800; }
.chip-league { margin-top: 2px; padding: 1px 10px; border-radius: 99px; background: color-mix(in srgb, var(--liga) 25%, transparent); color: color-mix(in srgb, var(--liga) 60%, #fff); font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.gamebar .btn .lbl { display: none; }
@media (min-width: 560px) { .gamebar .btn .lbl { display: inline; } }

.hud { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: var(--colw); margin: 8px 0 14px; }
.pcard { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 12px 9px 9px; border: 2px solid rgba(255, 255, 255, .1); border-radius: 16px; background: rgba(255, 255, 255, .055); transition: border-color .2s, background .2s, box-shadow .25s, transform .2s; }
.pcard[data-seat="0"] { --pc: var(--red); --pi: var(--red-ink); }
.pcard[data-seat="1"] { --pc: var(--blue); --pi: var(--blue-ink); }
.pcard[data-seat="1"] { flex-direction: row-reverse; text-align: right; }
.pmark { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px; background: var(--paper); color: var(--pi); box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.pmark svg { width: 70%; height: 70%; }
.pmark path { fill: none; stroke: currentColor; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }
.ptext { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.pname { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.psub { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 12.5px; color: var(--mute); min-height: 14px; }
.pcard[data-seat="1"] .psub { justify-content: flex-end; }
.pip { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--pc); background: var(--pc); }
.pip.off { background: transparent; opacity: .45; }
.pturn { position: absolute; top: -10px; padding: 1px 10px; border-radius: 99px; background: var(--cinta); color: #241C00; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: 0; transform: translateY(4px) scale(.9); transition: opacity .2s, transform .2s; }
.pcard[data-seat="0"] .pturn { left: 12px; } .pcard[data-seat="1"] .pturn { right: 12px; }
.pcard[data-active="1"] { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 20%, rgba(255, 255, 255, .04)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pc) 20%, transparent), 0 10px 30px color-mix(in srgb, var(--pc) 30%, transparent); transform: translateY(-2px); }
.pcard[data-active="1"] .pturn { opacity: 1; transform: none; }
.pcard[data-think="1"] .pturn::after { content: "…"; animation: dots 1s steps(4) infinite; display: inline-block; width: 1em; text-align: left; overflow: hidden; vertical-align: bottom; }
.pcard[data-off="1"] { opacity: .55; }
.emote { position: absolute; top: -34px; left: 50%; font-size: 34px; opacity: 0; pointer-events: none; }
.emote.go { animation: emote 1.8s ease-out forwards; }
@keyframes emote { 0% { opacity: 0; transform: translate(-50%, 14px) scale(.4); } 14% { opacity: 1; transform: translate(-50%, 0) scale(1.25); } 30% { transform: translate(-50%, -2px) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -34px) scale(1); } }
@keyframes dots { to { width: 1.1em; } }

.clock { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.clock .bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.clock .bar span { display: block; height: 100%; border-radius: 4px; background: var(--cinta); transform-origin: left; }
.clock.low .bar span { background: #FF6A58; }
.clock.low .secs { color: #FFB4A8; animation: tickpulse 1s infinite; }
.clock .secs { min-width: 3.4ch; font-size: 16px; font-variant-numeric: tabular-nums; text-align: right; }
@keyframes tickpulse { 50% { transform: scale(1.15); } }

.solohud { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 10px; width: var(--colw); margin: 0 0 14px; }
.stat { padding: 8px 12px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 2px solid rgba(255, 255, 255, .08); line-height: 1.1; }
.stat small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.stat b { display: block; margin-top: 3px; font-size: 25px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat b.bump { animation: bump .4s; }
@keyframes bump { 40% { transform: scale(1.25); color: var(--cinta); } }
.pips { display: flex; gap: 4px; margin-top: 8px; }
.pips i { flex: 1; max-width: 22px; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .17); }
.pips i.hit { background: var(--mint); }
.pips i.miss { background: #FF6A58; }
.pips.endless i { display: none; }
.pips.endless::after { content: "Sin límite"; font-size: 15px; font-weight: 700; color: #DDEFF2; }

/* pizarra */
.stage { display: flex; flex-direction: column; align-items: center; width: 100%; }
.frame { position: relative; width: var(--colw); padding: 10px; border-radius: 15px; background: linear-gradient(180deg, #E3E8EB, #B9C3C9); box-shadow: 0 2px 0 #8A959D, 0 28px 54px rgba(0, 0, 0, .46), inset 0 1px 0 #fff; }
.frame::before, .frame::after { content: ""; position: absolute; top: 4px; width: 5px; height: 5px; border-radius: 50%; background: #8E99A1; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); }
.frame::before { left: 5px; } .frame::after { right: 5px; }
.board { position: relative; width: 100%; aspect-ratio: 1; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); border-radius: 6px; color: var(--ink);
  background: linear-gradient(112deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, .75) 49%, rgba(255, 255, 255, 0) 58%), var(--paper); }
.lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lines path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .88; }
.lines path.strong { stroke-width: 5; }
.ledge { position: relative; z-index: 1; width: var(--colw); margin-top: -1px; padding: 0 8%; }
.ledge-svg { display: block; width: 100%; height: auto; padding: 0; background: linear-gradient(180deg, #98A3AB, #7C8890); border-radius: 0 0 10px 10px; box-shadow: 0 10px 20px rgba(0, 0, 0, .3); }
.ledge .mk { transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); transform-box: fill-box; }
.stage[data-turn="0"] .mk-red, .stage[data-turn="1"] .mk-blue { transform: translateY(-5px) rotate(-3deg); filter: drop-shadow(0 0 5px rgba(255, 255, 255, .6)); }

[data-state="red"] { color: var(--red-ink); }
[data-state="blue"] { color: var(--blue-ink); }

.corner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; padding: 4px; }
.corner .mark { width: 46%; height: auto; aspect-ratio: 1; }
.turn-name { font-size: clamp(10px, 2.6vw, 13px); font-weight: 800; color: var(--ink); line-height: 1.1; text-align: center; }

.head { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0; padding: 6px 4px; text-align: center; }
.disc { display: grid; place-items: center; width: clamp(34px, 9.4vw, 56px); aspect-ratio: 1; border-radius: 50%; font-weight: 800; font-size: clamp(10px, 2.7vw, 15.5px); letter-spacing: .02em; line-height: 1; transform: rotate(var(--rot, 0deg)); }
.head:nth-child(2) .disc, .head:nth-child(6) .disc { --rot: -4deg; } .head:nth-child(3) .disc, .head:nth-child(10) .disc { --rot: 3deg; } .head:nth-child(4) .disc, .head:nth-child(14) .disc { --rot: -2deg; }
.disc.team { background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 46%), var(--c); color: var(--on); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .22), 0 3px 0 rgba(0, 0, 0, .3), 0 7px 10px rgba(0, 0, 0, .16); }
.disc.country { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 5px #fff, inset 0 0 0 6.500px var(--ink), 0 3px 0 rgba(0, 0, 0, .18); }
.head .name { max-width: 100%; font-size: clamp(9.5px, 2.45vw, 13px); font-weight: 700; line-height: 1.12; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }

.cell { position: relative; display: block; min-width: 0; padding: 0; background: transparent; border: 0; cursor: pointer; border-radius: 10px; transition: background .15s; }
.cell:focus-visible { outline: 3px solid var(--ink); outline-offset: -6px; }
.cell[data-state="empty"]::before { content: ""; position: absolute; inset: 14%; background: var(--ghost) center / contain no-repeat; opacity: 0; transition: opacity .15s, transform .15s; transform: scale(.85) rotate(-6deg); }
.board[data-turn="0"] .cell { --ghost: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M16 14C34 30 58 54 86 88M85 12C66 34 38 62 14 90' fill='none' stroke='%23D93A2B' stroke-width='9' stroke-linecap='round'/%3E%3C/svg%3E"); }
.board[data-turn="1"] .cell { --ghost: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M52 10C80 8 94 34 89 60C84 84 56 95 33 88C10 80 6 46 24 26C33 16 46 11 62 13' fill='none' stroke='%231F58C9' stroke-width='9' stroke-linecap='round'/%3E%3C/svg%3E"); }
@media (hover: hover) {
  .board:not([data-lock="1"]) .cell[data-state="empty"]:hover { background: color-mix(in srgb, var(--turn) 8%, transparent); }
  .board:not([data-lock="1"]) .cell[data-state="empty"]:hover::before { opacity: .3; transform: none; }
  .board:not([data-lock="1"]) .cell[data-steal="1"]:hover::after { opacity: .7; }
}
.cell[data-state="empty"]:focus-visible::before { opacity: .3; transform: none; }
.board[data-lock="1"] .cell { cursor: default; }
.cell[data-steal="1"]::after { content: ""; position: absolute; inset: 7px; border: 2px dashed currentColor; border-radius: 10px; opacity: .26; pointer-events: none; transition: opacity .15s; }
.cell[data-aim="1"] { background: color-mix(in srgb, var(--turn) 13%, transparent); }

.mark { display: block; }
.mark path { fill: none; stroke: currentColor; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.cell .mark { position: absolute; left: 14%; top: 7%; width: 72%; height: 72%; }
.cell .who { position: absolute; left: 6%; right: 6%; bottom: 5%; padding: 2px 4px; border-radius: 4px; background: rgba(255, 255, 255, .94); color: var(--ink); font-size: clamp(9px, 2.3vw, 12.5px); font-weight: 800; line-height: 1.15; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 0 rgba(0, 0, 0, .14); }
.cell.fresh .mark { animation: stamp .5s cubic-bezier(.2, 1.5, .4, 1); }
.cell.fresh .mark path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .3s ease-out forwards; }
.cell.fresh .mark path + path { animation-delay: .17s; }
.cell.fresh .who { animation: rise .3s .25s backwards; }
.cell.fresh::after { content: ""; position: absolute; left: 50%; top: 42%; width: 70%; aspect-ratio: 1; border-radius: 50%; border: 3px solid currentColor; transform: translate(-50%, -50%); pointer-events: none; animation: burst .65s ease-out forwards; }
.cell.shake { animation: shake .4s; }
.cell.miss { background: rgba(217, 58, 43, .14); }
.cell .oops { position: absolute; left: -2%; right: -2%; top: 34%; z-index: 2; padding: 0 3px; font-family: var(--marker); font-size: clamp(11px, 3vw, 17px); line-height: 1.05; text-align: center; color: var(--red-ink); text-decoration: line-through 3px; text-decoration-color: rgba(217, 58, 43, .9); transform: rotate(-5deg); pointer-events: none; animation: oops 2.1s ease-out forwards; overflow-wrap: anywhere; }
.cell.win .mark { animation: winpulse .9s ease-in-out .7s 3; }
.board.over .cell:not(.win) { opacity: .5; transition: opacity .5s .4s; }
.cell.solo-filled { cursor: default; }
.cell.solo-filled .mark { display: none; }
.cell.solo-filled .check { position: absolute; left: 50%; top: 36%; width: 40%; aspect-ratio: 1; transform: translate(-50%, -50%); color: #14935A; }
.cell.solo-filled .check path { fill: none; stroke: currentColor; stroke-width: 11; stroke-linecap: round; stroke-linejoin: round; }

.strike { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.strike path { fill: none; stroke-width: 11; stroke-linecap: round; opacity: .85; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .55s ease-out .2s forwards; }
.strike[data-state="red"] path { stroke: var(--red-ink); }
.strike[data-state="blue"] path { stroke: var(--blue-ink); }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes stamp { 0% { transform: scale(1.7) rotate(-14deg); opacity: 0; } 50% { opacity: 1; } 100% { transform: none; } }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } }
@keyframes burst { 0% { transform: translate(-50%, -50%) scale(.3); opacity: .7; } 100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 45% { transform: translateX(6px); } 70% { transform: translateX(-3px); } }
@keyframes oops { 0% { opacity: 0; transform: rotate(-5deg) scale(.6); } 12% { opacity: 1; transform: rotate(-5deg) scale(1.1); } 25% { transform: rotate(-5deg) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: rotate(-5deg) translateY(-8px); } }
@keyframes winpulse { 50% { transform: scale(1.12); } }

.readout { width: var(--colw); margin-top: 16px; min-height: 3.4em; }
.status { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.25; }
.status[data-kind="bad"] { color: #FFB4A8; }
.status[data-kind="good"] { color: #A8F0C6; }
.substatus { margin: 3px 0 0; font-size: 15px; color: var(--mute); }
.gametools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: var(--colw); margin-top: 6px; }
.emotes { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; width: var(--colw); margin-top: 12px; }
.emotes button { width: 46px; height: 46px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, .09); font-size: 24px; line-height: 1; cursor: pointer; transition: transform .1s, background .15s; }
.emotes button:hover { background: rgba(255, 255, 255, .17); transform: translateY(-2px); }
.emotes button:active { transform: scale(.9); }
.emotes button[disabled] { opacity: .4; }

/* ============================ ANUNCIOS ============================ */
.ad { display: none; margin: 0 auto; text-align: center; }
html.ads-on .ad, html.ads-demo .ad { display: block; }
.ad .ad-tag { display: block; margin-bottom: 4px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.ad .ad-box { min-height: 90px; }
html.ads-demo .ad .ad-box { display: grid; place-items: center; border: 2px dashed rgba(255, 255, 255, .28); border-radius: 12px; color: rgba(255, 255, 255, .5); font-size: 14px; }
html.ads-demo .ad .ad-box::after { content: "Aquí va un anuncio"; }
.ad-home { width: min(100%, 728px); margin: clamp(30px, 5vw, 52px) auto 0; }
.ad-game { width: min(100%, 728px); margin-top: 60px; }
.ad-content { width: min(100%, 728px); margin: 36px auto 0; }
.ad-rail { display: none !important; }
@media (min-width: 1500px) {
  html.ads-on .ad-rail, html.ads-demo .ad-rail { display: block !important; position: fixed; right: 24px; top: 110px; width: 160px; }
  .ad-rail .ad-box { min-height: 600px; }
}

/* ============================ CONTENIDO ============================ */
.content { padding: 40px clamp(14px, 4vw, 32px) 20px; }
.content-in { max-width: 820px; margin: 0 auto; padding: clamp(18px, 4vw, 36px); border-radius: 24px; background: rgba(5, 28, 35, .62); border: 1px solid rgba(255, 255, 255, .08); backdrop-filter: blur(6px); }
.content h2 { margin: 1.4em 0 .5em; font-size: clamp(24px, 4vw, 32px); font-weight: 800; font-stretch: 82%; line-height: 1.1; text-wrap: balance; }
.content h2:first-child { margin-top: 0; }
.content p, .content li { color: #D4E7EB; max-width: 66ch; }
.rules { margin: 0 0 14px; padding-left: 1.3em; }
.rules li { margin-bottom: 8px; padding-left: 4px; }
.rules b { color: #fff; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.cards article { padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .055); }
.cards h3 { margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.cards p { margin: 0; font-size: 15.5px; }
.content details { border-bottom: 1px solid rgba(255, 255, 255, .12); }
.content summary { padding: 13px 0; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.content summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--cinta); transition: transform .2s; }
.content details[open] summary::after { transform: rotate(45deg); }
.content details p { margin: 0 0 14px; }
.content a { color: var(--cinta); }
.foot { padding: 8px clamp(14px, 4vw, 32px) 44px; }
.foot-in { max-width: 820px; margin: 0 auto; font-size: 14px; color: var(--mute); }
.foot-in p { max-width: 70ch; margin: 0 0 8px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 14px; font-weight: 700; }
.foot-links a, .foot-links .linkbtn { color: #D4E7EB; }
.noscript { padding: 16px; text-align: center; }

/* ============================ VENTANAS ============================ */
dialog { border: 0; padding: 0; background: transparent; color: var(--ink); width: min(520px, 94vw); max-width: none; max-height: 94svh; overflow: visible; }
dialog::backdrop { background: rgba(3, 18, 23, .78); backdrop-filter: blur(3px); }
dialog[open] { animation: dlg .22s cubic-bezier(.2, 1.2, .4, 1); }
dialog[open]::backdrop { animation: fade .22s; }
@keyframes dlg { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
.sheet { position: relative; max-height: 94svh; overflow-y: auto; padding: 24px; border-radius: 20px; background: var(--paper); box-shadow: 0 30px 70px rgba(0, 0, 0, .5); overscroll-behavior: contain; }
.sheet.center { text-align: center; }
.sheet:focus { outline: none; }
.sheet h2 { margin: 0 0 8px; font-size: 25px; font-weight: 800; font-stretch: 85%; line-height: 1.15; text-wrap: balance; }
.sheet h2.big { font-size: clamp(32px, 8vw, 44px); font-stretch: 76%; letter-spacing: -.015em; }
.sheet p { margin: 0 0 14px; max-width: 58ch; }
.sheet.center p { margin-left: auto; margin-right: auto; }
.sheet-kicker { margin: 0 0 4px !important; font-family: var(--marker); font-size: 18px; color: #C25A14; transform: rotate(-1.5deg); transform-origin: left; }
.sheet.center .sheet-kicker { transform: rotate(-1.5deg); }
.closex { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 12px; background: rgba(27, 35, 43, .08); color: var(--ink); cursor: pointer; }
.closex:hover { background: rgba(27, 35, 43, .16); }
.intro { color: #3F4C57; }
#setup, #lobby, #end, #confirm { margin: auto; }
#pick { margin: max(10px, 4vh) auto auto; }
.wide-sheet { width: 100%; }
#answers, #stats { width: min(760px, 96vw); }
.sheet-actions { margin-top: 10px; display: flex; justify-content: center; }

.field { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.field legend { padding: 0; margin-bottom: 6px; font-weight: 800; font-size: 16px; }
.field .opt-hint { margin: 6px 0 0; font-size: 14px; color: #52606B; }
.seg-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
.seg { position: relative; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: block; height: 100%; padding: 9px 10px; text-align: center; border: 2px solid var(--ink); border-radius: 11px; font-weight: 700; font-size: 15.5px; transition: background .12s, color .12s, transform .1s; }
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--blue-ink); outline-offset: 2px; }
.seg input:active + span { transform: scale(.97); }
.seg small { display: block; font-size: 12px; font-weight: 600; opacity: .72; }
.txt { width: 100%; padding: 11px 13px; border: 2px solid var(--ink); border-radius: 11px; background: #fff; color: var(--ink); font-size: 17px; }
.txt:focus-visible { outline: 3px solid var(--blue-ink); outline-offset: 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field label.lab { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 700; color: #3F4C57; }
.field-sep { margin: 4px 0 14px; border: 0; border-top: 2px dashed rgba(27, 35, 43, .2); }
details.more { margin: 0 0 14px; }
details.more summary { cursor: pointer; font-weight: 800; padding: 6px 0; }
details.more[open] summary { margin-bottom: 8px; }

/* selector de jugador */
.pick-cond { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 12px; padding: 12px 8px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 2px rgba(27, 35, 43, .1); }
.pick-cond .head { flex: 1; max-width: 46%; padding: 0; }
.pick-cond .disc { --rot: 0deg; }
.pick-cond .times { font-family: var(--marker); font-size: 28px; color: #C25A14; }
.pick-cond .head .name { font-size: 14px; }
.note { padding: 8px 12px; border-left: 4px solid var(--cinta); background: #FFF3C4; font-size: 15px; border-radius: 0 8px 8px 0; }
.search { width: 100%; padding: 13px 15px; font-size: 20px; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 13px; }
.search:focus-visible { outline: 3px solid var(--blue-ink); outline-offset: 2px; }
.hint { min-height: 0; margin: 8px 0 0 !important; font-size: 15px; color: #4A5661; }
.hint.pop { padding: 8px 12px; border-radius: 10px; background: #E6F2FF; color: #153E78; font-weight: 600; }
.results { list-style: none; margin: 6px 0 8px; padding: 0; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; background: transparent; border: 0; border-radius: 12px; color: var(--ink); text-align: left; cursor: pointer; }
.opt:hover, .opt[aria-selected="true"] { background: #DDE9EE; }
.opt .av { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--av, #4B6B7A); color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .02em; }
.opt .tx { min-width: 0; display: flex; flex-direction: column; }
.opt .n { font-weight: 800; line-height: 1.2; }
.opt .m { font-size: 14px; color: #52606B; line-height: 1.25; }
.opt[data-used="1"] { opacity: .5; }
.pick-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.sheet .btn.ghost { color: var(--ink); border-color: rgba(27, 35, 43, .32); background: transparent; }
.sheet .btn.ghost:hover { border-color: var(--ink); background: rgba(27, 35, 43, .06); }

/* final */
.end-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin-top: 14px; }
.big-score { display: flex; align-items: baseline; justify-content: center; gap: 4px; margin: 2px 0 6px; font-weight: 800; font-stretch: 75%; line-height: .95; }
.big-score b { font-size: clamp(76px, 20vw, 108px); letter-spacing: -.03em; }
.big-score span { font-size: 38px; color: #6A7782; }
.emogrid { display: inline-grid; grid-template-columns: repeat(3, 34px); gap: 5px; margin: 6px 0 12px; }
.emogrid i { display: block; height: 34px; border-radius: 9px; background: #D3DADF; }
.emogrid i.on { background: #31C47E; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.end-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.end-meta span { padding: 4px 12px; border-radius: 99px; background: #E4EAED; font-weight: 700; font-size: 14.5px; }
.winmark { width: 74px; height: 74px; margin: 0 auto 4px; }
.winmark .mark path { stroke-width: 10; }
.perk { margin: 0 0 6px; font-family: var(--marker); font-size: 20px; color: #C25A14; }
.copied { color: #14935A; font-weight: 800; }

/* respuestas */
.ans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ans { padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 2px rgba(27, 35, 43, .1); font-size: 14px; line-height: 1.3; }
.ans[data-o="0"] { box-shadow: inset 0 0 0 3px var(--red-ink); }
.ans[data-o="1"] { box-shadow: inset 0 0 0 3px var(--blue-ink); }
.ans[data-o="s"] { box-shadow: inset 0 0 0 3px #31C47E; }
.ans h4 { margin: 0 0 6px; font-size: 13px; font-weight: 800; color: #52606B; text-transform: uppercase; letter-spacing: .03em; }
.ans ul { margin: 0; padding: 0; list-style: none; }
.ans li { padding: 1px 0; }
.ans li.mine { font-weight: 800; }
.ans li.mine::before { content: "✓ "; color: #14935A; }
.ans .more { color: #6A7782; font-size: 13px; }

/* estadisticas */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 0 0 16px; }
.tile { padding: 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 2px rgba(27, 35, 43, .1); text-align: center; }
.tile b { display: block; font-size: 32px; font-weight: 800; font-stretch: 80%; line-height: 1; }
.tile small { display: block; margin-top: 4px; font-size: 13px; font-weight: 700; color: #52606B; }
.stats-h { margin: 14px 0 6px; font-size: 16px; font-weight: 800; }
.days { display: flex; flex-wrap: wrap; gap: 5px; }
.days i { width: 22px; height: 22px; border-radius: 6px; background: #D3DADF; position: relative; }
.days i.d1 { background: #BEE9D2; } .days i.d2 { background: #7DD9AB; } .days i.d3 { background: #31C47E; }
.days i.d4 { background: #14935A; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 6px 8px; text-align: left; border-bottom: 1px solid rgba(27, 35, 43, .12); }
.table td:not(:first-child), .table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }

/* sala online */
.roomcode { display: flex; justify-content: center; gap: 8px; margin: 6px 0 12px; }
.roomcode i { display: grid; place-items: center; width: 56px; height: 68px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 3px var(--ink), 0 3px 0 rgba(0, 0, 0, .2); font-family: var(--marker); font-style: normal; font-size: 40px; }
.lobby-players { display: grid; gap: 8px; margin: 12px 0; text-align: left; }
.lobby-players li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 2px rgba(27, 35, 43, .1); list-style: none; font-weight: 700; }
.lobby-players ul { margin: 0; padding: 0; display: grid; gap: 8px; }
.lobby-players .pm { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--paper); box-shadow: inset 0 0 0 2px rgba(27, 35, 43, .15); }
.lobby-players .pm svg { width: 70%; height: 70%; }
.lobby-players .pm path { fill: none; stroke-width: 11; stroke-linecap: round; }
.lobby-players li[data-seat="0"] .pm { color: var(--red-ink); } .lobby-players li[data-seat="1"] .pm { color: var(--blue-ink); }
.lobby-players .st { margin-left: auto; font-size: 13.5px; font-weight: 700; color: #52606B; }
.lobby-players .st.on { color: #14935A; }
.wait { display: inline-flex; align-items: center; gap: 8px; color: #3F4C57; font-weight: 700; }
.wait::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 3px solid #C25A14; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.err { color: #B3261E; font-weight: 700; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; transform: translateX(-50%); pointer-events: none; width: min(92vw, 420px); }
.toast { padding: 10px 16px; border-radius: 14px; background: #101A20; color: #fff; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); animation: toast 2.6s ease-out forwards; text-align: center; }
@keyframes toast { 0% { opacity: 0; transform: translateY(14px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

#fx { position: fixed; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; pointer-events: none; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .hero-demo { order: -1; width: min(70%, 290px); margin: 0 auto; }
  .leagues { grid-template-columns: repeat(2, 1fr); }
  .pool-info { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .hero { gap: 16px; padding-top: 0; }
  .hero-demo { display: none; }
  .hero h2 { font-size: 52px; }
  .daily { width: 100%; }
  .league { padding: 12px; }
  .league .lg-ico { width: 38px; height: 38px; }
  .modes { grid-template-columns: 1fr; }
  .mode { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 2px; padding: 13px; }
  .mode .m-ico { grid-row: span 2; }
  .mode b { flex: 1; min-width: 0; }
  .mode p { flex-basis: 100%; }
  .mode .m-tag { top: 12px; }
  .pname { font-size: 15.5px; }
  .pmark { width: 36px; height: 36px; }
  .pcard { padding: 8px 9px 8px 8px; gap: 8px; }
  .ans-grid { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; }
  .sheet { padding: 20px; }
  .roomcode i { width: 50px; height: 62px; font-size: 36px; }
  .solohud { grid-template-columns: 1.4fr 1fr 1fr; }
  .stat b { font-size: 22px; }
}
/* ---------- portátiles y ventanas bajas ----------
   Un portátil de 1366x768 deja unos 650 px útiles. En pantallas anchas pero bajas se compacta la cabecera y los
   espacios para que el tablero, el estado y los botones se vean enteros sin hacer scroll. */
@media (min-width: 720px) and (max-height: 900px) {
  :root { --bw: clamp(350px, min(calc(100vw - 48px), calc(100svh - 304px)), 640px); }
  .top { padding-top: 8px; padding-bottom: 4px; }
  .brand-ball { width: 30px; height: 30px; }
  .brand-text { font-size: 27px; }
  .iconbtn { width: 38px; height: 38px; border-radius: 12px; }
  .iconbtn .ico { width: 20px; height: 20px; }
  #game .gamebar { margin-bottom: 4px; }
  #game .gamebar .btn { padding-top: 6px; padding-bottom: 6px; }
  #game .hud { margin: 6px 0 8px; gap: 8px; }
  #game .pcard { padding: 9px 10px 5px 7px; border-radius: 14px; }
  .pturn { top: -9px; font-size: 11px; padding: 0 9px; }
  #game .pmark { width: 36px; height: 36px; border-radius: 10px; }
  #game .solohud { margin-bottom: 8px; }
  #game .stat { padding: 5px 12px; }
  #game .stat b { font-size: 22px; margin-top: 1px; }
  #game .pips { margin-top: 5px; }
  .frame { padding: 8px; }
  .disc { width: clamp(36px, calc(var(--bw) * .125), 56px); font-size: clamp(10px, calc(var(--bw) * .03), 15px); }
  .head { gap: 3px; padding: 4px 3px; }
  .head .name { font-size: clamp(10.5px, calc(var(--bw) * .029), 13px); }
  .ledge { width: calc(var(--colw) * .72); }
  #game .readout { margin-top: 8px; min-height: 2.7em; }
  #game .status { font-size: 18px; }
  #game .substatus { font-size: 14px; margin-top: 1px; }
  #game .gametools { margin-top: 2px; }
  #game .gametools .btn { padding-top: 7px; padding-bottom: 7px; }
  #game .emotes { margin-top: 6px; }
  #game .emotes button { width: 40px; height: 40px; font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
