/* ============================================================
   English Master v3 — estilos
   Mobile-first, responsive: celular → tablet → laptop → TV
   ============================================================ */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --accent: #f59e0b;
  --accent-soft: #fffbeb;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --success: #16a34a;
  --success-soft: #f0fdf4;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(15, 23, 42, .07);
  --shadow-lg: 0 8px 30px rgba(15, 23, 42, .12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
[data-theme="dark"] {
  --primary: #818cf8;
  --primary-dark: #a5b4fc;
  --primary-soft: #1e1b4b;
  --accent: #fbbf24;
  --accent-soft: #451a03;
  --bg: #0f172a;
  --card: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #334155;
  --success: #4ade80;
  --success-soft: #052e16;
  --danger: #f87171;
  --danger-soft: #450a0a;
  --shadow: 0 2px 10px rgba(0, 0, 0, .35);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: clamp(1rem, .95rem + .25vw, 1.08rem);
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); margin-top: 1.6em; }
h3 { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
a { color: var(--primary); }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- Activación ---------- */
.activation {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}
.activation-card {
  background: var(--card); color: var(--text);
  border-radius: 20px; padding: clamp(1.5rem, 5vw, 2.5rem);
  width: 100%; max-width: 440px; box-shadow: var(--shadow-lg);
}
.brand { text-align: center; margin-bottom: 1.5rem; }
.brand h1 { margin: .4em 0 .2em; }
.brand p { color: var(--muted); margin: 0; }
.activation label { display: block; font-weight: 600; margin-bottom: .4rem; }
.activation input[type="text"] {
  width: 100%; padding: .9rem 1rem; font-size: 1.05rem;
  border: 2px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text);
  letter-spacing: .06em; text-transform: uppercase; font-family: ui-monospace, monospace;
}
.activation input:focus { outline: none; border-color: var(--primary); }
.error { color: var(--danger); font-weight: 600; margin: .6rem 0; }

/* ---------- Prueba gratuita manual ---------- */
.trial-chip {
  background: rgba(242, 182, 61, .14); border: 1px solid rgba(242, 182, 61, .6);
  color: var(--accent); font-weight: 700; font-size: .82rem;
  border-radius: 999px; padding: .35rem .85rem; white-space: nowrap;
}
/* Bloqueo total al vencer la prueba gratuita: la app se ve borrosa e inerte */
#app.locked-blur { filter: blur(7px); pointer-events: none; user-select: none; -webkit-user-select: none; }
.activation.trial-lock { background: rgba(8, 8, 14, .55); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem; border: none; border-radius: 10px;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  background: var(--border); color: var(--text);
  transition: transform .08s ease, background .15s ease;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: #1c1005; }
.btn-danger { background: rgba(220, 60, 60, .14); color: #ff8a8a; border: 1px solid rgba(220, 60, 60, .45); }
.renew-banner { background: rgba(242, 182, 61, .12); border: 1px solid rgba(242, 182, 61, .55); border-radius: 12px; padding: .9rem 1.1rem; margin-bottom: 1rem; line-height: 1.5; }
.renew-banner b { color: var(--accent); }
.renew-banner a { color: var(--accent); font-weight: 700; }
.step-card { display: flex; gap: 1rem; align-items: flex-start; }
.step-num { flex: 0 0 auto; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--accent); color: #1c1005; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.step-img { width: 100%; max-width: 520px; border-radius: 10px; border: 1px solid var(--border); margin-top: .6rem; display: block; }
.btn-block { width: 100%; margin-top: .8rem; }
.btn-sm { padding: .5rem .9rem; font-size: .9rem; }
.icon-btn {
  background: none; border: none; font-size: 1.3rem; cursor: pointer;
  padding: .4rem .6rem; border-radius: 8px; color: var(--text);
}
.icon-btn:hover { background: var(--primary-soft); }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
  padding: .6rem clamp(1rem, 4vw, 2rem);
}
.logo { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.mainnav { display: flex; gap: .25rem; overflow-x: auto; flex: 1; scrollbar-width: none; }
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a {
  padding: .55rem .9rem; border-radius: 9px; text-decoration: none;
  color: var(--muted); font-weight: 600; white-space: nowrap; font-size: .95rem;
}
.mainnav a:hover { background: var(--primary-soft); color: var(--text); }
.mainnav a.active { background: var(--primary-soft); color: var(--primary); }

/* ---------- Vista ---------- */
#view { padding-top: 1.5rem; padding-bottom: 3rem; min-height: 70vh; }
.footer { padding: 1.5rem 0 2.5rem; text-align: center; }

/* ---------- Héroe / dashboard ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; border-radius: 20px; padding: clamp(1.4rem, 4vw, 2.4rem);
  margin-bottom: 1.6rem; box-shadow: var(--shadow-lg);
}
.hero h1 { margin: 0 0 .3em; }
.hero p { opacity: .92; margin-bottom: 1.2rem; max-width: 60ch; }
.hero .btn-primary { background: #fff; color: var(--primary-dark); }
.hero .btn-primary:hover { background: var(--primary-soft); }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-bottom: 1.6rem; }
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; text-align: center; box-shadow: var(--shadow);
}
.stat b { display: block; font-size: clamp(1.4rem, 1.1rem + 1.5vw, 2rem); color: var(--primary); }
.stat span { font-size: .85rem; color: var(--muted); }

/* ---------- Módulos ---------- */
.modules-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.module-card {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem; text-decoration: none; color: var(--text);
  box-shadow: var(--shadow); transition: transform .1s ease, box-shadow .15s ease;
}
.module-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.module-card .m-top { display: flex; align-items: center; gap: .9rem; margin-bottom: .6rem; }
.module-icon { font-size: 2rem; line-height: 1; }
.module-card h3 { margin: 0; }
.level-badge {
  display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: .04em;
  background: var(--primary-soft); color: var(--primary);
  padding: .2rem .6rem; border-radius: 999px; margin-bottom: .4rem;
}
.card-top-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.module-badge {
  display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: .04em;
  background: var(--accent); color: #fff;
  padding: .2rem .6rem; border-radius: 999px; margin-bottom: .4rem; white-space: nowrap;
}
.progress-track { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: .7rem; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 999px; transition: width .4s ease; }
.progress-label { font-size: .8rem; color: var(--muted); margin-top: .3rem; display: block; }

/* ---------- Lecciones ---------- */
.lesson-list { display: grid; gap: .7rem; }
.lesson-row {
  display: flex; align-items: center; gap: 1rem;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .95rem 1.1rem; text-decoration: none; color: var(--text); box-shadow: var(--shadow);
}
.lesson-row:hover { border-color: var(--primary); }
.lesson-num {
  flex: none; width: 2.6rem; height: 2.6rem; border-radius: 12px;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.lesson-row.done .lesson-num { background: var(--success-soft); color: var(--success); }
.lesson-row .l-body { flex: 1; min-width: 0; }
.lesson-row .l-body b { display: block; }
.lesson-row .l-body span { font-size: .85rem; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check { flex: none; font-size: 1.3rem; }

/* ---------- Lección ---------- */
.lesson-head { margin-bottom: 1.2rem; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.objectives { background: var(--primary-soft); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1rem 0 1.6rem; }
.objectives b { color: var(--primary); }
.objectives ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.section-nav {
  display: flex; gap: .5rem; overflow-x: auto; padding: .4rem 0 1rem;
  position: sticky; top: 57px; z-index: 40;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(8px); scrollbar-width: none;
}
.section-nav::-webkit-scrollbar { display: none; }
.section-nav a {
  flex: none; padding: .5rem 1rem; border-radius: 999px; font-size: .88rem; font-weight: 700;
  background: var(--card); border: 1px solid var(--border); color: var(--muted); text-decoration: none;
}
.section-nav a:hover { color: var(--primary); border-color: var(--primary); }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(1rem, 3vw, 1.5rem); margin-bottom: 1.2rem; box-shadow: var(--shadow);
}
.card h2:first-child { margin-top: 0; }
.exp-table { width: 100%; border-collapse: collapse; margin: .8rem 0; font-size: .95rem; display: block; overflow-x: auto; }
.exp-table th, .exp-table td { border: 1px solid var(--border); padding: .55rem .8rem; text-align: left; }
.exp-table th { background: var(--primary-soft); color: var(--primary); }
.exp-table td:first-child { font-weight: 700; }
.tip {
  background: var(--accent-soft); border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0; padding: .9rem 1.1rem; margin: 1rem 0;
}
.tip b { color: var(--accent); }
.warn-box {
  background: var(--danger-soft); border: 1px solid var(--danger); border-left-width: 5px;
  border-radius: 0 10px 10px 0; padding: .9rem 1.1rem; margin: 1rem 0; font-size: .95rem;
}
.warn-box.nivel-box { background: var(--accent-soft); border-color: var(--accent); }
.warn-box p { margin: .4rem 0 .7rem; }
.bullets { padding-left: 1.3rem; }
.bullets li { margin-bottom: .35rem; }

/* Vocabulario y ejemplos */
.vocab-row, .example-card {
  display: flex; align-items: center; gap: .9rem;
  padding: .8rem .6rem; border-bottom: 1px solid var(--border);
}
.vocab-row:last-child, .example-card:last-child { border-bottom: none; }
.play-btn {
  flex: none; width: 2.7rem; height: 2.7rem; border-radius: 50%;
  border: none; background: var(--primary-soft); color: var(--primary);
  font-size: 1.15rem; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .08s ease;
}
.play-btn:active { transform: scale(.92); }
.play-btn.playing { background: var(--primary); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .65; } }
.vocab-en { font-weight: 800; font-size: 1.08rem; }
.vocab-pron { color: var(--accent); font-style: italic; font-size: .92rem; }
.vocab-es { color: var(--muted); margin-left: auto; text-align: right; }
.example-card { flex-direction: column; align-items: stretch; gap: .3rem; }
.example-top { display: flex; align-items: center; gap: .9rem; }
.example-en { font-weight: 700; font-size: 1.05rem; flex: 1; }
.example-es { color: var(--muted); padding-left: 3.6rem; }
.example-pron { color: var(--accent); font-style: italic; font-size: .88rem; padding-left: 3.6rem; }

/* Reproductor de sección */
.player {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: var(--radius); padding: 1.1rem 1.2rem; color: #fff;
  margin-bottom: 1rem; box-shadow: var(--shadow);
}
.player-row { display: flex; align-items: center; gap: 1rem; }
.player .play-btn { background: rgba(255,255,255,.2); color: #fff; width: 3.2rem; height: 3.2rem; font-size: 1.4rem; }
.player .play-btn.playing { background: #fff; color: var(--primary-dark); animation: pulse 1.2s infinite; }
.player-info { flex: 1; min-width: 0; }
.player-info b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bar { height: 6px; background: rgba(255,255,255,.25); border-radius: 999px; margin-top: .5rem; overflow: hidden; cursor: pointer; }
.player-fill { height: 100%; width: 0%; background: #fff; border-radius: 999px; }
.player-time { font-size: .78rem; opacity: .85; margin-top: .25rem; }

/* Diálogo */
.dialog-line { display: flex; gap: .8rem; padding: .7rem .2rem; border-bottom: 1px solid var(--border); }
.dialog-line:last-child { border-bottom: none; }
.speaker {
  flex: none; font-size: .75rem; font-weight: 800; padding: .25rem .6rem; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); align-self: flex-start; margin-top: .15rem;
}
.dialog-line:nth-child(even) .speaker { background: var(--accent-soft); color: var(--accent); }
.dialog-text b { display: block; }
.dialog-text span { color: var(--muted); font-size: .92rem; }

/* Escucha */
.frase { padding: .7rem .2rem; border-bottom: 1px solid var(--border); }
.frase:last-child { border-bottom: none; }
.frase .f-en { font-size: 1.08rem; font-weight: 600; }
.frase .f-es { color: var(--muted); font-size: .92rem; }
mark { background: #fef08a; color: #713f12; padding: 0 .25em; border-radius: 4px; }
[data-theme="dark"] mark { background: #a16207; color: #fefce8; }

/* ---------- Ejercicios ---------- */
.exercise { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1rem; background: var(--card); }
.exercise.locked { opacity: .55; }
.ex-q { font-weight: 700; margin-bottom: .8rem; font-size: 1.05rem; }
.ex-options { display: grid; gap: .55rem; }
.ex-option {
  text-align: left; padding: .75rem 1rem; border: 2px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font-size: 1rem; cursor: pointer; font-family: inherit;
}
.ex-option:hover:not(:disabled) { border-color: var(--primary); }
.ex-option:disabled { cursor: default; }
.ex-option.picked { border-color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.ex-option.correct { border-color: var(--success); background: var(--success-soft); }
.ex-option.wrong { border-color: var(--danger); background: var(--danger-soft); }
.ex-input {
  width: 100%; padding: .8rem 1rem; font-size: 1.05rem; border: 2px solid var(--border);
  border-radius: 10px; background: var(--bg); color: var(--text); font-family: inherit;
}
.ex-input:focus { outline: none; border-color: var(--primary); }
.ex-input.correct { border-color: var(--success); background: var(--success-soft); }
.ex-input.wrong { border-color: var(--danger); background: var(--danger-soft); }
.word-bank { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; }
.word-chip {
  padding: .55rem 1rem; border-radius: 999px; border: 2px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 1rem; cursor: pointer; font-family: inherit; font-weight: 600;
}
.word-chip:hover { border-color: var(--primary); }
.word-chip.used { opacity: .25; pointer-events: none; }
.answer-slots { display: flex; flex-wrap: wrap; gap: .5rem; min-height: 3rem; padding: .6rem; border: 2px dashed var(--border); border-radius: 10px; margin-bottom: .8rem; }
.answer-slots .word-chip { pointer-events: auto; }
.match-grid { display: grid; gap: .5rem; }
.match-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; align-items: center; }
.match-row select {
  padding: .7rem; border: 2px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font-size: .95rem; font-family: inherit;
}
.match-row .m-en { font-weight: 700; }
.ex-feedback { margin-top: .8rem; padding: .8rem 1rem; border-radius: 10px; font-size: .95rem; }
.ex-feedback.ok { background: var(--success-soft); color: var(--success); font-weight: 600; }
.ex-feedback.ko { background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.ex-feedback .why { display: block; font-weight: 400; margin-top: .25rem; }
.ex-actions { margin-top: .8rem; display: flex; gap: .6rem; }
.ex-score {
  text-align: center; padding: 1.5rem; border-radius: var(--radius);
  background: var(--primary-soft); margin: 1rem 0;
}
.ex-score b { font-size: 2rem; color: var(--primary); display: block; }

/* ---------- Bibliografía / ajustes ---------- */
.bib-item { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.bib-item:last-child { border-bottom: none; }
.bib-item h3 { margin-bottom: .3rem; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--border);
}
.settings-row:last-child { border-bottom: none; }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--border); border-radius: 999px; cursor: pointer; transition: .2s; }
.slider:before { content: ""; position: absolute; width: 22px; height: 22px; left: 4px; top: 4px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider:before { transform: translateX(22px); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: .8rem 1.3rem; border-radius: 999px;
  font-weight: 600; box-shadow: var(--shadow-lg); z-index: 100; max-width: 90vw; text-align: center;
  pointer-events: none; /* nunca bloquea toques en botones cercanos */
}

/* ---------- Breakpoints ---------- */
@media (min-width: 640px) {
  .modules-grid { grid-template-columns: repeat(2, 1fr); }
  .match-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .modules-grid { grid-template-columns: repeat(3, 1fr); }
  .lesson-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
}
/* TV y pantallas muy grandes */
@media (min-width: 1700px) {
  html { font-size: 19px; }
  .wrap { max-width: 1500px; }
  .modules-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   v3 — Control de velocidad
   ============================================================ */
.speed-ctl {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .9rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.speed-ctl select {
  border: 2px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text);
  font-weight: 800; font-size: .88rem; padding: .3rem .45rem; cursor: pointer;
  font-family: inherit;
}
.player .speed-ctl select {
  background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.4);
}
.player .speed-ctl select option { color: #111; }
.player-row { flex-wrap: wrap; }
.player-speed { margin-left: auto; }
.speed-row {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  margin: .4rem 0 1rem;
}
h2 .speed-ctl { font-size: .8em; margin-left: .4rem; vertical-align: middle; }

/* ============================================================
   v3 — Grábate y compara
   ============================================================ */
.rec-widget { margin-top: 1rem; }
.rec-btn.recording { background: var(--danger); color: #fff; animation: pulse 1.2s infinite; }
.rec-result { margin-top: .8rem; }
.rec-msg {
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: .8rem 1rem; font-size: .95rem;
}
.rec-compare { display: grid; grid-template-columns: 1fr; gap: .8rem; }
@media (min-width: 640px) { .rec-compare { grid-template-columns: 1fr 1fr; } }
.rec-col {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 10px; padding: .8rem 1rem;
}
.rec-col b { display: block; margin-bottom: .4rem; }
.rec-col audio { width: 100%; }

/* ============================================================
   v3 — Flashcards
   ============================================================ */
.flash-wrap { max-width: 560px; margin: 0 auto; }
.flash-progress { margin-bottom: 1rem; }
.flashcard { perspective: 1200px; cursor: pointer; outline: none; }
.flashcard:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; border-radius: var(--radius); }
.flash-inner {
  position: relative; min-height: 230px;
  transform-style: preserve-3d; transition: transform .45s ease;
}
.flashcard.flipped .flash-inner { transform: rotateY(180deg); }
.flash-face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
  background: var(--card); border: 2px solid var(--border); border-radius: 20px;
  padding: 2rem 1.5rem; box-shadow: var(--shadow-lg); text-align: center;
}
.flash-back { transform: rotateY(180deg); background: var(--primary-soft); border-color: var(--primary); }
.flash-en { font-size: clamp(1.8rem, 1.4rem + 3vw, 2.6rem); font-weight: 800; color: var(--primary); }
.flash-es { font-size: clamp(1.5rem, 1.2rem + 2.5vw, 2.2rem); font-weight: 800; }
.flash-hint { font-size: .85rem; color: var(--muted); }
.flash-btns { display: flex; gap: .8rem; margin-top: 1rem; }
.flash-btns .btn { flex: 1; }

/* ============================================================
   v3 — Exámenes
   ============================================================ */
.exam-badge {
  display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .03em;
  background: var(--accent-soft); color: var(--accent);
  padding: .18rem .55rem; border-radius: 999px; vertical-align: middle; margin-left: .3rem;
}
.exam-final-card { border: 2px solid var(--accent); }
.exam-final-card:hover { border-color: var(--accent); }

/* ============================================================
   v3 — Diagramas
   ============================================================ */
.diagram {
  margin: 1.2rem 0; text-align: center;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
}
.diagram img { max-width: 100%; height: auto; border-radius: 8px; }
.diagram figcaption { color: var(--muted); font-size: .9rem; margin-top: .6rem; }

/* ============================================================
   v3 — Consejos y recursos
   ============================================================ */
.res-tabs { display: flex; gap: .5rem; overflow-x: auto; padding: .4rem 0 1rem; scrollbar-width: none; }
.res-tabs::-webkit-scrollbar { display: none; }
.res-tabs button {
  flex: none; padding: .6rem 1.1rem; border-radius: 999px; font-size: .92rem; font-weight: 700;
  background: var(--card); border: 2px solid var(--border); color: var(--muted);
  cursor: pointer; font-family: inherit;
}
.res-tabs button:hover { color: var(--primary); border-color: var(--primary); }
.res-tabs button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.dialog-top { display: flex; align-items: center; gap: .7rem; }
.dialog-top b { flex: 1; }
.play-btn-sm { width: 2.1rem; height: 2.1rem; font-size: .95rem; }
.table-wrap { overflow-x: auto; }
.verb-table td { white-space: nowrap; }
.verb-table td:last-child { white-space: normal; }
#verb-search { margin-bottom: .2rem; }

/* ============================================================
   v3.1 — Ilustración de lección
   ============================================================ */
.ilustracion {
  margin: 1.2rem 0; text-align: center;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
}
.ilustracion img { max-width: 100%; height: auto; border-radius: 8px; }
.ilustracion figcaption { color: var(--muted); font-size: .9rem; margin-top: .6rem; }

/* ============================================================
   v3.1 — Buscador global
   ============================================================ */
.search-box { display: flex; gap: .6rem; margin: 1rem 0; }
.search-box input { flex: 1; min-width: 0; }
.search-box .btn { flex: none; }
.hero .search-box input {
  background: #fff; color: #1e293b;
  border: 2px solid transparent; border-radius: 10px;
  padding: .8rem 1rem; font-size: 1.05rem; font-family: inherit;
}
.hero .search-box input:focus { outline: none; border-color: var(--accent); }
.hero .search-box { margin-bottom: 1rem; }

/* ============================================================
   v3.1 — Mi progreso: anillo y módulos
   ============================================================ */
.ring-wrap { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.ring { flex: none; }
.ring-bg { fill: none; stroke: var(--border); stroke-width: 14; }
.ring-fill { fill: none; stroke: var(--primary); stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring-text { fill: var(--text); font-size: 1.9rem; font-weight: 800; text-anchor: middle; }
.ring-sub { fill: var(--muted); font-size: .95rem; text-anchor: middle; }
.ring-side { flex: 1; min-width: 220px; }
.ring-side h2 { font-size: 1.2rem; margin: 0 0 .4rem; }
.ring-side p { margin: .35rem 0; }
.prog-module {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .9rem 1.1rem; margin-bottom: .7rem; box-shadow: var(--shadow);
}
.prog-module-top { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: .4rem; }
.exam-table td:last-child { white-space: nowrap; }

/* ============================================================
   v3.1 — Diccionario
   ============================================================ */
.dict-list { display: grid; gap: .5rem; }
.dict-row {
  display: flex; align-items: center; gap: .9rem;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: .75rem 1rem; box-shadow: var(--shadow);
}
.dict-main { flex: 1; min-width: 0; }
.dict-pron { color: var(--accent); font-style: italic; font-size: .88rem; }

/* ============================================================
   v3.1 — Certificado / diploma
   ============================================================ */
.cert-locked { opacity: .6; }
.diploma {
  background: linear-gradient(160deg, #fffdf5, #fef9e7);
  border: 3px double var(--accent); border-radius: 18px;
  padding: clamp(1.2rem, 4vw, 2.5rem); text-align: center;
  box-shadow: var(--shadow-lg); margin: 1.2rem 0; color: #1e293b;
}
/* En modo oscuro el diploma mantiene su aspecto de papel */
[data-theme="dark"] .diploma { background: linear-gradient(160deg, #fffdf5, #fef9e7); }
.diploma-inner { border: 1px solid var(--border); border-radius: 12px; padding: clamp(1.2rem, 4vw, 2.4rem); }
.diploma-ribbon { font-size: 3rem; line-height: 1; }
.diploma-kicker { letter-spacing: .35em; font-weight: 800; color: var(--accent); font-size: .85rem; margin: .6rem 0 .4rem; }
.diploma-title { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); margin: 0 0 .6rem; color: #1e293b; }
.diploma-text { color: #475569; max-width: 56ch; margin: 0 auto .8rem; }
.diploma-name {
  font-size: clamp(1.8rem, 1.4rem + 2.5vw, 2.8rem); font-weight: 800; color: var(--primary-dark);
  font-family: Georgia, "Times New Roman", serif;
  border-bottom: 2px solid var(--accent); display: inline-block;
  padding: 0 1.5rem .3rem; margin: .4rem 0 1rem;
}
.diploma-meta { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; font-weight: 700; color: #1e293b; margin-bottom: .6rem; }
.diploma-sign { color: #64748b; font-size: .85rem; margin: 1rem 0 0; }

/* Impresión del diploma: solo el diploma, sin chrome de la app */
@media print {
  .topbar, .footer, #toast, .print-hide { display: none !important; }
  body { background: #fff; }
  #view { padding: 0; min-height: 0; }
  .wrap { max-width: none; }
  .diploma { box-shadow: none; margin: 0; }
  .diploma, .diploma-inner, .diploma-title, .diploma-kicker,
  .diploma-name, .diploma-meta, .diploma-text, .diploma-sign {
    color: #000 !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}

/* ============================================================
   PÁGINA DE VENTAS (landing) — English Master
   ============================================================ */
.landing { background: var(--bg); color: var(--text); }
.landing .lp-wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }

/* Nav */
.lp-nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.lp-nav-inner { max-width: 1080px; margin: 0 auto; padding: .7rem clamp(1rem, 4vw, 2rem); display: flex; align-items: center; gap: 1rem; }
.lp-logo { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.05rem; text-decoration: none; color: var(--text); }
.lp-logo img { width: 34px; height: 34px; }
.lp-links { display: flex; gap: 1.2rem; margin-left: 1.5rem; }
.lp-links a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.lp-links a:hover { color: var(--text); }
.lp-nav-cta { margin-left: auto; display: flex; gap: .6rem; align-items: center; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); padding: .55rem 1.1rem; border-radius: 999px; font-weight: 600; cursor: pointer; font-size: .95rem; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* Hero */
.lp-hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3.5rem); }
.lp-hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.lp-eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: .35rem .9rem; margin-bottom: 1.1rem; }
.lp-hero h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.1rem); letter-spacing: -0.02em; margin-bottom: .8rem; }
.lp-hero h1 .hl { color: var(--primary); }
.lp-lead { font-size: clamp(1.02rem, .98rem + .4vw, 1.18rem); color: var(--muted); max-width: 34rem; margin-bottom: 1.6rem; }
.lp-cta-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.btn-xl { padding: .9rem 2rem; font-size: 1.05rem; border-radius: 999px; }
.lp-trust { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: .88rem; color: var(--muted); }
.lp-trust span::before { content: "✓ "; color: var(--success); font-weight: 700; }

/* Mockup del teléfono */
.lp-phone { width: min(300px, 72vw); margin: 0 auto; background: var(--card); border: 1px solid var(--border); border-radius: 2.2rem; padding: .9rem; box-shadow: var(--shadow-lg); }
.lp-phone-notch { width: 110px; height: 22px; background: var(--text); opacity: .12; border-radius: 999px; margin: 0 auto .7rem; }
.lp-phone-screen { background: var(--bg); border-radius: 1.5rem; padding: 1rem .9rem 1.2rem; min-height: 380px; }
.lp-mk-bar { height: .7rem; border-radius: 99px; background: var(--border); margin-bottom: .55rem; }
.lp-mk-card { background: var(--card); border: 1px solid var(--border); border-radius: .9rem; padding: .8rem; margin: .7rem 0; }
.lp-mk-row { display: flex; align-items: center; gap: .6rem; }
.lp-mk-play { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .9rem; flex: none; }
.lp-mk-prog { height: 8px; border-radius: 99px; background: var(--primary-soft); overflow: hidden; margin-top: .7rem; }
.lp-mk-prog i { display: block; height: 100%; width: 68%; background: var(--primary); border-radius: 99px; }

/* Stats */
.lp-stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.lp-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; padding: 1.6rem 0; gap: 1rem; }
.lp-stat b { display: block; font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.1rem); color: var(--primary); letter-spacing: -0.02em; }
.lp-stat span { font-size: .88rem; color: var(--muted); }

/* Secciones */
.lp-section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.lp-kicker { font-size: .8rem; font-weight: 700; letter-spacing: .12em; color: var(--primary); margin-bottom: .5rem; }
.lp-section h2 { font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.2rem); letter-spacing: -0.015em; margin-bottom: .6rem; }
.lp-section .lp-sub { color: var(--muted); max-width: 40rem; margin-bottom: 2rem; }
.lp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.lp-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.15rem; box-shadow: var(--shadow); }
.lp-card .lp-ico { font-size: 1.7rem; margin-bottom: .6rem; }
.lp-card h3 { font-size: 1.02rem; margin-bottom: .35rem; }
.lp-card p { font-size: .9rem; color: var(--muted); margin: 0; }

/* Pasos */
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: paso; }
.lp-step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem 1.25rem; position: relative; }
.lp-step::before { counter-increment: paso; content: counter(paso); display: flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; margin-bottom: .9rem; }
.lp-step h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.lp-step p { font-size: .92rem; color: var(--muted); margin: 0; }

/* Precio */
.lp-price { background: var(--card); border: 2px solid var(--primary); border-radius: 20px; padding: clamp(1.8rem, 4vw, 2.8rem); max-width: 560px; margin: 0 auto; text-align: center; box-shadow: var(--shadow-lg); position: relative; }
.lp-price-tag { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #1e293b; font-weight: 800; font-size: .8rem; padding: .3rem 1rem; border-radius: 999px; white-space: nowrap; }
.lp-price-amount { font-size: clamp(2.6rem, 2rem + 3vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; color: var(--primary); }
.lp-price-per { color: var(--muted); margin-bottom: 1.2rem; }
.lp-price ul { list-style: none; padding: 0; margin: 0 0 1.6rem; text-align: left; display: inline-block; }
.lp-price li { padding: .35rem 0; font-size: .97rem; }
.lp-price li::before { content: "✓ "; color: var(--success); font-weight: 700; }
.lp-fine { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 1rem; }

/* FAQ */
.lp-faq { max-width: 720px; margin: 0 auto; }
.lp-faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: .7rem; }
.lp-faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; color: var(--primary); font-size: 1.4rem; font-weight: 400; flex: none; }
.lp-faq details[open] summary::after { content: "–"; }
.lp-faq details p { color: var(--muted); font-size: .95rem; margin: .8rem 0 0; }

/* CTA final + footer */
.lp-final { text-align: center; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; border-radius: 24px; padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 3rem); margin-bottom: 3rem; }
.lp-final h2 { color: #fff; margin-bottom: .6rem; }
.lp-final p { color: rgba(255,255,255,.85); max-width: 36rem; margin: 0 auto 1.8rem; }
.lp-final .btn-ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.lp-final .btn-ghost:hover { border-color: #fff; color: #fff; }
.lp-footer { border-top: 1px solid var(--border); padding: 1.8rem 0 2.5rem; color: var(--muted); font-size: .85rem; }
.lp-footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }

/* Responsive */
@media (max-width: 860px) {
  .lp-hero-grid { grid-template-columns: 1fr; }
  .lp-phone { order: -1; width: min(260px, 64vw); }
  .lp-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-links { display: none; }
  .lp-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
}
@media (max-width: 460px) {
  .lp-grid { grid-template-columns: 1fr; }
  .lp-nav-cta .btn-ghost { display: none; }
}

/* Insignia de becado (precio especial $15.99, referencia $50) */
.badge-beca{display:inline-block;background:#1b5e20;color:#fff;font-size:.72rem;font-weight:700;padding:.2rem .6rem;border-radius:999px;vertical-align:middle;margin-left:.45rem;letter-spacing:.02em}
.beca-note{color:var(--muted,#8a8a95)}

/* --- Filtros de conversaciones --- */
.chip-row { display: flex; gap: .5rem; overflow-x: auto; padding: .4rem 0 1rem; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-row .chip {
  flex: 0 0 auto; padding: .5rem .95rem; border-radius: 999px; border: 2px solid var(--border);
  background: var(--bg); color: var(--text); font-size: .92rem; cursor: pointer; font-family: inherit; font-weight: 600;
}
.chip-row .chip:hover { border-color: var(--primary); }
.chip-row .chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.method-card ol { margin: .4rem 0 .2rem 1.1rem; display: grid; gap: .35rem; }

/* --- Escritura --- */
.writing-task { border-top: 1px solid var(--border); padding: 1rem 0; }
.writing-task:first-of-type { border-top: none; }
.writing-task h3 { font-size: 1.02rem; margin-bottom: .4rem; }
.writing-area {
  width: 100%; min-height: 110px; margin: .6rem 0; padding: .7rem .8rem; border-radius: 10px;
  border: 2px solid var(--border); background: var(--bg); color: var(--text);
  font-family: inherit; font-size: 1rem; resize: vertical;
}
.writing-area:focus { outline: none; border-color: var(--primary); }
.writing-model { margin-top: .7rem; padding: .8rem; border-radius: 10px; background: var(--bg-soft, rgba(127,127,127,.08)); }
.writing-model ul { margin: .3rem 0 .2rem 1.1rem; display: grid; gap: .25rem; }

/* ---------- Índice de gramática (feat-gramatica.js) ---------- */
.gram-search {
  width: 100%; margin: .6rem 0; padding: .8rem 1rem; border-radius: 10px;
  border: 2px solid var(--border); background: var(--bg); color: var(--text);
  font-family: inherit; font-size: 1rem;
}
.gram-search:focus { outline: none; border-color: var(--primary); }
.gram-niveles { display: flex; flex-wrap: wrap; gap: .4rem; }
.gram-nivel-btn.activo { background: var(--primary); border-color: var(--primary); color: #fff; }
.gram-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem; color: var(--text);
  box-shadow: var(--shadow);
}
.gram-card .m-top { display: flex; align-items: center; gap: .9rem; margin-bottom: .4rem; }
.gram-card h3 { margin: 0; }
.gram-nivel {
  display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .04em;
  padding: .2rem .6rem; border-radius: 999px; margin-bottom: .4rem;
  background: var(--primary-soft); color: var(--primary);
}
.gram-nivel.lvl-a2 { background: rgba(46,204,113,.15); color: #1e9e54; }
.gram-nivel.lvl-b1 { background: rgba(241,196,15,.18); color: #b7950b; }
.gram-nivel.lvl-b2 { background: rgba(230,126,34,.15); color: #c46a1b; }
.gram-nivel.lvl-c1 { background: rgba(155,89,182,.15); color: #8e44ad; }
.gram-ejemplo {
  background: var(--bg-soft, rgba(127,127,127,.08)); border-radius: 10px;
  padding: .7rem .9rem; margin: .6rem 0;
}
.gram-links .btn { margin: .15rem .15rem .15rem 0; }

/* ---------- Modo cronometrado en exámenes ---------- */
.exam-timed-card { margin: 1rem 0; }
.exam-timed-toggle { display: block; cursor: pointer; font-size: 1.05rem; }
.exam-timed-toggle input { transform: scale(1.3); margin-right: .4rem; }
#exam-timed-mins {
  padding: .4rem .6rem; border-radius: 8px; border: 2px solid var(--border);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 1rem;
}
.exam-timer {
  position: sticky; top: 0; z-index: 50;
  background: var(--card); border: 2px solid var(--primary); border-radius: 12px;
  padding: .6rem 1rem; margin: .6rem 0; font-size: 1.4rem; font-weight: 800;
  text-align: center; box-shadow: var(--shadow);
}
.exam-timer .exam-timer-left { font-variant-numeric: tabular-nums; }
.exam-timer.danger { border-color: var(--danger); color: var(--danger); animation: exam-timer-pulse 1s infinite; }
@keyframes exam-timer-pulse { 50% { opacity: .65; } }
.timed-badge {
  display: inline-block; margin: .4rem 0; padding: .25rem .8rem; border-radius: 999px;
  background: rgba(59,130,246,.15); color: var(--primary); font-size: .9rem; font-weight: 700;
}

/* ============================================================
   v3.2 — Buscador de vocabulario (#/diccionario, feat-diccionario.js)
   ============================================================ */
.gdict-es { color: var(--muted); margin-top: .15rem; }
.gdict-meta {
  margin-left: auto; text-align: right; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: flex-end; gap: .35rem;
}
.gdict-level {
  font-size: .72rem; font-weight: 700; color: var(--accent);
  border: 1px solid var(--border); border-radius: 999px; padding: .1rem .55rem;
}
.gdict-chips { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: flex-end; max-width: 11rem; }
.gdict-chip {
  font-size: .72rem; border: 1px solid var(--border); border-radius: 999px;
  padding: .15rem .55rem; text-decoration: none; color: inherit;
  background: var(--card); white-space: nowrap;
}
.gdict-chip:hover { border-color: var(--primary); }
.gdict-more { cursor: default; }

/* Ilustración emoji de las lecciones profundas (no es una imagen) */
.ilustracion-emoji { font-size: 60px; line-height: 1.15; text-align: center; padding: 10px 0 4px; }

/* ===== Plan de 2 semanas por lección (plan14.js) ===== */
.plan-section { border: 1px solid var(--accent, #d4a017); }
.plan-profe { display: flex; gap: .8rem; align-items: flex-start; background: rgba(212,160,23,.08); border: 1px solid rgba(212,160,23,.35); border-radius: 12px; padding: .8rem .95rem; margin: .6rem 0 1rem; line-height: 1.5; }
.plan-profe-avatar { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.plan-days { display: flex; flex-direction: column; gap: .55rem; }
.plan-day { border: 1px solid var(--border, #e2e2e2); border-radius: 12px; background: var(--card, #fff); overflow: hidden; }
.plan-day summary { cursor: pointer; padding: .7rem .9rem; font-weight: 600; list-style: none; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.plan-day summary::-webkit-details-marker { display: none; }
.plan-day summary::before { content: '▸'; color: var(--accent, #d4a017); font-weight: 700; }
.plan-day[open] summary::before { content: '▾'; }
.plan-day-n { background: var(--accent, #d4a017); color: #1a1a1a; border-radius: 999px; padding: .1rem .6rem; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.plan-time { margin-left: auto; font-size: .78rem; color: var(--muted, #777); font-weight: 400; }
.plan-obj { margin: .2rem .9rem .4rem; color: inherit; }
.plan-acts { margin: 0 .9rem .6rem; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.plan-acts li { display: flex; gap: .55rem; align-items: flex-start; line-height: 1.5; }
.plan-act-i { flex-shrink: 0; }
.plan-video { margin: 0 .9rem .9rem; }
.plan-video-title { margin: .4rem 0 0; }
.plan-video-pending { margin: 0 .9rem .9rem; padding: .7rem .9rem; border: 1px dashed var(--border, #ccc); border-radius: 10px; background: rgba(0,0,0,.03); line-height: 1.5; }
@media (prefers-color-scheme: dark) {
  .plan-video-pending { background: rgba(255,255,255,.04); }
}

/* ===== Plan de 2 semanas DÍA POR DÍA: la lección ES su plan (ancho completo) ===== */
.days-nav { display: flex; flex-wrap: wrap; gap: .45rem; margin: .9rem 0 1.1rem; }
.days-nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.1rem; height: 2.1rem; padding: 0 .5rem; border: 1px solid var(--accent, #d4a017); border-radius: 999px; color: inherit; text-decoration: none; font-weight: 700; font-size: .85rem; }
.days-nav a:hover { background: rgba(212,160,23,.15); }
.plan-days-full { display: flex; flex-direction: column; gap: 1.1rem; width: 100%; }
section.plan-day { width: 100%; max-width: none; border: 1px solid var(--border, #e2e2e2); border-radius: 14px; background: var(--card, #fff); padding: 1.3rem 1.4rem; margin: 0; }
.plan-day-head { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: .3rem; }
.plan-day-head h3 { margin: 0; font-size: 1.15rem; }
.plan-day-n { background: var(--accent, #d4a017); color: #1a1a1a; border-radius: 999px; padding: .25rem .8rem; font-size: .85rem; font-weight: 800; white-space: nowrap; }
.plan-obj { margin: .4rem 0 .2rem; line-height: 1.5; }
.plan-time { margin: 0 0 .8rem; font-size: .82rem; color: var(--muted, #777); }
.plan-sub { margin: 1.3rem 0 .6rem; font-size: 1.02rem; }
.plan-sub:first-child { margin-top: .2rem; }
.plan-note { background: rgba(212,160,23,.07); border-left: 3px solid var(--accent, #d4a017); border-radius: 0 10px 10px 0; padding: .7rem .95rem; margin: .8rem 0; line-height: 1.55; }
.plan-video { margin: .9rem 0; }
.plan-video-title { margin: .45rem 0 0; }
.plan-video-pending { margin: .9rem 0; padding: .8rem 1rem; border: 1px dashed var(--border, #ccc); border-radius: 10px; line-height: 1.5; }
.plan-objetivos { margin: .6rem 0 .9rem; }
.plan-objetivos ul { margin: .4rem 0 0; padding-left: 1.3rem; line-height: 1.55; }
.plan-examen, .plan-juego { margin: 1rem 0 .4rem; }
.plan-extras { border-style: dashed; }
