/* xSwim, el juego de Pekín (web/game.py, assets/game.js; docs/web-juego.md). Rehecho con Hugo el 25-11: en el móvil una final
   cada vez con el podio en escalones; en el ordenador, la cinta con todas las finales del día; tus podios y guardar, a pantalla entera.
   Color con significado:
     --gold / --silver / --bronze  las medallas: los escalones del podio, el disco con el puesto y el borde del nadador elegido
     --fast  azul: el hueco del podio que toca llenar y la final que estás mirando en la cinta
     --rope  amarillo corchera: el ganador del día
   Lo demás, tinta (lo tuyo) y gris (el contexto). Tarjetas blancas solo para cada nadador y cada final, sin nada con fondo dentro. */
.gm { padding-top: calc(var(--barh) + clamp(14px, 2.4vw, 28px)); padding-bottom: 32px; min-height: 80vh; }
@media (max-width: 600px) { .gm .col { padding-left: 24px; padding-right: 24px; } }
.gm-load { color: var(--muted); }

/* ---------------------------------------------------------------- los días */
.gm-days { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gut)); padding: 2px var(--gut) 4px; }
.gm-day { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 50px; padding: 8px 6px 7px; border-radius: 14px;
  border: 0; background: none; color: var(--muted); cursor: pointer; font: 700 13px/1 var(--f-body); }
.gm-day b { font: 900 24px/1 var(--f-num); color: var(--ink); letter-spacing: 0; }
.gm-day:hover { background: var(--soft); }
.gm-day[aria-pressed="true"] { background: var(--ink); color: rgba(255,255,255,.75); }
.gm-day[aria-pressed="true"] b { color: #fff; }
.gm-day .dot { display: flex; gap: 3px; height: 6px; margin-top: 3px; }
.gm-day .dot i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.gm-day .dot i.on { background: currentColor; }
.gm-day[aria-pressed="true"] .dot i { background: rgba(255,255,255,.3); } .gm-day[aria-pressed="true"] .dot i.on { background: #fff; }
.gm-day.shut b { color: var(--muted); }
.gm-when { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 0; font-size: 15px; color: var(--text); }
.gm-when p { margin: 0; }
.gm-when b { color: var(--ink); }

/* ---------------------------------------------------------------- la final: las rayas de progreso y el título */
.gm-steps { display: flex; gap: 4px; margin: 14px 0 0; }
.gm-step { flex: 1; height: 26px; border: 0; padding: 0; background: none; cursor: pointer; display: flex; align-items: center; }
.gm-step::before { content: ''; flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.gm-step.done::before { background: var(--ink); }
.gm-step.cur::before { background: var(--fast); height: 7px; }
.gm-fin { margin-top: 4px; }
.gm-fin h2 { font-size: clamp(32px, 8.6vw, 58px); }
.gm-fin .at { margin: 8px 0 0; font-size: 15px; color: var(--muted); }

/* ---------------------------------------------------------------- el podio: plata, oro y bronce en escalones */
.gm-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 6px; margin: 14px 0 0; border-bottom: 3px solid var(--ink); }
.gm-podium .st { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.gm-podium .who { position: relative; z-index: 1; width: 66px; height: 66px; margin-bottom: -12px; border-radius: 50%; border: 0; padding: 0; background: none; cursor: pointer; }
.gm-podium .m1 .who { width: 80px; height: 80px; }
.gm-podium .who .fc { width: 100%; height: 100%; border-radius: 50%; background: #fff; box-shadow: 0 8px 18px -8px rgba(11,34,51,.45); }
.gm-podium .who .fl { position: absolute; right: -2px; bottom: 10px; width: 24px; height: 24px; border-radius: 7px; border: 2px solid #fff; }
.gm-podium .who:not(.on) { display: grid; place-items: center; margin-bottom: 10px; border: 2px dashed var(--grey); font: 700 13px var(--f-body); color: var(--muted); cursor: default; }
.gm-podium .who.next { border: 2px solid var(--fast); color: var(--fast); background: var(--fast-t); animation: gmpulse 1.8s ease-in-out infinite; }
@keyframes gmpulse { 50% { transform: scale(1.06); } }
.gm-podium .blk { width: 100%; height: 58px; display: flex; flex-direction: column; align-items: center; padding: 16px 6px 0; border-radius: 12px 12px 0 0; background: var(--gold); }
.gm-podium .m1 .blk { height: 84px; padding-top: 18px; }
.gm-podium .m2 .blk { height: 68px; background: var(--silver); }
.gm-podium .m3 .blk { height: 54px; background: var(--bronze); }
.gm-podium .blk b { font: 900 26px/1 var(--f-num); color: rgba(11,34,51,.42); letter-spacing: 0; }
.gm-podium .m1 .blk b { font-size: 34px; }
.gm-podium .blk span { max-width: 100%; margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 15px/1.1 var(--f-body); color: var(--ink); }
/* la cara cae en su escalón */
.gm-podium .who.land { animation: gmland .55s var(--spring); }
.gm-podium .who.land + .blk { animation: gmbump .55s var(--ease); transform-origin: bottom; }
@keyframes gmland { 0% { transform: translateY(-70px) scale(.6); opacity: 0; } 55% { opacity: 1; } 100% { transform: none; } }
@keyframes gmbump { 40% { transform: scaleY(.94); } }
.gm-podium.flash .who.on { animation: gmshake .4s; }
@keyframes gmshake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
/* en la cinta, pequeño y sin texto */
.gm-podium.mini { gap: 4px; margin: 0; border-bottom: 0; }
.gm-podium.mini .who { width: 40px; height: 40px; margin-bottom: -6px; cursor: inherit; }
.gm-podium.mini .m1 .who { width: 46px; height: 46px; }
.gm-podium.mini .who:not(.on) { margin-bottom: 6px; border-width: 1.5px; }
.gm-podium.mini .who .fl { width: 14px; height: 14px; border-radius: 4px; border-width: 1.5px; bottom: 4px; }
.gm-podium.mini .who .fc { box-shadow: 0 4px 10px -5px rgba(11,34,51,.45); }
.gm-podium.mini .blk { height: 22px; padding-top: 7px; border-radius: 6px 6px 0 0; } .gm-podium.mini .m1 .blk { height: 32px; padding-top: 9px; } .gm-podium.mini .m3 .blk { height: 16px; padding-top: 4px; }
.gm-podium.mini .blk b, .gm-podium.mini .m1 .blk b { font-size: 13px; }
.gm-podium.mini .blk { padding-top: 0; }
.gm-podium.mini .blk span { display: none; }

/* ---------------------------------------------------------------- los nadadores: una tarjeta cada uno */
.gm-tiles { display: grid; gap: 8px; margin-top: 22px; }
.gm-tile { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 70px;
  padding: 10px 16px 10px 11px; border-radius: 18px; border: 2px solid transparent; background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; font: inherit;
  transition: transform .15s var(--ease); }
.gm-tile:active { transform: scale(.98); }
@media (hover: hover) { .gm-tile:hover { border-color: var(--line); } }
.gm-tile .fc { width: 48px; height: 48px; border-radius: 50%; background: var(--bg); }
.gm-tile .nm { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gm-tile .nm b { font: 700 17px/1.15 var(--f-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-tile .nm small { display: flex; align-items: center; gap: 6px; font: 600 13px/1 var(--f-body); color: var(--muted); }
.gm-tile .nm small img { width: 16px; height: 16px; border-radius: 4px; }
.gm-tile .tm { font: 900 22px/1 var(--f-num); font-variant-numeric: tabular-nums; }
.gm-tile .tm.none { color: var(--grey); }
.gm-tile.picked.m1 { border-color: var(--gold); } .gm-tile.picked.m2 { border-color: var(--silver); } .gm-tile.picked.m3 { border-color: var(--bronze); }
.gm-tile .gm-d { position: absolute; left: 44px; top: 6px; }
.gm-d { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--gold); color: var(--ink);
  font: 900 14px/1 var(--f-num); font-style: normal; border: 2px solid #fff; }
.gm-d.m2 { background: var(--silver); } .gm-d.m3 { background: var(--bronze); }
.gm-more { display: block; width: 100%; min-height: 52px; margin-top: 4px; border: 0; background: none; color: var(--fast); font: 700 15px var(--f-body); cursor: pointer; }
@media (max-width: 380px) { .gm-tile { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; padding-right: 12px; } .gm-tile .fc { width: 42px; height: 42px; } .gm-tile .gm-d { left: 38px; } .gm-tile .nm b { font-size: 16px; } .gm-tile .tm { font-size: 20px; } }
@media (min-width: 600px) and (max-width: 1023px) { .gm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- botones */
.gm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--panel); color: var(--ink); font: 700 16px var(--f-body); cursor: pointer; white-space: nowrap; }
.gm-btn svg { margin-right: -6px; }
.gm-btn.solid { background: var(--ink); border-color: var(--ink); color: #fff; }
.gm-btn.big { width: 100%; min-height: 56px; font-size: 17px; }
.gm-btn:disabled { background: var(--grey); border-color: var(--grey); color: #fff; cursor: not-allowed; }
.gm-round { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 0; background: var(--soft); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; }
.gm-round.ghost { visibility: hidden; }
.gm-full:focus { outline: none; }   /* la pantalla recibe el foco al abrirse (game.js), sin marco */

/* la barra de abajo del móvil: atrás, cuántos podios llevas y la siguiente final; encima de la cápsula de secciones */
.gm-foot { position: sticky; bottom: 12px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px;
  padding: 6px; border-radius: 999px; background: var(--panel); box-shadow: 0 8px 30px -8px rgba(11,34,51,.3); }
.gm-foot .cnt { font: 600 14px/1.2 var(--f-body); color: var(--muted); white-space: nowrap; }
.gm-foot .cnt b, .gm-save .cnt b { font: 900 20px/1 var(--f-num); color: var(--ink); }
@media (max-width: 719px) { .gm-foot { bottom: calc(var(--tabh) + var(--tabgap) + 8px); } }

/* ---------------------------------------------------------------- el ordenador: la cinta y debajo la final */
.gm-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.gm-top .gm-days { margin: 0; padding: 0; }
.gm-save { display: flex; align-items: center; gap: 14px; flex: none; }
.gm-save .cnt { font: 600 15px var(--f-body); color: var(--muted); }
.gm-ribbon { display: flex; gap: 12px; overflow-x: auto; margin: 16px calc(-1 * var(--gut)) 0; padding: 4px var(--gut) 12px; scroll-snap-type: x proximity; scroll-padding: 0 var(--gut); }
.gm-card { flex: 0 0 232px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-height: 150px; padding: 14px 14px 0; overflow: hidden;
  border-radius: 18px; border: 2px solid transparent; background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; scroll-snap-align: start; }
.gm-card:hover { border-color: var(--line); }
.gm-card.cur { border-color: var(--fast); }
.gm-card .t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.gm-card .t b { font: 800 16px/1.2 var(--f-head); letter-spacing: -0.01em; }
.gm-card .t small { font: 500 13px var(--f-body); color: var(--muted); }
.gm-stage { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 56px; align-items: start; margin-top: 26px; }
.gm-left { position: sticky; top: calc(var(--barh) + 16px); }
.gm-left .gm-fin h2 { font-size: clamp(36px, 3.4vw, 52px); }
.gm-left .gm-podium .who { width: 88px; height: 88px; } .gm-left .gm-podium .m1 .who { width: 106px; height: 106px; }
.gm-left .gm-podium .blk { height: 84px; } .gm-left .gm-podium .m1 .blk { height: 120px; } .gm-left .gm-podium .m2 .blk { height: 96px; } .gm-left .gm-podium .m3 .blk { height: 76px; }
.gm-nx { margin-top: 22px; }
.gm-right .gm-tiles { margin-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------------------------------------------------------------- tus podios y guardar: una pantalla entera */
dialog.gm-full { border: 0; padding: 0; margin: 0; width: 100%; height: 100%; max-width: none; max-height: none; inset: 0; background: var(--bg); color: var(--ink); overscroll-behavior: contain; }
dialog.gm-full[open] { animation: gmup .32s var(--ease); }
@keyframes gmup { from { transform: translateY(24px); opacity: 0; } }
dialog.gm-full::backdrop { background: var(--bg); }
.gm-full .in { max-width: 1120px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) 24px calc(32px + env(safe-area-inset-bottom)); }
.gm-full .hd { position: sticky; top: 0; z-index: 2; padding: 8px 0; margin: 0 -24px; padding-left: 24px; background: var(--bg); }
.gm-full h2 { font-size: clamp(36px, 8vw, 68px); margin-top: 6px; }
.gm-full .lead2 { margin: 10px 0 0; font-size: 16px; color: var(--text); max-width: 34em; }
.gm-sum { display: grid; gap: 10px; margin-top: 20px; }
@media (min-width: 700px) { .gm-sum { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; } }
.gm-sf { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 14px 14px 12px; border-radius: 20px; border: 0; background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
button.gm-sf:hover { box-shadow: inset 0 0 0 2px var(--line); }
.gm-sf .t { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.gm-sf .t b { font: 800 18px/1.2 var(--f-head); letter-spacing: -0.015em; }
.gm-sf .t small { font: 500 14px var(--f-body); color: var(--muted); }
.gm-sf .row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 6px; }
.gm-sf .sp { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; text-align: center; }
.gm-sf .ring { position: relative; width: 62px; height: 62px; margin-bottom: 4px; }
.gm-sf .m1 .ring { width: 76px; height: 76px; }
.gm-sf .ring .fc { width: 100%; height: 100%; border-radius: 50%; background: var(--bg); }
.gm-sf .ring .fl { position: absolute; right: -3px; bottom: 2px; width: 24px; height: 24px; border-radius: 7px; border: 2px solid #fff; }
.gm-sf .ring .gm-d { position: absolute; left: -4px; top: -2px; }
.gm-sf .empty .ring { border: 2px dashed var(--grey); border-radius: 50%; }
.gm-sf .empty .ring .gm-d { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.gm-sf .sp b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 15px/1.2 var(--f-body); }
.gm-sf .empty b { color: var(--muted); font-weight: 500; }
.gm-sf .sp small { font: 600 12px/1.2 var(--f-body); color: var(--muted); }
.gm-sf .sp small.pts { font: 900 18px/1 var(--f-num); color: var(--muted); } .gm-sf .sp small.p3 { color: var(--ink); }
.gm-sf .real { margin: 0; font-size: 14px; color: var(--muted); }

.gm-form { display: block; margin: 0; }
.gm-form .side { max-width: 560px; }
.gm-form .gm-nb { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 2; display: flex; align-items: flex-end; gap: 10px; padding: 12px 24px calc(14px + env(safe-area-inset-bottom));
  background: var(--bg); box-shadow: 0 -12px 20px -16px rgba(11,34,51,.35); }
.gm-form .gm-nb label { flex: 1; min-width: 0; margin-top: 0; }
.gm-form .gm-nb .gm-btn { min-height: 52px; flex: none; }
.gm-full:has(.gm-nb) .in { padding-bottom: calc(130px + env(safe-area-inset-bottom)); }
.gm-form label { display: block; margin-top: 16px; font: 700 15px var(--f-body); }
.gm-form label span { font-weight: 500; color: var(--muted); }
.gm-form input[type=text], .gm-form input[type=email] { display: block; width: 100%; margin-top: 6px; min-height: 52px; padding: 0 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--panel); font: 500 17px var(--f-body); color: var(--ink); }
.gm-form input:focus { outline: none; border-color: var(--ink); }
.gm-form .help { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.gm-form .chk { display: flex; gap: 10px; align-items: center; font-weight: 500; min-height: 44px; margin-top: 12px; }
.gm-form .chk input { width: 20px; height: 20px; accent-color: var(--ink); }
.gm-form .big { margin-top: 18px; }
@media (min-width: 1024px) {
  .gm-form { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "sum bar" "sum side"; gap: 0 44px; align-items: start; align-content: start; margin-top: 20px; }
  .gm-form .gm-sum { grid-area: sum; margin-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gm-form .gm-nb { grid-area: bar; position: static; flex-direction: column; align-items: stretch; margin: 0; padding: 0; box-shadow: none; background: none; }
  .gm-form .gm-nb .gm-btn { margin-top: 6px; }
  .gm-form .side { grid-area: side; }
  .gm-full:has(.gm-nb) .in { padding-bottom: 40px; }
  .gm-sf .ring { width: 84px; height: 84px; } .gm-sf .m1 .ring { width: 104px; height: 104px; }
}
}
.gm-full .acts { display: grid; gap: 10px; margin-top: 22px; max-width: 420px; }

/* ---------------------------------------------------------------- el día siguiente: tus puntos y la clasificación */
.gm-res { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 16px; width: 100%; margin: 0 0 16px; padding: 14px 18px; border-radius: 18px; border: 0; background: var(--panel); color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
div.gm-res { margin-top: 16px; cursor: default; }
.gm-res .k { font: 600 14px var(--f-body); color: var(--muted); }
.gm-res .v { grid-column: 1; font: 900 32px/1 var(--f-num); }
.gm-res .v small { font: 600 15px var(--f-body); color: var(--text); margin-left: 8px; }
.gm-res .go { grid-column: 2; grid-row: 1 / span 2; font: 700 15px var(--f-body); color: var(--fast); }
.gm-board { padding: 0; list-style: none; }

@media (prefers-reduced-motion: reduce) { .gm-podium .who.next, .gm-podium .who.land, .gm-podium .who.land + .blk, dialog.gm-full[open] { animation: none; } }
@media (max-width: 1023px) {
  .gm-full .acts { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; max-width: none; margin: 0; grid-template-columns: 1fr 1fr; padding: 12px 24px calc(14px + env(safe-area-inset-bottom));
    background: var(--bg); box-shadow: 0 -12px 20px -16px rgba(11,34,51,.35); }
  .gm-full .acts .gm-btn { padding: 0 12px; font-size: 15px; }
  .gm-full .acts .gm-btn:only-child { grid-column: 1 / -1; }
  .gm-full:has(.acts) .in { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}

/* ---------------------------------------------------------------- con los finalistas y marcas viejas */
.gm-tile .tm small { display: block; margin-top: 3px; font: 600 11px/1 var(--f-body); color: var(--muted); text-align: right; }   /* el año de una marca de antes de esta temporada */
.gm-tile.out { border-color: var(--slow); }
.gm-tile .nf { color: var(--slow-t); font-weight: 700; }   /* naranja: elegiste a alguien que no está en la final */
.gm-podium .who.out .fc { box-shadow: 0 0 0 3px var(--slow); }
.gm-status { margin: 0 0 12px; }

/* ---------------------------------------------------------------- guardar: quien ya juega, el error y lo pequeño */
.gm-nb .as { flex: 1; margin: 0 0 14px; font: 500 16px var(--f-body); color: var(--text); }
.gm-nb .as b { color: var(--ink); }
.gm-err { margin: 10px 0 0; font: 600 14px var(--f-body); color: var(--slow-t); }
.gm-err:empty { display: none; }
/* Turnstile, contra robots: solo aparece si Cloudflare duda; en el móvil, encima de la barra de guardar */
.gm-ts { margin: 12px 0 0; }
.gm-ts:empty { display: none; }
@media (max-width: 1023px) { .gm-full:has(.gm-nb) .gm-ts.on { position: fixed; left: 24px; bottom: calc(150px + env(safe-area-inset-bottom)); z-index: 4; margin: 0; } }
.gm-form .fine { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.gm-form .fine a { color: var(--muted); }
.gm-link { border: 0; background: none; padding: 10px 0; min-height: 44px; font: 600 14px var(--f-body); color: var(--fast); cursor: pointer; }
.gm-link:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 1023px) { .gm-full:has(.gm-nb) .gm-err { position: fixed; left: 24px; right: 24px; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 3; margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--panel); } }

/* guardado: la imagen de la historia y los botones */
.gm-share { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; align-items: center; margin-top: 20px; }
.gm-story { width: 150px; height: 267px; border-radius: 14px; background: var(--soft); box-shadow: 0 10px 30px -14px rgba(11,34,51,.45); object-fit: cover; }
.gm-share .acts { display: grid; gap: 10px; }
@media (max-width: 1023px) {
  .gm-full .gm-share .acts { position: static; padding: 0; box-shadow: none; background: none; grid-template-columns: 1fr; }
  .gm-full:has(.gm-share) .in { padding-bottom: 40px; }
}
@media (max-width: 380px) { .gm-share { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; } .gm-story { width: 112px; height: 199px; } .gm-share .gm-btn { padding: 0 12px; font-size: 15px; } }
@media (min-width: 1024px) { .gm-share { grid-template-columns: 216px 320px; } .gm-story { width: 216px; height: 384px; } }

/* ---------------------------------------------------------------- cerrado: cada final con su podio, tu podio y la clasificación */
.gm-closed { display: grid; gap: 28px; margin-top: 16px; }
@media (min-width: 1024px) { .gm-closed { grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; align-items: start; } .gm-closed .gm-sum { margin-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); } .gm-lb { position: sticky; top: calc(var(--barh) + 16px); } }
.gm-closed .gm-sf { cursor: default; }
.gm-closed .gm-sf .sp small { font-weight: 600; }
.gm-wait { margin: 0; font-size: 15px; color: var(--muted); }
.gm-you { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 0; padding-top: 10px; border-top: 1px solid var(--soft); font: 600 14px/1.3 var(--f-body); }
.gm-you .lab { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-you .ps { display: flex; flex-wrap: wrap; gap: 4px 12px; min-width: 0; }
.gm-you .pp { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.gm-you .pp .gm-d { width: 18px; height: 18px; font-size: 11px; border-width: 1.5px; }
.gm-you .pp.none { color: var(--muted); }
.gm-you .pt { font: 900 14px/1 var(--f-num); color: var(--muted); } .gm-you .pt.p3 { color: var(--ink); }
.gm-you .sum { font: 900 20px/1 var(--f-num); }
.gm-res .gm-btn { grid-column: 2; grid-row: 1 / span 2; }
.gm-lb h2 { font-size: 26px; letter-spacing: -0.02em; }
.gm-lb .bsub { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.gm-board { margin: 14px 0 0; }
.gm-board li { min-height: 0; border-bottom: 0; display: block; }
.gm-board button { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; min-height: 48px; padding: 0 8px 0 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: 600 16px var(--f-body); text-align: left; cursor: pointer; }
.gm-board button:hover { background: var(--soft); }
.gm-board .rk { font: 900 18px var(--f-num); color: var(--muted); text-align: right; }
.gm-board .bn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gm-board .bn small { margin-left: 8px; font: 600 12px var(--f-body); color: var(--muted); }
.gm-board .bn small.w { padding: 2px 8px; border-radius: 999px; background: var(--rope); color: var(--ink); font-weight: 700; }   /* amarillo: el ganador del día */
.gm-board .pts { font: 900 20px var(--f-num); }
.gm-board li.me button, .gm-board li.on button { font-weight: 800; background: var(--panel); }
.gm-board li.x .bn { color: var(--muted); }
.gm-board li.gap { height: 10px; border: 0; }
.gm-board li.empty { padding: 12px 0; color: var(--muted); }

/* ---------------------------------------------------------------- solo en local, con ?dev=1: la barra de prueba, plegada en una esquina */
.gm-dev { position: fixed; z-index: 60; right: 12px; top: calc(var(--barh) + 8px); font: 13px/1.4 var(--f-body); }
.gm-devb { margin-left: auto; display: block; height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--rope); color: var(--ink); font: 800 13px var(--f-body); cursor: pointer; }
.gm-devp { margin-top: 6px; width: min(360px, calc(100vw - 24px)); max-height: 70vh; overflow: auto; padding: 12px; border-radius: 12px; background: #FFF6D6; box-shadow: 0 12px 34px -14px rgba(11, 34, 51, .45); }
.gm-devp[hidden] { display: none; }
@media (max-width: 719px) { .gm-dev { top: 40%; right: 0; } .gm-devb { border-radius: 999px 0 0 999px; padding: 0 6px 0 10px; opacity: .85; } }
.gm-dev:has(.gm-devp:not([hidden])) { top: calc(var(--barh) + 8px); }
.gm-devp p { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.gm-devp button, .gm-devp a { padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); font: 13px var(--f-body); cursor: pointer; text-decoration: none; }

@media (forced-colors: active) {
  .gm-day[aria-pressed="true"], .gm-card.cur, .gm-tile.picked { outline: 2px solid Highlight; }
  .gm-d, .gm-podium .blk { border: 1px solid ButtonText; }
}

/* el ordenador estrecho: los nadadores en una columna para que quepan los nombres */
@media (min-width: 1024px) and (max-width: 1239px) { .gm-stage { grid-template-columns: 360px minmax(0, 1fr); gap: 40px; } .gm-right .gm-tiles { grid-template-columns: minmax(0, 1fr); } }
/* móviles bajos (iPhone SE, 360 × 740): el podio y el título más pequeños, para que se vean más nadadores */
@media (max-width: 719px) and (max-height: 780px) {
  .gm-fin h2 { font-size: 28px; }
  .gm-fin .at { margin-top: 4px; font-size: 14px; }
  .gm-steps { margin-top: 8px; }
  .gm-when { font-size: 14px; margin-top: 4px; }
  .gm-podium { margin-top: 8px; }
  .gm-podium .who { width: 54px; height: 54px; margin-bottom: -10px; } .gm-podium .m1 .who { width: 64px; height: 64px; }
  .gm-podium .who:not(.on) { margin-bottom: 6px; font-size: 12px; }
  .gm-podium .who .fl { width: 20px; height: 20px; bottom: 6px; }
  .gm-podium .blk { height: 44px; padding-top: 12px; } .gm-podium .m1 .blk { height: 62px; padding-top: 14px; } .gm-podium .m2 .blk { height: 52px; } .gm-podium .m3 .blk { height: 40px; }
  .gm-podium .blk b { font-size: 22px; } .gm-podium .m1 .blk b { font-size: 28px; }
  .gm-podium .blk span { margin-top: 4px; font-size: 14px; }
  .gm-tiles { margin-top: 14px; }
}

/* ---------------------------------------------------------------- las reglas: un botón junto al cierre y una hoja (la común) */
.gm-rulesb { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--panel); color: var(--ink); font: 700 14px var(--f-body); cursor: pointer; }
.gm-rulesb:hover { border-color: var(--ink); }
/* la pantalla de las reglas: aparece en el sitio (sin subir desde abajo) y enseña en vez de explicar */
dialog.gm-howto[open] { animation: gmfade .25s var(--ease); }
@keyframes gmfade { from { opacity: 0; transform: scale(.985); } }
.gm-howto h2 { margin-bottom: 18px; }
.gm-howto .hgrid { display: grid; gap: 12px; }
@media (min-width: 900px) { .gm-howto .hgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
.gm-howto .hc { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 16px; border-radius: 22px; background: var(--panel); }
.gm-howto .hc .n { position: absolute; top: 16px; right: 18px; font: 900 34px/1 var(--f-num); color: var(--line); }
.gm-howto .hc h3 { font: 800 21px/1.15 var(--f-head); letter-spacing: -0.02em; padding-right: 30px; }
.gm-howto .hc p { margin: 0; font-size: 15px; color: var(--text); }
.gm-howto .hc p b { color: var(--ink); }
/* 1: un podio de verdad, pequeño */
.gm-howto .hpod { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 5px; max-width: 300px; border-bottom: 3px solid var(--ink); }
.gm-howto .hpod .st { display: flex; flex-direction: column; align-items: center; }
.gm-howto .hpod .who { width: 52px; height: 52px; margin-bottom: -8px; position: relative; z-index: 1; } .gm-howto .hpod .m1 .who { width: 62px; height: 62px; }
.gm-howto .hpod .fc { width: 100%; height: 100%; border-radius: 50%; background: #fff; box-shadow: 0 6px 14px -7px rgba(11,34,51,.45); }
.gm-howto .hpod .blk { width: 100%; height: 40px; display: grid; place-items: center; padding-top: 6px; border-radius: 10px 10px 0 0; background: var(--gold); }
.gm-howto .hpod .m1 .blk { height: 58px; } .gm-howto .hpod .m2 .blk { height: 48px; background: var(--silver); } .gm-howto .hpod .m3 .blk { height: 36px; background: var(--bronze); }
.gm-howto .hpod .blk b { font: 900 22px/1 var(--f-num); color: rgba(11,34,51,.42); }
/* 2: el ejemplo de puntos, lo que eliges sobre lo que pasó */
.gm-howto .hpts { display: grid; grid-template-columns: 78px repeat(3, minmax(0, 1fr)); align-items: center; gap: 12px 8px; }
.gm-howto .hpts .lab { font: 700 13px/1.2 var(--f-body); color: var(--muted); }
.gm-howto .hf { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; text-align: center; }
.gm-howto .hf .ring { position: relative; width: 56px; height: 56px; }
.gm-howto .hf .fc { width: 100%; height: 100%; border-radius: 50%; background: var(--bg); }
.gm-howto .hf .gm-d { position: absolute; left: -4px; top: -3px; width: 22px; height: 22px; font-size: 12px; }
.gm-howto .hf b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 13px var(--f-body); }
.gm-howto .pt { display: inline-grid; place-items: center; min-width: 40px; height: 28px; padding: 0 8px; border-radius: 999px; font: 900 18px/1 var(--f-num); font-style: normal; }
.gm-howto .pt.p3 { background: var(--ink); color: #fff; }              /* tinta: el puesto exacto */
.gm-howto .pt.p1 { background: var(--soft); color: var(--ink); }       /* gris claro: en el podio, en otro puesto */
.gm-howto .pt.p0 { background: none; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }
.gm-howto .key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 14px !important; }
.gm-howto .key span { display: inline-flex; align-items: center; gap: 6px; }
.gm-howto .key .tot { margin-left: auto; font: 900 24px/1 var(--f-num); color: var(--ink); }
/* 3: los días; 4: la clasificación con su ganador */
.gm-howto .hdays { display: flex; gap: 4px; flex-wrap: wrap; }
.gm-howto .hdays .hdy { display: flex; flex-direction: column; align-items: center; min-width: 42px; padding: 6px 4px; border-radius: 12px; background: var(--bg); font: 700 12px/1 var(--f-body); color: var(--muted); }
.gm-howto .hdays .hdy b { font: 900 22px/1.1 var(--f-num); color: var(--ink); }
.gm-howto .hdays .hdy.on { background: var(--ink); color: rgba(255,255,255,.75); } .gm-howto .hdays .hdy.on b { color: #fff; }
.gm-howto .hboard { margin: 0; padding: 0; list-style: none; }
.gm-howto .hboard li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 34px; align-items: center; gap: 8px; min-height: 42px; border-bottom: 1px solid var(--soft); font: 600 15px var(--f-body); }
.gm-howto .hboard .r { font: 900 18px var(--f-num); color: var(--muted); text-align: right; }
.gm-howto .hboard .p { font: 900 20px var(--f-num); text-align: right; }
.gm-howto .hboard .w { padding: 2px 9px; border-radius: 999px; background: var(--rope); font: 700 12px var(--f-body); }   /* amarillo: el ganador del día */
.gm-howto .hboard li.win .nm { font-weight: 800; }
.gm-howto .hfine { margin: 18px 0 0; font-size: 13px; color: var(--muted); max-width: 62em; }
.gm-howto .hfine a { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { dialog.gm-howto[open] { animation: none; } }
