/*
 * Estilo «juguetón» (E): fondo liso del color que elija la persona (blanco por defecto), trazo oscuro y colores planos.
 * Se carga el último y solo sobrescribe: el color de fondo llega en `--page-bg` (ver ThemeColor y base.html.twig).
 */
:root {
    --ink: #2b2a33; --hair: rgba(43, 42, 51, .18);
    --bg: var(--page-bg, #fff); --fg: var(--ink); --muted: #6f6a55;
    --accent: var(--ink); --accent-fg: #fff;
    --c-blue: #8fd3ff; --c-pink: #ff9fb8; --c-green: #b7e4c7; --c-yellow: #ffe08a; --c-orange: #ffc48a; --c-lilac: #c9b8ff;
    --f: var(--c-blue); --fD: var(--ink); --d: var(--c-orange); --dD: var(--ink); --s: var(--c-lilac); --sD: var(--ink); --g: var(--c-green); --gD: var(--ink);
    --blue: #fff; --dotF: var(--c-blue); --dotD: var(--c-orange); --dotS: var(--c-lilac); --dotG: var(--c-green);
}
body { background-color: var(--page-bg, #fff); background-image: none; color: var(--ink); }
h1, h2, h3, .large-title { font-weight: 600; }
a { color: var(--ink); }

/* Barras */
.topbar { background: var(--page-bg, #fff); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; border-bottom: 1.5px solid var(--ink); }
.topbar .topnav a:hover { background: rgba(43, 42, 51, .08); color: var(--ink); }
.topbar .topnav a.is-current { background: var(--ink); color: var(--page-bg, #fff); }
.menu summary { background: #fff; border: 1.5px solid var(--ink); box-shadow: none; }
.tabbar { background: var(--page-bg, #fff); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; border-top: 1.5px solid var(--ink); }
.tabbar a { color: var(--muted); }
.tabbar a.is-current { color: var(--ink); }

/* Botones */
.btn { background: var(--ink); border: 2px solid var(--ink); color: var(--page-bg, #fff); border-radius: .9rem; font-weight: 600; }
.btn-secondary { background: #fff; color: var(--ink); }
.btn-danger { background: var(--danger); border-color: var(--ink); color: #fff; }
.opt { border: 2px solid var(--ink); border-radius: .9rem; }
.opt-f { background: var(--c-blue); } .opt-d { background: var(--c-orange); } .opt-s { background: var(--c-lilac); } .opt-g { background: var(--c-green); }
.opt.is-next { box-shadow: 0 0 0 3px var(--page-bg, #fff), 0 0 0 5px var(--ink); }
.link-btn { color: var(--ink); }

/* Campos */
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea, .sheet-field select, .sheet-field input,
.aula-search, .name-ask input, .consult-add textarea, .consult-done textarea, .aulas-kid select, .grid-2 input[type=number] { border: 2px solid var(--ink); border-radius: .8rem; background: #fff; }
.aula-search { border-radius: 2rem; }

/* Avatares: color plano con trazo; las formas alternan entre círculo y cuadrado redondeado */
.avatar { border: 2px solid var(--ink); color: var(--ink); background-image: none; font-weight: 600; }
.tone-0 { background: var(--c-blue); } .tone-1 { background: var(--c-pink); border-radius: 30%; }
.tone-2 { background: var(--c-green); } .tone-3 { background: var(--c-yellow); border-radius: 30%; } .tone-4 { background: var(--c-orange); }

/* Lista de niños: una tarjeta con trazo por niño (la misma en familia, aula y Apuntar) */
.baby-list { border-top: 0; margin-top: .8rem; column-gap: 1rem; }
.baby-list .kid, .kid { background: #fff; border: 2px solid var(--ink); border-radius: 14px; margin: 0 0 .8rem; padding: 0 .3rem 0 .2rem; }
.kid.is-picked { background: #fff3c4; }
.kid-pick .avatar { width: 2.8rem; height: 2.8rem; }
.kid.is-picked .kid-pick .avatar { background: var(--ink); }
.kid-open:after { border-color: var(--ink); }
.kid-name { font-weight: 600; }
.kid-age { color: var(--muted); }
.st { color: var(--muted); }
.st-s, .st-warn { color: var(--ink); font-weight: 500; border: 1px solid var(--ink); border-radius: 2rem; padding: 0 .55rem; }
.st-s { background: var(--c-lilac); } .st-warn { background: var(--c-orange); }
.is-selecting .kid-open:after { border-color: var(--ink); }
.is-selecting .kid.is-picked .kid-open:after { border-color: var(--ink); background: var(--ink) radial-gradient(circle, #fff 0 .22rem, transparent .25rem); }
.pill { background: var(--c-lilac); color: var(--ink); border: 1px solid var(--ink); }
.add-card { color: var(--ink); font-weight: 600; }

/* Filtros, pestañas y barra de elegidos */
.aula-chip { background: transparent; border: 1.5px solid var(--ink); color: var(--ink); }
.aula-chip.is-on { background: var(--ink); color: var(--page-bg, #fff); }
.aula-select { border: 2px solid var(--ink); color: var(--ink); background: #fff; }
.aula-select[aria-pressed=true] { background: var(--ink); color: var(--page-bg, #fff); }
.kd-tabs, .seg { background: #fff; border: 2px solid var(--ink); }
.kd-tabs button.is-on, .seg input:checked + span { background: var(--ink); color: var(--page-bg, #fff); box-shadow: none; }
.pickbar { background: var(--ink); }
.pickbar-go { background: var(--c-yellow); color: var(--ink); }
.kd-write { background: var(--ink); color: var(--page-bg, #fff); }
.health-sym span { border: 1.5px solid var(--ink); background: transparent; color: var(--ink); }
.health-sym input:checked + span { background: var(--c-green); color: var(--ink); }
.kd-ev, .consult-note, .kd-row, .aulas-kid, .aula-box, .card, .ev, .row-link, .more, .vac, .aula-list { border-color: var(--hair); }

/* Hojas inferiores */
dialog.sheet { background: var(--page-bg, #fff); border-top: 2px solid var(--ink); }
.sheet-handle { background: var(--ink); }
.sheet-close { background: #fff; border: 2px solid var(--ink); color: var(--ink); }
.group-label { color: var(--muted); }

/* Selector de color de fondo (Mi cuenta) */
.theme-swatches { display: flex; flex-wrap: wrap; gap: .6rem; margin: .8rem 0; }
.swatch { width: 3rem; height: 3rem; border-radius: 50%; border: 2px solid var(--ink); background: var(--sw); cursor: pointer; padding: 0; position: relative; }
.swatch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.swatch.is-on { box-shadow: 0 0 0 3px var(--page-bg, #fff), 0 0 0 5px var(--ink); }
.theme-custom { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-bottom: 1rem; }
.theme-custom label { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); }
.theme-custom input[type=color] { width: 3rem; height: 2.4rem; padding: 0; border: 2px solid var(--ink); border-radius: .6rem; background: #fff; cursor: pointer; }
.theme-custom .btn { margin: 0; padding: .5rem 1rem; }

/* Resumen mínimo de la pantalla de familia */
.kid-glance { display: grid; width: 100%; box-sizing: border-box; grid-template-columns: 2.1rem minmax(0, 1fr) 4.9rem; align-items: center; column-gap: .5rem; row-gap: .15rem; font-size: .75rem; color: var(--ink); margin-top: auto; padding-top: .45rem; }
.kg-lb { font-size: .6rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.kg-end { font-weight: 800; }
.kg-bar { position: relative; display: block; height: .55rem; border: 2px solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; }
.kg-bar i { position: absolute; inset: 0 auto 0 0; background: var(--c-blue); border-right: 2px solid var(--ink); }
.kg-bar.is-late i { background: var(--c-orange); }
.kg-sub { grid-column: 2 / 4; display: flex; justify-content: space-between; gap: .5rem; font-size: .68rem; color: var(--muted); margin-bottom: .2rem; }
.kg-tl { position: relative; display: block; height: .9rem; }
.kg-tl:before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--ink); }
.kg-tl-past { position: absolute; left: 0; top: 50%; height: .35rem; margin-top: -.175rem; background: var(--c-blue); border: 2px solid var(--ink); border-radius: 99px; box-sizing: border-box; }
.kg-dot { position: absolute; top: 50%; width: .7rem; height: .7rem; margin: -.35rem 0 0 -.35rem; border-radius: 50%; border: 2px solid var(--ink); box-sizing: border-box; }
.kg-pee.kg-dot { background: #ffe066; }
.kg-poo.kg-dot { background: #b98b5e; }
.kg-now { position: absolute; top: -.05rem; bottom: -.05rem; border-left: 2px solid #b3261e; }
.kg-counts { display: flex; gap: .3rem; }
.kg-n { display: inline-flex; align-items: center; gap: .25rem; padding: 0 .4rem 0 .3rem; border: 2px solid var(--ink); border-radius: 99px; font-weight: 700; white-space: nowrap; }
.kg-n b { font-weight: 800; }
.kg-sw { width: .65rem; height: .65rem; border-radius: 50%; border: 2px solid var(--ink); box-sizing: border-box; }
.kg-n.kg-pee .kg-sw { background: #ffe066; }
.kg-n.kg-poo .kg-sw { background: #b98b5e; }
.kg-late { font-weight: 700; color: #b3261e; }
.kg-warn { font-weight: 700; color: #b3261e; }
.kid-sleep { font-size: 1.15rem; line-height: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Aviso de toma en curso: fijo arriba, bajo la barra, en todas las pantallas */
.top-sticky { position: sticky; top: 0; z-index: 45; }
.top-sticky .topbar { position: static; }
.feed-banner { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; padding: .55rem 1rem; background: var(--c-yellow); color: var(--ink); border-bottom: 2px solid var(--ink); }
.feed-banner + .feed-banner { border-top: 0; }
.feed-banner-text { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; font-size: .95rem; }
.feed-since { color: var(--ink); opacity: .75; }
.feed-dot { width: .65rem; height: .65rem; border-radius: 50%; background: var(--ink); animation: feed-pulse 1.6s ease-in-out infinite; }
@keyframes feed-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .feed-dot { animation: none; } }
.feed-banner .timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.feed-banner-btn { padding: .35rem 1rem; border: 2px solid var(--ink); border-radius: 2rem; background: var(--ink); color: var(--page-bg, #fff); font-weight: 600; text-decoration: none; white-space: nowrap; }
.opt-wide { text-decoration: none; }
a.opt { text-decoration: none; color: var(--ink); }
.feed-bottle { margin: .4rem 0 1rem; }
.feed-bottle summary { cursor: pointer; font-weight: 600; padding: .5rem 0; }
.when-fields { margin: 0; }

/* Ficha del bebé con el estilo E */
.hero { background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: .9rem 1rem; }
.hero .avatar { box-shadow: none; }
.hero-name p, .hero-name .muted { color: var(--muted); }
.quick { margin: 1rem 0 0; }
.hero-link { border: 1.5px solid var(--ink); background: #fff; color: var(--ink); }
.q .q-c { border: 2px solid var(--ink); }
.q-f .q-c { background: var(--c-blue); } .q-d .q-c { background: var(--c-orange); } .q-s .q-c { background: var(--c-lilac); } .q-g .q-c { background: var(--c-green); }
.q b { color: var(--ink); }
.q small { color: var(--muted); }
.now { background: #fff; border: 2px solid var(--ink); border-radius: 14px; box-shadow: none; color: var(--ink); }
.now-live { background: var(--c-blue); }
.now-sleep { background: var(--c-lilac); }
.now-empty { background: #fff; }
.now .k, .now .nx { color: var(--ink); }
.now .hint { color: var(--muted); }
.pill-btn { background: var(--ink); color: var(--page-bg, #fff); border: 2px solid var(--ink); border-radius: 2rem; font-weight: 600; text-decoration: none; display: inline-block; padding: .5rem 1.1rem; }
.chip { border-left-width: 4px; }
.chip span { color: var(--muted); }
.day-title .muted { font-weight: 400; }
.ev { border-bottom-color: var(--hair); }
.ev:before { border: 1.5px solid var(--ink); }
.ev-actions a, .ev-actions .link-btn { color: var(--ink); }
.more summary, .row-link { font-weight: 600; }
.q-c { box-shadow: none; }
.opt-ink { background: var(--ink); color: var(--page-bg, #fff); }

/* Tomas: pechos, cantidades rápidas y «ahora mismo» */
.opt-breast { min-height: 7rem; font-size: 1.1rem; position: relative; }
.opt-breast .timer { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.opt-breast.is-running { background: var(--c-blue); box-shadow: 0 0 0 3px var(--page-bg, #fff), 0 0 0 5px var(--ink); }
.opt-breast.is-next { box-shadow: 0 0 0 3px var(--page-bg, #fff), 0 0 0 5px var(--ink); }
.opt-tag { position: absolute; top: -.7rem; padding: .1rem .7rem; border: 2px solid var(--ink); border-radius: 2rem; background: var(--c-yellow); font-size: .72rem; font-weight: 700; }
.ml-quick { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .5rem; }
.ml-quick button { padding: .45rem 1rem; border: 2px solid var(--ink); border-radius: 2rem; background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.ml-quick button:active { background: var(--c-blue); }
.feed-extra { display: flex; gap: 1.2rem; margin: 1rem 0; }
.feed-extra form { margin: 0; }
.when-fields[hidden], [data-when-target="box"][hidden] { display: none; }
.feed-banner { flex-wrap: nowrap; padding: .45rem .8rem; }
.feed-banner-text { min-width: 0; font-size: .9rem; gap: .35rem; }
.feed-banner .timer { font-size: .95rem; }
.feed-banner-btn { padding: .3rem .85rem; font-size: .85rem; flex: none; }

/* Consejos por edad (páginas públicas) */
.advice-lead { max-width: 42rem; margin-top: 0; }
.advice-crumb { margin-top: 1rem; font-size: .9rem; }
.advice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin: 1.2rem 0 1.6rem; }
.advice-card { display: flex; flex-direction: column; gap: .35rem; padding: 1rem; background: #fff; border: 2px solid var(--ink); border-radius: 14px; color: var(--ink); text-decoration: none; }
.advice-card b { font-size: 1.1rem; }
.advice-card span { font-size: .88rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.advice-card small { margin-top: auto; font-weight: 600; }
.advice-card:hover { background: var(--c-yellow); }
.advice-mine { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0; }
.advice-chip { padding: .35rem .9rem; border: 2px solid var(--ink); border-radius: 2rem; background: var(--c-yellow); color: var(--ink); font-weight: 600; text-decoration: none; }
.advice-section[hidden] { display: none; }
.advice-section h2 { margin-top: 1.6rem; }
.advice-list { list-style: none; padding: 0; margin: .4rem 0 1rem; }
.advice-list li { padding: .7rem 0 .7rem 1.1rem; border-top: 1px solid var(--hair); position: relative; line-height: 1.55; }
.advice-list li:before { content: ""; position: absolute; left: 0; top: 1.25rem; width: .45rem; height: .45rem; border-radius: 50%; background: var(--c-blue); border: 1.5px solid var(--ink); }
.advice-pager { display: flex; justify-content: space-between; gap: 1rem; margin: 1.6rem 0 1rem; font-weight: 600; }
.advice-note { margin-top: 1.4rem; font-size: .85rem; }
.advice-cta { margin: 1rem 0 2rem; font-weight: 600; }

/* Contadores con «−» y «+» (minutos y ml), en lugar de campos de texto */
.stepper { background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: .65rem .8rem; margin: 0 0 .6rem; display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.stepper-label { font-weight: 600; }
.step { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.step button { width: 2.5rem; height: 2.5rem; border: 2px solid var(--ink); border-radius: 50%; background: #fff; color: var(--ink); font: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.step button:active { background: var(--c-yellow); }
.step output { min-width: 4.2rem; text-align: center; font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stepper-bottle { background: transparent; border: 0; padding: .3rem 0 0; display: block; }
.stepper-bottle .step { margin-left: 0; justify-content: space-between; background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: .65rem .8rem; }
.stepper-bottle .stepper-label { display: none; }
.feed-bottle summary.dashed-btn { list-style: none; border: 2px dashed var(--ink); border-radius: 14px; padding: .7rem; text-align: center; font-weight: 600; cursor: pointer; background: rgba(255, 255, 255, .6); }
.feed-bottle summary.dashed-btn::-webkit-details-marker { display: none; }
.feed-bottle[open] summary.dashed-btn { background: var(--c-yellow); border-style: solid; }
.feed-bottle { margin: .2rem 0 1rem; }

/* ¿Cuándo fue?: botones rápidos y, con «Otra hora», hora grande */
.when { margin: .6rem 0 1rem; }
.when-title { font-size: .85rem; color: var(--muted); font-weight: 600; margin-bottom: .4rem; }
.when-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.when-chip { padding: .45rem .95rem; border: 2px solid var(--ink); border-radius: 2rem; background: #fff; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; }
.when-chip.is-on { background: var(--c-yellow); font-weight: 700; }
.when-other { margin-top: .6rem; padding: .7rem; background: #fff; border: 2px solid var(--ink); border-radius: 14px; text-align: center; }
.when-other[hidden] { display: none; }
.when-big { font-size: 2.6rem; font-weight: 600; letter-spacing: .02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.when-sub { color: var(--muted); font-size: .85rem; margin-bottom: .4rem; }
.when-other .step { justify-content: center; margin: 0 auto; }
.when-other .step output { min-width: 4rem; font-size: 1rem; }
.when-preview { margin: .5rem 0 0; font-size: .85rem; color: var(--muted); }

/* Medicamentos: lista seleccionable y botón de quitar */
.med-list { display: flex; flex-direction: column; gap: .5rem; margin: .4rem 0 1rem; }
.med-row { display: flex; align-items: stretch; gap: .4rem; }
.med-opt { flex: 1; position: relative; display: block; margin: 0; }
.med-opt input { position: absolute; opacity: 0; pointer-events: none; }
.med-opt span { display: block; padding: .75rem 1rem; border: 2px solid var(--ink); border-radius: 14px; background: #fff; font-weight: 600; cursor: pointer; }
.med-opt input:checked + span { background: var(--c-green); }
.med-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.med-x { width: 2.8rem; border: 2px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); font-size: 1.3rem; cursor: pointer; }
.med-x:hover { background: var(--c-orange); }

/* Alergias e intolerancias: etiquetas bien visibles en todas las pantallas */
.allergy-pill { display: inline-flex; align-items: baseline; gap: .3rem; padding: .05rem .6rem; border: 2px solid var(--ink); border-radius: 2rem; background: var(--c-pink); color: var(--ink); font-size: .8rem; font-weight: 500; line-height: 1.5; }
.allergy-pill b { font-weight: 700; text-transform: uppercase; font-size: .68rem; letter-spacing: .04em; }
.allergy-intolerance { background: var(--c-orange); }
.kid-allergies { display: inline; }
.allergy-chip { display: inline-block; margin-left: .25rem; padding: 0 .5rem; border: 2px solid var(--ink); border-radius: 2rem; background: var(--c-pink); color: var(--ink); font-size: .7rem; font-weight: 700; line-height: 1.35; vertical-align: .05em; }
.allergy-chip.allergy-intolerance { background: var(--c-orange); }
.allergy-unknown, .allergy-none { padding: .6rem .8rem; border: 2px dashed var(--ink); border-radius: 14px; background: rgba(255, 255, 255, .6); font-weight: 500; }
.allergy-none { border-style: solid; background: var(--c-green); }
.allergy-list { list-style: none; padding: 0; margin: .6rem 0 1rem; display: flex; flex-direction: column; gap: .5rem; }
.allergy-list li { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.allergy-list form { margin-left: auto; }
.allergy-form { margin: 1rem 0; display: flex; flex-direction: column; gap: .6rem; }
.allergy-form .btn { align-self: flex-start; }
.allergy-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: .6rem 0; padding: .6rem .8rem; border: 2px solid var(--ink); border-radius: 14px; background: #fff; }
.allergy-banner a { margin-left: auto; font-weight: 600; font-size: .85rem; }
.allergy-chip.allergy-ask { background: transparent; border-style: dashed; color: var(--muted); font-weight: 500; }

/* Fila de niño: la inicial y el nombre siempre arriba de la tarjeta, aunque debajo haya más o menos líneas */
.kid { align-items: flex-start; }
.kid-pick { align-items: flex-start; padding-top: .8rem; }
.kid-open { align-self: stretch; justify-content: flex-start; padding-top: .8rem; padding-bottom: .8rem; }
.kid-open:after { top: 1.55rem; margin-top: 0; }
.is-selecting .kid-open:after { top: 1.1rem; margin-top: 0; }

/* Rueda de la tarjeta: elegir qué ver de cada niño */
.kid { position: relative; }
.kid-gear { position: absolute; bottom: .65rem; left: .8rem; display: flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer; z-index: 2; }
.kid-gear:hover { background: var(--c-yellow); }
.is-selecting .kid-gear { display: none; }
.sheet-body [hidden] { display: none !important; }

/* Avisos de alergias en la ficha: bloque propio, sin pisar nada */
a.allergy-unknown { display: block; margin: .8rem 0 0; text-decoration: none; color: var(--ink); font-size: .9rem; }
p.allergy-ask { margin: .8rem 0 0; font-size: .85rem; }
.allergy-banner { margin: .8rem 0 0; }
.hero-link { white-space: nowrap; }

/* Zona «Más» de la ficha: tarjetas por tema y desplegables en estilo E */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.6rem, 1fr)); gap: .6rem; }
.tile { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border: 2px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .92rem; line-height: 1.2; }
.tile:hover, .tile:focus-visible { background: var(--c-yellow); }
.tile-ic { flex: none; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border: 2px solid var(--ink); border-radius: 50%; }
.tile-ic svg { width: 1.1rem; height: 1.1rem; }
.tile-blue { background: var(--c-blue); } .tile-green { background: var(--c-green); } .tile-yellow { background: var(--c-yellow); }
.tile-pink { background: var(--c-pink); } .tile-lilac { background: var(--c-lilac); } .tile-orange { background: var(--c-orange); }
.more { background: #fff; border: 2px solid var(--ink); border-radius: 14px; box-shadow: none; padding: .2rem .9rem; }
.more summary:after { border-color: var(--ink); }

/* Crecimiento: una tarjeta por medida y hoja con contadores */
.gcard { border: 2px solid var(--ink); border-radius: 14px; background: #fff; padding: .8rem 1rem; margin: 0 0 .7rem; }
.gcard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.gcard h2 { margin: 0 0 .2rem; font-size: 1rem; }
.gcard p { margin: 0; }
.gcard-value strong { font-size: 1.4rem; }
.gcard-sub { font-size: .85rem; }
.gcard .chart { width: 100%; height: auto; margin-top: .5rem; color: var(--ink); }
.edit-pill { flex: none; border: 2px solid var(--ink); border-radius: 99px; background: var(--c-yellow); color: var(--ink); font: inherit; font-weight: 700; font-size: .85rem; padding: .25rem .8rem; cursor: pointer; }
.mrow { margin: .8rem 0; }
.mrow .step { margin-top: .3rem; }

/* Interruptores y filas de resumen (avisos) */
.switch { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .65rem 0; border-bottom: 1.5px solid var(--hair); font-weight: 600; cursor: pointer; }
.switch:last-child { border-bottom: 0; }
.switch input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.switch-ui { position: relative; flex: none; width: 2.7rem; height: 1.5rem; border: 2px solid var(--ink); border-radius: 99px; background: #fff; transition: background .15s; }
.switch-ui:after { content: ''; position: absolute; top: 2px; left: 2px; width: .9rem; height: .9rem; border-radius: 50%; background: var(--ink); transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--c-green); }
.switch input:checked + .switch-ui:after { transform: translateX(1.2rem); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--ink); outline-offset: 2px; }
.sheet-body .switch { padding: .55rem 0; }
.sum-card h2 { margin-top: 0; }
.sum-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.sum-row .muted { display: block; font-size: .85rem; margin-top: .15rem; }
.settings-form .btn { margin: .3rem 0 1rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; align-items: start; }
.stepper-clear { margin: .2rem 0 0; font-size: .8rem; }
.slot { border: 2px solid var(--ink); border-radius: 14px; padding: .4rem .9rem .6rem; margin: .8rem 0; background: #fff; }
.slot h3 { margin: .3rem 0 0; font-size: .9rem; }
.slot[hidden] { display: none; }
.bar24 { position: relative; height: 1rem; margin-top: .7rem; border: 2px solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; }
.bar24 i { position: absolute; top: 0; bottom: 0; background: var(--c-lilac); border-left: 2px solid var(--ink); border-right: 2px solid var(--ink); box-sizing: border-box; }
.bar24-ticks { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); margin-top: .2rem; }
button.dashed-btn { display: block; width: 100%; text-align: center; padding: .6rem .8rem; border: 2px dashed var(--ink); border-radius: 14px; background: rgba(255, 255, 255, .6); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; margin: .6rem 0; }

/* Botones y tarjetas genéricas en estilo E (valen para todas las pantallas que aún usan .btn y .card) */
.btn { background: var(--c-yellow); color: var(--ink); border: 2px solid var(--ink); }
.btn:hover { filter: none; background: #ffd84a; }
.btn-secondary { background: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.card { background: #fff; border: 2px solid var(--ink); border-radius: 14px; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.card.card-accent { background: var(--c-yellow); }
.pair { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pair .stepper { min-width: 0; padding: .5rem .5rem .6rem; }
.pair .step { gap: .3rem; }
.pair .step output { font-size: 1.05rem; min-width: 0; }
.pair .step button { width: 2.1rem; height: 2.1rem; flex: none; }
.slot .stepper { border: 0; background: transparent; padding-left: 0; padding-right: 0; }
.slot .pair .stepper { border: 2px solid var(--ink); background: #fff; padding: .5rem .5rem .6rem; }

/* Vacunas: una tarjeta por dosis, con el estado en color */
.vac-list { display: flex; flex-direction: column; gap: .6rem; }
.vac { padding: .7rem .9rem; border: 2px solid var(--ink); border-radius: 14px; background: #fff; }
.vac-given { background: var(--c-green); }
.vac-pending { background: var(--c-orange); }
.vac-soon { background: var(--c-yellow); }
.vac-status { color: var(--ink) !important; font-weight: 600; }
.vac-main .muted { color: var(--ink); opacity: .75; }
.vac-mark summary, .vac-actions .link-btn { display: inline-block; padding: .2rem .8rem; border: 2px solid var(--ink); border-radius: 99px; background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: .85rem; text-decoration: none; cursor: pointer; }
.vac-form input[type=date] { border: 2px solid var(--ink); }

/* Fichas con leyenda dentro de una tarjeta, rango de volumen que no se sale */
fieldset.card > legend { float: left; width: 100%; padding: 0; margin: 0 0 .5rem; font-weight: 700; }
fieldset.card > legend + * { clear: both; }
.card input[type=range], .sheet-field input[type=range] { width: 100%; max-width: 100%; box-sizing: border-box; }
.card input[type=range], .sheet-field input[type=range] { padding: 0; margin: .4rem 0 0; border: 0; background: transparent; }
fieldset.card { margin-top: 1rem; min-width: 0; }
.card { padding: 1rem 1.1rem; margin: .8rem 0; }
.container > h2 + .card { padding-top: 1rem; }

/* Centro: aulas y accesos como tarjetas con trazo */
.aula-box { padding: 1rem 1.1rem; margin: .8rem 0; border: 2px solid var(--ink); border-radius: 14px; background: #fff; }
.row-link { background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: .8rem 1rem; margin: 0 0 .6rem; }
.row-link .chevron { border-color: var(--ink); }

/* Marca: emblema + nombre en la cabecera */
.brand { display: inline-flex; align-items: center; gap: .5rem; }
.brand img { width: 28px; height: 28px; border-radius: 8px; flex: none; }

/* Fredoka (SIL OFL) alojada en el propio servidor; solo el nombre de la marca */
@font-face { font-family: 'Fredoka'; src: url("../fonts/fredoka-latin-wght-normal-GEhDCFP.woff2") format('woff2'); font-weight: 500 700; font-style: normal; font-display: swap; }
.brand { font-family: 'Fredoka', 'Figtree', system-ui, sans-serif; font-weight: 600; font-size: 1.3rem; letter-spacing: 0; line-height: 1; }
.brand-a { color: #5b8db8; }
.brand-b { color: #e8836a; }
