/* =====================================================================
   UNAMente Sana · Componentes y páginas de la experiencia estudiantil
   ===================================================================== */
@import url("tokens.css");

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-bd: var(--hairline-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  min-height: 46px; padding: 0 1.25rem; border-radius: var(--r-pill);
  font-family: var(--font-display); font-weight: 650; font-size: var(--fs-md); line-height: 1;
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
  box-shadow: var(--sh-0); text-decoration: none; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), opacity var(--t-fast);
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--sh-1); }
.btn:active { transform: translateY(0) scale(0.985); box-shadow: var(--sh-0); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
.btn-primary { --btn-bg: var(--accent); --btn-fg: var(--on-accent); --btn-bd: transparent; background-image: linear-gradient(135deg, var(--teal-500), var(--teal-400)); box-shadow: 0 8px 20px -10px rgba(79, 143, 147, 0.7); }
.btn-primary:hover { box-shadow: 0 14px 28px -12px rgba(79, 143, 147, 0.75); }
.btn-soft { --btn-bg: var(--accent-soft); --btn-fg: var(--teal-700); --btn-bd: transparent; box-shadow: none; }
.btn-ghost { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--ink-2); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn-danger { --btn-bg: var(--danger-soft); --btn-fg: var(--danger); --btn-bd: transparent; }
.btn-sm { min-height: 38px; padding: 0 1rem; font-size: var(--fs-sm); }
.btn-lg { min-height: 54px; padding: 0 1.75rem; font-size: var(--fs-lg); }
.btn-block { width: 100%; }
.btn-icon { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.btn .icon { width: 1.15em; height: 1.15em; }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: var(--s-6); position: relative; }
.card-flat { box-shadow: none; }
.card-pad-lg { padding: clamp(24px, 4vw, 40px); }
.card-tinted { border: 0; }
.card-interactive { transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); }
.card-interactive:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.card-header h2, .card-header h3 { margin: 0; }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); margin: 0; }
.tint-mist { background: var(--mist); color: var(--mist-ink); }
.tint-sage { background: var(--sage); color: var(--sage-ink); }
.tint-lavender { background: var(--lavender); color: var(--lavender-ink); }
.tint-blush { background: var(--blush); color: var(--blush-ink); }
.tint-peach { background: var(--peach); color: var(--peach-ink); }
.tint-butter { background: var(--butter); color: var(--butter-ink); }
.tint-teal { background: var(--teal-100); color: var(--teal-700); }

/* ---------- Píldoras y chips ---------- */
.pill { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.3em 0.8em; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 650; font-family: var(--font-display); letter-spacing: 0.01em; background: var(--surface-2); color: var(--ink-2); line-height: 1.4; }
.pill .icon { width: 1em; height: 1em; }
.pill-success { background: var(--success-soft); color: var(--success); }
.pill-warning { background: var(--warning-soft); color: var(--warning); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-accent { background: var(--accent-soft); color: var(--teal-700); }
.pill-outline { background: transparent; border: 1px solid var(--hairline-strong); }
.chip { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.55em 1em; border-radius: var(--r-pill); border: 1px solid var(--hairline-strong); background: var(--surface); font-size: var(--fs-sm); font-weight: 550; cursor: pointer; transition: all var(--t-fast) var(--ease); user-select: none; }
.chip:hover { border-color: var(--teal-300); background: var(--teal-50); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--teal-100); border-color: var(--teal-300); color: var(--teal-700); }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-5); }
.field > label, .field-label { font-family: var(--font-display); font-weight: 650; font-size: var(--fs-sm); color: var(--ink-2); }
.field .hint { font-size: var(--fs-sm); color: var(--muted); margin: 0; }
.field .error { font-size: var(--fs-sm); color: var(--danger); margin: 0; display: flex; gap: 0.4em; align-items: center; }
.input, .textarea, .select {
  width: 100%; min-height: 48px; padding: 12px 16px; border-radius: var(--r-md);
  border: 1px solid var(--hairline-strong); background: var(--surface); color: var(--ink);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast);
  font-size: 16px; /* evita zoom en iOS */
}
.input:hover, .textarea:hover { border-color: var(--teal-300); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--teal-400); box-shadow: 0 0 0 4px var(--accent-ring); outline: none; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236f7e8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.input-wrap { position: relative; }
.input-wrap .icon-left { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-wrap .input { padding-left: 44px; }
.input-wrap .toggle-pw { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.input-wrap .toggle-pw:hover { background: var(--surface-2); color: var(--ink); }
.check { display: flex; gap: var(--s-3); align-items: flex-start; cursor: pointer; font-size: var(--fs-sm); color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--teal-500); flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: var(--s-3); cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 48px; height: 28px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background var(--t-base) var(--ease); flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform var(--t-base) var(--ease-out); }
.switch input:checked + .track { background: var(--teal-500); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px var(--accent-ring); }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-top: var(--s-6); }
.pw-meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.pw-meter > span { display: block; height: 100%; width: 0; background: var(--danger); transition: width var(--t-base) var(--ease), background var(--t-base); border-radius: inherit; }

/* ---------- Avisos ---------- */
.alert { display: flex; gap: var(--s-3); align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--info-soft); color: var(--teal-700); font-size: var(--fs-sm); line-height: 1.5; }
.alert .icon { flex: none; margin-top: 2px; }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }
.alert p { margin: 0; }

/* Toasts */
.toasts { position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 84px); transform: translateX(-50%); display: flex; flex-direction: column; gap: var(--s-2); z-index: 900; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 760px) { .toasts { bottom: var(--s-6); right: var(--s-6); left: auto; transform: none; } }
.toast { pointer-events: auto; display: flex; gap: var(--s-3); align-items: flex-start; padding: 14px 16px; background: var(--ink); color: #fff; border-radius: var(--r-md); box-shadow: var(--sh-2); font-size: var(--fs-sm); animation: toast-in var(--t-slow) var(--ease-out); }
.toast .icon { color: var(--teal-300); margin-top: 1px; flex: none; }
.toast.is-leaving { animation: toast-out var(--t-base) var(--ease) forwards; }
.toast-success .icon { color: #8fe0b1; }
.toast-error .icon { color: #ffb4b1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Diálogo ---------- */
dialog.sheet { border: 0; padding: 0; background: transparent; max-width: min(92vw, 560px); width: 100%; margin: auto; }
dialog.sheet::backdrop { background: rgba(31, 42, 51, 0.45); backdrop-filter: blur(6px); }
dialog.sheet .sheet-body { background: var(--surface); border-radius: var(--r-xl); padding: clamp(24px, 4vw, 36px); box-shadow: var(--sh-3); animation: sheet-in var(--t-slow) var(--ease-out); }
dialog.sheet .sheet-close { position: absolute; top: 14px; right: 14px; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (max-width: 599px) { dialog.sheet { max-width: 100vw; margin: auto 0 0; } dialog.sheet .sheet-body { border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: calc(24px + var(--safe-bottom)); } }

/* ---------- Progreso ---------- */
.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; width: var(--value, 0%); background: linear-gradient(90deg, var(--teal-400), var(--teal-500)); border-radius: inherit; transition: width var(--t-slow) var(--ease-out); }
.progress-thin { height: 5px; }
.ring { position: relative; width: var(--ring-size, 120px); height: var(--ring-size, 120px); display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.ring .ring-track { stroke: var(--surface-3); }
.ring .ring-value { stroke: url(#ringGrad); stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 0)); transition: stroke-dashoffset 900ms var(--ease-out); }
.ring .ring-label { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; width: 72%; font-family: var(--font-display); font-weight: 800; font-size: calc(var(--ring-size, 120px) * 0.24); line-height: 1; letter-spacing: -0.03em; }
.ring .ring-label small { display: block; margin-top: 0.3em; font-size: 0.4em; font-weight: 600; color: var(--muted); letter-spacing: 0; line-height: 1.1; }

/* ---------- Lúa ---------- */
.lua { display: inline-block; width: var(--lua-size, 96px); height: var(--lua-size, 96px); }
.lua svg { width: 100%; height: 100%; overflow: visible; }
.lua .lua-body { animation: lua-float 5s ease-in-out infinite; transform-origin: 50% 60%; }
.lua .lua-eye { animation: lua-blink 6s ease-in-out infinite; transform-origin: center; }
.lua .lua-eye-r { animation-delay: 0.1s; }
.lua[data-mood="celebrate"] .lua-body { animation: lua-bounce 1.6s var(--ease-out) 1; }
.lua[data-mood="calm"] .lua-body { animation-duration: 7s; }
@keyframes lua-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(-1.2deg); } }
@keyframes lua-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.08); } }
@keyframes lua-bounce { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(-14px) scale(1.04); } 55% { transform: translateY(0) scale(0.98); } 75% { transform: translateY(-6px); } 100% { transform: translateY(0); } }
.lua-bubble { position: relative; background: var(--surface); border-radius: var(--r-lg); padding: var(--s-4) var(--s-5); box-shadow: var(--sh-1); border: 1px solid var(--hairline); font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.55; }
.lua-bubble::before { content: ""; position: absolute; width: 14px; height: 14px; background: inherit; border-left: 1px solid var(--hairline); border-top: 1px solid var(--hairline); transform: rotate(-45deg); left: -8px; top: 24px; }
.lua-bubble.bubble-top::before { left: 28px; top: -8px; transform: rotate(45deg); }
.lua-bubble .who { display: block; font-family: var(--font-display); font-weight: 700; color: var(--teal-700); font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.lua-row { display: flex; gap: var(--s-4); align-items: flex-start; }
.lua-row .lua { flex: none; }

/* ---------- Shell de la aplicación ---------- */
.app-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.app-header { position: sticky; top: 0; z-index: 50; background: rgba(245, 248, 250, 0.82); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--hairline); padding-top: var(--safe-top); }
.app-header .bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--grad-brand); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 14px -6px rgba(79, 143, 147, 0.8); }
.brand-mark .icon { width: 20px; height: 20px; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; line-height: 1.1; }
.brand-name small { display: block; margin-top: 3px; font-size: var(--fs-xs); font-weight: 500; color: var(--muted); letter-spacing: 0; line-height: 1.2; }
.nav-desktop { display: none; gap: 4px; }
.nav-desktop a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: var(--r-pill); color: var(--ink-2); font-weight: 550; font-size: var(--fs-sm); transition: background var(--t-fast) var(--ease), color var(--t-fast); }
.nav-desktop a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav-desktop a[aria-current="page"] { background: var(--teal-100); color: var(--teal-700); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--lavender); color: var(--lavender-ink); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-sm); letter-spacing: 0.02em; border: 2px solid #fff; box-shadow: var(--sh-0); }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-2); border: 1px solid var(--hairline); padding: 8px; display: none; z-index: 60; }
.menu.is-open { display: block; animation: sheet-in var(--t-base) var(--ease-out); }
.menu .menu-head { padding: 10px 12px; border-bottom: 1px solid var(--hairline); margin-bottom: 6px; }
.menu .menu-head strong { display: block; font-family: var(--font-display); }
.menu .menu-head small { color: var(--muted); word-break: break-all; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--ink-2); text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.app-main { flex: 1; padding: var(--s-6) 0 calc(var(--s-20) + var(--safe-bottom)); }
@media (min-width: 760px) { .app-main { padding: var(--s-8) 0 var(--s-16); } .nav-desktop { display: flex; } }
.app-footer { border-top: 1px solid var(--hairline); padding: var(--s-8) 0 calc(var(--s-8) + 72px + var(--safe-bottom)); color: var(--muted); font-size: var(--fs-sm); }
@media (min-width: 760px) { .app-footer { padding-bottom: var(--s-8); } }
.app-footer .cluster { justify-content: space-between; }
.app-footer a { color: var(--ink-2); }

/* Barra de pestañas móvil */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(255, 255, 255, 0.9); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-top: 1px solid var(--hairline); padding: 6px 6px calc(6px + var(--safe-bottom)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px 6px; border-radius: var(--r-md); color: var(--muted); font-size: 0.68rem; font-weight: 600; font-family: var(--font-display); letter-spacing: 0.01em; text-decoration: none; transition: color var(--t-fast), background var(--t-fast); min-height: 52px; }
.tabbar a .icon { width: 23px; height: 23px; transition: transform var(--t-base) var(--ease-out); }
.tabbar a[aria-current="page"] { color: var(--teal-700); background: var(--teal-100); }
.tabbar a[aria-current="page"] .icon { transform: translateY(-1px); }
.tabbar a:active .icon { transform: scale(0.9); }
@media (min-width: 760px) { .tabbar { display: none; } }

/* ---------- Encabezados de página ---------- */
.page-head { margin-bottom: var(--s-6); }
.page-head h1 { margin-bottom: 0.25em; }
.page-head .lead { margin: 0; }
.page-head-row { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: flex-end; justify-content: space-between; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-sm); font-weight: 550; margin-bottom: var(--s-3); }
.back-link:hover { color: var(--ink); text-decoration: none; }

/* ---------- Animaciones de entrada ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 60ms; } .reveal-delay-2 { transition-delay: 120ms; } .reveal-delay-3 { transition-delay: 180ms; } .reveal-delay-4 { transition-delay: 240ms; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Pantallas de acceso ---------- */
.auth-shell { min-height: 100dvh; display: grid; grid-template-columns: 1fr; background: var(--grad-hero); }
.auth-side { display: none; padding: var(--s-12); position: relative; overflow: hidden; }
.auth-side .blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.7; }
.auth-side .blob-1 { width: 420px; height: 420px; background: #cfe3d6; top: -120px; right: -80px; }
.auth-side .blob-2 { width: 360px; height: 360px; background: #dfd9f2; bottom: -120px; left: -80px; }
.auth-side .side-inner { position: relative; max-width: 460px; margin: auto 0; }
.auth-side .side-inner h2 { font-size: var(--fs-3xl); }
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: calc(var(--s-8) + var(--safe-top)) var(--gutter) calc(var(--s-10) + var(--safe-bottom)); }
.auth-card { width: min(100%, 460px); margin: 0 auto; background: var(--surface); border-radius: var(--r-2xl); padding: clamp(28px, 5vw, 44px); box-shadow: var(--sh-2); border: 1px solid rgba(255, 255, 255, 0.7); }
.auth-card h1 { font-size: var(--fs-2xl); margin-top: var(--s-5); }
.auth-card .brand { margin-bottom: var(--s-2); }
.auth-foot { text-align: center; font-size: var(--fs-sm); color: var(--muted); margin-top: var(--s-6); }
@media (min-width: 960px) { .auth-shell { grid-template-columns: 1.05fr 1fr; } .auth-side { display: flex; } }

/* ---------- Bienvenida pública ---------- */
.hero { position: relative; overflow: hidden; background: var(--grad-hero); padding: calc(104px + var(--safe-top)) 0 var(--s-12); }
.hero::after { content: ""; position: absolute; inset: auto -10% -40% auto; width: 60vw; max-width: 720px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(159, 209, 204, 0.5), transparent 70%); pointer-events: none; }
.hero-grid { display: grid; gap: var(--s-8); align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.4rem); max-width: 18ch; }
.hero .lead { font-size: var(--fs-lg); }
.hero-lua { display: flex; flex-direction: column; align-items: center; gap: var(--s-4); position: relative; }
.hero-lua .lua-stage { position: relative; display: grid; place-items: center; width: clamp(220px, 34vw, 300px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.95) 0%, rgba(223, 241, 239, 0.9) 45%, rgba(223, 241, 239, 0) 72%); }
.hero-lua .lua-stage::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; border: 1.5px dashed rgba(79, 143, 147, 0.25); animation: spin-slow 60s linear infinite; }
.hero-lua .lua { --lua-size: clamp(140px, 22vw, 200px); filter: drop-shadow(0 18px 26px rgba(79, 143, 147, 0.28)); position: relative; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.hero-lua .lua-bubble { max-width: 320px; text-align: center; }
.feature-list { display: grid; gap: var(--s-4); margin: var(--s-8) 0; padding: 0; list-style: none; }
.feature-list li { display: flex; gap: var(--s-4); align-items: flex-start; }
.feature-list .feature-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--surface); box-shadow: var(--sh-1); color: var(--teal-600); }
.feature-list strong { display: block; font-family: var(--font-display); font-size: var(--fs-md); }
.feature-list p { margin: 2px 0 0; color: var(--ink-3); font-size: var(--fs-sm); }
.module-strip { padding: var(--s-14) 0; }
.module-strip .grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mini-module { padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); display: flex; gap: var(--s-3); align-items: flex-start; }
.mini-module .num { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-sm); flex: none; }
.mini-module strong { font-family: var(--font-display); font-size: var(--fs-sm); display: block; line-height: 1.3; }
.mini-module small { color: var(--muted); }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr 0.85fr; } .hero { padding: calc(120px + var(--safe-top)) 0 var(--s-20); } }
.public-footer { padding: var(--s-10) 0 var(--s-12); color: var(--muted); font-size: var(--fs-sm); border-top: 1px solid var(--hairline); }
.topbar-public { position: absolute; top: var(--safe-top); left: 0; right: 0; z-index: 5; padding: var(--s-4) 0; }
.topbar-public .bar { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); }
.topbar-public .brand { flex: 1 1 auto; min-width: 0; }
.topbar-public nav { flex-wrap: nowrap; flex: none; }

/* ---------- Inicio (dashboard) ---------- */
.home-grid { display: grid; gap: var(--s-5); }
@media (min-width: 900px) { .home-grid { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); align-items: start; } }
.home-greeting h1 { font-size: var(--fs-3xl); margin-bottom: 0.15em; }
.home-greeting .date { color: var(--muted); }
.continue-card { position: relative; overflow: hidden; border: 0; color: #fff; background: linear-gradient(135deg, #4f8f93 0%, #6aa9b6 60%, #8fbfd0 100%); padding: clamp(24px, 4vw, 36px); border-radius: var(--r-xl); box-shadow: 0 30px 60px -30px rgba(63, 119, 123, 0.6); }
.continue-card::before { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); right: -100px; top: -140px; }
.continue-card::after { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); right: 40px; bottom: -120px; }
.continue-card > * { position: relative; z-index: 1; }
.continue-card .pill { background: rgba(255, 255, 255, 0.2); color: #fff; }
.continue-card h2 { color: #fff; font-size: var(--fs-2xl); margin: var(--s-3) 0 var(--s-2); }
.continue-card p { color: rgba(255, 255, 255, 0.88); max-width: 52ch; }
.continue-card .progress { background: rgba(255, 255, 255, 0.25); }
.continue-card .progress > span { background: #fff; }
.continue-card .btn-primary { background: #fff; color: var(--teal-700); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.35); background-image: none; }
.continue-card .next-act { display: flex; gap: 10px; align-items: center; font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.92); margin: var(--s-4) 0; }
.continue-card .next-act .icon { color: #fff; }
.quick-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, 1fr); }
.quick { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); text-decoration: none; color: var(--ink); transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); min-height: 140px; }
.quick:hover { transform: translateY(-3px); box-shadow: var(--sh-2); text-decoration: none; }
.quick .q-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.quick strong { font-family: var(--font-display); font-size: var(--fs-md); }
.quick small { color: var(--muted); }
.quick.is-locked { opacity: 0.7; }
.stat-card { display: flex; flex-direction: column; gap: var(--s-4); }
.stat-row { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-sm); color: var(--ink-2); padding: 8px 0; border-top: 1px solid var(--hairline); }
.stat-row strong { font-family: var(--font-display); font-size: var(--fs-md); color: var(--ink); }
.stat-row:first-of-type { border-top: 0; }
.mood-quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.mood-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px; border-radius: var(--r-md); border: 1px solid var(--hairline); background: var(--surface); font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); transition: all var(--t-fast) var(--ease); text-decoration: none; }
.mood-btn:hover { transform: translateY(-2px); box-shadow: var(--sh-1); text-decoration: none; }
.mood-btn[aria-pressed="true"], .mood-btn.is-active { border-color: transparent; box-shadow: 0 0 0 2px var(--teal-400); }
.mood-face { width: 36px; height: 36px; }
.mood-1 { --mood-bg: var(--blush); --mood-fg: var(--blush-ink); }
.mood-2 { --mood-bg: var(--peach); --mood-fg: var(--peach-ink); }
.mood-3 { --mood-bg: var(--butter); --mood-fg: var(--butter-ink); }
.mood-4 { --mood-bg: var(--sage); --mood-fg: var(--sage-ink); }
.mood-5 { --mood-bg: var(--mist); --mood-fg: var(--mist-ink); }
.mood-btn[class*="mood-"] { background: var(--mood-bg); color: var(--mood-fg); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: var(--s-3); padding: 10px 0; border-top: 1px solid var(--hairline); font-size: var(--fs-sm); align-items: flex-start; }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline .t-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--teal-600); }
.timeline .t-body { flex: 1; min-width: 0; }
.timeline .t-body strong { display: block; color: var(--ink); font-weight: 600; }
.timeline .t-body small { color: var(--muted); }

/* ---------- Lista de módulos ---------- */
.modules-list { display: grid; gap: var(--s-4); }
.module-card { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: center; padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); text-decoration: none; color: var(--ink); position: relative; transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); }
.module-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); text-decoration: none; }
.module-card.is-locked { background: var(--surface-2); color: var(--ink-3); }
.module-card.is-locked:hover { transform: none; box-shadow: none; }
.module-card .m-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; position: relative; }
.module-card .m-ic .icon { width: 26px; height: 26px; }
.module-card .m-ic .m-num { position: absolute; top: -8px; left: -8px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; font-family: var(--font-display); border: 2px solid var(--surface); }
.module-card .m-body h3 { margin: 0 0 2px; font-size: var(--fs-lg); }
.module-card .m-body p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.module-card .m-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.module-card .m-meta .progress { flex: 1; min-width: 100px; max-width: 220px; }
.module-card .m-state { position: absolute; top: 14px; right: 14px; }
.module-card .m-state .icon { width: 22px; height: 22px; }
.state-completed { color: var(--success); }
.state-locked { color: var(--muted-2); }
.modules-divider { display: flex; align-items: center; gap: var(--s-4); margin: var(--s-6) 0 var(--s-2); color: var(--muted); font-family: var(--font-display); font-weight: 700; font-size: var(--fs-sm); letter-spacing: 0.08em; text-transform: uppercase; }
.modules-divider::after { content: ""; flex: 1; height: 1px; background: var(--hairline-strong); }
@media (min-width: 760px) { .module-card { grid-template-columns: auto 1fr auto; } .module-card .m-state { position: static; } }

/* ---------- Página de módulo ---------- */
.module-hero { border-radius: var(--r-xl); padding: clamp(24px, 4vw, 40px); position: relative; overflow: hidden; margin-bottom: var(--s-6); }
.module-hero::after { content: ""; position: absolute; width: 360px; height: 360px; right: -140px; top: -160px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); }
.module-hero > * { position: relative; z-index: 1; }
.module-hero .eyebrow { color: inherit; }
.module-hero h1 { color: inherit; max-width: 20ch; }
.module-hero .lead { color: inherit; opacity: 0.9; }
.module-hero .hero-meta { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-top: var(--s-4); }
.module-hero .hero-meta .pill { background: rgba(255, 255, 255, 0.55); color: inherit; }
.module-hero .progress { background: rgba(255, 255, 255, 0.5); max-width: 280px; }
.module-hero .progress > span { background: currentColor; }
.module-layout { display: grid; gap: var(--s-6); }
.module-rail { display: none; }
@media (min-width: 1000px) { .module-layout { grid-template-columns: 260px minmax(0, 1fr); align-items: start; } .module-rail { display: block; position: sticky; top: 84px; } }
.rail-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.rail-list a { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: var(--r-sm); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 550; text-decoration: none; transition: background var(--t-fast); }
.rail-list a:hover { background: var(--surface-2); text-decoration: none; }
.rail-list a.is-current { background: var(--teal-100); color: var(--teal-700); }
.rail-list .rail-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--hairline-strong); display: grid; place-items: center; flex: none; font-size: 10px; font-weight: 800; color: var(--muted); transition: all var(--t-base) var(--ease); }
.rail-list .rail-dot .icon { width: 12px; height: 12px; }
.rail-list li.is-done .rail-dot { background: var(--success); border-color: var(--success); color: #fff; }
.rail-list li.is-optional .rail-dot { border-style: dashed; }
.rail-mobile { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin-bottom: var(--s-2); }
.rail-mobile::-webkit-scrollbar { display: none; }
.rail-mobile a { scroll-snap-align: start; flex: none; }
.rail-mobile .chip.is-done { background: var(--success-soft); border-color: transparent; color: var(--success); }
@media (min-width: 1000px) { .rail-mobile { display: none; } }
.module-rail .card { padding: var(--s-4); }
.rail-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 4px 12px 10px; }

.section { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-xl); padding: clamp(22px, 3.5vw, 36px); margin-bottom: var(--s-5); scroll-margin-top: 84px; position: relative; }
.section-head { display: flex; gap: var(--s-4); align-items: center; margin-bottom: var(--s-5); }
.section-head .s-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; }
.section-head .s-ic .icon { width: 24px; height: 24px; }
.section-head h2 { margin: 0; font-size: var(--fs-xl); }
.section-head .s-sub { color: var(--muted); font-size: var(--fs-sm); margin: 2px 0 0; }
.section-body > * + * { margin-top: var(--s-5); }
.section-foot { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--hairline); display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; justify-content: space-between; }
.section.is-complete .section-foot .done-badge { display: inline-flex; }
.done-badge { display: none; align-items: center; gap: 6px; color: var(--success); font-weight: 650; font-family: var(--font-display); font-size: var(--fs-sm); }
.section.is-complete .complete-btn { display: none; }
.section.is-complete .done-badge { display: inline-flex; }
.prose { max-width: var(--measure); color: var(--ink-2); font-size: var(--fs-lg); line-height: 1.7; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); }
.prose a { font-weight: 600; }
.prose ul { padding-left: 1.2em; }
.prose li + li { margin-top: 0.35em; }

/* Bloques */
.block-bullets { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 72ch; }
.block-bullets li { display: flex; gap: 14px; align-items: flex-start; font-size: var(--fs-lg); color: var(--ink-2); line-height: 1.6; }
.block-bullets li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--teal-400); margin-top: 0.62em; flex: none; box-shadow: 0 0 0 4px var(--teal-100); }
.block-bullets.is-emphasis li { padding: 14px 18px; border-radius: var(--r-md); background: var(--surface-2); }
.block-bullets.is-emphasis li::before { margin-top: 0.6em; }
.block-bullets.is-cards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); max-width: none; }
.block-bullets.is-cards li { padding: 16px 18px; border-radius: var(--r-md); background: var(--lavender); color: var(--lavender-ink); font-size: var(--fs-md); font-family: var(--font-display); font-weight: 600; }
.block-bullets.is-cards li::before { background: var(--lavender-ink); box-shadow: none; width: 8px; height: 8px; margin-top: 0.55em; }
.callout { border-radius: var(--r-lg); padding: var(--s-5) var(--s-6); display: flex; gap: var(--s-4); align-items: flex-start; background: var(--surface-2); color: var(--ink-2); max-width: 76ch; }
.callout .c-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.callout .c-body > :last-child { margin-bottom: 0; }
.callout .c-title { font-family: var(--font-display); font-weight: 700; display: block; margin-bottom: 4px; color: var(--ink); }
.callout-quote { background: var(--lavender); color: var(--lavender-ink); font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.callout-quote .c-ic { background: rgba(255, 255, 255, 0.5); color: var(--lavender-ink); }
.callout-important { background: var(--peach); color: var(--peach-ink); font-size: var(--fs-lg); }
.callout-important .c-ic { background: rgba(255, 255, 255, 0.55); color: var(--peach-ink); }
.callout-info { background: var(--mist); color: var(--mist-ink); }
.callout-info .c-ic { background: rgba(255, 255, 255, 0.55); color: var(--mist-ink); }
.callout-info ul { padding-left: 1.1em; margin: 0; }
.callout-info li + li { margin-top: 0.5em; }
.figure { margin: 0; }
.figure .fig-art { border-radius: var(--r-lg); overflow: hidden; background: var(--surface-2); display: grid; place-items: center; padding: var(--s-6); }
.figure .fig-art svg { width: min(100%, 520px); height: auto; }
.figure figcaption { font-size: var(--fs-sm); color: var(--muted); margin-top: 10px; text-align: center; }
.media-pending { border-radius: var(--r-lg); border: 1.5px dashed var(--hairline-strong); background: repeating-linear-gradient(135deg, var(--surface-2) 0 12px, var(--surface) 12px 24px); padding: var(--s-6); display: flex; gap: var(--s-4); align-items: center; }
.media-pending .mp-ic { width: 56px; height: 56px; border-radius: 16px; background: var(--surface); display: grid; place-items: center; color: var(--muted); box-shadow: var(--sh-0); flex: none; }
.media-pending strong { font-family: var(--font-display); display: block; }
.media-pending p { margin: 2px 0 0; font-size: var(--fs-sm); color: var(--muted); }
.video-wrap { border-radius: var(--r-lg); overflow: hidden; background: #0f171c; box-shadow: var(--sh-2); }
.video-wrap video { width: 100%; aspect-ratio: 16 / 9; }
.video-title { font-family: var(--font-display); font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }

/* Reproductor de audio */
.audio-player { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: center; padding: var(--s-4) var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--sh-1); }
.audio-player .ap-play { width: 56px; height: 56px; border-radius: 50%; background: var(--grad-brand); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 20px -10px rgba(79, 143, 147, 0.8); transition: transform var(--t-fast) var(--ease); }
.audio-player .ap-play:hover { transform: scale(1.05); }
.audio-player .ap-play .icon { width: 24px; height: 24px; }
.audio-player .ap-play .ic-pause { display: none; }
.audio-player.is-playing .ap-play .ic-pause { display: block; }
.audio-player.is-playing .ap-play .ic-play { display: none; }
.audio-player .ap-title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-sm); margin-bottom: 6px; display: flex; justify-content: space-between; gap: 8px; }
.audio-player .ap-time { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; }
.audio-player .ap-bar { height: 6px; border-radius: 999px; background: var(--surface-3); position: relative; cursor: pointer; }
.audio-player .ap-bar > span { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: var(--teal-500); }
.audio-player .ap-bar input { position: absolute; inset: -8px 0; width: 100%; opacity: 0; cursor: pointer; margin: 0; }
.audio-player .ap-extra { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* Ciclo TCC */
.cycle { display: grid; gap: var(--s-5); }
.cycle-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.cycle-stage { display: grid; gap: var(--s-5); }
@media (min-width: 820px) { .cycle-stage { grid-template-columns: 300px 1fr; align-items: start; } }
.cycle-diagram { position: relative; aspect-ratio: 1; max-width: 300px; margin: 0 auto; width: 100%; }
.cycle-diagram svg { width: 100%; height: 100%; }
.cycle-node { position: absolute; width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xs); background: var(--surface); border: 2px solid var(--hairline-strong); color: var(--ink-2); transition: all var(--t-base) var(--ease); line-height: 1.2; padding: 8px; }
.cycle-node .icon { width: 20px; height: 20px; margin-bottom: 2px; }
.cycle-node.n-thoughts { top: 0; left: 50%; transform: translateX(-50%); }
.cycle-node.n-emotions { bottom: 6%; right: 0; }
.cycle-node.n-behaviors { bottom: 6%; left: 0; }
.cycle-node.is-red { background: var(--blush); border-color: var(--blush-deep); color: var(--blush-ink); box-shadow: 0 0 0 6px rgba(232, 191, 202, 0.35); }
.cycle-node.is-green { background: var(--sage); border-color: var(--sage-deep); color: var(--sage-ink); box-shadow: 0 0 0 6px rgba(174, 208, 186, 0.35); }
.cycle-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; counter-reset: step; }
.cycle-steps li { padding: 12px 14px 12px 48px; border-radius: var(--r-md); background: var(--surface-2); position: relative; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; border: 1.5px solid transparent; transition: all var(--t-fast) var(--ease); }
.cycle-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 14px; top: 11px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; font-family: var(--font-display); background: var(--surface); color: var(--ink-2); }
.cycle-steps li.is-active { border-color: var(--teal-300); background: var(--teal-50); }
.cycle-steps li.tone-red::before { background: var(--blush); color: var(--blush-ink); }
.cycle-steps li.tone-green::before { background: var(--sage); color: var(--sage-ink); }
.cycle-steps li .phase { display: block; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 2px; }
.cycle-steps li.tone-red .phase { color: var(--blush-ink); }
.cycle-steps li.tone-green .phase { color: var(--sage-ink); }
.cycle-legend { display: flex; gap: var(--s-4); font-size: var(--fs-xs); color: var(--muted); flex-wrap: wrap; }
.cycle-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cycle-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* Carrusel */
.carousel { position: relative; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: var(--s-4); scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 4px; margin: -4px; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: center; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: var(--s-4); margin-top: var(--s-4); }
.carousel-dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.carousel-dots button { width: 8px; height: 8px; border-radius: 999px; background: var(--hairline-strong); transition: all var(--t-base) var(--ease); padding: 0; }
.carousel-dots button[aria-current="true"] { width: 24px; background: var(--teal-500); }
.trap-card { display: grid; gap: var(--s-5); border-radius: var(--r-xl); padding: clamp(22px, 4vw, 36px); background: var(--mist); color: var(--mist-ink); min-height: 320px; align-items: center; }
@media (min-width: 700px) { .trap-card { grid-template-columns: 1fr 220px; } }
.trap-card .trap-num { font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.75; }
.trap-card h3 { font-size: var(--fs-2xl); margin: 6px 0 10px; color: inherit; }
.trap-card p { margin: 0; font-size: var(--fs-md); opacity: 0.9; max-width: 44ch; }
.trap-card .thinker { position: relative; justify-self: center; }
.trap-card .thinker svg { width: 200px; height: auto; }
.thought-bubble { position: relative; background: #fff; color: var(--ink); border-radius: 22px; padding: 14px 18px; font-family: var(--font-hand); font-size: 1.5rem; line-height: 1.15; box-shadow: var(--sh-1); max-width: 260px; }
.thought-bubble::after, .thought-bubble::before { content: ""; position: absolute; background: #fff; border-radius: 50%; box-shadow: var(--sh-0); }
.thought-bubble::after { width: 14px; height: 14px; left: 18px; bottom: -14px; }
.thought-bubble::before { width: 8px; height: 8px; left: 10px; bottom: -26px; }
.rights-card { border-radius: var(--r-xl); padding: clamp(28px, 5vw, 44px); background: var(--sage); color: var(--sage-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--s-4); min-height: 260px; }
.rights-card .r-ic { width: 84px; height: 84px; border-radius: 28px; background: rgba(255, 255, 255, 0.6); display: grid; place-items: center; }
.rights-card .r-ic .icon { width: 38px; height: 38px; }
.rights-card h3 { margin: 0; font-size: var(--fs-2xl); color: inherit; max-width: 16ch; }
.topic-card { border-radius: var(--r-xl); padding: clamp(28px, 5vw, 44px); background: var(--butter); color: var(--butter-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--s-4); min-height: 220px; }
.topic-card .r-ic { width: 76px; height: 76px; border-radius: 24px; background: rgba(255, 255, 255, 0.6); display: grid; place-items: center; }
.topic-card .r-ic .icon { width: 34px; height: 34px; }
.topic-card h3 { margin: 0; font-size: var(--fs-xl); color: inherit; }

/* Checklist con íconos */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
@media (min-width: 760px) { .checklist.is-grid { grid-template-columns: 1fr 1fr; } }
.checklist li { display: flex; gap: var(--s-4); padding: var(--s-4) var(--s-5); border-radius: var(--r-lg); background: var(--surface-2); align-items: flex-start; }
.checklist .ck-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; color: var(--teal-600); flex: none; box-shadow: var(--sh-0); }
.checklist strong { display: block; font-family: var(--font-display); font-size: var(--fs-md); margin-bottom: 2px; }
.checklist p { margin: 0; font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.55; }
.iconrow { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.iconrow div { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: var(--s-4); border-radius: var(--r-lg); background: var(--sage); color: var(--sage-ink); min-width: 110px; flex: 1; font-size: var(--fs-sm); font-weight: 600; font-family: var(--font-display); text-align: center; }
.iconrow .icon { width: 28px; height: 28px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: var(--s-4); align-items: flex-start; padding: var(--s-4) var(--s-5); border-radius: var(--r-lg); background: var(--surface-2); font-size: var(--fs-md); color: var(--ink-2); line-height: 1.55; }
.steps li::before { content: counter(s); width: 36px; height: 36px; border-radius: 12px; background: var(--grad-brand); color: #fff; font-family: var(--font-display); font-weight: 800; display: grid; place-items: center; flex: none; }
.example-list { border-radius: var(--r-lg); background: var(--butter); color: var(--butter-ink); padding: var(--s-5) var(--s-6); }
.example-list h4 { color: inherit; margin-bottom: var(--s-3); font-family: var(--font-hand); font-size: 1.75rem; font-weight: 600; }
.example-list ul { columns: 2; column-gap: var(--s-6); margin: 0; padding-left: 1.2em; font-family: var(--font-hand); font-size: 1.4rem; line-height: 1.3; }
@media (max-width: 520px) { .example-list ul { columns: 1; } }

/* Comparación / cambio de pensamiento */
.compare { display: grid; gap: var(--s-4); }
@media (min-width: 700px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare .cmp { border-radius: var(--r-lg); padding: var(--s-5); display: flex; flex-direction: column; gap: 10px; }
.compare .cmp-l { background: var(--sage); color: var(--sage-ink); }
.compare .cmp-r { background: var(--blush); color: var(--blush-ink); }
.compare .cmp h4 { margin: 0; display: flex; align-items: center; gap: 8px; color: inherit; font-size: var(--fs-md); }
.compare .cmp p { margin: 0; font-family: var(--font-hand); font-size: 1.5rem; line-height: 1.2; }
.thought-shift { display: grid; gap: var(--s-4); }
.shift-pair { display: grid; gap: var(--s-3); align-items: center; }
@media (min-width: 760px) { .shift-pair { grid-template-columns: 1fr auto 1fr; } }
.shift-box { border-radius: var(--r-lg); padding: var(--s-5); display: flex; gap: var(--s-4); align-items: center; }
.shift-box .face { width: 56px; height: 56px; flex: none; }
.shift-box .lbl { display: block; font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; margin-bottom: 4px; }
.shift-box p { margin: 0; font-family: var(--font-hand); font-size: 1.45rem; line-height: 1.2; }
.shift-before { background: var(--blush); color: var(--blush-ink); }
.shift-after { background: var(--sage); color: var(--sage-ink); }
.shift-arrow { color: var(--teal-500); display: grid; place-items: center; }
.shift-arrow .icon { width: 28px; height: 28px; transform: rotate(90deg); }
@media (min-width: 760px) { .shift-arrow .icon { transform: none; } }
.thought-seq { display: grid; gap: 10px; }
.thought-seq .ts { display: grid; grid-template-columns: 40px 1fr; gap: var(--s-3); align-items: start; padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface-2); border-left: 4px solid var(--hairline-strong); }
.thought-seq .ts.tone-red { border-left-color: var(--blush-deep); }
.thought-seq .ts.tone-amber { border-left-color: var(--butter-deep); }
.thought-seq .ts.tone-green { border-left-color: var(--sage-deep); }
.thought-seq .ts .n { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; background: var(--surface); }
.thought-seq .ts .lbl { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 2px; }
.thought-seq .ts p { margin: 0; font-family: var(--font-hand); font-size: 1.4rem; line-height: 1.2; color: var(--ink); }
.bubbles { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.bubbles .bb { display: flex; flex-direction: column; align-items: center; gap: 14px; flex: 1 1 200px; max-width: 280px; }
.bubbles .bb .face { width: 64px; height: 64px; }

/* Tabla */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--hairline); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 520px; }
.table th, .table td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hairline); line-height: 1.5; }
.table thead th { background: var(--surface-2); font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.table thead th small { display: block; color: var(--muted); font-weight: 500; font-family: var(--font-body); font-size: var(--fs-xs); }
.table tbody tr:last-child td { border-bottom: 0; }
.table.is-notebook tbody td { font-family: var(--font-hand); font-size: 1.35rem; line-height: 1.2; color: var(--ink); background-image: repeating-linear-gradient(transparent 0 27px, var(--mist-deep) 27px 28px); }
.table caption { caption-side: top; text-align: left; font-family: var(--font-display); font-weight: 700; padding: 0 0 10px; color: var(--ink-2); }
.table.is-yesno thead th:first-child { background: var(--success-soft); color: var(--success); }
.table.is-yesno thead th:last-child { background: var(--danger-soft); color: var(--danger); }
.table.is-yesno td:first-child { background: rgba(227, 243, 232, 0.35); }
.table.is-yesno td:last-child { background: rgba(249, 227, 226, 0.35); }

/* Diálogo / guion */
.dialogue { border-radius: var(--r-lg); background: var(--surface-2); padding: var(--s-5) var(--s-6); display: grid; gap: var(--s-3); }
.dialogue .intro { color: var(--ink-3); font-style: italic; margin: 0; }
.dialogue .scene { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.dialogue .line { display: grid; grid-template-columns: 80px 1fr; gap: var(--s-3); align-items: start; }
.dialogue .line .who { font-family: var(--font-display); font-weight: 700; color: var(--teal-700); padding-top: 10px; }
.dialogue .line p { margin: 0; padding: 10px 14px; border-radius: 16px; background: var(--surface); }
.dialogue .line.is-b .who { color: var(--blush-ink); }
.dialogue .line.is-b p { background: var(--blush); color: var(--blush-ink); }

/* Estilos de comunicación */
.styles-grid { display: grid; gap: var(--s-4); }
@media (min-width: 760px) { .styles-grid { grid-template-columns: repeat(3, 1fr); } }
.style-card { border-radius: var(--r-lg); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); }
.style-card .face { width: 72px; height: 72px; }
.style-card h3 { margin: 0; color: inherit; font-size: var(--fs-lg); }
.style-card p { margin: 0; font-size: var(--fs-sm); opacity: 0.9; }
.style-pasiva { background: var(--mist); color: var(--mist-ink); }
.style-agresiva { background: var(--blush); color: var(--blush-ink); }
.style-asertiva { background: var(--sage); color: var(--sage-ink); }

/* Mapa corporal */
.body-map { display: grid; gap: var(--s-5); }
@media (min-width: 760px) { .body-map { grid-template-columns: 200px 1fr; align-items: center; } }
.body-map svg { width: 100%; max-width: 200px; height: auto; margin: 0 auto; }
.body-map ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.body-map li { padding: 10px 14px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); display: flex; gap: 8px; align-items: center; cursor: default; border: 1.5px solid transparent; transition: all var(--t-fast) var(--ease); }
.body-map li:hover, .body-map li.is-active { border-color: var(--teal-300); background: var(--teal-50); }
.body-map li i { width: 8px; height: 8px; border-radius: 50%; background: var(--blush-deep); flex: none; }
.body-map .zone { fill: var(--surface-3); transition: fill var(--t-base) var(--ease); }
.body-map .zone.is-active { fill: var(--blush-deep); }

/* Tarjetas TIP y sentidos */
.tip-cards { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tip-card { border-radius: var(--r-lg); padding: var(--s-5); display: flex; flex-direction: column; gap: 10px; background: var(--lavender); color: var(--lavender-ink); }
.tip-card .letter { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; line-height: 1; opacity: 0.9; }
.tip-card h4 { margin: 0; color: inherit; }
.tip-card p { margin: 0; font-size: var(--fs-sm); opacity: 0.9; }
.senses { display: grid; gap: var(--s-4); }
@media (min-width: 760px) { .senses { grid-template-columns: 1fr 1fr; } }
.sense-card { border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--hairline); }
.sense-card .sc-art { height: 160px; display: grid; place-items: center; }
.sense-card .sc-art svg { width: 100%; height: 100%; }
.sense-card .sc-body { padding: var(--s-5); }
.sense-card h4 { margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.sense-card .cluster { gap: 6px; }

/* Infografía de ciclo */
.cycle-info { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); counter-reset: ci; }
.cycle-info div { counter-increment: ci; padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface-2); font-size: var(--fs-sm); color: var(--ink-2); position: relative; padding-top: 40px; line-height: 1.4; font-weight: 550; }
.cycle-info div::before { content: counter(ci); position: absolute; top: 12px; left: 14px; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--butter); color: var(--butter-ink); font-family: var(--font-display); font-weight: 800; font-size: 12px; }
.cycle-info div:last-child { background: var(--blush); color: var(--blush-ink); }

/* Enlaces */
.links-grid { display: grid; gap: var(--s-4); }
@media (min-width: 760px) { .links-grid { grid-template-columns: repeat(3, 1fr); } }
.links-card { border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--hairline); display: flex; flex-direction: column; }
.links-card .lc-art { height: 120px; display: grid; place-items: center; }
.links-card .lc-art svg { width: 100%; height: 100%; }
.links-card .lc-body { padding: var(--s-4) var(--s-5) var(--s-5); }
.links-card h4 { margin: 0 0 10px; display: flex; gap: 8px; align-items: center; }
.links-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.links-card a { display: flex; gap: 8px; align-items: center; font-size: var(--fs-sm); font-weight: 550; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); }
.links-card a:hover { background: var(--teal-100); text-decoration: none; }
.links-card a .icon { width: 14px; height: 14px; margin-left: auto; color: var(--muted); }

/* Técnicas (módulo 2 y centro de relajación) */
.tech-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tech-card { border-radius: var(--r-xl); overflow: hidden; background: var(--surface); border: 1px solid var(--hairline); display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); position: relative; }
.tech-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); text-decoration: none; }
.tech-card .tc-art { height: 150px; position: relative; display: grid; place-items: center; overflow: hidden; }
.tech-card .tc-art .icon { width: 44px; height: 44px; position: relative; z-index: 1; }
.tech-card .tc-art::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); top: -120px; right: -70px; }
.tech-card .tc-art::after { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); bottom: -80px; left: -30px; }
.tech-card .tc-min { position: absolute; top: 12px; right: 12px; background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(6px); }
.tech-card .tc-body { padding: var(--s-5); display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tech-card h3 { margin: 0; font-size: var(--fs-lg); }
.tech-card p { margin: 0; font-size: var(--fs-sm); color: var(--ink-3); flex: 1; }
.tech-card .tc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: var(--fs-xs); color: var(--muted); }
.tech-card .tc-foot .pill { font-size: 0.7rem; }
.tech-card.is-practiced .tc-foot .pill-success { display: inline-flex; }
.technique-page { display: grid; gap: var(--s-6); }
@media (min-width: 1000px) { .technique-page { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .technique-side { position: sticky; top: 84px; } }
.technique-hero { border-radius: var(--r-xl); padding: clamp(24px, 4vw, 40px); position: relative; overflow: hidden; }
.technique-hero .icon-big { width: 64px; height: 64px; border-radius: 20px; background: rgba(255, 255, 255, 0.6); display: grid; place-items: center; margin-bottom: var(--s-4); }
.technique-hero .icon-big .icon { width: 30px; height: 30px; }
.technique-hero h1 { color: inherit; }
.technique-hero p { color: inherit; max-width: 50ch; }
.variant-choice { display: grid; gap: var(--s-4); grid-template-columns: 1fr 1fr; }
.variant-card { border-radius: var(--r-lg); overflow: hidden; border: 2px solid transparent; background: var(--surface); text-decoration: none; color: var(--ink); transition: all var(--t-base) var(--ease); display: flex; flex-direction: column; }
.variant-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); text-decoration: none; }
.variant-card.is-active { border-color: var(--teal-400); }
.variant-card .vc-art { height: 110px; }
.variant-card .vc-art svg { width: 100%; height: 100%; }
.variant-card strong { padding: 12px 16px; font-family: var(--font-display); display: flex; gap: 8px; align-items: center; }
.step-reader { border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--hairline); padding: clamp(20px, 3vw, 32px); }
.step-reader .sr-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin-bottom: var(--s-4); flex-wrap: wrap; }
.step-reader .sr-count { font-family: var(--font-display); font-weight: 700; color: var(--muted); font-size: var(--fs-sm); }
.step-reader .sr-step { font-size: var(--fs-xl); line-height: 1.5; color: var(--ink); min-height: 4.5em; font-weight: 500; letter-spacing: -0.005em; }
.step-reader .sr-step.is-changing { animation: step-fade var(--t-slow) var(--ease-out); }
@keyframes step-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.step-reader .sr-nav { display: flex; gap: var(--s-3); align-items: center; justify-content: space-between; margin-top: var(--s-5); flex-wrap: wrap; }
.step-reader .sr-progress { height: 4px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-top: var(--s-4); }
.step-reader .sr-progress > span { display: block; height: 100%; background: var(--teal-500); width: 0; transition: width var(--t-base) var(--ease); }
.breath-orb { width: 150px; height: 150px; border-radius: 50%; margin: 0 auto var(--s-5); background: radial-gradient(circle at 35% 35%, #ffffff, var(--teal-200) 55%, var(--teal-400)); box-shadow: 0 0 0 18px rgba(159, 209, 204, 0.25), 0 0 0 36px rgba(159, 209, 204, 0.12); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: var(--teal-700); animation: breathe 10s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(0.86); } 40% { transform: scale(1.08); } 55% { transform: scale(1.08); } }
.steps-text { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: st; }
.steps-text li { counter-increment: st; display: flex; gap: var(--s-3); font-size: var(--fs-md); color: var(--ink-2); line-height: 1.6; }
.steps-text li::before { content: counter(st); font-family: var(--font-display); font-weight: 800; color: var(--teal-600); min-width: 1.6em; }
.ambient { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ambient span { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.35); animation: drift 18s linear infinite; }
@keyframes drift { from { transform: translateY(0) translateX(0); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(-140px) translateX(30px); opacity: 0; } }

/* Cuaderno (ejercicios) */
.exercise { border-radius: var(--r-xl); border: 1px solid var(--hairline); background: var(--surface); overflow: hidden; }
.exercise .ex-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--hairline); background: var(--surface-2); flex-wrap: wrap; }
.exercise .ex-head h3 { margin: 0; font-size: var(--fs-md); display: flex; gap: 8px; align-items: center; }
.exercise .ex-status { font-size: var(--fs-xs); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-family: var(--font-display); transition: color var(--t-fast); }
.exercise .ex-status .icon { width: 14px; height: 14px; }
.exercise .ex-status.is-saving { color: var(--warning); }
.exercise .ex-status.is-saved { color: var(--success); }
.exercise .ex-status.is-error { color: var(--danger); }
.exercise .ex-body { padding: var(--s-5); }
.exercise .ex-example { margin-bottom: var(--s-5); }
.ex-example summary { cursor: pointer; font-family: var(--font-display); font-weight: 650; color: var(--teal-700); display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: var(--r-pill); background: var(--teal-50); list-style: none; }
.ex-example summary::-webkit-details-marker { display: none; }
.ex-example[open] summary { margin-bottom: var(--s-3); }
.ex-example .ex-ex-body { border-radius: var(--r-lg); background: var(--butter); color: var(--butter-ink); padding: var(--s-4) var(--s-5); display: grid; gap: 10px; }
.ex-example .ex-ex-body dt { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.ex-example .ex-ex-body dd { margin: 2px 0 0; font-family: var(--font-hand); font-size: 1.45rem; line-height: 1.2; white-space: pre-line; }
.ex-example .ex-ex-body dl { margin: 0; }
.notebook { --line: 32px; }
.notebook .field { margin-bottom: var(--s-6); }
.notebook .field > label { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: var(--fs-md); text-transform: uppercase; letter-spacing: 0.06em; font-size: var(--fs-sm); }
.notebook .field .hint { font-weight: 400; text-transform: none; letter-spacing: 0; }
.nb-area { position: relative; border-radius: var(--r-md); border: 1px solid var(--mist-deep); background-color: #fffdf8; background-image: linear-gradient(90deg, transparent 0 40px, rgba(232, 191, 202, 0.75) 40px 41.5px, transparent 41.5px), repeating-linear-gradient(transparent 0 calc(var(--line) - 1px), var(--mist-deep) calc(var(--line) - 1px) var(--line)); background-attachment: local; box-shadow: var(--sh-inset); }
.nb-area textarea, .nb-area input[type="text"] { width: 100%; border: 0; background: transparent; padding: 0 16px 0 52px; line-height: var(--line); font-family: var(--font-hand); font-size: 1.5rem; color: var(--ink); resize: vertical; display: block; min-height: calc(var(--line) * 3); outline: none; }
.nb-area input[type="text"] { height: var(--line); min-height: var(--line); }
.nb-area textarea::placeholder, .nb-area input::placeholder { color: var(--muted-2); font-family: var(--font-hand); }
.nb-area:focus-within { border-color: var(--teal-400); box-shadow: 0 0 0 4px var(--accent-ring); }
.nb-options { display: flex; flex-wrap: wrap; gap: 8px; }
.nb-options label { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--r-pill); border: 1.5px solid var(--hairline-strong); background: var(--surface); cursor: pointer; font-size: var(--fs-sm); font-weight: 550; transition: all var(--t-fast) var(--ease); user-select: none; }
.nb-options label:hover { border-color: var(--teal-300); }
.nb-options label:has(input:checked) { background: var(--teal-100); border-color: var(--teal-400); color: var(--teal-700); }
.nb-options input { accent-color: var(--teal-500); width: 16px; height: 16px; margin: 0; }
.nb-options input:focus-visible { outline: 2px solid var(--accent-ring); }
.nb-list { display: grid; gap: 8px; }
.nb-list .nb-item { display: flex; gap: 8px; align-items: center; }
.nb-list .nb-item .nb-area { flex: 1; }
.nb-list .nb-item .nb-area input { padding-left: 52px; }
.nb-list .nb-item button { color: var(--muted); }
.nb-list .nb-item button:hover { color: var(--danger); }
.nb-weekly { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--mist-deep); background: #fffdf8; }
.nb-weekly table { width: 100%; border-collapse: collapse; min-width: 560px; }
.nb-weekly th, .nb-weekly td { border-bottom: 1px solid var(--mist-deep); border-right: 1px solid var(--mist-deep); padding: 0; vertical-align: top; }
.nb-weekly th { padding: 10px 12px; font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.08em; background: var(--mist); color: var(--mist-ink); text-align: left; }
.nb-weekly tbody th { background: var(--surface-2); color: var(--ink-2); width: 100px; }
.nb-weekly td:last-child, .nb-weekly th:last-child { border-right: 0; }
.nb-weekly textarea { width: 100%; border: 0; background: transparent; padding: 8px 10px; font-family: var(--font-hand); font-size: 1.25rem; line-height: 1.25; min-height: 64px; resize: vertical; outline: none; color: var(--ink); }
.nb-weekly textarea:focus { background: var(--teal-50); }
.nb-weekly tr.is-example td { background: var(--butter); color: var(--butter-ink); font-family: var(--font-hand); font-size: 1.2rem; padding: 8px 10px; white-space: pre-line; }
.nb-weekly tr.is-example th { background: var(--butter); color: var(--butter-ink); }
.ex-foot { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; justify-content: space-between; padding: var(--s-4) var(--s-5); border-top: 1px solid var(--hairline); background: var(--surface-2); }
.ex-foot .ex-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ex-required-note { font-size: var(--fs-xs); color: var(--muted); }
.inline-time { display: flex; gap: 8px; align-items: center; }
.inline-time .input { max-width: 160px; }

/* Satisfacción */
.satisfaction { display: grid; gap: var(--s-4); }
.sat-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.sat-opt { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px; border-radius: var(--r-lg); border: 1.5px solid var(--hairline); background: var(--surface); cursor: pointer; transition: all var(--t-base) var(--ease); text-align: center; }
.sat-opt:hover { transform: translateY(-2px); box-shadow: var(--sh-1); }
.sat-opt .face { width: 48px; height: 48px; }
.sat-opt .lbl { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.2; }
.sat-opt .pct { font-size: 0.68rem; color: var(--muted); font-weight: 600; }
.sat-opt[aria-checked="true"] { border-color: var(--teal-400); background: var(--teal-50); box-shadow: 0 0 0 3px var(--accent-ring); }
@media (max-width: 480px) { .sat-opt .face { width: 38px; height: 38px; } .sat-opt .lbl { font-size: 0.68rem; } }
.sat-thanks { display: none; }
.satisfaction.is-rated .sat-thanks { display: flex; }

/* Práctica / descargas */
.practice-grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.resource { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid transparent; transition: all var(--t-fast) var(--ease); }
.resource:hover { border-color: var(--teal-300); background: var(--teal-50); }
.resource .rs-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; color: var(--teal-600); flex: none; box-shadow: var(--sh-0); }
.resource .rs-body { flex: 1; min-width: 0; }
.resource strong { display: block; font-family: var(--font-display); font-size: var(--fs-sm); }
.resource small { color: var(--muted); display: block; }
.resource .rs-actions { display: flex; gap: 4px; }
.resource.is-pending { opacity: 0.75; }

/* Celebración */
.celebrate { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s-4); }
.celebrate .lua { --lua-size: 120px; }
.celebrate h2 { margin: 0; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 950; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 3px; opacity: 0.95; animation: confetti-fall 2.6s var(--ease-out) forwards; }
@keyframes confetti-fall { to { transform: translateY(110vh) rotate(540deg); opacity: 0; } }

/* Diario */
.diary-grid { display: grid; gap: var(--s-5); }
@media (min-width: 960px) { .diary-grid { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); align-items: start; } }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--teal-400) var(--pct, 50%), var(--surface-3) var(--pct, 50%)); outline: none; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--teal-500); box-shadow: var(--sh-1); cursor: pointer; transition: transform var(--t-fast); }
.range::-webkit-slider-thumb:hover { transform: scale(1.08); }
.range::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--teal-500); box-shadow: var(--sh-1); cursor: pointer; }
.range:focus-visible { box-shadow: 0 0 0 4px var(--accent-ring); }
.range-row { display: flex; align-items: center; gap: var(--s-3); font-size: var(--fs-sm); color: var(--muted); }
.range-row .range { flex: 1; }
.range-row output { font-family: var(--font-display); font-weight: 800; min-width: 2ch; text-align: right; color: var(--ink); }
.emotion-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.emotion-chips label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--r-pill); border: 1.5px solid var(--hairline-strong); background: var(--surface); cursor: pointer; font-size: var(--fs-sm); font-weight: 550; transition: all var(--t-fast) var(--ease); }
.emotion-chips label:has(input:checked) { background: var(--lavender); border-color: var(--lavender-deep); color: var(--lavender-ink); }
.emotion-chips input { position: absolute; opacity: 0; width: 0; height: 0; }
.diary-week { display: grid; gap: 8px; }
.diary-week .dw-row { display: grid; grid-template-columns: 44px 1fr 36px; gap: 10px; align-items: center; font-size: var(--fs-sm); color: var(--ink-2); }
.diary-week .dw-row .progress { height: 10px; }
.diary-week .dw-row strong { font-family: var(--font-display); text-align: right; }
.diary-history { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.diary-history li { display: flex; gap: var(--s-3); align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); }
.diary-history .face { width: 34px; height: 34px; flex: none; }
.diary-history .dh-body { flex: 1; min-width: 0; }
.diary-history .dh-body strong { display: block; }
.diary-history .dh-body small { color: var(--muted); }
.diary-history .dh-note { color: var(--ink-3); font-size: var(--fs-sm); margin-top: 4px; white-space: pre-line; }
.chart-box { position: relative; width: 100%; height: 240px; }
.chart-box canvas { width: 100% !important; height: 100% !important; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: var(--fs-sm); padding: var(--s-6); }

/* Progreso personal */
.progress-hero { display: grid; gap: var(--s-6); align-items: center; }
@media (min-width: 760px) { .progress-hero { grid-template-columns: auto 1fr; } }
.kpis { display: grid; gap: var(--s-3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { padding: var(--s-4) var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); }
.kpi .k-val { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.kpi .k-lbl { font-size: var(--fs-xs); color: var(--muted); margin-top: 6px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.module-progress-list { display: grid; gap: 10px; }
.mpl-row { display: grid; grid-template-columns: 36px 1fr auto; gap: var(--s-3); align-items: center; font-size: var(--fs-sm); }
.mpl-row .n { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 12px; }
.mpl-row .progress { margin-top: 6px; }
.mpl-row .pct { font-family: var(--font-display); font-weight: 700; min-width: 44px; text-align: right; }

/* Ejercicios: listados */
.exercise-list { display: grid; gap: var(--s-3); }
.exercise-row { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-4); align-items: center; padding: var(--s-4) var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); text-decoration: none; color: var(--ink); transition: all var(--t-base) var(--ease); }
.exercise-row:hover { box-shadow: var(--sh-1); transform: translateY(-2px); text-decoration: none; }
.exercise-row .er-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.exercise-row strong { display: block; font-family: var(--font-display); font-size: var(--fs-md); }
.exercise-row small { color: var(--muted); }
.exercise-row.is-locked { opacity: 0.6; pointer-events: none; }
.entry-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: var(--s-5); }

/* Cuenta */
.account-grid { display: grid; gap: var(--s-5); }
@media (min-width: 900px) { .account-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.danger-zone { border-color: var(--danger-soft); }

/* Ayuda */
.help-list { display: grid; gap: var(--s-3); }
.help-item { display: flex; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hairline); align-items: flex-start; }
.help-item .hi-ic { width: 48px; height: 48px; border-radius: 16px; background: var(--blush); color: var(--blush-ink); display: grid; place-items: center; flex: none; }
.help-item strong { font-family: var(--font-display); display: block; font-size: var(--fs-md); }
.help-item .detail { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 800; color: var(--teal-700); letter-spacing: -0.01em; }
.help-item p { margin: 4px 0 0; font-size: var(--fs-sm); color: var(--ink-3); }
.help-fab { position: fixed; right: var(--s-4); bottom: calc(var(--safe-bottom) + 84px); z-index: 70; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px 10px 10px; border-radius: var(--r-pill); background: var(--surface); color: var(--blush-ink); box-shadow: var(--sh-2); border: 1px solid var(--hairline); font-family: var(--font-display); font-weight: 700; font-size: var(--fs-sm); text-decoration: none; }
.help-fab:hover { text-decoration: none; transform: translateY(-2px); }
.help-fab .icon { width: 22px; height: 22px; }
@media (min-width: 760px) { .help-fab { bottom: var(--s-6); right: var(--s-6); } }

/* Error */
.error-page { text-align: center; padding: var(--s-16) 0; display: flex; flex-direction: column; align-items: center; gap: var(--s-4); }
.error-page .lua { --lua-size: 130px; }
.error-page h1 { margin: 0; }
.error-page pre { text-align: left; max-width: 100%; overflow: auto; font-size: 12px; background: var(--surface-2); padding: var(--s-4); border-radius: var(--r-md); }

/* Impresión */
@media print {
  .app-header, .tabbar, .app-footer, .help-fab, .toasts, .module-rail, .section-foot, .ex-foot, .btn { display: none !important; }
  body { background: #fff; }
  .section, .card, .exercise { box-shadow: none; border-color: #ddd; break-inside: avoid; }
}

/* Apilar Lúa y su mensaje en pantallas angostas cuando el texto es largo */
@media (max-width: 599px) { .module-hero .lua-row, .card-tinted .lua-row, .technique-side .lua-row { flex-direction: column; align-items: flex-start; } .module-hero .lua-row .lua-bubble::before { left: 28px; top: -8px; transform: rotate(45deg); } }
/* Gráficas vacías: contenedor compacto */
.chart-box.is-empty { height: 120px !important; }
.chart-box.is-empty canvas { display: none; }
.chart-box .chart-empty { position: static; }
.chart-box:not(.is-empty) .chart-empty[hidden] { display: none; }
/* Lector de pasos en móvil: Anterior/Siguiente en una fila, "Ver todos" debajo centrado */
@media (max-width: 599px) {
  .step-reader .sr-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2) var(--s-3); }
  .step-reader .sr-nav [data-sr-prev] { justify-self: start; }
  .step-reader .sr-nav [data-sr-next] { justify-self: end; order: 1; }
  .step-reader .sr-nav [data-sr-all] { grid-column: 1 / -1; justify-self: center; order: 2; }
}
/* Cabecera en tableta (760–1023): sin lema, enlaces sin saltos de línea */
.nav-desktop a { white-space: nowrap; }
.app-header .brand-name { white-space: nowrap; }
@media (min-width: 760px) and (max-width: 1023px) {
  .app-header .brand-name small { display: none; }
  .nav-desktop { gap: 2px; }
  .nav-desktop a { padding: 8px 10px; }
}
@media (min-width: 760px) and (max-width: 899px) { .app-header .brand-name { display: none; } }
/* Páginas públicas: el pie siempre al final de la ventana */
.public-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.public-shell > main { flex: 1; }

/* ---------- Videos del programa (formato vertical) ---------- */
.vf { margin: 0; display: grid; gap: var(--s-5); align-items: center; }
.vf-stage { position: relative; border-radius: var(--r-xl); overflow: hidden; background: #10191f; aspect-ratio: 9 / 16; max-height: 78vh; isolation: isolate; box-shadow: var(--sh-2); }
.vf-stage::before { content: ""; position: absolute; inset: -12%; background: var(--vf-poster, none) center / cover no-repeat; filter: blur(30px) saturate(1.25); opacity: .9; z-index: -1; }
.vf-stage::after { content: ""; position: absolute; inset: auto 0 0 0; height: 38%; background: linear-gradient(180deg, rgba(16,25,31,0) 0%, rgba(16,25,31,.55) 100%); pointer-events: none; transition: opacity var(--t-base); }
.vf-stage video { display: block; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.vf-play { position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--teal-700); display: grid; place-items: center; box-shadow: 0 14px 34px -10px rgba(0,0,0,.6), 0 0 0 10px rgba(255,255,255,.18); cursor: pointer; z-index: 2; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.vf-play .icon { margin-left: 4px; width: 30px; height: 30px; }
.vf-play:hover, .vf-play:focus-visible { transform: scale(1.07); box-shadow: 0 16px 36px -10px rgba(0,0,0,.6), 0 0 0 14px rgba(255,255,255,.22); }
.vf-dur { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 700; color: #fff; background: rgba(16,25,31,.55); padding: 5px 10px; border-radius: 999px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.vf.is-playing .vf-play, .vf.is-playing .vf-dur, .vf.is-playing .vf-stage::after { display: none; }
.vf-body .eyebrow { margin-bottom: 6px; }
.vf-title { margin: 0 0 var(--s-2); font-size: var(--fs-xl); letter-spacing: -0.01em; }
.vf-text { margin: 0; color: var(--ink-2); }
@media (min-width: 760px) {
  .vf-feature { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: var(--s-8); }
  .vf-feature .vf-title { font-size: var(--fs-2xl); }
}
/* Tarjeta compacta: portada pequeña a la izquierda; al reproducir se expande */
.vf-card { grid-template-columns: 104px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-4); background: var(--surface); border-radius: var(--r-xl); border: 1px solid var(--hairline); box-shadow: var(--sh-1); }
.vf-card .vf-stage { border-radius: var(--r-lg); box-shadow: var(--sh-0); }
.vf-card .vf-play { width: 48px; height: 48px; box-shadow: 0 10px 24px -8px rgba(0,0,0,.55), 0 0 0 6px rgba(255,255,255,.18); }
.vf-card .vf-play .icon { width: 22px; height: 22px; margin-left: 3px; }
.vf-card .vf-dur { left: 8px; bottom: 8px; padding: 3px 8px; }
.vf-card .vf-title { font-size: var(--fs-md); margin-bottom: 4px; }
.vf-card .vf-text { font-size: var(--fs-sm); }
.vf-card.is-playing { grid-template-columns: 1fr; justify-items: center; }
.vf-card.is-playing .vf-stage { width: auto; height: min(72vh, 640px); aspect-ratio: 9 / 16; max-width: 100%; }
.vf-card.is-playing .vf-body { text-align: center; max-width: 60ch; }
@media (min-width: 760px) { .vf-card { grid-template-columns: 124px minmax(0, 1fr); gap: var(--s-5); padding: var(--s-5); } }

/* Hoja modal grande con contenido desplazable (aviso de privacidad en acceso) */
dialog.sheet.sheet-lg { max-width: min(94vw, 720px); }
dialog.sheet .sheet-body.sheet-scroll { position: relative; max-height: min(86dvh, 820px); overflow-y: auto; overscroll-behavior: contain; }
dialog.sheet .sheet-scroll .sheet-close { position: sticky; float: right; top: 0; margin: -6px -6px 0 0; }
@media (max-width: 599px) { dialog.sheet.sheet-lg { max-width: 100vw; } dialog.sheet .sheet-body.sheet-scroll { max-height: 92dvh; } }
dialog.sheet .sheet-scroll .prose h2 { font-size: var(--fs-lg); margin: var(--s-3) 0 0; }
dialog.sheet .sheet-scroll .prose p, dialog.sheet .sheet-scroll .prose li { font-size: var(--fs-sm); }
