/* ─── Reset & root ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:      #7C5CBF;
  --primary-dark: #5A3D99;
  --accent:       #E8A87C;
  --bg:           #FAF7F4;
  --surface:      #FFFFFF;
  --ink:          #2C2240;
  --ink-2:        #5c4f78;
  --ink-3:        #9787b8;
  --radius:       1rem;
  --radius-lg:    1.5rem;
  --shadow-sm:    0 1px 4px rgba(44,34,64,.06), 0 4px 16px rgba(44,34,64,.06);
  --shadow-md:    0 2px 8px rgba(44,34,64,.08), 0 8px 32px rgba(44,34,64,.10);
  --ff-head:      'Fraunces', Georgia, serif;
  --ff-body:      'Figtree', system-ui, sans-serif;
  --topbar-h:     56px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ff-body);
  background-color: var(--bg);
  color: var(--ink);
  min-height: 100svh;
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(124,92,191,.05) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(232,168,124,.05) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.025'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--ff-body); cursor: pointer; border: none; }
input  { font-family: var(--ff-body); }

/* ─── Loader ─────────────────────────────────────────────────────────────── */
.splash-loader {
  display: flex; align-items: center; justify-content: center;
  height: 100svh;
}
.splash-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary); opacity: .5;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(.8); opacity: .4; }
  50%      { transform: scale(1.4); opacity: 1; }
}

/* ─── Animations ─────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}

.anim-fade-up  { animation: fadeUp  .45s cubic-bezier(.2,.8,.4,1) both; }
.anim-fade-in  { animation: fadeIn  .3s ease both; }
.anim-scale-in { animation: scaleIn .4s cubic-bezier(.2,.8,.4,1) both; }

/* ─── Shell & page layout ────────────────────────────────────────────────── */
.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100svh;
  position: relative;
}

/* ─── Topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--topbar-h);
  padding: 0 1.25rem;
  background: rgba(250,247,244,.82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(124,92,191,.08);
}
.topbar-brand {
  font-family: var(--ff-head);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--primary-dark);
  letter-spacing: -.01em;
}
.topbar-link {
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .3rem .6rem;
  border-radius: 999px;
  transition: color .2s, background .2s;
  cursor: pointer;
}
.topbar-link:hover { color: var(--primary); background: rgba(124,92,191,.07); }

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding: 2.25rem 1.25rem 1.75rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(124,92,191,.07) 0%, transparent 100%);
}
.eyebrow {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 1.4rem;
}

/* ─── Progress Ring ──────────────────────────────────────────────────────── */
.ring-wrap {
  display: inline-flex;
  align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 4px 20px rgba(124,92,191,.18));
}
.ring-svg { width: 120px; height: 120px; }
.ring-bg {
  fill: none;
  stroke: rgba(124,92,191,.12);
  stroke-width: 7;
}
.ring-fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dasharray 1.1s cubic-bezier(.4,0,.2,1);
}
.ring-num {
  font-family: var(--ff-head);
  font-size: 2rem;
  font-weight: 400;
  fill: var(--primary-dark);
}
.ring-label {
  font-family: var(--ff-body);
  font-size: .5rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  fill: var(--ink-3);
}
.hero-welcome {
  font-family: var(--ff-head);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink-2);
  line-height: 1.5;
  max-width: 280px;
  margin: 0 auto;
}

/* ─── Cards section ──────────────────────────────────────────────────────── */
.cards-section {
  padding: .25rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.activity-card {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .9rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  animation: fadeUp .45s cubic-bezier(.2,.8,.4,1) both;
  -webkit-tap-highlight-color: transparent;
}
.activity-card:active { transform: scale(.985); }
.activity-card:hover  { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.activity-card.done   { background: linear-gradient(135deg, rgba(124,92,191,.04), var(--surface)); }

.card-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: .75rem;
  background: rgba(124,92,191,.09);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  transition: background .2s;
}
.activity-card.done .card-icon { background: rgba(124,92,191,.15); }
.card-icon svg { width: 20px; height: 20px; }

.card-body { flex: 1; min-width: 0; }
.card-label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-sub {
  font-size: .75rem;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-check {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(124,92,191,.25);
  display: flex; align-items: center; justify-content: center;
  transition: background .25s, border-color .25s, transform .25s;
}
.card-check.filled {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.06);
}
.card-check svg { width: 13px; height: 13px; stroke: #fff; }

/* ─── Stats row ──────────────────────────────────────────────────────────── */
.stats-row {
  display: flex;
  gap: .6rem;
  padding: .5rem 1rem 2rem;
  animation: fadeUp .5s .32s cubic-bezier(.2,.8,.4,1) both;
}
.stat-box {
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: .9rem .5rem;
  text-align: center;
}
.stat-num {
  display: block;
  font-family: var(--ff-head);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--primary);
  line-height: 1;
  margin-bottom: .3rem;
}
.stat-lbl {
  display: block;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ─── Day-done banner ────────────────────────────────────────────────────── */
.day-done-banner {
  margin: 0 1rem .75rem;
  padding: .85rem 1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
  text-align: center;
  animation: scaleIn .4s .25s cubic-bezier(.2,.8,.4,1) both;
}
.day-done-banner p { color: #fff; font-weight: 600; font-size: .85rem; line-height: 1.4; }
.day-advance-btn {
  margin-top: .7rem;
  padding: .7rem 1.6rem;
  background: #fff;
  color: var(--primary-dark);
  font-family: var(--ff-body);
  font-size: .9rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(0,0,0,.12);
  transition: transform .18s, box-shadow .18s;
}
.day-advance-btn:hover  { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.16); }
.day-advance-btn:active { transform: scale(.97); }
.day-advance-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* ─── Reinicio del ritual (Mi progreso) ──────────────────────────────────── */
.reset-section { margin: 2.5rem 1rem 1.5rem; text-align: center; }
.reset-btn {
  padding: .7rem 1.6rem;
  background: transparent;
  color: var(--primary-dark);
  font-family: var(--ff-body);
  font-size: .9rem;
  font-weight: 600;
  border: 1.5px solid var(--primary);
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s, color .18s, transform .18s;
}
.reset-btn:hover  { background: var(--primary); color: #fff; }
.reset-btn:active { transform: scale(.97); }
.reset-btn:disabled { opacity: .55; cursor: not-allowed; }
.reset-hint { margin-top: .6rem; font-size: .74rem; color: var(--ink-3); line-height: 1.5; }

/* ─── Auth screens ───────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.auth-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2.5rem 2rem 2rem;
  animation: scaleIn .45s cubic-bezier(.2,.8,.4,1) both;
  text-align: center;
}
.auth-brand {
  font-family: var(--ff-head);
  font-size: 2rem;
  font-weight: 400;
  color: var(--primary);
  margin-bottom: .35rem;
  letter-spacing: -.02em;
}
.auth-sub {
  font-size: .88rem;
  color: var(--ink-3);
  margin-bottom: 2rem;
  line-height: 1.5;
}
.auth-form { display: flex; flex-direction: column; gap: .75rem; }
.auth-input {
  width: 100%;
  padding: .78rem 1rem;
  border: 1.5px solid rgba(124,92,191,.18);
  border-radius: .75rem;
  font-size: .95rem;
  color: var(--ink);
  background: var(--bg);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.auth-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,92,191,.12);
}
.auth-input::placeholder { color: var(--ink-3); }
.auth-btn {
  width: 100%;
  padding: .82rem;
  background: var(--primary);
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  border-radius: .75rem;
  transition: background .2s, transform .15s;
  margin-top: .25rem;
}
.auth-btn:hover   { background: var(--primary-dark); }
.auth-btn:active  { transform: scale(.97); }
.auth-btn:disabled { opacity: .6; cursor: not-allowed; }
.auth-error {
  font-size: .8rem;
  color: #c0392b;
  min-height: 1.2em;
  text-align: center;
}
.auth-hint { font-size: .78rem; color: var(--ink-3); margin-top: 1.25rem; text-align: center; }
.auth-hint a { color: var(--primary); font-weight: 500; }

/* ─── Empty / Error states ───────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--ink-3);
  font-size: .88rem;
  line-height: 1.6;
}

/* ════════════════════════════════════════════════════════════════════════════
   BOTTOM SHEET
   ══════════════════════════════════════════════════════════════════════════ */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,34,64,.45);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity .28s ease;
}
.sheet-overlay.open { opacity: 1; }
.sheet-overlay.open .sheet-panel { transform: translateY(0); }

.sheet-panel {
  width: 100%;
  max-width: 480px;
  max-height: 92svh;
  background: var(--surface);
  border-radius: 1.5rem 1.5rem 0 0;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .32s cubic-bezier(.2,.8,.4,1);
  -webkit-overflow-scrolling: touch;
}

.sheet-handle {
  width: 36px; height: 4px;
  background: rgba(44,34,64,.14);
  border-radius: 2px;
  margin: .8rem auto .4rem;
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: .5rem 1.25rem .25rem;
  gap: .75rem;
}
.sheet-title {
  font-family: var(--ff-head);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.3;
  flex: 1;
}
.sheet-close {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(44,34,64,.07);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3);
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: background .18s;
  line-height: 1;
}
.sheet-close:hover { background: rgba(44,34,64,.13); }

.sheet-body { padding: .75rem 1.25rem; }

.sheet-tag {
  display: inline-block;
  font-size: .67rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(124,92,191,.1);
  border-radius: 999px;
  padding: .2rem .6rem;
  margin-bottom: .9rem;
}
.sheet-desc {
  font-size: .9rem;
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.sheet-done-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(124,92,191,.1);
  border-radius: 999px;
  padding: .35rem .85rem;
  margin-bottom: .5rem;
}

/* Media players */
.media-wrap { margin-bottom: 1rem; }
.media-wrap audio {
  width: 100%;
  border-radius: .75rem;
  accent-color: var(--primary);
}
.media-wrap video {
  width: 100%;
  border-radius: .75rem;
  background: #1a1a2e;
  aspect-ratio: 16/9;
  display: block;
}

/* Recipe */
.recipe-section-title {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 1.25rem 0 .6rem;
}
.ingredients-list { list-style: none; }
.ingredients-list li {
  padding: .4rem 0;
  border-bottom: 1px solid rgba(44,34,64,.06);
  font-size: .88rem;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: .55rem;
  line-height: 1.4;
}
.ingredients-list li::before {
  content: '';
  flex-shrink: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.steps-list { list-style: none; counter-reset: step; }
.steps-list li {
  counter-increment: step;
  padding: .55rem 0 .55rem 2.5rem;
  border-bottom: 1px solid rgba(44,34,64,.06);
  font-size: .88rem;
  color: var(--ink-2);
  line-height: 1.55;
  position: relative;
}
.steps-list li::before {
  content: counter(step);
  position: absolute; left: 0; top: .55rem;
  width: 1.6rem; height: 1.6rem;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.why-box {
  background: linear-gradient(135deg, rgba(124,92,191,.06), rgba(232,168,124,.06));
  border-left: 3px solid var(--accent);
  border-radius: .25rem .75rem .75rem .25rem;
  padding: .9rem 1rem;
  margin-top: 1.25rem;
}
.why-box-title {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .35rem;
}
.why-box-text { font-size: .86rem; color: var(--ink-2); line-height: 1.6; }

/* Sheet footer with CTA */
.sheet-footer {
  padding: 1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(44,34,64,.07);
  background: var(--surface);
  position: sticky;
  bottom: 0;
}
.sheet-cta {
  width: 100%;
  padding: .88rem;
  background: var(--primary);
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  border-radius: .75rem;
  transition: background .2s, transform .15s, opacity .2s;
}
.sheet-cta:hover   { background: var(--primary-dark); }
.sheet-cta:active  { transform: scale(.97); }
.sheet-cta:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ════════════════════════════════════════════════════════════════════════════
   AYUNO INTERMITENTE
   ══════════════════════════════════════════════════════════════════════════ */
/* Card destacada de ayuno */
.ayuno-card {
  background: linear-gradient(135deg, rgba(232,168,124,.10), var(--surface));
  border: 1px solid rgba(232,168,124,.22);
}
.ayuno-card .card-icon {
  background: rgba(232,168,124,.16);
  color: var(--accent);
}
.card-check-slot {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
}
.fasting-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(232,168,124,.6);
  animation: fastingPulse 1.8s ease-out infinite;
}
@keyframes fastingPulse {
  0%   { box-shadow: 0 0 0 0 rgba(232,168,124,.55); }
  70%  { box-shadow: 0 0 0 9px rgba(232,168,124,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,168,124,0); }
}

/* Aro del temporizador */
.fasting-ring-wrap {
  display: flex; justify-content: center;
  margin: .5rem 0 .35rem;
  filter: drop-shadow(0 4px 18px rgba(232,168,124,.20));
}
.fasting-ring { width: 168px; height: 168px; }
.fasting-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dasharray .9s cubic-bezier(.4,0,.2,1);
}
.fasting-ring-fill.done { stroke: var(--primary); }
.fasting-ring-time {
  font-family: var(--ff-head);
  font-size: 1rem;
  font-weight: 400;
  fill: var(--ink);
}
.fasting-ring-sub {
  font-family: var(--ff-body);
  font-size: .42rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  fill: var(--ink-3);
}
.fasting-status {
  text-align: center;
  font-size: .82rem;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0 auto 1.1rem;
  max-width: 300px;
  min-height: 2.4em;
}

/* Plan del día */
.fasting-plan {
  background: var(--bg);
  border-radius: var(--radius);
  padding: .35rem 1rem;
  margin-bottom: 1rem;
}
.fasting-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem 0;
  font-size: .86rem;
  color: var(--ink-2);
}
.fasting-plan-row + .fasting-plan-row { border-top: 1px solid rgba(44,34,64,.06); }
.fasting-plan-row strong { color: var(--primary-dark); font-weight: 600; }

/* Intro (solo día 1) */
.fasting-intro {
  background: linear-gradient(135deg, rgba(124,92,191,.06), rgba(232,168,124,.06));
  border-radius: var(--radius);
  padding: .9rem 1rem;
  margin-bottom: 1rem;
  font-size: .86rem;
  color: var(--ink-2);
  line-height: 1.6;
}
.fasting-intro-title {
  font-family: var(--ff-head);
  font-size: .98rem;
  color: var(--ink);
  margin-bottom: .4rem;
}

/* Consejo del día */
.fasting-tip {
  border-left: 3px solid var(--accent);
  background: rgba(232,168,124,.07);
  border-radius: .25rem .75rem .75rem .25rem;
  padding: .8rem 1rem;
  margin-bottom: 1rem;
}
.fasting-tip-title {
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .3rem;
}
.fasting-tip p { font-size: .86rem; color: var(--ink-2); line-height: 1.6; }

/* Seguridad (colapsable) */
.fasting-safety {
  border: 1px solid rgba(44,34,64,.1);
  border-radius: var(--radius);
  padding: .2rem .3rem;
  margin-bottom: .5rem;
}
.fasting-safety summary {
  cursor: pointer;
  list-style: none;
  padding: .65rem .75rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-2);
}
.fasting-safety summary::-webkit-details-marker { display: none; }
.fasting-safety summary::after { content: '＋'; float: right; color: var(--ink-3); }
.fasting-safety[open] summary::after { content: '－'; }
.fasting-safety p {
  padding: 0 .75rem .75rem;
  font-size: .82rem;
  color: var(--ink-3);
  line-height: 1.6;
}

/* Botón terminar ayuno */
.sheet-cta.fasting-stop { background: var(--accent); }
.sheet-cta.fasting-stop:hover { background: #d9925f; }

/* ════════════════════════════════════════════════════════════════════════════
   CHECK-IN SHEET
   ══════════════════════════════════════════════════════════════════════════ */
.checkin-question { margin-bottom: 1.35rem; }
.checkin-q-label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .6rem;
  line-height: 1.4;
}
.scale-row { display: flex; gap: .45rem; }
.scale-btn {
  flex: 1;
  padding: .6rem 0;
  border: 1.5px solid rgba(124,92,191,.2);
  border-radius: .65rem;
  background: var(--bg);
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink-3);
  transition: all .18s ease;
  cursor: pointer;
}
.scale-btn:hover  { border-color: var(--primary); color: var(--primary); background: rgba(124,92,191,.06); }
.scale-btn.sel    { background: var(--primary); border-color: var(--primary); color: #fff; transform: scale(1.06); }

/* ════════════════════════════════════════════════════════════════════════════
   MI PROGRESO SCREEN
   ══════════════════════════════════════════════════════════════════════════ */
.progress-page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100svh;
}
.progress-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  position: sticky; top: 0; z-index: 10;
  background: rgba(250,247,244,.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(124,92,191,.08);
}
.back-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(44,34,64,.07);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  cursor: pointer;
  border: none;
  transition: background .2s;
  font-size: 1.1rem;
}
.back-btn:hover { background: rgba(44,34,64,.12); }
.progress-title {
  font-family: var(--ff-head);
  font-size: 1.15rem;
  color: var(--ink);
  flex: 1;
}

.progress-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .55rem;
  padding: 1.25rem 1rem .75rem;
}
.progress-stat {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: .85rem .4rem;
  text-align: center;
  animation: fadeUp .4s ease both;
}
.progress-stat-num {
  display: block;
  font-family: var(--ff-head);
  font-size: 1.3rem;
  color: var(--primary);
  line-height: 1;
  margin-bottom: .28rem;
}
.progress-stat-lbl {
  display: block;
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.3;
}

.checkin-list-section { padding: .5rem 1rem 2rem; }
.checkin-list-title {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .75rem;
}
.checkin-item {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: .9rem 1rem;
  margin-bottom: .65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  animation: fadeUp .4s ease both;
}
.checkin-item-day {
  font-family: var(--ff-head);
  font-size: .98rem;
  color: var(--primary);
  white-space: nowrap;
}
.checkin-metrics { display: flex; gap: 1rem; }
.checkin-metric { text-align: center; }
.metric-num { display: block; font-weight: 600; font-size: .92rem; color: var(--ink); }
.metric-lbl { font-size: .6rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }

.empty-progress {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--ink-3);
  font-size: .88rem;
  line-height: 1.7;
}

/* ════════════════════════════════════════════════════════════════════════════
   PANTALLA FINAL — 21 DÍAS COMPLETADOS
   ══════════════════════════════════════════════════════════════════════════ */
.final-page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.final-glow {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(124,92,191,.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(232,168,124,.1) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}
.final-page > * { position: relative; z-index: 1; }

.final-badge {
  font-size: 3.5rem;
  margin-bottom: .75rem;
  animation: scaleIn .55s cubic-bezier(.2,.8,.4,1) both;
}
.final-title {
  font-family: var(--ff-head);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--primary);
  margin-bottom: .6rem;
  line-height: 1.15;
  letter-spacing: -.02em;
  animation: fadeUp .5s .1s ease both;
}
.final-sub {
  font-size: .95rem;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 300px;
  margin: 0 auto 2rem;
  animation: fadeUp .5s .17s ease both;
}
.founder-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem 1.5rem 1.25rem;
  max-width: 340px;
  width: 100%;
  margin: 0 auto 2rem;
  animation: scaleIn .55s .24s cubic-bezier(.2,.8,.4,1) both;
}
.founder-text {
  font-family: var(--ff-head);
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink-2);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 1rem;
}
.founder-sig { font-size: .78rem; font-weight: 600; color: var(--ink-3); letter-spacing: .05em; text-transform: uppercase; }
.founder-name { display: block; color: var(--primary); font-size: .88rem; margin-top: .15rem; font-style: normal; letter-spacing: 0; }

.final-cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 999px;
  box-shadow: 0 4px 24px rgba(124,92,191,.38);
  transition: transform .2s, box-shadow .2s;
  animation: fadeUp .5s .34s ease both;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: var(--ff-body);
}
.final-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(124,92,191,.42); }
.final-cta:active { transform: scale(.97); }

.final-restart {
  margin-top: 1.1rem;
  padding: .7rem 1.8rem;
  background: transparent;
  color: var(--primary-dark);
  font-family: var(--ff-body);
  font-size: .88rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  animation: fadeUp .5s .42s ease both;
  transition: color .18s;
}
.final-restart:hover  { color: var(--primary); }
.final-restart:disabled { opacity: .55; cursor: not-allowed; }

/* ─── Fase A · Check-in adaptativo, estado, modo suave y SOS ──────────────── */

/* Pistas de la escala (bajo / alto) */
.scale-hints {
  display: flex;
  justify-content: space-between;
  margin-top: .4rem;
  font-size: .68rem;
  color: var(--ink-3);
  letter-spacing: .01em;
}

/* Gate de check-in (pantalla previa al día) */
.checkin-gate {
  padding: 1.25rem 1.25rem .5rem;
  max-width: 480px;
  margin: 0 auto;
}
.gate-title {
  font-family: var(--ff-head);
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--ink);
  margin: .3rem 0 .5rem;
}
.gate-sub {
  font-size: .9rem;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.gate-footer {
  position: sticky;
  bottom: 0;
  padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0));
  background: linear-gradient(to top, var(--bg) 62%, transparent);
  max-width: 480px;
  margin: 0 auto;
}

/* Panel "Mi Estado de Hoy" */
.state-panel {
  margin: 0 1.25rem 1.1rem;
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(124,92,191,.1);
}
.state-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .6rem;
}
.state-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.state-chip {
  font-size: .78rem;
  font-weight: 500;
  color: var(--primary-dark);
  background: rgba(124,92,191,.1);
  border-radius: 999px;
  padding: .3rem .7rem;
}
.state-reco {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .65rem .8rem;
  background: rgba(232,168,124,.14);
  border-radius: var(--radius);
  margin-bottom: .8rem;
}
.state-reco-lbl { font-size: .74rem; color: var(--ink-2); font-weight: 500; }
.state-reco-val { font-size: .82rem; color: var(--ink); font-weight: 600; text-align: right; }
.state-message {
  font-size: .88rem;
  color: var(--ink-2);
  line-height: 1.6;
  font-style: italic;
}
.minimal-btn {
  margin-top: 1rem;
  width: 100%;
  padding: .8rem 1rem;
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary-dark);
  font-family: var(--ff-body);
  font-size: .88rem;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s, transform .12s;
}
.minimal-btn:hover  { background: rgba(124,92,191,.08); }
.minimal-btn:active { transform: scale(.98); }

/* Enlace SOS discreto */
.sos-link {
  display: block;
  margin: 1.6rem auto .5rem;
  padding: .5rem 1rem;
  background: transparent;
  border: none;
  color: var(--ink-3);
  font-family: var(--ff-body);
  font-size: .82rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color .18s;
}
.sos-link:hover { color: var(--primary); }

/* Ritual mínimo */
.minimal-lead {
  font-family: var(--ff-head);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.55;
  margin: .6rem 0 1rem;
}

/* Resumen de check-in */
.summary-list { margin-top: 1rem; }
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid rgba(124,92,191,.1);
}
.summary-row:last-child { border-bottom: none; }
.summary-q { font-size: .86rem; color: var(--ink-2); }
.summary-v { font-size: .9rem; font-weight: 600; color: var(--primary-dark); flex-shrink: 0; }

/* SOS · opciones */
.sos-options { display: flex; flex-direction: column; gap: .7rem; margin-top: 1.1rem; }
.sos-option {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  text-align: left;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid rgba(124,92,191,.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .12s, box-shadow .18s, border-color .18s;
  font-family: var(--ff-body);
}
.sos-option:hover  { box-shadow: var(--shadow-md); border-color: var(--primary); transform: translateY(-1px); }
.sos-option:active { transform: scale(.99); }
.sos-option-title { font-size: .95rem; font-weight: 600; color: var(--ink); }
.sos-option-sub   { font-size: .8rem; color: var(--ink-3); line-height: 1.4; }
.sos-message {
  font-family: var(--ff-head);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.5;
  text-align: center;
  margin: 1rem 0 1.2rem;
}

/* SOS · respiración guiada */
.breathing-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 1.5rem;
}
.breathing-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem 0 1.8rem;
  background: radial-gradient(circle at 50% 40%, rgba(124,92,191,.28), rgba(232,168,124,.22));
  box-shadow: 0 8px 40px rgba(124,92,191,.3);
  animation: breathe 16s ease-in-out infinite;
}
.breathing-text {
  font-family: var(--ff-head);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--primary-dark);
  letter-spacing: .02em;
}
@keyframes breathe {
  0%   { transform: scale(.7); }
  25%  { transform: scale(1.08); }
  50%  { transform: scale(1.08); }
  75%  { transform: scale(.7); }
  100% { transform: scale(.7); }
}
@media (prefers-reduced-motion: reduce) {
  .breathing-circle { animation: none; transform: scale(.95); }
}

/* ─── Fase B — hito emocional, diario, evolución, logros ──────────────── */

/* Banner de hito emocional (streak) en la pantalla de hoy */
.milestone-banner {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin: 0 1rem 1rem;
  padding: .85rem 1rem;
  border-radius: var(--radius);
  background: linear-gradient(100deg, rgba(124,92,191,.12), rgba(232,168,124,.14));
  border: 1px solid rgba(124,92,191,.18);
}
.milestone-emoji { font-size: 1.5rem; line-height: 1; }
.milestone-day { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--primary-dark); font-weight: 600; }
.milestone-text { font-family: var(--ff-head); font-size: 1.02rem; color: var(--ink); margin-top: .1rem; }

/* Tarjeta de diario en la pantalla de hoy */
.diary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 1rem 0;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px dashed rgba(124,92,191,.28);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.diary-card:active { transform: scale(.985); }
.diary-card-title { font-family: var(--ff-head); font-size: 1.05rem; color: var(--ink); }
.diary-card-sub { font-size: .78rem; color: var(--ink-3); margin-top: .15rem; }
.diary-card-mark {
  display: flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; color: var(--primary);
  font-size: 1.3rem; line-height: 1;
}
.diary-card-mark svg { width: 16px; height: 16px; }

/* Campos del diario (bottom sheet) */
.diary-field { margin-top: 1.1rem; }
.diary-q-label { display: block; font-size: .84rem; font-weight: 600; color: var(--ink-2); margin-bottom: .4rem; }
.diary-input {
  width: 100%;
  box-sizing: border-box;
  padding: .7rem .8rem;
  font-family: var(--ff-body);
  font-size: .9rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid rgba(124,92,191,.22);
  border-radius: .7rem;
  resize: vertical;
  min-height: 2.6rem;
  line-height: 1.5;
}
.diary-input:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.diary-input::placeholder { color: var(--ink-3); }
.diary-error { color: #c0392b; font-size: .78rem; text-align: center; margin-top: .6rem; min-height: 1rem; }

/* Títulos de sección en "Mi progreso" */
.section-title {
  font-family: var(--ff-head);
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 1rem .7rem;
}

/* Evolución (Antes / Hoy) */
.evo-section { margin: 2rem 0 0; }
.evo-head {
  display: flex; justify-content: flex-end; gap: 2.4rem;
  padding: 0 1.3rem .3rem; margin: 0 1rem;
}
.evo-head span { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.evo-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 1rem; padding: .7rem 1.1rem;
  background: var(--surface); box-shadow: var(--shadow-sm);
  border-radius: var(--radius); margin-bottom: .5rem;
  animation: fadeUp .45s cubic-bezier(.2,.8,.4,1) both;
}
.evo-label { font-size: .88rem; color: var(--ink-2); }
.evo-values { display: flex; align-items: center; gap: .7rem; }
.evo-before, .evo-after {
  font-family: var(--ff-head); font-size: 1.15rem; color: var(--ink);
  min-width: 1.1rem; text-align: center;
}
.evo-before { color: var(--ink-3); }
.evo-arrow { font-size: 1rem; }
.evo-delta {
  font-size: .72rem; font-weight: 600; padding: .08rem .4rem;
  border-radius: 1rem; min-width: 1.6rem; text-align: center;
}
.evo-up   { color: #2e8b57; }
.evo-down { color: #c0392b; }
.evo-flat { color: var(--ink-3); }
.evo-delta.evo-up   { background: rgba(46,139,87,.12); }
.evo-delta.evo-down { background: rgba(192,57,43,.1); }

/* Hitos del camino */
.milestones-section { margin: 2rem 0 0; }
.milestone-row {
  display: flex; align-items: center; gap: .8rem;
  margin: 0 1rem .45rem; padding: .65rem 1.1rem;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); opacity: .55;
}
.milestone-row.reached { opacity: 1; }
.milestone-dot {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(124,92,191,.12); color: var(--primary);
  font-size: .8rem; font-weight: 700;
}
.milestone-row.reached .milestone-dot { background: var(--primary); color: #fff; }
.milestone-row-day { font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); min-width: 3.4rem; }
.milestone-row-label { font-size: .9rem; color: var(--ink); }

/* Logros / insignias */
.badges-section { margin: 2rem 0 0; }
.badges-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: .65rem; margin: 0 1rem;
}
.badge-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: .3rem; padding: 1rem .7rem;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); opacity: .5; filter: grayscale(.7);
  animation: fadeUp .45s cubic-bezier(.2,.8,.4,1) both;
}
.badge-card.earned { opacity: 1; filter: none; border: 1px solid rgba(124,92,191,.2); }
.badge-emoji { font-size: 1.7rem; line-height: 1; }
.badge-label { font-family: var(--ff-head); font-size: .92rem; color: var(--ink); }
.badge-desc { font-size: .7rem; color: var(--ink-3); line-height: 1.3; }

/* Diario: entradas registradas en "Mi progreso" */
.diary-section { margin: 2rem 0 0; }
.diary-entry {
  margin: 0 1rem .6rem; padding: .9rem 1.1rem;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  animation: fadeUp .45s cubic-bezier(.2,.8,.4,1) both;
}
.diary-entry-day {
  display: inline-block; font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary-dark); font-weight: 600;
  margin-bottom: .5rem;
}
.diary-entry-q { font-size: .76rem; color: var(--ink-3); margin-top: .5rem; }
.diary-entry-a { font-size: .9rem; color: var(--ink); line-height: 1.5; white-space: pre-wrap; }

/* ═══════════════════════════════════════════════════════════════════════════
   FASE C — recetas (categoría + substituciones), lista de compras,
   certificado y renovación
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Topbar: dos enlaces ─────────────────────────────────────────────────── */
.topbar-links { display: flex; align-items: center; gap: .25rem; }

/* ── Receta: badge de categoría ──────────────────────────────────────────── */
.recipe-cat-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: rgba(124,92,191,.1);
  border: 1px solid rgba(124,92,191,.18);
  padding: .28rem .7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* ── Receta: substituciones ("No tengo este ingrediente") ────────────────── */
.recipe-subs {
  margin-top: 1.1rem;
  background: var(--bg);
  border: 1px solid rgba(44,34,64,.08);
  border-radius: var(--radius);
  padding: .3rem .95rem;
}
.recipe-subs summary {
  list-style: none;
  cursor: pointer;
  font-size: .86rem;
  font-weight: 600;
  color: var(--primary-dark);
  padding: .7rem 0;
}
.recipe-subs summary::-webkit-details-marker { display: none; }
.recipe-subs summary::after { content: '＋'; float: right; color: var(--ink-3); }
.recipe-subs[open] summary::after { content: '－'; }
.recipe-subs-intro { font-size: .82rem; color: var(--ink-2); margin: 0 0 .5rem; }
.recipe-subs-list { list-style: none; padding: 0 0 .7rem; margin: 0; }
.recipe-subs-list li {
  font-size: .84rem;
  color: var(--ink-2);
  line-height: 1.5;
  padding: .35rem 0;
  border-top: 1px solid rgba(44,34,64,.06);
}
.recipe-subs-list li strong { color: var(--ink); font-weight: 600; }

/* ── Ayuno: versión más suave ────────────────────────────────────────────── */
.fasting-soft { border-color: rgba(232,168,124,.4); background: rgba(232,168,124,.08); }
.fasting-soft summary { color: var(--accent); }

/* ── Lista de compras ────────────────────────────────────────────────────── */
.shop-intro { padding: 0 1.25rem 1rem; }
.shop-week {
  font-family: var(--ff-head);
  font-size: 1.05rem;
  color: var(--primary-dark);
  margin: 0 0 .3rem;
}
.shop-hint { font-size: .85rem; color: var(--ink-2); line-height: 1.55; margin: 0; }

.shop-cat { padding: 0 1.25rem 1.4rem; }
.shop-cat-title {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 .6rem;
}
.shop-items { display: flex; flex-direction: column; gap: .5rem; }
.shop-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  background: var(--surface);
  border: 1px solid rgba(44,34,64,.07);
  border-radius: var(--radius);
  padding: .8rem .95rem;
  cursor: pointer;
  transition: background .18s, border-color .18s, opacity .18s;
  animation: fadeUp .4s ease both;
}
.shop-item:hover { border-color: rgba(124,92,191,.28); }
.shop-check {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border: 2px solid rgba(44,34,64,.2);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: background .18s, border-color .18s;
}
.shop-check svg { width: 13px; height: 13px; }
.shop-name { font-size: .93rem; color: var(--ink); transition: color .18s; }
.shop-item.checked { opacity: .62; }
.shop-item.checked .shop-check { background: var(--primary); border-color: var(--primary); }
.shop-item.checked .shop-name { text-decoration: line-through; color: var(--ink-3); }

/* ── Certificado ─────────────────────────────────────────────────────────── */
.certificate { width: 100%; margin: 1.6rem 0 1.2rem; }
.cert-frame {
  position: relative;
  background: linear-gradient(160deg, #fff, #FBF8FF);
  border: 1.5px solid rgba(124,92,191,.28);
  border-radius: var(--radius-lg, 20px);
  padding: 1.8rem 1.4rem;
  text-align: center;
  box-shadow: var(--shadow-sm, 0 8px 24px rgba(90,61,153,.1));
}
.cert-frame::before {
  content: '';
  position: absolute; inset: 8px;
  border: 1px solid rgba(124,92,191,.16);
  border-radius: 14px;
  pointer-events: none;
}
.cert-kicker {
  font-size: .7rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 .5rem;
}
.cert-brand {
  font-family: var(--ff-head); font-size: 1.25rem;
  color: var(--primary-dark); margin: 0 0 1rem;
}
.cert-caption { font-size: .8rem; color: var(--ink-2); margin: 0 0 .4rem; }
.cert-name {
  font-family: var(--ff-head); font-size: 1.7rem; line-height: 1.2;
  color: var(--ink); margin: 0 0 .3rem; word-break: break-word;
}
.cert-divider {
  width: 60px; height: 2px; margin: .9rem auto;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.cert-meta { font-size: .82rem; color: var(--ink-2); margin: 0 0 .5rem; }
.cert-sign { font-size: .82rem; color: var(--primary-dark); font-weight: 600; margin: 0; }

.cert-form { width: 100%; margin: 0 0 1.6rem; text-align: left; }
.cert-form-label {
  display: block; font-size: .82rem; color: var(--ink-2);
  margin: 0 0 .5rem; font-weight: 600;
}
.cert-form-row { display: flex; gap: .5rem; }
.cert-input {
  flex: 1 1 auto;
  font: inherit; font-size: .95rem;
  padding: .75rem .9rem;
  border: 1.5px solid rgba(44,34,64,.14);
  border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
.cert-input:focus { outline: none; border-color: var(--primary); }
.cert-save {
  flex: 0 0 auto;
  font: inherit; font-weight: 600; font-size: .9rem;
  padding: .75rem 1.2rem;
  border: none; border-radius: var(--radius);
  background: var(--primary); color: #fff; cursor: pointer;
  transition: background .18s;
}
.cert-save:hover { background: var(--primary-dark); }
.cert-save:disabled { opacity: .6; cursor: default; }
.cert-form-hint { font-size: .8rem; color: var(--primary); margin: .5rem 0 0; min-height: 1em; }

/* ── Renovación "¿Y ahora qué?" ──────────────────────────────────────────── */
.renewal { width: 100%; margin: .4rem 0 1.6rem; text-align: left; }
.renewal-heading {
  font-family: var(--ff-head); font-size: 1.3rem;
  color: var(--primary-dark); text-align: center; margin: 0 0 .4rem;
}
.renewal-intro {
  font-size: .87rem; color: var(--ink-2); text-align: center;
  line-height: 1.55; margin: 0 0 1.1rem;
}
.renewal-card {
  display: flex; align-items: flex-start; gap: .9rem;
  width: 100%; text-align: left;
  background: var(--surface);
  border: 1px solid rgba(44,34,64,.08);
  border-radius: var(--radius);
  padding: 1rem 1.05rem;
  margin-bottom: .7rem;
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s, transform .12s;
  animation: fadeUp .4s ease both;
}
.renewal-card:hover { border-color: rgba(124,92,191,.3); box-shadow: var(--shadow-sm, 0 6px 18px rgba(90,61,153,.08)); }
.renewal-card:active { transform: scale(.99); }
.renewal-emoji { font-size: 1.5rem; line-height: 1; flex: 0 0 auto; }
.renewal-body { display: flex; flex-direction: column; gap: .25rem; }
.renewal-title { font-size: .98rem; font-weight: 600; color: var(--ink); }
.renewal-desc { font-size: .84rem; color: var(--ink-2); line-height: 1.5; }
