/* ==========================================================
   Lo que no pude decir…  —  hoja de estilos compartida
   ========================================================== */

/* Los tokens (css/tokens.css) se enlazan directamente desde cada página, antes de esta hoja. */


*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

/* Texto escrito por personas: nunca debe desbordarse, aunque tenga palabras muy largas */
.letter-to, .letter-body, .sc-text, .sc-reply-text, .sc-label, .story-text, .reply-text,
.your-words-text, .paper { overflow-wrap: anywhere; }

/* Transición suave entre páginas (navegadores que la soportan) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }

::selection { background: var(--ember-soft); color: var(--ink); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Marca ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--serif);
  font-size: var(--fs-lead);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.brand-mark i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.brand-mark i:nth-child(2) { opacity: 0.6; }
.brand-mark i:nth-child(3) { opacity: 0.28; }

/* Puntos suspensivos que respiran */
.ellipsis span {
  display: inline-block;
  animation: breathe 3.6s var(--ease) infinite;
}
.ellipsis span:nth-child(2) { animation-delay: 0.4s; }
.ellipsis span:nth-child(3) { animation-delay: 0.8s; }

@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 246, 239, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header--night {
  position: absolute;
  left: 0; right: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--night-text);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 1rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav a {
  text-decoration: none;
  font-size: var(--fs-ui);
  color: inherit;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.nav a:hover,
.nav a[aria-current="page"] { opacity: 1; }
.nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

.nav .nav-cta {
  opacity: 1;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--dawn-warm);
  color: var(--c-primary-ink);
  font-weight: 500;
  box-shadow: 0 6px 18px -8px rgba(59, 47, 122, 0.7);
  transition: transform 0.25s var(--spring), box-shadow 0.25s;
}
.nav .nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(59, 47, 122, 0.8); }
.nav a[aria-current="page"].nav-cta { text-decoration: none; }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  margin-right: -10px;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: currentColor;
  margin: 5px 0;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 1080px) {
  .menu-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.5rem;
    background: var(--paper);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s var(--ease);
  }
  .menu-open .nav {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav a {
    padding: 0.95rem 0;
    font-size: var(--fs-lead);
    opacity: 1;
    border-bottom: 1px solid var(--line);
  }
  .nav .nav-cta {
    margin-top: 1rem;
    text-align: center;
    border-bottom: 0;
  }
  .site-header--night.menu-open { background: var(--paper); color: var(--ink); }
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease), opacity 0.25s;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--night); transform: translateY(-1px); }

/* Acción principal: el amanecer */
.btn-dawn, .btn-lamp {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--dawn-warm);
  color: var(--c-primary-ink);
  box-shadow: 0 10px 26px -12px rgba(59, 47, 122, 0.85);
  transition: transform 0.3s var(--spring), box-shadow 0.3s;
}
.btn-dawn:hover, .btn-lamp:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(59, 47, 122, 0.95); }

.btn-ghost { border-color: currentColor; background: transparent; }
.btn-ghost:hover { background: rgba(127, 127, 127, 0.08); }

.btn-text {
  min-height: 0;
  padding: 0.3rem 0;
  border-radius: 0;
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Tipografía ---------- */

.eyebrow {
  display: inline-block;
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}

.display {
  font-family: var(--serif);
  font-weight: 350;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
}

h2.section-title {
  font-family: var(--serif);
  font-weight: var(--w-serif);
  font-size: var(--fs-h2);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 1rem;
}

.lead {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  max-width: 38rem;
  margin: 0;
}

/* ---------- Portada ---------- */

.hero {
  position: relative;
  background: var(--night);
  color: var(--night-text);
  overflow: hidden;
  isolation: isolate;
}

/* Luz cálida, como una lámpara encendida de noche */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 1000px; height: 1000px;
  right: -320px; top: -380px;
  background: radial-gradient(closest-side, rgba(242, 181, 98, 0.30), rgba(59, 47, 122, 0.24) 36%, rgba(59, 47, 122, 0.40) 62%, transparent 78%);
  animation: lamp 14s ease-in-out infinite alternate;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.08;
  background-image: 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes lamp {
  from { transform: translate(0, 0) scale(1); opacity: 0.9; }
  to { transform: translate(-60px, 40px) scale(1.08); opacity: 1; }
}

.hero-inner {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding-top: 120px;
  padding-bottom: 80px;
}

.hero-title {
  font-size: clamp(2.9rem, 9vw, 7.2rem);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  max-width: 12ch;
}
.hero-title em {
  font-style: italic;
  font-weight: var(--w-read);
  background: var(--lamp);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}

.manifesto {
  max-width: 40rem;
  font-family: var(--serif);
  font-weight: var(--w-read);
  font-size: var(--fs-read);
  line-height: 1.65;
  color: rgba(244, 238, 230, 0.86);
}
.manifesto p { margin: 0 0 1.2em; }
.manifesto .invite {
  margin-top: 1.8em;
  color: var(--night-text);
  font-style: italic;
  font-size: 1.08em;
}
.manifesto .invite span { color: var(--sky); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.4rem;
}

.hero-note {
  margin-top: 1.4rem;
  font-size: var(--fs-small);
  color: var(--night-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-note svg { width: 15px; height: 15px; flex: none; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 1px; height: 46px;
  background: linear-gradient(var(--night-muted), transparent);
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: translateY(-10px); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateY(10px); opacity: 0; }
}

/* Móvil y tablet: título → caminos → texto completo */
.hero-cta { margin-bottom: clamp(2.6rem, 7vw, 3.5rem); }
.hero-cta .hero-actions { margin-top: 0; }

@media (max-width: 979px) {
  .hero-inner { align-content: start; padding-top: 104px; }
  .hero-title { margin-bottom: 1.8rem; }
  .manifesto {
    padding-top: 2.4rem;
    border-top: 1px solid rgba(244, 238, 230, 0.14);
  }
  .scroll-cue { display: none; }
}

@media (max-width: 560px) {
  .hero-cta .hero-actions { flex-direction: column; gap: 0.75rem; }
  .hero-cta .btn { width: 100%; }
  .hero-note { justify-content: center; }
}

/* Escritorio: el título a la izquierda; texto y caminos a la derecha */
@media (min-width: 980px) {
  .hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    grid-template-areas:
      "title text"
      "title cta";
    column-gap: 5rem;
    align-items: start;
  }
  .hero-title { grid-area: title; margin-bottom: 0; position: sticky; top: 120px; }
  .manifesto { grid-area: text; }
  .hero-cta { grid-area: cta; margin: 0; }
  .hero-cta .hero-actions { margin-top: 2.4rem; }
  .hero .manifesto.fade-in { animation-delay: 0.25s; }
  .hero .hero-cta.fade-in { animation-delay: 0.5s; }
}

/* ---------- Secciones ---------- */

.section { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.section--tint { background: var(--paper-2); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: clamp(2.2rem, 5vw, 3.5rem);
}

/* Cómo es este espacio */
.steps {
  display: grid;
  border-top: 1px solid var(--line);
  list-style: none;
  padding: 0;
  margin: 0;
}
.step {
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--t);
  color: var(--t-ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--fs-ui);
}
.step h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h3);
  letter-spacing: -0.01em;
  margin: 0.6rem 0 0.5rem;
}
.step p { margin: 0; color: var(--ink-soft); max-width: 30rem; }

@media (min-width: 820px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { padding: 2.5rem 2.2rem 2.5rem 0; }
  .step + .step { padding-left: 2.2rem; border-left: 1px solid var(--line); }
}

/* Principios */
.principles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.8rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-soft);
  font-size: var(--fs-ui);
}
.principles li { display: flex; align-items: center; gap: 0.55rem; }
.principles li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ember);
}

/* ---------- Tarjetas de historia ---------- */

.letters {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

/* La historia vive en el color de su tema; la respuesta, en papel */
.story-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--spring), box-shadow 0.4s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.story-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.story-card:active { transform: scale(0.985); }

.sc-story {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.3rem 1.3rem 1.5rem;
  background: var(--t);
  color: var(--t-ink);
  isolation: isolate;
}
.sc-story::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 80% at 100% 0%, rgba(255, 255, 255, 0.22), transparent 60%);
}
.sc-top { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; font-size: var(--fs-caption); }
.sc-tema {
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.sc-time { opacity: 0.85; }
.sc-label { font-size: var(--fs-caption); letter-spacing: var(--ls-caps); text-transform: uppercase; opacity: 0.85; }
.sc-label b { font-weight: 500; }
.sc-text {
  font-family: var(--serif);
  font-weight: var(--w-serif);
  font-size: var(--fs-lead);
  line-height: 1.45;
}

.sc-reply {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.1rem 1.3rem 1.2rem;
  flex: 1;
}
.sc-reply-label { font-size: var(--fs-caption); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ember-deep); font-weight: 500; }
.sc-reply-text { font-family: var(--serif); font-style: italic; font-weight: var(--w-read); font-size: var(--fs-ui); line-height: 1.5; color: var(--ink-soft); flex: 1; }
.sc-sign { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; font-size: var(--fs-caption); color: var(--muted); }
.avatar-s {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--dawn);
  color: #fff;
  font-family: var(--serif);
  font-size: 0.65rem;
  flex: none;
}

/* Versión destacada (carrusel) */
.sc--feature .sc-text { font-size: var(--fs-h3); }
.sc--feature .sc-story { padding: 1.5rem 1.5rem 1.8rem; min-height: 230px; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--t);
  color: var(--t-ink);
  font-size: var(--fs-caption);
}

/* Esqueleto mientras "carga" */
.story-card.is-skeleton { min-height: 300px; pointer-events: none; box-shadow: none; background: var(--paper-2); }
.story-card.is-skeleton::after {
  content: "";
  position: absolute;
  inset: 1.4rem;
  background: repeating-linear-gradient(var(--paper-3) 0 12px, transparent 12px 26px);
  border-radius: 6px;
  animation: breathe 1.6s ease-in-out infinite;
}

/* ---------- Lo que necesitaba escuchar ---------- */

.reply-demo {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 900px) {
  .reply-demo { grid-template-columns: 0.9fr 1.1fr; gap: 3rem; }
}

.reply-demo .story-card { box-shadow: var(--shadow); }
.letter-body p { margin: 0 0 0.8em; }
.letter-body p:last-child { margin-bottom: 0; }

.reply {
  position: relative;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  background: var(--night);
  color: var(--night-text);
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
}
.reply::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 520px; height: 520px;
  right: -200px; top: -240px;
  background: radial-gradient(closest-side, rgba(59, 47, 122, 0.35), rgba(59, 47, 122, 0.3) 50%, transparent 72%);
}

.reply-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--lamp);
  margin: 0 0 1.2rem;
}
.reply-label::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
}

.reply-text {
  font-family: var(--serif);
  font-weight: var(--w-read);
  font-size: var(--fs-lead);
  line-height: 1.7;
  color: rgba(244, 238, 230, 0.86);
}
.reply-text p { margin: 0 0 1em; }

.signature {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(244, 238, 230, 0.14);
}
.avatar {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--dawn);
  color: #fff;
  font-family: var(--serif);
  font-size: var(--fs-ui);
  flex: none;
}
.signature b { display: block; font-weight: 500; font-size: var(--fs-ui); }
.signature small { color: var(--night-muted); font-size: var(--fs-small); }

.reply-explain {
  margin-top: 1.5rem;
  color: var(--ink-soft);
  font-size: var(--fs-ui);
  max-width: 34rem;
}

/* ---------- Cierre ---------- */

.closing {
  text-align: center;
  padding-top: clamp(5rem, 12vw, 9rem);
  padding-bottom: clamp(5rem, 12vw, 9rem);
}
.closing .display {
  font-size: var(--fs-display);
  max-width: 18ch;
  margin: 0 auto 2.2rem;
}

/* ---------- Pie ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  font-size: var(--fs-small);
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem 2rem;
  justify-content: space-between;
  align-items: start;
}
.site-footer .brand { color: var(--ink); }
.site-footer p { margin: 0.4rem 0 0; }
.footer-links a { color: var(--ink-soft); text-underline-offset: 3px; }
.footer-notes { max-width: 28rem; display: grid; gap: 0.8rem; }
.demo-note { font-size: var(--fs-small); margin: 0; }
.footer-emergency {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: var(--c-warning-soft);
  color: var(--ink);
  font-size: var(--fs-small);
}
.footer-emergency svg { width: 18px; height: 18px; flex: none; color: var(--c-warning); margin-top: 1px; }

/* ==========================================================
   Escribir
   ========================================================== */

.page-write { background: var(--paper); }

.write {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) var(--gutter) 5rem;
}

.write-title {
  font-size: var(--fs-display);
  margin-bottom: 1rem;
}
.write-intro {
  color: var(--ink-soft);
  font-size: var(--fs-lead);
  max-width: 34rem;
  margin: 0 0 2.5rem;
}

.sheet {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.to-field {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding-bottom: 0.9rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}
.to-field label {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  flex: none;
}
.to-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding: 0.3rem 0;
  font-family: var(--serif);
  font-size: var(--fs-lead);
  outline: none;
}
.to-field input::placeholder { color: #a19ba3; }

.paper {
  display: block;
  width: 100%;
  min-height: 46vh;
  border: 0;
  resize: none;
  outline: none;
  background:
    linear-gradient(transparent calc(2.1rem - 1px), rgba(27, 28, 46, 0.07) calc(2.1rem - 1px)) 0 0.55rem / 100% 2.1rem;
  font-family: var(--serif);
  font-weight: var(--w-read);
  font-size: var(--fs-lead);
  line-height: 2.1rem;
  padding: 0.55rem 0 0;
  caret-color: var(--ember);
}
.paper::placeholder { color: #a19ba3; font-style: italic; }

.sheet-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.8rem;
  font-size: var(--fs-small);
  color: var(--muted);
}
.sheet-foot .saved { display: inline-flex; align-items: center; gap: 0.4rem; }
.sheet-foot svg { width: 14px; height: 14px; }

.starters {
  margin: 1.6rem 0 0;
}
.starters p,
.field-label {
  font-size: var(--fs-small);
  color: var(--muted);
  margin: 0 0 0.7rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  font-size: var(--fs-small);
  cursor: pointer;
  color: var(--ink-soft);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.starter { font-family: var(--serif); font-style: italic; font-size: var(--fs-ui); }
.chip { min-height: 40px; transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.25s var(--spring); }
.chip:active { transform: scale(0.95); }
.chip[data-tema]:not([data-tema=""])::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--t);
  vertical-align: 0.05em;
}
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.chip[data-tema]:not([data-tema=""])[aria-pressed="true"] {
  background: var(--t);
  border-color: var(--t);
  color: var(--t-ink);
}
.chip[data-tema]:not([data-tema=""])[aria-pressed="true"]::before { background: currentColor; opacity: 0.6; }

.write-block { margin-top: 2.4rem; }

.privacy-note {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin-top: 2.4rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: var(--fs-small);
}
.privacy-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--ember); }
.privacy-note p { margin: 0; }

.write-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.4rem;
}
.write-actions .hint { font-size: var(--fs-small); color: var(--muted); }

@media (max-width: 560px) {
  .write-actions .btn { width: 100%; }
  .write-actions .hint { order: 2; width: 100%; text-align: center; }
}

/* ==========================================================
   Continuar
   ========================================================== */

.your-words {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  margin: 0 0 2.4rem;
}
.your-words .letter-to { display: block; margin-bottom: 0.6rem; }
.your-words-text {
  font-family: var(--serif);
  font-weight: var(--w-read);
  font-size: var(--fs-lead);
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 9.6em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
  margin: 0;
}
.your-words-text.is-short { -webkit-mask-image: none; mask-image: none; }
.your-words .btn-text { margin-top: 0.8rem; font-size: var(--fs-small); color: var(--ink-soft); }

.choices {
  display: grid;
  gap: 1rem;
}
@media (min-width: 720px) {
  .choices { grid-template-columns: 1fr 1fr; }
  /* En dos columnas, las opciones de compartir van debajo de ambas tarjetas */
  .choices .share-options { order: 3; grid-column: 1 / -1; margin-top: 0.4rem; }
}

.choice {
  position: relative;
  display: block;
  cursor: pointer;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card {
  display: block;
  height: 100%;
  padding: 1.6rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.choice-card h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h3);
  margin: 0.9rem 0 0.4rem;
}
.choice-card p { margin: 0; color: var(--ink-soft); font-size: var(--fs-ui); }
.choice-icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--ink-soft);
}
.choice-icon svg { width: 20px; height: 20px; }
.choice:hover .choice-card { border-color: var(--line-strong); }
.choice input:checked + .choice-card {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
  background: var(--paper-3);
}
.choice input:checked + .choice-card .choice-icon { background: var(--ink); color: var(--paper); }
.choice input:focus-visible + .choice-card { outline: 2px solid var(--ember); outline-offset: 3px; }

.share-options {
  display: grid;
  gap: 0.9rem;
  padding: 1.4rem;
  border-radius: var(--radius);
  background: var(--paper-2);
}
.share-options[hidden] { display: none; }

.check {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  cursor: pointer;
  font-size: var(--fs-ui);
}
.check input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 20px; height: 20px;
  margin: 2px 0 0;
  border: 1.5px solid var(--ink-soft);
  border-radius: 6px;
  background: var(--card);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.check input::after {
  content: "";
  width: 10px; height: 6px;
  border-left: 2px solid var(--paper);
  border-bottom: 2px solid var(--paper);
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { opacity: 1; }
.check small { display: block; color: var(--muted); font-size: var(--fs-small); margin-top: 0.15rem; }

.phone {
  display: flex;
  gap: 0.5rem;
}
.phone input {
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--card);
  font-size: 1rem;
}
.phone input:focus { outline: 2px solid var(--ember); outline-offset: 1px; border-color: transparent; }
.phone #prefijo { width: 5.2rem; flex: none; }
.phone #telefono { flex: 1; width: 100%; }
fieldset { min-width: 0; }
.field-help { margin: 0; font-size: var(--fs-small); color: var(--muted); }
.field-help.is-error { color: var(--ember-deep); }

.send-note {
  margin: 2rem 0 0;
  font-size: var(--fs-ui);
  color: var(--ink-soft);
}

/* Resultado */
.result {
  text-align: center;
  padding: clamp(1rem, 4vw, 2rem) 0;
  animation: rise 0.9s var(--ease) both;
}
.result .display { font-size: var(--fs-display); margin-bottom: 1rem; }
.result .lead { margin: 0 auto; }
.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 2.2rem;
}
.result-related {
  text-align: left;
  margin-top: 4rem;
}
.result-related h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h3);
  margin: 0 0 1.4rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================
   Historias
   ========================================================== */

.page-intro {
  padding-top: clamp(3rem, 8vw, 5.5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}
.page-intro .display { font-size: var(--fs-display); max-width: 16ch; margin-bottom: 1.2rem; }

.filters {
  position: sticky;
  top: 68px;
  z-index: 10;
  background: var(--paper);
  padding: 0.9rem 0;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--line);
}
.filters .chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent);
  mask-image: linear-gradient(90deg, #000 90%, transparent);
}
.filters .chips::-webkit-scrollbar { display: none; }
.filters .chip { flex: none; }

.demo-banner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-small);
  color: var(--muted);
  margin-top: 1.4rem;
}
.demo-banner::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.empty {
  padding: 3rem 0;
  text-align: center;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--fs-lead);
}

/* ==========================================================
   Historia individual
   ========================================================== */

.story {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) var(--gutter) 2rem;
}

.back {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-ui);
  color: var(--ink-soft);
  text-decoration: none;
  margin-bottom: 2.4rem;
}
.back svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.back:hover svg { transform: translateX(-3px); }

.story-sheet {
  position: relative;
  background: var(--t);
  color: var(--t-ink);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 5vw, 3rem);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
  isolation: isolate;
  animation: rise 0.7s var(--ease) both;
}
.story-sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(110% 70% at 100% 0%, rgba(255, 255, 255, 0.22), transparent 60%);
}
.story-sheet .letter-to { font-size: var(--fs-small); letter-spacing: var(--ls-caps); text-transform: uppercase; opacity: 0.88; }
.story-sheet .letter-to b { font-weight: 500; }
.story-text {
  font-family: var(--serif);
  font-weight: var(--w-read);
  font-size: var(--fs-read);
  line-height: 1.75;
  margin: 1.4rem 0 0;
}
.story-text p { margin: 0 0 1.1em; }
.story-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-size: var(--fs-small);
}
.story-meta .tag { background: rgba(255, 255, 255, 0.2); color: inherit; }

.accompany {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.6rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-size: var(--fs-ui);
  color: inherit;
  transition: background 0.3s, color 0.3s, transform 0.3s var(--spring);
}
.accompany svg { width: 19px; height: 19px; transition: transform 0.5s var(--spring); }
.accompany:hover { background: rgba(255, 255, 255, 0.22); }
.accompany:active { transform: scale(0.94); }
.accompany[aria-pressed="true"] { background: #fff; color: var(--ink); border-color: #fff; }
.accompany[aria-pressed="true"] svg { transform: scale(1.18); color: var(--ember); }
.accompany[aria-pressed="true"] svg path { fill: currentColor; }
/* Pequeño destello al acompañar */
.accompany .spark {
  position: absolute;
  left: 1.3rem; top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lamp);
  pointer-events: none;
  animation: spark 0.7s var(--ease) forwards;
}
@keyframes spark {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.4); }
}

.accompany-note {
  font-size: var(--fs-small);
  color: var(--muted);
  margin: 0.6rem 0 0;
  min-height: 1.4em;
  text-align: right;
}

.story-divider {
  height: 1px;
  margin: 2.6rem 0;
  border: 0;
  background: var(--line);
}

/* ---------- Aparición suave ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

.hero .fade-in {
  opacity: 0;
  animation: rise 1.2s var(--ease) forwards;
}
.hero .fade-in:nth-child(2) { animation-delay: 0.25s; }
.hero .fade-in:nth-child(3) { animation-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .hero .fade-in { opacity: 1; transform: none; }
}

.hero-note svg, .back svg { order: -1; }

.write-intro + .write-intro { margin-top: -1.6rem; }

/* ==========================================================
   Donaciones
   ========================================================== */

.donate {
  display: grid;
  gap: 2rem;
  align-items: start;
  padding-bottom: clamp(4rem, 9vw, 7rem);
}
@media (min-width: 900px) {
  .donate { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 4rem; }
}

.donate-card {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.donate-card .field-label { margin: 0.4rem 0 0; }

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--paper-2);
}
.segmented button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: var(--fs-ui);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.segmented button[aria-checked="true"] { background: var(--ink); color: var(--paper); }

.amounts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr));
  gap: 0.6rem;
}
.amounts button {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.amounts button:hover { border-color: var(--line-strong); }
.amounts button[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: var(--paper-3); }

.other-amount { display: grid; gap: 0.5rem; }
.other-amount input {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--card);
  font-size: var(--fs-lead);
}
.other-amount input:focus { outline: 2px solid var(--ember); outline-offset: 1px; border-color: transparent; }

.donate-submit { width: 100%; margin-top: 0.4rem; }
.donate-status { margin: 0; min-height: 1.2em; font-size: var(--fs-ui); color: var(--ember-deep); }
.donate-note {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0;
  font-size: var(--fs-small);
  color: var(--muted);
}
.donate-note svg { width: 14px; height: 14px; flex: none; order: -1; }

.donate-why h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h3);
  margin: 0.4rem 0 1.4rem;
}
.donate-why ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.3rem; }
.donate-why li {
  padding-left: 1.2rem;
  border-left: 2px solid var(--ember-soft);
  color: var(--ink-soft);
}
.donate-why b { display: block; color: var(--ink); font-weight: 500; margin-bottom: 0.2rem; }

/* ==========================================================
   Sobre el proyecto
   ========================================================== */

.about-head {
  text-align: center;
  padding-top: clamp(3rem, 8vw, 5.5rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}
.about-head .display { font-size: var(--fs-display); }
.about-by { margin: 0.8rem 0 0; color: var(--muted); }

.about {
  display: grid;
  gap: 2.5rem;
  align-items: start;
  padding-bottom: clamp(4rem, 9vw, 7rem);
}
@media (min-width: 900px) {
  .about { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 4.5rem; }
  .about-photo { position: sticky; top: 100px; }
}

.about-photo { margin: 0; }
.photo-slot,
.about-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  object-fit: cover;
}
.photo-slot {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(closest-side at 70% 25%, rgba(242, 181, 98, 0.35), transparent 70%),
    linear-gradient(160deg, var(--night-2), var(--night));
  color: var(--lamp);
}
.photo-mono { font-family: var(--serif); font-size: clamp(3rem, 8vw, 4.5rem); font-weight: var(--w-read); letter-spacing: 0.04em; }
.photo-caption {
  position: absolute;
  bottom: 1rem;
  left: 0; right: 0;
  text-align: center;
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--night-muted);
}
.about-photo figcaption { margin-top: 1rem; display: flex; flex-direction: column; }
.about-photo figcaption b { font-weight: 500; }
.about-photo figcaption span { color: var(--muted); font-size: var(--fs-ui); }

.about-text { max-width: 40rem; color: var(--ink-soft); font-size: var(--fs-lead); }
.about-text p { margin: 0 0 1.1em; }
.about-lead {
  font-family: var(--serif);
  font-weight: var(--w-read);
  font-size: clamp(1.3rem, 2.6vw, 1.65rem);
  line-height: 1.45;
  color: var(--ink);
}
.about-text h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h3);
  color: var(--ink);
  margin: 2.2rem 0 0.7rem;
}
.about-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.4rem; }
@media (max-width: 560px) { .about-actions .btn { width: 100%; } }

/* ==========================================================
   Experiencia de «Lo que no pude decir…»
   ========================================================== */

.letter-to { font-size: var(--fs-caption); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--muted); }
.letter-to b { font-weight: 500; color: var(--ink-soft); }

/* ---------- Barra inferior (móvil; en escritorio solo en el feed, ver social.css) ---------- */

.tabbar { display: none; }

@media (max-width: 860px) {
  body.has-tabbar { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; }
}
/* Su diseño no depende del ancho: solo se ve donde una regla la muestra */
.tabbar {
  position: fixed;
  left: 10px; right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 60;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  padding: 6px 6px 7px;
  border-radius: 22px;
  background: rgba(20, 22, 43, 0.92);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 12px 30px -12px rgba(20, 22, 43, 0.6);
  transition: transform 0.35s var(--ease), opacity 0.35s;
}
.tabbar.is-hidden { transform: translateY(calc(100% + 20px)); opacity: 0; pointer-events: none; }
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 52px;
  justify-content: center;
  padding: 4px 2px;
  border-radius: 14px;
  color: var(--night-muted);
  text-decoration: none;
  font-size: 0.68rem;
  line-height: 1.1;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s, background 0.2s;
}
.tabbar a svg { width: 22px; height: 22px; transition: transform 0.3s var(--spring); }
.tabbar a:active svg { transform: scale(0.88); }
.tabbar a[aria-current="page"] { color: var(--night-text); }
.tabbar a[aria-current="page"]:not(.tab-cta) svg { color: var(--lamp); }
.tabbar .tab-cta { color: var(--night-text); }
.tabbar .tab-cta svg {
  width: 48px; height: 48px;
  padding: 12px;
  margin-top: -22px;
  border-radius: 50%;
  background: var(--dawn-warm);
  color: var(--c-primary-ink);
  box-shadow: 0 8px 20px -6px rgba(59, 47, 122, 0.8), 0 0 0 4px rgba(20, 22, 43, 0.92);
}
@media (max-width: 340px) { .tabbar a span { font-size: 0.6rem; } }

/* ---------- Secciones de la portada ---------- */

.home-section { padding: clamp(3rem, 8vw, 6rem) 0 0; }
.home-section.is-last { padding-bottom: clamp(3rem, 8vw, 6rem); }
.home-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.3rem;
}
.home-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h2);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.home-head .eyebrow { margin-bottom: 0.5rem; }
.see-all {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: none;
  min-height: 44px;
  font-size: var(--fs-ui);
  font-weight: 500;
  color: var(--ember-deep);
  text-decoration: none;
}
.see-all svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.see-all:hover svg { transform: translateX(3px); }

/* Temas: fichas de color para descubrir */
.temas-strip {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0.3rem var(--gutter) 0.6rem;
  margin: 0 calc(var(--gutter) * -1);
}
.temas-strip::-webkit-scrollbar { display: none; }
.tema-tile {
  flex: none;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 132px;
  min-height: 112px;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  background: var(--t);
  color: var(--t-ink);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--spring);
}
.tema-tile::after {
  content: "";
  position: absolute;
  right: -30px; top: -30px;
  width: 90px; height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  z-index: -1;
}
.tema-tile:hover { transform: translateY(-3px); }
.tema-tile:active { transform: scale(0.96); }
.tema-tile b { font-family: var(--serif); font-weight: 400; font-size: var(--fs-h3); }
.tema-tile span { font-size: var(--fs-caption); opacity: 0.85; }
@media (min-width: 1000px) {
  .temas-strip { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0.3rem 0 0.6rem; }
  .tema-tile { width: calc((100% - 4 * 0.6rem) / 5); }
}

/* Carrusel de historias destacadas */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(84%, 360px);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0.4rem var(--gutter) 1.4rem;
  margin: 0 calc(var(--gutter) * -1);
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: center; }
@media (min-width: 1000px) {
  .rail { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0.4rem 0 1rem; }
}
.rail-dots { display: flex; justify-content: center; gap: 6px; margin-top: -0.4rem; }
.rail-dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--paper-3); transition: width 0.3s var(--ease), background 0.3s; }
.rail-dots i.is-on { width: 20px; background: var(--ember); }
@media (min-width: 1000px) { .rail-dots { display: none; } }

/* Frase de una respuesta, sobre el amanecer */
.quote-block {
  position: relative;
  margin: 0;
  padding: clamp(2rem, 7vw, 4rem) clamp(1.4rem, 6vw, 4rem);
  border-radius: 28px;
  /* Amanecer más profundo para que el texto blanco sea legible (≥ 4.5:1) */
  background: linear-gradient(135deg, #23264a 0%, #3b2f7a 55%, #5a3a86 100%);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.quote-block::before {
  content: "\201C";
  position: absolute;
  right: 0.2em; top: -0.25em;
  z-index: -1;
  font-family: var(--serif);
  font-size: clamp(10rem, 30vw, 18rem);
  line-height: 1;
  color: rgba(255, 255, 255, 0.14);
}
.quote-block p {
  margin: 0;
  max-width: 30ch;
  font-family: var(--serif);
  font-weight: var(--w-read);
  font-size: clamp(1.45rem, 4.4vw, 2.3rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 12px rgba(20, 22, 43, 0.3);
}
.quote-block footer { margin-top: 1.4rem; font-size: var(--fs-small); }
.quote-block footer b { font-weight: 500; }
.quote-block a { color: inherit; text-underline-offset: 3px; }

/* Cómo funciona: tarjetas */
.how {
  display: grid;
  gap: 0.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 820px) { .how { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } }
.how li {
  padding: 1.3rem 1.3rem 1.4rem;
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}
.how h3 { margin: 0.8rem 0 0.35rem; font-family: var(--serif); font-weight: 400; font-size: var(--fs-h3); }
.how p { margin: 0; color: var(--ink-soft); font-size: var(--fs-ui); }

/* Cuidado: invitación a entender cómo se trata la información */
.care-teaser {
  display: grid;
  gap: 1.2rem;
  padding: clamp(1.5rem, 5vw, 2.6rem);
  border-radius: 28px;
  background: var(--dawn-night);
  color: var(--night-text);
}
@media (min-width: 900px) { .care-teaser { grid-template-columns: 1fr 1fr; align-items: center; gap: 3rem; } }
.care-teaser h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--fs-h2); line-height: 1.15; }
.care-teaser p { color: rgba(244, 238, 230, 0.85); }
.care-teaser ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.care-teaser li { display: flex; gap: 0.7rem; align-items: flex-start; color: rgba(244, 238, 230, 0.9); }
.care-teaser li svg { width: 20px; height: 20px; flex: none; color: var(--lamp); margin-top: 2px; }
.care-teaser .btn { margin-top: 0.4rem; justify-self: start; }

/* ---------- Historia individual ---------- */

.story-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-top: 2rem;
}
.story-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-height: 64px;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 0.3s var(--spring);
}
.story-nav a:active { transform: scale(0.97); }
.story-nav a:hover { transform: translateY(-2px); }
.story-nav small { font-size: var(--fs-caption); color: var(--muted); }
.story-nav span { font-family: var(--serif); font-size: var(--fs-ui); }
.story-nav .next { text-align: right; grid-column: 2; }

/* ---------- Escribir: pasos ---------- */

.stepper {
  display: flex;
  gap: 0.4rem;
  list-style: none;
  margin: 0 0 1.8rem;
  padding: 0;
}
.stepper li {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: var(--fs-caption);
  color: var(--muted);
}
.stepper li::before {
  content: "";
  height: 4px;
  border-radius: 99px;
  background: var(--paper-3);
}
.stepper li.is-done::before { background: var(--ember); }
.stepper li.is-current { color: var(--ink); font-weight: 500; }
.stepper li.is-current::before { background: var(--dawn-warm); }

.sheet { transition: box-shadow 0.3s; }
.sheet:focus-within { box-shadow: 0 0 0 3px rgba(59, 47, 122, 0.25), var(--shadow-lift); }
.sheet::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 5px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--dawn);
}

/* ---------- Continuar: cuidado, consentimiento y WhatsApp ---------- */

.care-step {
  margin-top: 1.4rem;
  padding: clamp(1.2rem, 4vw, 1.8rem);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}
.care-step > h2 {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.8rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h3);
  line-height: 1.2;
}
.care-step > h2 .n {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--dawn-warm);
  color: var(--c-primary-ink);
  font-family: var(--sans);
  font-size: var(--fs-small);
  font-weight: 500;
}
.care-step > p { margin: 0 0 1rem; color: var(--ink-soft); }

.anon-vs-private {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1.2rem;
}
@media (min-width: 640px) { .anon-vs-private { grid-template-columns: 1fr 1fr; } }
.anon-vs-private div { padding: 0.9rem 1rem; border-radius: 14px; font-size: var(--fs-ui); }
.anon-vs-private b { display: block; margin-bottom: 0.2rem; }
.anon-private { background: var(--paper-2); color: var(--ink-soft); }
.anon-public { background: var(--blue-soft); color: var(--blue-text); }
.avoid-note { margin: 0 0 1.2rem; font-size: var(--fs-ui); color: var(--ink); font-weight: 500; }

.timeline {
  list-style: none;
  margin: 0 0 1.3rem;
  padding: 0;
}
.timeline li {
  position: relative;
  padding: 0 0 0.9rem 1.9rem;
  font-size: var(--fs-ui);
  color: var(--ink-soft);
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 4px; top: 0.4em;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--ember);
  z-index: 1;
}
.timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 9px; top: 1.2em; bottom: 0;
  width: 2px;
  background: var(--ember-soft);
}
.timeline li:last-child::before { background: var(--ember); }
.timeline b { color: var(--ink); font-weight: 500; }

.consent {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem 1rem 1rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}
.consent + .consent { margin-top: 0.7rem; }
.consent.is-checked { border-color: var(--ember); background: var(--blue-soft); }
.consent input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 26px; height: 26px;
  margin: 0;
  border: 2px solid var(--ink-soft);
  border-radius: 8px;
  background: var(--card);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.25s var(--spring);
}
.consent input::after {
  content: "";
  width: 12px; height: 7px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px) scale(0.4);
  opacity: 0;
  transition: transform 0.25s var(--spring), opacity 0.15s;
}
.consent input:checked { background: var(--ember-deep); border-color: var(--ember-deep); transform: scale(1.05); }
.consent input:checked::after { opacity: 1; transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.consent input:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.consent-body { font-size: var(--fs-ui); color: var(--ink-soft); }
.consent-body b { display: block; color: var(--ink); font-weight: 500; margin-bottom: 0.2rem; font-size: var(--fs-ui); }
.consent-body ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.consent-body li + li { margin-top: 0.2rem; }
.consent-body a { color: var(--ember-deep); font-weight: 500; text-underline-offset: 3px; }
.consent-body small { display: block; margin-top: 0.45rem; color: var(--muted); font-size: var(--fs-caption); }

/* Interruptor de WhatsApp */
.switch-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 48px;
  cursor: pointer;
}
.switch-row > span:first-child { font-weight: 500; }
.switch {
  position: relative;
  flex: none;
  width: 52px; height: 30px;
  border-radius: 99px;
  background: var(--paper-3);
  transition: background 0.25s;
}
.switch::after {
  content: "";
  position: absolute;
  left: 3px; top: 3px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(27, 28, 46, 0.25);
  transition: transform 0.3s var(--spring);
}
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-row input:checked + .switch { background: var(--blue); }
.switch-row input:checked + .switch::after { transform: translateX(22px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--ember); outline-offset: 3px; }
.wa-panel { display: grid; gap: 0.8rem; margin-top: 1rem; animation: rise 0.4s var(--ease) both; }

.send-bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 1.6rem calc(var(--gutter) * -1) 0;
  padding: 1.2rem var(--gutter) calc(1rem + env(safe-area-inset-bottom));
  background: linear-gradient(rgba(251, 246, 239, 0), var(--paper) 35%);
}
.send-bar .btn { width: 100%; min-height: 56px; font-size: var(--fs-lead); }
.send-bar .hint { display: block; margin-top: 0.6rem; text-align: center; font-size: var(--fs-small); color: var(--muted); }
@media (min-width: 700px) {
  .send-bar { position: static; margin: 2rem 0 0; padding: 0; background: none; display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 1rem; }
  .send-bar .btn { width: auto; }
  .send-bar .hint { margin: 0; text-align: left; }
}

/* Confirmación */
.said {
  text-align: center;
  padding: clamp(1rem, 5vw, 2.5rem) 0 0;
  animation: rise 0.9s var(--ease) both;
}
.said-mark { display: inline-flex; gap: 8px; margin-bottom: 1.4rem; }
.said-mark i {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--dawn-warm);
  animation: pop 0.6s var(--spring) both;
}
.said-mark i:nth-child(2) { animation-delay: 0.15s; }
.said-mark i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.said h1 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-weight: 350;
  font-size: clamp(2.6rem, 10vw, 4.4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  background: var(--dawn);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.said .lead { margin: 0 auto; }
.said .lead + .lead { margin-top: 0.8rem; }

.code-box {
  margin: 2rem auto 0;
  max-width: 30rem;
  padding: 1.3rem;
  border-radius: 20px;
  background: var(--night);
  color: var(--night-text);
  text-align: left;
}
.code-box h2 { margin: 0 0 0.4rem; font-size: 1rem; font-weight: 500; }
.code-box p { margin: 0; font-size: var(--fs-small); color: var(--night-muted); }
.code-box a { color: var(--lamp); }
.code-row { display: flex; gap: 0.6rem; align-items: center; margin: 0.9rem 0; }
.code {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(244, 238, 230, 0.08);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: clamp(1.05rem, 4.6vw, 1.3rem);
  letter-spacing: var(--ls-caps);
  color: var(--lamp);
  text-align: center;
  user-select: all;
}
.copy-btn {
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  flex: none;
  border: 0;
  border-radius: 12px;
  background: var(--dawn-warm);
  color: var(--c-primary-ink);
  cursor: pointer;
  transition: transform 0.25s var(--spring);
}
.copy-btn:active { transform: scale(0.92); }
.copy-btn svg { width: 20px; height: 20px; }

/* ---------- Cuidado: privacidad, ética y preguntas ---------- */

.legal-banner {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-top: 1.4rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: var(--c-secondary-soft);
  color: var(--c-secondary-text);
  font-size: var(--fs-small);
}
.legal-banner svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

.care-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
}
.care-card {
  padding: 1.3rem;
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
  scroll-margin-top: 90px;
}
.care-card .ic {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 14px;
  background: var(--t);
  color: var(--t-ink);
}
.care-card .ic svg { width: 22px; height: 22px; }
.care-card h3 { margin: 0.9rem 0 0.4rem; font-family: var(--serif); font-weight: 400; font-size: var(--fs-h3); line-height: 1.2; }
.care-card p { margin: 0 0 0.6rem; font-size: var(--fs-ui); color: var(--ink-soft); }
.care-card p:last-child { margin-bottom: 0; }

.faq { display: grid; gap: 0.6rem; }
.faq details {
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: 90px;
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
  padding: 1rem 1.2rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: var(--fs-lead);
  line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--paper-2) url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%231b1c2e%22 stroke-width=%222%22 stroke-linecap=%22round%22%3E%3Cpath d=%22M12 6v12M6 12h12%22/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform 0.35s var(--spring), background-color 0.25s;
}
.faq details[open] summary::after { transform: rotate(45deg); background-color: var(--ember-soft); }
.faq summary:focus-visible { outline: 2px solid var(--ember); outline-offset: -2px; border-radius: 18px; }
.faq .answer { padding: 0 1.2rem 1.2rem; color: var(--ink-soft); font-size: var(--fs-ui); animation: rise 0.35s var(--ease) both; }
.faq .answer p { margin: 0 0 0.7rem; }
.faq .answer p:last-child { margin-bottom: 0; }
.faq .answer a { color: var(--ember-deep); }
.faq .is-urgent summary { color: var(--ember-deep); }

.retiro {
  display: grid;
  gap: 0.9rem;
  padding: clamp(1.3rem, 4vw, 2rem);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}
.retiro label { font-weight: 500; font-size: var(--fs-ui); }
.retiro .field { display: grid; gap: 0.4rem; }
.retiro input, .retiro textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font-size: 1rem;
}
.retiro input { font-family: ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: var(--ls-caps); text-transform: uppercase; }
.retiro textarea { min-height: 96px; resize: vertical; }
.retiro input:focus, .retiro textarea:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(59, 47, 122, 0.2); }
.retiro input[aria-invalid="true"] { border-color: var(--ember-deep); }
.field-error { margin: 0; font-size: var(--fs-small); color: var(--ember-deep); }
.form-ok {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: var(--c-success-soft);
  color: var(--c-success);
  font-size: var(--fs-ui);
}

.emergency {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius-lg);
  background: var(--night);
  color: var(--night-text);
}
.emergency svg { width: 26px; height: 26px; flex: none; color: var(--lamp); }
.emergency p { margin: 0; }
.emergency b { color: var(--lamp); }

.privacy-section { padding: clamp(2.4rem, 6vw, 4rem) 0 0; }
.privacy-section.is-last { padding-bottom: clamp(3rem, 8vw, 5rem); }
.privacy-section > .wrap > h2 {
  margin: 0 0 1.2rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h2);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.privacy-section > .wrap > p.lead { margin-bottom: 1.4rem; }

/* ---------- Sobre: qué es y qué no es ---------- */

.isnot { display: grid; gap: 0.8rem; margin: 1rem 0 1.2rem; }
@media (min-width: 640px) { .isnot { grid-template-columns: 1fr 1fr; } }
.isnot div { padding: 1.1rem 1.2rem; border-radius: 18px; }
.isnot h3 { margin: 0 0 0.5rem; font-family: var(--sans); font-size: var(--fs-small); letter-spacing: var(--ls-caps); text-transform: uppercase; }
.isnot ul { margin: 0; padding-left: 1.1rem; font-size: var(--fs-ui); }
.isnot li + li { margin-top: 0.3rem; }
.is-yes { background: var(--c-success-soft); color: var(--c-success); }
.is-no { background: var(--c-warning-soft); color: var(--c-warning); }
.care-teaser li svg { order: -1; }
.see-all span { order: -1; }
.legal-banner svg { order: -1; }

/* En el flujo de escritura la barra inferior se aparta: el foco es escribir y enviar */
@media (max-width: 860px) {
  body.page-write .tabbar { display: none; }
  body.page-write.has-tabbar { padding-bottom: 0; }
}
.story-sheet h1.letter-to { margin: 0; font-family: var(--sans); font-weight: 400; line-height: 1.4; }

/* ==========================================================
   Fase 2 — experiencia social propia, mobile first
   ========================================================== */

/* ---------- Temas como puertas: seleccionables ---------- */

button.tema-tile {
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tema-tile { box-shadow: 0 0 0 0 rgba(27, 28, 46, 0); transition: transform 0.35s var(--spring), box-shadow 0.3s var(--ease), opacity 0.3s; }
.temas-strip:has([aria-pressed="true"]) .tema-tile[aria-pressed="false"] { opacity: 0.78; }
.tema-tile[aria-pressed="true"] {
  opacity: 1;
  transform: translateY(-4px);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--t), 0 14px 26px -14px var(--t);
}
.tema-tile[aria-pressed="true"]::before {
  content: "";
  position: absolute;
  top: 0.8rem; right: 0.8rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: currentColor;
  animation: pop 0.4s var(--spring) both;
}
.tema-tile:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 3px; }

.tema-preview { margin-top: 1rem; display: grid; gap: 0.8rem; }
.tema-preview .see-all { justify-self: start; color: var(--c-primary-text); }
.tema-empty {
  display: grid;
  gap: 1rem;
  justify-items: start;
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}
.tema-empty p { margin: 0; font-family: var(--serif); font-size: var(--fs-lead); }

/* ---------- Franja nocturna: historias que queremos dejarte hoy ---------- */

.band-night {
  margin-top: clamp(3rem, 8vw, 6rem);
  padding: clamp(2.4rem, 7vw, 4.5rem) 0 clamp(2rem, 6vw, 3.5rem);
  background: var(--surface-night);
  color: var(--night-text);
}
.band-night .eyebrow { color: var(--c-warm); }
.band-night .story-card { box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.7); }
.band-night .story-card:hover { box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.8); }
.band-night .rail-dots i { background: rgba(244, 238, 230, 0.25); }
.band-night .rail-dots i.is-on { background: var(--c-warm); }
.band-night + .home-section { padding-top: clamp(2.6rem, 7vw, 5rem); }

/* ---------- Feed ---------- */

.feed { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { #lista.feed { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.filters-label { margin: 0 0 0.55rem; font-size: var(--fs-small); color: var(--muted); }
.feed-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem 0.7rem;
  margin: 0 0 1.1rem;
}
.feed-head b { font-family: var(--serif); font-weight: 400; font-size: var(--fs-h3); }
.feed-head span:last-child { color: var(--muted); font-size: var(--fs-ui); }
.feed-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--t); align-self: center; }

.closing-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; }
@media (max-width: 480px) { .closing-actions .btn { width: 100%; } }

.quote-label {
  display: block;
  margin-bottom: 1rem;
  font-size: var(--fs-caption);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: #ffe2c2;
}

/* ---------- Lectura ---------- */

.read-progress {
  position: fixed;
  left: 0; right: 0; top: 0;
  z-index: 80;
  height: 3px;
  pointer-events: none;
}
.read-progress span {
  display: block;
  height: 100%;
  background: var(--dawn-warm);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.1s linear;
}

.story { max-width: 740px; }
.story-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
  font-size: var(--fs-small);
}
.story-top .tag { background: rgba(255, 255, 255, 0.22); color: inherit; text-decoration: none; min-height: 32px; padding: 0.3rem 0.8rem; }
.story-text {
  font-size: var(--fs-read);
  line-height: 1.72;
  font-weight: 350;
  max-width: 34em;
}
.story-text p { margin: 0 0 1em; }
.story-text p:last-child { margin-bottom: 0; }
.story .reply { margin-top: 0; }
.story .reply-text { font-size: var(--fs-lead); line-height: 1.75; max-width: 34em; }

/* Te acompaño: el gesto vive entre la historia y la respuesta */
.accompany-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin: 1.4rem 0 1.8rem;
}
.accompany-block .accompany {
  min-height: 52px;
  padding: 0.7rem 1.4rem 0.7rem 1.1rem;
  border: 1.5px solid var(--c-primary);
  background: var(--card);
  color: var(--ink);
  font-weight: 500;
  box-shadow: var(--shadow);
}
.accompany-block .accompany:hover { background: var(--blue-soft); }
.accompany-block .accompany[aria-pressed="true"] {
  background: var(--dawn-warm);
  border-color: transparent;
  color: var(--c-primary-ink);
}
.accompany-heart { display: inline-grid; place-items: center; }
.accompany-block .accompany[aria-pressed="true"] svg { color: var(--c-primary-ink); }
.accompany.is-pulse::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  border: 2px solid var(--c-primary);
  animation: halo 0.8s var(--ease) forwards;
  pointer-events: none;
}
@keyframes halo { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(1.35); } }
.accompany-block .accompany-note {
  flex: 1 1 14rem;
  margin: 0;
  min-height: 0;
  text-align: left;
  font-size: var(--fs-small);
  color: var(--muted);
}
.accompany-note.is-new { color: var(--ink); font-family: var(--serif); font-style: italic; font-size: 1rem; animation: rise 0.5s var(--ease) both; }

.story-nav { margin-top: 1.4rem; }

/* Seguir leyendo */
.keep-reading { max-width: 1160px; padding-top: clamp(2rem, 6vw, 3.5rem); padding-bottom: clamp(2rem, 6vw, 3rem); }
.keep-next { max-width: 740px; margin: 0 auto; }
.keep-next .story-card { width: 100%; }
.keep-more { margin-top: clamp(2.4rem, 6vw, 3.5rem); }
.keep-title {
  margin: 0 0 1.1rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-h2);
}
@media (min-width: 1100px) {
  .keep-more .letters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Código privado ---------- */

.code-box .code {
  display: block;
  margin: 0.9rem 0;
  padding: 0.9rem;
  font-size: clamp(1.25rem, 6vw, 1.6rem);
}
.code-actions { display: grid; gap: 0.5rem; margin-top: 1rem; }
@media (min-width: 520px) { .code-actions { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.code-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(244, 238, 230, 0.25);
  border-radius: 12px;
  background: transparent;
  color: var(--night-text);
  font-size: var(--fs-ui);
  cursor: pointer;
  transition: background 0.2s, transform 0.25s var(--spring);
}
.code-btn:hover { background: rgba(244, 238, 230, 0.08); }
.code-btn:active { transform: scale(0.97); }
.code-btn svg { width: 18px; height: 18px; flex: none; order: -1; }
.code-btn.is-main { background: var(--dawn-warm); color: var(--c-primary-ink); border-color: transparent; font-weight: 500; }
.code-status { min-height: 1.4em; margin: 0.7rem 0 0; color: var(--c-warm) !important; font-weight: 500; }
.code-status.is-on { animation: rise 0.35s var(--ease) both; }
.code-foot { margin-top: 0.4rem !important; font-size: var(--fs-small) !important; }

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
  .accompany .spark, .accompany.is-pulse::after { display: none; }
  .story-card:hover, .tema-tile:hover, .tema-tile[aria-pressed="true"] { transform: none; }
  .read-progress span { transition: none; }
}
.story-sheet .letter-to, .story-sheet .letter-to b { color: inherit; }
.temas-strip { padding-top: 12px; padding-bottom: 18px; }
@media (min-width: 1000px) { .temas-strip { padding: 12px 6px 14px; } }
.sc-ejemplo { padding: 0.1rem 0.45rem; border-radius: 6px; border: 1px solid currentColor; font-size: 0.7rem; opacity: 0.9; }

/* Donaciones por transferencia */
.donate-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: var(--fs-h3); }
.donate-intro { margin: 0; color: var(--ink-soft); }
.bank { display: grid; gap: 0; margin: 0.4rem 0 0; border-radius: 14px; background: var(--paper); overflow: hidden; }
.bank > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.2rem 1rem; padding: 0.8rem 1rem; border-top: 1px solid var(--line); }
.bank > div:first-child { border-top: 0; }
.bank dt { color: var(--muted); font-size: var(--fs-small); }
.bank dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bank .bank-loading { display: block; color: var(--ink-soft); font-size: var(--fs-ui); }
.bank-note { margin: 0; padding: 0.8rem 1rem; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--ink-soft); }

/* ==========================================================
   Fase 5 — identidad azul, jerarquía unificada y microinteracciones
   Regla: se siente vivo, pero no distrae de lo que la persona vino a decir.
   ========================================================== */

/* ---------- Jerarquía tipográfica común ---------- */

/* La sans solo tiene 400 y 500: las negritas usan 500 (nunca negrita sintética) */
b, strong { font-weight: var(--w-ui); }
.display { font-weight: var(--w-display); }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.eyebrow { font-size: var(--fs-caption); letter-spacing: var(--ls-caps); font-weight: var(--w-ui); color: var(--blue-text); }
.eyebrow-night, .band-night .eyebrow { color: var(--sky); }
.lead { line-height: var(--lh-body); }
.home-head h2, .care-teaser h2, .privacy-section > .wrap > h2, .keep-title, h2.section-title {
  font-size: var(--fs-h2);
  font-weight: var(--w-serif);
  line-height: var(--lh-tight);
}
.how h3, .care-card h3, .choice-card h3, .about-text h2, .donate-title, .donate-why h2, .result-related h2, .feed-head b, .care-step > h2 {
  font-size: var(--fs-h3);
  font-weight: var(--w-serif);
  line-height: var(--lh-snug);
}
.btn { font-size: var(--fs-body); font-weight: var(--w-ui); letter-spacing: 0.005em; }
.chip { font-size: var(--fs-ui); }
.field-label { font-size: var(--fs-ui); color: var(--ink-soft); font-weight: var(--w-ui); }
.field-label .optional { font-weight: 400; color: var(--muted); }
.hint, .field-help, .sheet-foot { font-size: var(--fs-small); }

/* ---------- Superficies con profundidad ---------- */

.site-header { background: rgba(251, 246, 239, 0.88); }
.site-header--night { background: transparent; }
.nav a { position: relative; }
@media (min-width: 1081px) {
  .nav a:not(.nav-cta)::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease);
  }
  .nav a:not(.nav-cta):hover::after { transform: scaleX(1); }
  .nav a[aria-current="page"]:not(.nav-cta) { text-decoration: none; }
  .nav a[aria-current="page"]:not(.nav-cta)::after { transform: scaleX(1); }
}

/* Botón principal: azul profundo, brillo sutil al pasar */
.btn-dawn::after, .nav .nav-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease);
}
.nav .nav-cta { position: relative; overflow: hidden; isolation: isolate; }
.btn-dawn:hover::after, .nav .nav-cta:hover::after { transform: translateX(120%); }
.btn-dawn { box-shadow: var(--glow); }
.btn-dawn:hover { box-shadow: 0 16px 32px -14px rgba(59, 47, 122, 0.9); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 999px; }
.hero .btn:focus-visible, .band-night .btn:focus-visible, .care-teaser .btn:focus-visible { outline-color: var(--sky); }
.hero .btn-ghost, .care-teaser .btn-ghost { border-color: rgba(244, 238, 230, 0.45); }
.hero .btn-ghost:hover, .care-teaser .btn-ghost:hover { background: rgba(244, 238, 230, 0.08); border-color: rgba(244, 238, 230, 0.8); }

/* Enviando: el botón respira mientras espera */
.btn.is-sending { pointer-events: none; opacity: 1 !important; animation: sending 1.4s var(--ease) infinite; }
@keyframes sending { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }

/* Tarjetas de historia: elevación suave y un borde de luz azul */
.story-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.4s var(--ease);
}
.story-card:hover::after { box-shadow: inset 0 0 0 1px rgba(59, 47, 122, 0.3); }
.story-card.is-skeleton::after { box-shadow: none; }
.story-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: var(--radius-lg); }
.sc-story::after { transition: transform 0.9s var(--ease); }
.story-card:hover .sc-story::after { transform: scale(1.08); }
.sc-reply-label { color: var(--blue-text); }
.sc-time { display: inline-flex; align-items: center; gap: 0.4rem; }
.sc-ejemplo {
  border: 0;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  opacity: 1;
}
.story-when { display: inline-flex; align-items: center; gap: 0.5rem; }

/* Aparición escalonada en listas de tarjetas */
.letters > .reveal:nth-child(2), .rail > .reveal:nth-child(2), .how > .reveal:nth-child(2) { transition-delay: 0.08s; }
.letters > .reveal:nth-child(3), .rail > .reveal:nth-child(3), .how > .reveal:nth-child(3) { transition-delay: 0.16s; }
.letters > .reveal:nth-child(4) { transition-delay: 0.24s; }
.reveal { transition-duration: 0.8s; }

/* Cómo funciona / Cuidado: profundidad al pasar */
.how li, .care-card { transition: opacity 0.8s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.how li.is-visible:hover, .care-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.care-teaser { background: var(--surface-night); box-shadow: 0 30px 60px -40px rgba(20, 22, 43, 0.8); }
.care-teaser-btn { margin-top: 1.4rem; }
.closing--home { padding-top: clamp(2rem, 6vw, 4rem); padding-bottom: 0; }

/* Chips y fichas de tema */
.chip { transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.3s var(--spring), box-shadow 0.25s; }
.chip:hover { border-color: rgba(59, 47, 122, 0.45); color: var(--ink); background: var(--card); }
.chip:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 999px; }
.chip[aria-pressed="true"] { box-shadow: 0 6px 16px -10px var(--t, var(--ink)); }
.chip[aria-pressed="true"]:hover { background: var(--t); color: var(--t-ink); }
.tema-tile:focus-visible { outline-color: var(--blue); }

/* ---------- Escribir: la carta empieza sola ---------- */

.write { padding-top: clamp(1.6rem, 5vw, 3.5rem); }
.stepper li.is-done::before { background: var(--blue); }
.sheet:focus-within { box-shadow: 0 0 0 3px rgba(59, 47, 122, 0.18), var(--shadow-lift); }
.paper { font-size: var(--fs-lead); font-weight: var(--w-read); caret-color: var(--blue); }
.to-field {
  margin: 0.9rem 0 0;
  padding: 0.9rem 0 0;
  border-bottom: 0;
  border-top: 1px solid var(--line);
}
.to-field input { font-size: var(--fs-body); }
fieldset.write-block { border: 0; margin: 2.2rem 0 0; padding: 0; min-width: 0; }
fieldset.write-block legend { padding: 0; margin-bottom: 0.7rem; }

/* Contador: claro y discreto; solo cambia de tono cerca del límite */
.count { font-variant-numeric: tabular-nums; transition: color 0.3s; }
.count.is-near { color: var(--c-warning); }
.count.is-full { color: var(--c-error); font-weight: var(--w-ui); }

.privacy-note svg { color: var(--blue); }
.consent.is-checked { border-color: var(--blue); }
.consent input:checked { background: var(--blue-deep); border-color: var(--blue-deep); }
.consent:hover:not(.is-checked) { border-color: rgba(59, 47, 122, 0.35); }
.code-status { color: var(--sky) !important; }
.code-box .code { color: var(--sky); }
.code-box { background: var(--surface-night); }
.code-box a { color: var(--sky); }
.said-mark i { background: var(--dawn); }

/* ---------- Lectura y respuesta ---------- */

.reply::before { background: radial-gradient(closest-side, rgba(232, 113, 90, 0.35), rgba(59, 47, 122, 0.35) 50%, transparent 72%); }
.reply-label { color: var(--sky); }
.emergency svg, .emergency b, .care-teaser li svg { color: var(--sky); }
.accompany .spark { background: var(--sky); }
.rail-dots i.is-on { background: var(--blue); }
.band-night .rail-dots i.is-on { background: var(--sky); }
.tabbar a[aria-current="page"]:not(.tab-cta) svg { color: var(--sky); }
.tabbar a[aria-current="page"]:not(.tab-cta) { position: relative; }
.tabbar a[aria-current="page"]:not(.tab-cta)::after {
  content: "";
  position: absolute;
  bottom: 3px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--sky);
  animation: pop 0.4s var(--spring) both;
}
.story-cta { display: grid; justify-items: center; gap: 1rem; text-align: center; padding: clamp(2rem, 6vw, 3rem) 0 0; }
.story-cta p { margin: 0; font-family: var(--serif); font-size: var(--fs-h3); }

/* ---------- Móvil: sin "hover pegajoso"; respuesta al toque ---------- */

@media (hover: none) {
  .story-card:hover, .tema-tile:hover, .how li.is-visible:hover, .care-card:hover, .story-nav a:hover { transform: none; box-shadow: var(--shadow); }
  .btn-dawn:hover::after, .nav .nav-cta:hover::after { transform: translateX(-120%); }
  .story-card:active { transform: scale(0.985); }
}

@media (prefers-reduced-motion: reduce) {
  .btn-dawn::after, .nav .nav-cta::after { display: none; }
  .btn.is-sending { animation: none; }
  .how li.is-visible:hover, .care-card:hover { transform: none; }
}
