@font-face { font-family: 'Playfair'; src: url('../fonts/PlayfairDisplay-Italic-VariableFont_wght.woff2') format('woff2'); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Playfair'; src: url('../fonts/PlayfairDisplay-VariableFont_wght.woff2') format('woff2'); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'RHD'; src: url('../fonts/RedHatDisplay-VariableFont_wght.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }

/* ── paleta: Mediterráneo pop */
:root {
  --tinta: #13233A; --tinta-2: #55657B; --tinta-3: #8A94A6;
  --fondo: #FFF7EC; --blanco: #FFFFFF; --linea: rgba(19, 35, 58, .08);
  --coral: #FF5A3D; --rosa: #FF3D7F; --sol: #FFC233; --naranja: #FF8A1F; --mar: #12B5D9; --azul: #2F6BFF; --lila: #7A4DFF; --menta: #16C79A;
  --verde: #22C55E; --amarillo: #FFC233; --rojo: #FF4757;
  --g-atardecer: linear-gradient(135deg, #FF8A1F 0%, #FF3D7F 52%, #7A4DFF 100%);
  --g-mar: linear-gradient(135deg, #12B5D9 0%, #2F6BFF 100%);
  --g-sol: linear-gradient(135deg, #FFD15C 0%, #FF8A1F 100%);
  --g-menta: linear-gradient(135deg, #2EE6B0 0%, #12B5D9 100%);
  --g-lila: linear-gradient(135deg, #B06BFF 0%, #5B4DFF 100%);
  --g-coral: linear-gradient(135deg, #FF8A5C 0%, #FF3D5A 100%);
  --sombra: 0 10px 30px rgba(60, 30, 90, .12), 0 2px 6px rgba(60, 30, 90, .06);
  --fondo-mapa: #092236;
  --seguro-abajo: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--fondo); color: var(--tinta); font-family: 'RHD', system-ui, sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
body { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
svg { flex: none; }
.oculto { display: none !important; }

/* ── mapa (solo se ve jugando) */
#mapa { position: fixed; inset: 0; background: var(--fondo-mapa); z-index: 0; }
.leaflet-container { background: var(--fondo-mapa); font-family: inherit; cursor: crosshair; }

/* ── fondo con burbujas de color que se mueven */
.fondo-vivo { position: fixed; inset: 0; z-index: 9; overflow: hidden; background: var(--fondo); pointer-events: none; }
body.jugando .fondo-vivo, body.viendo .fondo-vivo { display: none; }
.fondo-vivo i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: flota 18s ease-in-out infinite alternate; }
.fondo-vivo i:nth-child(1) { width: 380px; height: 380px; background: #FFB36B; top: -120px; left: -120px; }
.fondo-vivo i:nth-child(2) { width: 340px; height: 340px; background: #FF7FB0; top: 30%; right: -140px; animation-delay: -6s; }
.fondo-vivo i:nth-child(3) { width: 420px; height: 420px; background: #7FE3F5; bottom: -160px; left: -100px; animation-delay: -11s; }
.fondo-vivo i:nth-child(4) { width: 260px; height: 260px; background: #B9A2FF; top: 55%; left: 35%; animation-delay: -3s; opacity: .35; }
@keyframes flota { to { transform: translate(40px, 60px) scale(1.15); } }

/* ── panel */
.panel {
  position: fixed; inset: 0; z-index: 10; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: max(14px, env(safe-area-inset-top)) 16px calc(40px + var(--seguro-abajo));
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.panel > * { width: 100%; max-width: 460px; flex: none; }
.cols, .col { display: flex; flex-direction: column; gap: 16px; }
.panel > * { animation: sube .5s cubic-bezier(.2, .8, .3, 1) both; }
.panel > *:nth-child(2) { animation-delay: .04s; } .panel > *:nth-child(3) { animation-delay: .08s; } .panel > *:nth-child(4) { animation-delay: .12s; }
.panel > *:nth-child(5) { animation-delay: .16s; } .panel > *:nth-child(6) { animation-delay: .2s; }
@keyframes sube { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.barra-sup { display: flex; align-items: center; justify-content: space-between; }
.logo { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; background: var(--blanco); border-radius: 999px; box-shadow: var(--sombra); text-decoration: none; font-size: 13px; font-weight: 700; }
.logo img { width: 28px; height: 28px; border-radius: 50%; }
.logo b { color: var(--coral); }
.barra-sup-d { display: flex; gap: 8px; align-items: center; }
.redondo { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--blanco); box-shadow: var(--sombra); display: grid; place-items: center; color: var(--tinta-2); }
.pildora { display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 14px; border-radius: 999px; font-weight: 900; box-shadow: var(--sombra); }
.pildora svg { width: 20px; height: 20px; }
.pildora-fuego { background: var(--g-sol); color: #fff; }

.hero { text-align: center; padding: 6px 0 0; }
.titulo { margin: 0; font: italic 800 clamp(58px, 17vw, 84px)/.95 'Playfair', Georgia, serif; letter-spacing: -.01em; color: var(--tinta); }
.titulo em { background: var(--g-atardecer); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.hero-sub { margin: 8px 0 0; font-size: 13px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--tinta-2); }

/* tarjetas grandes de color */
.tarjeta-reto, .tarjeta-total { position: relative; overflow: hidden; border-radius: 30px; padding: 20px; color: #fff; box-shadow: 0 18px 40px rgba(255, 61, 127, .28), 0 4px 10px rgba(0, 0, 0, .06); }
.tarjeta-reto::after, .tarjeta-total::after { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .14); top: -110px; right: -90px; pointer-events: none; }
.t-atardecer { background: var(--g-atardecer); }
.t-mar { background: var(--g-mar); box-shadow: 0 18px 40px rgba(47, 107, 255, .28); }
.t-sol { background: var(--g-sol); box-shadow: 0 18px 40px rgba(255, 138, 31, .3); }
.t-menta { background: var(--g-menta); box-shadow: 0 18px 40px rgba(18, 181, 217, .3); }
.t-lila { background: var(--g-lila); box-shadow: 0 18px 40px rgba(91, 77, 255, .3); }
.tr-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tr-k { display: block; font-size: 13px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; opacity: .95; }
.tr-fecha { font-size: 13px; font-weight: 700; opacity: .85; }
.tr-fecha::first-letter { text-transform: uppercase; }
.tr-t { margin: 10px 0 16px; font-size: 16px; font-weight: 600; line-height: 1.4; }
.misterio { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 18px 0; }
.m-casilla { aspect-ratio: 1; border-radius: 16px; background: rgba(255, 255, 255, .2); border: 1.5px solid rgba(255, 255, 255, .45); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.m-casilla svg { width: 26px; height: 26px; }
.m-casilla i { font: italic 800 28px 'Playfair', serif; }
.m-casilla small { font-size: 10px; font-weight: 900; opacity: .9; }
.m-casilla.m-verde { background: var(--verde); border-color: #fff; } .m-casilla.m-amarillo { background: var(--amarillo); border-color: #fff; color: var(--tinta); }
.m-casilla.m-naranja { background: var(--naranja); border-color: #fff; } .m-casilla.m-rojo { background: var(--rojo); border-color: #fff; }
.tr-pie { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-top: 14px; font-size: 13px; font-weight: 700; }
.tr-pie span { display: inline-flex; align-items: center; gap: 6px; }
.tr-pie svg { width: 17px; height: 17px; }
.tr-pie b { font-variant-numeric: tabular-nums; }
.tr-patro { display: block; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .3); font-size: 13px; text-decoration: none; opacity: .95; }

.cuenta-grande { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0 4px; }
.cuenta-grande span { background: rgba(255, 255, 255, .22); border-radius: 18px; padding: 12px 4px; text-align: center; border: 1.5px solid rgba(255, 255, 255, .4); }
.cuenta-grande b { display: block; font-size: 34px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; }
.cuenta-grande small { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }

/* botones */
.boton { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 16px 20px; border-radius: 20px; border: 0; font-size: 17px; font-weight: 900; text-align: center; text-decoration: none; transition: transform .12s, box-shadow .12s, opacity .2s; }
.boton svg { width: 20px; height: 20px; }
.boton:active { transform: translateY(3px); }
.boton:disabled { opacity: .5; cursor: default; }
.boton-blanco { background: #fff; color: var(--rosa); box-shadow: 0 5px 0 rgba(0, 0, 0, .12); }
.boton-blanco:active { box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.boton-vivo { background: var(--g-coral); color: #fff; box-shadow: 0 5px 0 #C9302B, 0 12px 24px rgba(255, 61, 90, .3); }
.boton-vivo:active { box-shadow: 0 2px 0 #C9302B; }
.boton-vivo:disabled { background: #C7CBD3; box-shadow: 0 5px 0 #A8ADB7; opacity: 1; }
.boton-claro { background: var(--blanco); color: var(--tinta); box-shadow: 0 4px 0 rgba(19, 35, 58, .1), var(--sombra); font-size: 15px; padding: 14px 16px; }
.enlace { background: none; border: 0; color: var(--tinta-2); text-decoration: underline; font-size: 13px; padding: 8px; }
.acciones { display: grid; gap: 10px; }
.acciones-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* cómo se juega (prelanzamiento) */
.como { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.como-p { background: var(--blanco); border-radius: 22px; padding: 14px 10px; text-align: center; box-shadow: var(--sombra); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.como-p span { width: 34px; height: 34px; border-radius: 12px; color: #fff; font-weight: 900; display: grid; place-items: center; margin-bottom: 4px; }
.como-p b { font-size: 14px; line-height: 1.15; }
.como-p small { font-size: 11.5px; color: var(--tinta-2); line-height: 1.3; }
.c-coral span { background: var(--g-coral); } .c-mar span { background: var(--g-mar); } .c-lila span { background: var(--g-lila); }

/* mis números */
.numeros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.numero { border-radius: 22px; padding: 12px 8px; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: var(--sombra); }
.numero svg { width: 22px; height: 22px; opacity: .95; }
.numero b { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.1; }
.numero small { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .92; }
.n-coral { background: var(--g-coral); } .n-mar { background: var(--g-mar); } .n-lila { background: var(--g-lila); }

/* bloques blancos */
.bloque { background: var(--blanco); border-radius: 28px; padding: 18px 16px; box-shadow: var(--sombra); }
.bloque-cab { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 12px; }
.bloque h2 { margin: 0; font: italic 800 25px/1.1 'Playfair', Georgia, serif; color: var(--tinta); }
.etiqueta-k { font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--tinta-3); white-space: nowrap; }
.peque { font-size: 13px; line-height: 1.45; color: var(--tinta-2); margin: 0 0 10px; }
.vacio { margin: 4px 0; font-size: 14px; color: var(--tinta-2); text-align: center; line-height: 1.45; }
.cargando { height: 80px; border-radius: 16px; background: linear-gradient(90deg, #f3eee6 25%, #faf6f0 50%, #f3eee6 75%); background-size: 200% 100%; animation: brillo 1.2s infinite; }
@keyframes brillo { to { background-position: -200% 0; } }

/* clasificación */
.pestanas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; background: #F4EEE6; border-radius: 16px; margin-bottom: 14px; }
.pestana { border: 0; background: transparent; padding: 9px 2px; border-radius: 12px; font-weight: 800; font-size: 13.5px; color: var(--tinta-2); }
.pestana.activa { background: var(--blanco); color: var(--tinta); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.podio { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; margin-bottom: 10px; }
.podio-p { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.podio-n { font-weight: 800; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podio-n i { color: var(--tinta-3); font-weight: 600; }
.podio-s { font-weight: 900; font-size: 15px; font-variant-numeric: tabular-nums; }
.podio-b { width: 100%; border-radius: 16px 16px 6px 6px; display: grid; place-items: start center; padding-top: 8px; font-size: 24px; }
.p1 .podio-b { height: 92px; background: var(--g-sol); }
.p2 .podio-b { height: 66px; background: linear-gradient(135deg, #E3E8F0, #B9C3D3); }
.p3 .podio-b { height: 50px; background: linear-gradient(135deg, #FFC9A3, #E8955E); }
.podio-p.tu .podio-n { color: var(--coral); }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 19px; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .14); background: var(--lila); }
.p1 .avatar { width: 56px; height: 56px; font-size: 23px; }
.avatar.peq { width: 32px; height: 32px; font-size: 14px; border-width: 2px; }
.lista-clas { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lista-clas + .lista-clas { margin-top: 10px; }
.lista-clas li { display: grid; grid-template-columns: 24px 32px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: #FAF6F0; }
.lista-clas li.tu { background: #FFE9E3; outline: 2px solid var(--coral); }
.lista-clas .pos { font-weight: 900; color: var(--tinta-3); text-align: center; }
.lista-clas .ln { font-weight: 800; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-clas .ln i { color: var(--tinta-3); font-weight: 600; }
.lista-clas .ln small { display: block; font-size: 11px; font-weight: 600; color: var(--tinta-3); }
.lista-clas b { font-variant-numeric: tabular-nums; }

/* pueblos */
.pueblos { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pueblos li { display: grid; grid-template-columns: 20px minmax(90px, 1fr) 1.2fr auto; align-items: center; gap: 10px; }
.pueblos li.mio .pn { color: var(--coral); }
.pueblos .pos { font-weight: 900; color: var(--tinta-3); }
.pueblos .pn { font-weight: 800; font-size: 14px; line-height: 1.15; }
.pueblos .pn small { display: block; font-size: 11px; font-weight: 600; color: var(--tinta-3); }
.pueblos .pb { height: 12px; border-radius: 6px; background: #F4EEE6; overflow: hidden; }
.pueblos .pb i { display: block; height: 100%; width: 0; border-radius: 6px; transition: width 1s cubic-bezier(.2, .8, .3, 1); }
.pueblos b { font-variant-numeric: tabular-nums; font-size: 14px; }

/* ayer */
.ayer { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 22px; background: var(--blanco); box-shadow: var(--sombra); }
.ayer-e { font-size: 34px; }
.ayer strong { display: block; font-size: 14px; }
.ayer small { font-size: 12px; color: var(--tinta-2); }

/* promos */
.promo { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 28px; color: #fff; text-decoration: none; box-shadow: var(--sombra); position: relative; overflow: hidden; }
.promo::after { content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .15); bottom: -70px; right: -50px; pointer-events: none; }
.promo-k { font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; opacity: .92; }
.promo strong { font: italic 800 26px/1.1 'Playfair', Georgia, serif; }
.promo-t { font-size: 14px; line-height: 1.4; opacity: .95; }
.promo-b { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 8px; padding: 10px 16px; border-radius: 14px; background: #fff; color: var(--tinta); font-weight: 900; font-size: 14px; position: relative; z-index: 1; }
.promo-b svg { width: 18px; height: 18px; }
.p-coral { background: var(--g-coral); } .p-lila { background: var(--g-lila); } .p-mar { background: var(--g-mar); } .p-sol { background: var(--g-sol); } .p-menta { background: var(--g-menta); }

/* calendario */
.calendario { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.celda { aspect-ratio: 1; border-radius: 14px; border: 0; background: #F4EEE6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; color: var(--tinta); transition: transform .12s; }
.celda:active { transform: scale(.94); }
.celda b { font-size: 19px; font-weight: 900; line-height: 1; }
.celda small { font-size: 9.5px; font-weight: 800; }
.celda .ci svg { width: 12px; height: 12px; opacity: .45; }
.celda.futuro { color: var(--tinta-3); }
.celda.hoy { background: var(--g-atardecer); color: #fff; animation: latido 1.8s infinite; }
.celda.hecho { color: #fff; }
.celda.pendiente { background: #fff; border: 2px dashed currentColor; }
.celda.hecho.c-coral { background: var(--coral); } .celda.hecho.c-sol { background: var(--naranja); } .celda.hecho.c-mar { background: var(--mar); }
.celda.hecho.c-menta { background: var(--menta); } .celda.hecho.c-lila { background: var(--lila); } .celda.hecho.c-rosa { background: var(--rosa); }
.celda.pendiente.c-coral { color: var(--coral); } .celda.pendiente.c-sol { color: var(--naranja); } .celda.pendiente.c-mar { color: var(--mar); }
.celda.pendiente.c-menta { color: var(--menta); } .celda.pendiente.c-lila { color: var(--lila); } .celda.pendiente.c-rosa { color: var(--rosa); }
@keyframes latido { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 61, 127, .5); } 50% { box-shadow: 0 0 0 8px rgba(255, 61, 127, 0); } }

/* pie */
.seguir { display: grid; gap: 10px; text-align: center; }
.tarjeta-ig { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 22px; background: var(--blanco); box-shadow: var(--sombra); text-decoration: none; text-align: left; }
.tarjeta-ig > svg { width: 20px; height: 20px; color: var(--tinta-3); margin-left: auto; }
.ig-icono { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #FEDA75, #FA7E1E 30%, #D62976 60%, #962FBF 85%, #4F5BD5); flex: none; }
.tarjeta-ig strong { display: block; font-size: 14px; }
.tarjeta-ig small { font-size: 12.5px; color: var(--tinta-2); }

/* resultado */
.tarjeta-total { text-align: center; padding: 22px 18px 20px; }
.tt-k { display: block; font-size: 13px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.tarjeta-total strong { display: block; margin-top: 6px; font-size: clamp(72px, 22vw, 96px); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; text-shadow: 0 6px 24px rgba(0, 0, 0, .15); }
.tt-max { font-size: 15px; font-weight: 800; opacity: .9; }
.cuadros { display: flex; justify-content: center; gap: 8px; margin: 16px 0 10px; }
.cuadros i { width: 44px; height: 44px; border-radius: 13px; border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 4px 10px rgba(0, 0, 0, .12); animation: salta .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.cuadros i:nth-child(2) { animation-delay: .08s; } .cuadros i:nth-child(3) { animation-delay: .16s; } .cuadros i:nth-child(4) { animation-delay: .24s; } .cuadros i:nth-child(5) { animation-delay: .32s; }
@keyframes salta { from { transform: scale(0); } to { transform: scale(1); } }
.c-verde { background: var(--verde); } .c-amarillo { background: var(--amarillo); } .c-naranja { background: var(--naranja); } .c-rojo { background: var(--rojo); }
.tt-frase { margin: 6px 0 0; font: italic 700 20px/1.25 'Playfair', Georgia, serif; }
.tt-puesto { display: inline-block; margin-top: 12px; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .95); color: var(--tinta); font-weight: 900; font-size: 14px; position: relative; z-index: 1; }
.lista { list-style: none; margin: 0; padding: 6px 14px; background: var(--blanco); border-radius: 24px; box-shadow: var(--sombra); }
.lista li { display: grid; grid-template-columns: 18px 1fr auto 50px; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--linea); font-size: 14px; }
.lista li:last-child { border-bottom: 0; }
.lista .cuadro { width: 18px; height: 18px; border-radius: 6px; }
.lista .ln { font-weight: 800; }
.lista .lk { color: var(--tinta-3); font-size: 12.5px; font-weight: 600; }
.lista b { text-align: right; font-variant-numeric: tabular-nums; }
.proximo { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; color: var(--tinta-2); }
.proximo svg { width: 20px; height: 20px; }
.proximo b { color: var(--tinta); font-variant-numeric: tabular-nums; }

/* alias */
.f-alias { display: grid; gap: 12px; }
.f-alias input { width: 100%; font: 800 17px 'RHD', sans-serif; padding: 15px 16px; border-radius: 16px; border: 2px solid #EDE5DA; background: #FFFCF7; color: var(--tinta); outline: none; }
.f-alias input:focus { border-color: var(--rosa); background: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-b { padding: 9px 13px; border-radius: 999px; border: 2px solid #EDE5DA; background: #fff; font-weight: 800; font-size: 13px; color: var(--tinta-2); }
.chip-b.activa { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.error { margin: 0; color: var(--rojo); font-weight: 700; font-size: 13px; }
.hecho-ok { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 800; color: #0E9F77; }
.hecho-ok svg { width: 22px; height: 22px; }

/* valorar */
.v-pregunta { margin: 4px 0 8px; font-weight: 800; font-size: 14px; color: var(--tinta-2); }
.caras { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }
.cara { border: 2px solid #EDE5DA; background: #fff; border-radius: 16px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .15s; }
.cara span { font-size: 26px; line-height: 1.1; }
.cara small { font-size: 10px; font-weight: 800; color: var(--tinta-2); }
.cara.activa { border-color: var(--rosa); background: #FFF0F5; transform: translateY(-3px); }
.estrellas { display: flex; gap: 6px; margin-bottom: 6px; }
.estrella { border: 0; background: none; padding: 2px; color: #E6DED3; transition: transform .15s, color .15s; }
.estrella svg { width: 34px; height: 34px; }
.estrella.activa { color: var(--sol); }
.estrella:active { transform: scale(1.2); }
.v-resumen { margin-top: 10px; }
.reparto { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; align-items: end; height: 92px; }
.reparto div { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.rb { width: 100%; height: 64px; display: flex; align-items: flex-end; }
.rb i { display: block; width: 100%; height: 4%; border-radius: 8px 8px 4px 4px; background: var(--g-atardecer); transition: height .8s cubic-bezier(.2, .8, .3, 1); }
.reparto small { font-size: 18px; }

/* ── durante la partida */
.juego { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
.juego > * { pointer-events: auto; }
.juego-cab {
  position: absolute; top: max(10px, env(safe-area-inset-top)); left: 10px; right: 10px;
  display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 4px 12px;
  padding: 12px 14px 10px; border-radius: 24px; background: #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
}
.juego-cab.entra { animation: entra .45s cubic-bezier(.2, .9, .3, 1.25); }
@keyframes entra { from { transform: translateY(-16px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.j-salir { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #F4EEE6; color: var(--tinta-2); font-weight: 900; font-size: 14px; }
.pregunta { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.pregunta-k { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--rosa); }
.j-icono { display: inline-flex; }
.j-icono svg { width: 16px; height: 16px; }
.pregunta-n { font: italic 800 clamp(22px, 6.4vw, 28px)/1.08 'Playfair', Georgia, serif; color: var(--tinta); overflow-wrap: anywhere; }
.marcador { text-align: right; font-weight: 900; font-size: 22px; font-variant-numeric: tabular-nums; color: var(--rosa); }
.marcador small { display: block; font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-3); }
.puntitos { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-top: 6px; }
.puntitos i { height: 6px; border-radius: 3px; background: #EDE5DA; }
.puntitos i.actual { background: var(--g-atardecer); animation: pulso 1.2s infinite; }
.puntitos i.verde { background: var(--verde); } .puntitos i.amarillo { background: var(--amarillo); } .puntitos i.naranja { background: var(--naranja); } .puntitos i.rojo { background: var(--rojo); }
@keyframes pulso { 50% { opacity: .5; } }

.hoja { position: absolute; left: 10px; right: 10px; bottom: calc(12px + var(--seguro-abajo)); display: grid; gap: 10px; }
.pista { margin: 0; text-align: center; font-size: 12.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.resultado { padding: 16px 18px; border-radius: 24px; background: #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); animation: entra .35s ease-out; }
.res-fila { display: flex; justify-content: space-between; align-items: baseline; }
.res-km { font: italic 800 30px/1.1 'Playfair', Georgia, serif; }
.k-verde { color: #16A34A; } .k-amarillo { color: #D99A00; } .k-naranja { color: #EA6C0A; } .k-rojo { color: #E63946; }
.res-puntos { font-size: 22px; font-weight: 900; color: #fff; background: var(--g-atardecer); padding: 4px 12px; border-radius: 12px; font-variant-numeric: tabular-nums; }
.res-lugar { margin-top: 4px; font-size: 14px; font-weight: 800; color: var(--tinta-2); }
.res-nota { margin-top: 8px; font-size: 14px; line-height: 1.4; color: var(--tinta); }
.barra { margin-top: 12px; height: 10px; border-radius: 5px; background: #F1EBE2; overflow: hidden; }
.barra i { display: block; height: 100%; width: 0; border-radius: 5px; transition: width .8s cubic-bezier(.2, .8, .3, 1); }
.barra i.verde { background: var(--verde); } .barra i.amarillo { background: var(--amarillo); } .barra i.naranja { background: var(--naranja); } .barra i.rojo { background: var(--rojo); }

/* chinchetas */
.pin { display: block; width: 34px; height: 44px; position: relative; filter: drop-shadow(0 5px 6px rgba(0, 0, 0, .45)); }
.pin::before { content: ''; position: absolute; left: 4px; top: 2px; width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 3.5px solid #fff; }
.pin::after { content: ''; position: absolute; left: 13.5px; top: 11px; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.pin-coral::before { background: var(--coral); }
.pin-real::before { background: var(--menta); }
.pin-real { animation: cae .55s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes cae { from { transform: translateY(-34px); opacity: 0; } to { transform: none; opacity: 1; } }
.pin-peque { transform: scale(.75); transform-origin: 50% 100%; animation: none; }
.linea { stroke: #fff; stroke-width: 3.5; stroke-dasharray: 7 7; fill: none; opacity: .95; }
.linea-verde { stroke: var(--verde); } .linea-amarillo { stroke: var(--amarillo); } .linea-naranja { stroke: var(--naranja); } .linea-rojo { stroke: var(--rojo); }
.etiqueta { background: #fff; color: var(--tinta); border: 0; border-radius: 10px; font: 900 13px 'RHD', sans-serif; padding: 5px 9px; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.etiqueta::before { border-top-color: #fff !important; }
.volver-flotante { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + var(--seguro-abajo)); width: auto; padding: 14px 26px; z-index: 20; }
.volver-flotante:active { transform: translateX(-50%) translateY(3px); }

/* confeti, diálogo, avisos */
.confeti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }
.dialogo { max-width: 460px; width: calc(100% - 32px); border: 0; border-radius: 28px; background: #fff; color: var(--tinta); padding: 24px 20px; box-shadow: 0 30px 60px rgba(0, 0, 0, .25); }
.dialogo::backdrop { background: rgba(19, 35, 58, .45); }
.dialogo h2 { margin: 0 0 12px; font: italic 800 30px 'Playfair', Georgia, serif; }
.dialogo h3 { margin: 18px 0 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--rosa); }
.pasos { padding-left: 20px; margin: 0; display: grid; gap: 8px; font-size: 15px; line-height: 1.45; }
.dialogo a { color: var(--azul); }
.dialogo .boton { margin-top: 18px; }
.aviso { position: fixed; left: 50%; transform: translateX(-50%); top: max(16px, env(safe-area-inset-top)); z-index: 70; background: var(--tinta); color: #fff; padding: 12px 18px; border-radius: 16px; font-weight: 800; font-size: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); max-width: calc(100% - 32px); text-align: center; }


/* ── tema del mes y premio */
.tema { border-radius: 22px; padding: 14px 16px; color: #fff; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--sombra); }
.tema.t-mar { background: var(--g-mar); } .tema.t-menta { background: var(--g-menta); } .tema.t-lila { background: var(--g-lila); } .tema.t-sol { background: var(--g-sol); } .tema.t-coral { background: var(--g-coral); }
.tema-k { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; opacity: .92; }
.tema-k svg { width: 15px; height: 15px; }
.tema strong { font: italic 800 22px/1.15 'Playfair', Georgia, serif; }
.tema small { font-size: 13px; opacity: .92; line-height: 1.35; }
.premio { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; border: 0; border-radius: 22px; background: #fff; box-shadow: var(--sombra); position: relative; overflow: hidden; }
.premio::before { content: ''; position: absolute; inset: 0; border-radius: 22px; padding: 2px; background: var(--g-sol); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.premio-i { width: 44px; height: 44px; border-radius: 14px; background: var(--g-sol); color: #fff; display: grid; place-items: center; flex: none; }
.premio-t b { display: block; font-size: 14px; }
.premio-t small { display: block; font-size: 12.5px; color: var(--tinta-2); line-height: 1.35; }
.premio > svg { width: 20px; height: 20px; color: var(--tinta-3); flex: none; }
.clasif-premio { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: 14px; background: #FFF4D6; color: #8A5A00; font-size: 13px; font-weight: 700; line-height: 1.35; }
.clasif-premio svg { width: 18px; height: 18px; margin-top: 1px; }
.lista-clas li.premiado { background: #FFF4D6; }
.ganador { border-radius: 28px; padding: 20px; background: var(--g-sol); color: #fff; display: flex; flex-direction: column; gap: 6px; text-align: center; box-shadow: var(--sombra); }
.ganador-k { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.ganador-k svg { width: 18px; height: 18px; }
.ganador strong { font: italic 800 28px 'Playfair', Georgia, serif; }
.codigo { align-self: center; padding: 10px 18px; border-radius: 14px; background: #fff; color: var(--tinta); font: 900 24px 'RHD', monospace; letter-spacing: .12em; }
.ganador small { font-size: 13px; line-height: 1.4; }
.ganador hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .4); width: 100%; }
.autor { margin: 4px 0 0; font-size: 13px; color: var(--tinta-2); }
.autor a { color: var(--rosa); font-weight: 800; text-decoration: none; }
.autor .enlace { padding: 0; font-size: 13px; }

/* ── preguntas (rondas de quiz) */
body.en-quiz::before { content: ''; position: fixed; inset: 0; z-index: 4; background: var(--g-atardecer); }
body.en-quiz::after { content: ''; position: fixed; width: 420px; height: 420px; border-radius: 50%; background: rgba(255, 255, 255, .12); top: -140px; right: -120px; z-index: 4; pointer-events: none; }
.quiz { position: absolute; left: 12px; right: 12px; top: 50%; transform: translateY(-50%); max-width: 520px; margin: 0 auto; background: #fff; border-radius: 28px; padding: 20px 16px 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); max-height: calc(100% - 210px); overflow-y: auto; }
.quiz.entra { animation: entra .4s cubic-bezier(.2, .9, .3, 1.2); }
.q-pregunta { margin: 0 0 14px; font: italic 800 clamp(21px, 5.6vw, 26px)/1.2 'Playfair', Georgia, serif; color: var(--tinta); }
.q-opciones { display: grid; gap: 8px; }
.q-opciones.q-vf { grid-template-columns: 1fr 1fr; }
.q-op { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 14px; border-radius: 16px; border: 2px solid #EDE5DA; background: #fff; font-weight: 800; font-size: 15px; color: var(--tinta); transition: transform .12s, background .2s, border-color .2s; }
.q-op:active:not(:disabled) { transform: scale(.98); }
.q-letra { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 900; }
.q-coral .q-letra { background: var(--coral); } .q-sol .q-letra { background: var(--naranja); } .q-mar .q-letra { background: var(--mar); }
.q-menta .q-letra { background: var(--menta); } .q-lila .q-letra { background: var(--lila); } .q-rosa .q-letra { background: var(--rosa); }
.q-op.elegida { border-color: var(--tinta); }
.q-op.bien { background: #E7F9EE; border-color: var(--verde); }
.q-op.bien .q-letra { background: var(--verde); }
.q-op.mal { background: #FFE9EB; border-color: var(--rojo); }
.q-op.mal .q-letra { background: var(--rojo); }
.q-op:disabled:not(.bien):not(.mal) { opacity: .55; }
.q-explica { margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: #FAF6F0; font-size: 14px; line-height: 1.45; }
.q-explica p { margin: 0 0 6px; }
.q-explica a { font-size: 12.5px; font-weight: 800; color: var(--azul); text-decoration: none; }
.lista .ln i svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; color: var(--rosa); }

/* zonas en el mapa */
.zona { stroke-width: 2.5; fill-opacity: .28; }
.zona-dentro { stroke: var(--verde); fill: var(--verde); }
.zona-fuera { stroke: var(--menta); fill: var(--menta); }

/* ── ordenador */
@media (min-width: 1000px) {
  .panel { padding: 24px 32px 48px; }
  .panel > .barra-sup, .panel > .cols { max-width: 1120px; }
  .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .col { gap: 20px; }
  .hero { text-align: left; padding-top: 12px; }
  .titulo { font-size: 104px; }
  .hero-sub { font-size: 14px; }
  .tarjeta-reto, .tarjeta-total { padding: 28px; border-radius: 34px; }
  .misterio { gap: 12px; }
  .m-casilla svg { width: 34px; height: 34px; }
  .bloque { padding: 22px 22px; }
  .calendario { grid-template-columns: repeat(8, 1fr); }
  .juego-cab { left: 24px; right: auto; top: 24px; transform: none; width: 420px; }
  .hoja { left: 24px; right: auto; bottom: 24px; transform: none; width: 420px; }
  .quiz { left: 50%; right: auto; width: 560px; transform: translate(-50%, -50%); max-height: calc(100% - 80px); padding: 28px 24px 22px; }
  .quiz.entra { animation: none; }
  .q-op:hover:not(:disabled) { border-color: var(--rosa); background: #FFF6F9; }
  .boton:hover { filter: brightness(1.04); }
  .volver-flotante { bottom: 28px; }
}

@media (min-width: 720px) and (max-width: 999px) {
  .juego-cab, .hoja { left: 50%; right: auto; transform: translateX(-50%); width: 540px; }
  .juego-cab.entra { animation: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
