/* Lo Dejamos Juntos · curso. Dirección A, editorial sereno (D71): papel, tinta y un solo acento salvia. */
:root {
  --bg: #F3EFE6; --bg2: #E9E3D6; --ink: #1E2A24; --soft: #55655A; --line: #1E2A24; --hair: #D6CFBF;
  --accent: #3D6654; --accent-fill: #4E7C68; --accent-soft: #DCE7DF; --on-accent: #F3EFE6; --warn: #8A5A1E;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif; --sans: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #141C18; --bg2: #1D2822; --ink: #E9EEE8; --soft: #AEBBB2; --line: #E9EEE8; --hair: #33423A;
  --accent: #9CC3B0; --accent-fill: #9CC3B0; --accent-soft: #23342C; --on-accent: #141C18; --warn: #E2B06A; color-scheme: dark } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.55; }
.wrap { max-width: 760px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(38px, 8vw, 60px); line-height: 1.04; letter-spacing: -1px; }
h2 { font-size: clamp(28px, 5vw, 36px); line-height: 1.1; }
h3 { font-size: 22px; line-height: 1.2; }
p { margin: 0; }
a { color: var(--accent); }
.it { font-style: italic; color: var(--accent); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.soft { color: var(--soft); }
.small { font-size: 14px; }
.warn { color: var(--warn); }
.num { font-family: var(--serif); font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Cabecera */
header.top { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--hair); padding-top: env(safe-area-inset-top, 0px); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; }
.brand { font-family: var(--serif); font-size: 18px; color: var(--ink); text-decoration: none; }
.sync { font-size: 12px; color: var(--soft); }
.hbtns { display: flex; gap: 8px; align-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--line); background: transparent; border-radius: 999px; padding: 10px 18px; font-weight: 600; text-decoration: none; color: var(--ink); }
.btn.fill { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
.btn.quiet { border-color: var(--hair); font-weight: 500; }
.btn.small { padding: 7px 14px; font-size: 15px; }
.btn.wide { width: 100%; }
.btn:active { transform: scale(0.98); }

main { display: flex; flex-direction: column; gap: 48px; padding-block: 28px 64px; }
section.blk { display: flex; flex-direction: column; gap: 16px; border-top: 2px solid var(--line); padding-top: 18px; }
.hero { display: flex; flex-direction: column; gap: 16px; }
.hero .lead { font-family: var(--serif); font-size: 21px; line-height: 1.4; color: var(--soft); max-width: 34em; }
.pill { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; font-size: 13px; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 4px 12px; }
.card { background: var(--bg2); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toast { font-size: 14px; color: var(--accent); min-height: 1.4em; }
.err { font-size: 14px; color: var(--warn); min-height: 1.3em; }

/* Formularios */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .lbl { font-size: 15px; font-weight: 500; }
.field .help { font-size: 14px; color: var(--soft); }
input[type=email], input[type=text], input[type=number], input[type=date], textarea, select {
  background: var(--bg); border: 1.5px solid var(--hair); border-radius: 10px; padding: 10px 12px; width: 100%; }
textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent-fill); flex: none; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--soft); font-size: 14px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--hair); }
.gbtn { background: #fff; color: #1f1f1f; border-color: #747775; }
.gbtn svg { width: 18px; height: 18px; }

/* Camino de lecciones */
.path { display: flex; flex-direction: column; margin: 0; padding: 0; }
.path li { list-style: none; border-top: 1px solid var(--hair); }
.path a, .path .lock { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: baseline; padding: 14px 0; text-decoration: none; color: var(--ink); }
.path .n { font-family: var(--serif); font-style: italic; font-size: 26px; color: var(--accent); }
.path .tt { font-family: var(--serif); font-size: 21px; line-height: 1.25; }
.path .meta { font-size: 13px; color: var(--soft); white-space: nowrap; }
.path .meta.done { color: var(--accent); font-weight: 600; }
.path .meta.next { color: var(--on-accent); background: var(--accent-fill); border-radius: 999px; padding: 2px 10px; font-weight: 600; }
.path .lock { opacity: 0.55; }
.bar-prog { height: 6px; background: var(--bg2); border-radius: 3px; overflow: hidden; }
.bar-prog span { display: block; height: 100%; background: var(--accent-fill); border-radius: 3px; transition: width 600ms ease; }

/* Lección */
.video { aspect-ratio: 16 / 9; max-width: 100%; background: #1E2A24; color: #F3EFE6; border-radius: 12px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; text-align: center; padding: 16px; }
.video .vn { font-family: var(--serif); font-style: italic; font-size: 56px; color: #9CC3B0; line-height: 1; }
.reading { display: flex; flex-direction: column; gap: 14px; font-family: var(--serif); font-size: 19px; line-height: 1.55; }
details.read > summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 6px 0; }
details.read[open] > summary { margin-bottom: 10px; }
.ex { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--hair); padding-top: 16px; }
.ex .head { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; }
.tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--hair); display: grid; place-items: center; font-size: 13px; line-height: 1; margin-top: 2px; color: transparent; transition: background 300ms, border-color 300ms; }
.tick.on { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
.ex .body { padding-left: 36px; display: flex; flex-direction: column; gap: 10px; }
.done-box { background: var(--accent-soft); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.unl { margin: 0; padding-left: 20px; }

/* Razones */
.reasons { display: flex; flex-direction: column; margin: 0; padding: 0; }
.reasons li { list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--hair); }
.reasons li .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.reasons li.main .t { font-family: var(--serif); font-size: 21px; }
.ibtn { background: none; border: none; padding: 6px; color: var(--soft); border-radius: 8px; }
.ibtn.star.on { color: var(--accent); }
.add { display: flex; gap: 8px; }
.add input { flex: 1; min-width: 0; }

/* Día D */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--bg2); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat .num { font-size: 34px; line-height: 1.1; }
.stat .lbl { font-size: 13px; color: var(--soft); }
.next { border-left: 4px solid var(--accent-fill); padding: 4px 0 4px 14px; display: flex; flex-direction: column; gap: 2px; }
.mil { margin: 0; padding: 0; }
.mil li { list-style: none; display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--hair); }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent-fill); margin-top: 5px; }
.dot.on { background: var(--accent-fill); }
details.more summary { cursor: pointer; color: var(--accent); font-weight: 500; }

/* Mapa */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--hair); background: transparent; border-radius: 999px; padding: 7px 14px; }
.chip[aria-pressed="true"] { border-color: var(--accent-fill); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar { display: grid; grid-template-columns: 120px 1fr 32px; gap: 10px; align-items: center; font-size: 15px; }
.bar .track { height: 10px; background: var(--bg2); border-radius: 6px; overflow: hidden; }
.bar .fillb { height: 100%; background: var(--accent-fill); border-radius: 6px; }
.bar .c { text-align: right; font-variant-numeric: tabular-nums; color: var(--soft); }

/* Ayuda */
.lines { display: flex; flex-direction: column; margin: 0; padding: 0; }
.lines li { list-style: none; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--hair); }
.lines .tel { font-variant-numeric: tabular-nums; font-weight: 600; text-decoration: none; }
footer { border-top: 2px solid var(--line); padding-block: 18px 40px; font-size: 14px; color: var(--soft); display: flex; flex-direction: column; gap: 10px; }

/* Tengo ganas */
.sos { position: fixed; inset: 0; z-index: 20; background: var(--bg); overflow-y: auto; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.sos .wrap { min-height: 100%; display: flex; flex-direction: column; gap: 24px; padding-block: 20px 32px; }
.sos .bar-top { display: flex; justify-content: space-between; align-items: center; }
.steps { display: flex; gap: 6px; }
.steps span { width: 28px; height: 4px; border-radius: 2px; background: var(--hair); }
.steps span.on { background: var(--accent-fill); }
.step { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.breath-wrap { align-self: center; width: min(72vw, 300px); aspect-ratio: 1; max-width: 100%; display: grid; place-items: center; }
.breath { width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--accent-soft); border: 3px solid var(--accent-fill); animation: breath 10s ease-in-out infinite; }
@keyframes breath { 0% { transform: scale(0.55); } 40% { transform: scale(1); } 100% { transform: scale(0.55); } }
.cue { align-self: center; font-family: var(--serif); font-size: 30px; }
.timer { font-family: var(--serif); font-size: 72px; font-variant-numeric: tabular-nums; line-height: 1; }
.big-q { font-family: var(--serif); font-size: 26px; line-height: 1.3; }
.choices { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.choices .btn { justify-content: flex-start; text-align: left; border-radius: 12px; padding: 14px 16px; }
.confirm { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--bg2); border-radius: 12px; padding: 12px 14px; }

/* Llegada suave */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 500ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@media (prefers-reduced-motion: reduce) { .breath, .rise { animation: none; } .breath { transform: scale(0.8); } }
@media (max-width: 520px) { .ex .body { padding-left: 0; } .bar { grid-template-columns: 96px 1fr 28px; } .hide-sm { display: none; } }

/* Páginas legales */
.legal { display: flex; flex-direction: column; gap: 14px; padding-block: 28px 56px; }
.legal h2 { font-size: 24px; margin-top: 14px; }
.legal ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
