/* Monedin — sistema visual «El mapa de la vida»
   Azul noche para la estructura, un color por etapa y la moneda para el valor. */
:root {
  --ink: #0E1B33;
  --ink-2: #24365A;
  --ink-soft: #4A5874;
  --night: #0E1B33;
  --night-2: #1E2E4F;
  --night-line: #33456A;
  --on-night: #FFFFFF;
  --on-night-soft: #C9D3E6;
  --coin: #FFC531;
  --coin-deep: #7A5200;
  --coin-wash: #FFF0C2;
  --sprout: #17804F;
  --sprout-wash: #DDF3E6;
  --coral: #D2461F;
  --coral-wash: #FFE3D9;
  --sky: #E7ECF5;
  --line: #DDD6C8;
  --ground: #F4F1EA;
  --paper: #FFFFFF;
  --text: #0E1B33;

  /* Colores de etapa: siempre con texto oscuro encima */
  --st-explora: #FFC531;
  --st-navega: #2EC4B6;
  --st-adulto: #6FA0FF;
  --st-familia: #FF8A66;

  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;

  --r-sm: 10px;
  --r-md: 18px;
  --r-lg: 28px;
  --shadow: 0 1px 0 var(--line), 0 10px 24px -16px rgba(14, 27, 51, .45);
  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* Modo letra grande: lo activa el botón «Aa» y se recuerda en este dispositivo */
html.big-text { font-size: 118.75%; }
html.big-text body { line-height: 1.7; }
html.big-text .muted, html.big-text .fine, html.big-text .hint { color: var(--ink-2); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.0625rem/1.6 var(--body);
  color: var(--text);
  background: var(--ground);
  min-height: 100vh;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 48px; }
h1, h2, h3 { font-family: var(--display); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--ink-2); text-underline-offset: 3px; }
img { max-width: 100%; }
code { background: var(--sky); padding: .1em .35em; border-radius: 4px; }
:focus-visible { outline: 3px solid var(--coin); outline-offset: 2px; border-radius: 4px; }

.muted { color: var(--ink-soft); }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 60ch; }
.fine { font-size: .875rem; color: var(--ink-soft); }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 50; background: var(--paper); padding: 8px 12px; }

/* ---------- Botones ---------- */
.btn {
  --bg: var(--ink); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 700 1rem/1 var(--body);
  padding: .8em 1.25em;
  border-radius: 999px;
  border: 2px solid var(--bg);
  background: var(--bg); color: var(--fg);
  text-decoration: none; cursor: pointer;
  box-shadow: none;
  transition: transform .08s ease, box-shadow .08s ease, background .15s;
}
.btn:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn.coin { --bg: var(--coin); --fg: var(--ink); }
.btn.coin:hover { background: #FFD45E; border-color: #FFD45E; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.ghost { --bg: transparent; --fg: var(--ink); border-color: var(--ink); box-shadow: none; }
.btn.ghost:hover { background: var(--sky); }
.btn.sm { font-size: .9rem; padding: .6em 1em; }
.btn.lg { font-size: 1.1rem; padding: .95em 1.6em; }
.btn.block { width: 100%; }
.btn.danger { --fg: var(--coral); border-color: var(--coral-wash); }
.link { display: inline-block; margin-top: .5em; font-weight: 700; color: var(--ink-2); }
.link.center { display: block; text-align: center; margin-top: 1em; }
.link-btn { background: none; border: 0; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font: inherit; font-size: .9rem; padding: 0; margin-top: .5em; }

/* ---------- Cabecera ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 12px var(--gutter);
  background: var(--night);
  color: var(--on-night);
}
.brand { flex: none; display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.45rem/1 var(--display); color: var(--on-night); letter-spacing: -.01em; }
.brand img { display: block; height: 40px; width: auto; }
.topnav { display: flex; align-items: center; gap: 4px; min-width: 0; }
.topnav a { white-space: nowrap; padding: 9px 14px; border-radius: 999px; text-decoration: none; color: var(--on-night-soft); font-weight: 700; }
.topnav a:hover { background: var(--night-2); color: var(--on-night); }
.topnav a[aria-current] { background: var(--on-night); color: var(--night); }
.topbar-end { flex: none; margin-left: auto; display: flex; gap: 8px; align-items: center; }
.topbar .btn.ghost { --fg: var(--on-night); border-color: var(--night-line); }
.topbar .btn.ghost:hover { background: var(--night-2); }
.topbar .btn:not(.ghost) { --bg: var(--coin); --fg: var(--ink); }
.topbar .btn:not(.ghost):hover { background: #FFD45E; border-color: #FFD45E; }
.textsize { min-width: 44px; min-height: 40px; padding: 0 10px; border-radius: var(--r-sm); border: 2px solid var(--night-line); background: transparent; color: var(--on-night); font: 800 .95rem/1 var(--display); cursor: pointer; }
.textsize span { font-size: 1.3em; }
.textsize[aria-pressed=true] { background: var(--on-night); color: var(--night); border-color: var(--on-night); }
.chip-profile { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 2px solid var(--night-line); border-radius: 999px; text-decoration: none; color: var(--on-night); font-weight: 700; }

.avatar { display: inline-grid; place-items: center; border-radius: 50%; background: var(--sky); line-height: 1; flex: none; }
.avatar.sm { width: 32px; height: 32px; font-size: 1.1rem; }
.avatar.lg { width: 52px; height: 52px; font-size: 1.7rem; }
.avatar.xl { width: 84px; height: 84px; font-size: 2.8rem; }
.avatar.add { font: 700 2.4rem/1 var(--display); color: var(--ink-soft); background: transparent; border: 2px dashed var(--line); }

/* Barra inferior: se usa cuando el menú superior no cabe en una sola línea
   (móvil, tableta y escritorio estrecho; con letra grande hace falta más ancho). */
.tabbar {
  display: none; grid-template-columns: repeat(5, 1fr);
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--night); border-top: 1px solid var(--night-line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a { display: grid; justify-items: center; gap: 2px; text-decoration: none; color: var(--on-night-soft); font-size: .75rem; font-weight: 700; padding: 4px; border-radius: var(--r-sm); }
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current] { color: var(--ink); background: var(--coin); }
@media (max-width: 1040px) {
  .topnav { display: none; }
  .tabbar { display: grid; }
  .has-tabbar main, .has-tabbar .footer { padding-bottom: 96px; }
}
@media (max-width: 1240px) {
  html.big-text .topnav { display: none; }
  html.big-text .tabbar { display: grid; }
  html.big-text .has-tabbar main, html.big-text .has-tabbar .footer { padding-bottom: 96px; }
}
.flash { margin: 16px 0; padding: 12px 16px; background: var(--sprout-wash); color: #0F5234; font-weight: 700; border-radius: var(--r-md); }

.footer { background: var(--night); color: var(--on-night-soft); padding: 32px var(--gutter) 40px; font-size: .95rem; text-align: center; }
.footer a { color: var(--on-night); }
.footer p { max-width: 70ch; margin: 0 auto .5em; }
.footer .locales a { margin: 0 .35em; }
.footer .locales a[aria-current] { font-weight: 700; text-decoration-thickness: 2px; color: var(--coin, #FFC83D); }
.footer a { margin: 0 8px; }

/* ---------- Portada ---------- */
.band-night { background: var(--night); color: var(--on-night); margin-inline: calc(50% - 50vw); padding-inline: calc(50vw - 50%); }
.band-night h1, .band-night h2 { color: var(--on-night); }
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 5vw, 64px); align-items: center; padding: clamp(32px, 5vw, 64px) 0 32px; }
.kicker { font-weight: 700; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .8em; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 4.2rem); line-height: 1; letter-spacing: -.035em; max-width: 15ch; margin-bottom: .4em; }
.hero h1 em { font-style: normal; color: var(--ink); background: linear-gradient(transparent 60%, var(--coin) 60%, var(--coin) 90%, transparent 90%); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero .lead { color: var(--ink-2); font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 24px 0 8px; }
.actions .link { margin: 0; font-size: 1.1rem; }

/* Mini prueba de la portada */
.try { background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 32px); box-shadow: 8px 8px 0 var(--st-explora); }
.try-kicker { margin: 0 0 4px; font-weight: 700; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; color: var(--coin-deep); }
.try-q { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 0 0 16px; }
.try-item { margin: 0 0 16px; padding: 18px; border-radius: var(--r-md); background: var(--coin-wash); font: 800 1.35rem/1.25 var(--display); text-align: center; }
.try-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.try-buttons .option { text-align: center; }
.try-buttons .option:disabled { cursor: default; }
.try-feedback { margin: 14px 0 0; }
.try-feedback:empty { display: none; }
.try-feedback.good, .try-feedback.bad { padding: 12px 14px; border-radius: var(--r-md); }
.try-feedback.good { background: var(--sprout-wash); color: #0F5234; }
.try-feedback.bad { background: var(--coral-wash); color: #8C2B0F; }
.try-feedback a, .try-feedback .link-btn { font-weight: 700; color: inherit; font-size: 1rem; }
.try-foot { margin: 14px 0 0; font-size: .85rem; color: var(--ink-soft); }

.today { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 8px 32px; margin: 8px 0 24px; padding: clamp(20px, 3vw, 28px); border-radius: var(--r-lg); background: var(--coin-wash); border: 2px solid var(--ink); }
.today-kicker { display: flex; align-items: center; gap: 8px; font: 800 1.1rem/1.2 var(--display); color: var(--ink); }
.today-kicker::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px var(--coral-wash); }
.today-next { display: block; margin-top: 6px; font-size: .9rem; color: var(--ink-soft); }
.today-type { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--coin-deep); }
.today h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 4px 0 8px; }
.today-body p { max-width: 70ch; }
.today .sources { margin-bottom: .4em; }
.today .link { margin-top: 0; }
.today [hidden] { display: none !important; }
.today-more { margin-top: 14px; }
.promises { list-style: none; padding: 0; margin: 8px 0 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.promises li { padding: 18px 20px; border-top: 4px solid var(--ink); background: var(--paper); border-radius: 0 0 var(--r-md) var(--r-md); color: var(--ink-2); }
.promises strong { display: block; color: var(--ink); font: 800 1.15rem/1.25 var(--display); margin-bottom: 4px; }

.lifemap > h2 { font-size: clamp(1.8rem, 4vw, 2.75rem); letter-spacing: -.02em; padding-top: clamp(40px, 6vw, 64px); margin-bottom: .3em; }
.map-lead { color: var(--on-night-soft); max-width: 46em; margin-bottom: 8px; }

/* El mapa: cada itinerario es una parada del camino */
.lifemap { padding: 0 0 64px; }
.map-stage { position: relative; padding-top: 24px; }
.lifemap-path { position: absolute; inset: 40px 0 auto; width: 100%; height: 220px; }
.lifemap-path path { fill: none; stroke-linecap: round; }
.lifemap-path .road { stroke: var(--night-2); stroke-width: 18; }
.lifemap-path .dash { stroke: rgba(255, 255, 255, .55); stroke-width: 2; stroke-dasharray: 2 12; }
.stations { position: relative; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: start; }
.stations li:nth-child(even) { margin-top: 110px; }
.station { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; height: 100%; box-sizing: border-box; padding: 20px; border-radius: var(--r-lg); background: var(--tc); color: var(--ink); text-decoration: none; transition: transform .15s ease; }
.station:hover { transform: translateY(-3px); }
.station:focus-visible { outline-color: var(--on-night); outline-offset: 4px; }
.station-ages { font: 800 .85rem/1 var(--display); padding: 6px 10px; border-radius: 999px; background: var(--ink); color: var(--tc); }
.station strong { font: 800 1.6rem/1 var(--display); letter-spacing: -.01em; }
.station p { margin: 0; font-size: 1rem; line-height: 1.4; flex: 1; }
.station-count { font-weight: 700; font-size: .9rem; }
.station .mascot { width: 64px; height: 72px; margin: -6px 0 -4px; }

.mascot { display: block; flex: none; }
.mascot-say { display: flex; align-items: flex-end; gap: 12px; }
.mascot-say .bubble { margin: 0 0 18px; padding: 12px 16px; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 18px 18px 18px 4px; font-weight: 700; max-width: 32ch; }

.grow-wrap { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.grow { background: var(--night); color: #fff; border-radius: var(--r-lg); padding: 28px; }
.grow-controls { display: grid; gap: 14px; margin-bottom: 18px; font-size: 1.05rem; }
.grow-controls label { display: grid; gap: 6px; }
.grow output { font: 800 1.35rem/1 var(--display); color: var(--coin); }
.grow input[type=range] { width: 100%; accent-color: var(--coin); }
.grow select { font: inherit; padding: 6px 10px; border-radius: var(--r-sm); border: 0; background: var(--ink-2); color: #fff; width: max-content; }
.grow svg { width: 100%; height: auto; display: block; overflow: visible; }
.bar-ink { fill: #6FA0FF; }
.bar-coin { fill: var(--coin); }
.axis { stroke: rgba(255, 255, 255, .35); }
.grow-total { font-size: 1.1rem; margin: 14px 0 6px; }
.grow-total strong { color: var(--coin); font-family: var(--display); font-size: 1.4rem; }
.grow-legend { font-size: .9rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.key { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.key.ink { background: #6FA0FF; } .key.coin { background: var(--coin); }
.grow .fine { color: rgba(255, 255, 255, .7); margin: 0; }

.section { padding: 64px 0 8px; }
.section h2 { font-size: clamp(1.8rem, 4vw, 2.75rem); letter-spacing: -.02em; }
.section-lead { color: var(--ink-soft); max-width: 60ch; }

/* colores por itinerario: --tc relleno vivo (texto oscuro encima), --tw fondo suave, --td texto de acento */
.c-coin { --tc: var(--st-explora); --tw: var(--coin-wash); --td: #7A5200; }
.c-sprout { --tc: var(--st-navega); --tw: #D5F4F1; --td: #0B6B62; }
.c-ink { --tc: var(--st-adulto); --tw: #E1EAFF; --td: #1F4E9A; }
.c-coral { --tc: var(--st-familia); --tw: var(--coral-wash); --td: #A63A1C; }

.tracks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 24px; }
.track-card { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--r-lg); background: var(--tw); border: 2px solid var(--tc); text-decoration: none; color: var(--text); }
.track-card h3 { font-size: 1.5rem; margin: 0; }
.track-card p { margin: 0; flex: 1; }
.track-ages { font-weight: 700; color: var(--td); }
.track-count { font-size: .9rem; color: var(--ink-soft); margin-top: 8px; }
.track-card:hover { outline: 2px solid var(--ink); }

.steps { list-style: none; counter-reset: s; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { counter-increment: s; position: relative; padding: 76px 24px 24px; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-lg); }
.steps li::before { content: '0' counter(s); position: absolute; top: 24px; left: 24px; font: 800 1.1rem/1 var(--display); color: var(--coin-deep); }
.steps li:last-child { background: var(--night); color: var(--on-night-soft); border-color: var(--night); }
.steps li:last-child::before { color: var(--coin); }
.steps li:last-child strong { color: var(--on-night); }
.steps strong { display: block; color: var(--ink); font: 800 1.35rem/1.15 var(--display); margin-bottom: 6px; }

.demo-list { display: grid; gap: 10px; max-width: 720px; }
.demo-item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 16px 20px; background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--text); }
.demo-item:hover { border-color: var(--ink); }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--tc); color: var(--ink); font-weight: 700; font-size: .85rem; }

.closing { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin: 72px 0 24px; padding: clamp(28px, 5vw, 48px); border-radius: var(--r-lg); background: var(--night); }
.closing h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); color: var(--on-night); max-width: 20ch; margin: 0 0 .4em; }
.closing p { color: var(--on-night-soft); max-width: 42em; margin: 0; }

/* ---------- Formularios ---------- */
.auth { max-width: 440px; margin: 48px auto; }
.auth.wide { max-width: 640px; }
.form { display: grid; gap: 18px; margin: 20px 0; }
.form label { display: grid; gap: 6px; font-weight: 700; color: var(--ink); }
.form small { font-weight: 400; color: var(--ink-soft); }
input[type=text], input[type=email], input[type=password], input[type=number], select {
  font: inherit; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--text); width: 100%;
}
input:focus { border-color: var(--ink-2); outline: none; box-shadow: 0 0 0 3px var(--sky); }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
legend { font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.error { background: var(--coral-wash); color: #8C2B0F; border-radius: var(--r-sm); padding: 12px 16px 12px 32px; }
p.error { padding-left: 16px; }

.avatar-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-avatar input, .radio-card input, .seg input { position: absolute; opacity: 0; pointer-events: none; }
.radio-avatar .avatar { border: 3px solid transparent; cursor: pointer; }
.radio-avatar input:checked + .avatar { border-color: var(--coin); background: var(--coin-wash); }
.radio-avatar input:focus-visible + .avatar { outline: 3px solid var(--ink-2); }
.track-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.radio-card span { display: block; padding: 12px 14px; border: 2px solid var(--line); border-left: 6px solid var(--tc); border-radius: var(--r-sm); cursor: pointer; font-weight: 400; }
.radio-card input:checked + span { border-color: var(--tc); background: var(--tw); }
.radio-card input:focus-visible + span { outline: 3px solid var(--ink-2); }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg span { display: block; padding: 8px 14px; border: 2px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 700; color: var(--ink-2); }
.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--coin); }
.danger-zone { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 16px; }

/* ---------- Perfiles ---------- */
.profiles { text-align: center; padding: 48px 0; }
.profile-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin-top: 32px; }
.profile-tile { width: 170px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--text); }
.profile-pick { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px; border-radius: var(--r-md); width: 100%; box-sizing: border-box; }
.profile-pick:hover, .profile-tile.add:hover { background: var(--sky); }
.profile-pick:focus-visible { outline: 3px solid var(--coin); }
.profile-pick strong, .profile-tile.add strong { font: 700 1.2rem/1.2 var(--display); color: var(--ink); }
.profile-tile.add { padding: 16px; border-radius: var(--r-md); }
.edit-link { font-size: .9rem; }

/* ---------- Panel principal ---------- */
.panel { background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.dash { padding-top: 28px; display: grid; gap: 20px; }
.dash-head { display: flex; align-items: center; gap: 16px; }
.dash-head h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 0; }
.dash-head p { margin: 0; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.week { display: flex; gap: 20px; align-items: center; background: var(--night); color: var(--on-night-soft); border-color: var(--night); }
.week h2, .week .big { color: var(--on-night); }
.week .big span, .week .muted { color: var(--on-night-soft); }
.ring { width: 120px; height: 120px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring-bg { stroke: var(--night-2); }
.ring-fg { stroke: var(--coin); stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.week h2 { margin: 0; font-size: 1.2rem; }
.big { font: 800 2.2rem/1.1 var(--display); color: var(--ink); margin: 4px 0; }
.big span { font-size: 1.1rem; font-weight: 500; color: var(--ink-soft); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; }
.stats > div { display: grid; gap: 4px; }
.stat { font: 800 1.6rem/1.1 var(--display); color: var(--ink); }
.xpbar { height: 10px; background: var(--sky); border-radius: 999px; overflow: hidden; }
.xpbar span { display: block; height: 100%; background: var(--sprout); border-radius: inherit; }
.xpbar.coin span { background: var(--coin); }
.xpbar.big { height: 16px; }

.plan h2 { margin-bottom: 12px; }
.plan-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.plan-list li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); }
.plan-list li > div { display: grid; }
.plan-list .muted { font-size: .85rem; }
.plan-list li.is-next { border: 2px solid var(--coin); background: var(--coin-wash); }
.plan-list strong { color: var(--ink); font-size: 1.05rem; }

.badge-row { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.badge-row li { display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; background: var(--coin-wash); border-radius: 999px; font-weight: 700; color: var(--ink); }
.badge-row li span { font-size: 1.2rem; }
.badge-row.big { justify-content: center; margin-top: 16px; }
.badge-row.big li { flex-direction: column; border-radius: var(--r-md); padding: 12px 16px; text-align: center; }
.badge-row.big li span { font-size: 2rem; }
.badge-row.big small { font-weight: 400; color: var(--ink-soft); }
.badge-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.badge-grid li { display: grid; gap: 4px; padding: 18px; border-radius: var(--r-md); border: 1px solid var(--line); }
.badge-grid li.has { background: var(--coin-wash); border-color: transparent; }
.badge-grid li.locked { opacity: .6; }
.badge-icon { font-size: 2.2rem; }

/* ---------- Camino ---------- */
.path-page { padding-top: 24px; }
.track-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 24px; }
.track-tabs a { padding: 9px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--paper); text-decoration: none; color: var(--ink-2); font-weight: 700; white-space: nowrap; }
.track-tabs a[aria-current] { background: var(--tc); border-color: var(--tc); color: var(--ink); }
.path-head { display: flex; align-items: center; gap: 24px; padding: clamp(24px, 4vw, 40px); border-radius: var(--r-lg); background: var(--tc); color: var(--ink); margin-bottom: 32px; }
.path-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.path-head .lead, .path-head .muted { color: var(--ink); }
.path-head .mascot { width: 120px; height: 136px; }
.path-head .lead { margin-bottom: .4em; }
.path-head p:last-child { margin: 0; }
.module { margin-bottom: 40px; }
.module h2 { display: flex; flex-direction: column; gap: 2px; }
.module-n { font: 700 .95rem/1 var(--body); color: var(--td); }
.stones { list-style: none; padding: 0; margin: 16px 0 0; position: relative; display: grid; gap: 18px; max-width: 640px; }
.stones::before { content: ''; position: absolute; left: 31px; top: 20px; bottom: 20px; border-left: 4px dotted var(--line); }
.stone > a, .stone > div { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--text); position: relative; }
.stone.right > a, .stone.right > div { margin-left: clamp(0px, 6vw, 56px); }
.stone-dot { width: 66px; height: 66px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 800 1.5rem/1 var(--display); background: var(--paper); border: 4px solid var(--line); color: var(--ink-soft); position: relative; z-index: 1; }
.stone-text { display: grid; }
.stone-text strong { font-size: 1.1rem; color: var(--ink); }
.stone-text .muted { font-size: .9rem; }
.stone.is-done .stone-dot { background: var(--sprout); border-color: var(--sprout); color: #fff; }
.stone.is-next .stone-dot { background: var(--coin); border-color: var(--coin-deep); color: var(--ink); box-shadow: 0 0 0 6px var(--coin-wash); }
.stone.is-ready .stone-dot { border-color: var(--tc); color: var(--ink); }
.stone.is-next .stone-dot { background: var(--tc); border-color: var(--ink); box-shadow: 0 0 0 6px var(--tw); }
.stone.is-soon { opacity: .55; }
.stone > a:hover .stone-dot { transform: scale(1.06); }
.stone-dot { transition: transform .15s ease; }

/* ---------- Reproductor de lecciones ---------- */
.player { max-width: 680px; margin: 0 auto; padding: 16px 0 0; min-height: calc(100vh - 140px); display: flex; flex-direction: column; }
.player-head { display: flex; align-items: center; gap: 14px; }
.close { font-size: 1.3rem; text-decoration: none; color: var(--ink-soft); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.close:hover { background: var(--sky); }
.player-progress { flex: 1; height: 16px; background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.player-progress span { display: block; height: 100%; width: 0; background: var(--tc, var(--sprout)); border-radius: inherit; transition: width .4s ease; }
.player-xp { font: 800 1rem/1 var(--display); color: var(--ink); min-width: 3ch; text-align: right; }
.player-meta { display: flex; gap: 10px; align-items: center; margin: 14px 0 6px; font-size: .9rem; }
.stage { flex: 1; padding: 12px 0 24px; }
.card { animation: none; }
.card.enter { animation: enter .28s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.card h2 { font-size: clamp(1.4rem, 4vw, 1.8rem); }
.card h1:focus, .card h2:focus { outline: none; }
.card p, .card li { font-size: 1.15rem; max-width: 60ch; }
.big-emoji { font-size: 3.4rem; line-height: 1; margin-bottom: 12px; }
.options { display: grid; gap: 10px; margin-top: 18px; }
.option { font: 700 1.1rem/1.35 var(--body); text-align: left; padding: 16px 18px; min-height: 56px; border: 2px solid var(--ink); border-bottom-width: 5px; border-radius: var(--r-md); background: var(--paper); color: var(--text); cursor: pointer; }
.option:hover { background: var(--tw, var(--sky)); }
.option[aria-checked=true], .option[aria-pressed=true] { border-color: var(--ink-2); background: var(--sky); }
.option.right { border-color: var(--sprout); background: var(--sprout-wash); }
.option.wrong { border-color: var(--coral); background: var(--coral-wash); }
.classify { list-style: none; padding: 0; display: grid; gap: 10px; margin-top: 16px; }
.classify li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--r-md); }
.classify li.right { border-color: var(--sprout); background: var(--sprout-wash); }
.classify li.wrong { border-color: var(--coral); background: var(--coral-wash); }
.ci-text { font-size: 1.1rem; }
.ci-buckets { display: flex; gap: 6px; }
.bucket { font: 700 .95rem/1 var(--body); padding: 11px 16px; min-height: 44px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink-2); cursor: pointer; }
.bucket[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.hint { color: var(--ink-soft); font-size: .9rem; }
.mission { background: var(--tw, var(--coin-wash)); border-radius: var(--r-lg); padding: 24px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 700; color: var(--ink); margin-top: 8px; }
.check input { width: 22px; height: 22px; accent-color: var(--sprout); }
.player-foot { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--ground) 24%); padding: 20px 0 16px; display: grid; gap: 10px; }
.player-foot .btn { width: 100%; }
.feedback:empty { display: none; }
.feedback { padding: 14px 16px; border-radius: var(--r-md); }
.feedback p { margin: .3em 0 0; }
.feedback.good { background: var(--sprout-wash); color: #155C3C; }
.feedback.bad { background: var(--coral-wash); color: #8C2B0F; }
.feedback.neutral { background: var(--sky); color: var(--ink); }
.done { text-align: center; padding-top: 24px; }
.done p { margin-left: auto; margin-right: auto; }
.burst { font-size: 4.5rem; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.burst .mascot { width: 140px; height: 158px; margin: 0 auto; }
.player-meta .mascot { width: 40px; height: 46px; }
@keyframes pop { from { transform: scale(.3); } to { transform: scale(1); } }
.xp-gain { font: 800 2rem/1 var(--display); color: var(--coin-deep); }
.levelup { display: inline-block; background: var(--ink); color: #fff; padding: 8px 18px; border-radius: 999px; font-weight: 700; }

/* ---------- Herramientas ---------- */
.page { padding-top: 32px; }
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 24px; }
.tool-card h2 { font-size: 1.35rem; margin-bottom: 4px; }
.tool { margin-top: 14px; }
.tool-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.tf { display: grid; gap: 4px; font-size: .9rem; font-weight: 700; color: var(--ink-2); }
.tool-out { margin-top: 14px; padding: 14px 16px; background: var(--sky); border-radius: var(--r-md); font-size: 1.05rem; }
.tool-out p { margin: .6em 0 0; font-size: .9rem; }
.tool-out strong { color: var(--ink); }
.split { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.split li { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; }
.split small { grid-column: 1 / -1; color: var(--ink-soft); }
.card .tool-out { font-size: 1.1rem; }

/* ---------- Plan de estudios ---------- */
.plan-track { border-top: 6px solid var(--tc); padding-top: 20px; margin-top: 40px; }
.plan-track h2 .muted { font: 400 1rem var(--body); }
.plan-modules { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 28px; }
.plan-modules ul { padding-left: 1.1em; margin: 0; }
.plan-modules li { margin-bottom: 4px; }
.soon { font-size: .8rem; color: var(--ink-soft); background: var(--sky); padding: 1px 8px; border-radius: 999px; }

/* ---------- Familia ---------- */
.family-members { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 36px; }
.family-members li { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); }
.family-members li > div { flex: 1; display: grid; gap: 6px; }
.goal-list { display: grid; gap: 16px; margin-bottom: 20px; }
.goal header { display: flex; justify-content: space-between; align-items: baseline; }
.goal-pct { font: 800 1.5rem/1 var(--display); color: var(--coin-deep); }
.goal.reached { background: var(--sprout-wash); border-color: transparent; }
.goal p { margin: 10px 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-form input { width: auto; flex: 1 1 140px; }
.new-goal { max-width: 520px; background: var(--sky); border-color: transparent; }
.moves { list-style: none; padding: 0; display: grid; gap: 6px; max-width: 640px; }
.moves li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pos { color: var(--sprout); } .neg { color: var(--coral); }

/* ---------- Móvil ---------- */

/* ---------- Descubre: historias, claves y curiosidades ---------- */
.d-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 32px; }
.d-jump a { padding: 8px 16px; border-radius: 999px; background: var(--paper); border: 2px solid var(--ink); font-weight: 700; text-decoration: none; }
.descubre h2 { margin-top: 40px; scroll-margin-top: 80px; }
.d-list { display: grid; gap: 12px; }
.d-card { border: 2px solid var(--line); border-top: 6px solid var(--coin); border-radius: var(--r-md); background: var(--paper); scroll-margin-top: 80px; }
.d-card.d-key { border-top-color: var(--st-familia); }
.d-card summary { display: grid; gap: 4px; padding: 16px 20px; cursor: pointer; list-style: none; }
.d-card summary::-webkit-details-marker { display: none; }
.d-card summary strong { font: 700 1.2rem/1.25 var(--display); color: var(--ink); }
.d-card summary::after { content: 'Leer la historia ↓'; font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.d-card.d-key summary::after { content: 'Ver la explicación ↓'; }
.d-card[open] summary::after { content: 'Cerrar ↑'; }
.d-when { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--coin-deep); }
.d-hook { color: var(--ink-2); }
.d-body { padding: 0 20px 18px; max-width: 70ch; }
.d-moral { background: var(--sky); padding: 10px 14px; border-radius: var(--r-sm); }
.d-matiz { border-left: 3px solid var(--coin); padding: 4px 0 4px 12px; color: var(--ink-2); }
.sources cite { font-style: normal; }
.sources { font-size: .85rem; color: var(--ink-soft); }
.sources span { font-weight: 700; }
.d-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.d-fact h3 { font-size: 1.15rem; }
.story-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.story-card { display: grid; align-content: start; gap: 8px; padding: 24px; border-radius: var(--r-lg); background: var(--coin-wash); text-decoration: none; color: var(--text); }
.story-card:nth-child(2) { background: var(--coral-wash); }
.story-card:nth-child(3) { background: #E1EAFF; }
.story-card:hover { outline: 2px solid var(--ink); }
.story-card strong { font: 800 1.35rem/1.15 var(--display); color: var(--ink); }
.card.done .teaser { margin-top: 20px; padding: 16px 18px; border-radius: var(--r-md); background: var(--sky); text-align: left; }
.card.done .teaser .teaser-kicker { display: block; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.card.done .teaser h2 { display: block; font: 700 1.1rem/1.3 var(--display); color: var(--ink); margin: 2px 0 4px; }
.card.done .teaser p { margin: 0; }
.did-you-know { margin-top: 12px; padding: 14px 18px; border-radius: var(--r-md); background: var(--coin-wash); text-align: left; }

@media (max-width: 900px) {
  .hero, .grow-wrap { grid-template-columns: 1fr; }
  .promises, .today { grid-template-columns: 1fr; }
  .stations { grid-template-columns: 1fr 1fr; }
  .stations li:nth-child(even) { margin-top: 0; }
  .lifemap-path { display: none; }
  .tracks { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .tool-grid, .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .chip-name { display: none; }
  .chip-profile { padding: 2px; }
  .tracks, .stations { grid-template-columns: 1fr; }
  .topbar { gap: 12px; }
  .topbar .btn { white-space: nowrap; }
  .path-head .mascot { width: 84px; height: 96px; }
  .steps li { padding-top: 64px; }
  .track-pick { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div:last-child { grid-column: 1 / -1; }
  .week { flex-direction: column; text-align: center; }
  .plan-list li { grid-template-columns: 1fr auto; }
  .plan-list .mins { display: none; }
  .demo-item { grid-template-columns: 1fr auto; }
  .demo-item .pill { grid-column: 1 / -1; justify-self: start; }
  .player-foot { padding-bottom: 8px; }
  .classify li { flex-direction: column; align-items: stretch; }
  .ci-buckets .bucket { flex: 1; }
  .profile-tile { width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 760px) {
  .d-grid, .story-cards { grid-template-columns: 1fr; }
}
.did-you-know .label { font-weight: 700; }
.dash .mascot-say .mascot { width: 88px; height: 100px; }
@media (max-width: 440px) {
  .brand { font-size: 1.25rem; }
  .brand img { height: 34px; }
}
.player-meta .mascot { width: 48px; height: 54px; }
html.big-text .week .muted, html.big-text .band-night .fine, html.big-text .grow .fine { color: var(--on-night-soft); }
