/* =========================================================================
   Estela de Sabor — hoja de estilos
   Inspirada en el recetario: papel crema, cintas verde salvia y rosa palo,
   títulos tipográficos color chocolate y acentos caligráficos.
   ========================================================================= */

:root {
  --paper: #fffaf2;
  --cream: #f6eddf;
  --cream-2: #efe2cc;
  --line: #e5d3b8;
  --line-strong: #d6bf9c;

  --cocoa: #4a2c1f;
  --cocoa-2: #6b4636;
  --ink: #3d2a20;
  --muted: #7a6455;

  --sage: #7f8d5c;
  --sage-dark: #5f6c41;
  --sage-soft: #e7ead7;
  --teal: #2f6e66;
  --teal-soft: #dde9e3;
  --frame: #93ab9e;

  --rose: #c8706a;
  --rose-dark: #a7524d;
  --rose-soft: #f7e0da;
  --pink: #e8a5a1;
  --gold: #c9922f;
  --gold-soft: #f8ebcd;

  --danger: #b4423c;
  --live: #d6453d;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(74, 44, 31, .05), 0 10px 30px -18px rgba(74, 44, 31, .35);
  --shadow-lift: 0 2px 0 rgba(74, 44, 31, .05), 0 18px 40px -20px rgba(74, 44, 31, .45);

  --font-display: 'Fraunces', 'Georgia', serif;
  --font-script: 'Dancing Script', 'Brush Script MT', cursive;
  --font-body: 'Nunito', 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, .55), transparent 40%),
    radial-gradient(circle at 88% 30%, rgba(232, 165, 161, .10), transparent 35%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .32 0 0 0 0 .2 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--rose-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cocoa); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--cocoa); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px dashed var(--line-strong); margin: 2rem 0; }
:focus-visible { outline: 3px solid rgba(200, 112, 106, .55); outline-offset: 2px; border-radius: 6px; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 820px; }
.section { padding: 64px 0; }
.section--tight { padding: 36px 0; }
.stack > * + * { margin-top: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; }

/* ---------- Tipografía de marca ---------- */
.display { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; color: var(--cocoa); }
.script { font-family: var(--font-script); font-weight: 700; color: var(--sage-dark); text-transform: none; letter-spacing: 0; }
.script--rose { color: var(--rose); }
.script--teal { color: var(--teal); }
.title-block { text-align: center; margin-bottom: 2.2rem; }
.title-block h1, .title-block h2 { margin-bottom: .1em; }
.title-block .script { display: block; font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1; margin-top: .1em; }
.title-block p { max-width: 640px; margin: .8rem auto 0; color: var(--muted); }
.title-block--left { text-align: left; }
.title-block--left p { margin-left: 0; }
.eyebrow { font-weight: 800; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--rose-dark); }

.heart-rule { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--rose); margin: .6rem auto 0; }
.heart-rule::before, .heart-rule::after { content: ""; height: 1.5px; width: 70px; background: linear-gradient(90deg, transparent, var(--pink)); }
.heart-rule::after { transform: scaleX(-1); }
.heart-rule svg { width: 16px; height: 16px; }

.sprig { width: 44px; height: 44px; color: var(--sage); flex: none; }
.with-sprigs { display: inline-flex; align-items: center; gap: 14px; }
.with-sprigs .sprig:last-child { transform: scaleX(-1); }

/* ---------- Cintas (como "INGREDIENTES" en las fichas) ---------- */
.ribbon {
  display: inline-flex; align-items: center; gap: .45em;
  background: var(--sage); color: #fff;
  font: 800 .8rem/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase;
  padding: .62rem 1.6rem;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 50%, 100% 100%, 0 100%, 10px 50%);
}
.ribbon--rose { background: var(--rose); }
.ribbon--teal { background: var(--teal); }
.ribbon--cocoa { background: var(--cocoa-2); }
.ribbon--gold { background: var(--gold); }
.ribbon svg { width: 14px; height: 14px; }

/* ---------- Paneles con costura punteada ---------- */
.panel {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.panel::after {
  content: ""; position: absolute; inset: 6px; border-radius: calc(var(--radius) - 6px);
  border: 1.5px dashed rgba(200, 112, 106, .22); pointer-events: none;
}
.panel--sage::after { border-color: rgba(127, 141, 92, .35); }
.panel--plain::after { display: none; }
.panel--tinted { background: var(--gold-soft); border-color: #ecd6a6; }
.panel--rose { background: var(--rose-soft); border-color: #efc7bf; }
.panel--sagebg { background: var(--sage-soft); border-color: #d3d8bb; }
.panel--labeled { padding-top: 38px; margin-top: 18px; }
.panel-label { position: absolute; top: -15px; left: 22px; z-index: 1; }
.panel-label--center { left: 50%; transform: translateX(-50%); white-space: nowrap; }
.panel h3:first-child, .panel h2:first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--rose); --btn-fg: #fff; --btn-bd: var(--rose);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 800 .95rem/1 var(--font-body); letter-spacing: .02em;
  padding: .85rem 1.4rem; border-radius: 999px;
  border: 2px solid var(--btn-bd); background: var(--btn-bg); color: var(--btn-fg);
  text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: 0 6px 16px -8px rgba(167, 82, 77, .7);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); color: var(--btn-fg); box-shadow: 0 10px 20px -10px rgba(167, 82, 77, .8); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }
.btn--sage { --btn-bg: var(--sage); --btn-bd: var(--sage); box-shadow: 0 6px 16px -8px rgba(95, 108, 65, .8); }
.btn--teal { --btn-bg: var(--teal); --btn-bd: var(--teal); box-shadow: 0 6px 16px -8px rgba(47, 110, 102, .8); }
.btn--cocoa { --btn-bg: var(--cocoa); --btn-bd: var(--cocoa); box-shadow: 0 6px 16px -8px rgba(74, 44, 31, .8); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--cocoa); --btn-bd: var(--line-strong); box-shadow: none; }
.btn--ghost:hover { --btn-bg: var(--paper); --btn-fg: var(--cocoa); box-shadow: none; }
.btn--danger { --btn-bg: transparent; --btn-fg: var(--danger); --btn-bd: #e3b2ad; box-shadow: none; }
.btn--danger:hover { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: var(--danger); }
.btn--live { --btn-bg: var(--live); --btn-bd: var(--live); }
.btn--sm { padding: .55rem .95rem; font-size: .85rem; }
.btn--lg { padding: 1.05rem 1.9rem; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--rose-dark); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.inline-form { display: inline; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 246, 238, .92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header::after { content: ""; display: block; height: 4px; background: repeating-linear-gradient(90deg, var(--frame) 0 14px, transparent 14px 22px); opacity: .45; }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--cocoa); flex: none; }
.brand img { width: 54px; height: auto; filter: drop-shadow(0 3px 6px rgba(74, 44, 31, .18)); }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; line-height: 1; display: block; }
.brand-tag { font-family: var(--font-script); color: var(--rose); font-size: 1.05rem; line-height: 1; display: block; margin-top: 3px; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a, .main-nav .link-btn {
  position: relative; text-decoration: none; color: var(--cocoa-2); font-weight: 700; font-size: .95rem;
  padding: .5rem .75rem; border-radius: 999px;
}
.main-nav a:hover { background: var(--cream-2); color: var(--cocoa); }
.main-nav a.is-active { color: var(--rose-dark); }
.main-nav a.is-active::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 18px; height: 3px; margin-left: -9px; border-radius: 2px; background: var(--rose); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: 10px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 8px; color: var(--cocoa); cursor: pointer; }
.nav-toggle svg { width: 24px; height: 24px; display: block; }
.count-badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--rose); color: #fff; font-size: .72rem; font-weight: 800; line-height: 1;
}
.icon-link { display: inline-flex; align-items: center; gap: 6px; }
.icon-link svg { width: 20px; height: 20px; }

.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); font-weight: 700; color: var(--cocoa); }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu[open] summary { border-color: var(--rose); }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lift); padding: 8px; display: grid; }
.user-menu .menu a, .user-menu .menu button { text-align: left; padding: .6rem .8rem; border-radius: 10px; text-decoration: none; color: var(--cocoa); font: 700 .92rem var(--font-body); background: none; border: 0; cursor: pointer; display: flex; gap: 10px; align-items: center; }
.user-menu .menu a:hover, .user-menu .menu button:hover { background: var(--cream); }
.user-menu .menu svg { width: 18px; height: 18px; color: var(--muted); }
.user-menu .menu-head { padding: .5rem .8rem .7rem; border-bottom: 1px dashed var(--line); margin-bottom: 6px; }
.user-menu .menu-head small { display: block; color: var(--muted); font-size: .8rem; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font: 800 .82rem var(--font-body);
  background: var(--sage-soft); color: var(--sage-dark); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line);
}
.avatar--staff { background: var(--rose-soft); color: var(--rose-dark); }
.avatar--lg { width: 64px; height: 64px; font-size: 1.2rem; }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 20px 20px;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lift);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: .8rem 1rem; }
  .main-nav a.is-active::after { display: none; }
  .nav-actions { margin: 10px 0 0; flex-wrap: wrap; }
  .user-menu .menu { position: static; box-shadow: none; margin-top: 8px; }
}

/* ---------- Mensajes flash ---------- */
.flashes { margin-top: 18px; display: grid; gap: 10px; }
.flash { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; border: 1px solid; font-weight: 600; }
.flash svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.flash--success { background: var(--sage-soft); border-color: #cfd5b2; color: var(--sage-dark); }
.flash--error { background: var(--rose-soft); border-color: #eebdb5; color: var(--rose-dark); }
.flash--info { background: var(--gold-soft); border-color: #ecd59f; color: #7a5717; }

/* ---------- Portada (hero) ---------- */
.hero { padding: 54px 0 40px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.9rem); text-transform: uppercase; letter-spacing: .005em; margin: .9rem 0 .2rem; }
.hero h1 .script { display: block; text-transform: none; font-size: .78em; color: var(--rose); margin-top: .08em; }
.hero-lead { font-size: 1.15rem; color: var(--cocoa-2); max-width: 540px; }
.hero-art { position: relative; }
.hero-art .frame {
  border-radius: 220px 220px 28px 28px; overflow: hidden; border: 10px solid var(--paper);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-lift); background: var(--paper);
  aspect-ratio: 4 / 3.5;
}
.hero-art .frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero-art .logo-badge { position: absolute; width: 150px; left: -36px; top: -16px; transform: rotate(-6deg); filter: drop-shadow(0 10px 16px rgba(74, 44, 31, .25)); }
.hero-art .stamp {
  position: absolute; right: -12px; bottom: 34px; width: 150px; height: 150px; border-radius: 50%;
  background: var(--rose); color: #fff; display: grid; place-items: center; text-align: center; padding: 18px;
  font-family: var(--font-script); font-size: 1.25rem; line-height: 1.15; transform: rotate(8deg);
  box-shadow: 0 12px 24px -12px rgba(167, 82, 77, .9); outline: 2px dashed rgba(255, 255, 255, .65); outline-offset: -9px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.6rem; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 46px; }
.feature { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.feature .ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-soft); color: var(--sage-dark); flex: none; }
.feature:nth-child(2) .ico { background: var(--rose-soft); color: var(--rose-dark); }
.feature:nth-child(3) .ico { background: var(--gold-soft); color: #8d6418; }
.feature:nth-child(4) .ico { background: var(--teal-soft); color: var(--teal); }
.feature .ico svg { width: 22px; height: 22px; }
.feature strong { display: block; color: var(--cocoa); line-height: 1.2; }
.feature span { font-size: .85rem; color: var(--muted); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; margin: 10px auto 0; }
  .hero-art .logo-badge { width: 110px; left: -8px; }
  .hero-art .stamp { width: 120px; height: 120px; font-size: 1.05rem; right: 0; }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }

/* ---------- Rejillas y tarjetas ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
@media (max-width: 980px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
  color: inherit; text-decoration: none;
}
a.card:hover, .card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); color: inherit; }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--cream-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
a.card:hover .card-media img { transform: scale(1.04); }
.card-media .ribbon { position: absolute; left: 14px; bottom: 14px; }
.card-media .lock { position: absolute; right: 12px; top: 12px; }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.3rem; }
.card-body h3 .script { display: block; font-size: 1.35rem; line-height: 1.1; margin-top: 2px; }
.card-body p { margin: 0; color: var(--muted); font-size: .95rem; }
.card-foot { margin-top: auto; padding-top: .8rem; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--line-strong); background: repeating-linear-gradient(45deg, var(--cream), var(--cream) 12px, var(--cream-2) 12px, var(--cream-2) 24px); }
.card-placeholder svg { width: 54px; height: 54px; }

.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .88rem; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { width: 16px; height: 16px; color: var(--sage); }

/* ---------- Insignias ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: .25rem .65rem; border-radius: 999px;
  font: 800 .72rem/1.2 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  background: var(--cream-2); color: var(--cocoa-2); border: 1px solid transparent; white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; }
.badge--sage, .badge--active, .badge--confirmed { background: var(--sage-soft); color: var(--sage-dark); border-color: #d3d8bb; }
.badge--rose, .badge--suspended, .badge--cancelled { background: var(--rose-soft); color: var(--rose-dark); border-color: #eec2bb; }
.badge--gold, .badge--pending { background: var(--gold-soft); color: #87601a; border-color: #ecd59f; }
.badge--teal, .badge--public { background: var(--teal-soft); color: var(--teal); border-color: #c4d9d1; }
.badge--cocoa { background: var(--cocoa); color: #fff; }
.badge--lock { background: rgba(74, 44, 31, .82); color: #fff; backdrop-filter: blur(4px); }
.badge--live { background: var(--live); color: #fff; animation: pulse 1.8s ease-in-out infinite; }
.badge--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(214, 69, 61, .18); } }
@media (prefers-reduced-motion: reduce) { .badge--live { animation: none; } * { transition: none !important; } }

/* ---------- Programas ---------- */
.program-row { display: grid; grid-template-columns: 380px 1fr; gap: 0; }
.program-row .card-media { aspect-ratio: auto; min-height: 100%; }
@media (max-width: 860px) { .program-row { grid-template-columns: 1fr; } .program-row .card-media { aspect-ratio: 16 / 9; } }
.program-hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .program-hero { grid-template-columns: 1fr; } }
.program-cover { border-radius: var(--radius); overflow: hidden; border: 8px solid var(--paper); box-shadow: 0 0 0 1px var(--line), var(--shadow-lift); }
.program-cover img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; background: var(--gold-soft); border: 1px solid #ecd6a6; border-radius: 16px; overflow: hidden; }
.fact { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-right: 1px dashed #e1c88f; }
.fact:last-child { border-right: 0; }
.fact svg { width: 30px; height: 30px; color: var(--gold); flex: none; }
.fact small { display: block; font-weight: 800; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sage-dark); }
.fact strong { display: block; font-family: var(--font-display); color: var(--cocoa); font-size: 1.05rem; line-height: 1.2; }
.cohort { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 16px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.cohort:last-child { border-bottom: 0; padding-bottom: 0; }
.cohort:first-child { padding-top: 0; }
.cohort .date { display: flex; gap: 14px; align-items: center; }
.date-chip { width: 58px; flex: none; text-align: center; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.date-chip b { display: block; background: var(--rose); color: #fff; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; padding: 3px 0; }
.date-chip span { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; color: var(--cocoa); padding: 2px 0 4px; }
.seats { font-size: .85rem; font-weight: 700; color: var(--sage-dark); }
.seats--low { color: var(--rose-dark); }

.modules { counter-reset: mod; display: grid; gap: 14px; }
.module { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start; padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.module-num { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--sage); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35); }
.module:nth-child(3n+2) .module-num { background: var(--rose); }
.module:nth-child(3n) .module-num { background: var(--teal); }
.module h3 { margin: 0 0 .2rem; }
.module p { margin: 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: .7rem; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: .3rem .75rem; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); font-size: .85rem; font-weight: 700; color: var(--cocoa-2); text-decoration: none; }
a.chip:hover { border-color: var(--rose); color: var(--rose-dark); }
.chip svg { width: 14px; height: 14px; color: var(--sage); }

/* ---------- Ficha de receta ---------- */
.recipe-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-top: 30px; }
@media (max-width: 900px) { .recipe-hero { grid-template-columns: 1fr; } }
.recipe-title { font-size: clamp(2.4rem, 6vw, 4rem); text-transform: uppercase; margin: .4rem 0 0; line-height: .95; }
.recipe-title .script { display: block; text-transform: none; font-size: .8em; line-height: 1; margin-top: .1em; }
.recipe-tagline { display: inline-flex; gap: 10px; align-items: flex-start; margin-top: 1.4rem; padding: 14px 18px; border: 1.5px dashed var(--line-strong); border-radius: 14px; background: rgba(255, 250, 242, .7); color: var(--cocoa-2); font-size: 1.05rem; }
.recipe-tagline svg { width: 18px; height: 18px; color: var(--rose); flex: none; margin-top: 4px; }
.recipe-photo { position: relative; }
.recipe-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50% 50% 24px 24px / 38% 38% 24px 24px; border: 10px solid var(--paper); box-shadow: 0 0 0 1px var(--line), var(--shadow-lift); }
.recipe-photo .stamp-note { position: absolute; left: -10px; bottom: 20px; background: var(--sage); color: #fff; font-family: var(--font-script); font-size: 1.2rem; padding: 12px 18px; border-radius: 14px; transform: rotate(-4deg); box-shadow: var(--shadow-lift); outline: 1.5px dashed rgba(255, 255, 255, .6); outline-offset: -6px; max-width: 220px; line-height: 1.2; }
.recipe-layout { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 30px; }
@media (max-width: 960px) { .recipe-layout { grid-template-columns: 1fr; } }
.recipe-side { position: sticky; top: 100px; display: grid; gap: 30px; }
@media (max-width: 960px) { .recipe-side { position: static; } }
.ingredient-group + .ingredient-group { margin-top: 1.1rem; }
.group-title { font-family: var(--font-display); font-weight: 700; color: var(--rose-dark); font-size: 1.05rem; margin: 0 0 .4rem; display: flex; gap: 8px; align-items: center; }
.group-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { border-bottom: 1px dashed var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: .55rem 0; cursor: pointer; }
.checklist input { appearance: none; width: 20px; height: 20px; flex: none; margin-top: 3px; border: 2px solid var(--line-strong); border-radius: 6px; background: #fff; display: grid; place-items: center; cursor: pointer; }
.checklist input:checked { background: var(--sage); border-color: var(--sage); }
.checklist input:checked::after { content: ""; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.checklist input:checked + span { text-decoration: line-through; color: var(--muted); }
.utensils { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.utensils li { display: flex; gap: 8px; align-items: center; padding: .55rem .7rem; border-radius: 12px; background: var(--cream); font-size: .9rem; font-weight: 600; color: var(--cocoa-2); line-height: 1.25; }
.utensils svg { width: 18px; height: 18px; color: var(--rose); flex: none; }
.steps-group + .steps-group { margin-top: 2.2rem; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.1rem 58px; min-height: 44px; margin-bottom: 1.1rem; border-bottom: 1px dashed var(--line); }
.steps li:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--rose); color: #fff; font: 800 1.1rem var(--font-display);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35);
}
.steps-group:nth-child(even) .steps li::before { background: var(--teal); }
.tips { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.tips li { display: flex; gap: 10px; align-items: flex-start; }
.tips svg { width: 18px; height: 18px; color: #fff; flex: none; margin-top: 4px; }
.prose { font-size: 1.04rem; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 4px solid var(--pink); background: var(--rose-soft); border-radius: 0 12px 12px 0; color: var(--cocoa-2); }
.prose blockquote p:last-child { margin: 0; }
.prose img { border-radius: 14px; margin: 1em 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .25em 0; }
.prose table, .table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .95rem; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper); }
.prose th, .table th { background: var(--rose-soft); color: var(--rose-dark); text-align: left; font-weight: 800; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; padding: 10px 14px; }
.prose td, .table td { padding: 10px 14px; border-top: 1px dashed var(--line); vertical-align: top; }
.prose tr:nth-child(even) td { background: rgba(246, 237, 223, .5); }
.table-wrap { overflow-x: auto; border-radius: 14px; }
.locked {
  text-align: center; padding: 50px 30px; background: linear-gradient(180deg, rgba(255, 250, 242, 0), var(--paper) 30%);
}
.locked .lock-icon { width: 70px; height: 70px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: var(--rose-soft); color: var(--rose-dark); }
.locked .lock-icon svg { width: 32px; height: 32px; }
.blurred { filter: blur(5px); user-select: none; pointer-events: none; opacity: .55; max-height: 240px; overflow: hidden; }
.card-sheet img { border-radius: 12px; border: 1px solid var(--line); }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .form-row, .form-row--3 { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field > label, .field-label { font-weight: 800; font-size: .88rem; color: var(--cocoa); }
.field .hint { font-size: .82rem; color: var(--muted); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=url], input[type=number],
input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; font: 500 1rem var(--font-body); color: var(--ink);
  background: #fffdf9; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: .72rem .9rem; transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
textarea.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: .9rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 4px rgba(200, 112, 106, .15); }
input[type=file] { font: inherit; font-size: .9rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--rose); flex: none; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-top: 6px; }
.form-error { background: var(--rose-soft); color: var(--rose-dark); border: 1px solid #eebdb5; padding: 12px 16px; border-radius: 12px; font-weight: 700; }
fieldset { border: 1.5px dashed var(--line-strong); border-radius: 16px; padding: 18px 20px 20px; margin: 0; display: grid; gap: 16px; }
legend { padding: 0 8px; font-family: var(--font-display); font-weight: 700; color: var(--cocoa); }
.thumb { width: 120px; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* ---------- Autenticación ---------- */
.auth-wrap { display: grid; place-items: center; padding: 50px 20px 70px; }
.auth-card { width: 100%; max-width: 460px; }
.auth-card .brand-mark { width: 110px; margin: -80px auto 6px; filter: drop-shadow(0 8px 14px rgba(74, 44, 31, .25)); }

/* ---------- Aula / Panel (layout con barra lateral) ---------- */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; padding-top: 30px; padding-bottom: 60px; align-items: start; }
.sidenav { position: sticky; top: 100px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.sidenav-title { font-family: var(--font-script); font-size: 1.5rem; color: var(--rose); padding: 4px 10px 8px; line-height: 1; }
.sidenav-section { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.sidenav a { display: flex; align-items: center; gap: 10px; padding: .6rem .8rem; border-radius: 12px; text-decoration: none; color: var(--cocoa-2); font-weight: 700; font-size: .94rem; }
.sidenav a svg { width: 19px; height: 19px; color: var(--sage); flex: none; }
.sidenav a:hover { background: var(--cream); color: var(--cocoa); }
.sidenav a.is-active { background: var(--rose-soft); color: var(--rose-dark); }
.sidenav a.is-active svg { color: var(--rose); }
.sidenav a .count-badge { margin-left: auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { margin: 0; font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.page-head .script { font-size: 1.5rem; display: block; line-height: 1; }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: .5rem; }
.breadcrumb a { color: var(--muted); }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; gap: 18px; padding-top: 18px; }
  .sidenav { position: static; display: flex; gap: 4px; overflow-x: auto; padding: 8px; scrollbar-width: none; }
  .sidenav-title, .sidenav-section { display: none; }
  .sidenav a { flex: none; white-space: nowrap; }
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; text-decoration: none; color: inherit; display: block; box-shadow: var(--shadow); }
a.stat:hover { border-color: var(--rose); color: inherit; }
.stat small { display: block; font-weight: 800; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat strong { display: block; font-family: var(--font-display); font-size: 2.2rem; color: var(--cocoa); line-height: 1.1; margin-top: 4px; }
.stat--alert strong { color: var(--rose-dark); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px dashed var(--line); }
.list > li:first-child { padding-top: 0; }
.list > li:last-child { border-bottom: 0; padding-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 800; color: var(--cocoa); text-decoration: none; display: block; }
a.title:hover { color: var(--rose-dark); }
.list .sub { font-size: .87rem; color: var(--muted); }
.empty { text-align: center; padding: 30px 20px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; color: var(--line-strong); margin: 0 auto 10px; }

.next-class { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; }
@media (max-width: 700px) { .next-class { grid-template-columns: 1fr; } }
.next-class .date-chip { width: 82px; }
.next-class .date-chip span { font-size: 2rem; }
.countdown { font-weight: 800; color: var(--teal); }

/* ---------- Clase en vivo ---------- */
.player { position: relative; aspect-ratio: 16 / 9; background: var(--cocoa); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lift); border: 8px solid var(--paper); outline: 1px solid var(--line); }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player-placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; color: #fbeee2; background: radial-gradient(circle at 30% 20%, #6b4636, #3a2218); }
.player-placeholder h2 { color: #fff; }
.player-placeholder .script { color: var(--pink); font-size: 1.8rem; }
.player-placeholder svg { width: 56px; height: 56px; margin: 0 auto 12px; color: var(--pink); }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .lesson-layout { grid-template-columns: 1fr; } }

/* ---------- Calendario ---------- */
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-head h2 { margin: 0; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); gap: 1px; }
.cal-dow { background: var(--rose-soft); color: var(--rose-dark); font-weight: 800; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; padding: 10px; text-align: center; }
.cal-day { background: var(--paper); min-height: 112px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.cal-day.is-out { background: #f8f1e5; }
.cal-day.is-out .cal-num { color: #c5b29a; }
.cal-num { font-weight: 800; font-size: .85rem; color: var(--cocoa-2); }
.cal-day.is-today .cal-num { background: var(--rose); color: #fff; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.cal-event { display: block; font-size: .76rem; line-height: 1.25; padding: 4px 6px; border-radius: 8px; text-decoration: none; background: var(--sage-soft); color: var(--sage-dark); border-left: 3px solid var(--sage); font-weight: 700; overflow: hidden; }
.cal-event:hover { background: var(--sage); color: #fff; }
.cal-event--public { background: var(--teal-soft); color: var(--teal); border-color: var(--teal); }
.cal-event--cohort { background: var(--gold-soft); color: #87601a; border-color: var(--gold); }
.cal-event--past { opacity: .65; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .85rem; color: var(--muted); margin-top: 12px; }
.cal-legend span { display: inline-flex; gap: 6px; align-items: center; }
.cal-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
@media (max-width: 760px) {
  .cal { grid-template-columns: 1fr; background: transparent; border: 0; gap: 8px; }
  .cal-dow, .cal-day.is-out, .cal-day.is-empty { display: none; }
  .cal-day { min-height: 0; border: 1px solid var(--line); border-radius: 12px; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .cal-day .cal-num::after { content: attr(data-dow); margin-left: 6px; font-weight: 600; color: var(--muted); }
  .cal-event { flex: 1 1 100%; }
}
.agenda .list > li { align-items: flex-start; }

/* ---------- Mensajes ---------- */
.conv-list .list > li { padding: 16px 0; }
.conv-unread .title::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); margin-left: 8px; vertical-align: middle; }
.chat { display: flex; flex-direction: column; gap: 14px; max-height: 60vh; overflow-y: auto; padding: 6px 4px 6px 0; scroll-behavior: smooth; }
.bubble-row { display: flex; gap: 10px; align-items: flex-end; max-width: 82%; }
.bubble-row.is-mine { margin-left: auto; flex-direction: row-reverse; }
.bubble { background: #fff; border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; padding: 12px 16px; box-shadow: var(--shadow); }
.bubble p:last-child { margin: 0; }
.bubble-row.is-mine .bubble { background: var(--rose-soft); border-color: #efc7bf; border-radius: 18px 18px 6px 18px; }
.bubble-row.is-staff:not(.is-mine) .bubble { background: var(--sage-soft); border-color: #d3d8bb; }
.bubble-meta { font-size: .76rem; color: var(--muted); margin-bottom: 4px; font-weight: 700; }
.composer { display: grid; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.composer textarea { min-height: 90px; }

/* ---------- Foro ---------- */
.forum-cat { display: grid; grid-template-columns: 52px 1fr auto; gap: 16px; align-items: center; }
.forum-cat .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--sage-soft); color: var(--sage-dark); }
.forum-cat:nth-child(2n) .ico { background: var(--rose-soft); color: var(--rose-dark); }
.forum-cat .ico svg { width: 26px; height: 26px; }
.forum-stats { text-align: right; font-size: .85rem; color: var(--muted); }
@media (max-width: 640px) { .forum-cat { grid-template-columns: 52px 1fr; } .forum-stats { grid-column: 2; text-align: left; } }
.post { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-bottom: 1px dashed var(--line); }
.post:last-child { border-bottom: 0; }
.post-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.post-head strong { color: var(--cocoa); }
.post-body p:last-child { margin-bottom: 0; }
.post-tools { display: flex; gap: 12px; margin-top: 8px; font-size: .85rem; }

/* ---------- Tablas del panel ---------- */
.table td .title { font-weight: 800; color: var(--cocoa); text-decoration: none; }
.table td .sub { display: block; font-size: .85rem; color: var(--muted); }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions form { display: inline; }
.table tr.is-pending td { background: #fffaf0; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filters input[type=search] { max-width: 280px; }
.filters select { width: auto; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a { padding: .5rem 1rem; border-radius: 999px; text-decoration: none; font-weight: 800; font-size: .88rem; color: var(--cocoa-2); background: var(--paper); border: 1px solid var(--line); }
.tabs a.is-active { background: var(--cocoa); color: #fff; border-color: var(--cocoa); }
details.editor { border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
details.editor > summary { cursor: pointer; padding: 14px 18px; font-weight: 800; color: var(--cocoa); list-style: none; display: flex; gap: 12px; align-items: center; }
details.editor > summary::-webkit-details-marker { display: none; }
details.editor > summary::after { content: "Editar"; margin-left: auto; font-size: .8rem; color: var(--rose-dark); }
details.editor[open] > summary::after { content: "Cerrar"; }
details.editor > .editor-body { padding: 0 18px 18px; }
.syntax-help { font-size: .82rem; background: var(--cream); border-radius: 10px; padding: 10px 12px; color: var(--cocoa-2); }
.syntax-help code { background: #fff; padding: 1px 5px; border-radius: 5px; }

/* ---------- Pie de página ---------- */
.site-footer { margin-top: 40px; background: var(--teal); color: #e9f1ec; position: relative; }
.site-footer::before { content: ""; display: block; height: 18px; background: radial-gradient(circle at 10px -2px, transparent 12px, var(--teal) 13px) 0 0 / 20px 18px repeat-x; margin-top: -17px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 30px; padding: 44px 0 26px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-weight: 800; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .9rem; }
.site-footer a { color: #e9f1ec; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand img { width: 84px; }
.footer-script { font-family: var(--font-script); font-size: 2rem; color: var(--pink); line-height: 1; }
.footer-bottom { border-top: 1px dashed rgba(255, 255, 255, .25); padding: 16px 0 22px; font-size: .85rem; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: #bfd3cb; }

/* ---------- Bloques varios ---------- */
.cta-band { background: var(--rose); color: #fff; border-radius: 26px; padding: 44px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; position: relative; overflow: hidden; box-shadow: var(--shadow-lift); }
.cta-band::after { content: ""; position: absolute; inset: 8px; border-radius: 20px; border: 2px dashed rgba(255, 255, 255, .45); pointer-events: none; }
.cta-band h2 { color: #fff; margin: 0; }
.cta-band .script { color: #fff4ea; font-size: 1.8rem; }
.cta-band p { margin: .5rem 0 0; color: #fff1ee; }
.cta-band .btn { --btn-bg: #fff; --btn-fg: var(--rose-dark); --btn-bd: #fff; position: relative; z-index: 1; }
@media (max-width: 700px) { .cta-band { grid-template-columns: 1fr; padding: 32px 26px; } }
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
.about-photo { position: relative; }
.about-photo img { border-radius: 24px; border: 8px solid var(--paper); box-shadow: 0 0 0 1px var(--line), var(--shadow-lift); aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.about-photo .ribbon { position: absolute; top: 22px; right: -12px; }
.post-cover { border-radius: 20px; overflow: hidden; border: 8px solid var(--paper); box-shadow: 0 0 0 1px var(--line), var(--shadow); margin-bottom: 1.6rem; }
.post-cover img { width: 100%; max-height: 420px; object-fit: cover; }
.status-steps { display: grid; gap: 14px; counter-reset: s; list-style: none; padding: 0; margin: 0; }
.status-steps li { display: flex; gap: 14px; align-items: flex-start; }
.status-steps li::before { counter-increment: s; content: counter(s); width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--sage); color: #fff; display: grid; place-items: center; font-weight: 800; }
.status-steps li.is-done::before { content: "✓"; background: var(--sage-dark); }
.status-steps li.is-current::before { background: var(--rose); }

/* ---------- Impresión de recetas ---------- */
@media print {
  body { background: #fff; font-size: 12pt; }
  .site-header, .site-footer, .no-print, .flashes, .sidenav { display: none !important; }
  .recipe-side { position: static; }
  .panel { box-shadow: none; break-inside: avoid; }
  .recipe-layout { grid-template-columns: 1fr 1.4fr; }
  .recipe-photo img { max-width: 240px; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- Ajustes finos ---------- */
.list > li { flex-wrap: wrap; }
.list > li > .grow { flex: 1 1 220px; }
.player-placeholder .countdown { color: var(--pink); font-size: 1.15rem; }
details.viewer > summary::after { content: "Ver"; }
details.viewer[open] > summary::after { content: "Ocultar"; }
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cal-head { flex-wrap: nowrap; }
.cal-head h2 { flex: 1; text-align: center; font-size: clamp(1.2rem, 4vw, 1.8rem); }

/* ---------- Especialidades ---------- */
.nav-menu { position: relative; }
.nav-menu > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  font: 700 .95rem var(--font-body); color: var(--cocoa-2); padding: .5rem .75rem; border-radius: 999px;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::marker { content: ''; }
.nav-menu > summary:hover, .nav-menu[open] > summary { background: var(--cream-2); color: var(--cocoa); }
.nav-menu > summary.is-active { color: var(--rose-dark); }
.nav-caret { width: 14px; height: 14px; transform: rotate(90deg); transition: transform .15s ease; }
.nav-menu[open] .nav-caret { transform: rotate(-90deg); }
.nav-menu-panel {
  position: absolute; left: 50%; top: calc(100% + 10px); transform: translateX(-50%); z-index: 60;
  width: min(720px, 92vw); background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 22px 14px; box-shadow: var(--shadow-lift);
}
.nav-menu-panel::after { content: ""; position: absolute; inset: 6px; border-radius: 13px; border: 1.5px dashed rgba(200, 112, 106, .2); pointer-events: none; }
.nav-tree, .nav-tree-subs { list-style: none; margin: 0; padding: 0; }
.nav-tree { columns: 3; column-gap: 26px; }
.nav-tree-item { break-inside: avoid; padding: 2px 0 10px; }
.main-nav .nav-tree-top {
  display: flex; align-items: center; gap: 10px; padding: .4rem .55rem; border-radius: 10px;
  font: 700 1rem var(--font-display); color: var(--cocoa); text-decoration: none;
}
.main-nav .nav-tree-top svg { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--rose-soft); color: var(--rose-dark); flex: none; }
.nav-tree-subs { margin: 2px 0 0 1.35rem; padding-left: .8rem; border-left: 2px solid var(--line); }
.main-nav .nav-tree-subs a {
  display: block; padding: .28rem .55rem; border-radius: 8px; text-decoration: none;
  font: 600 .9rem var(--font-body); color: var(--cocoa-2);
}
.main-nav .nav-tree-top:hover, .main-nav .nav-tree-subs a:hover { background: var(--cream); color: var(--rose-dark); }
.main-nav .nav-menu-all {
  display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 4px; padding: .5rem .55rem 0;
  border-top: 1px dashed var(--line); font-size: .88rem; color: var(--rose-dark); text-decoration: none;
}
.main-nav .nav-menu-all svg { width: 16px; height: 16px; }
@media (max-width: 980px) {
  .nav-menu > summary { width: 100%; padding: .8rem 1rem; justify-content: space-between; }
  .nav-menu-panel { position: relative; left: auto; top: auto; transform: none; width: auto; box-shadow: none; margin: 4px 0 8px; padding: 14px 12px 10px; }
  .nav-tree { columns: 2; }
}
@media (max-width: 560px) { .nav-tree { columns: 1; } }

.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.spec-card {
  --tone: var(--sage); --tone-soft: var(--sage-soft);
  position: relative; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.spec-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); color: inherit; }
.spec-card:nth-child(5n+2) { --tone: var(--rose); --tone-soft: var(--rose-soft); }
.spec-card:nth-child(5n+3) { --tone: var(--gold); --tone-soft: var(--gold-soft); }
.spec-card:nth-child(5n+4) { --tone: var(--teal); --tone-soft: var(--teal-soft); }
.spec-card:nth-child(5n+5) { --tone: var(--cocoa-2); --tone-soft: var(--cream-2); }
.spec-card .spec-ico { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.spec-card .spec-ico svg { width: 28px; height: 28px; }
.spec-card h3 { margin: 0; font-size: 1.3rem; }
.spec-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.spec-card .spec-img { margin: -22px -22px 4px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; aspect-ratio: 16/9; }
.spec-card .spec-img img { width: 100%; height: 100%; object-fit: cover; }
.spec-subs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.spec-subs .chip { font-size: .78rem; padding: .2rem .6rem; }
.spec-hero { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.spec-hero .spec-ico { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--rose-soft); color: var(--rose-dark); }
.spec-hero .spec-ico svg { width: 40px; height: 40px; }
@media (max-width: 600px) { .spec-hero { grid-template-columns: 1fr; } }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: -8px 0 28px; }
.filter-chips a { text-decoration: none; padding: .45rem .95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--cocoa-2); font-weight: 700; font-size: .88rem; }
.filter-chips a:hover { border-color: var(--rose); color: var(--rose-dark); }
.filter-chips a.is-active { background: var(--cocoa); border-color: var(--cocoa); color: #fff; }
.cat-badge { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.cat-badge svg { width: 14px; height: 14px; }

.spec-hero + .filter-chips { margin-top: 1.6rem; }

/* ---------- Admin: especialidades ---------- */
.spec-admin { padding: 10px 18px; }
.spec-group { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.spec-group:last-child { border-bottom: 0; }
.spec-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 8px 6px; border-radius: 12px; }
.spec-row:hover { background: rgba(246, 237, 223, .6); }
.spec-row.is-hidden > .grow strong, .spec-row.is-hidden > .spec-row-ico { opacity: .5; }
.spec-row > .grow { flex: 1 1 200px; }
.spec-row strong { font-family: var(--font-display); font-size: 1.1rem; color: var(--cocoa); }
.spec-row--sub strong { font-family: var(--font-body); font-size: .98rem; }
.spec-row-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--rose-soft); color: var(--rose-dark); flex: none; }
.spec-row--sub .spec-row-ico { width: 28px; height: 28px; background: var(--cream-2); color: var(--cocoa-2); }
.spec-row-ico svg { width: 18px; height: 18px; }
.spec-row-tools { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--cocoa-2); font-weight: 800; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover:not([disabled]) { border-color: var(--rose); color: var(--rose-dark); }
.icon-btn[disabled] { opacity: .35; cursor: default; }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn--danger:hover:not([disabled]) { border-color: var(--danger); color: var(--danger); }
.spec-row-edit { flex: 1 1 100%; }
.spec-row-edit > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; color: var(--rose-dark); }
.spec-row-edit > summary::-webkit-details-marker { display: none; }
.spec-row-edit > summary svg { width: 14px; height: 14px; }
.spec-row-edit[open] > summary { margin-bottom: 10px; }
.spec-row-edit-body { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.spec-children { margin-left: 18px; padding-left: 16px; border-left: 2px solid var(--line); }
.spec-add-sub { display: flex; gap: 8px; align-items: center; padding: 8px 6px 2px; }
.spec-add-sub input[type=text] { max-width: 340px; padding: .5rem .75rem; font-size: .92rem; }
.icon-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-choice input { position: absolute; opacity: 0; pointer-events: none; }
.icon-choice span { width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line); display: grid; place-items: center; color: var(--cocoa-2); background: var(--paper); cursor: pointer; }
.icon-choice span svg { width: 20px; height: 20px; }
.icon-choice input:checked + span { border-color: var(--rose); background: var(--rose-soft); color: var(--rose-dark); }
.icon-choice input:focus-visible + span { outline: 3px solid rgba(200, 112, 106, .55); outline-offset: 2px; }
@media (max-width: 640px) { .spec-children { margin-left: 6px; padding-left: 10px; } .spec-add-sub { flex-wrap: wrap; } }
