@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 400; font-display: swap; src: url('/fonts/atkinson-hyperlegible-400.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 700; font-display: swap; src: url('/fonts/atkinson-hyperlegible-700.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url('/fonts/barlow-condensed-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url('/fonts/barlow-condensed-700.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --bg: #f1f4f3; --surface: #ffffff; --surface-2: #e6ecea; --line: #d0d9d6; --line-2: #e2e8e6;
  --ink: #142020; --ink-2: #485856; --ink-3: #778784;
  --accent: #0b7a84; --accent-ink: #ffffff; --accent-soft: #d2ebed;
  --warn: #ad4e18; --warn-soft: #f7e4d6;
  --mal: #c13a2c; --mal-soft: #f9e1dd;
  --ciudad: #6b4fa0; --ciudad-soft: #ece6f6;
  --campo: #3e7d3a; --campo-soft: #e2efdf;
  --fer: #a1304d;
  --shadow: 0 1px 2px rgba(20, 40, 40, 0.06), 0 4px 14px rgba(20, 40, 40, 0.07);
  --c-glaciar: #2f6fb3; --c-chilco: #b03a7a; --c-baker: #0b7a84; --c-lenga: #a86c14; --c-calafate: #6b4fa0; --c-coigue: #3e7d3a; --c-notro: #c8402f; --c-ceniza: #6e7775;
  --f-display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
  --f-body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tabs-h: 62px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0e1315; --surface: #161d20; --surface-2: #1f292c; --line: #2c393d; --line-2: #222c30;
    --ink: #e3ebea; --ink-2: #a8b6b4; --ink-3: #72827f;
    --accent: #3bb3bd; --accent-ink: #04282b; --accent-soft: #12373b;
    --warn: #e8894f; --warn-soft: #3a2417;
    --mal: #ff7b6b; --mal-soft: #3d1c18;
    --ciudad: #b29bea; --ciudad-soft: #2b2340;
    --campo: #7fbf78; --campo-soft: #1d2f1c;
    --fer: #e27a94;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px rgba(0, 0, 0, 0.25);
    --c-glaciar: #6fa6e8; --c-chilco: #e278b4; --c-baker: #3bb3bd; --c-lenga: #e0a24a; --c-calafate: #a88ce2; --c-coigue: #76b96e; --c-notro: #f07462; --c-ceniza: #9aa5a3;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { color: var(--ink); font: 16px/1.45 var(--f-body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }

/* ── Cabecera y captura ─────────────────────────────── */
.top { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 8px; }
.top-in, .captura, .cap-prev, main { max-width: 860px; margin-inline: auto; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.marca { font-family: var(--f-display); font-weight: 700; font-size: 22px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.sync { font-size: 12.5px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; }
.sync::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--campo); }
.sync.pend::before { background: var(--warn); }
.sync.off::before { background: var(--ink-3); }
.captura { display: flex; gap: 6px; }
.captura input { flex: 1; min-width: 0; font-size: 16px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
.captura input::placeholder { color: var(--ink-3); }
.captura input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ico { width: 46px; flex: none; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); display: grid; place-items: center; color: var(--ink-2); padding: 0; }
.ico svg { width: 20px; height: 20px; }
.ico.on { background: var(--mal); border-color: var(--mal); color: #fff; animation: latido 1.2s ease-in-out infinite; }
@keyframes latido { 50% { opacity: 0.65; } }
@media (prefers-reduced-motion: reduce) { .ico.on { animation: none; } }
.cap-ok { border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 0 14px; }
.cap-prev { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 8px; font-size: 13.5px; }
.cap-t { font-weight: 700; margin-right: 2px; }

/* ── Estructura ─────────────────────────────────────── */
main { padding: 12px 16px calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px) + 32px); display: flex; flex-direction: column; gap: 16px; }
.vcab { display: flex; align-items: center; gap: 12px; padding-top: 4px; }
.vcab h2 { font-family: var(--f-display); font-size: 34px; font-weight: 700; line-height: 1; }
.vcab > div { flex: 1; min-width: 0; }
.sub { color: var(--ink-2); font-size: 14px; margin-top: 3px; }
.sub.pie { margin-top: 8px; }
.h3 { font-family: var(--f-display); font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.h4 { font-family: var(--f-display); font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin: 14px 0 2px; display: flex; gap: 8px; align-items: center; }
.cnt { font-family: var(--f-body); font-size: 13px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; text-transform: none; }
.card { background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; padding: 14px; }
.sec { display: flex; flex-direction: column; gap: 8px; }
.vacio { color: var(--ink-3); font-size: 14px; padding: 4px 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; white-space: nowrap; line-height: 1.6; }
.chip.fuerte { color: var(--ink); }
.chip.def { background: transparent; border: 1px dashed var(--line); color: var(--ink-3); white-space: normal; }
.chip.imp { background: var(--warn-soft); color: var(--warn); }
.chip.ciudad { background: var(--ciudad-soft); color: var(--ciudad); font-weight: 700; }
.chip.campo { background: var(--campo-soft); color: var(--campo); font-weight: 700; }
.chip.fer { background: transparent; color: var(--fer); padding-inline: 0; font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cc, var(--ink-3)); display: inline-block; flex: none; }
.dot.grande { width: 14px; height: 14px; }
.btn { border: 1px solid var(--line); border-radius: 11px; padding: 10px 14px; font-weight: 700; background: var(--surface); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; }
.btn.primario { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.peligro { color: var(--mal); border-color: color-mix(in srgb, var(--mal) 40%, transparent); background: transparent; }
.btn.armado, .mini.armado { background: var(--mal); border-color: var(--mal); color: #fff; }
.mini { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 5px 10px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; text-decoration: none; min-height: 34px; display: inline-flex; align-items: center; }
.acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.add { border: 0; background: none; color: var(--accent); font-weight: 700; padding: 8px 0 0; text-align: left; font-size: 15px; }
.nav-b { flex: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; font-size: 24px; line-height: 1; color: var(--ink-2); text-decoration: none; }
.links { display: flex; flex-direction: column; }
.links a { padding: 10px 0; border-top: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.links a:first-child { border-top: 0; }
.info { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: 14px; color: var(--ink-2); }

/* ── Filas ──────────────────────────────────────────── */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: flex-start; gap: 11px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.row:first-child { border-top: 0; }
.ck { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--ink-3); background: transparent; display: grid; place-items: center; padding: 0; margin-top: -1px; }
.ck.redondo { border-radius: 50%; }
.ck[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); }
.ck[aria-pressed='true']::after { content: ''; width: 11px; height: 6px; border-left: 2.5px solid var(--accent-ink); border-bottom: 2.5px solid var(--accent-ink); transform: translateY(-1px) rotate(-45deg); }
.r-main { flex: 1; min-width: 0; }
.r-t { display: block; width: 100%; background: none; border: 0; padding: 0; text-align: left; font-weight: 700; overflow-wrap: anywhere; color: var(--ink); }
.row.done .r-t { text-decoration: line-through; color: var(--ink-3); font-weight: 400; }
.r-m { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 13.5px; color: var(--ink-3); margin-top: 2px; }
.hora { font-family: var(--f-display); font-weight: 600; font-size: 16px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.imp { color: var(--warn); font-weight: 700; }
.venc { color: var(--warn); }
.rep { color: var(--ink-3); }
.fr { display: inline-flex; align-items: center; gap: 5px; }
.nota { font-style: italic; }
.enl { font-weight: 700; text-decoration: none; }
.r-acts { display: flex; gap: 4px; flex: none; align-self: center; flex-wrap: wrap; justify-content: flex-end; }
.row.pausada .r-t { color: var(--ink-3); }
.pasos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.paso { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 4px 11px; font-size: 13.5px; color: var(--ink-2); min-height: 32px; }
.paso.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ink) 40%, transparent); }
.row.nec .r-t { font-weight: 700; }
.row.nec.urg .r-t { color: var(--mal); }

/* ── Día ────────────────────────────────────────────── */
.dcab { display: flex; align-items: center; gap: 10px; }
.dcab-t { flex: 1; display: flex; align-items: center; gap: 12px; min-width: 0; }
.dnum { font-family: var(--f-display); font-weight: 700; font-size: 68px; line-height: 0.85; font-variant-numeric: tabular-nums; }
.dw { font-family: var(--f-display); font-weight: 600; font-size: 25px; line-height: 1.05; text-transform: capitalize; }
.dw .rel { color: var(--accent); }
.dm { color: var(--ink-2); font-size: 14px; }
.dchips { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; }
.prog { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.bar { flex: 1; height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.volver { align-self: flex-start; font-weight: 700; text-decoration: none; }
.card.preg { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.preg-r { padding-top: 12px; }
.preg-n { font-weight: 700; margin-bottom: 6px; }
.visto { font-weight: 400; font-size: 13px; color: var(--ink-3); }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 7px 12px; font-size: 14.5px; font-weight: 700; color: var(--ink-2); min-height: 40px; }
.opt.sel { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.opt.alerta.sel { background: var(--warn); border-color: var(--warn); color: #fff; }
.card.salida { border: 1.5px solid color-mix(in srgb, var(--ciudad) 45%, transparent); }
.card.salida.hecha { opacity: 0.85; }
.sal-cab { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.veh { margin-top: 10px; font-size: 14px; border-radius: 10px; padding: 8px 10px; background: var(--surface-2); color: var(--ink-2); }
.veh.obs { background: var(--warn-soft); color: var(--warn); }
.veh.mal { background: var(--mal-soft); color: var(--mal); }
.parada { margin-top: 10px; }
.par-n { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 700; font-size: 18px; }
.num { width: 24px; height: 24px; border-radius: 50%; background: var(--ciudad); color: #fff; display: inline-grid; place-items: center; font-family: var(--f-display); font-size: 14px; flex: none; }
.card.atr, .card.sindia { background: var(--warn-soft); border-color: transparent; }
.card.atr .h3, .card.sindia .h3 { color: var(--warn); }
.card.atr .row, .card.sindia .row { border-top-color: color-mix(in srgb, var(--warn) 18%, transparent); }
.atr-c { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--warn) 18%, transparent); flex-wrap: wrap; }
.aviso-c { border-color: color-mix(in srgb, var(--ciudad) 45%, transparent); }

.bloques { display: flex; flex-direction: column; gap: 6px; }
.bloque { padding: 10px 14px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); }
.bloque.libre { background: transparent; border-style: dashed; padding-block: 6px; }
.bloque.ahora { border: 2px solid var(--accent); }
.bloque.pasado:not(.ahora) { opacity: 0.72; }
.bl-cab { display: flex; align-items: baseline; gap: 10px; }
.bl-n { font-family: var(--f-display); font-weight: 700; font-size: 20px; }
.bl-h { font-family: var(--f-display); font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ahora-t { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 1px 8px; align-self: center; }
.add-b { margin-left: auto; align-self: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--accent); font-size: 22px; line-height: 1; padding: 0; }
.bl-nota { font-size: 13.5px; color: var(--ink-3); }

.corr { margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); }
.corr-cab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.corr-n { font-weight: 700; color: var(--ink); }
.corr-f { font-size: 13.5px; color: var(--ink-2); }
.corr-cab .cnt { margin-left: auto; }
.grupo { border-top: 1px solid var(--line-2); margin-top: 6px; }
.grupo summary { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0 4px; cursor: pointer; list-style: none; }
.grupo summary::-webkit-details-marker { display: none; }
.grupo summary::before { content: '▸'; color: var(--ink-3); margin-right: 6px; }
.grupo[open] summary::before { content: '▾'; }
.g-n { font-weight: 700; flex: 1; }

.prox { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.prox-d, .sd { display: block; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 12px; color: var(--ink); text-decoration: none; }
.prox-h, .sd-h { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.prox-h b { color: var(--accent); }
.prox-d ul, .sd ul { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.prox-d li, .sd li { display: flex; gap: 6px; align-items: baseline; }
.prox-d li .dot, .sd li .dot { transform: translateY(-1px); }
li.done { color: var(--ink-3); text-decoration: line-through; }
li.pc { font-weight: 700; color: var(--ink-2); }
li.mas { color: var(--ink-3); }
.prox-r { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }

/* ── Semana ─────────────────────────────────────────── */
.semana { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .semana { grid-template-columns: repeat(2, 1fr); } }
.sd.hoy { border: 2px solid var(--accent); }
.sd.pasado { opacity: 0.75; }
.sd-d { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
.sd-n { font-family: var(--f-display); font-weight: 700; font-size: 28px; line-height: 1; }
.sd.hoy .sd-n, .sd.hoy .sd-d { color: var(--accent); }
.fer-t { color: var(--fer); font-size: 13px; font-weight: 700; }

/* ── Ciudad, estados, más ───────────────────────────── */
.card.sug p { margin-top: 6px; }
.planear { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.planear label { font-size: 14px; color: var(--ink-2); }
.planear input { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; background: var(--bg); min-height: 42px; }
.ests { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.est { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.est.viejo { border-style: dashed; }
.est-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.est-n { border: 0; background: none; padding: 0; font-weight: 700; font-size: 16px; text-align: left; color: var(--ink); }
.est-nec { font-size: 13.5px; color: var(--ink-3); }
.est-nec.on { color: var(--warn); font-weight: 700; }
.est-nota { font-size: 14px; color: var(--ink-2); white-space: pre-line; }
.veh-x { border-top: 1px solid var(--line-2); padding-top: 4px; }
.bit-mini { list-style: none; padding: 0; margin: 4px 0 0; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.fecha { font-family: var(--f-display); font-weight: 600; color: var(--ink-3); margin-right: 4px; }
.menu { display: flex; flex-direction: column; gap: 8px; }
.menu a { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 2px; }
.menu a span { color: var(--ink-2); font-size: 14px; }
.prot { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; }
.prot-cab { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.prot-f { font-size: 13.5px; color: var(--ink-3); margin-top: 4px; }
.bit { background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; }
.bit p { white-space: pre-line; }
.bit-f { display: flex; flex-direction: column; gap: 10px; }
.aj-r { display: flex; align-items: center; gap: 6px; padding: 6px 0; flex-wrap: wrap; }
.aj-r input, .aj-r select { border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; background: var(--bg); min-width: 0; font-size: 15px; min-height: 40px; }
.aj-r input:first-child { flex: 1 1 140px; }
.aj-r input[type='time'] { flex: 0 0 auto; }
.aj-r .ancho { flex: 2 1 160px; }

/* ── Formularios y diálogo ──────────────────────────── */
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; border: 0; padding: 0; margin: 0; }
.fld > span, .fld > legend { font-size: 12.5px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; padding: 0; }
.fld input, .fld select, .fld textarea { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px; font-size: 16px; width: 100%; min-width: 0; }
.fld textarea { resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fila2 { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.fila3 { display: grid; gap: 8px; grid-template-columns: 1.3fr 1fr 1fr; align-items: end; }
@media (max-width: 420px) { .fila3 { grid-template-columns: 1fr 1fr; } .fila3 > :first-child { grid-column: 1 / -1; } }
.seg { display: flex; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 2px; }
.seg label { flex: 1; text-align: center; padding: 8px; border-radius: 9px; font-weight: 700; font-size: 14.5px; color: var(--ink-2); cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.chk-l { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.chk-l input { width: 20px; height: 20px; accent-color: var(--accent); }
.cats, .dias { display: flex; flex-wrap: wrap; gap: 6px; }
.cats label, .dias label { position: relative; cursor: pointer; }
.cats input, .dias input { position: absolute; opacity: 0; pointer-events: none; }
.cats span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; color: var(--ink-2); }
.cats input:checked + span { border-color: var(--cc, var(--ink-2)); background: color-mix(in srgb, var(--cc, var(--ink-3)) 14%, var(--surface)); color: var(--ink); font-weight: 700; }
.dias span { display: grid; place-items: center; width: 44px; height: 38px; border-radius: 10px; border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--ink-2); }
.dias input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cats input:focus-visible + span, .dias input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fase { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; margin: 0; }
.fase legend { font-family: var(--f-display); font-weight: 700; font-size: 16px; padding: 0 4px; }
.nota-f { font-size: 13.5px; color: var(--ink-3); }
.nota-f:empty, .aviso-f:empty { display: none; }
.aviso-f { color: var(--mal); font-size: 14px; }
dialog.sheet { border: 0; padding: 0; border-radius: 18px; background: var(--surface); color: var(--ink); width: min(600px, calc(100% - 24px)); max-height: calc(100% - 24px); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3); }
dialog.sheet::backdrop { background: rgba(8, 18, 20, 0.5); }
@media (max-width: 640px) { dialog.sheet { width: 100%; max-width: 100%; margin-bottom: 0; border-radius: 20px 20px 0 0; max-height: 94%; } }
#dlg-f { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px calc(16px + env(safe-area-inset-bottom, 0px)); }
.dlg-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dlg-cab h2 { font-family: var(--f-display); font-size: 26px; font-weight: 700; }
.dlg-cuerpo { display: flex; flex-direction: column; gap: 12px; }
.x { border: 0; background: var(--surface-2); border-radius: 50%; width: 36px; height: 36px; font-size: 22px; line-height: 1; color: var(--ink-2); flex: none; }
.dlg-pie { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dlg-pie .sp { flex: 1; }

/* ── Acceso ─────────────────────────────────────────── */
#acceso { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.acc { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.acc h1 { font-family: var(--f-display); font-size: 44px; letter-spacing: 0.06em; text-transform: uppercase; }
.acc p { color: var(--ink-2); }

/* ── Pestañas y aviso flotante ──────────────────────── */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); display: flex; justify-content: center; padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabs-in { display: flex; width: 100%; max-width: 640px; }
.tab { flex: 1; height: var(--tabs-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--ink-3); font-size: 12px; font-weight: 700; }
.tab svg { width: 23px; height: 23px; }
.tab[aria-current='page'] { color: var(--accent); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px) + 14px); transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--bg); border-radius: 12px; padding: 11px 14px; font-size: 14.5px; display: flex; gap: 14px; align-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); width: max-content; max-width: calc(100% - 32px); }
.toast button { border: 0; background: none; color: var(--accent-soft); font-weight: 700; padding: 0; }
@media (prefers-color-scheme: dark) { .toast button { color: var(--accent-ink); } }
