/* Apuestas · Revelación — estilos compartidos (participante y administrador) */
:root {
  color-scheme: light;
  --bg: #f5f4f8;
  --surface: #ffffff;
  --surface-2: #f0eff5;
  --surface-3: #e6e4ee;
  --ink: #17161d;
  --ink-2: #4f4d5a;
  --muted: #6f6d7a;
  --line: #e3e1ea;
  --line-2: #cfcdd8;
  --nino: #2a78d6;
  --nina: #d4407a;
  --nino-text: #1b5fb3;
  --nina-text: #b02d62;
  --nino-wash: #ebf3fc;
  --nina-wash: #fcedf3;
  --nino-solid: #1b5fb3;
  --nina-solid: #b02d62;
  --on-solid: #ffffff;
  --ok: #0ca30c;
  --ok-text: #16733a;
  --ok-wash: #e5f4e8;
  --bad: #d03b3b;
  --bad-text: #b3261e;
  --bad-wash: #fbe9e9;
  --warn-text: #845500;
  --warn-wash: #fcf1d6;
  --btn: #17161d;
  --btn-text: #ffffff;
  --shadow: 0 1px 2px rgba(23, 22, 29, .06), 0 8px 24px rgba(23, 22, 29, .1);
  --r: 16px;
  --r-sm: 10px;
  --f-display: "Fredoka", "Nunito Sans", ui-rounded, system-ui, sans-serif;
  --f-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f0e13; --surface: #1b1a21; --surface-2: #24232b; --surface-3: #2e2d37;
    --ink: #f3f2f7; --ink-2: #bdbac8; --muted: #9a98a6; --line: #2d2c35; --line-2: #3f3d4a;
    --nino: #4a90e8; --nina: #e0609a; --nino-text: #8ab8f2; --nina-text: #f191bb;
    --nino-wash: #16233a; --nina-wash: #311827; --nino-solid: #8ab8f2; --nina-solid: #f191bb; --on-solid: #121118;
    --ok-text: #4bd46b; --ok-wash: #11261a; --bad: #e5534b; --bad-text: #ff8a80; --bad-wash: #331717;
    --warn-text: #f2c14e; --warn-wash: #2d2511; --btn: #f3f2f7; --btn-text: #121118;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0e13; --surface: #1b1a21; --surface-2: #24232b; --surface-3: #2e2d37;
  --ink: #f3f2f7; --ink-2: #bdbac8; --muted: #9a98a6; --line: #2d2c35; --line-2: #3f3d4a;
  --nino: #4a90e8; --nina: #e0609a; --nino-text: #8ab8f2; --nina-text: #f191bb;
  --nino-wash: #16233a; --nina-wash: #311827; --nino-solid: #8ab8f2; --nina-solid: #f191bb; --on-solid: #121118;
  --ok-text: #4bd46b; --ok-wash: #11261a; --bad: #e5534b; --bad-text: #ff8a80; --bad-wash: #331717;
  --warn-text: #f2c14e; --warn-wash: #2d2511; --btn: #f3f2f7; --btn-text: #121118;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .4);
}


/* ===== Paleta del participante: pasteles de fiesta. El panel del administrador no la usa. =====
   Día: lila pálido. Noche: ciruela. Azul y rosa son los dos lados; el menta es el dinero,
   para que una cifra nunca parezca estar tomando partido. */
body.p {
  --bg: #f4f1f7; --surface: #ffffff; --surface-2: #efebf4; --surface-3: #e4dfec;
  --ink: #221b2b; --ink-2: #574b63; --muted: #7c7189; --line: #e8e2ef; --line-2: #d3cadf;
  --nino: #7faede; --nina: #e79cba; --nino-text: #2a6099; --nina-text: #9d3f66;
  --nino-wash: #dceaf8; --nina-wash: #fbe3ec; --nino-solid: #5e96ce; --nina-solid: #d4739b; --on-solid: #ffffff;
  --ok: #3f9b78; --ok-text: #256a53; --ok-wash: #ddf0e7;
  --bad: #d4626a; --bad-text: #a63a48; --bad-wash: #fbe4e6;
  --warn-text: #8a6a22; --warn-wash: #fbefd5;
  --btn: #2b2136; --btn-text: #fdfbff;
  --shadow: 0 1px 2px rgba(60, 40, 80, .05), 0 10px 26px rgba(60, 40, 80, .08);
  --r: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.p {
  color-scheme: dark;
  --bg: #1b1524; --surface: #251e31; --surface-2: #2f2740; --surface-3: #3a3150;
  --ink: #f3eef9; --ink-2: #c5bbd4; --muted: #9b90ac; --line: #352d45; --line-2: #473d5b;
  --nino: #7faede; --nina: #e79cba; --nino-text: #a8cbef; --nina-text: #f2aecb;
  --nino-wash: #1f2c42; --nina-wash: #3a2130; --nino-solid: #a8cbef; --nina-solid: #f2aecb; --on-solid: #1b1524;
  --ok: #6cc3a0; --ok-text: #8ed9b8; --ok-wash: #17302a;
  --bad: #e07a80; --bad-text: #ff9ea3; --bad-wash: #351b1f;
  --warn-text: #f0cc8a; --warn-wash: #33290f;
  --btn: #f3eef9; --btn-text: #241c30;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 26px rgba(0, 0, 0, .45);
  }
}
:root[data-theme="dark"] body.p {
  color-scheme: dark;
  --bg: #1b1524; --surface: #251e31; --surface-2: #2f2740; --surface-3: #3a3150;
  --ink: #f3eef9; --ink-2: #c5bbd4; --muted: #9b90ac; --line: #352d45; --line-2: #473d5b;
  --nino: #7faede; --nina: #e79cba; --nino-text: #a8cbef; --nina-text: #f2aecb;
  --nino-wash: #1f2c42; --nina-wash: #3a2130; --nino-solid: #a8cbef; --nina-solid: #f2aecb; --on-solid: #1b1524;
  --ok: #6cc3a0; --ok-text: #8ed9b8; --ok-wash: #17302a;
  --bad: #e07a80; --bad-text: #ff9ea3; --bad-wash: #351b1f;
  --warn-text: #f0cc8a; --warn-wash: #33290f;
  --btn: #f3eef9; --btn-text: #241c30;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 26px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
h1 { font: 600 34px/1.05 var(--f-display); letter-spacing: -0.01em; }
h2 { font: 500 21px/1.2 var(--f-display); }
h3 { font: 800 15px/1.3 var(--f-body); }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 20px; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--nino-text); }
:focus-visible { outline: 2px solid var(--nino); outline-offset: 2px; }
.label { font: 800 11.5px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted); }
.ayuda { border: 0; background: none; padding: 0 0 0 4px; margin: 0; color: var(--muted); cursor: pointer; vertical-align: -2px; line-height: 0; }
.ayuda svg { width: 14px; height: 14px; display: block; }
.ayuda:hover, .ayuda[aria-expanded="true"] { color: var(--ink); }
.tip { font-size: 12.5px; line-height: 1.45; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px 10px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.con-ayuda { position: relative; display: inline-block; vertical-align: -3px; line-height: 0; }
.tip { position: absolute; z-index: 60; top: calc(100% + 9px); left: 50%;
  transform: translateX(calc(-50% + var(--corre, 0px)));
  width: max-content; max-width: min(280px, 76vw);
  font-weight: 600; line-height: 1.45; box-shadow: 0 6px 22px rgba(0, 0, 0, .18); }
.tip::before { content: ""; position: absolute; bottom: 100%; left: calc(50% - 5px - var(--corre, 0px));
  border: 6px solid transparent; border-bottom-color: var(--line-2); }
.tip::after { content: ""; position: absolute; bottom: calc(100% - 1.5px); left: calc(50% - 4px - var(--corre, 0px));
  border: 5px solid transparent; border-bottom-color: var(--surface-2); }

.num { font-variant-numeric: tabular-nums; }
svg.ic { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Componentes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.btn { border: 0; border-radius: 999px; padding: 11px 18px; font-weight: 800; cursor: pointer; background: var(--btn); color: var(--btn-text); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; min-height: 44px; }
a.btn { text-decoration: none; }
.btn.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--ink); }
.btn.sm { padding: 6px 13px; font-size: 13.5px; min-height: 34px; }
.btn.o { background: var(--nino-solid); color: var(--on-solid); }
.btn.a { background: var(--nina-solid); color: var(--on-solid); }
.btn.peligro { background: var(--bad); color: #fff; }
.btn.ancho { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:not(:disabled):hover { filter: brightness(1.08); }
.btn.ghost:not(:disabled):hover { background: var(--surface-2); filter: none; }
.linkish { border: 0; background: none; padding: 0; font: inherit; font-weight: 800; color: inherit; cursor: pointer; text-align: left; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }

.field { display: grid; gap: 6px; min-width: 0; }
.inp { display: flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 12px; height: 46px; color: var(--muted); font-weight: 700; }
.inp > span { flex: none; white-space: nowrap; }
.inp input, .inp select { width: 100%; min-width: 0; border: 0; background: transparent; font: 700 16px var(--f-body); color: var(--ink); outline: none; font-variant-numeric: tabular-nums; padding: 0; }
.inp:focus-within { border-color: var(--ink-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--nino) 22%, transparent); }
.inp.error { border-color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: 13.5px; cursor: pointer; color: var(--ink-2); font-variant-numeric: tabular-nums; min-height: 36px; }
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.chip.fav { background: var(--warn-wash); border-color: var(--warn-text); color: var(--warn-text); }
.chip.fav .ic { width: 13px; height: 13px; }
.fav-nota { display: flex; align-items: center; gap: 5px; color: var(--warn-text); }
.fav-nota .ic { width: 13px; height: 13px; flex: none; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 3px; max-width: 100%; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 8px 16px; font-weight: 800; cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 0 0 1px var(--line); }
.err { color: var(--bad-text); font-size: 13.5px; font-weight: 700; }
.err:empty { display: none; }

.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--r-sm); font-size: 14px; font-weight: 700; background: var(--surface-2); color: var(--ink); }
.aviso.ok { background: var(--ok-wash); }
.aviso.bad { background: var(--bad-wash); color: var(--bad-text); }
.aviso.warn { background: var(--warn-wash); color: var(--warn-text); }
.aviso svg { margin-top: 2px; }
.st { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 800; white-space: nowrap; border: 1px solid transparent; }
.st-abierto { background: var(--ok-wash); color: var(--ok-text); }
.st-neutro { background: var(--surface-3); color: var(--ink); }
.st-off { color: var(--muted); border-color: var(--line-2); }
.st-bad { background: var(--bad-wash); color: var(--bad-text); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.O { background: var(--nino); }
.dot.A { background: var(--nina); }
.tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 0 6px; border-radius: 6px; background: var(--surface-3); color: var(--ink-2); margin-left: 4px; vertical-align: 1px; }
.casa { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; }
.casa.ok { color: var(--ok-text); }
.casa.bad { color: var(--bad-text); }

.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--surface); padding: 11px 16px; border-radius: 12px; font-weight: 800; font-size: 14px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: min(92vw, 420px); text-align: center; }
.toast.ver { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Hoja de confirmación */
.hoja { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; justify-items: center; background: rgba(10, 9, 14, .45); padding: 12px; }
.hoja-panel { width: min(100%, 460px); background: var(--surface); border-radius: 22px; padding: 20px 18px calc(18px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; box-shadow: var(--shadow); }
@media (min-width: 600px) { .hoja { align-items: center; } }
.hoja-filas { display: grid; gap: 8px; margin: 0; }
.hoja-filas div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.hoja-filas dt { color: var(--ink-2); }
.hoja-filas dd { margin: 0; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.hoja-botones { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }

/* ================= Participante ================= */
/* La banda de globos es la única decoración de la página: el resto se gana su sitio. */
.p-banda { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 2px; }
.globos { width: clamp(150px, 52vw, 200px); height: auto; color: var(--line-2); flex: none; margin-left: -6px; }
.globos .g1 { fill: var(--nino-wash); }
.globos .g2 { fill: var(--nina-wash); }
.globos .g3 { fill: var(--ok-wash); }
.globos .conf { fill: var(--nino); opacity: .5; }
.globos .conf rect:nth-child(2), .globos .conf circle:nth-child(5) { fill: var(--nina); }
.globos .conf circle:nth-child(4) { fill: var(--ok); }
/* Un solo momento de movimiento en toda la página, al cargar: los globos suben a su sitio. */
@media (prefers-reduced-motion: no-preference) {
  .globos .g1, .globos .g2, .globos .g3 { animation: flota 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  .globos .g2 { animation-delay: -2s; }
  .globos .g3 { animation-delay: -4s; }
}
@keyframes flota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* Elegir el color de la pantalla: tres opciones, sin adivinanzas. */
.seg.tema { padding: 3px; gap: 2px; align-self: center; }
.seg.tema button { padding: 7px 9px; min-height: 34px; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; }
.seg.tema svg { width: 15px; height: 15px; flex: none; }
.seg.tema .solo-activo { display: none; }
.seg.tema button[aria-pressed="true"] .solo-activo { display: inline; }

.p-preg { font: 800 14px/1.3 var(--f-body); color: var(--ink-2); }

.p-app { max-width: 480px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(40px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 14px; }
.p-top { display: grid; gap: 6px; padding-top: 6px; }
.p-top h1 { font-size: clamp(30px, 9vw, 38px); }
.p-estado { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 14px; color: var(--ink-2); font-weight: 700; }
.p-saldo { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: end; }
.p-saldo .hola { grid-column: 1 / -1; font-weight: 800; color: var(--ink-2); font-size: 14px; }
.p-saldo b { font: 600 34px/1.05 var(--f-display); font-variant-numeric: tabular-nums; }
.p-saldo .det { text-align: right; font-size: 12.5px; color: var(--muted); font-weight: 700; line-height: 1.4; }
.p-saldo .rec { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); margin-top: 8px; display: grid; gap: 8px; justify-items: start; }
.p-saldo .rec.pedida { background: var(--ok-wash); color: var(--ok-text); border-radius: var(--r-sm); padding: 10px 12px; }
.p-saldo .rec.retiro { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; justify-items: stretch; }
.p-saldo .rec.retiro ol { display: grid; gap: 6px; line-height: 1.45; }
.p-saldo .rec.retiro .acciones { margin-top: 2px; }
.p-saldo .rec .donado { display: flex; align-items: center; gap: 6px; color: var(--ok-text); font-weight: 700; }
.p-saldo .rec .donado .ic { flex: none; }
.p-saldo .rec b { font: 800 13px/1.45 var(--f-body); }
.p-saldo .rec .acciones { display: flex; flex-wrap: wrap; gap: 8px; }
#p-cuenta { display: grid; gap: 10px; }
.p-cuenta { display: grid; gap: 10px; justify-items: center; text-align: center; }
.p-cuenta .reloj { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.p-cuenta .u { display: grid; gap: 2px; justify-items: center; background: var(--surface-2); border-radius: 12px; padding: 8px 12px; min-width: 64px; }
.p-cuenta .u b { font: 600 32px/1 var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.p-cuenta .u span { font: 800 10.5px/1.2 var(--f-body); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.p-cuenta .cuando { font-size: 13px; color: var(--ink-2); font-weight: 700; }
.p-cuenta.off .u b { color: var(--muted); }
.tiles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.tile { position: relative; border: 1px solid var(--line); border-radius: 18px; padding: 14px 14px 12px; display: grid; gap: 4px; text-align: left; background: var(--surface); cursor: default; min-height: 108px; align-content: start; }
.tile.O { background: var(--nino-wash); }
.tile.A { background: var(--nina-wash); }
button.tile { cursor: pointer; font: inherit; color: inherit; }
button.tile:disabled { cursor: default; }
button.tile[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }
.tile .nom { font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 7px; }
.tile.O .nom { color: var(--nino-text); }
.tile.A .nom { color: var(--nina-text); }
.tile b { font: 600 40px/1 var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tile b.nd { font: 800 14px/1.3 var(--f-body); color: var(--ink-2); padding-top: 8px; }
.tile .sub { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.tile-tag { position: absolute; top: -10px; right: 10px; background: var(--ink); color: var(--surface); font-size: 11px; font-weight: 800; border-radius: 999px; padding: 3px 9px; letter-spacing: .03em; }
.p-nota { font-size: 13px; color: var(--ink-2); background: var(--warn-wash); border-radius: var(--r-sm); padding: 9px 12px; }
.p-apostar { display: grid; gap: 12px; }
.p-apostar .chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.p-apostar .chip { padding: 6px 0; text-align: center; }
.p-quote { font-size: 14px; color: var(--ink-2); line-height: 1.45; min-height: 42px; }
.p-quote b { color: var(--ink); }
.p-mis { display: grid; gap: 8px; }
.p-mis h2 { font-size: 18px; }
.ap { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 3px; background: var(--surface); }
.ap .fila { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 14.5px; }
.ap .fila b { font-variant-numeric: tabular-nums; }
.ap .det { font-size: 13px; color: var(--ink-2); }
.ap.off { opacity: .65; }
.ap .gana { color: var(--ok-text); font-weight: 800; }
.p-res { border-radius: 20px; padding: 18px 16px; display: grid; gap: 6px; text-align: center; }
.p-res.O { background: var(--nino-wash); }
.p-res.A { background: var(--nina-wash); }
.p-res.X { background: var(--surface-2); border: 1px solid var(--line); }
.p-res h2 { font: 600 34px/1.05 var(--f-display); }
.p-res.O h2 { color: var(--nino-text); }
.p-res.A h2 { color: var(--nina-text); }
.p-res p { font-size: 15px; font-weight: 700; }
.p-acceso { display: grid; gap: 12px; }
.p-acceso form { display: grid; gap: 12px; }
.p-mi-cuenta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 14px; }
.p-mi-cuenta .quien { display: grid; gap: 2px; min-width: 0; }
.p-mi-cuenta .quien b { font-weight: 800; overflow-wrap: anywhere; }
.p-mi-cuenta .quien small { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.p-mi-cuenta .acciones { flex: 1 1 auto; justify-content: flex-end; }
@media (max-width: 400px) { .p-mi-cuenta .acciones .btn { flex: 1 1 0; } }
.p-como { font-size: 13.5px; color: var(--ink-2); }
.p-como summary { cursor: pointer; font-weight: 800; color: var(--ink); }
.p-como ul { display: grid; gap: 6px; margin-top: 10px; }

/* ================= Administrador ================= */
.a-app { max-width: 1180px; margin: 0 auto; padding: 0 16px 48px; }
@media (min-width: 760px) { .a-app { padding: 0 28px 48px; } }
.a-top { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 18px 0 12px; }
.a-top h1 { font-size: 26px; }
.a-top .der { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.a-reloj { font: 600 18px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.tabs { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); margin: 0 -16px 18px; padding: 0 16px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
@media (min-width: 760px) { .tabs { margin: 0 -28px 18px; padding: 0 28px; } }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: none; padding: 13px 12px 11px; font-weight: 800; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; cursor: pointer; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.panel { display: grid; gap: 16px; }
.a-login { max-width: 380px; margin: 12vh auto 0; display: grid; gap: 14px; }
.a-login form { display: grid; gap: 12px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 960px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.col { display: grid; gap: 16px; min-width: 0; }

.estado-card { display: grid; gap: 12px; }
.estado-top { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.estado-top h2 { font-size: 22px; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; }
.horas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 720px) { .horas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.horas div { background: var(--surface-2); border-radius: var(--r-sm); padding: 9px 11px; display: grid; gap: 1px; }
.horas span { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.horas b { font-weight: 800; font-variant-numeric: tabular-nums; }
.confirmar { display: grid; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--surface-2); }
.semilla { padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.semilla b { color: var(--ink); }

.board { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.side { padding: 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.side-o { background: var(--nino-wash); }
.side-a { background: var(--nina-wash); }
.side-name { font: 600 19px/1 var(--f-display); display: inline-flex; align-items: center; gap: 8px; }
.side-o .side-name { color: var(--nino-text); }
.side-a .side-name { color: var(--nina-text); }
.odds { font: 600 44px/1 var(--f-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.odds.off { color: var(--muted); }
.odds-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.stats { display: grid; gap: 7px; margin: 0; }
.stats div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13.5px; }
.stats dt { color: var(--ink-2); }
.stats dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.stats .casa-row { padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); flex-direction: column; align-items: flex-start; gap: 1px; }
.stats .casa-row dd { font-size: 17px; text-align: left; }
.pool { display: grid; place-content: center; justify-items: center; text-align: center; padding: 14px; border-inline: 1px solid var(--line); gap: 3px; min-width: 130px; }
.pool strong { font: 600 22px/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.pool span:last-child { font-size: 12.5px; color: var(--ink-2); }
@media (max-width: 600px) {
  .board { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pool { grid-column: 1 / -1; grid-row: 1; border-inline: 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 10px; padding: 10px 12px; }
  .side { padding: 13px; }
  .odds { font-size: 36px; }
  .stats div { flex-direction: column; align-items: flex-start; gap: 0; }
  .stats dd { text-align: left; }
}
.totales { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 720px) { .totales { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.totales div { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; display: grid; gap: 2px; align-content: start; }
.totales span { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.totales b { font: 600 19px/1.15 var(--f-display); font-variant-numeric: tabular-nums; }
.banner { display: grid; gap: 6px; padding: 16px; border-radius: var(--r); border: 1px solid var(--line); }
.banner.O { background: var(--nino-wash); }
.banner.A { background: var(--nina-wash); }
.banner.X { background: var(--surface-2); }
.banner h2 { font: 600 24px/1.2 var(--f-display); }

.buscar { display: flex; gap: 8px; }
.buscar .inp { flex: 1; }
.lista { display: grid; border-top: 1px solid var(--line); max-height: 560px; overflow: auto; }
.fila-p { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 6px; border-bottom: 1px solid var(--line); align-items: center; cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; width: 100%; }
.fila-p:hover, .fila-p.sel { background: var(--surface-2); }
.fila-p .n { font-weight: 800; }
.fila-p small { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.fila-p .s { font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.fila-sol { cursor: default; row-gap: 8px; }
.fila-sol:hover { background: none; }
.fila-sol .sol-quien { grid-column: 1; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
.fila-sol .sol-quien:hover .n { text-decoration: underline; }
.fila-sol .s { grid-column: 2; align-self: start; }
.fila-sol .sol-ok { grid-column: 1 / -1; justify-self: start; }
.fila-sol .sol-ok.confirmar { justify-self: stretch; font-size: 13.5px; }
.detalle { display: grid; gap: 14px; }
.detalle .saldo { font: 600 36px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.don-total { font: 600 36px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.bloque { display: grid; gap: 10px; padding: 12px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); }
.pin-nuevo { font: 600 34px/1 var(--f-display); letter-spacing: .2em; padding: 12px 16px; background: var(--warn-wash); color: var(--warn-text); border-radius: var(--r-sm); text-align: center; }
.mov { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; font-size: 13.5px; padding: 7px 0; border-bottom: 1px solid var(--line); align-items: center; }
.mov .m { font-weight: 800; font-variant-numeric: tabular-nums; }
.mov .m.mas { color: var(--ok-text); }
.tk { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "n who st" "n money act"; gap: 3px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: center; }
.tk-n { grid-area: n; color: var(--muted); font-weight: 800; font-size: 12.5px; font-variant-numeric: tabular-nums; align-self: start; padding-top: 2px; }
.tk-who { grid-area: who; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.tk-who small { color: var(--muted); font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tk-money { grid-area: money; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tk-money b { color: var(--ink); }
.tk .st { grid-area: st; justify-self: end; }
.tk-act { grid-area: act; justify-self: end; }
.tk.off { opacity: .6; }
@media (max-width: 560px) {
  .tk { grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-areas: "n who who" "n money money" "n st act"; row-gap: 6px; }
  .tk .st { justify-self: start; }
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.form-grid .ancho2 { grid-column: span 2; }
@media (max-width: 460px) { .form-grid .ancho2 { grid-column: auto; } }
.nota { font-size: 13px; color: var(--muted); }
.tabla-wrap { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th, .tabla td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.tabla th:first-child, .tabla td:first-child { text-align: left; }
.tabla thead th { font: 800 11px/1.3 var(--f-body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.qr-box { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 24px; }
.qr-box svg { width: min(78vw, 320px); height: auto; background: #fff; border-radius: 12px; padding: 8px; }
.qr-box .url { font-weight: 800; word-break: break-all; }
.vacio { padding: 18px 6px; color: var(--muted); font-size: 14px; }

@media print {
  body { background: #fff; color: #000; }
  .a-top, .tabs, .no-print { display: none !important; }
  .panel:not(#panel-qr) { display: none !important; }
  .qr-box { padding: 0; }
  .qr-box svg { width: 70vw; }
}

/* ---- Participante: jerarquía. No todo es una tarjeta igual a las demás. ---- */
body.p .p-app { gap: 16px; }
body.p .p-top h1 { letter-spacing: -0.02em; }
/* El saldo es una franja, no una tarjeta: es un dato, no una sección. */
body.p .p-saldo { background: var(--ok-wash); border: 0; border-radius: 16px; padding: 14px 16px; }
body.p .p-saldo .hola { color: var(--ok-text); }
body.p .p-saldo b { color: var(--ok-text); }
body.p .p-saldo .rec.retiro, body.p .p-saldo .rec.pedida { background: var(--surface); }
/* Los dos lados son lo más fuerte de la pantalla: redondeo grande, color lleno, globo dentro. */
body.p .tiles { gap: 12px; }
body.p .tile { border: 0; border-radius: 22px; padding: 16px 14px 14px; min-height: 132px; overflow: hidden; box-shadow: var(--shadow); }
body.p .tile .globito { position: absolute; right: -14px; bottom: -18px; width: 74px; height: 74px; opacity: .55; pointer-events: none; }
body.p .tile.O .globito { fill: var(--nino); }
body.p .tile.A .globito { fill: var(--nina); }
body.p .tile b { font-size: 44px; }
body.p button.tile[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 3px; }
body.p .tile-tag { background: var(--ok); color: #fff; }
/* La cuenta atrás y el «cómo funciona» son texto, no cajas con sombra. */
body.p .p-como { background: none; border: 1px dashed var(--line-2); box-shadow: none; }
body.p .p-mi-cuenta { background: none; border: 1px dashed var(--line-2); box-shadow: none; }
body.p .p-res { box-shadow: var(--shadow); position: relative; overflow: hidden; }
body.p .p-res .confeti { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; pointer-events: none; }
body.p .card { box-shadow: var(--shadow); }

body.p .p-res.O .confeti { color: var(--nino); }
body.p .p-res.A .confeti { color: var(--nina); }
body.p .p-res.X .confeti { color: var(--muted); }
body.p .p-res > * { position: relative; }

/* Las etiquetas en mayúsculas son el tic más delator de una pantalla genérica: aquí van en frase. */
body.p .label { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 800; }
body.p .p-cuenta .u span { text-transform: none; letter-spacing: 0; font-size: 11.5px; }
/* El selector de tema no se estira: ocupa lo suyo y se queda en una línea. */
body.p .seg.tema { flex: none; width: max-content; flex-wrap: nowrap; }
body.p .seg.tema button { white-space: nowrap; }
/* La etiqueta «paga más» vive dentro del lado, que ahora recorta lo que se sale. */
body.p .tile-tag { top: 10px; right: 10px; }
body.p .tile { padding-top: 16px; }
body.p .tile .globito { right: -6px; bottom: -6px; width: 62px; height: 78px; opacity: .45; }
body.p .tile-tag { font-size: 10.5px; padding: 3px 8px; }
/* Sobre el pastel del anuncio, el gris apagado no llega a contraste: se usa el tono de texto normal. */
body.p .p-res .muted { color: var(--ink-2); }
