/* Colores del castillo de París (rosa y azul de los tejados) sobre niebla de noviembre. */
@font-face { font-family: "Red Hat Display"; src: url(/fuentes/rhd.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Red Hat Text"; src: url(/fuentes/rht.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
:root {
  --niebla: #eef0f6; --hoja: #fff; --tinta: #1b2050; --tinta2: #575d82; --linea: #dcdfec;
  --tejado: #2c4aa6; --rosa: #c93a68; --rosa-f: #fde8ee; --rosa-t: #8f1f43;
  --farol: #f0b23e; --farol-f: #fdf1d6; --farol-t: #734d00;
  --hecho: #1f7a5f; --hecho-f: #def3ea; --hecho-t: #17604a;
  --lluvia: #3463c4; --lluvia-f: #e3ecfb; --lluvia-t: #234a96;
  --sobre: #fff; --velo: rgb(20 23 58 / .5);
  --abajo: calc(66px + env(safe-area-inset-bottom));
  --sale: cubic-bezier(.23, 1, .32, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --niebla: #10132c; --hoja: #1b1f45; --tinta: #eef0fa; --tinta2: #aab0d4; --linea: #303662;
    --tejado: #8ea6f0; --rosa: #ff8fb0; --rosa-f: #47203a; --rosa-t: #ffc2d4;
    --farol-f: #45360f; --farol-t: #ffd98a;
    --hecho: #2c9a79; --hecho-f: #173f36; --hecho-t: #9fe3cb;
    --lluvia: #4a78d8; --lluvia-f: #1e2f5c; --lluvia-t: #bfd3fb;
    --velo: rgb(4 5 18 / .7);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--niebla); color: var(--tinta);
  font: 16px/1.4 "Red Hat Text", system-ui, sans-serif; padding-bottom: var(--abajo);
  -webkit-tap-highlight-color: transparent; overscroll-behavior-y: contain;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .titular { font-family: "Red Hat Display", system-ui, sans-serif; text-wrap: balance; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--tejado); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--farol); outline-offset: 2px; border-radius: 6px; }
svg.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

main { max-width: 560px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 16px 24px; outline: none; }
.sinc { position: fixed; top: calc(6px + env(safe-area-inset-top)); left: 50%; translate: -50% 0; z-index: 4; font-size: .75rem; font-weight: 500;
  background: var(--tinta); color: var(--niebla); padding: 3px 12px; border-radius: 99px; }
.sinc:empty { display: none; }

/* Cabecera del día */
.sup { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sup h1 { font-size: 1.6rem; font-weight: 900; letter-spacing: -.02em; line-height: 1.05; }
.sup p { font-size: .9rem; color: var(--tinta2); margin-top: 4px; }
.cielo { background: var(--hoja); border-radius: 16px; padding: 8px 12px; text-align: right; font-size: .78rem; color: var(--tinta2); line-height: 1.2; min-height: 48px; flex: none; }
.cielo b { display: block; font: 700 1rem "Red Hat Display"; color: var(--tinta); }
.cielo[aria-pressed="true"] { background: var(--lluvia); color: #e6eefc; }
.cielo[aria-pressed="true"] b { color: #fff; }

.dias { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 16px; }
.dias button { min-height: 52px; border-radius: 14px; font-size: .75rem; color: var(--tinta2); line-height: 1.15; }
.dias b { display: block; font: 700 1.1rem "Red Hat Display"; color: var(--tinta); font-variant-numeric: tabular-nums; }
.dias button[aria-pressed="true"] { background: var(--tinta); color: var(--linea); }
.dias button[aria-pressed="true"] b { color: var(--niebla); }
.dias .completo b { color: var(--hecho); }

/* Tarjeta «Ahora» */
.ahora { background: var(--hoja); border-radius: 24px; overflow: hidden; box-shadow: 0 14px 28px -18px rgb(27 32 80 / .5); touch-action: pan-y; position: relative; }
.ahora .foto { height: 150px; position: relative; background: linear-gradient(160deg, #27377f 0%, #5c4f9c 45%, #e2507c 100%); display: block; width: 100%; }
.ahora .foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ahora .ya, .ahora .esp { position: absolute; top: 12px; font-weight: 700; font-size: .8rem; padding: 4px 12px; border-radius: 99px; }
.ahora .ya.suelta { position: static; display: inline-block; margin-bottom: 10px; }
.ahora .ya { left: 12px; background: var(--farol); color: #3d2a00; }
.ahora .esp { right: 12px; background: rgb(255 255 255 / .95); color: #17604a; }
.ahora .esp.o { color: #734d00; } .ahora .esp.r { color: #8f1f43; }
.cuerpo { padding: 14px 16px 16px; }
.cuerpo h2 { font-size: 1.4rem; font-weight: 900; letter-spacing: -.01em; line-height: 1.1; }
.cuerpo .d { font-size: .9rem; color: var(--tinta2); margin-top: 4px; }
.pist { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 14px; }
.pist span { font-size: .8rem; font-weight: 500; padding: 4px 10px; border-radius: 99px; background: var(--niebla); }
.pist .t { background: var(--rosa-f); color: var(--rosa-t); }
.pist .c { background: var(--hecho-f); color: var(--hecho-t); }
.pist .o { background: var(--farol-f); color: var(--farol-t); }
.pist .l { background: var(--lluvia-f); color: var(--lluvia-t); }
.fila-bt { display: grid; grid-template-columns: 1fr 56px 56px; gap: 8px; }
.bt { min-height: 56px; border-radius: 18px; font: 700 1.05rem "Red Hat Display"; display: grid; place-items: center; background: var(--niebla); color: var(--tinta); padding: 6px 14px; text-align: center; }
.bt.si { background: var(--hecho); color: #fff; }
.bt.rosa { background: var(--rosa-f); color: var(--rosa-t); }
.bt:active { scale: .97; }
.fin { background: var(--hecho-f); color: var(--hecho-t); border-radius: 24px; padding: 22px 18px; }
.fin h2 { font-size: 1.3rem; font-weight: 900; }
.fin p { margin-top: 4px; }

/* Línea del día */
.luego { font: 700 .9rem "Red Hat Display"; color: var(--tinta2); margin: 20px 0 6px; }
.linea { list-style: none; margin: 0; padding: 0; position: relative; }
.linea::before { content: ""; position: absolute; left: 61px; top: 22px; bottom: 22px; width: 2px; background: var(--linea); }
.linea button { width: 100%; display: grid; grid-template-columns: 46px 20px 1fr auto; align-items: center; gap: 0 6px; padding: 8px 0; min-height: 52px; text-align: left; position: relative; }
.linea .h { font-size: .8rem; color: var(--tinta2); font-variant-numeric: tabular-nums; text-align: right; }
.linea i { width: 14px; height: 14px; border-radius: 50%; background: var(--niebla); border: 2.5px solid var(--tejado); justify-self: center; z-index: 1; }
.linea .hecho i { background: var(--hecho); border-color: var(--hecho); }
.linea .pausa i, .linea .saltado i { border-color: var(--linea); }
.linea .actual i { border-color: var(--farol); background: var(--farol); }
.linea .n { font-weight: 500; line-height: 1.2; }
.linea .hecho .n { color: var(--tinta2); text-decoration: line-through; text-decoration-thickness: 1px; }
.linea .saltado .n { color: var(--tinta2); font-style: italic; opacity: .75; }
.linea .saltado i { background: transparent; border-style: dashed; }
.linea .m.s { background: transparent; font-size: .72rem; font-weight: 700; color: var(--tinta2); border: 1px dashed var(--linea); border-radius: 99px; padding: 2px 8px; }
.tesela.saltada { opacity: .7; }
.sello.no { background: rgb(255 255 255 / .94); color: #8f1f43; border: 1px dashed currentColor; }
.linea .pausa .n { color: var(--tinta2); font-weight: 400; }
.linea small { font-size: .78rem; color: var(--tinta2); display: block; font-weight: 400; }
.m { font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--hecho-f); color: var(--hecho-t); white-space: nowrap; }
.m.o { background: var(--farol-f); color: var(--farol-t); }
.m.r { background: var(--rosa-f); color: var(--rosa-t); }
.m.l { background: var(--lluvia-f); color: var(--lluvia-t); }
.vacio { color: var(--tinta2); padding: 12px 0; }

/* Tablero: lluvia y teselas */
.modo { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--hoja); border-radius: 16px; padding: 4px; margin: 18px 0 4px; }
.modo button { min-height: 44px; border-radius: 12px; font-weight: 500; color: var(--tinta2); }
.modo button[aria-pressed="true"] { background: var(--tinta); color: var(--niebla); font-weight: 700; }
.banda { background: var(--hoja); border-radius: 22px; padding: 14px 16px; margin-bottom: 14px; display: grid; gap: 12px; }
.banda h2 { font-size: 1.25rem; font-weight: 900; line-height: 1.1; }
.banda p { font-size: .9rem; color: var(--tinta2); margin-top: 2px; }
.banda.moja { background: var(--lluvia); color: #fff; }
.banda.moja p { color: #dfe8fb; }
.barras { display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; align-items: end; height: 64px; }
.barras span { display: grid; justify-items: center; align-content: end; height: 100%; }
.barras u { display: block; width: 100%; border-radius: 4px 4px 2px 2px; background: var(--linea); text-decoration: none; }
.barras .mj u { background: var(--lluvia); }
.barras .ya u { outline: 2px solid var(--farol); outline-offset: 1px; }
.barras small { font-size: .68rem; color: var(--tinta2); height: 14px; font-variant-numeric: tabular-nums; }
.barras span:not(:has(small))::after { content: ""; height: 14px; }
.banda.moja .barras u { background: rgb(255 255 255 / .3); }
.banda.moja .barras .mj u { background: #fff; }
.banda.moja .barras small { color: #dfe8fb; }
.banda .bt { min-height: 48px; font-size: .95rem; }
.banda.moja .bt { background: #fff; color: var(--lluvia-t); }
.zona-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 22px 0 8px; }
.zona-cab h2 { font-size: 1.15rem; font-weight: 900; }
.zona-cab p { font-size: .85rem; color: var(--tinta2); font-weight: 500; }
.teselas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tesela { position: relative; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; text-align: left; color: #fff;
  background: linear-gradient(160deg, #27377f 0%, #5c4f9c 45%, #e2507c 100%); }
.tesela img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tesela .pie { position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 12px 12px; background: linear-gradient(transparent, rgb(13 15 40 / .88)); }
.tesela .pie b { display: block; font: 700 1rem/1.15 "Red Hat Display"; }
.tesela .pie small { font-size: .78rem; opacity: .9; }
.sello { position: absolute; top: 10px; left: 10px; background: rgb(255 255 255 / .94); color: var(--tinta); font-weight: 700; font-size: .78rem; padding: 4px 10px; border-radius: 99px;
  font-variant-numeric: tabular-nums; display: inline-grid; place-items: center; }
@media (prefers-color-scheme: dark) { .sello { color: #1b2050; } }
.sello.der { left: auto; right: 10px; color: #17604a; }
.sello.der.o { color: #734d00; } .sello.der.r { color: #8f1f43; } .sello.l, .sello.der.l { background: var(--lluvia); color: #fff; }
.sello.ya { background: var(--farol); color: #3d2a00; }
.sello.ok { background: var(--hecho); color: #fff; width: 34px; height: 34px; padding: 0; }
.sello.ok .ic { width: 20px; height: 20px; stroke-width: 3; }
.tesela.hecha img { filter: grayscale(1) brightness(.75); }
.tesela.hecha .pie b { text-decoration: line-through; text-decoration-thickness: 1px; }
.tesela.actual { outline: 3px solid var(--farol); outline-offset: 2px; }
.tesela:active { scale: .98; }
.pausas { display: flex; flex-wrap: wrap; gap: 8px; }
.pausas button { min-height: 44px; padding: 6px 14px; border-radius: 99px; background: var(--hoja); font-size: .9rem; text-align: left; }
.pausas b { font-variant-numeric: tabular-nums; color: var(--tinta2); }
.pausas .hecha { text-decoration: line-through; color: var(--tinta2); }

.conviene { display: grid; gap: 8px; }
.conviene button { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-align: left; background: var(--hoja); border-radius: 18px; padding: 8px; min-height: 80px; }
.conviene img, .conviene .sinfoto { width: 64px; height: 64px; object-fit: cover; border-radius: 14px; background: linear-gradient(160deg, #27377f, #e2507c); }
.conviene b { display: block; font: 700 1rem/1.2 "Red Hat Display"; }
.conviene small { font-size: .84rem; color: var(--tinta2); }

.notas { background: var(--farol-f); color: var(--farol-t); border-radius: 20px; padding: 14px 16px; margin-top: 14px; }
.notas h2 { font-size: 1rem; font-weight: 900; }
.notas ul { margin: 6px 0 0; padding-left: 18px; }
.notas li { margin-bottom: 5px; font-size: .92rem; }
.opdia { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.opdia button { text-align: left; background: var(--hoja); border-radius: 18px; padding: 10px 14px; min-height: 60px; border: 2px solid transparent; }
.opdia b { display: block; font: 700 .95rem/1.2 "Red Hat Display"; }
.opdia small { font-size: .82rem; color: var(--tinta2); }
.opdia button[aria-pressed="true"] { border-color: var(--hecho); background: var(--hecho-f); }
.opdia button[aria-pressed="true"] small { color: var(--hecho-t); }
.chips.colas button { flex: 1 0 52px; font-variant-numeric: tabular-nums; }

.ejemplo { width: 100%; text-align: left; border: 2px dashed var(--tejado); border-radius: 18px; padding: 10px 14px; min-height: 56px; margin-bottom: 4px; }
.ejemplo b { display: block; font: 700 .95rem/1.2 "Red Hat Display"; }
.ejemplo small { font-size: .84rem; color: var(--tinta2); }
.ejemplo[aria-pressed="true"] { border-style: solid; background: var(--hoja); }

.gps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: -4px 0 12px; }
.gps .bt { min-height: 46px; font-size: .95rem; grid-auto-flow: column; gap: 8px; padding: 6px 16px; }
.gps .mapa { font-size: .88rem; font-weight: 700; color: var(--tejado); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; display: inline-grid; align-items: center; }
.gps p { font-size: .9rem; flex: 1 1 100%; }
.gps.activo { background: var(--lluvia-f); color: var(--lluvia-t); border-radius: 18px; padding: 10px 14px; display: grid; grid-template-columns: 44px 1fr; }
.gps.activo .flecha { font: 900 2rem/1 "Red Hat Display"; display: grid; place-items: center; width: 44px; height: 44px; transition: rotate .4s var(--sale); }
.gps.activo b { display: block; font: 900 1.15rem/1.15 "Red Hat Display"; font-variant-numeric: tabular-nums; }
.gps.activo small { font-size: .84rem; }
.gps.activo .mapa { color: inherit; }

.etiquetas { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.etiquetas button { min-height: 44px; padding: 6px 14px; border-radius: 99px; border: 1.5px solid var(--linea); font-weight: 500; font-size: .92rem; }
.etiquetas button[aria-pressed="true"] { background: var(--rosa-f); border-color: var(--rosa); color: var(--rosa-t); font-weight: 700; }
.cuaderno { display: grid; gap: 8px; }
.cuaderno button { text-align: left; background: var(--hoja); border-radius: 18px; padding: 12px 14px; min-height: 56px; }
.cuaderno b { display: block; font: 700 .95rem/1.2 "Red Hat Display"; }
.cuaderno span { font-size: .9rem; color: var(--tinta2); white-space: pre-line; }

.avance { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.avance span { flex: 1; height: 7px; border-radius: 9px; background: var(--linea); overflow: hidden; max-width: 150px; }
.avance u { display: block; height: 100%; background: var(--hecho); border-radius: 9px; transition: width .5s var(--sale); }
.avance small { font-size: .78rem; color: var(--tinta2); font-weight: 700; font-variant-numeric: tabular-nums; }
.alerta { border-radius: 20px; padding: 12px 14px; margin-bottom: 10px; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; background: var(--farol); color: #3d2a00; }
.alerta b { display: block; font: 900 1.1rem/1.15 "Red Hat Display"; }
.alerta span { font-size: .9rem; }
.alerta .bt { min-height: 46px; font-size: .9rem; background: #3d2a00; color: #fff; padding: 6px 14px; }
.alerta.agua { background: var(--lluvia); color: #fff; } .alerta.agua .bt { background: #fff; color: var(--lluvia-t); }
.alerta.sol { background: var(--hecho-f); color: var(--hecho-t); }
.alerta.cita { background: var(--rosa); color: #fff; } .alerta.cita .bt { background: #fff; color: var(--rosa-t); }
@media (prefers-color-scheme: dark) { .alerta.cita { color: #2a0714; } }
.estrellas { display: flex; gap: 4px; margin: 6px 0 12px; }
.estrellas button { flex: 1; min-height: 56px; font-size: 2.1rem; line-height: 1; color: var(--linea); border-radius: 14px; }
.estrellas button[aria-pressed="true"] { color: var(--farol); }
.estrellas button:active { scale: .9; }
.galeria { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.galeria span { position: relative; }
.galeria img { width: 96px; height: 96px; object-fit: cover; border-radius: 14px; display: block; }
.galeria span button { position: absolute; top: -6px; right: -6px; width: 32px; height: 32px; border-radius: 50%; background: var(--tinta); color: var(--niebla); font-size: 1.2rem; line-height: 1; }
.mas-foto { width: 96px; height: 96px; border-radius: 14px; border: 2px dashed var(--tejado); font-weight: 700; font-size: .85rem; color: var(--tejado); }
.oculto { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.uso { background: var(--hoja); border-radius: 20px; padding: 14px 16px; margin-top: 14px; border: 2px solid var(--tejado); }
.uso h2 { font-size: 1.05rem; font-weight: 900; }
.uso ul { margin: 8px 0 12px; padding-left: 18px; }
.uso li { font-size: .92rem; margin-bottom: 5px; }
.uso .bt { width: 100%; min-height: 46px; }
@media (prefers-reduced-motion: no-preference) {
  .tesela img { transition: scale .5s var(--sale); }
  .teselas .tesela { animation: asoma .4s var(--sale) backwards; }
  .teselas .tesela:nth-child(2) { animation-delay: .04s; } .teselas .tesela:nth-child(3) { animation-delay: .08s; } .teselas .tesela:nth-child(4) { animation-delay: .12s; }
  @keyframes asoma { from { opacity: 0; translate: 0 10px; } }
}

/* Barra inferior */
.pestanas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--hoja); border-top: 1px solid var(--linea); padding: 6px 6px env(safe-area-inset-bottom); }
.pestanas button { min-height: 56px; font-size: .75rem; font-weight: 500; color: var(--tinta2); display: grid; justify-items: center; align-content: center; gap: 2px; }
.pestanas button[aria-current="page"] { color: var(--rosa); font-weight: 700; }

/* Hoja inferior */
dialog { border: 0; padding: 0; width: 100%; max-width: 560px; margin: auto auto 0; max-height: 90dvh; background: var(--hoja); color: var(--tinta);
  border-radius: 28px 28px 0 0; overflow: auto; }
dialog::backdrop { background: var(--velo); }
.hoja-in { padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); }
.hoja-in::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 9px; background: var(--linea); margin: 0 auto 14px; }
.hoja-in h2 { font-size: 1.3rem; font-weight: 900; line-height: 1.15; }
.hoja-in > p { font-size: .9rem; color: var(--tinta2); margin: 3px 0 12px; }
.hoja-in img.grande { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; margin: 10px 0 0; background: var(--linea); }
.credito { font-size: .7rem; color: var(--tinta2); margin-top: 3px; }
.op { width: 100%; display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--linea); text-align: left; min-height: 64px; }
.op .cu { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--niebla); }
.op b { display: block; font-weight: 700; }
.op small { font-size: .82rem; color: var(--tinta2); }
.op.r .cu { background: var(--rosa-f); color: var(--rosa-t); }
.op.l .cu { background: var(--lluvia-f); color: var(--lluvia-t); }
.op.v .cu { background: var(--hecho-f); color: var(--hecho-t); }
.chips { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.chips button { flex: 1 0 72px; min-height: 48px; border: 1.5px solid var(--linea); border-radius: 14px; font-weight: 700; font-size: .85rem; }
.chips button:active { background: var(--tinta); color: var(--niebla); border-color: var(--tinta); }
.menor { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; border-top: 1px solid var(--linea); padding-top: 12px; margin-top: 2px; }
.menor button { min-height: 48px; border-radius: 14px; background: var(--niebla); font-size: .85rem; font-weight: 500; }
.menor button:disabled { opacity: .4; }
.cerrar { width: 100%; margin-top: 12px; }
dl { margin: 12px 0 0; display: grid; gap: 10px; }
dt { font-size: .8rem; color: var(--tinta2); font-weight: 700; }
dd { margin: 0; }
.campo { width: 100%; min-height: 52px; border: 1.5px solid var(--tinta2); border-radius: 14px; padding: 10px 14px; background: var(--hoja); }

/* Días */
.pend { background: var(--rosa-f); color: var(--rosa-t); border-radius: 18px; padding: 12px 14px; margin-bottom: 14px; }
.pend h2 { font-size: 1rem; font-weight: 700; }
.pend ul { list-style: none; padding: 0; margin: 6px 0 0; }
.pend li button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 48px; text-align: left; color: inherit; }
.pend li span { background: var(--hoja); border-radius: 99px; padding: 5px 12px; font-weight: 700; font-size: .8rem; white-space: nowrap; }
.dia { width: 100%; background: var(--hoja); border-radius: 18px; padding: 12px 14px; margin-bottom: 8px; display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; text-align: left; }
.dia .f { text-align: center; font-size: .75rem; color: var(--tinta2); line-height: 1.1; }
.dia .f b { display: block; font: 900 1.35rem "Red Hat Display"; color: var(--tinta); }
.dia h2 { font-size: 1rem; font-weight: 700; }
.dia small { font-size: .82rem; color: var(--tinta2); }
.prog { height: 6px; border-radius: 9px; background: var(--niebla); margin-top: 7px; overflow: hidden; }
.prog u { display: block; height: 100%; background: var(--hecho); border-radius: 9px; }
.dia .q { font: 700 .85rem "Red Hat Display"; color: var(--tinta2); font-variant-numeric: tabular-nums; }

/* Guía */
.filtros { display: flex; gap: 6px; overflow-x: auto; margin: 10px -16px; padding: 0 16px 4px; scrollbar-width: none; }
.filtros button { flex: none; min-height: 44px; padding: 4px 14px; border-radius: 99px; background: var(--hoja); font-size: .9rem; font-weight: 500; }
.filtros button[aria-pressed="true"] { background: var(--tinta); color: var(--niebla); }
.fichas { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fichas button { width: 100%; display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; text-align: left; background: var(--hoja); border-radius: 18px; padding: 8px; min-height: 72px; }
.fichas img, .fichas .sinfoto { width: 76px; height: 56px; object-fit: cover; border-radius: 12px; background: linear-gradient(160deg, #27377f, #e2507c); }
.fichas b { display: block; font-weight: 700; line-height: 1.2; }
.fichas small { color: var(--tinta2); font-size: .82rem; }

/* Consejos */
details { background: var(--hoja); border-radius: 18px; margin-bottom: 8px; }
summary { padding: 16px; font: 700 1rem "Red Hat Display"; min-height: 52px; cursor: pointer; }
details > div { padding: 0 16px 14px; }
details p, details li { margin: 0 0 8px; max-width: 62ch; }
details ul { padding-left: 20px; margin: 0; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 7px 4px; border-bottom: 1px solid var(--linea); vertical-align: top; }
.botones { display: grid; gap: 8px; }

/* Entrada */
.entrar { max-width: 340px; margin: 14vh auto 0; display: grid; gap: 12px; }
.entrar h1 { font-size: 1.7rem; font-weight: 900; }
.entrar label { font-weight: 700; }
.entrar input { text-align: center; font-size: 1.3rem; letter-spacing: .1em; }
.error { color: var(--rosa); font-weight: 700; }

.aviso { position: fixed; left: 16px; right: 16px; bottom: calc(var(--abajo) + 10px); z-index: 6; margin: 0 auto; max-width: 440px;
  background: var(--tinta); color: var(--niebla); padding: 12px 16px; border-radius: 16px; text-align: center; font-weight: 500; }

@media (prefers-reduced-motion: no-preference) {
  .bt, .chips button, .dias button { transition: scale .12s var(--sale), background-color .15s ease; }
  dialog[open] { animation: sube .28s var(--sale); }
  dialog[open]::backdrop { animation: aparece .2s ease; }
  .ahora.entra { animation: entra .32s var(--sale); }
  .aviso:not([hidden]) { animation: sube .22s var(--sale); }
  @keyframes sube { from { translate: 0 40px; opacity: 0; } }
  @keyframes aparece { from { opacity: 0; } }
  @keyframes entra { from { translate: 0 14px; opacity: 0; } }
}


/* ============ Cielo vivo: crepúsculo de noche, amanecer de día, lluvia cuando llueve ============ */
:root {
  --cielo: linear-gradient(180deg, #cfdcfb 0%, #e6dcf6 38%, #fbdfe6 70%, #ffe9cf 100%);
  --brillo1: rgb(226 80 124 / .28); --brillo2: rgb(72 110 220 / .26);
  --castillo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 120' preserveAspectRatio='none'%3E%3Cpath fill='%23ffffff' d='M0 120V104h18V88l8-16 8 16v16h22V74l4-6V56l7-18 7 18v12l4 6v30h20V62l5-8V40l8-22 8 22v14l5 8v42h16V50l4-7V26l3-6V10l5-10 5 10v10l3 6v17l4 7v54h16V60l5-8V38l8-22 8 22v14l5 8v44h20V76l4-6V58l7-18 7 18v12l4 6v28h22V90l8-16 8 16v14h18V96l6-12 6 12v8h50v16z'/%3E%3C/svg%3E"); --castillo-op: .55;
  --hoja: rgb(255 255 255 / .78); --borde: rgb(255 255 255 / .9); --niebla: rgb(27 32 80 / .07);
  --sombra: 0 18px 40px -22px rgb(60 50 130 / .55);
}
@media (prefers-color-scheme: dark) {
  :root {
    --cielo: linear-gradient(180deg, #080a26 0%, #15124a 34%, #3a1a66 66%, #7b2a6e 100%);
    --brillo1: rgb(226 80 124 / .42); --brillo2: rgb(70 96 230 / .40);
    --castillo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 120' preserveAspectRatio='none'%3E%3Cpath fill='%230a0b26' d='M0 120V104h18V88l8-16 8 16v16h22V74l4-6V56l7-18 7 18v12l4 6v30h20V62l5-8V40l8-22 8 22v14l5 8v42h16V50l4-7V26l3-6V10l5-10 5 10v10l3 6v17l4 7v54h16V60l5-8V38l8-22 8 22v14l5 8v44h20V76l4-6V58l7-18 7 18v12l4 6v28h22V90l8-16 8 16v14h18V96l6-12 6 12v8h50v16z'/%3E%3C/svg%3E"); --castillo-op: .9;
    --hoja: rgb(26 28 78 / .66); --borde: rgb(255 255 255 / .11); --niebla: rgb(255 255 255 / .09);
    --sombra: 0 22px 50px -24px rgb(0 0 0 / .8);
  }
}
body { background: #0b0c2b; }
@media (prefers-color-scheme: light) { body { background: #dfe6fb; } }
.fondo { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--cielo); }
.fondo i { position: absolute; display: block; }
.fondo i:nth-child(1), .fondo i:nth-child(2) { width: 90vmax; height: 90vmax; border-radius: 50%; filter: blur(60px); }
.fondo i:nth-child(1) { background: radial-gradient(circle, var(--brillo1), transparent 62%); left: -35vmax; bottom: -30vmax; }
.fondo i:nth-child(2) { background: radial-gradient(circle, var(--brillo2), transparent 62%); right: -40vmax; top: -35vmax; }
.fondo i:nth-child(3) { inset: 0; opacity: 0; }
@media (prefers-color-scheme: dark) {
  .fondo i:nth-child(3) { opacity: .9; background-image:
    radial-gradient(1.4px 1.4px at 12% 9%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 27% 22%, #ffe9b0 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 44% 6%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 58% 17%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 71% 11%, #ffd6e4 50%, transparent 51%), radial-gradient(1px 1px at 86% 26%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 93% 7%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 35% 34%, #fff 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 66% 38%, #ffe9b0 50%, transparent 51%), radial-gradient(1px 1px at 8% 41%, #fff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 79% 47%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 21% 55%, #ffd6e4 50%, transparent 51%); }
}
.fondo i:nth-child(4) { left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); height: 22vh; max-height: 190px;
  background: var(--castillo) center bottom / 100% 100% no-repeat; opacity: var(--castillo-op); }
/* Lluvia: el cielo se enfría y caen trazos finos */
body.llueve { --cielo: linear-gradient(180deg, #c3cfe6 0%, #cdd6ea 45%, #dfe3ee 100%); --brillo1: rgb(72 110 220 / .22); }
@media (prefers-color-scheme: dark) { body.llueve { --cielo: linear-gradient(180deg, #070a1f 0%, #101a40 40%, #1c2a5c 75%, #2b3a70 100%); --brillo1: rgb(70 96 230 / .35); } }
body.llueve .fondo i:nth-child(3) { opacity: .5; background-image: repeating-linear-gradient(104deg, transparent 0 11px, rgb(200 220 255 / .5) 11px 12px, transparent 12px 26px); background-size: 52px 140px; }
@media (prefers-reduced-motion: no-preference) {
  .fondo i:nth-child(1) { animation: deriva1 26s ease-in-out infinite alternate; }
  .fondo i:nth-child(2) { animation: deriva2 32s ease-in-out infinite alternate; }
  .fondo i:nth-child(3) { animation: titila 5s ease-in-out infinite alternate; }
  body.llueve .fondo i:nth-child(3) { animation: cae .7s linear infinite; }
  @keyframes deriva1 { to { translate: 22vmax -18vmax; scale: 1.15; } }
  @keyframes deriva2 { to { translate: -20vmax 16vmax; scale: .9; } }
  @keyframes titila { from { opacity: .45; } to { opacity: .95; } }
  @keyframes cae { to { background-position: -35px 140px; } }
}

/* Tarjetas de cristal sobre el cielo */
.ahora, .banda:not(.moja), .dia, .fichas button, .conviene button, details, .fondo-tarjeta, .opdia button, .cuaderno button, .uso, .modo, .pausas button, .filtros button, .fondo, .ejemplo[aria-pressed="true"] { border: 1px solid var(--borde); }
.fondo { border: 0; }
.ahora, .banda { box-shadow: var(--sombra); }
.ahora, .banda:not(.moja), .pestanas, dialog, .aviso, .sinc { -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
.fondo-pildora, .fondo { }
button.fondo { background: var(--hoja); border: 1px solid var(--borde); position: static; inset: auto; z-index: auto; overflow: visible; }
.pestanas { background: var(--hoja); border-top: 1px solid var(--borde); }
dialog { background: var(--hoja); }
@media (prefers-color-scheme: dark) { dialog { background: rgb(22 24 68 / .92); } }
@media (prefers-color-scheme: light) { dialog { background: rgb(255 255 255 / .94); } }
.sup h1 { text-shadow: 0 2px 18px rgb(226 80 124 / .35); }
.dias button[aria-pressed="true"] { background: linear-gradient(135deg, #e2507c, #7a4bd6); color: #ffe3ec; box-shadow: 0 10px 22px -10px rgb(226 80 124 / .9); }
.dias button[aria-pressed="true"] b { color: #fff; }
.modo button[aria-pressed="true"] { background: linear-gradient(135deg, #2c4aa6, #7a4bd6); color: #fff; }
.ahora { box-shadow: var(--sombra), 0 0 0 1px rgb(240 178 62 / .35), 0 0 46px -12px rgb(226 80 124 / .55); }
.bt.si { background: linear-gradient(135deg, #1f8a66, #28a57c); box-shadow: 0 12px 24px -12px rgb(40 165 124 / .95); }
.tesela { box-shadow: 0 14px 30px -18px rgb(0 0 0 / .7); }
.tesela.actual { outline: 0; box-shadow: 0 0 0 3px var(--farol), 0 0 34px -4px rgb(240 178 62 / .8); }
.banda.moja { background: linear-gradient(135deg, #2f5fc4, #4a3fb5); }
.notas { border: 1px solid rgb(240 178 62 / .35); }
.pestanas button[aria-current="page"] { text-shadow: 0 0 16px rgb(226 80 124 / .7); }

/* Destello al dar algo por hecho */
.chispas { position: fixed; z-index: 30; width: 0; height: 0; pointer-events: none; }
.chispas i { position: absolute; font-style: normal; color: #ffd166; text-shadow: 0 0 10px rgb(255 209 102 / .9); animation: salta .95s cubic-bezier(.16, 1, .3, 1) forwards; }
.chispas i:nth-child(3n) { color: #ff8fb0; text-shadow: 0 0 10px rgb(255 143 176 / .9); }
.chispas i:nth-child(4n) { color: #fff; }
@keyframes salta { 0% { translate: 0 0; opacity: 1; scale: .4; } 60% { opacity: 1; } 100% { translate: var(--dx) var(--dy); opacity: 0; scale: 1.2; rotate: 140deg; } }

button.cielo { border: 1px solid var(--borde); }


/* ---- Pulido tras verlo en el móvil ---- */
:root { --contra: #fff; --castillo-op: .4; }
@media (prefers-color-scheme: dark) { :root { --contra: #10132c; --castillo-op: .5; } }
.fondo i:nth-child(4) { height: 17vh; max-height: 150px; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.aviso, .sinc, .galeria span button, .chips button:active { color: var(--contra); }
.filtros button[aria-pressed="true"] { background: linear-gradient(135deg, #2c4aa6, #7a4bd6); color: #fff; font-weight: 700; border-color: transparent; }
.tesela img { background: #0b0c2b; }
.linea::before { background: var(--borde); }
.linea i { background: var(--contra); }

dialog h2:focus { outline: none; }
.pausas .saltada { font-style: italic; color: var(--tinta2); opacity: .75; }
.eleccion { display: grid; gap: 6px; margin-top: 10px; max-height: 50vh; overflow-y: auto; }
.eleccion .op { grid-template-columns: 1fr; min-height: 52px; padding: 8px 0; }
.menor-et { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: .85rem; color: var(--tinta2); }
.menor-et .campo { flex: 1; }
