/* =====================================================================
   Módulos: Ayuno, Dieta, Complementos y Expediente médico
   (usa los tokens definidos en app.css)
   ===================================================================== */
.module-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.module-img { width: 120px; height: auto; border-radius: var(--radio-md); flex: none; }
@media (max-width: 575px) { .module-img { width: 84px; } }
.disclaimer { border-top: 1px solid var(--borde); padding-top: .75rem; }
.pillar.is-soon { opacity: .7; }
.pillar a.stretched-link { color: inherit; text-decoration: none; }
.text-bg-danger-subtle { background: #FEE2E2; color: var(--error); }
.text-bg-warning-subtle { background: #FEF3C7; color: #92400E; }

/* Gráficos SVG (colores por clase, coherentes con el tema) */
.chart-svg { width: 100%; height: auto; display: block; }
.chart-svg text { font-size: 12px; fill: var(--tinta-suave); font-family: var(--fuente); }
.chart-svg .bar, .chart-svg .bar-ok { fill: var(--naranja); }
.chart-svg .bar-short { fill: var(--tinta-clara); }
.chart-svg .goal { stroke: var(--noche); stroke-width: 2; stroke-dasharray: 6 5; }
.chart-svg .goal-label { font-weight: 600; fill: var(--noche); }
.chart-svg .line { stroke: var(--naranja); stroke-width: 3; }
.chart-svg .line-area { fill: rgba(234, 88, 12, .12); }
.chart-svg .line-dot { fill: var(--naranja); }
.chart { height: auto; }
.chart-sm .chart-svg { max-height: 180px; }
.sw-ok { background: var(--naranja); }
.sw-short { background: var(--tinta-clara); }
.seg-p { stroke: var(--noche); background: var(--noche); fill: var(--noche); }
.seg-c { stroke: var(--naranja-claro); background: var(--naranja-claro); fill: var(--naranja-claro); }
.seg-f { stroke: #FDBA74; background: #FDBA74; fill: #FDBA74; }
svg .seg-p, svg .seg-c, svg .seg-f { background: none; }
.donut circle.seg-p, .donut circle.seg-c, .donut circle.seg-f { fill: none; }
.donut { width: 100%; max-width: 180px; height: auto; }
.donut-value { font-size: 30px; font-weight: 700; fill: var(--tinta); font-family: var(--fuente); }
.donut-sub { font-size: 13px; fill: var(--tinta-suave); font-family: var(--fuente); }
.macro { margin-bottom: .7rem; }
.macro-bar { width: 100%; height: 8px; display: block; margin-top: .25rem; }
.macro-bar .track { fill: var(--borde); }
.macro-bar rect.seg-p, .macro-bar rect.seg-c, .macro-bar rect.seg-f { stroke: none; }

/* Ayuno */
.ring-wrap { position: relative; width: min(260px, 70vw); margin: 0 auto 1rem; }
.ring { width: 100%; height: auto; display: block; }
.ring-bg { stroke: var(--naranja-suave); }
.ring-fg { stroke: var(--naranja); transition: stroke-dashoffset .6s ease; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-time { font-size: 2.2rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ring-sub { font-size: .85rem; color: var(--tinta-suave); }
.ring-pct { font-weight: 600; color: var(--naranja-texto); margin-top: .2rem; }
.protocols { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }
.protocol { display: flex; flex-direction: column; border: 2px solid var(--borde); border-radius: var(--radio-md); padding: .6rem .8rem; cursor: pointer; }
.protocol strong { font-size: 1.15rem; }
.protocol small { color: var(--tinta-suave); line-height: 1.25; }
.btn-check:checked + .protocol { border-color: var(--naranja); background: var(--naranja-suave); }
.btn-check:focus-visible + .protocol { box-shadow: 0 0 0 .2rem rgba(234, 88, 12, .3); }
.stage-card { background: var(--noche); color: #fff; border: 0; }
.stage-card .text-body-secondary { color: var(--tinta-clara) !important; }
.stage-now { display: flex; gap: .8rem; align-items: flex-start; background: rgba(255, 255, 255, .06); border-radius: var(--radio-md); padding: .9rem; margin-bottom: 1rem; }
.stage-icon { font-size: 2rem; line-height: 1; }
.stage-track li { display: flex; gap: .6rem; align-items: center; padding: .35rem 0; color: var(--tinta-clara); font-size: .9rem; }
.stage-track .dot { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); filter: grayscale(1); opacity: .6; flex: none; }
.stage-track li.done { color: #fff; }
.stage-track li.done .dot { background: var(--naranja); filter: none; opacity: 1; }
.water { display: flex; flex-wrap: wrap; gap: .35rem; }
.glass { width: 26px; height: 34px; border: 3px solid var(--noche); border-top: 0; border-radius: 0 0 8px 8px; position: relative; overflow: hidden; }
.glass::after { content: ""; position: absolute; inset: auto 0 0 0; height: 0; background: #38BDF8; transition: height .25s ease; }
.glass.full::after { height: 80%; }
.drinks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.drink { flex-direction: row; gap: .75rem; align-items: center; padding: .75rem; }
.drink img { width: 56px; height: 56px; border-radius: 12px; flex: none; }
.avoid { border-color: #FECACA; }
.activities { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.activity { display: flex; gap: .75rem; background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio-md); padding: .8rem; }
.activity > span { font-size: 1.6rem; }
.meal-mini { display: flex; gap: .8rem; align-items: center; text-decoration: none; color: inherit; border: 1px solid var(--borde); border-radius: var(--radio-md); padding: .6rem; }
.meal-mini img { width: 96px; height: auto; border-radius: 10px; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; text-align: center; }
.stats-row > div { display: flex; flex-direction: column; }
@media (max-width: 575px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

/* Dieta */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; }
.week-strip a { display: flex; flex-direction: column; align-items: center; padding: .45rem 0; border-radius: var(--radio-md); text-decoration: none; color: var(--tinta-suave); background: var(--superficie); border: 1px solid var(--borde); font-size: .8rem; }
.week-strip a strong { font-size: 1.05rem; color: var(--tinta); }
.week-strip a.today { border-color: var(--naranja); }
.week-strip a.active { background: var(--noche); border-color: var(--noche); color: var(--tinta-clara); }
.week-strip a.active strong { color: #fff; }
.meals { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; }
.meal { overflow: hidden; }
.meal-img img { width: 100%; height: auto; aspect-ratio: 400 / 260; display: block; }
.meal-slot { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--naranja-texto); }
.meal h3 a { color: inherit; text-decoration: none; }
.week-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.week-grid .is-today { border-color: var(--naranja); }
.week-meals li { padding: .2rem 0; }
.week-meals a { color: inherit; }
.recipe-img { max-height: 320px; object-fit: cover; }
.ing-list { list-style: none; padding: 0; }
.ing-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px dashed var(--borde); }
.steps li { margin-bottom: .5rem; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; align-items: start; }
.shop-item { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; cursor: pointer; width: 100%; }
.shop-item span { flex: 1; }
.shop-item small { color: var(--tinta-suave); white-space: nowrap; }
.shop-item.done span { text-decoration: line-through; color: var(--tinta-clara); }

/* Complementos y medicamentos */
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem; }
.catalog-item { text-align: left; border: 1px solid var(--borde); background: var(--superficie); border-radius: var(--radio-md); padding: .6rem .8rem; display: flex; flex-direction: column; gap: .15rem; }
.catalog-item:hover { border-color: var(--naranja); }
.catalog-item small { color: var(--tinta-suave); line-height: 1.3; }
.times { display: flex; flex-wrap: wrap; gap: .5rem; }
.time-row { display: flex; align-items: center; gap: .15rem; width: 9rem; }
.dose { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; padding: .6rem 0; border-bottom: 1px solid var(--borde); }
.dose > .flex-grow-1 { flex: 1 1 11rem; }
.dose-actions { margin-left: auto; }
.module-head .btn { white-space: nowrap; flex: none; }
.dose:last-child { border-bottom: 0; }
.dose-time { font-variant-numeric: tabular-nums; min-width: 3rem; color: var(--naranja-texto); }
.dose-actions { display: flex; align-items: center; gap: .25rem; flex: none; }
.dose-state { font-size: .85rem; font-weight: 600; }
.dose.is-tomado, .dose.is-omitido { opacity: .65; }
.dose.is-tomado .dose-state { color: var(--exito); }
.dose.is-tomado [data-dose], .dose.is-omitido [data-dose] { display: none; }
.med-item.is-off { opacity: .55; }

/* Expediente médico */
.lock-icon { font-size: 2.6rem; }
.lock-icon.sm { font-size: 1.8rem; }
.record-link { text-decoration: none; color: inherit; }
.record-link:hover { border-color: var(--naranja); }
.cond-list { display: grid; gap: .25rem; }
.cond { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .3rem .5rem; border-radius: var(--radio-sm); }
.cond.on { background: var(--naranja-suave); }
.cond .since { width: 7.5rem; display: none; }
.cond.on .since { display: block; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.med-mini li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid var(--borde); }
.med-mini li.is-off { opacity: .55; }
.sticky-save { position: sticky; bottom: calc(var(--tabbar-h) + .75rem + env(safe-area-inset-bottom)); text-align: right; z-index: 5; }
@media (min-width: 768px) { .sticky-save { bottom: 1rem; } }
.bare-main { padding: 2rem 1rem; }
.print-sheet h2 { font-size: 1.05rem; border-bottom: 2px solid var(--naranja); padding-bottom: .25rem; margin-top: 1.25rem; }
.print-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 575px) { .print-cols { grid-template-columns: 1fr; } }
.pre { white-space: pre-line; }

@media print {
  .app-header, .tabbar, .no-print, .toast-container, .offline-banner, .module-head .btn, nav.nav, .skip-link, .sticky-save { display: none !important; }
  body { background: #fff; }
  .app-main { padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* Ejercicio */
.week-strip a small { font-size: .7rem; line-height: 1; margin-top: .15rem; }
.week-strip a.is-done small { color: var(--naranja-texto); font-weight: 700; }
.week-strip a.active.is-done small { color: #fff; }
.block-list { list-style: none; padding: 0; counter-reset: b; }
.block-list li { display: flex; gap: .75rem; align-items: flex-start; padding: .55rem .4rem; border-bottom: 1px solid var(--borde); border-radius: 8px; transition: background .2s; }
.block-list li:last-child { border-bottom: 0; }
.block-list li.is-current { background: var(--naranja-suave); }
.block-list li.is-past { opacity: .55; }
.block-min { flex: none; min-width: 2.6rem; text-align: center; font-weight: 700; color: var(--naranja-texto); background: var(--naranja-suave); border-radius: var(--radio-pill); padding: .1rem .4rem; font-size: .85rem; }
.block-list li.is-current .block-min { background: var(--naranja); color: #fff; }
.timer-time { font-size: 3.4rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.timer-card .eyebrow { color: var(--naranja-claro); }
.timer-card h2, .timer-card .timer-time { color: #fff; }
.routine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem; }
.exercise-list { display: grid; gap: .6rem; }
.exercise-item summary { cursor: pointer; list-style: none; }
.exercise-item summary::-webkit-details-marker { display: none; }
.exercise-item summary::after { content: '▾'; color: var(--tinta-suave); transition: transform .2s; }
.exercise-item[open] summary::after { transform: rotate(180deg); }
.ex-ico { font-size: 1.6rem; width: 2.6rem; height: 2.6rem; display: inline-flex; align-items: center; justify-content: center; background: var(--naranja-suave); border-radius: 12px; flex: none; }
.ring-sm { width: min(200px, 60vw); }
.ring-sm .ring-time { font-size: 2rem; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.stat-row strong { display: block; font-size: 1.3rem; }
.stat-row small { color: var(--tinta-suave); }
.workout-list li { padding: .35rem 0; border-bottom: 1px solid var(--borde); }
.workout-list li:last-child { border-bottom: 0; }
/* 6 pestañas en la barra inferior del móvil */
@media (max-width: 380px) { .tabbar .tab { font-size: .64rem; } .tabbar .ico { width: 22px; height: 22px; } }

/* Ilustraciones de ejercicios */
.ex-thumb { width: 96px; height: auto; border-radius: 10px; flex: none; }
@media (max-width: 575px) { .ex-thumb { width: 72px; } }
.ex-body { display: grid; gap: 1rem; }
@media (min-width: 768px) { .ex-body { grid-template-columns: minmax(260px, 360px) 1fr; align-items: start; } }
.ex-img { width: 100%; height: auto; border-radius: var(--radio-md); }
.timer-img { width: 100%; max-width: 320px; height: auto; border-radius: var(--radio-md); }
.block-img { width: 72px; height: auto; border-radius: 8px; flex: none; }
@media (max-width: 575px) { .block-img { display: none; } }

/* Mi evolución */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.kpi .card-body { display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1rem; }
.kpi-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--tinta-suave); }
.kpi-value { font-size: 1.45rem; line-height: 1.2; }
.kpi-detail { font-size: .78rem; color: var(--tinta-suave); }
.kpi-detail.is-good { color: #15803D; }
.kpi-detail.is-bad { color: var(--naranja-texto); }
.week-card:hover { box-shadow: 0 6px 20px rgba(15, 23, 42, .08); }
.week-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; text-align: center; }
.week-stats strong { display: block; font-size: 1.25rem; }
.week-stats small { color: var(--tinta-suave); font-size: .75rem; }

/* Registro de comidas */
.log-summary .log-totals { text-align: center; min-width: 90px; }
.log-totals strong { display: block; font-size: 1.25rem; }
.log-totals small { color: var(--tinta-suave); font-size: .75rem; }
.meal-log { border-top: 1px solid var(--borde); padding-top: .75rem; }
.meal-log details summary { cursor: pointer; color: var(--naranja-texto); font-weight: 600; }
.log-badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: .25rem .65rem; border-radius: 12px; line-height: 1.35; }
.log-comido { background: #DCFCE7; color: #166534; }
.log-otro { background: var(--naranja-suave); color: var(--naranja-texto); }
.log-saltado { background: #F1F5F9; color: var(--tinta-suave); }
@media (max-width: 575px) { .week-stats { grid-template-columns: repeat(3, 1fr); row-gap: .8rem; } }

/* Ajuste automático del plan */
.coach-card { border-left: 4px solid var(--naranja); }
.coach-hito, .coach-analitica { border-left-color: #16A34A; }
.coach-berberina { border-left-color: var(--noche); }
.coach-log li { padding: .3rem 0; border-bottom: 1px solid var(--borde); }

/* Logros y rachas */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .75rem; }
.badge-card .card-body { display: flex; flex-direction: column; align-items: center; gap: .1rem; }
.badge-ico { font-size: 2.2rem; line-height: 1; width: 64px; height: 64px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--borde); filter: grayscale(1); opacity: .55; margin-bottom: .5rem; }
.badge-card.is-earned .badge-ico { background: var(--naranja-suave); filter: none; opacity: 1; box-shadow: 0 0 0 3px var(--naranja); }
.badge-card .macro-bar { max-width: 120px; }
.streak.is-on { border-color: var(--naranja); }
.streak.is-on .kpi-value { color: var(--naranja-texto); }

/* Fotos de progreso */
.compare { --pos: 50%; position: relative; overflow: hidden; border-radius: var(--radio-md); background: var(--noche); user-select: none; }
.compare-img { display: block; width: 100%; height: min(70vh, 640px); object-fit: contain; }
.compare-top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-top::after { content: ''; position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 6px rgba(0, 0, 0, .5); }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare-tag { position: absolute; top: .5rem; font-size: .72rem; font-weight: 600; padding: .15rem .5rem; border-radius: var(--radio-pill); background: rgba(15, 23, 42, .75); color: #fff; pointer-events: none; }
.tag-a { left: .5rem; }
.tag-b { right: .5rem; }
.photo-preview[hidden] { display: none; }
.photo-preview { display: block; width: 100%; max-height: 260px; object-fit: contain; border-radius: var(--radio-md); background: var(--borde); }
.compare-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .5rem; min-height: 220px; border: 2px dashed var(--borde); border-radius: var(--radio-md); padding: 1rem; color: var(--tinta-suave); }
.compare-empty span { font-size: 2.5rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; }
.photo-item { margin: 0; }
.photo-item img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; display: block; background: var(--borde); }
.photo-item figcaption { padding: .25rem .1rem 0; }
.lock-icon { font-size: 2.5rem; }

/* Informe para el médico */
.report { max-width: 980px; margin: 0 auto; }
.report-kpis td, .report-kpis th { vertical-align: middle; }
.notes-lines { height: 7.5rem; background: repeating-linear-gradient(to bottom, transparent 0, transparent 1.45rem, var(--borde) 1.45rem, var(--borde) 1.5rem); }
@media print {
  @page { size: A4; margin: 14mm; }
  .bare-main { padding: 0; }
  .report { max-width: none; font-size: 10.5pt; }
  .report section { break-inside: avoid; }
  .report-weeks { break-inside: auto; }
  .report .chart-svg { max-height: 150px; }
  .bare-main .site-footer { display: none; }
}

/* Compartir con acompañante */
.share-link { border: 2px solid #16A34A; }
.share-row { padding: .75rem 0; border-bottom: 1px solid var(--borde); }
.share-row:last-child { border-bottom: 0; }
.share-perms { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; }

/* Catálogo de planes y pagos */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.plan-card.is-active { border: 2px solid #16A34A; }
.plan-price { flex: none; font-weight: 700; color: var(--naranja-texto); background: var(--naranja-suave); border-radius: var(--radio-pill); padding: .15rem .6rem; }
.plan-price.is-personal { color: #4338CA; background: #E0E7FF; }
.plan-active-tag { align-self: flex-start; font-size: .75rem; font-weight: 700; color: #fff; background: #16A34A; border-radius: var(--radio-pill); padding: .1rem .6rem; margin-bottom: .5rem; }
.plan-card.is-active { box-shadow: 0 0 0 4px rgba(22, 163, 74, .15); }
.plan-price-lg { font-size: 1.3rem; padding: .3rem .9rem; }
.plan-buy { border: 2px solid var(--naranja); }
.pay-info { background: var(--superficie-alt); border-radius: var(--radio-md); padding: .75rem; white-space: normal; }
.pay-row { padding: .85rem 0; border-bottom: 1px solid var(--borde); }
.pay-row:last-child { border-bottom: 0; }
.pay-note { max-width: 420px; }

/* ---- Panel para profesionales ---- */
.pro-list { display: flex; flex-direction: column; }
.pro-row { display: grid; grid-template-columns: minmax(200px, 1.3fr) 2fr auto; gap: .75rem; align-items: center; padding: .75rem .5rem; border-bottom: 1px solid var(--borde); color: inherit; text-decoration: none; border-radius: .5rem; }
.pro-row:last-child { border-bottom: 0; }
.pro-row:hover { background: var(--naranja-suave); }
.pro-who { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.pro-metrics { display: flex; flex-wrap: wrap; gap: .35rem .9rem; }
.pro-status { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; text-align: right; }
.pro-dot { font-size: .8rem; font-weight: 700; border-radius: 999px; padding: .15rem .6rem; white-space: nowrap; }
.pro-dot.is-verde { background: #DCFCE7; color: #166534; }
.pro-dot.is-amarillo { background: #FEF3C7; color: #92400E; }
.pro-dot.is-rojo { background: #FEE2E2; color: #991B1B; }
.pro-dot.is-gris { background: #E5E7EB; color: #374151; }
.pro-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.pro-tabs a { padding: .35rem .8rem; border: 1px solid var(--borde); border-radius: 999px; text-decoration: none; font-size: .9rem; color: inherit; }
.pro-tabs a:hover, .pro-tabs a[aria-current] { background: var(--naranja-suave); border-color: transparent; font-weight: 600; }
.pro-note { padding: .6rem .75rem; border-left: 3px solid var(--borde); margin-bottom: .6rem; background: rgba(127, 127, 127, .06); border-radius: 0 .4rem .4rem 0; }
.msg-thread { display: flex; flex-direction: column; gap: .5rem; max-height: 420px; overflow-y: auto; padding: .25rem; margin-bottom: .75rem; }
.msg { max-width: 80%; align-self: flex-start; padding: .5rem .75rem; border-radius: 1rem 1rem 1rem .25rem; background: rgba(127, 127, 127, .12); }
.msg.is-me { align-self: flex-end; border-radius: 1rem 1rem .25rem 1rem; background: var(--naranja-suave); }
.msg p { white-space: normal; overflow-wrap: anywhere; }
.msg-meta { font-size: .72rem; opacity: .7; }
.msg-form { display: flex; gap: .5rem; align-items: flex-end; }
.msg-form textarea { flex: 1; }
@media (max-width: 767.98px) {
  .pro-row { grid-template-columns: 1fr; }
  .pro-status { flex-direction: row; justify-content: space-between; align-items: center; text-align: left; }
  .msg { max-width: 92%; }
}

/* Cabeceras con varios botones: en el móvil bajan a otra línea en vez de desbordar la pantalla. */
@media (max-width: 575.98px) {
  .module-head { flex-wrap: wrap; }
  .module-head > .module-actions { flex: 1 1 100%; }
}

/* Selector de idioma (pie de página y pantallas de entrada) */
.lang-switch { display: flex; justify-content: center; align-items: center; gap: .6rem; margin-top: .5rem; font-size: .85rem; }
.lang-switch strong { font-weight: 600; }

/* Eliminar la cuenta */
.danger-zone { border-color: #FECACA; }
.danger-zone summary { list-style: none; cursor: pointer; }
.danger-zone summary::-webkit-details-marker { display: none; }

/* Páginas legales */
.legal { max-width: 820px; margin: 0 auto; }
.legal h2 { margin-top: 1.4rem; }
.legal li { margin-bottom: .35rem; }

/* Pasos automáticos (Health Connect / Apple Salud) */
.health-box { border: 1px solid var(--borde); border-radius: var(--radio-md); padding: .75rem; background: rgba(127, 127, 127, .05); }

/* Ayuda › Acerca de */
.about-head { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; }
.about-head img { border-radius: 14px; flex: none; }
.about-list { margin: 0 0 1rem; border: 1px solid var(--borde); border-radius: var(--radio-md); }
.about-list > div { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .85rem; }
.about-list > div + div { border-top: 1px solid var(--borde); }
.about-list > div[hidden] { display: none; }
.about-list dt { font-weight: 600; }
.about-list dd { margin: 0; text-align: right; }

/* Recuperar contraseña: código de 6 cifras */
.reset-code { letter-spacing: .4em; font-size: 1.5rem; text-align: center; font-variant-numeric: tabular-nums; }
