:root {
  /* Noche de partido: azul noche, focos y oro de trofeo */
  --grass: #0d1022;        /* fondo */
  --grass-deep: #080a17;   /* hundido: campos, marcador */
  --grass-2: #161a33;      /* superficies */
  --grass-3: #252a4e;      /* elevado: avatares, botones secundarios */
  --line: rgba(205, 212, 255, 0.13);
  --chalk: #f3f2f8;
  --chalk-dim: #9497b8;
  --gold: #e9b949;
  --gold-ink: #2e2104;
  --red: #ff6b6b;
  --amber: #f5a84b;
  --ok: #5fd39a;
  --team-b: #05060f;
  --glow: rgba(126, 146, 255, 0.16);
  --radius-l: 22px;
  --radius-m: 14px;
  --radius-s: 10px;
  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --body: 'Onest', system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  color: var(--chalk);
  background-color: var(--grass);
  /* Luz de focos sobre el estadio */
  background-image: radial-gradient(110% 55% at 50% -12%, var(--glow), transparent 62%);
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 700; }
code { background: var(--grass-2); padding: 1px 6px; border-radius: 6px; }

.muted { color: var(--chalk-dim); }
.center { text-align: center; }
.pad { padding: 12px 16px; margin: 0; }
.grow { flex: 1; }

/* ─── shell ─── */
.app { max-width: 560px; margin: 0 auto; padding-bottom: calc(92px + var(--safe-b)); }
.screen { padding: 0 16px 24px; }
.splash { min-height: 100dvh; display: grid; place-items: center; color: var(--gold); }
.splash svg { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.top { display: flex; align-items: flex-end; justify-content: space-between; padding: max(22px, env(safe-area-inset-top)) 0 18px; }
.top h1 { font-family: var(--display); font-size: 44px; line-height: 0.95; letter-spacing: 0.01em; }
.hello { margin: 0 0 4px; color: var(--chalk-dim); font-size: 15px; }
.sec { font-family: var(--display); font-size: 24px; margin: 28px 0 10px; letter-spacing: 0.01em; }
.sub { font-size: 15px; font-weight: 600; margin: 18px 16px 6px; display: flex; gap: 8px; align-items: baseline; }

.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b));
  width: min(528px, calc(100% - 24px)); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(10, 12, 27, 0.82); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--line); border-radius: 24px; padding: 6px; z-index: 20;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 18px; color: var(--chalk-dim); font-size: 12px; font-weight: 500; }
.tabbar a.on { color: var(--gold-ink); background: var(--gold); }

/* ─── buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--gold); color: var(--gold-ink); font-weight: 650; font-size: 16px;
  transition: transform 0.12s ease;
}
.btn:active { transform: scale(0.97); }
.btn.ghost { background: transparent; color: var(--chalk); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.block { width: 100%; }
.btn-round { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; cursor: pointer; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--grass-2); display: grid; place-items: center; cursor: pointer; color: var(--chalk); }
.link { background: none; border: 0; padding: 0; color: var(--gold); text-decoration: underline; cursor: pointer; }

.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; width: fit-content; }
.chip.open { background: rgba(127, 217, 154, 0.16); color: var(--ok); }
.chip.teams { background: rgba(231, 184, 75, 0.16); color: var(--gold); }
.chip.played { background: rgba(243, 166, 74, 0.16); color: var(--amber); }
.chip.closed { background: rgba(241, 244, 236, 0.1); color: var(--chalk-dim); }

.avatar { flex: none; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--grass-3); font-weight: 700; color: var(--chalk); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ─── login ─── */
.login { min-height: 100dvh; position: relative; display: grid; place-items: center; overflow: hidden; padding: 24px; }
.login-pitch { position: absolute; inset: -4% -10%; width: 120%; height: 108%; fill: none; stroke: rgba(233, 185, 73, 0.16); stroke-width: 2; }
.login-pitch * { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.4s cubic-bezier(.6,.1,.2,1) forwards; }
.login-pitch .dot { fill: rgba(233, 185, 73, 0.45); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.login-inner { position: relative; text-align: center; max-width: 360px; }
.brand-mark { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; transform: rotate(-6deg); }
.login-title { font-family: var(--display); font-size: 76px; line-height: 0.85; font-weight: 900; letter-spacing: -0.01em; }
.login-title span { display: block; font-size: 30px; letter-spacing: 0.42em; font-weight: 600; color: var(--gold); margin-top: 6px; padding-left: 0.42em; }
.login-sub { color: var(--chalk-dim); margin: 22px 0 30px; font-size: 16px; }
.btn-google { display: inline-flex; align-items: center; gap: 12px; height: 54px; padding: 0 26px; border-radius: 999px; border: 0; background: var(--chalk); color: #121528; font-weight: 650; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.btn-google:disabled { opacity: 0.7; }
.login-err { color: var(--red); }

/* ─── hero ─── */
.hero {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 22px 20px 20px; overflow: hidden;
  border-radius: var(--radius-l);
  background: radial-gradient(90% 80% at 100% 0%, rgba(233,185,73,0.16), transparent 60%), linear-gradient(160deg, #2a3068 0%, #161a38 72%);
  box-shadow: inset 0 0 0 1px rgba(233,185,73,0.18), 0 24px 48px -24px rgba(0,0,0,0.7);
}
.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(233,185,73,0.16); stroke-width: 1.5; pointer-events: none; }
.hero-kicker { color: var(--gold); font-weight: 600; font-size: 14px; }
.hero-title { font-family: var(--display); font-size: 40px; font-weight: 800; line-height: 1; margin: 2px 0 8px; position: relative; }
.hero-when { font-size: 17px; font-weight: 600; }
.hero-where { display: flex; align-items: center; gap: 6px; color: var(--chalk-dim); font-size: 15px; }
.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 18px; }
.hero-price { font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1; }
.hero-price small { font-family: var(--body); font-size: 13px; font-weight: 500; color: var(--chalk-dim); margin-left: 3px; }
.hero-cta { margin-top: 16px; height: 48px; border-radius: 999px; display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); font-weight: 700; }
.hero-cta.in { background: rgba(241,244,236,0.1); color: var(--chalk); }

.meter { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.meter.wide { padding: 0 16px 14px; }
.meter-bar { height: 6px; background: rgba(0,0,0,0.28); border-radius: 6px; overflow: hidden; display: block; }
.meter-bar span { display: block; height: 100%; background: var(--gold); border-radius: 6px; transition: width 0.5s ease; }
.meter-txt { font-size: 13px; color: var(--chalk-dim); }
.meter-txt b { color: var(--chalk); font-size: 15px; }

/* ─── lists ─── */
.list { display: flex; flex-direction: column; gap: 8px; }
.match-row, .pay-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--radius-m);
  background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line);
}
.mr-date { width: 50px; flex: none; text-align: center; border-right: 1px solid var(--line); padding-right: 12px; }
.mr-day { display: block; font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1; }
.mr-mon { display: block; font-size: 12px; color: var(--chalk-dim); text-transform: capitalize; }
.mr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mr-title { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-meta { font-size: 13px; color: var(--chalk-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mr-count { font-size: 13px; color: var(--chalk-dim); }
.mr-count b { font-family: var(--display); font-size: 24px; color: var(--chalk); }
.mr-in { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--ok); font-weight: 600; }
.mr-score { font-family: var(--display); font-size: 28px; font-weight: 800; }
.mr-score i { font-style: normal; color: var(--chalk-dim); margin: 0 4px; }
.pay-row b { font-family: var(--display); font-size: 22px; }

.empty { text-align: center; padding: 48px 20px; border-radius: var(--radius-l); border: 1.5px dashed var(--line); color: var(--chalk-dim); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty p { margin: 0; color: var(--chalk); }
.empty .muted { color: var(--chalk-dim); }

/* ─── detail ─── */
.backbar { display: flex; align-items: center; gap: 8px; padding: max(14px, env(safe-area-inset-top)) 0 8px; }
.d-head { padding: 8px 0 16px; display: flex; flex-direction: column; gap: 6px; }
.d-head h1 { font-family: var(--display); font-size: 46px; line-height: 0.95; font-weight: 800; }
.d-meta { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--chalk-dim); }
.d-notes { margin: 6px 0 0; padding: 10px 14px; background: var(--grass-2); border-radius: var(--radius-s); font-size: 15px; }
.cta-dock { position: sticky; top: 8px; z-index: 5; margin-bottom: 14px; }
.cta-dock .btn { box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.cta-dock .btn.ghost { background: var(--grass-deep); }

.card { background: var(--grass-2); border-radius: var(--radius-l); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 14px; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 16px 6px; }
.card-head h2 { font-size: 17px; font-weight: 650; }

.people { list-style: none; margin: 0; padding: 4px 0 8px; }
.person { display: flex; align-items: center; gap: 12px; padding: 8px 16px; }
.person.tap { cursor: pointer; }
.person-n { width: 20px; text-align: right; color: var(--chalk-dim); font-size: 13px; font-variant-numeric: tabular-nums; }
.person-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.person-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-sub { font-size: 13px; color: var(--chalk-dim); }
.ovr-pill { font-family: var(--display); font-weight: 800; font-size: 18px; width: 40px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.ovr-pill.gold { background: linear-gradient(135deg, #f6d77d, #c8952b); color: var(--gold-ink); }
.ovr-pill.silver { background: linear-gradient(135deg, #eef1f3, #9aa6ad); color: #1d2529; }
.ovr-pill.bronze { background: linear-gradient(135deg, #e3a878, #8d5631); color: #2b1608; }
.pts { font-family: var(--display); font-size: 26px; font-weight: 800; color: var(--gold); }
.breakdown { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--chalk-dim); margin-top: 2px; }
.breakdown b { color: var(--chalk); }

.admin-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 16px 16px; }
.screen > .admin-bar { padding: 0 0 14px; }
.admin-bar .btn { flex: 1 1 auto; min-height: 44px; font-size: 15px; }

/* ─── pitch ─── */
.pitch-wrap { margin-bottom: 14px; }
.pitch {
  position: relative; border-radius: var(--radius-l); overflow: hidden; padding: 18px 10px;
  background: repeating-linear-gradient(180deg, #1b6b4b 0 44px, #186244 44px 88px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), inset 0 0 80px rgba(0,0,0,0.25);
}
.pitch-lines { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(255,255,255,0.4); stroke-width: 0.5; vector-effect: non-scaling-stroke; pointer-events: none; }
.side { position: relative; padding: 6px 0; }
.side-head { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 10px; }
.side-name { background: none; border: 0; font-family: var(--display); font-size: 26px; font-weight: 800; cursor: pointer; padding: 0; }
.side-name:disabled { cursor: default; color: inherit; }
.side-avg { font-family: var(--display); font-weight: 800; font-size: 15px; padding: 2px 8px; border-radius: 6px; }
.side-A .side-avg { background: var(--chalk); color: var(--grass-deep); }
.side-B .side-avg { background: var(--team-b); color: var(--chalk); }
.side-players { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 6px; }
.token { width: 74px; background: none; border: 0; padding: 4px 0; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; border-radius: 12px; }
.token:disabled { cursor: default; color: inherit; }
.token .avatar { box-shadow: 0 0 0 3px var(--chalk), 0 6px 14px rgba(0,0,0,0.35); }
.side-B .token .avatar { box-shadow: 0 0 0 3px var(--team-b), 0 6px 14px rgba(0,0,0,0.35); }
.token.picked { background: rgba(231,184,75,0.3); }
.token.picked .avatar { box-shadow: 0 0 0 3px var(--gold); }
.token-name { font-size: 13px; font-weight: 650; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.vs { position: relative; text-align: center; font-family: var(--display); font-weight: 900; font-size: 22px; color: var(--gold); margin: 10px 0; }
.hint { font-size: 13px; color: var(--chalk-dim); margin: 10px 0; }

/* ─── scoreboard ─── */
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px; padding: 18px 16px; margin-bottom: 14px; border-radius: var(--radius-l); background: var(--grass-deep); box-shadow: inset 0 0 0 1px var(--line); }
.sb-team { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sb-team.right { text-align: right; }
.sb-name { font-family: var(--display); font-size: 22px; font-weight: 800; }
.sb-scorers { font-size: 12px; color: var(--chalk-dim); }
.sb-score { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 58px; font-weight: 900; line-height: 1; }
.sb-score i { width: 10px; height: 3px; background: var(--chalk-dim); }
.sb-mvp { grid-column: 1 / -1; justify-self: center; display: flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: rgba(231,184,75,0.16); color: var(--gold); font-size: 14px; font-weight: 600; margin-top: 6px; }

/* ─── voting ─── */
.mvp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; padding: 6px 16px 10px; }
.mvp-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: var(--radius-m); background: var(--grass); border: 1.5px solid transparent; cursor: pointer; font-size: 13px; font-weight: 600; }
.mvp-opt.on { border-color: var(--gold); background: rgba(231,184,75,0.12); }
.mvp-star { position: absolute; top: 6px; right: 6px; color: var(--gold); }
.rate-list { list-style: none; margin: 0; padding: 0 16px; }
.rate-row { display: grid; grid-template-columns: auto 72px 1fr 24px; align-items: center; gap: 10px; padding: 7px 0; }
.rate-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rate-val { font-family: var(--display); font-size: 22px; text-align: right; }
input[type='range'] { accent-color: var(--gold); width: 100%; }

/* ─── payments ─── */
.pay-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 8px 16px 14px; }
.pay-summary > div { display: flex; flex-direction: column; }
.pay-summary .muted { font-size: 13px; }
.big { font-family: var(--display); font-size: 32px; font-weight: 800; line-height: 1.05; }
.big.warn { color: var(--amber); }
.my-pay { margin: 0 16px 10px; padding: 14px; border-radius: var(--radius-m); background: var(--grass); display: flex; flex-direction: column; gap: 10px; }
.my-pay p { margin: 0; }
.my-pay.ok { flex-direction: row; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; }
.pay-tag { font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pay-tag.paid, .pay-sel.paid { background: rgba(127,217,154,0.16); color: var(--ok); }
.pay-tag.declared, .pay-sel.declared { background: rgba(243,166,74,0.16); color: var(--amber); }
.pay-tag.pending, .pay-sel.pending { background: rgba(240,100,90,0.16); color: var(--red); }
.pay-sel { border: 0; border-radius: 999px; padding: 6px 10px; font-size: 13px; font-weight: 650; appearance: none; -webkit-appearance: none; text-align: center; cursor: pointer; }
.pay-sel option { background: var(--grass-deep); color: var(--chalk); }
.balance { display: flex; flex-direction: column; gap: 2px; padding: 22px 20px; border-radius: var(--radius-l); background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); }
.balance.due { background: radial-gradient(90% 90% at 100% 0%, rgba(255,107,107,0.22), transparent 60%), linear-gradient(160deg, #35203a, #1d1426); box-shadow: inset 0 0 0 1px rgba(255,107,107,0.2); }
.balance-n { font-family: var(--display); font-size: 56px; font-weight: 900; line-height: 1; }
.balance.ok .balance-n { color: var(--ok); }
.debt { display: flex; flex-direction: column; align-items: flex-end; }
.debt b { font-family: var(--display); font-size: 20px; color: var(--amber); }
.debt small { font-size: 11px; color: var(--chalk-dim); }

/* ─── segmented / forms ─── */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--grass-deep); }
.seg button { flex: 1; border: 0; background: none; padding: 9px 6px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--chalk-dim); }
.seg button.on { background: var(--chalk); color: var(--grass-deep); }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label, .label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--chalk-dim); }
.form input:not([type='range']):not([type='checkbox']), .form textarea {
  background: var(--grass-deep); border: 1.5px solid var(--line); border-radius: var(--radius-s);
  padding: 12px 14px; font-size: 16px; color: var(--chalk); font-weight: 500; width: 100%;
}
.form input:focus, .form textarea:focus { border-color: var(--gold); outline: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.score-input { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin-bottom: 8px; }
.score-input label { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 650; }
.score-input input { width: 86px; height: 76px; text-align: center; font-family: var(--display); font-size: 48px; font-weight: 800; background: var(--grass-deep); border: 1.5px solid var(--line); border-radius: var(--radius-m); color: var(--chalk); }
.score-input > span { font-family: var(--display); font-size: 40px; padding-bottom: 12px; color: var(--chalk-dim); }
.stat-head, .stat-row { display: grid; grid-template-columns: 1fr 108px 108px; align-items: center; gap: 8px; padding: 4px 0; }
.stat-head { font-size: 12px; color: var(--chalk-dim); text-align: center; }
.stat-row.off { opacity: 0.45; }
.stat-who { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; min-width: 0; }
.stat-who input { width: 20px; height: 20px; accent-color: var(--gold); flex: none; }
.stat-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper { display: flex; align-items: center; justify-content: space-between; background: var(--grass-deep); border-radius: 999px; padding: 3px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--grass-3); font-size: 20px; cursor: pointer; line-height: 1; }
.stepper b { font-family: var(--display); font-size: 20px; }

.switch { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--chalk-dim); cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--gold); }

/* ─── sheet ─── */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(4, 5, 14, 0.66); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.18s ease; }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; display: flex; flex-direction: column; background: var(--grass-2); border-radius: 26px 26px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,0.4); animation: up 0.26s cubic-bezier(.2,.9,.3,1); padding-bottom: var(--safe-b); }
.sheet-grip { width: 40px; height: 5px; border-radius: 4px; background: var(--line); margin: 10px auto 0; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px 6px; }
.sheet-head h2 { font-family: var(--display); font-size: 28px; font-weight: 800; }
.sheet-body { overflow-y: auto; padding: 8px 18px 22px; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

.toast {
  position: fixed; left: 50%; top: max(14px, env(safe-area-inset-top)); z-index: 90; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100% - 32px);
  padding: 10px 16px 10px 10px; border-radius: 16px;
  background: rgba(28, 32, 62, 0.92); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(205,212,255,0.12), 0 18px 40px -12px rgba(0,0,0,0.6);
  color: var(--chalk); font-weight: 600; font-size: 14px; line-height: 1.3;
  animation: drop 0.32s cubic-bezier(.2,.9,.3,1.2);
}
.toast-ico { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); font-weight: 900; }
.toast.err .toast-ico { background: var(--red); color: #fff; }
.toast.err { box-shadow: inset 0 0 0 1px rgba(255,107,107,0.35), 0 18px 40px -12px rgba(0,0,0,0.6); }
@keyframes drop { from { transform: translate(-50%, -16px) scale(0.96); opacity: 0; } }

/* ─── carta fantasy ─── */
.pcard {
  --c1: #f8dc87; --c2: #d9a53a; --c3: #a3721d; --ink: #3a2a05;
  position: relative; display: flex; flex-direction: column; align-items: center; border: 0; cursor: pointer; padding: 0;
  width: 150px; aspect-ratio: 0.7; color: var(--ink); overflow: hidden;
  background: linear-gradient(155deg, var(--c1) 0%, var(--c2) 48%, var(--c3) 100%);
  clip-path: polygon(50% 0, 100% 7%, 100% 88%, 50% 100%, 0 88%, 0 7%);
  filter: drop-shadow(0 14px 22px rgba(0,0,0,0.45));
}
.pcard.silver { --c1: #fafbfc; --c2: #c5ced3; --c3: #7f8b92; --ink: #1d2529; }
.pcard.bronze { --c1: #f1c39b; --c2: #c07c4b; --c3: #7c4625; --ink: #2b1608; }
.pcard::before { content: ''; position: absolute; inset: 6px; clip-path: inherit; border: 1.5px solid rgba(255,255,255,0.45); clip-path: polygon(50% 0, 100% 7%, 100% 88%, 50% 100%, 0 88%, 0 7%); pointer-events: none; }
.pcard-shine { position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.55) 50%, transparent 60%); transform: translateX(-60%); animation: shine 4.5s ease-in-out 1s infinite; pointer-events: none; }
@keyframes shine { 0%, 70% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
.pcard-top { position: absolute; left: 14%; top: 14%; display: flex; flex-direction: column; align-items: center; z-index: 1; }
.pcard-ovr { font-family: var(--display); font-weight: 900; font-size: 2.1em; line-height: 0.85; }
.pcard-lbl { font-family: var(--display); font-weight: 700; font-size: 0.7em; letter-spacing: 0.06em; opacity: 0.75; }
.pcard-photo { margin-top: 14%; width: 52%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: rgba(0,0,0,0.12); box-shadow: 0 0 0 2px rgba(255,255,255,0.5); margin-left: 18%; }
.pcard-photo img { width: 100%; height: 100%; object-fit: cover; }
.pcard-photo span { font-family: var(--display); font-weight: 800; font-size: 1.8em; }
.pcard-name { font-family: var(--display); font-weight: 800; font-size: 1.35em; margin-top: 4%; line-height: 1; padding: 0 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-bottom: 1.5px solid rgba(0,0,0,0.18); padding-bottom: 4px; }
.pcard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 10px; margin-top: 5%; font-size: 0.62em; font-weight: 600; }
.pcard-stats span { display: flex; gap: 3px; align-items: baseline; justify-content: center; }
.pcard-stats b { font-family: var(--display); font-weight: 900; font-size: 1.55em; }
.pcard.sm { width: 96px; font-size: 11px; }
.pcard.sm .pcard-photo { margin-top: 22%; }
.pcard.md { width: 132px; font-size: 13px; }
.pcard.lg { width: 220px; font-size: 19px; }
.card-stage { display: flex; justify-content: center; padding: 8px 0 14px; }
.profile-name { font-family: var(--display); font-size: 34px; text-align: center; font-weight: 800; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 14px; }
.kpis div { background: var(--grass-2); border-radius: var(--radius-m); padding: 12px 6px; text-align: center; display: flex; flex-direction: column; box-shadow: inset 0 0 0 1px var(--line); }
.kpis b { font-family: var(--display); font-size: 28px; font-weight: 800; line-height: 1; }
.kpis span { font-size: 11px; color: var(--chalk-dim); margin-top: 4px; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding: 10px 16px 14px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.bar-fill { width: 100%; max-width: 26px; border-radius: 6px 6px 2px 2px; background: var(--gold); }
.bar-v { font-size: 12px; font-weight: 700; }
.bar-l { font-size: 10px; color: var(--chalk-dim); white-space: nowrap; }

/* ─── liga ─── */
.podium { display: grid; grid-template-columns: 1fr 1.2fr 1fr; align-items: end; gap: 6px; padding: 10px 0 4px; }
.podium-slot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.podium-pts { font-family: var(--display); font-weight: 800; font-size: 18px; }
.podium-step { width: 100%; display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 28px; color: var(--chalk-dim); background: var(--grass-2); border-radius: 12px 12px 0 0; box-shadow: inset 0 0 0 1px var(--line); }
.podium-slot.p1 .podium-step { height: 70px; color: var(--gold); }
.podium-slot.p2 .podium-step { height: 48px; }
.podium-slot.p3 .podium-step { height: 34px; }

.tabs-scroll { display: flex; gap: 6px; overflow-x: auto; padding: 18px 0 12px; scrollbar-width: none; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.tabs-scroll button { flex: none; border: 0; padding: 9px 16px; border-radius: 999px; background: var(--grass-2); color: var(--chalk-dim); font-weight: 600; font-size: 14px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.tabs-scroll button.on { background: var(--chalk); color: var(--grass-deep); box-shadow: none; }

.table { padding: 4px 0; }
.t-head, .t-row { display: grid; grid-template-columns: 28px 1fr 36px 56px; align-items: center; gap: 8px; padding: 8px 14px; }
.t-head { font-size: 12px; color: var(--chalk-dim); }
.t-head span:nth-child(n + 3), .t-row > :nth-child(n + 3) { text-align: right; }
.t-row { border-top: 1px solid var(--line); }
.t-row b { font-family: var(--display); font-size: 22px; font-weight: 800; }
.t-pos { font-family: var(--display); font-size: 18px; font-weight: 800; color: var(--chalk-dim); }
.t-row:nth-child(2) .t-pos { color: var(--gold); }
.t-who { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.t-who > span:last-child { display: flex; flex-direction: column; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
span.formchips { display: flex; flex-direction: row; gap: 3px; margin-top: 2px; }
span.formchips i { width: 15px; height: 15px; font-size: 9px; font-style: normal; font-weight: 800; border-radius: 4px; display: grid; place-items: center; color: var(--grass-deep); }
span.formchips i.W { background: var(--ok); }
span.formchips i.D { background: var(--chalk-dim); }
span.formchips i.L { background: var(--red); color: #fff; }

.rules summary { padding: 16px; cursor: pointer; font-weight: 650; }
.rules ul { margin: 0; padding: 0 16px 16px 34px; display: flex; flex-direction: column; gap: 6px; color: var(--chalk-dim); font-size: 15px; }
.rules b { color: var(--gold); }

@media (min-width: 600px) {
  .app { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .login-pitch * { stroke-dashoffset: 0; }
}

/* ─── modo demo ─── */
.demobar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--gold); color: var(--gold-ink); font-size: 14px; font-weight: 600; }
.demobar-tag { padding: 2px 8px; border-radius: 6px; background: var(--gold-ink); color: var(--gold); font-size: 12px; }
.demobar-who { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.demobar select { flex: 1; min-width: 0; padding: 6px 8px; border-radius: 8px; border: 0; background: rgba(255,255,255,0.55); color: var(--gold-ink); font-weight: 600; }
.demobar button { border: 0; background: none; color: var(--gold-ink); font-weight: 700; text-decoration: underline; cursor: pointer; padding: 6px 0; }
.demobar ~ .screen .top, .demobar ~ .screen .backbar { padding-top: 14px; }
.warn-txt { color: var(--amber); font-weight: 600; }

/* ─── toque en móvil: sin recuadro azul del navegador ─── */
* { -webkit-tap-highlight-color: transparent; }
:focus:not(:focus-visible) { outline: none; }
.tabbar a { position: relative; outline-offset: -3px; }
.tabbar a:focus-visible { border-radius: 18px; }
.tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; font-style: normal; line-height: 18px; text-align: center; }

/* ─── bonos ─── */
.bono-card { margin-top: 14px; }
.bono-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 14px; }
.bono-top > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bono-left { font-family: var(--display); font-size: 40px; font-weight: 900; line-height: 1; color: var(--gold); }
.small { font-size: 13px; }
.bono-top .btn { flex: none; min-height: 44px; font-size: 15px; }
.bono-row .person-name { display: flex; align-items: baseline; gap: 8px; }
.bono-amt { font-family: var(--display); font-size: 18px; color: var(--gold); }
.bono-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.mini { border: 0; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 650; cursor: pointer; background: rgba(241,244,236,0.1); color: var(--chalk); }
.mini.ok { background: var(--gold); color: var(--gold-ink); }
.pay-tag.bono { background: rgba(231,184,75,0.18); color: var(--gold); }
.debt.bono b { color: var(--gold); }
.sec-row { display: flex; align-items: baseline; justify-content: space-between; }
.small-btn { min-height: 36px; padding: 0 14px; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { flex: 1; min-width: 64px; border: 1.5px solid var(--line); background: var(--grass-deep); border-radius: 12px; padding: 12px 0; font-family: var(--display); font-size: 20px; font-weight: 800; cursor: pointer; color: var(--chalk); }
.chips button.on { border-color: var(--gold); background: rgba(231,184,75,0.14); color: var(--gold); }
.form select.input { background: var(--grass-deep); border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; font-size: 16px; color: var(--chalk); font-weight: 500; width: 100%; }
.form select.input option { background: var(--grass-deep); }

/* ─── diálogos propios ─── */
.dlg-wrap { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 24px; background: rgba(4, 5, 14, 0.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade 0.18s ease; }
.dlg {
  width: min(360px, 100%); padding: 26px 22px 20px; border-radius: 26px; text-align: center;
  background: radial-gradient(100% 70% at 50% 0%, rgba(126,146,255,0.14), transparent 70%), var(--grass-2);
  box-shadow: inset 0 0 0 1px rgba(205,212,255,0.12), 0 30px 60px -20px rgba(0,0,0,0.7);
  animation: pop 0.26s cubic-bezier(.2,.9,.3,1.15);
}
.dlg-ico { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: rgba(233,185,73,0.14); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(233,185,73,0.3); }
.dlg-ico.danger { background: rgba(255,107,107,0.12); color: var(--red); box-shadow: inset 0 0 0 1px rgba(255,107,107,0.3); }
.dlg h2 { font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1; }
.dlg p { margin: 10px 0 0; color: var(--chalk-dim); font-size: 15px; line-height: 1.45; }
.dlg-input { margin-top: 16px; width: 100%; padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--grass-deep); color: var(--chalk); font-size: 17px; font-weight: 600; text-align: center; }
.dlg-input:focus { outline: none; border-color: var(--gold); }
.dlg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.dlg-actions .btn { min-height: 48px; padding: 0 12px; font-size: 15px; }
.btn.danger { background: var(--red); color: #fff; }
@keyframes pop { from { transform: scale(0.92) translateY(8px); opacity: 0; } }

/* ─── acabado premium ─── */
.card, .match-row, .pay-row, .balance, .kpis div { box-shadow: inset 0 0 0 1px var(--line), 0 10px 30px -18px rgba(0,0,0,0.6); }
.tabbar a.on { box-shadow: 0 6px 18px -6px rgba(233,185,73,0.55); }
.top h1, .d-head h1 { letter-spacing: 0.005em; }
.btn:not(.ghost):not(.danger) { box-shadow: 0 8px 22px -10px rgba(233,185,73,0.6); }

/* ═════════════ nuevas funciones ═════════════ */

.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { position: relative; flex: none; }
.icon-btn .tab-badge { top: -2px; left: auto; right: -4px; }
.icon-btn.sm { width: 32px; height: 32px; background: transparent; color: var(--chalk-dim); }
.icon-btn.wa { color: var(--ok); background: rgba(95,211,154,0.12); margin-left: 6px; }
.grp-tag { font-style: normal; font-size: 11px; font-weight: 650; padding: 1px 7px; margin-left: 8px; border-radius: 6px; background: var(--grass-3); color: var(--chalk-dim); vertical-align: 2px; }
.chip.grp { background: var(--grass-3); color: var(--chalk-dim); }
.d-head .chip + .chip { margin-top: -2px; }
.mr-in.wait { color: var(--amber); }
.pad-x { padding: 0 16px; margin: 4px 0 6px; }
.late { color: var(--amber); }
.lead { margin: -6px 0 16px; font-size: 15px; }
.pre { white-space: pre-wrap; }
.danger-txt { color: var(--red); margin-top: 8px; }
.row-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.avatar.guest { background: transparent; box-shadow: inset 0 0 0 1.5px var(--chalk-dim); color: var(--chalk-dim); }

/* tiempo y acciones del partido */
.wx-mini { margin-left: 10px; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,0.1); color: #f3f2f8; font-weight: 600; font-size: 13px; }
.d-meta.wx .wx-ico { width: 16px; text-align: center; }
.actions-row { display: flex; gap: 8px; overflow-x: auto; margin: -4px -16px 16px; padding: 2px 16px; scrollbar-width: none; }
.actions-row::-webkit-scrollbar { display: none; }
.act { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--grass-2); color: var(--chalk); font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.act svg { color: var(--gold); }
.cta-dock { display: flex; flex-direction: column; gap: 8px; }
.cta-dock .hint { margin: 0; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none !important; }
.search { width: 100%; margin: 4px 0 6px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--grass-deep); }

/* equipos: petos, arrastrar, aparición */
.peto { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin: 0 7px; vertical-align: 1px; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.25); }
.side-name { display: inline-flex; align-items: center; cursor: default; }
.token { animation: tokenIn 0.42s cubic-bezier(.2,.9,.3,1.25) both; }
.token.draggable { touch-action: none; user-select: none; -webkit-user-select: none; }
.token.dragging { position: relative; z-index: 10; transition: none; filter: drop-shadow(0 10px 18px rgba(0,0,0,0.45)); }
@keyframes tokenIn { from { opacity: 0; transform: translateY(10px) scale(0.85); } }
.team-fld { display: grid; grid-template-columns: 52px 1fr; gap: 10px; align-items: center; }
.team-fld input[type='color'] { width: 52px; height: 48px; padding: 4px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--grass-deep); cursor: pointer; }
.team-fld input:not([type='color']) { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--grass-deep); font-size: 16px; }

/* marcador */
.sb-name { display: inline-flex; align-items: center; }
.sb-team.right .sb-name { justify-content: flex-end; }
.sb-team .peto { margin-left: 0; }
.sb-team.right .peto { margin: 0 0 0 7px; }
.sb-mvp.reveal { animation: reveal 0.7s cubic-bezier(.2,.9,.3,1.3) 0.15s both; position: relative; overflow: hidden; }
.sb-mvp.reveal::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.35) 50%, transparent 65%); transform: translateX(-100%); animation: sweep 1.2s ease 0.8s; }
@keyframes reveal { from { opacity: 0; transform: scale(0.6); } }
@keyframes sweep { to { transform: translateX(100%); } }
.sb-extras { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 13px; color: var(--chalk-dim); }
.sb-extras b { color: var(--chalk); }

/* porra */
.porra-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 6px 16px 0; }
.porra-side { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; border-radius: var(--radius-m); background: var(--grass); font-weight: 650; }
.stepper.big { width: 100%; max-width: 150px; }
.stepper.big b { font-size: 32px; }
.stepper.big button { width: 40px; height: 40px; }
.porra-res { list-style: none; margin: 0; padding: 4px 16px 14px; display: flex; flex-direction: column; }
.porra-res li { display: grid; grid-template-columns: 1fr auto 44px; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 15px; }
.porra-res li:first-child { border-top: 0; }
.porra-res b { font-family: var(--display); font-size: 20px; }
.porra-res em { font-style: normal; text-align: right; font-weight: 700; color: var(--chalk-dim); }
.porra-res li.hit em { color: var(--ok); }
.porra-res li.exact em { color: var(--gold); }
.porra-res li.exact span::after { content: ' 🔮'; }

/* pagos */
.paylinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin: 10px 0 0; }
.my-pay .paylinks { margin: 0; }
.paylink { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 0; border-radius: var(--radius-m); background: var(--grass-deep); color: var(--chalk); cursor: pointer; text-align: left; box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }
.paylink b { color: var(--gold); }
.paylink span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--chalk-dim); }
button.pay-row { width: 100%; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pay-row .pay-tag { margin-left: auto; }
.caja { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; padding: 16px; }
.caja > div { display: flex; flex-direction: column; }
.caja .muted { font-size: 13px; }
.big.sm { font-size: 24px; color: var(--chalk-dim); }
.quick { display: flex; gap: 12px; font-size: 13px; }
.form .chips button { font-family: var(--body); font-size: 14px; font-weight: 600; padding: 9px 4px; min-width: 76px; flex: 0 1 auto; padding-inline: 12px; }

/* liga */
.t-row.me { background: rgba(233,185,73,0.07); }

/* perfil: forma, química, logros */
.form-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 4px 16px 4px; }
.form-row span.formchips i { width: 22px; height: 22px; font-size: 11px; border-radius: 6px; }
.trend { font-size: 13px; color: var(--chalk-dim); }
.trend.up { color: var(--ok); }
.trend.down { color: var(--red); }
.streak { font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--grass-3); }
.streak.W { background: rgba(95,211,154,0.15); color: var(--ok); }
.streak.L { background: rgba(255,107,107,0.14); color: var(--red); }
.spark { display: block; width: calc(100% - 32px); height: 80px; margin: 6px 16px 14px; overflow: visible; }
.spark-line { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-fill { fill: rgba(233,185,73,0.12); }
.spark circle { fill: var(--grass-2); stroke: var(--gold); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark circle.last { fill: var(--gold); }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 6px 16px 16px; }
.duo-c { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: var(--radius-m); background: var(--grass); text-align: center; }
.duo-c small { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; }
.duo-c.good small { color: var(--ok); }
.duo-c.bad small { color: var(--red); }
.duo-c b { font-size: 16px; }
.duo-c span { font-size: 12px; color: var(--chalk-dim); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; padding: 6px 16px 16px; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 12px 6px; border-radius: var(--radius-m); background: var(--grass); opacity: 0.42; filter: grayscale(1); }
.badge.on { opacity: 1; filter: none; background: radial-gradient(90% 90% at 50% 0%, rgba(233,185,73,0.18), transparent 70%), var(--grass); box-shadow: inset 0 0 0 1px rgba(233,185,73,0.3); }
.badge-ico { font-size: 26px; line-height: 1.1; }
.badge b { font-size: 13px; }
.badge small { font-size: 11px; color: var(--chalk-dim); line-height: 1.25; }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.pref-row > span { display: flex; flex-direction: column; }
.pref-row small { color: var(--chalk-dim); font-size: 13px; }
.card .label { margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--chalk-dim); }

/* bienvenida y avisos */
.welcome { display: flex; flex-direction: column; gap: 12px; }
.welcome-txt { margin: 0 0 4px; color: var(--chalk-dim); font-size: 16px; }
.tip { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: var(--radius-m); background: var(--grass); animation: tokenIn 0.5s cubic-bezier(.2,.9,.3,1.1) both; }
.tip > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.tip small { color: var(--chalk-dim); font-size: 14px; }
.tip-ico, .notif-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(233,185,73,0.14); color: var(--gold); }
.push-cta { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius-m); margin-bottom: 12px; background: radial-gradient(100% 100% at 100% 0%, rgba(233,185,73,0.16), transparent 70%), var(--grass); box-shadow: inset 0 0 0 1px rgba(233,185,73,0.25); }
.push-cta > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.push-cta small { color: var(--chalk-dim); font-size: 13px; }
.notif-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.notif { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius-m); background: var(--grass); position: relative; }
.notif.new::after { content: ''; position: absolute; top: 14px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.notif-main { display: flex; flex-direction: column; min-width: 0; padding-right: 14px; }
.notif-main small { color: var(--chalk-dim); font-size: 13px; }

/* ajustes */
details.set { margin-bottom: 10px; }
details.set summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
details.set summary::-webkit-details-marker { display: none; }
details.set summary > svg:last-child { color: var(--chalk-dim); transition: transform 0.2s ease; }
details.set[open] summary > svg:last-child { transform: rotate(90deg); }
.set-ico { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(233,185,73,0.14); color: var(--gold); }
.set-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.set-t small { color: var(--chalk-dim); font-size: 13px; }
.set-body { display: flex; flex-direction: column; gap: 4px; padding: 0 16px 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.set-body .sub { margin: 14px 0 2px; }
.set-body .hint { margin: 4px 0 6px; }
.set-body > .btn { align-self: flex-start; margin-top: 6px; }
.fld { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 15px; }
.fld > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.fld small { color: var(--chalk-dim); font-size: 12px; font-weight: 400; }
.fld.col { flex-direction: column; align-items: stretch; gap: 6px; }
.fld input, .fld select, .fld textarea { background: var(--grass-deep); border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; font-size: 16px; color: var(--chalk); min-width: 0; }
.fld input:focus, .fld textarea:focus, .fld select:focus { outline: none; border-color: var(--gold); }
.fld select { max-width: 55%; }
.fld input[type='time'] { width: 120px; }
.fld-num { display: flex; align-items: center; gap: 6px; flex: none; }
.fld-num input { width: 84px; text-align: right; font-weight: 650; }
.fld-num em { font-style: normal; color: var(--chalk-dim); font-size: 13px; width: 26px; }
.fld-row { display: flex; gap: 8px; }
.fld-row input { flex: 1; }
.xv-row { display: grid; grid-template-columns: 1fr 70px 36px; gap: 8px; }
.xv-row input { width: 100%; }
.xv-pts { text-align: center; }
.grp { padding: 10px 0; border-top: 1px solid var(--line); }
.grp .chips { gap: 6px; }
.grp .chips button, .set-body .chips button { flex: 0 1 auto; min-width: 0; padding: 8px 12px; font-family: var(--body); font-size: 14px; font-weight: 600; }
.grp .label { font-size: 13px; color: var(--chalk-dim); margin: 6px 0; display: block; }
.settings .people .person { padding: 8px 0; }
.save-dock { position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translate(-50%, 140%); opacity: 0; pointer-events: none; z-index: 25; width: min(528px, calc(100% - 24px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; border-radius: 20px; background: var(--grass-3); box-shadow: 0 16px 40px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(233,185,73,0.3); transition: transform 0.3s cubic-bezier(.2,.9,.3,1.2), opacity 0.2s; font-size: 14px; font-weight: 600; }
.save-dock.on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.save-dock .btn { min-height: 44px; font-size: 15px; }
.settings { padding-bottom: 90px; }

/* interruptor */
.tgl { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; position: relative; }
.tgl-txt { flex: 1; display: flex; flex-direction: column; font-size: 15px; }
.tgl-txt small { color: var(--chalk-dim); font-size: 12px; }
.tgl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tgl-ui { flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--grass-3); position: relative; transition: background 0.2s; }
.tgl-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--chalk); transition: transform 0.22s cubic-bezier(.2,.9,.3,1.3); box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
.tgl input:checked + .tgl-ui { background: var(--gold); }
.tgl input:checked + .tgl-ui::after { transform: translateX(18px); background: #fff; }
.tgl input:focus-visible + .tgl-ui { outline: 2px solid var(--gold); outline-offset: 2px; }

/* confeti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; }
.confetti i { position: absolute; width: 8px; height: 12px; border-radius: 2px; animation: burst 1.1s cubic-bezier(.15,.7,.3,1) forwards; }
@keyframes burst { to { transform: translate(var(--dx), calc(var(--dy) + 160px)) rotate(var(--r)); opacity: 0; } }

/* ═════════════ modo claro ═════════════ */
:root[data-theme='light'] {
  --grass: #f4f3f8;
  --grass-deep: #e9e8f1;
  --grass-2: #ffffff;
  --grass-3: #e2e1ee;
  --line: rgba(22, 26, 60, 0.1);
  --chalk: #14172b;
  --chalk-dim: #5e6183;
  --gold: #c08a14;
  --gold-ink: #2b1e02;
  --red: #d64545;
  --amber: #c06f12;
  --ok: #1d9a5f;
  --glow: rgba(126, 146, 255, 0.14);
  color-scheme: light;
}
:root[data-theme='light'] .tabbar { background: rgba(255, 255, 255, 0.86); box-shadow: 0 12px 40px rgba(20, 24, 60, 0.14); }
:root[data-theme='light'] .tabbar a.on, :root[data-theme='light'] .btn:not(.ghost):not(.danger), :root[data-theme='light'] .btn-round,
:root[data-theme='light'] .mini.ok, :root[data-theme='light'] .hero-cta:not(.in), :root[data-theme='light'] .toast-ico { background: #e3ad35; color: var(--gold-ink); }
:root[data-theme='light'] .hero, :root[data-theme='light'] .pitch, :root[data-theme='light'] .wx-mini { --chalk: #f3f2f8; --chalk-dim: #b4b7d4; --gold: #e9b949; color: var(--chalk); }
:root[data-theme='light'] .toast { background: rgba(255, 255, 255, 0.94); box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px -12px rgba(20, 24, 60, 0.3); }
:root[data-theme='light'] .balance.due { background: radial-gradient(90% 90% at 100% 0%, rgba(214,69,69,0.16), transparent 60%), #fff; box-shadow: inset 0 0 0 1px rgba(214,69,69,0.25); }
:root[data-theme='light'] .sheet-wrap, :root[data-theme='light'] .dlg-wrap { background: rgba(20, 24, 50, 0.38); }
:root[data-theme='light'] .card, :root[data-theme='light'] .match-row, :root[data-theme='light'] .pay-row, :root[data-theme='light'] .balance, :root[data-theme='light'] .kpis div { box-shadow: inset 0 0 0 1px var(--line), 0 10px 26px -20px rgba(20, 24, 60, 0.4); }
:root[data-theme='light'] .meter-bar { background: rgba(20, 24, 60, 0.1); }
:root[data-theme='light'] .hero .meter-bar { background: rgba(0, 0, 0, 0.28); }
:root[data-theme='light'] .mini { background: var(--grass-3); }
:root[data-theme='light'] .side-B .side-avg { color: #f3f2f8; }
:root[data-theme='light'] .login-pitch { stroke: rgba(192, 138, 20, 0.22); }
:root[data-theme='light'] .demobar { background: #e3ad35; }

/* ═════════════ cabecera del partido, tu equipo y direcciones ═════════════ */

/* línea superior: estado · grupo */
.d-eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 2px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.d-eyebrow .st { display: inline-flex; align-items: center; gap: 8px; color: var(--st, var(--chalk-dim)); }
.d-eyebrow .st i { width: 8px; height: 8px; border-radius: 50%; background: var(--st, var(--chalk-dim)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--st, var(--chalk-dim)) 22%, transparent); }
.d-eyebrow .st.open { --st: var(--ok); }
.d-eyebrow .st.open i { animation: stPulse 2s ease-in-out infinite; }
.d-eyebrow .st.teams { --st: var(--gold); }
.d-eyebrow .st.played { --st: var(--amber); }
.d-eyebrow .st.closed { --st: var(--chalk-dim); }
.d-eyebrow .d-grp { display: inline-flex; align-items: center; gap: 10px; color: var(--chalk-dim); }
.d-eyebrow .d-grp::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--chalk-dim); opacity: 0.55; }
@keyframes stPulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--st) 0%, transparent); } }
.d-meta > span { display: flex; flex-direction: column; min-width: 0; }
.d-addr { font-size: 13px; color: var(--chalk-dim); margin-top: 1px; }

/* tarjeta "te ha tocado en…" */
.myteam { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 14px 16px; border-radius: 20px;
  background: linear-gradient(115deg, color-mix(in srgb, var(--peto) 26%, var(--grass-2)) 0%, var(--grass-2) 62%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--peto) 45%, var(--line)), 0 14px 30px -18px rgba(0,0,0,0.6); animation: pop 0.35s cubic-bezier(.2,.9,.3,1.2) both; }
.myteam-shirt { flex: none; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: rgba(0,0,0,0.22); }
.myteam-shirt svg { width: 38px; height: 38px; fill: var(--peto); stroke: rgba(255,255,255,0.55); stroke-width: 1.1; stroke-linejoin: round; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.35)); }
.myteam-shirt.light svg { stroke: rgba(0,0,0,0.35); }
.myteam-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.myteam-main small, .myteam-side small { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--chalk-dim); }
.myteam-main b { font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: 0.01em; }
.myteam-main span { font-size: 13px; color: var(--chalk-dim); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.myteam-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.myteam-rival { display: inline-flex; align-items: center; font-weight: 650; font-size: 14px; }
.myteam-rival .peto { margin: 0 6px 0 0; }
.myteam-score { font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1; }
.myteam.win .myteam-side small { color: var(--ok); }
.myteam.loss .myteam-side small { color: var(--red); }
.myteam.draw .myteam-side small { color: var(--gold); }

/* portada: "Juegas con…" */
.hero-team { position: relative; display: inline-flex; align-items: center; gap: 2px; width: fit-content; margin-top: 10px; padding: 5px 12px 5px 6px; border-radius: 999px; background: rgba(255,255,255,0.1); font-size: 14px; color: #f3f2f8; }
.hero-team b { margin-left: 4px; }
.hero-team .peto { background: var(--peto); margin: 0 6px 0 2px; }

/* campo: el jugador destacado y contraste de fichas en ambos temas */
.pitch .avatar { background: #252a4e; color: #f3f2f8; }
.pitch .avatar.guest { background: rgba(10,12,30,0.45); color: #f3f2f8; box-shadow: inset 0 0 0 1.5px rgba(243,242,248,0.7); }
.pitch .side-A .side-avg { background: #f3f2f8; color: #0d1022; }
.pitch .side-B .side-avg { background: #05060f; color: #f3f2f8; }
.token.static { cursor: default; }
.token { position: relative; color: #f3f2f8; }
.token.me .avatar { box-shadow: 0 0 0 3px #e9b949, 0 0 0 7px rgba(233,185,73,0.28), 0 8px 18px rgba(0,0,0,0.4) !important; }
.token.me .token-name { color: #ffd77a; }
.token-you { position: absolute; top: -2px; right: 8px; padding: 1px 6px; border-radius: 999px; background: #e9b949; color: #2e2104; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; box-shadow: 0 2px 6px rgba(0,0,0,0.35); }

/* buscador de direcciones */
.addr { position: relative; }
.addr-field { position: relative; display: flex; align-items: center; margin-top: 6px; }
.addr-field > svg { position: absolute; left: 13px; color: var(--chalk-dim); pointer-events: none; }
.addr-field input { width: 100%; margin: 0; padding-left: 40px; padding-right: 40px; }
.addr-spin { position: absolute; right: 14px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--gold); animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.addr-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; border-radius: 16px; background: var(--grass-2);
  box-shadow: inset 0 0 0 1px var(--line), 0 22px 44px -14px rgba(0,0,0,0.55); max-height: 300px; overflow-y: auto; animation: pop 0.18s ease-out both; }
.addr-list li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 11px; cursor: pointer; }
.addr-list li.hi, .addr-list li:hover { background: var(--grass-3); }
.addr-ico { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--grass-3); color: var(--chalk-dim); }
.addr-ico.sport { background: rgba(95,211,154,0.14); color: var(--ok); }
.addr-list li.hi .addr-ico { background: var(--grass-2); }
.addr-txt { display: flex; flex-direction: column; min-width: 0; }
.addr-txt b { font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr-txt small { font-size: 12.5px; color: var(--chalk-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr-list li.addr-empty { cursor: default; color: var(--chalk-dim); font-size: 14px; }
.addr-list li.addr-empty:hover { background: none; }
.addr-list li.addr-credit { cursor: default; justify-content: flex-end; padding: 4px 8px 2px; font-size: 10.5px; color: var(--chalk-dim); opacity: 0.75; }
.addr-list li.addr-credit:hover { background: none; }
.addr-ok { display: flex; align-items: center; gap: 6px; margin: 6px 2px 0; font-size: 13px; color: var(--ok); }
.addr-ok span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--chalk-dim); }
.addr-ok a { flex: none; color: var(--gold); font-weight: 600; text-decoration: none; }
.addr-hint { margin: 6px 2px 0; font-size: 12.5px; color: var(--chalk-dim); }
.addr input { background: var(--grass-deep); border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 12px 40px; font-size: 16px; color: var(--chalk); font-weight: 500; width: 100%; }
.addr .addr-field input:not([type='range']):not([type='checkbox']) { padding-left: 42px; padding-right: 40px; }
.addr input:focus { border-color: var(--gold); outline: none; }
.set-body .addr { padding: 8px 0; }
.set-body .addr > label { display: flex; flex-direction: column; font-size: 15px; }
.set-body .addr-field { margin-top: 8px; }

:root[data-theme='light'] .myteam { background: linear-gradient(115deg, color-mix(in srgb, var(--peto) 12%, #fff) 0%, #fff 70%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--peto) 30%, var(--line)), 0 14px 30px -20px rgba(20,24,60,0.45); }
:root[data-theme='light'] .myteam-shirt { background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 6px 14px -8px rgba(20,24,60,0.35); }
:root[data-theme='light'] .myteam-shirt.light { background: #23263a; }

/* ═════════════ login: noche de partido ═════════════ */
.login, :root[data-theme='light'] .login {
  --chalk: #f3f2f8; --chalk-dim: #9a9dbf; --gold: #e9b949; --gold-ink: #2e2104; --line: rgba(205, 212, 255, 0.1);
  color: var(--chalk); background: radial-gradient(120% 70% at 50% 0%, #1c2150 0%, #0b0e22 55%, #070915 100%);
  min-height: 100dvh; position: relative; display: grid; place-items: center; overflow: hidden; padding: 28px 22px calc(28px + var(--safe-b));
  perspective: 900px;
}
.login .login-pitch { display: none; }
.lg-sky { position: absolute; inset: 0; pointer-events: none; }
.lg-flood { position: absolute; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,246,214,0.95) 0%, rgba(255,226,150,0.35) 22%, transparent 62%); filter: blur(2px); opacity: 0; animation: floodOn 1.1s steps(1, end) 0.15s forwards, floodBreath 6s ease-in-out 1.6s infinite; }
.lg-flood.l { left: -80px; }
.lg-flood.r { right: -80px; animation-delay: 0.35s, 1.9s; }
.lg-beam { position: absolute; top: -10%; width: 70%; height: 95%; opacity: 0; mix-blend-mode: screen; filter: blur(6px); animation: beamOn 1.4s ease-out 0.5s forwards; }
.lg-beam.l { left: -12%; background: conic-gradient(from 148deg at 0% 0%, transparent 0deg, rgba(255,232,170,0.16) 10deg, rgba(255,232,170,0.04) 26deg, transparent 34deg); transform-origin: 0 0; }
.lg-beam.r { right: -12%; background: conic-gradient(from 178deg at 100% 0%, transparent 0deg, rgba(255,232,170,0.04) 8deg, rgba(255,232,170,0.16) 24deg, transparent 34deg); transform-origin: 100% 0; animation-delay: 0.7s; }
.lg-haze { position: absolute; left: -20%; right: -20%; bottom: -8%; height: 55%; background: radial-gradient(60% 60% at 50% 100%, rgba(233,185,73,0.14), transparent 70%); animation: fade 2s ease 0.6s both; }
@keyframes floodOn { 0% { opacity: 0; } 18% { opacity: 0.9; } 26% { opacity: 0.15; } 40% { opacity: 1; } 100% { opacity: 1; } }
@keyframes floodBreath { 50% { transform: scale(1.06); opacity: 0.88; } }
@keyframes beamOn { from { opacity: 0; transform: scaleY(0.85); } to { opacity: 1; transform: none; } }

.lg-field { position: absolute; left: 50%; bottom: -6%; width: 150%; height: 52%; transform: translateX(-50%) rotateX(62deg); transform-origin: 50% 100%; pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, #000 30%, transparent 95%); mask-image: linear-gradient(to top, #000 30%, transparent 95%); }
.lg-field svg { width: 100%; height: 100%; fill: none; stroke: rgba(233,185,73,0.32); stroke-width: 1.4; }
.lg-field svg * { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 2.6s cubic-bezier(.6,.1,.2,1) 0.6s forwards; }
.lg-field .dot { fill: rgba(233,185,73,0.6); }

.login .login-inner { position: relative; z-index: 1; text-align: center; width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; }

/* carta flotante */
.lg-stage { perspective: 800px; margin-bottom: 22px; }
.lg-card-wrap { position: relative; animation: cardIn 1.1s cubic-bezier(.2,.9,.25,1.15) 0.55s both; }
.lg-card { position: relative; width: 132px; height: 184px; display: flex; flex-direction: column; align-items: center; color: #2e2104;
  background: linear-gradient(155deg, #fff2c4 0%, #f2cf6f 30%, #c99327 62%, #8a5c10 100%);
  clip-path: polygon(50% 0, 100% 7%, 100% 88%, 50% 100%, 0 88%, 0 7%);
  transform: rotateX(var(--rx, 6deg)) rotateY(var(--ry, -10deg)); transition: transform 0.5s cubic-bezier(.2,.8,.2,1); transform-style: preserve-3d;
  animation: cardFloat 5s ease-in-out 1.8s infinite; }
.lg-card::before { content: ''; position: absolute; inset: 6px; clip-path: inherit; border: 1.5px solid rgba(255,255,255,0.55); clip-path: polygon(50% 0, 100% 7%, 100% 88%, 50% 100%, 0 88%, 0 7%); }
.lg-card-glare { position: absolute; inset: 0; background: radial-gradient(70% 50% at var(--gx, 30%) var(--gy, 20%), rgba(255,255,255,0.7), transparent 60%), linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.55) 48%, transparent 60%); background-size: 100% 100%, 260% 100%; mix-blend-mode: soft-light; animation: glareSweep 4.5s ease-in-out 2.2s infinite; pointer-events: none; }
.lg-card-top { position: absolute; left: 16px; top: 22px; display: flex; flex-direction: column; align-items: center; line-height: 0.9; }
.lg-card-top b { font-family: var(--display); font-size: 36px; font-weight: 900; }
.lg-card-top small { font-size: 9px; font-weight: 800; letter-spacing: 0.08em; }
.lg-card-ball { margin-top: 40px; width: 70px; height: 70px; display: grid; place-items: center; border-radius: 50%; background: rgba(46,33,4,0.12); box-shadow: inset 0 0 0 1.5px rgba(46,33,4,0.25); }
.lg-card-ball svg { animation: ballSpin 9s linear 2s infinite; }
.lg-card-name { margin-top: 8px; font-family: var(--display); font-size: 22px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.02em; }
.lg-card-stats { display: flex; gap: 9px; margin-top: 2px; font-size: 8.5px; font-weight: 800; letter-spacing: 0.04em; }
.lg-card-stats span { display: flex; flex-direction: column; align-items: center; }
.lg-card-stats b { font-family: var(--display); font-size: 14px; line-height: 1; }
.lg-card-shadow { position: absolute; left: 50%; bottom: -26px; width: 110px; height: 16px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,0.6), transparent); animation: shadowFloat 5s ease-in-out 1.8s infinite; }
@keyframes cardIn { 0% { opacity: 0; transform: translateY(-60px) rotateY(-120deg) scale(0.7); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes cardFloat { 50% { translate: 0 -8px; } }
@keyframes shadowFloat { 50% { transform: translateX(-50%) scale(0.82); opacity: 0.6; } }
@keyframes glareSweep { 0%, 60% { background-position: 0 0, 130% 0; } 100% { background-position: 0 0, -130% 0; } }
@keyframes ballSpin { to { transform: rotate(360deg); } }

/* título letra a letra */
.login .login-title { font-family: var(--display); font-size: 74px; line-height: 0.85; font-weight: 900; letter-spacing: -0.01em; margin: 0; }
.lg-word { display: inline-flex; overflow: hidden; padding: 0 2px 4px; }
.lg-ch { display: inline-block; transform: translateY(105%); animation: chUp 0.7s cubic-bezier(.2,.9,.25,1) both; animation-delay: calc(0.9s + var(--i) * 0.055s); }
.lg-pro { display: block; margin-top: 8px; padding-left: 0.5em; font-size: 22px; font-weight: 700; letter-spacing: 0.5em; text-transform: uppercase;
  background: linear-gradient(90deg, #b8861c, #ffe39a 45%, #e9b949 55%, #b8861c); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: fadeUp 0.8s ease 1.35s both, goldFlow 5s linear 2.2s infinite; }
@keyframes chUp { to { transform: none; } }
@keyframes goldFlow { to { background-position: -220% 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } }

.login .login-sub { color: var(--chalk-dim); margin: 20px 0 18px; font-size: 15.5px; line-height: 1.45; animation: fadeUp 0.7s ease 1.5s both; }
.lg-feats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.lg-feats li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--chalk);
  background: rgba(255,255,255,0.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.09); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: fadeUp 0.6s cubic-bezier(.2,.9,.3,1.2) both; animation-delay: calc(1.65s + var(--i) * 0.09s); }
.lg-feats svg { color: var(--gold); }

.login .btn-google { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; max-width: 320px; height: 58px; padding: 0 26px;
  border-radius: 999px; border: 0; background: #ffffff; color: #14172b; font-size: 16.5px; font-weight: 700; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.6), 0 18px 40px -12px rgba(233,185,73,0.55), 0 10px 26px rgba(0,0,0,0.45);
  animation: fadeUp 0.7s cubic-bezier(.2,.9,.3,1.2) 1.95s both; transition: transform 0.18s ease, box-shadow 0.25s ease; }
.login .btn-google::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(233,185,73,0.35) 48%, transparent 66%); transform: translateX(-120%); animation: btnShine 3.8s ease-in-out 3s infinite; }
.login .btn-google:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px #fff, 0 22px 48px -12px rgba(233,185,73,0.7), 0 12px 30px rgba(0,0,0,0.5); }
.login .btn-google:active { transform: scale(0.97); }
.login .btn-google:disabled { opacity: 1; cursor: progress; }
.g-logo { width: 24px; height: 24px; display: grid; place-items: center; }
.g-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #e3e4ee; border-top-color: #4285f4; animation: spin 0.7s linear infinite; }
@keyframes btnShine { 0%, 65% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.lg-foot { margin: 16px 0 0; font-size: 12.5px; color: var(--chalk-dim); opacity: 0.8; animation: fadeUp 0.6s ease 2.2s both; }
.login .login-err { margin-top: 12px; color: #ff8a8a; }
@media (max-height: 700px) {
  .lg-stage { margin-bottom: 14px; transform: scale(0.86); margin-top: -14px; }
  .login .login-title { font-size: 62px; }
  .lg-feats { margin-bottom: 20px; }
}

/* ═════════════ movimiento en la app ═════════════ */

/* transición entre pantallas y entrada escalonada de bloques */
.route { animation: routeIn 0.42s cubic-bezier(.2,.8,.2,1) backwards; }
@keyframes routeIn { from { opacity: 0; transform: translateY(12px); } }
.route > .screen > * { animation: itemIn 0.5s cubic-bezier(.2,.8,.2,1) backwards; }
.route > .screen > :nth-child(2) { animation-delay: 40ms; }
.route > .screen > :nth-child(3) { animation-delay: 80ms; }
.route > .screen > :nth-child(4) { animation-delay: 120ms; }
.route > .screen > :nth-child(5) { animation-delay: 160ms; }
.route > .screen > :nth-child(6) { animation-delay: 200ms; }
.route > .screen > :nth-child(n+7) { animation-delay: 240ms; }
.route .list > *, .route .people > li { animation: itemIn 0.45s cubic-bezier(.2,.8,.2,1) backwards; }
.route .list > :nth-child(2), .route .people > li:nth-child(2) { animation-delay: 160ms; }
.route .list > :nth-child(3), .route .people > li:nth-child(3) { animation-delay: 200ms; }
.route .list > :nth-child(4), .route .people > li:nth-child(4) { animation-delay: 240ms; }
.route .list > :nth-child(5), .route .people > li:nth-child(5) { animation-delay: 280ms; }
.route .list > :nth-child(6), .route .people > li:nth-child(6) { animation-delay: 320ms; }
.route .list > :nth-child(n+7), .route .people > li:nth-child(n+7) { animation-delay: 360ms; }
.route .list > :first-child, .route .people > li:first-child { animation-delay: 120ms; }
@keyframes itemIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } }

/* barra inferior: píldora dorada que se desliza */
.tabbar { isolation: isolate; }
.tabbar a.on { background: transparent !important; box-shadow: none !important; }
.tab-ind { position: absolute; z-index: -1; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / var(--n)); border-radius: 18px; background: var(--gold);
  box-shadow: 0 8px 20px -6px rgba(233,185,73,0.6); transform: translateX(calc(var(--i) * 100%)); transition: transform 0.5s cubic-bezier(.3,1.35,.45,1); }
:root[data-theme='light'] .tab-ind { background: #e3ad35; }
.tabbar a { transition: color 0.25s ease; }
.tabbar a svg { transition: transform 0.35s cubic-bezier(.3,1.6,.5,1); }
.tabbar a.on svg { transform: translateY(-1px) scale(1.12); }
.tabbar a:active svg { transform: scale(0.88); }

/* tarjetas con inclinación 3D y reflejo */
.tilt { transition: transform 0.45s cubic-bezier(.2,.8,.2,1); transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); will-change: transform; }
.tilt.tilting { transition: transform 0.08s linear; }
.hero-glare { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(60% 50% at var(--gx, 80%) var(--gy, 0%), rgba(255,236,180,0.16), transparent 70%); transition: background 0.3s; }
.hero > *:not(.hero-glare):not(.hero-lines) { position: relative; z-index: 1; }
.hero, .route > .screen > .hero { animation: heroIn 0.7s cubic-bezier(.2,.9,.25,1.1) 0.08s backwards; }
@keyframes heroIn { from { opacity: 0; transform: perspective(900px) rotateX(12deg) translateY(18px) scale(0.97); } }
.pcard.tilt { transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }

/* podio: los tres suben por orden y el primero brilla */
.podium-slot { animation: podiumUp 0.7s cubic-bezier(.2,.9,.25,1.15) backwards; }
.podium-slot.p1 { animation-delay: 0.15s; }
.podium-slot.p2 { animation-delay: 0.3s; }
.podium-slot.p3 { animation-delay: 0.42s; }
.podium-step { transform-origin: bottom; animation: stepGrow 0.6s cubic-bezier(.2,.9,.25,1) backwards; animation-delay: inherit; }
.podium-slot.p1 .pcard { filter: drop-shadow(0 0 18px rgba(233,185,73,0.45)) drop-shadow(0 14px 22px rgba(0,0,0,0.45)); }
@keyframes podiumUp { from { opacity: 0; transform: translateY(40px); } }
@keyframes stepGrow { from { transform: scaleY(0); } }

/* hojas y botones con muelle */
.sheet { animation: sheetUp 0.5s cubic-bezier(.2,1.15,.35,1); }
@keyframes sheetUp { from { transform: translateY(100%); } }
.sheet-wrap { animation: fade 0.25s ease; }
.btn { transition: transform 0.18s cubic-bezier(.3,1.6,.5,1), box-shadow 0.25s ease, background 0.2s; }
.btn:active, .btn-round:active, .act:active, .icon-btn:active { transform: scale(0.95); }
.btn-round, .act, .icon-btn { transition: transform 0.18s cubic-bezier(.3,1.6,.5,1); }
.btn:not(.ghost):not(.danger):not(:disabled) { position: relative; overflow: hidden; }
.btn:not(.ghost):not(.danger):not(:disabled)::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.35) 50%, transparent 65%); transform: translateX(-130%); pointer-events: none; }
.btn:not(.ghost):not(.danger):not(:disabled):hover::after { transition: transform 0.75s ease; transform: translateX(130%); }

/* barras de progreso que se llenan */
.meter-bar > span { animation: fillIn 1.1s cubic-bezier(.2,.8,.2,1) 0.35s backwards; transform-origin: left; }
@keyframes fillIn { from { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  .lg-ch { transform: none; }
  .lg-flood, .lg-beam { opacity: 1; }
  .lg-field svg * { stroke-dashoffset: 0; }
  .tilt { transform: none !important; }
}
.login .login-title span.lg-word { display: inline-flex; font-size: inherit; letter-spacing: inherit; color: inherit; margin: 0; padding: 0 2px 4px; font-weight: inherit; }
.login .login-title span.lg-ch { display: inline-block; font-size: inherit; letter-spacing: inherit; color: inherit; margin: 0; padding: 0; font-weight: inherit; }
.login .login-title span.lg-pro { margin-top: 8px; padding-left: 0.5em; font-size: 22px; letter-spacing: 0.5em; color: transparent; }
.lg-feats { gap: 6px; flex-wrap: nowrap; }
.lg-feats li { padding: 7px 10px; font-size: 12.5px; gap: 6px; white-space: nowrap; }
@media (max-width: 350px) { .lg-feats { flex-wrap: wrap; } }
.login, :root[data-theme='light'] .login { grid-template-columns: minmax(0, 1fr); }
.login .login-inner { min-width: 0; }
.lg-feats { flex-wrap: wrap; }

/* ═════════════ invitaciones ═════════════ */
.lg-invite { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 320px; margin: -8px 0 16px; padding: 10px 14px; border-radius: 16px; text-align: left;
  background: linear-gradient(120deg, rgba(233,185,73,0.18), rgba(233,185,73,0.05)); box-shadow: inset 0 0 0 1px rgba(233,185,73,0.35); animation: fadeUp 0.6s ease 1.8s both; }
.lg-invite-ico { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--gold); color: var(--gold-ink); }
.lg-invite b { display: block; font-size: 14.5px; }
.lg-invite small { color: var(--gold); font-weight: 650; letter-spacing: 0.06em; font-size: 12px; }

.gate .login-inner { gap: 0; }
.gate-lock { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22px; margin-bottom: 18px; color: var(--gold-ink);
  background: linear-gradient(150deg, #ffe39a, #e9b949 55%, #b8861c); box-shadow: 0 16px 40px -12px rgba(233,185,73,0.6); animation: pop 0.6s cubic-bezier(.2,.9,.3,1.3) 0.2s both; }
.gate-title { font-family: var(--display); font-size: 40px; line-height: 0.95; font-weight: 800; margin: 0; animation: fadeUp 0.6s ease 0.35s both; }
.gate .login-sub { margin: 14px 0 22px; animation-delay: 0.45s; }
.gate-form { display: flex; gap: 8px; width: 100%; max-width: 340px; animation: fadeUp 0.6s ease 0.55s both; }
.gate-form input { flex: 1; min-width: 0; height: 52px; padding: 0 14px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.06); color: #f3f2f8; font-size: 16px; font-weight: 600; letter-spacing: 0.04em; }
.gate-form input:focus { outline: none; border-color: var(--gold); }
.gate-form .btn { flex: none; height: 52px; padding: 0 18px; background: var(--gold); color: var(--gold-ink); }
.gate-who { margin: 22px 0 4px; font-size: 13px; color: var(--chalk-dim); animation: fadeUp 0.6s ease 0.65s both; }
.gate-out { color: var(--gold); font-weight: 650; animation: fadeUp 0.6s ease 0.7s both; }

.invites .hint { margin: 0 0 12px; }
.inv-new { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; background: var(--grass-deep); box-shadow: inset 0 0 0 1px var(--line); }
.inv-lbl { font-size: 13px; font-weight: 650; color: var(--chalk-dim); margin-top: 2px; }
.seg.wrap { flex-wrap: wrap; border-radius: 16px; }
.seg.wrap button { flex: 1 1 40%; font-size: 13.5px; }
.inv-new .fld { padding: 4px 0; }
.inv-new .btn { margin-top: 6px; }
.inv-fresh { margin-top: 12px; padding: 16px; border-radius: 18px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: linear-gradient(140deg, rgba(233,185,73,0.2), rgba(233,185,73,0.04)); box-shadow: inset 0 0 0 1px rgba(233,185,73,0.4); animation: pop 0.45s cubic-bezier(.2,.9,.3,1.3) both; }
.inv-fresh small { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.inv-fresh b { font-family: var(--display); font-size: 34px; font-weight: 800; letter-spacing: 0.06em; }
.inv-url { font-size: 12px; color: var(--chalk-dim); word-break: break-all; }
.inv-fresh .inv-actions { justify-content: center; margin-top: 8px; }
.inv-h { margin: 18px 0 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--chalk-dim); }
.inv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.inv { padding: 12px 14px; border-radius: 14px; background: var(--grass-deep); box-shadow: inset 0 0 0 1px var(--line); }
.inv:not(.ok) { opacity: 0.72; }
.inv-main { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.inv-code { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: 0.06em; }
.inv-chip { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--grass-3); color: var(--chalk-dim); }
.inv-chip.ok { background: rgba(95,211,154,0.16); color: var(--ok); }
.inv-chip.revoked, .inv-chip.expired { background: rgba(255,107,107,0.14); color: var(--red); }
.inv-note { margin: 2px 0 0; font-size: 14px; font-weight: 600; }
.inv-meta { margin: 2px 0 0; font-size: 12.5px; color: var(--chalk-dim); }
.inv-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.inv-actions .act { height: 34px; padding: 0 12px; font-size: 13px; text-decoration: none; }
.act.danger svg { color: var(--red); }

/* ═════════════ quien pierde paga la pista ═════════════ */
.lp-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #ffd77a;
  background: linear-gradient(120deg, rgba(255,107,107,0.22), rgba(233,185,73,0.18)); box-shadow: inset 0 0 0 1px rgba(233,185,73,0.4); white-space: nowrap; vertical-align: 2px; }
.lp-tag.sm { padding: 1px 7px; font-size: 11px; gap: 4px; margin-left: 8px; font-style: normal; }
:root[data-theme='light'] .lp-tag { color: #8a5a00; background: linear-gradient(120deg, rgba(214,69,69,0.12), rgba(227,173,53,0.2)); }
:root[data-theme='light'] .hero .lp-tag { color: #ffd77a; }
.hero-lp { position: relative; display: block; margin-top: 10px; }
.hero-lp .lp-tag { animation: lpPulse 2.8s ease-in-out 1s infinite; }
@keyframes lpPulse { 50% { box-shadow: inset 0 0 0 1px rgba(233,185,73,0.75), 0 0 18px rgba(233,185,73,0.35); } }

.lp-banner { display: flex; gap: 12px; align-items: flex-start; margin: 8px 0 2px; padding: 12px 14px; border-radius: 16px;
  background: linear-gradient(115deg, rgba(255,107,107,0.14), rgba(233,185,73,0.1) 60%, transparent); box-shadow: inset 0 0 0 1px rgba(233,185,73,0.3); }
.lp-banner-ico { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--gold); color: var(--gold-ink); }
.lp-banner-t { display: block; font-size: 15px; font-weight: 750; }
.lp-banner-b { display: block; font-size: 13.5px; color: var(--chalk-dim); margin-top: 2px; line-height: 1.4; }
.lp-banner-b b { color: var(--chalk); }

.myteam-lp { display: inline-block; margin-top: 6px; padding: 3px 9px; border-radius: 8px; font-size: 12px !important; font-weight: 650; color: #ffd77a !important; background: rgba(233,185,73,0.14); -webkit-line-clamp: unset !important; }
.myteam-lp.win { color: var(--ok) !important; background: rgba(95,211,154,0.14); }
.myteam-lp.loss { color: #ff8a8a !important; background: rgba(255,107,107,0.14); }
:root[data-theme='light'] .myteam-lp { color: #8a5a00 !important; }
:root[data-theme='light'] .myteam-lp.loss { color: var(--red) !important; }
:root[data-theme='light'] .myteam-lp.win { color: var(--ok) !important; }

.sb-lp { grid-column: 1 / -1; margin-top: 8px; padding: 7px 12px; border-radius: 10px; text-align: center; font-size: 13.5px; color: #ffd77a; background: rgba(233,185,73,0.12); }
:root[data-theme='light'] .sb-lp { color: #8a5a00; }
.lp-hint { color: var(--gold); margin-top: -2px; }

/* interruptor en el formulario del partido */
.form .lp-switch, .lp-switch { position: relative; display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; cursor: pointer;
  background: var(--grass-deep); box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow 0.25s, background 0.25s; color: var(--chalk); }
.lp-switch.on { background: linear-gradient(115deg, rgba(233,185,73,0.16), var(--grass-deep)); box-shadow: inset 0 0 0 1.5px rgba(233,185,73,0.55); }
.lp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lp-switch-ico { display: none; }
.lp-switch-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.lp-switch-txt b { font-size: 15px; color: var(--chalk); }
.lp-switch-txt small { font-size: 12.5px; font-weight: 500; color: var(--chalk-dim); }
.lp-switch .tgl-ui { flex: none; }
.lp-switch input:checked ~ .tgl-ui { background: var(--gold); }
.lp-switch input:checked ~ .tgl-ui::after { transform: translateX(18px); background: #fff; }
.lp-switch input:focus-visible ~ .tgl-ui { outline: 2px solid var(--gold); outline-offset: 2px; }

/* roles en la plantilla */
.role-switches { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; flex: none; }
.switch.treas input { accent-color: var(--ok); }
.roles-hint { font-size: 12.5px; }
.roles-hint b { color: var(--chalk); }

/* carta: la foto no tapa la media */
.pcard-photo { margin-left: 34%; width: 48%; margin-top: 16%; }
.pcard.sm .pcard-photo { margin-left: 36%; width: 46%; margin-top: 24%; }
.pcard-top { z-index: 2; }

/* resultado: solo goles */
.stat-head, .stat-row { grid-template-columns: 1fr 120px; }

/* ═════════════ foto de perfil ═════════════ */
.ph-pick { display: flex; align-items: center; gap: 16px; padding: 4px 0 6px; }
.ph-current { position: relative; flex: none; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; }
.ph-current .avatar { box-shadow: 0 0 0 3px var(--gold), 0 10px 24px -8px rgba(0,0,0,0.5); }
.ph-badge { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--gold-ink); box-shadow: 0 0 0 3px var(--grass-2); }
.ph-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ph-actions .link { font-size: 14px; }
.danger-link { color: var(--red) !important; }
.ph-editor { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-bottom: 8px; }
.ph-stage { position: relative; width: 260px; height: 260px; border-radius: 22px; overflow: hidden; display: grid; place-items: center; background: var(--grass-deep); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.ph-stage:active { cursor: grabbing; }
.ph-stage canvas { display: block; }
.ph-ring { position: absolute; inset: 0; pointer-events: none; border-radius: 22px; background: radial-gradient(circle at center, transparent 0 129px, rgba(8,10,23,0.62) 130px); box-shadow: inset 0 0 0 1px var(--line); }
.ph-ring::after { content: ''; position: absolute; inset: 0; margin: auto; width: 258px; height: 258px; border-radius: 50%; box-shadow: 0 0 0 2px var(--gold); }
.ph-zoom { display: flex; align-items: center; gap: 10px; width: 260px; color: var(--chalk-dim); }
.ph-zoom input { flex: 1; accent-color: var(--gold); }
.ph-editor .row-btns { width: 100%; }
.ph-editor .row-btns .btn { flex: 1; }

/* ═════════════ instalar como app ═════════════ */
.install-card { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; padding: 12px 14px; border-radius: 18px;
  background: linear-gradient(120deg, rgba(233,185,73,0.16), rgba(233,185,73,0.03) 70%); box-shadow: inset 0 0 0 1px rgba(233,185,73,0.32); }
.install-card.compact { margin: 2px 0 14px; }
.install-ico img { display: block; border-radius: 12px; box-shadow: 0 6px 16px -6px rgba(0,0,0,0.5); }
.install-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.install-txt b { font-size: 14.5px; }
.install-txt small { font-size: 12.5px; color: var(--chalk-dim); line-height: 1.35; }
.install-btns { flex: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.install-btns .link { font-size: 12px; color: var(--chalk-dim); }
.install-steps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.install-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.is-n { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font-weight: 800; font-size: 14px; }
.is-ico { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--grass-3); font-size: 13px; }
.pref-row .btn.ghost { margin-left: 6px; }

/* ─── canales ─── */
.splash.small { min-height: 30vh; }
.ch-logo { flex: none; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(145deg, var(--grass-3), var(--grass-deep)); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; font-family: var(--display); font-weight: 800; color: var(--gold); }
.ch-logo img { width: 100%; height: 100%; object-fit: contain; padding: 12%; background: rgba(255,255,255,0.03); }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.ch-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: var(--radius-l); background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line), 0 10px 30px -18px rgba(0,0,0,0.6); transition: transform .18s, box-shadow .18s; min-width: 0; }
.ch-card:active { transform: scale(0.97); }
.ch-card:hover { box-shadow: inset 0 0 0 1px rgba(233,185,73,0.35), 0 14px 34px -18px rgba(0,0,0,0.7); }
.ch-card .ch-logo { margin-bottom: 6px; }
.ch-card.dim, .ch-row.dim { opacity: 0.62; }
.ch-name { font-weight: 650; font-size: 15px; line-height: 1.2; overflow-wrap: anywhere; }
.ch-sub { font-size: 12px; color: var(--chalk-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.ch-card .ch-tag { position: absolute; top: 10px; right: 10px; }
.ch-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 650; background: var(--grass-3); color: var(--chalk-dim); white-space: nowrap; flex: none; }
.ch-tag.warn { background: rgba(245,168,75,0.16); color: var(--amber); }
.ch-tag.bad { background: rgba(255,107,107,0.14); color: var(--red); }
.ch-cats { padding-top: 0; }
.ch-kill { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius-m); background: rgba(255,107,107,0.1); color: var(--red); margin-bottom: 14px; box-shadow: inset 0 0 0 1px rgba(255,107,107,0.25); }
.ch-kill div { display: flex; flex-direction: column; }
.ch-kill small { color: var(--chalk-dim); }
.ch-disc { display: flex; gap: 10px; margin-top: 28px; padding: 14px 16px; border-radius: var(--radius-m); background: var(--grass-deep); color: var(--chalk-dim); font-size: 12.5px; line-height: 1.5; }
.ch-disc svg { flex: none; margin-top: 2px; color: var(--gold); }
.ch-disc p { margin: 0 0 6px; }
.ch-disc p:last-child { margin: 0; }

.ch-player { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--radius-l); overflow: hidden; background: #000; box-shadow: 0 18px 40px -20px rgba(0,0,0,0.8), inset 0 0 0 1px var(--line); margin-bottom: 16px; }
.ch-player iframe, .ch-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.ch-player.off, .ch-player.link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px; text-align: center; color: var(--chalk-dim); background: radial-gradient(80% 80% at 50% 0%, var(--grass-3), var(--grass-deep)); }
.ch-player.off p, .ch-player.link p { margin: 0; max-width: 32ch; }
.ch-player.link .btn { display: inline-flex; align-items: center; gap: 8px; }
.ch-err { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,0.75); color: #fff; font-size: 13px; }
.ch-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ch-head h1 { font-family: var(--display); font-size: 30px; line-height: 1; }
.ch-head p { margin: 2px 0 0; font-size: 13px; }
.ch-info { padding: 6px 16px; }
.ch-info div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ch-info div:last-child { border: 0; }
.ch-info span { color: var(--chalk-dim); flex: none; }
.ch-info b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.ch-view .actions-row .btn, .ch-row .actions-row .btn { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.actions-row.compact { margin: 0; padding: 0; overflow: visible; }
.actions-row.compact .btn { min-height: 36px; padding: 0 12px; font-size: 13px; }
.ch-flags ul { list-style: none; margin: 0; padding: 0 16px; }
.ch-flags li { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ch-flags li small { color: var(--chalk-dim); font-size: 12px; }
.ch-flags .hint, .ch-flags .btn { margin: 10px 16px 16px; width: calc(100% - 32px); }
.ch-flags .card-head b { display: inline-flex; align-items: center; gap: 6px; color: var(--amber); }

.ch-master { padding: 4px 16px; }
.ch-master.on { box-shadow: inset 0 0 0 1px rgba(95,211,154,0.3); }
.ch-master:not(.on) { box-shadow: inset 0 0 0 1px rgba(255,107,107,0.35); }
.ch-tabs { margin-bottom: 6px; }
.ch-tabs button { font-size: 13px; padding-inline: 2px; }
.ch-tabs .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); vertical-align: middle; }
.ch-row { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 8px; border-radius: var(--radius-m); background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.ch-row > .grow, .ch-row-main .grow { display: flex; flex-direction: column; min-width: 0; }
.ch-row b { font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-row small { font-size: 12px; color: var(--chalk-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-row-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.ch-row.retired { flex-wrap: wrap; padding-left: 12px; }
.ch-row.retired .actions-row { width: 100%; justify-content: flex-end; }
.ch-ord { display: flex; flex-direction: column; }
.ch-ord .icon-btn.sm { width: 28px; height: 24px; border-radius: 8px; }
.ch-ord .icon-btn:disabled { opacity: 0.25; }
.ch-tgl { padding: 0; flex: none; }
.ch-gap { margin-top: 12px; }
.ch-form h3.ch-sub-h { font-family: var(--display); font-size: 20px; margin: 8px 0 -4px; }
.ch-form label .hint { margin: 0; font-weight: 500; }
.ch-logo-row { display: flex; gap: 14px; align-items: center; }
.ch-logo-row .grow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.ch-file { position: relative; overflow: hidden; display: inline-flex; align-items: center; cursor: pointer; color: var(--chalk) !important; }
.ch-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.form input.ch-logo-url { width: 100%; font-size: 14px; padding: 9px 12px; }
.form label.ch-confirm { flex-direction: row; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-m); background: rgba(233,185,73,0.08); box-shadow: inset 0 0 0 1px rgba(233,185,73,0.25); color: var(--chalk); font-weight: 500; }
.form label.ch-confirm input { width: 20px; height: 20px; flex: none; accent-color: var(--gold); margin-top: 1px; }
.ch-access .card.pad { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ch-access .hint { margin: 0; }
.ch-people button { display: inline-flex; align-items: center; gap: 6px; font-family: var(--body) !important; font-size: 13px !important; font-weight: 600 !important; padding: 6px 12px 6px 6px !important; min-width: 0 !important; flex: 0 1 auto !important; border-radius: 999px !important; }
.ch-people .avatar { font-size: 9px !important; }
.ch-log { list-style: none; margin: 8px 0 0; padding: 0 0 0 8px; border-left: 2px solid var(--line); }
.ch-log li { position: relative; display: flex; gap: 10px; padding: 8px 0 8px 14px; font-size: 14px; }
.ch-log li i { position: absolute; left: -14px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--grass-3); box-shadow: 0 0 0 3px var(--grass); }
.ch-log li.a-create i, .ch-log li.a-restore i, .ch-log li.a-activate i { background: var(--ok); }
.ch-log li.a-retire i, .ch-log li.a-delete i { background: var(--red); }
.ch-log li.a-flag i { background: var(--amber); }
.ch-log li.a-config i, .ch-log li.a-review i { background: var(--gold); }
.ch-log div { display: flex; flex-direction: column; min-width: 0; }
.ch-log small { color: var(--chalk-dim); font-size: 12px; }
.ch-log-r { color: var(--chalk-dim); font-style: italic; overflow-wrap: anywhere; }
.ch-admin .sec-row .link { font-size: 14px; text-decoration: none; }
.ch-admin .save-dock, .ch-access .save-dock { justify-content: center; padding: 10px; }
:root[data-theme='light'] .ch-logo { background: linear-gradient(145deg, #fff, #eef0f8); }
:root[data-theme='light'] .ch-disc { background: rgba(20,24,60,0.05); }
.ch-player.pending p { line-height: 1.5; }
.ch-player.pending b { color: var(--chalk); }
.ch-to-settings { display: flex; align-items: center; gap: 6px; padding: 10px 0 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--chalk-dim); }
.ch-to-settings b { color: var(--gold); font-weight: 600; }
.ch-to-settings svg { margin-left: auto; }
.ch-settings { display: flex; flex-direction: column; gap: 12px; }
.ch-settings .ch-access .card.pad { background: var(--grass-deep); box-shadow: inset 0 0 0 1px var(--line); margin: 0; }
.ch-settings .btn.ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }

/* ─── valor de mercado ─── */
.up { color: var(--ok); }
.down { color: var(--red); }
.mkt-card .mkt-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; padding: 4px 16px 0; }
.mkt-v { font-family: var(--display); font-size: 40px; font-weight: 800; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.mkt-chg { font-size: 14px; font-weight: 650; color: var(--chalk-dim); }
.mkt-chg.up { color: var(--ok); } .mkt-chg.down { color: var(--red); }
.mkt-sub { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 8px 16px 0; font-size: 12.5px; color: var(--chalk-dim); font-variant-numeric: tabular-nums; }
.mkt-sub .up { color: var(--ok); } .mkt-sub .down { color: var(--red); }
.mkt-movers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.mkt-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px; border-radius: var(--radius-m); background: linear-gradient(120deg, rgba(233,185,73,0.16), rgba(233,185,73,0.04)); box-shadow: inset 0 0 0 1px rgba(233,185,73,0.3); }
.mkt-total span { font-size: 13px; color: var(--chalk-dim); }
.mkt-total b { font-family: var(--display); font-size: 26px; color: var(--gold); font-variant-numeric: tabular-nums; }
.mkt-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mkt-cols .card { margin: 0; padding: 10px 12px 6px; }
.mkt-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.mkt-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; min-width: 0; }
.mkt-item .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkt-item b { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mkt-none { font-size: 13px; margin: 6px 0 10px; }
.mkt-d { font-size: 12px; font-weight: 650; color: var(--chalk-dim); font-variant-numeric: tabular-nums; }
.mkt-table .t-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 380px) { .mkt-cols { grid-template-columns: 1fr; } }
.mkt-table .t-head, .mkt-table .t-row { grid-template-columns: 24px minmax(0, 1fr) 54px 78px; }

/* ─── detalle del partido: botones e info más legibles ─── */
.cta-dock .btn.ghost { background: var(--grass-2); box-shadow: inset 0 0 0 1.5px rgba(205,212,255,0.16), 0 10px 26px -14px rgba(0,0,0,0.6); }
.cta-dock .btn.cta-leave { color: var(--red); background: rgba(255,107,107,0.08); box-shadow: inset 0 0 0 1.5px rgba(255,107,107,0.35); }
.cta-dock .btn.cta-soft { color: var(--chalk); background: var(--grass-3); box-shadow: inset 0 0 0 1px rgba(205,212,255,0.14); }
.cta-dock .btn.cta-soft svg { color: var(--gold); }
.d-notes { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; padding: 12px 14px; background: var(--grass-2); border-radius: var(--radius-m); box-shadow: inset 0 0 0 1px rgba(205,212,255,0.12); color: var(--chalk); line-height: 1.45; }
.d-notes svg { flex: none; color: var(--gold); margin-top: 1px; }
.d-meta { color: #c3c6e0; }
.d-meta svg { color: var(--gold); opacity: 0.85; }
:root[data-theme='light'] .cta-dock .btn.ghost, :root[data-theme='light'] .cta-dock .btn.cta-soft, :root[data-theme='light'] .d-notes { background: #fff; box-shadow: inset 0 0 0 1px rgba(20,24,60,0.14), 0 8px 20px -14px rgba(20,24,60,0.3); }
:root[data-theme='light'] .cta-dock .btn.cta-leave { background: rgba(220,38,38,0.06); color: #c62828; box-shadow: inset 0 0 0 1.5px rgba(220,38,38,0.35); }
:root[data-theme='light'] .d-meta { color: #4a4f6e; }

/* ─── etiqueta "Quien pierde paga" rediseñada: ficha dorada con moneda ─── */
.lp-tag { gap: 7px; padding: 3px 11px 3px 3px; font-size: 12.5px; font-weight: 650; letter-spacing: 0.01em; color: var(--gold);
  background: rgba(233,185,73,0.1); box-shadow: inset 0 0 0 1px rgba(233,185,73,0.32); animation: none !important; }
.lp-coin { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-style: normal; font-size: 11px; font-weight: 800;
  color: var(--gold-ink); background: radial-gradient(circle at 35% 30%, #ffe6a3, var(--gold) 60%, #b8862a); box-shadow: 0 1px 3px rgba(0,0,0,0.35), inset 0 0 0 1.5px rgba(255,255,255,0.25); }
.lp-tag.sm { padding: 2px 8px 2px 2px; gap: 5px; font-size: 11px; }
.lp-tag.sm .lp-coin { width: 16px; height: 16px; font-size: 9.5px; }
:root[data-theme='light'] .lp-tag { color: #8a5a00; background: rgba(227,173,53,0.14); box-shadow: inset 0 0 0 1px rgba(170,120,20,0.3); }

/* ─── aviso "quien pierde paga" en el detalle ─── */
.lp-banner2 { margin: 10px 0 4px; padding: 14px; border-radius: 18px; background: linear-gradient(160deg, rgba(233,185,73,0.12), rgba(233,185,73,0.03) 55%), var(--grass-2); box-shadow: inset 0 0 0 1px rgba(233,185,73,0.28); display: flex; flex-direction: column; gap: 12px; }
.lpb-head { display: flex; align-items: center; gap: 12px; }
.lpb-head .grow { display: flex; flex-direction: column; min-width: 0; }
.lpb-head b { font-size: 15.5px; font-weight: 700; }
.lpb-head small { font-size: 12.5px; color: var(--chalk-dim); font-variant-numeric: tabular-nums; }
.lp-coin.lg { width: 38px; height: 38px; font-size: 18px; flex: none; }
.lpb-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lpb-tile { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 6px; border-radius: 14px; background: var(--grass-deep); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.lpb-tile span { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.05em; color: var(--chalk-dim); }
.lpb-tile b { font-family: var(--display); font-size: 24px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.lpb-tile small { font-size: 11.5px; color: var(--chalk-dim); }
.lpb-tile.lose { box-shadow: inset 0 0 0 1px rgba(255,107,107,0.35); background: rgba(255,107,107,0.07); }
.lpb-tile.lose b { color: var(--red); }
.lpb-tile.win b { color: var(--ok); }
.lpb-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--grass-deep); font-size: 14px; }
.lpb-result > b { font-family: var(--display); font-size: 24px; color: var(--gold); white-space: nowrap; }
.lpb-result > b small { font-family: var(--body); font-size: 12px; color: var(--chalk-dim); font-weight: 500; }
.lpb-team { color: var(--gold); }
:root[data-theme='light'] .lp-banner2 { background: linear-gradient(160deg, rgba(227,173,53,0.14), #fff 60%); box-shadow: inset 0 0 0 1px rgba(170,120,20,0.25); }
:root[data-theme='light'] .lpb-tile, :root[data-theme='light'] .lpb-result { background: #f6f7fb; }
:root[data-theme='light'] .lpb-tile.lose { background: rgba(220,38,38,0.05); }
:root[data-theme='light'] .lpb-tile.lose b { color: #c62828; }
:root[data-theme='light'] .lpb-tile.win b { color: #15803d; }

/* ─── quién pagó la pista y saldos entre compañeros ─── */
.payer-row { display: flex; align-items: center; gap: 12px; margin: 4px 16px 10px; padding: 10px 12px; border-radius: 14px; background: var(--grass-deep); box-shadow: inset 0 0 0 1px var(--line); }
.payer-row .grow { display: flex; flex-direction: column; min-width: 0; }
.payer-row small { font-size: 12px; color: var(--chalk-dim); }
.payer-row b { font-size: 15px; font-weight: 650; }
.payer-row .pay-sel { max-width: 46%; }
.payer-ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(233,185,73,0.14); color: var(--gold); }
.peers .person { gap: 10px; }
.peer-amt { font-family: var(--display); font-size: 20px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.peer-amt.up { color: var(--ok); } .peer-amt.down { color: var(--red); }
.peer-who { display: flex; align-items: center; gap: 2px; color: var(--chalk-dim); flex: none; }
.peers .small-btn { flex: none; }
.pay-tag.self { background: rgba(233,185,73,0.16); color: var(--gold); }
:root[data-theme='light'] .payer-row { background: #f6f7fb; }

/* Pagos: separación entre el saldo y las tarjetas de debajo */
.balance { margin-bottom: 14px; }
.balance + .paylinks { margin: -4px 0 14px; }
.peers { margin-top: 0; }

/* ─── agenda "Dónde ver" ─── */
.ch-view-seg { margin: 0 0 14px; }
.ch-view-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ag-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.ag-tools .btn { display: inline-flex; gap: 6px; }
.ag-sports { padding-top: 8px; }
.ag-day { margin-top: 18px; }
.ag-day-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 3; padding: 8px 2px; margin-bottom: 6px; background: var(--grass); font-family: var(--display); font-size: 24px; text-transform: capitalize; }
.ag-day-h small { font-family: var(--body); font-size: 12px; font-weight: 500; color: var(--chalk-dim); text-transform: none; }
.ag-list { display: flex; flex-direction: column; border-radius: var(--radius-l); overflow: hidden; background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); }
.ag-row { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; align-items: start; width: 100%; padding: 12px 14px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: var(--chalk); }
.ag-row:first-child { border-top: 0; }
.ag-row:hover { background: rgba(205,212,255,0.03); }
.ag-row.live { background: linear-gradient(90deg, rgba(255,107,107,0.1), transparent 60%); }
.ag-time { font-family: var(--display); font-size: 22px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; padding-top: 1px; }
.ag-live { display: inline-block; font-style: normal; font-family: var(--body); font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; background: var(--red); padding: 3px 6px; border-radius: 6px; animation: agPulse 1.6s ease-in-out infinite; }
@keyframes agPulse { 50% { opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) { .ag-live { animation: none; } }
.ag-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ag-comp { font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-comp em { font-style: normal; color: var(--chalk-dim); font-weight: 600; }
.ag-title { font-size: 15.5px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.ag-chs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.ag-ch { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--grass-3); color: var(--chalk); white-space: nowrap; }
.ag-ch.linked { background: rgba(233,185,73,0.14); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(233,185,73,0.3); }
.ag-ch.none { background: transparent; color: var(--chalk-dim); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
.ag-detail { display: flex; flex-direction: column; gap: 8px; }
.ag-detail h3 { font-family: var(--display); font-size: 28px; line-height: 1.05; }
.ag-detail p { margin: 0; }
.ag-where { display: flex; flex-direction: column; gap: 6px; }
.ag-where-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--grass-deep); box-shadow: inset 0 0 0 1px var(--line); }
.ag-where-row b { flex: 1; min-width: 0; }
.ag-where-row span { font-size: 13px; color: var(--chalk-dim); }
a.ag-where-row { box-shadow: inset 0 0 0 1px rgba(233,185,73,0.35); }
a.ag-where-row span { color: var(--gold); }
.ag-detail .row-btns { display: flex; gap: 8px; margin-top: 8px; }
.ag-detail .row-btns .btn { flex: 1; display: inline-flex; gap: 6px; }
.form textarea.ag-import { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
:root[data-theme='light'] .ag-day-h { background: var(--grass); }
:root[data-theme='light'] .ag-where-row { background: #f6f7fb; }

/* El bloque Apuntarme/Borrarme ya no se queda flotando al hacer scroll (tapaba la lista) */
.cta-dock { position: static; top: auto; z-index: auto; }
.cta-dock .btn { box-shadow: none; }

/* ─── cuenta común (estilo Tricount) ─── */
.avatar.bote { background: linear-gradient(145deg, #f3cf6b, #b8862a); font-size: 0.9em !important; }
.lg-hero { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 18px 18px 14px; border-radius: var(--radius-l); margin-bottom: 12px; background: radial-gradient(120% 140% at 0% 0%, rgba(233,185,73,0.16), transparent 55%), var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); }
.lg-hero.pos { background: radial-gradient(120% 140% at 0% 0%, rgba(95,211,154,0.2), transparent 55%), var(--grass-2); }
.lg-hero.neg { background: radial-gradient(120% 140% at 0% 0%, rgba(255,107,107,0.2), transparent 55%), var(--grass-2); }
.lg-hero > span { font-size: 13px; color: var(--chalk-dim); }
.lg-hero > b { font-family: var(--display); font-size: 52px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.lg-hero.pos > b { color: var(--ok); } .lg-hero.neg > b { color: var(--red); }
.lg-hero > small { font-size: 14px; font-weight: 600; }
.lg-hero-sub { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--chalk-dim); }
.lg-hero-sub b { color: var(--chalk); font-variant-numeric: tabular-nums; }
.lg-mymoves { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.lg-move { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 14px; background: var(--grass-2); color: var(--chalk); text-align: left; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }
.lg-move.out { box-shadow: inset 0 0 0 1px rgba(255,107,107,0.35); }
.lg-move.in { box-shadow: inset 0 0 0 1px rgba(95,211,154,0.35); }
.lg-move > b { font-family: var(--display); font-size: 20px; font-variant-numeric: tabular-nums; }
.lg-move.out > b { color: var(--red); } .lg-move.in > b { color: var(--ok); }
.lg-tabs { margin-bottom: 10px; }
.lg-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-style: normal; font-size: 11px; font-weight: 800; background: var(--gold); color: var(--gold-ink); }
.lg-month { font-family: var(--display); font-size: 20px; text-transform: none; margin: 14px 2px 8px; }
.lg-list { display: flex; flex-direction: column; border-radius: var(--radius-l); overflow: hidden; background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); }
.lg-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--chalk); text-align: left; cursor: pointer; }
.lg-row:first-child { border-top: 0; }
.lg-row:hover { background: rgba(205,212,255,0.03); }
.lg-ico { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--grass-3); font-size: 18px; }
.lg-ico.transfer { background: rgba(95,211,154,0.12); }
.lg-main { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.lg-main b { font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-main small { font-size: 12px; color: var(--chalk-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; font-variant-numeric: tabular-nums; }
.lg-amt b { font-size: 15px; }
.lg-amt small { font-size: 11.5px; font-weight: 600; }
.lg-opening { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding: 12px 14px; border-radius: 14px; font-size: 13px; color: var(--chalk-dim); background: var(--grass-deep); box-shadow: inset 0 0 0 1px var(--line); }
.lg-opening svg { color: var(--gold); flex: none; }
.lg-bals { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: var(--radius-l); background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 10px; }
.lg-bal { display: grid; grid-template-columns: minmax(0, 7.5em) minmax(0, 1fr) 6.2em; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; }
.lg-bal.me .lg-bal-who span { font-weight: 800; color: var(--gold); }
.lg-bal-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lg-bal-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lg-bar { position: relative; height: 10px; border-radius: 5px; background: var(--grass-deep); }
.lg-bar::after { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line); }
.lg-bar i { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.lg-bar i.pos { background: var(--ok); } .lg-bar i.neg { background: var(--red); }
.lg-bal > b { text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; }
.lg-settle { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.lg-settle:first-child { border-top: 0; }
.lg-settle.mine { background: rgba(255,107,107,0.06); }
.lg-pair { display: flex; align-items: center; gap: 2px; color: var(--chalk-dim); flex: none; }
.lg-settle-amt { font-family: var(--display); font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-settle .small-btn { flex: none; }
.lg-detail { display: flex; flex-direction: column; gap: 10px; }
.lg-detail-top { display: flex; align-items: center; gap: 12px; }
.lg-detail-top b { display: block; font-family: var(--display); font-size: 34px; line-height: 1; }
.lg-detail-top small { color: var(--chalk-dim); font-size: 13px; }
.lg-paidby { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--grass-deep); }
.lg-split { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lg-split li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lg-split li span { flex: 1; }
.lg-split li.me span { font-weight: 800; color: var(--gold); }
.lg-split b { font-variant-numeric: tabular-nums; }
.lg-detail .row-btns { display: flex; gap: 8px; }
.lg-detail .row-btns .btn { flex: 1; display: inline-flex; gap: 6px; }
.lg-form .seg.mini button { font-size: 12px; padding: 6px 8px; }
.lg-for { display: flex; flex-direction: column; gap: 6px; }
.lg-for-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lg-for-all { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--chalk-dim); }
.lg-pick { list-style: none; margin: 0; padding: 4px 12px; border-radius: 14px; background: var(--grass-deep); max-height: 46vh; overflow: auto; }
.lg-pick li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); opacity: 0.55; }
.lg-pick li.on { opacity: 1; }
.lg-pick li:last-child { border: 0; }
.form .lg-pick label { flex-direction: row; align-items: center; gap: 10px; font-weight: 600; color: var(--chalk); margin: 0; }
.lg-pick input[type='checkbox'] { width: 18px; height: 18px; accent-color: var(--gold); }
.lg-pick b { font-variant-numeric: tabular-nums; font-size: 14px; }
.form input.lg-amt-in { width: 92px; text-align: right; padding: 7px 10px; font-size: 14px; }
.lg-court-me { margin: 0 16px 14px; font-size: 14px; color: var(--chalk-dim); }
.lg-court-me b { color: var(--chalk); }
:root[data-theme='light'] .lg-bar, :root[data-theme='light'] .lg-pick, :root[data-theme='light'] .lg-paidby, :root[data-theme='light'] .lg-opening { background: #f2f3f8; }
.lg-map li { gap: 12px; }
.lg-map li.miss { opacity: 1; box-shadow: inset 3px 0 0 var(--amber); padding-left: 8px; }
.lg-map-src { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lg-map-src small { font-size: 12px; font-variant-numeric: tabular-nums; }
.lg-map select.input { max-width: 58%; padding: 7px 10px; font-size: 13.5px; }

/* ─── minijuego: tanda de penaltis ─── */
:root { --pk-grass: #1f6b43; }
.pk-entry { display: inline-flex; align-items: center; gap: 4px; }
.pk-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px 14px; border-radius: var(--radius-m); background: linear-gradient(120deg, rgba(95,211,154,0.18), rgba(95,211,154,0.04)); box-shadow: inset 0 0 0 1px rgba(95,211,154,0.35); color: var(--chalk); }
.pk-banner-ico { font-size: 22px; animation: pkBounce 1.4s ease-in-out infinite; }
@keyframes pkBounce { 50% { transform: translateY(-4px) rotate(20deg); } }
.pk-banner .grow { display: flex; flex-direction: column; min-width: 0; }
.pk-banner small { font-size: 12px; color: var(--chalk-dim); }
.pk-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: var(--radius-l); background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 12px; }
.pk-hero-txt p { margin: 0 0 12px; color: var(--chalk-dim); font-size: 14px; line-height: 1.5; }
.pk-hero-txt .btn { display: inline-flex; gap: 8px; }
@media (min-width: 560px) { .pk-hero { grid-template-columns: 220px minmax(0, 1fr); align-items: center; } }
.pk-me { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
.pk-me div { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border-radius: 14px; background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); }
.pk-me b { font-family: var(--display); font-size: 24px; line-height: 1; }
.pk-me span { font-size: 11px; color: var(--chalk-dim); }
.pk-list { display: flex; flex-direction: column; border-radius: var(--radius-l); overflow: hidden; background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); }
.pk-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); color: var(--chalk); }
.pk-row:first-child { border-top: 0; }
.pk-row.turn { background: rgba(95,211,154,0.07); }
.pk-row .grow { display: flex; flex-direction: column; min-width: 0; }
.pk-row small { font-size: 12px; color: var(--chalk-dim); }
.pk-tag { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--grass-3); color: var(--chalk-dim); }
.pk-score { font-family: var(--display); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pk-score.win { color: var(--ok); } .pk-score.loss { color: var(--red); } .pk-score.draw { color: var(--gold); }
.pk-awards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.pk-award { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 8px; border-radius: 14px; background: var(--grass-2); box-shadow: inset 0 0 0 1px rgba(233,185,73,0.3); text-align: center; }
.pk-award > span { font-size: 11.5px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .04em; }
.pk-award small { font-size: 12px; color: var(--chalk-dim); }
.pk-table .t-head, .pk-table .t-row { grid-template-columns: 24px minmax(0, 1fr) 64px 40px; }
.pk-rivals { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.pk-rival { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; background: var(--grass-deep); color: var(--chalk); font-size: 13px; font-weight: 600; text-align: center; }
.pk-rival:hover { box-shadow: inset 0 0 0 1px rgba(233,185,73,0.4); }
.pk-vs { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 14px; font-size: 15px; }
.pk-vs span { font-family: var(--display); font-size: 22px; color: var(--gold); padding: 0 4px; }

/* portería */
.pk-stage { position: relative; width: 100%; max-width: 520px; margin: 0 auto 12px; aspect-ratio: 3 / 2; border-radius: var(--radius-l); overflow: hidden; background: linear-gradient(180deg, #0f1733, #142147 62%); box-shadow: inset 0 0 0 1px var(--line); user-select: none; -webkit-user-select: none; }
.pk-stage.mini { max-width: 240px; margin: 0; }
.pk-goal { position: absolute; inset: 0; width: 100%; height: 100%; }
.pk-keeper { position: absolute; left: 50%; top: 36%; width: 17%; transform: translate(-50%, -50%); transition: transform .55s cubic-bezier(.2,.9,.3,1.2); z-index: 2; }
.pk-keeper svg { width: 100%; display: block; }
.pk-keeper.d-l { transform: translate(-175%, -40%) rotate(-62deg); }
.pk-keeper.d-r { transform: translate(75%, -40%) rotate(62deg); }
.pk-keeper.d-c { transform: translate(-50%, -50%); }
.pk-keeper.saved svg { filter: drop-shadow(0 0 8px rgba(233,185,73,.8)); }
.pk-ball { position: absolute; width: 7%; z-index: 3; transition: left .6s cubic-bezier(.3,.7,.4,1), top .6s cubic-bezier(.3,.7,.4,1), transform .6s, opacity .4s; }
.pk-ball svg { width: 100%; display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.pk-ball.parada { opacity: .5 !important; }
.pk-flash { position: absolute; left: 50%; top: 74%; transform: translate(-50%, -50%); z-index: 4; font-family: var(--display); font-size: clamp(28px, 8vw, 46px); font-weight: 900; letter-spacing: .02em; text-shadow: 0 3px 12px rgba(0,0,0,.6); animation: pkPop .35s cubic-bezier(.2,.9,.3,1.4); }
.pk-flash.gol { color: var(--ok); } .pk-flash.parada { color: var(--gold); } .pk-flash.fuera { color: var(--red); }
@keyframes pkPop { from { transform: translate(-50%, -50%) scale(.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pk-ball, .pk-keeper { transition: none; } .pk-flash, .pk-banner-ico { animation: none; } }
.pk-zones { position: absolute; left: 13.3%; right: 13.3%; top: 10%; height: 55%; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); z-index: 5; }
.pk-zones button { border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; border-radius: 10px; }
.pk-zones button i { width: 34%; aspect-ratio: 1; border-radius: 50%; border: 2px dashed rgba(255,255,255,.55); transition: transform .15s, background .15s; }
.pk-zones button:hover i, .pk-zones button:focus-visible i { background: rgba(233,185,73,.35); border-color: var(--gold); transform: scale(1.12); }
.pk-dives { position: absolute; left: 0; right: 0; bottom: 6%; display: flex; justify-content: center; gap: 8px; z-index: 5; padding: 0 8px; }
.pk-dives button { display: inline-flex; align-items: center; gap: 4px; padding: 9px 14px; border: 0; border-radius: 999px; background: rgba(13,16,34,.85); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: inset 0 0 0 1.5px rgba(233,185,73,.6); }
.pk-dives button:hover { background: var(--gold); color: var(--gold-ink); }
.pk-steps { display: flex; justify-content: center; align-items: center; gap: 4px; margin: 4px 0 10px; }
.pk-steps i { font-style: normal; font-size: 15px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--grass-2); opacity: .35; box-shadow: inset 0 0 0 1px var(--line); }
.pk-steps i.on { opacity: 1; background: rgba(95,211,154,.2); }
.pk-steps i.cur { opacity: 1; box-shadow: inset 0 0 0 2px var(--gold); }
.pk-steps-sep { width: 10px; }
.pk-instr { font-size: 14px; color: var(--chalk-dim); margin: 0 0 10px; text-align: center; }
.pk-instr b { color: var(--chalk); }
/* en móviles normales las explicaciones largas se esconden: la portería tiene que quedar a la vista */
@media (max-height: 760px) { .pk-tip { display: none; } .pk-instr { margin-bottom: 8px; } .pk-vs { margin: 2px 0 8px; } }
.icon-btn.pk-cancel { width: 40px; height: 40px; background: transparent; color: var(--chalk-dim); }
.app.in-game { padding-bottom: calc(16px + var(--safe-b)); }
.pk-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.pk-summary > div { padding: 12px; border-radius: 14px; background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); }
.pk-summary ol { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; line-height: 1.7; }
.pk-undo { margin-top: 8px; display: inline-flex; justify-content: center; gap: 6px; }
.pk-board { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin: 6px 0 12px; }
.pk-side { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 14px; min-width: 0; }
.pk-side b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pk-dots { display: flex; gap: 4px; }
.pk-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--grass-3); }
.pk-dots i.g { background: var(--ok); } .pk-dots i.f { background: var(--red); }
.pk-big { font-family: var(--display); font-size: 48px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.pk-big small { color: var(--chalk-dim); margin: 0 6px; font-size: 32px; }
.pk-now { text-align: center; margin: 0 0 8px; color: var(--chalk-dim); }
.pk-now b { color: var(--chalk); }
.pk-final { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px; border-radius: var(--radius-l); margin-bottom: 12px; background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); }
.pk-final b { font-family: var(--display); font-size: 34px; }
.pk-final span { font-size: 18px; font-weight: 700; color: var(--chalk-dim); }
.pk-final.win { box-shadow: inset 0 0 0 1.5px rgba(95,211,154,.5); } .pk-final.win b { color: var(--ok); }
.pk-final.loss { box-shadow: inset 0 0 0 1.5px rgba(255,107,107,.45); } .pk-final.loss b { color: var(--red); }
.pk-final.draw b { color: var(--gold); }
.pk-log { list-style: none; margin: 0 0 12px; padding: 0; border-radius: var(--radius-l); overflow: hidden; background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); }
.pk-log li { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 13.5px; }
.pk-log li:first-child { border-top: 0; }
.pk-log small { color: var(--chalk-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-log li.gol b { color: var(--ok); } .pk-log li.parada b { color: var(--gold); } .pk-log li.fuera b { color: var(--red); }
.pk .row-btns { display: flex; gap: 8px; }
.pk .row-btns .btn { flex: 1; display: inline-flex; justify-content: center; gap: 6px; }
:root[data-theme='light'] .pk-stage { background: linear-gradient(180deg, #2a3a72, #33478a 62%); }

/* ─── penaltis v2: escena realista ─── */
.pk-stage { aspect-ratio: 400 / 260; max-width: 560px; background: #070b1f; box-shadow: 0 18px 40px -18px rgba(0,0,0,.8), inset 0 0 0 1px var(--line); border-radius: 20px; }
.pk-stage.mini { max-width: 260px; }
.pk-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pk-goal { display: none; }
.pk-keeper { width: 19%; top: 40%; transform-origin: 50% 70%; transition: transform .5s cubic-bezier(.2,.85,.25,1.15); filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
.pk-keeper.d-c { transform: translate(-50%, -50%); }
.pk-keeper.d-l { transform: translate(-50%, -50%); }
.pk-keeper.d-r { transform: translate(-50%, -50%); }
.pk-keeper.diving.d-l { transform: translate(-142%, -46%) rotate(-74deg); }
.pk-keeper.diving.d-r { transform: translate(42%, -46%) rotate(74deg); }
.pk-keeper.diving.d-c { transform: translate(-50%, -62%) scale(1.04); }
.pk-keeper.saved { filter: drop-shadow(0 0 10px rgba(233,185,73,.85)); }
.pk-keeper-svg { width: 100%; display: block; }
.pk-kshadow { position: absolute; left: 50%; top: 57.6%; width: 15%; height: 3.2%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.45), transparent); transform: translate(-50%, -50%); transition: transform .5s; z-index: 1; }
.pk-stage:has(.pk-keeper.diving.d-l) .pk-kshadow { transform: translate(-115%, -50%) scaleX(1.4); }
.pk-stage:has(.pk-keeper.diving.d-r) .pk-kshadow { transform: translate(15%, -50%) scaleX(1.4); }
.pk-ball { width: 6.6%; transition: left .62s cubic-bezier(.25,.6,.35,1), top .62s cubic-bezier(.2,.4,.4,1), transform .62s cubic-bezier(.25,.6,.35,1), opacity .4s; z-index: 3; }
.pk-ball-svg { width: 100%; display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.45)); }
.pk-ball svg:not(.pk-ball-svg) { display: none; }
.pk-bshadow { position: absolute; width: 6%; height: 2.2%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.55), transparent); z-index: 2; transition: left .62s cubic-bezier(.25,.6,.35,1), top .62s, transform .62s, opacity .4s; pointer-events: none; }
.pk-ripple { position: absolute; width: 8%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 2px rgba(255,255,255,.55); animation: pkRipple .7s ease-out forwards; z-index: 1; pointer-events: none; }
@keyframes pkRipple { from { transform: translate(-50%, -50%) scale(.3); opacity: 1; } to { transform: translate(-50%, -50%) scale(3.2); opacity: 0; } }
.pk-stage.goal-hit .pk-scene { animation: pkShake .35s ease-out; }
@keyframes pkShake { 25% { transform: translate(1.5px, -1px); } 50% { transform: translate(-1.5px, 1px); } 75% { transform: translate(1px, 0); } }
.pk-flashbg { position: absolute; inset: 0; background: radial-gradient(circle at 50% 35%, rgba(95,211,154,.28), transparent 60%); animation: pkFade 1s ease-out forwards; pointer-events: none; z-index: 2; }
@keyframes pkFade { from { opacity: 1; } to { opacity: 0; } }
.pk-flash { top: 78%; padding: 4px 16px; border-radius: 12px; background: rgba(7,11,31,.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); letter-spacing: .04em; }
.pk-zones { left: 20%; right: 20%; top: 16.5%; height: 41%; gap: 4px; }
.pk-zones button i { width: 30%; border: 2px solid rgba(255,255,255,.45); background: rgba(255,255,255,.06); box-shadow: 0 0 0 4px rgba(255,255,255,.05); }
.pk-zones button:hover i, .pk-zones button:focus-visible i { background: rgba(233,185,73,.4); border-color: #ffd257; box-shadow: 0 0 14px rgba(233,185,73,.6); }
.pk-dives { bottom: 5%; }
.pk-dives button { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
@media (prefers-reduced-motion: reduce) { .pk-ripple, .pk-flashbg, .pk-stage.goal-hit .pk-scene { animation: none; } }
.pk-steps { flex-wrap: wrap; gap: 5px; }
.pk-steps i { font-size: 11px; font-weight: 800; color: var(--chalk-dim); }
.pk-steps i.on { color: var(--ok); }
.pk-steps i.k.on { color: var(--gold); background: rgba(233,185,73,.18); }
.pk-steps-l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--chalk-dim); margin-right: 2px; }
.pk-steps-sep { width: 14px; }

/* ─── juegos ─── */
.game-cards { display: flex; flex-direction: column; gap: 10px; }
.game-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px 16px; border-radius: var(--radius-l); color: var(--chalk); box-shadow: inset 0 0 0 1px var(--line), 0 14px 30px -18px rgba(0,0,0,.7); overflow: hidden; }
.game-card.pk-card { background: radial-gradient(120% 140% at 100% 0%, rgba(95,211,154,.22), transparent 55%), var(--grass-2); }
.game-card.rl-card { background: radial-gradient(120% 140% at 100% 0%, rgba(200,37,47,.25), transparent 55%), var(--grass-2); }
.game-ico { font-size: 34px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: rgba(255,255,255,.06); flex: none; }
.game-card .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.game-card b { font-family: var(--display); font-size: 24px; }
.game-card small { color: var(--chalk-dim); font-size: 13px; line-height: 1.4; }
.game-badge { position: absolute; top: 10px; right: 12px; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; background: var(--ok); color: #062a17; }
.game-coins { position: absolute; top: 10px; right: 12px; font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--gold); }

/* ─── marco común de los juegos (js/gameshell.js): el mismo diseño que la ruleta ─────────────
   Pantalla fija sin scroll: cabecera compacta, zona de juego que se ajusta al hueco y botones abajo. */
.route:has(> .gm-app) { animation: none; }
.gm-app { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; background: radial-gradient(130% 60% at 50% 0%, #15214a, var(--grass) 70%); overscroll-behavior: contain; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.gm-head { flex: none; display: flex; align-items: center; gap: 6px; padding: max(8px, env(safe-area-inset-top)) 12px 6px; }
.gm-head .icon-btn { width: 40px; height: 40px; }
.gm-title { flex: 1; min-width: 0; margin: 0; font-family: var(--display); font-size: 24px; font-weight: 800; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-score { flex: none; display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(233,185,73,.12); box-shadow: inset 0 0 0 1px rgba(233,185,73,.35); }
.gm-score small { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--chalk-dim); }
.gm-score b { font-family: var(--display); font-size: 21px; line-height: 1.1; color: var(--gold); font-variant-numeric: tabular-nums; }
.gm-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 2px 12px 8px; }
.gm-body > * { flex: none; margin-top: 0; margin-bottom: 0; }
.gm-dock { flex: none; padding: 8px 12px calc(10px + var(--safe-b)); background: linear-gradient(transparent, rgba(0,0,0,.35) 30%); }
.gm-row { display: flex; align-items: center; gap: 8px; }
.gm-row .grow { flex: 1; }
.gm-dock .btn { min-height: 48px; }
.gm-info { flex: 1; min-width: 0; font-size: 12.5px; color: var(--chalk-dim); }
.gm-info b { color: var(--chalk); }
.gm-body > .gm-fit { flex: 1; min-height: 0; container-type: size; display: grid; place-items: center; }
.gm-fit-in { width: min(100cqw, calc(100cqh * var(--r))); aspect-ratio: var(--r); }
.gm-fit-in > * { width: 100% !important; height: 100% !important; max-width: none !important; min-width: 0 !important; aspect-ratio: auto !important; margin: 0 !important; }
.gm-body > .gm-center { flex: 1; display: grid; place-items: center; }
.gm-note { font-size: 12.5px; color: var(--chalk-dim); text-align: center; }
.gm-help p { margin: 0 0 12px; line-height: 1.5; }
.gm-body > .gm-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.gm-body > .gk-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: none; }
.gk-wrap > .gm-fit { flex: 1; min-height: 0; container-type: size; display: grid; place-items: center; }
.gm-dock .sc-result { margin: 0; }
@media (max-width: 360px) { .gm-head { gap: 4px; padding-left: 8px; padding-right: 8px; } .gm-head .icon-btn { width: 36px; height: 36px; } .gm-title { font-size: 21px; } .gm-score { padding: 4px 9px; } .gm-score small, .gm-score > span { display: none; } }

/* ─── ruleta: pantalla de juego para móvil ─────────────────────────────
   Pantalla completa sin scroll: cabecera, barra de modo, mesa vertical que se estira al alto
   disponible y, abajo, fichas y Girar al alcance del pulgar. La rueda sale en grande al girar. */
.route:has(> .rl-app) { animation: none; }
.rl-app { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; background: radial-gradient(130% 60% at 50% 0%, #0f3324, var(--grass) 70%); overscroll-behavior: contain; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }

.rl-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px 8px; min-width: 0; }
.rl-mode { flex: none; display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1px var(--line); }
.rl-mode button { padding: 6px 11px; border: 0; border-radius: 999px; background: none; color: var(--chalk-dim); font-weight: 800; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.rl-mode button.on { background: var(--chalk); color: var(--grass); }
.rl-mode button.star.on { background: linear-gradient(90deg, #ffd257, #fff2b8); color: #1d1d1d; }
.rl-mode button:disabled { opacity: .6; }
.rl-help { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.3); box-shadow: inset 0 0 0 1px var(--line); color: var(--chalk); font-weight: 900; cursor: pointer; }
.rl-gift { margin-left: auto; flex: none; display: flex; align-items: center; gap: 4px; padding: 6px 12px; border: 0; border-radius: 999px; color: #1d1d1d; font-weight: 800; font-size: 13px; background: linear-gradient(90deg, #ffd257, #fff2b8); box-shadow: 0 4px 14px rgba(255,210,87,.45); cursor: pointer; animation: rlPulse 1.6s ease-in-out infinite; }
@keyframes rlPulse { 50% { transform: scale(1.06); } }
/* historial: fila propia a todo lo ancho; el más reciente a la izquierda, grande y con aro dorado */
.rl-strip { flex: none; display: flex; align-items: center; gap: 8px; margin: 0 12px 8px; padding: 4px 4px 4px 10px; border-radius: 999px; background: rgba(0,0,0,.28); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.rl-strip > small { flex: none; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--chalk-dim); }
.rl-hist { flex: 1; min-width: 0; display: flex; align-items: center; gap: 5px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.rl-hist::-webkit-scrollbar { display: none; }
.rl-hist i { flex: none; position: relative; font-style: normal; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; background: #2a2f4f; }
.rl-hist i.red { background: #c8252f; }
.rl-hist i.black { background: #0b0d18; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }
.rl-hist i.green { background: #1f9d5a; }
.rl-hist i.last { width: 34px; height: 34px; font-size: 15px; box-shadow: 0 0 0 2.5px var(--gold), 0 0 12px rgba(233,185,73,.45); }
.rl-hist i.black.last { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55), 0 0 0 2.5px var(--gold), 0 0 12px rgba(233,185,73,.45); }
.rl-hist i.st::after { content: '★'; position: absolute; top: -5px; right: -4px; font-size: 10px; color: #ffd257; text-shadow: 0 0 3px #000; }
.rl-hist i:nth-child(n+8) { opacity: .7; }
.rl-hist-empty { font-size: 12px; color: var(--chalk-dim); padding: 6px 0; }

/* mesa vertical: 2 franjas exteriores + 3 columnas de números; las filas se reparten el alto */
.rl-board-area { flex: 1; min-height: 0; padding: 0 12px; display: flex; overflow-y: auto; }
.rl-board { flex: 1; display: grid; grid-template-columns: 1fr 1fr 2fr 2fr 2fr; grid-template-rows: minmax(28px, 1.15fr) repeat(12, minmax(21px, 1fr)) minmax(24px, 1fr); gap: 3px; min-height: 0; padding: 6px; border-radius: 16px; background: radial-gradient(120% 100% at 50% 0%, #17573a, #0d3322); box-shadow: inset 0 0 0 2px rgba(233,185,73,.35), 0 10px 30px rgba(0,0,0,.35); }
.rl-cell { position: relative; min-width: 0; border: 0; border-radius: 6px; color: #fff; font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer; background: transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); display: grid; place-items: center; transition: transform .08s, filter .08s; }
.rl-cell:active { transform: scale(.94); filter: brightness(1.3); }
.rl-cell.red { background: #b81f2a; } .rl-cell.black { background: #15172a; } .rl-cell.green { background: #1f9d5a; font-size: 18px; }
.rl-cell.out { background: rgba(0,0,0,.2); font-size: 12px; letter-spacing: .04em; color: rgba(255,255,255,.92); }
.rl-cell.side span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.rl-cell.out.red span, .rl-cell.out.black span { writing-mode: horizontal-tb; transform: none; font-size: 22px; }
.rl-cell.out.red { color: #e43a46; } .rl-cell.out.black { color: #000; text-shadow: 0 0 1px #fff, 0 0 1px #fff; }
.rl-cell.hit { box-shadow: inset 0 0 0 2px #ffd257, 0 0 14px rgba(255,210,87,.85); z-index: 1; }
.rl-stack { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); min-width: 22px; height: 22px; padding: 0 4px; border-radius: 999px; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 900; color: #1d1d1d; background: #ffd257; box-shadow: inset 0 0 0 2px #fff, 0 2px 4px rgba(0,0,0,.5); z-index: 2; animation: pkPop .2s cubic-bezier(.2,.9,.3,1.4); }
.rl-cell.side .rl-stack { right: 50%; top: auto; bottom: 4px; transform: translateX(50%); }

/* abajo: fichas + acciones, siempre a mano */
.rl-dock { flex: none; padding: 8px 12px calc(10px + var(--safe-b)); background: linear-gradient(transparent, rgba(0,0,0,.35) 30%); }
.rl-chips { display: flex; justify-content: space-between; gap: 6px; margin: 0 4px 8px; }
.rl-chip { width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0; font-weight: 900; font-size: 13px; color: #fff; cursor: pointer; background: var(--chip, #2a2f4f); box-shadow: inset 0 0 0 4px rgba(255,255,255,.85), inset 0 0 0 7px var(--chip, #2a2f4f), inset 0 0 0 8px rgba(255,255,255,.5), 0 4px 8px rgba(0,0,0,.4); transition: transform .15s; }
.rl-chip.c5 { --chip: #6b7280; } .rl-chip.c10 { --chip: #2563eb; } .rl-chip.c25 { --chip: #16a34a; } .rl-chip.c50 { --chip: #c8252f; } .rl-chip.c100 { --chip: #111; }
.rl-chip.on { transform: translateY(-5px) scale(1.1); box-shadow: inset 0 0 0 4px #ffd257, inset 0 0 0 7px var(--chip), inset 0 0 0 8px rgba(255,255,255,.5), 0 8px 14px rgba(0,0,0,.5); }
.rl-chip:disabled { opacity: .3; }
.rl-actions { display: flex; align-items: center; gap: 6px; }
.rl-act { flex: none; width: 52px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; border: 0; border-radius: 14px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px var(--line); color: var(--chalk); cursor: pointer; }
.rl-act span { font-size: 18px; font-weight: 900; line-height: 1; }
.rl-act small { font-size: 9.5px; color: var(--chalk-dim); }
.rl-act:disabled { opacity: .35; }
.rl-staked { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.rl-staked small { font-size: 10.5px; color: var(--chalk-dim); }
.rl-staked b { font-family: var(--display); font-size: 24px; font-variant-numeric: tabular-nums; color: var(--gold); }
.rl-spin { flex: none; min-width: 96px; height: 52px; font-size: 17px; }

/* tirada: la rueda en grande por encima de la mesa */
.rl-overlay { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: max(16px, env(safe-area-inset-top)) 16px calc(16px + var(--safe-b)); background: radial-gradient(90% 60% at 50% 45%, rgba(18,61,42,.97), rgba(6,8,18,.97)); animation: fade .25s ease; }
.rl-overlay.stars { box-shadow: inset 0 0 0 3px #ffd257, inset 0 0 80px rgba(255,210,87,.25); }
.rl-overlay.jackpot { animation: rlJack 1.2s ease-out; }
.rl-ov-top { min-height: 34px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rl-overlay .rl-star-banner { position: static; transform: none; }
.rl-overlay .rl-wheel { width: min(82vw, 46dvh, 360px); max-width: none; }
.rl-starchip.hit { outline: 3px solid #fff; }
.rl-result { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 220px; padding: 12px 18px; border-radius: 18px; background: rgba(0,0,0,.4); text-align: center; animation: pkPop .35s cubic-bezier(.2,.9,.3,1.4); }
.rl-result.idle { animation: none; background: none; }
.rl-result.idle small { font-size: 13px; color: var(--chalk-dim); letter-spacing: .08em; text-transform: uppercase; }
.rl-result.idle b { font-family: var(--display); font-size: 24px; color: var(--gold); }
.rl-num { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; font-family: var(--display); font-size: 34px; font-weight: 900; color: #fff; background: #2a2f4f; box-shadow: inset 0 0 0 3px rgba(233,185,73,.6); }
.rl-result.red .rl-num { background: #c8252f; } .rl-result.black .rl-num { background: #15172a; } .rl-result.green .rl-num { background: #1f9d5a; }
.rl-result > b { font-family: var(--display); font-size: 30px; margin-top: 4px; }
.rl-result > b.up { color: #5ee08f; } .rl-result > b.down { color: var(--chalk-dim); }
.rl-result small { font-size: 12.5px; color: rgba(255,255,255,.75); }
.rl-ov-actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; width: 100%; max-width: 380px; }
.rl-ov-actions .btn { min-height: 52px; padding: 0 10px; font-size: 15px; }
.rl-ov-actions .btn small { display: block; font-size: 11px; opacity: .75; }

/* ─── contrarreloj ─── */
.game-card.cr-card { background: radial-gradient(120% 140% at 100% 0%, rgba(233,185,73,.22), transparent 55%), var(--grass-2); }
.cr-stage { background: #2f7a46; }
.cr-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.cr-hud { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 10px; pointer-events: none; }
.cr-lap, .cr-time { padding: 6px 10px; border-radius: 12px; background: rgba(8,10,24,.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.cr-lap { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.cr-lap small { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--chalk-dim); }
.cr-lap b { font-family: var(--display); font-size: 24px; }
.cr-time { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05; }
.cr-time b { font-family: var(--display); font-size: 30px; font-variant-numeric: tabular-nums; color: var(--gold); }
.cr-time small { font-size: 11px; color: var(--chalk-dim); }
.cr-speed { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: baseline; gap: 3px; padding: 4px 10px; border-radius: 10px; background: rgba(8,10,24,.55); pointer-events: none; }
.cr-speed b { font-family: var(--display); font-size: 22px; font-variant-numeric: tabular-nums; }
.cr-speed small { font-size: 10px; color: var(--chalk-dim); }
.cr-warn { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 5px 12px; border-radius: 999px; background: rgba(214,58,58,.88); color: #fff; font-weight: 800; font-size: 12.5px; pointer-events: none; animation: pkPop .25s ease-out; }
.cr-count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 120px; font-weight: 900; color: #fff; text-shadow: 0 6px 30px rgba(0,0,0,.6); pointer-events: none; animation: pkPop .45s cubic-bezier(.2,.9,.3,1.4); }
.cr-done > b { font-size: 46px; color: var(--gold); font-variant-numeric: tabular-nums; }
.cr-badge { padding: 4px 12px; border-radius: 999px; background: linear-gradient(90deg, #ffd257, #fff2b8); color: #1d1d1d; font-weight: 900; font-size: 12.5px; }
.cr-laps { list-style: none; margin: 2px 0 4px; padding: 0; width: min(240px, 90%); }
.cr-laps li { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13.5px; color: var(--chalk-dim); border-bottom: 1px solid var(--line); }
.cr-laps li b { color: var(--chalk); font-variant-numeric: tabular-nums; }
.cr-laps li.best b { color: #5ee08f; }
.cr-pad { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 10px; }
.cr-btn { height: 72px; border: 0; border-radius: 20px; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1.5px var(--line), 0 6px 14px rgba(0,0,0,.35); color: var(--chalk); font-size: 28px; font-weight: 900; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.cr-btn:active { background: rgba(233,185,73,.3); transform: scale(.97); }
.cr-btn.brake { font-size: 15px; letter-spacing: .08em; background: rgba(214,58,58,.25); }
.cr-btn.brake:active { background: rgba(214,58,58,.55); }
@media (max-height: 620px) { .cr-btn { height: 60px; } }

.rl-wheel { position: relative; width: 100%; aspect-ratio: 1; margin: 0 auto; filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)); }
.rl-wheel-svg { width: 100%; height: 100%; display: block; }
.rl-rotor { transform-origin: 110px 110px; transform-box: view-box; transition: transform 4.5s cubic-bezier(.12,.62,.12,1); }
.rl-ballring { position: absolute; inset: 7%; transition: transform 4.5s cubic-bezier(.2,.55,.15,1); pointer-events: none; }
.rl-ball { position: absolute; left: 50%; top: 3.5%; width: 6.5%; aspect-ratio: 1; border-radius: 50%; transform: translateX(-50%); background: radial-gradient(circle at 35% 30%, #fff, #d9dce6 60%, #8e93a6); box-shadow: 0 1px 3px rgba(0,0,0,.6); }
.rl-pointer { position: absolute; left: 50%; top: -2px; width: 0; height: 0; transform: translateX(-50%); border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 16px solid var(--gold); filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }

.rl-rules p { margin: 0 0 12px; line-height: 1.5; }
.rl-table .t-head, .rl-table .t-row { grid-template-columns: 24px minmax(0, 1fr) 60px 70px; }
@media (max-width: 360px) { .rl-chip { width: 42px; height: 42px; } .rl-act { width: 46px; } .rl-spin { min-width: 84px; } }
@media (min-height: 760px) { .rl-cell { font-size: 17px; } }
/* móviles bajos (iPhone SE y similares): filas y botones más compactos para que quepa todo sin scroll */
@media (max-height: 620px) {
  .gm-head { padding-bottom: 4px; } .rl-bar { padding-bottom: 6px; }
  .rl-strip { margin-bottom: 6px; padding: 2px 3px 2px 8px; } .rl-hist i { width: 24px; height: 24px; font-size: 11px; } .rl-hist i.last { width: 28px; height: 28px; font-size: 13px; }
  .rl-board { min-height: 0; gap: 2px; padding: 5px; grid-template-rows: minmax(24px, 1.1fr) repeat(12, minmax(18px, 1fr)) minmax(22px, 1fr); }
  .rl-cell { font-size: 13px; } .rl-cell.out { font-size: 11px; }
  .rl-stack { min-width: 18px; height: 18px; font-size: 9px; }
  .rl-dock { padding-top: 6px; } .rl-chips { margin-bottom: 6px; }
  .rl-chip { width: 40px; height: 40px; font-size: 12px; } .rl-act { height: 46px; } .rl-spin { height: 46px; }
}
@media (prefers-reduced-motion: reduce) { .rl-rotor, .rl-ballring { transition-duration: .01s; } .rl-gift { animation: none; } }

/* ─── ruleta: Modo Estrella ─── */
@keyframes rlJack { 0% { box-shadow: inset 0 0 0 2px #ffd257, 0 0 0 rgba(255,210,87,0); } 30% { box-shadow: inset 0 0 0 3px #fff2b8, 0 0 40px rgba(255,210,87,.8); } 100% { box-shadow: inset 0 0 0 1px rgba(233,185,73,.25); } }
.rl-star-banner { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 3; padding: 4px 14px; border-radius: 999px; font-family: var(--display); font-size: 18px; letter-spacing: .06em; color: #1d1d1d; background: linear-gradient(90deg, #ffd257, #fff2b8, #ffd257); box-shadow: 0 4px 16px rgba(255,210,87,.6); animation: pkPop .35s cubic-bezier(.2,.9,.3,1.4); white-space: nowrap; }
.rl-slice-star { fill: rgba(255,210,87,.55); stroke: #fff2b8; stroke-width: 1.4; animation: rlGlow .9s ease-in-out infinite alternate; }
@keyframes rlGlow { from { fill-opacity: .35; } to { fill-opacity: .9; } }
.rl-starlist { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.rl-starchip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 3px; border-radius: 999px; font-size: 12.5px; font-weight: 900; color: #1d1d1d; background: linear-gradient(90deg, #ffd257, #fff2b8); box-shadow: 0 2px 10px rgba(255,210,87,.45); animation: pkPop .4s cubic-bezier(.2,.9,.3,1.4) both; }
.rl-starchip i { font-style: normal; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 11px; background: #2a2f4f; }
.rl-starchip.red i { background: #c8252f; } .rl-starchip.black i { background: #15172a; } .rl-starchip.green i { background: #1f9d5a; }
.rl-cell.starred { box-shadow: inset 0 0 0 2px #ffd257, 0 0 10px rgba(255,210,87,.7); animation: rlCell .9s ease-in-out infinite alternate; }
@keyframes rlCell { to { box-shadow: inset 0 0 0 2px #fff2b8, 0 0 16px rgba(255,210,87,.95); } }
.rl-mult { position: absolute; top: -7px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 9.5px; font-weight: 900; padding: 1px 4px; border-radius: 6px; color: #1d1d1d; background: #ffd257; white-space: nowrap; z-index: 2; }
.rl-jack { font-family: var(--display); font-size: 17px; letter-spacing: .04em; color: #ffd257; text-shadow: 0 0 12px rgba(255,210,87,.8); }
.rl-jack.soft { font-family: var(--body); font-size: 11.5px; text-shadow: none; opacity: .85; }
.rl-result.big { box-shadow: 0 0 0 2px #ffd257, 0 0 30px rgba(255,210,87,.6); }
.rl-result.big b { color: #ffd257; font-size: 32px; }
@media (prefers-reduced-motion: reduce) { .rl-slice-star, .rl-cell.starred, .rl-overlay.jackpot { animation: none; } }
.sfx-btn[aria-pressed='false'] { opacity: .55; }

/* ─── penaltis: vista del portero ─── */
.pk-gk { background: #070b1f; }
.gk-gloves { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.gk-glove { position: absolute; bottom: -4%; width: 19%; filter: drop-shadow(0 6px 10px rgba(0,0,0,.55)); transition: transform .45s cubic-bezier(.2,.85,.25,1.1); }
.gk-glove.l { left: 22%; transform: rotate(-8deg); }
.gk-glove.r { right: 22%; transform: rotate(8deg); }
.pk-gk.go-r .gk-glove { transform: translate(-95%, -55%) rotate(-38deg); }
.pk-gk.go-l .gk-glove { transform: translate(95%, -55%) rotate(38deg); }
.pk-gk.go-c .gk-glove.l { transform: translate(40%, -70%) rotate(10deg); }
.pk-gk.go-c .gk-glove.r { transform: translate(-40%, -70%) rotate(-10deg); }
.pk-gk .pk-scene { transition: transform .45s cubic-bezier(.2,.85,.25,1.1); transform-origin: 50% 70%; }
.pk-gk.go-r .pk-scene { transform: rotate(-9deg) translateX(4%); }
.pk-gk.go-l .pk-scene { transform: rotate(9deg) translateX(-4%); }
.pk-gk.go-c .pk-scene { transform: scale(1.06) translateY(-2%); }
.gk-shooter { animation: gkIdle 1.6s ease-in-out infinite; transform-origin: 200px 168px; }
@keyframes gkIdle { 50% { transform: translateY(-1px) scaleY(1.01); } }
.gk-dives { bottom: 34%; }
.gk-dives button.on { background: var(--gold); color: var(--gold-ink); }
@media (prefers-reduced-motion: reduce) { .gk-shooter { animation: none; } .gk-glove, .pk-gk .pk-scene { transition: none; } }

/* ─── vista del portero v2 ─── */
.gk-wrap { max-width: 560px; margin: 0 auto 12px; }
.gk-wrap .pk-stage { margin-bottom: 10px; }
.gk-gloves { position: absolute; inset: 0; pointer-events: none; z-index: 3; animation: gkReady 1.8s ease-in-out infinite; }
@keyframes gkReady { 50% { transform: translateY(1.5%); } }
.gk-glove { position: absolute; bottom: -9%; width: 15%; filter: drop-shadow(0 8px 12px rgba(0,0,0,.55)); transition: transform .5s cubic-bezier(.2,.85,.25,1.1); }
.gk-glove.l { left: 25%; transform: rotate(-14deg); }
.gk-glove.r { right: 25%; transform: rotate(14deg); }
.pk-gk.go-r .gk-gloves, .pk-gk.go-l .gk-gloves, .pk-gk.go-c .gk-gloves { animation: none; }
.pk-gk.go-r .gk-glove.l { transform: translate(-150%, -95%) rotate(-58deg); }
.pk-gk.go-r .gk-glove.r { transform: translate(-200%, -80%) rotate(-30deg); }
.pk-gk.go-l .gk-glove.r { transform: translate(150%, -95%) rotate(58deg); }
.pk-gk.go-l .gk-glove.l { transform: translate(200%, -80%) rotate(30deg); }
.pk-gk.go-c .gk-glove.l { transform: translate(55%, -95%) rotate(4deg); }
.pk-gk.go-c .gk-glove.r { transform: translate(-55%, -95%) rotate(-4deg); }
.pk-gk .pk-scene { transition: transform .5s cubic-bezier(.2,.85,.25,1.1); transform-origin: 50% 85%; }
.pk-gk.go-r .pk-scene { transform: rotate(-11deg) translateX(5%) scale(1.04); }
.pk-gk.go-l .pk-scene { transform: rotate(11deg) translateX(-5%) scale(1.04); }
.pk-gk.go-c .pk-scene { transform: scale(1.08) translateY(-3%); }
.gk-shooter { animation: gkIdle 1.6s ease-in-out infinite; transform-origin: 190px 186px; transform-box: view-box; }
@keyframes gkIdle { 50% { transform: translateY(-1.2px) scaleY(1.012); } }
.gk-zones { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); z-index: 4; }
.gk-z { border: 0; background: transparent; cursor: pointer; transition: background .2s; }
.gk-z:hover:not(:disabled), .gk-z:focus-visible { background: linear-gradient(180deg, transparent, rgba(233,185,73,.16) 50%, transparent); }
.gk-dives { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; position: static; padding: 0; }
.gk-dives button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 8px; border: 0; border-radius: 14px; font-weight: 700; font-size: 15px; cursor: pointer; color: var(--chalk); background: var(--grass-2); box-shadow: inset 0 0 0 1.5px rgba(233,185,73,.45); }
.gk-dives button:hover:not(:disabled) { background: rgba(233,185,73,.16); }
.gk-dives button.on { background: var(--gold); color: var(--gold-ink); }
.gk-dives button:disabled:not(.on) { opacity: .5; }
@media (prefers-reduced-motion: reduce) { .gk-gloves, .gk-shooter { animation: none; } }

/* vista del portero: estirada sin girar la escena (sin huecos) y guantes juntos */
.pk-gk .pk-scene { transform: scale(1.12); transform-origin: 50% 60%; transition: transform .5s cubic-bezier(.2,.85,.25,1); }
.pk-gk.go-r .pk-scene { transform: scale(1.18) translateX(4%); }
.pk-gk.go-l .pk-scene { transform: scale(1.18) translateX(-4%); }
.pk-gk.go-c .pk-scene { transform: scale(1.2) translateY(2%); }
.pk-gk.go-r .gk-glove.l { transform: translate(-115%, -70%) rotate(-28deg); }
.pk-gk.go-r .gk-glove.r { transform: translate(-150%, -45%) rotate(-18deg); }
.pk-gk.go-l .gk-glove.r { transform: translate(115%, -70%) rotate(28deg); }
.pk-gk.go-l .gk-glove.l { transform: translate(150%, -45%) rotate(18deg); }
.pk-gk.go-c .gk-glove.l { transform: translate(40%, -80%) rotate(2deg); }
.pk-gk.go-c .gk-glove.r { transform: translate(-40%, -80%) rotate(-2deg); }
.pk-gk { overflow: hidden; }

/* penaltis: el portero elige entre 6 zonas */
.pk-keeper.diving.high.d-l { transform: translate(-138%, -78%) rotate(-62deg); }
.pk-keeper.diving.high.d-r { transform: translate(38%, -78%) rotate(62deg); }
.pk-keeper.diving.high.d-c { transform: translate(-50%, -82%) scale(1.04); }
.gk-zones { position: absolute; inset: 9% 13% 22% 13%; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 4px; }
.gk-z { display: grid; place-items: center; border-radius: 12px; }
.gk-z i { width: 28%; aspect-ratio: 1; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); background: rgba(255,255,255,.08); box-shadow: 0 0 0 4px rgba(255,255,255,.05); transition: transform .15s, background .15s; }
.gk-z:hover:not(:disabled) i, .gk-z:focus-visible i { background: rgba(233,185,73,.4); border-color: #ffd257; transform: scale(1.12); box-shadow: 0 0 14px rgba(233,185,73,.6); }
.gk-z.on i { background: #ffd257; border-color: #fff; }
.gk-z:disabled:not(.on) i { opacity: .25; }
.gk-hint { text-align: center; margin: 0; min-height: 1.4em; }
/* guantes según la zona: lado y altura */
.pk-gk.go .gk-gloves { animation: none; }
.pk-gk.go-left.go-b .gk-glove.l { transform: translate(-115%, -45%) rotate(-48deg); }
.pk-gk.go-left.go-b .gk-glove.r { transform: translate(-150%, -25%) rotate(-30deg); }
.pk-gk.go-left.go-t .gk-glove.l { transform: translate(-105%, -150%) rotate(-22deg); }
.pk-gk.go-left.go-t .gk-glove.r { transform: translate(-140%, -125%) rotate(-12deg); }
.pk-gk.go-right.go-b .gk-glove.r { transform: translate(115%, -45%) rotate(48deg); }
.pk-gk.go-right.go-b .gk-glove.l { transform: translate(150%, -25%) rotate(30deg); }
.pk-gk.go-right.go-t .gk-glove.r { transform: translate(105%, -150%) rotate(22deg); }
.pk-gk.go-right.go-t .gk-glove.l { transform: translate(140%, -125%) rotate(12deg); }
.pk-gk.go-c.go-b .gk-glove.l { transform: translate(45%, -40%) rotate(6deg); }
.pk-gk.go-c.go-b .gk-glove.r { transform: translate(-45%, -40%) rotate(-6deg); }
.pk-gk.go-c.go-t .gk-glove.l { transform: translate(40%, -150%) rotate(2deg); }
.pk-gk.go-c.go-t .gk-glove.r { transform: translate(-40%, -150%) rotate(-2deg); }
.pk-gk.go-left .pk-scene { transform: scale(1.18) translateX(4%); }
.pk-gk.go-right .pk-scene { transform: scale(1.18) translateX(-4%); }
.pk-gk.go-c.go-t .pk-scene { transform: scale(1.18) translateY(3%); }
.pk-gk.go-c.go-b .pk-scene { transform: scale(1.18) translateY(-2%); }

/* ─── juegos: ajustes para móvil ─── */
.pk-zones button i { width: 38%; border-width: 2.5px; border-color: rgba(255,255,255,.75); background: rgba(255,255,255,.14); box-shadow: 0 0 0 5px rgba(255,255,255,.08), 0 0 12px rgba(0,0,0,.35); animation: pkPulse 1.8s ease-in-out infinite; }
.gk-z i { width: 36%; border-width: 2.5px; border-color: rgba(255,255,255,.8); background: rgba(255,255,255,.16); box-shadow: 0 0 0 5px rgba(255,255,255,.08), 0 0 12px rgba(0,0,0,.4); animation: pkPulse 1.8s ease-in-out infinite; }
@keyframes pkPulse { 50% { transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .pk-zones button i, .gk-z i { animation: none; } }
.pk-steps { display: grid; grid-template-columns: auto repeat(5, 26px); gap: 6px 6px; justify-content: center; align-items: center; }
.pk-steps-sep { display: none; }
.pk-steps-l { text-align: right; min-width: 64px; }
/* pantalla completa */
.fs-btn svg { display: block; }
body.game-fs .tabbar { display: none; }
body.game-fs .screen { padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
.pk .back-bar, .pk .backbar { gap: 8px; }
.lg-pending { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 12px 14px; border-radius: var(--radius-m); background: rgba(245,168,75,.1); box-shadow: inset 0 0 0 1px rgba(245,168,75,.4); color: var(--chalk); }
.lg-pending > svg:first-child { color: var(--amber); flex: none; }
.lg-pending .grow { display: flex; flex-direction: column; min-width: 0; }
.lg-pending small { font-size: 12px; color: var(--chalk-dim); }
.lg-court.pending { box-shadow: inset 0 0 0 1.5px rgba(245,168,75,.5); }

/* ─── minijuegos de habilidad y rasca ─── */
.game-card.lg-card { background: radial-gradient(120% 140% at 100% 0%, rgba(233,185,73,.24), transparent 55%), var(--grass-2); }
.game-card.rf-card { background: radial-gradient(120% 140% at 100% 0%, rgba(122,162,255,.24), transparent 55%), var(--grass-2); }
.game-card.sc-cardlink { background: radial-gradient(120% 140% at 100% 0%, rgba(255,210,87,.3), transparent 55%), var(--grass-2); }
.ar-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 2px 0 8px; }
.ar-head h1 { font-family: var(--display); font-size: 38px; line-height: 1; }
.ar-score { display: flex; flex-direction: column; align-items: flex-end; }
.ar-score span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--chalk-dim); }
.ar-score b { font-family: var(--display); font-size: 32px; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.ar-shots { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
.ar-shots i { width: 42px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-style: normal; font-size: 12px; font-weight: 800; background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); }
.ar-shots i.cur { box-shadow: inset 0 0 0 2px var(--gold); }
.ar-shots i.hit { background: #ffd257; color: #1d1d1d; } .ar-shots i.ok { background: rgba(95,211,154,.25); color: var(--ok); } .ar-shots i.ko { background: rgba(255,107,107,.18); color: var(--red); }
.ar-stage { position: relative; width: 100%; max-width: 560px; margin: 0 auto 10px; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: #070b1f; box-shadow: 0 18px 40px -18px rgba(0,0,0,.8), inset 0 0 0 1px var(--line); user-select: none; -webkit-user-select: none; touch-action: none; cursor: pointer; }
.ar-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.lg-crossbar.ring { animation: lgRing .5s ease-out; transform-origin: center; transform-box: fill-box; }
@keyframes lgRing { 20% { transform: translateY(-2px); } 40% { transform: translateY(2px); } 60% { transform: translateY(-1px); } }
.ar-dir { position: absolute; left: 6%; right: 6%; top: 6%; height: 14px; border-radius: 7px; background: rgba(0,0,0,.4); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); opacity: .45; }
.ar-dir.live, .ar-pow.live { opacity: 1; box-shadow: inset 0 0 0 1.5px #ffd257, 0 0 12px rgba(233,185,73,.4); }
.ar-dir i { position: absolute; top: -6px; width: 0; height: 0; transform: translateX(-50%); border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 14px solid #ffd257; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
.ar-post { position: absolute; top: 0; bottom: 0; width: 3px; background: rgba(255,255,255,.6); }
.ar-post.l { left: 9%; } .ar-post.r { right: 9%; }
.ar-pow { position: absolute; right: 3%; top: 10%; bottom: 10%; width: 16px; border-radius: 8px; background: linear-gradient(180deg, #ff6b6b, #ffd257 30%, #5fd39a 60%, #2a2f4f); opacity: .45; }
.ar-pow i { position: absolute; left: -6px; right: -6px; height: 4px; border-radius: 2px; background: #fff; box-shadow: 0 0 6px #fff; transform: translateY(-50%); }
.ar-target { position: absolute; left: -4px; right: -4px; height: 3px; background: #ffd257; box-shadow: 0 0 8px #ffd257; transform: translateY(-50%); }
.ar-aim { position: absolute; top: 62%; bottom: 8%; width: 2px; transform: translateX(-50%); background: linear-gradient(transparent, rgba(255,210,87,.55)); opacity: 0; }
.ar-aim.on { opacity: 1; }
.ar-ball { position: absolute; left: 50%; top: 88%; width: 9%; transform: translate(-50%, -50%); transition: left .5s cubic-bezier(.25,.6,.35,1), top .5s cubic-bezier(.2,.4,.4,1), transform .5s; z-index: 3; }
.ar-ball svg { width: 100%; display: block; filter: drop-shadow(0 3px 3px rgba(0,0,0,.5)); }
.ar-flash { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 4; padding: 6px 16px; border-radius: 12px; background: rgba(7,11,31,.75); font-family: var(--display); font-size: clamp(22px, 6vw, 36px); white-space: nowrap; animation: pkPop .35s cubic-bezier(.2,.9,.3,1.4); }
.ar-flash.larguero { color: #ffd257; text-shadow: 0 0 14px rgba(255,210,87,.8); } .ar-flash.gol, .ar-flash.casi, .ar-flash.rozando { color: var(--ok); } .ar-flash.fuera { color: var(--red); }
.ar-hint { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); padding: 5px 12px; border-radius: 999px; background: rgba(7,11,31,.7); font-size: 12.5px; font-weight: 700; white-space: nowrap; z-index: 4; }
.ar-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; text-align: center; background: rgba(7,11,31,.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 5; }
.ar-overlay b { font-family: var(--display); font-size: 34px; color: var(--gold); }
.ar-overlay span { font-size: 14px; color: var(--chalk-dim); max-width: 34ch; line-height: 1.45; }
.ar-overlay .btn { margin-top: 6px; min-width: 160px; }
.ar-lives { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 10px; }
.ar-lives i { font-style: normal; font-size: 20px; filter: grayscale(1); opacity: .3; }
.ar-lives i.on { filter: none; opacity: 1; }
.ar-lives span { font-size: 12px; color: var(--chalk-dim); margin-left: 4px; }
.rf-stage { aspect-ratio: 4 / 3.4; cursor: none; }
.rf-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.ar-rank { margin-top: 14px; }
.ar-rank .seg { margin-bottom: 8px; }
.ar-list { list-style: none; margin: 0; padding: 4px 12px; border-radius: var(--radius-l); background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); }
.ar-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ar-list li:last-child { border: 0; }
.ar-list li.me .grow { color: var(--gold); font-weight: 800; }
.ar-list .pos { width: 24px; text-align: center; font-weight: 800; color: var(--chalk-dim); }
.ar-list b { font-variant-numeric: tabular-nums; }
.ar-list small { color: var(--chalk-dim); font-weight: 500; font-size: 11px; }
.ar-empty { padding: 14px; text-align: center; }
/* rasca */
.sc-prizes { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0 14px; }
.sc-prizes span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; font-weight: 800; color: var(--gold); }
.sc-prizes i { font-style: normal; letter-spacing: -2px; }
.sc-buy { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; max-width: 420px; margin: 0 auto; padding: 26px 16px; border: 0; border-radius: 22px; color: var(--chalk); cursor: pointer; background: radial-gradient(120% 120% at 50% 0%, rgba(255,210,87,.3), transparent 60%), var(--grass-2); box-shadow: inset 0 0 0 2px rgba(255,210,87,.5), 0 18px 40px -20px rgba(0,0,0,.8); }
.sc-buy-card { font-size: 56px; animation: pkBounce 1.6s ease-in-out infinite; }
.sc-buy b { font-family: var(--display); font-size: 26px; }
.sc-buy small { color: var(--chalk-dim); }
.sc-card { position: relative; max-width: 420px; margin: 0 auto 12px; aspect-ratio: 1; border-radius: 22px; padding: 14px; background: linear-gradient(145deg, #ffd257, #e29a1c); box-shadow: 0 18px 40px -18px rgba(0,0,0,.8), inset 0 0 0 3px rgba(255,255,255,.4); }
.sc-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 8px; height: 100%; }
.sc-grid span { display: grid; place-items: center; border-radius: 14px; background: #fff8e6; font-size: clamp(30px, 11vw, 54px); box-shadow: inset 0 0 0 2px rgba(0,0,0,.06); }
/* la tarjeta nunca más alta que el hueco que deja la pantalla: así 'Destapar todo' queda a la vista */
.sc-card { width: min(100%, calc(100dvh - 340px)); min-width: 240px; }
.sc-card.open .sc-grid span.win { background: #fff; box-shadow: 0 0 0 3px #1f9d5a, 0 0 18px rgba(31,157,90,.6); animation: pkPop .4s cubic-bezier(.2,.9,.3,1.4); }
.sc-cover { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); border-radius: 14px; touch-action: none; cursor: grab; }
.sc-result { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px; border-radius: var(--radius-l); text-align: center; background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); }
.sc-result.win { box-shadow: inset 0 0 0 2px rgba(95,211,154,.5); }
.sc-result b { font-family: var(--display); font-size: 30px; }
.sc-result.win b { color: var(--ok); }
.sc-result span { color: var(--chalk-dim); font-size: 14px; }
.sc-done { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 30px 16px; border-radius: var(--radius-l); background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.sc-done b { font-family: var(--display); font-size: 26px; }
.sc-done span { color: var(--chalk-dim); }

/* juegos: nombre arriba, en la barra del botón de volver */
.backbar.with-title { display: flex; align-items: center; gap: 8px; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; margin: 0 -4px 10px; padding: 6px 4px; background: linear-gradient(var(--grass) 75%, transparent); }
.bb-title { margin: 0; font-family: var(--display); font-size: 26px; line-height: 1.05; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ar-head { justify-content: flex-end; margin-top: -4px; }
.ar-head:empty { display: none; }
.ar-sub { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 13px; }
.game-card.lar-card { background: radial-gradient(120% 140% at 100% 0%, rgba(233,185,73,.24), transparent 55%), var(--grass-2); }

/* pagos: arreglo de la lista "Para quién / Recibe" (la foto se estiraba) */
.lg-split li > span { flex: 1; }
.lg-split li > .avatar { flex: none !important; }
.lg-split li span.avatar { flex: 0 0 auto; }
/* pagos por confirmar */
.lg-pend { margin-bottom: 12px; }
.lg-pend .sec { margin-top: 4px; }
.lg-pend-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 6px; border-radius: var(--radius-m); background: var(--grass-2); box-shadow: inset 0 0 0 1px var(--line); }
.lg-pend-row.to-me { box-shadow: inset 0 0 0 1.5px rgba(95,211,154,.5); background: rgba(95,211,154,.06); }
.lg-pend-btns { display: flex; gap: 6px; margin-left: auto; }
@media (max-width: 420px) { .lg-pend-btns { width: 100%; justify-content: flex-end; } }
.lg-declare-btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; margin-bottom: 12px; }
.lg-to { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: 40vh; overflow: auto; }
.lg-to button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 0; border-radius: 14px; background: var(--grass-deep); color: var(--chalk); font-weight: 600; font-size: 13px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.lg-to button.on { box-shadow: inset 0 0 0 2px var(--gold); background: rgba(233,185,73,.1); }
.lg-to small { font-size: 10.5px; color: var(--red); font-weight: 700; }

/* pagos por confirmar: texto completo arriba y botones a lo ancho debajo */
.lg-pend-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'pair main amt' 'btns btns btns'; align-items: center; gap: 10px 12px; }
.lg-pend-row > .lg-pair { grid-area: pair; }
.lg-pend-row > .lg-main { grid-area: main; }
.lg-pend-row > .lg-main b { white-space: normal; overflow: visible; line-height: 1.25; }
.lg-pend-row > .lg-main small { white-space: normal; }
.lg-pend-row > .lg-settle-amt { grid-area: amt; align-self: start; }
.lg-pend-row > .lg-pend-btns { grid-area: btns; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; width: 100%; margin: 0; }
.lg-pend-row > .lg-pend-btns .btn { width: 100%; justify-content: center; }
.lg-pend-row .lg-pair .avatar { width: 30px !important; height: 30px !important; }

/* saldar: mismas filas que "por confirmar"; el botón va debajo a lo ancho */
.lg-settle { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'pair main amt' 'btn btn btn'; align-items: center; gap: 0 12px; }
.lg-settle > .lg-pair { grid-area: pair; }
.lg-settle > .lg-main { grid-area: main; }
.lg-settle > .lg-main small { white-space: normal; }
.lg-settle > .lg-settle-amt { grid-area: amt; }
.lg-settle > .btn, .lg-settle > .pk-tag { grid-area: btn; margin-top: 10px; }
.lg-settle > .btn { width: 100%; justify-content: center; }
.lg-settle > .pk-tag { justify-self: end; }
.lg-settle .lg-pair .avatar { width: 30px !important; height: 30px !important; }
