/* WorldSpeak · app de curso propio (Ruta / Frases / Tablas / A medida) */
:root {
  --blue: #0038a8; --blue-deep: #002a7a; --blue-soft: #e6eeff;
  --red: #ce1126; --red-deep: #9c0b1c; --red-soft: #ffe9ec;
  --gold: #fcd116; --gold-deep: #d9b000; --gold-soft: #fff5c7;
  --ink: #1c2130; --muted: #6b7282; --line: #dfe4ee; --bg: #f3f6fc; --panel: #fff;
  --green: #12a35a; --green-deep: #0d7a43;
  --radius: 22px; --nav-h: 68px;
  --display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); -webkit-font-smoothing: antialiased; }
body { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.025em; margin: 0; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* botones "press" */
.btn { letter-spacing: -0.01em; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 16px; padding: 12px 20px; font-family: var(--display); font-weight: 600; font-size: 17px; color: #fff; text-decoration: none; transition: transform 0.06s ease, box-shadow 0.06s ease; user-select: none; }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 0 transparent !important; }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 5px 0 var(--gold-deep); }
.btn-blue { background: var(--blue); box-shadow: 0 5px 0 var(--blue-deep); }
.btn-red { background: var(--red); box-shadow: 0 5px 0 var(--red-deep); }
.btn-ghost { background: #fff; color: var(--blue); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); }
.btn-big { padding: 16px 28px; font-size: 20px; border-radius: 20px; }

/* top */
.top { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(243, 246, 252, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-back { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 2px solid var(--line); text-decoration: none; font-size: 26px; line-height: 1; padding-bottom: 4px; color: var(--blue); }
.top-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-flag { font-size: 28px; }
.top-title strong { display: block; font-family: var(--display); font-size: 19px; line-height: 1; }
.top-title em { font-style: normal; font-size: 12px; color: var(--muted); }
.top-stats { display: flex; gap: 8px; }
.stat { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px; background: #fff; border: 2px solid var(--line); font-family: var(--display); font-weight: 600; font-size: 14px; }
.stat-streak b { color: #e0641b; } .stat-done b { color: var(--green); }

.app { max-width: 720px; margin: 0 auto; padding: 16px 16px 24px; }
.tab[hidden] { display: none; }
.section-head { margin: 6px 0 14px; }
.section-head h2 { font-size: 30px; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.section-head .btn { margin-top: 10px; }
.eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red); }

/* hero */
.hero-card { position: relative; overflow: hidden; padding: 22px 22px 24px; border-radius: 26px; background: linear-gradient(135deg, var(--blue) 0%, #1a56d8 100%); color: #fff; box-shadow: 0 16px 40px rgba(0, 56, 168, 0.25); }
.hero-card .eyebrow { color: var(--gold); }
.hero-card h1 { font-size: 30px; line-height: 1.1; max-width: 22ch; }
.hero-meta { margin: 8px 0 16px; color: rgba(255, 255, 255, 0.8); font-weight: 500; }
.hero-card::after { content: "☀"; position: absolute; right: -10px; top: -22px; font-size: 130px; color: var(--gold); opacity: 0.25; pointer-events: none; }

/* ruta jeepney */
.route { position: relative; margin-top: 26px; padding-left: 46px; }
.route::before { content: ""; position: absolute; left: 22px; top: 0; bottom: 0; width: 8px; border-radius: 8px; background: repeating-linear-gradient(180deg, var(--gold) 0 18px, transparent 18px 30px), var(--line); background-blend-mode: normal; }
.level { margin: 0 0 8px; }
.level-head { position: relative; display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; }
.level-head .level-icon { position: absolute; left: -46px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 20px; }
.level-head h2 { font-size: 22px; }
.level-head p { margin: 0; font-size: 13px; color: var(--muted); }
.stop { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; margin: 10px 0; padding: 14px 16px; background: var(--panel); border: 2px solid var(--line); border-radius: 20px; text-decoration: none; color: inherit; transition: transform 0.08s ease; }
.stop::before { content: attr(data-num); position: absolute; left: -46px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 3px solid var(--line); font-family: var(--display); font-weight: 700; color: var(--muted); }
.stop strong { display: block; font-family: var(--display); font-size: 18px; }
.stop em { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-top: 2px; }
.stop .stop-cta { padding: 8px 14px; border-radius: 999px; font-family: var(--display); font-weight: 600; font-size: 14px; background: var(--line); color: var(--muted); white-space: nowrap; }
.stop.is-done::before { background: var(--green); border-color: var(--green); color: #fff; content: "✓"; }
.stop.is-done .stop-cta { background: #e6f6ec; color: var(--green-deep); }
.stop.is-next { border-color: var(--gold); box-shadow: 0 6px 0 var(--gold-deep); background: var(--gold-soft); }
.stop.is-next::before { background: var(--gold); border-color: var(--gold-deep); color: var(--ink); }
.stop.is-next .stop-cta { background: var(--blue); color: #fff; }
.stop.is-next::after { content: "🚌"; position: absolute; left: -84px; top: 50%; transform: translateY(-50%) scaleX(-1); font-size: 26px; animation: bump 1.4s ease-in-out infinite; }
@keyframes bump { 0%, 100% { transform: translateY(-50%) scaleX(-1); } 50% { transform: translateY(-58%) scaleX(-1); } }
.stop.is-soon { opacity: 0.55; }
.stop.is-soon .stop-cta::before { content: "🔒 "; }
a.stop:hover { transform: translateY(-2px); }

/* pills */
.search-row input { width: 100%; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line); font: inherit; font-size: 16px; background: #fff; }
.pill-bar { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.pill-bar-wrap { flex-wrap: wrap; overflow: visible; }
.pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; border: 2px solid var(--line); background: #fff; font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--ink); box-shadow: 0 3px 0 var(--line); }
.pill.is-active { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 3px 0 var(--blue-deep); }
.pill:active { transform: translateY(3px); box-shadow: none; }

/* frases: tarjetas voltables */
.phrase-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { perspective: 1000px; min-height: 130px; }
.card-inner { position: relative; width: 100%; min-height: 130px; transition: transform 0.45s cubic-bezier(.2,.8,.2,1); transform-style: preserve-3d; cursor: pointer; }
.card.is-flipped .card-inner { transform: rotateY(180deg); }
.card-face { position: absolute; inset: 0; display: grid; align-content: center; gap: 6px; padding: 18px; border-radius: 20px; border: 2px solid var(--line); background: #fff; backface-visibility: hidden; box-shadow: 0 5px 0 var(--line); }
.card-face strong { font-family: var(--display); font-size: 22px; line-height: 1.15; color: var(--blue); }
.card-face .lit { font-size: 12px; color: var(--muted); }
.card-face .es { font-size: 18px; font-weight: 600; }
.card-face .note { font-size: 13px; color: var(--muted); line-height: 1.4; }
.card-back { transform: rotateY(180deg); background: var(--blue-soft); border-color: #c9d8ff; box-shadow: 0 5px 0 #c9d8ff; }
.card-tag { position: absolute; top: 10px; right: 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--red); }
.card-play { position: absolute; bottom: 10px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--gold); box-shadow: 0 3px 0 var(--gold-deep); font-size: 14px; }
.card-play[disabled] { background: var(--line); box-shadow: none; opacity: 0.5; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* tablas */
.tables { display: grid; gap: 12px; }
.tbl { border: 2px solid var(--line); border-radius: 20px; background: #fff; overflow: hidden; }
.tbl summary { display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none; }
.tbl summary::-webkit-details-marker { display: none; }
.tbl summary .n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--gold); font-family: var(--display); font-weight: 700; }
.tbl summary strong { font-family: var(--display); font-size: 19px; display: block; }
.tbl summary em { font-style: normal; font-size: 12px; color: var(--muted); }
.tbl-body { padding: 0 18px 18px; }
.tbl-body p.intro { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.tbl-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
td.tl { font-family: var(--display); font-weight: 600; color: var(--blue); font-size: 16px; }
.tbl-notes { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--gold-soft); font-size: 14px; line-height: 1.45; }
.tbl-notes li { margin: 4px 0 4px 16px; }

/* a medida */
.custom-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 18px; }
.custom-row label { font-weight: 600; }
.custom-row select { margin-left: 8px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); font: inherit; background: #fff; }
.quiz { padding: 24px 20px; border-radius: 26px; background: #fff; border: 2px solid var(--line); text-align: center; }
.quiz-progress { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin-bottom: 22px; }
.quiz-progress span { display: block; height: 100%; width: 0; background: var(--green); transition: width 0.3s ease; }
.quiz-es { margin: 0; font-family: var(--display); font-size: 30px; line-height: 1.15; }
.quiz-hint { color: var(--muted); font-size: 14px; }
.quiz-tl { margin: 18px 0 4px; font-family: var(--display); font-size: 34px; color: var(--blue); }
.quiz-note { margin: 0; color: var(--muted); font-size: 14px; }
.quiz-actions { margin-top: 22px; display: grid; gap: 12px; }
.quiz-judge { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quiz-done { padding: 30px 20px; text-align: center; background: #fff; border-radius: 26px; border: 2px solid var(--line); }
.quiz-done-big { font-size: 64px; margin: 0; animation: pop 0.5s cubic-bezier(.2,1.4,.4,1); }
@keyframes pop { from { transform: scale(0.3); } to { transform: scale(1); } }

/* bottom nav */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 2px solid var(--line); }
.nav-btn { display: grid; place-items: center; gap: 2px; border: 0; background: none; font-family: var(--display); font-weight: 600; font-size: 12px; color: var(--muted); }
.nav-btn span { font-size: 24px; line-height: 1; }
.nav-btn.is-active { color: var(--blue); }
.nav-btn.is-active span { transform: translateY(-2px); }

@media (min-width: 761px) {
  .app { padding-top: 24px; }
  .hero-card h1 { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) { .stop.is-next::after, .quiz-done-big { animation: none; } .card-inner { transition: none; } }
@media print {
  .top, .bottom-nav, .tab:not(#tab-tablas), .section-head .btn { display: none !important; }
  #tab-tablas { display: block !important; }
  .tbl { break-inside: avoid; border: 1px solid #999; }
  .tbl details, .tbl[open] { display: block; }
  body { background: #fff; padding: 0; }
}

/* v4 */
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-ghost-light { background: rgba(255, 255, 255, 0.14); color: #fff; border: 2px solid rgba(255, 255, 255, 0.45); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.stop-actions { display: flex; gap: 8px; align-items: center; }
.stop-practice { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-size: 16px; box-shadow: 0 3px 0 var(--line); }
.stop-practice:active { transform: translateY(3px); box-shadow: none; }
.eyebrow { color: var(--gold); }
.stop em { letter-spacing: 0; }

/* pase de estilo v6: menos sombra, más espacio, radios coherentes */
.hero-card { box-shadow: none; border-radius: 28px; padding: 28px 26px 30px; }
.hero-card::after { display: none; }
.hero-card h1 { letter-spacing: -0.035em; }
.stop, .card-face, .tbl, .quiz, .quiz-done, .pill, .top-back, .stat, .search-row input, .stop-practice { box-shadow: none; }
.stop.is-next { box-shadow: none; border-width: 2px; }
.card-face { box-shadow: none; }
.card-back { box-shadow: none; }
.pill.is-active { box-shadow: none; }
.btn-ghost { box-shadow: none; }
.btn-gold { box-shadow: 0 4px 0 var(--gold-deep); }
.btn-blue, .btn-red { box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); }
.section-head h2 { font-size: 32px; letter-spacing: -0.035em; }
.section-head { margin: 10px 0 20px; }
.eyebrow { font-size: 12px; letter-spacing: 0.08em; }
.level-head { margin: 34px 0 14px; }
.app { padding: 20px 24px 32px; }
.top { border-bottom: 1px solid #e3e8f0; }

/* v8 · menú inferior tipo iOS: cristal, iconos SF-like, píldora activa, safe area */
.bottom-nav { grid-template-columns: repeat(4, 1fr); height: auto; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.72); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid rgba(0, 0, 0, 0.08); }
.nav-btn { gap: 3px; padding: 6px 4px; border-radius: 14px; color: #8a8f99; font-family: var(--body); font-weight: 600; font-size: 11px; letter-spacing: 0; transition: color 0.15s ease, background 0.15s ease; }
.nav-btn svg { width: 26px; height: 26px; fill: currentColor; transition: transform 0.15s ease; }
.nav-btn span { font-size: 11px; line-height: 1; }
.nav-btn.is-active { color: var(--blue); }
.nav-btn.is-active svg { transform: none; }
.nav-btn:active svg { transform: scale(0.9); }
@media (min-width: 761px) {
  .bottom-nav { left: 50%; right: auto; bottom: 16px; width: min(560px, calc(100% - 32px)); transform: translateX(-50%); border-radius: 22px; border: 1px solid rgba(0, 0, 0, 0.08); padding: 8px 10px; box-shadow: 0 10px 40px rgba(20, 34, 62, 0.12); }
  .nav-btn { flex-direction: row; grid-auto-flow: column; gap: 8px; font-size: 13px; }
  .nav-btn.is-active { background: var(--blue-soft); }
  body { padding-bottom: 110px; }
}
/* top bar tipo iOS: título centrado y cristal */
.top { grid-template-columns: 44px 1fr 44px; padding: 10px 12px; background: rgba(243, 246, 252, 0.8); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.top-title { justify-content: center; text-align: center; }
.top-title strong { font-size: 17px; }
.top-stats { grid-column: 3; justify-content: flex-end; }
.stat { padding: 5px 8px; font-size: 12px; }
@media (max-width: 420px) { .stat-done { display: none; } .top-title em { display: none; } }
/* tarjetas y paradas responsive */
@media (max-width: 480px) {
  .hero-card { padding: 22px 18px 24px; border-radius: 22px; }
  .hero-card h1 { font-size: 26px; }
  .btn-big { padding: 14px 20px; font-size: 17px; }
  .route { padding-left: 40px; }
  .stop::before, .level-head .level-icon { left: -40px; width: 34px; height: 34px; }
  .stop.is-next::after { left: -76px; font-size: 22px; }
  .stop { padding: 12px 12px; gap: 8px; }
  .stop strong { font-size: 16px; }
  .stop em { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .stop-cta { padding: 7px 10px; font-size: 13px; }
  .phrase-grid { grid-template-columns: 1fr; }
  .quiz-es { font-size: 26px; } .quiz-tl { font-size: 30px; }
  .hub-stats2 { display: grid; grid-template-columns: repeat(3, 1fr); }
}

/* v12: play en las paradas, bus dentro, diálogos */
.stop-cta.stop-play { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; background: var(--blue); }
.stop-cta.stop-play svg { width: 22px; height: 22px; fill: #fff; }
.stop.is-next .stop-cta.stop-play { background: var(--blue); }
.stop.is-done .stop-cta.stop-play { background: var(--green); }
.stop.is-next::after { left: -36px; top: -14px; transform: scaleX(-1); font-size: 18px; animation: none; }
@keyframes bump { 0%, 100% { transform: scaleX(-1); } }
.section-head-sub { margin-top: 36px; }
.section-head-sub h3 { font-size: 24px; }
.dialogue-list { display: grid; gap: 10px; }
.dlg { border: 1px solid var(--line); border-radius: 20px; background: #fff; overflow: hidden; }
.dlg summary { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; padding: 14px 16px; list-style: none; cursor: pointer; }
.dlg summary::-webkit-details-marker { display: none; }
.dlg summary strong { font-family: var(--display); font-size: 17px; }
.dlg summary em { grid-column: 2; font-style: normal; font-size: 13px; color: var(--muted); }
.lesson-pill { display: inline-block; padding: 5px 10px; border-radius: 999px; background: var(--blue); color: #fff; font-family: var(--display); font-weight: 800; font-size: 12px; }
.dlg-lines { display: grid; gap: 8px; padding: 0 16px 8px; }
.dlg-line { display: grid; gap: 4px; max-width: 88%; padding: 12px 14px; border: 0; border-radius: 18px; text-align: left; background: var(--blue-soft); color: var(--ink); font: inherit; cursor: pointer; }
.dlg-line.is-f { justify-self: end; background: var(--gold-soft); }
.dlg-line b { font-family: var(--display); font-size: 17px; color: var(--blue); }
.dlg-line span { display: none; font-size: 14px; color: var(--muted); }
.dlg-line.is-open span { display: block; }
.dlg-tip { margin: 0; padding: 0 16px 14px; font-size: 12px; color: var(--muted); }
@media (max-width: 480px) { .stop.is-next::after { left: -30px; top: -12px; font-size: 16px; } }

.has-live-bg .stop, .has-live-bg .card-face, .has-live-bg .tbl, .has-live-bg .quiz, .has-live-bg .quiz-done, .has-live-bg .dlg, .has-live-bg .pill, .has-live-bg .search-row input { background: rgba(255,255,255,0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.has-live-bg .card-back { background: rgba(230,238,255,0.9); }
.has-live-bg .top { background: rgba(246,248,254,0.7); }

.has-live-bg .pill.is-active { background: var(--blue) !important; color: #fff; border-color: var(--blue); }

.dlg-line { position: relative; padding-right: 40px; }
.dlg-play { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12px; color: var(--blue); opacity: 0.7; }
.dlg-line.is-playing .dlg-play, .card-play.is-playing { color: var(--red); opacity: 1; }
.card-play:not([disabled]) { background: var(--gold); box-shadow: 0 3px 0 var(--gold-deep); opacity: 1; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 6px 0 14px; border-radius: 16px; background: rgba(0,0,0,0.06); }
.seg-btn { padding: 10px; border: 0; border-radius: 12px; background: transparent; font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--muted); }
.seg-btn.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.seg-help { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.voices-link { display: grid; gap: 2px; margin: 28px 0 8px; padding: 16px 18px; border-radius: 20px; background: rgba(255,255,255,0.8); border: 1px dashed var(--line); text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 800; }
.voices-link span { font-family: var(--body); font-weight: 500; font-size: 13px; color: var(--muted); }

/* v26 */
.hero-where { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; color: rgba(255,255,255,0.85); font-size: 14px; font-weight: 500; }
.hero-where-pill { padding: 6px 12px; border-radius: 999px; background: var(--gold); color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 12px; letter-spacing: 0.04em; }
#nextMetaText { display: inline-flex; align-items: center; gap: 8px; }
.hero-progress { display: inline-block; width: 70px; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.25); overflow: hidden; }
.hero-progress i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.practice-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; margin: 14px 0 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,0.82); backdrop-filter: blur(12px); text-align: left; font: inherit; color: var(--ink); }
.practice-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--gold-soft); font-size: 18px; }
.practice-bar strong { display: block; font-family: var(--display); font-size: 15px; }
.practice-bar em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.practice-go { font-size: 24px; color: var(--muted); }
.stop.is-next::after { font-size: 30px; left: -44px; top: -22px; }
@media (max-width: 480px) { .stop.is-next::after { font-size: 26px; left: -38px; top: -20px; } }

/* ===== v28 · Ruta rediseñada: un card por nivel, camino sólido con progreso ===== */
.hero-actions { margin-top: 18px; }
.practice-bar { grid-template-columns: auto 1fr auto auto; margin: 12px 0 18px; padding: 12px 14px; }
.practice-bar strong { font-size: 16px; }
.practice-pill { font-style: normal; font-size: 12px; font-weight: 700; color: var(--blue); background: var(--blue-soft); padding: 4px 10px; border-radius: 999px; }
.route { padding-left: 0; margin-top: 6px; display: grid; gap: 18px; }
.route::before { display: none; }
.level { position: relative; padding: 0; border-radius: 26px; background: rgba(255,255,255,0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); overflow: hidden; --lvl: #1e5eff; --lvl-soft: #e6eeff; }
.level[data-level="1"] { --lvl: #1e5eff; --lvl-soft: #e6eeff; } .level[data-level="2"] { --lvl: #0d9f6e; --lvl-soft: #e3f7ee; } .level[data-level="3"] { --lvl: #f28c28; --lvl-soft: #fff0e0; } .level[data-level="4"] { --lvl: #d6336c; --lvl-soft: #ffe6ef; } .level[data-level="5"] { --lvl: #7048e8; --lvl-soft: #efe9ff; }
.level-head { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin: 0; padding: 18px 18px 16px; background: linear-gradient(135deg, var(--lvl) 0%, color-mix(in srgb, var(--lvl) 70%, #000) 100%); color: #fff; }
.level-head::after { content: ""; position: absolute; right: -30px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.level-head .level-icon { position: static; width: 52px; height: 52px; border-radius: 16px; background: rgba(255,255,255,0.22); font-size: 26px; }
.level-copy { display: grid; gap: 2px; min-width: 0; }
.level-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.level-head h2 { font-size: 20px; color: #fff; line-height: 1.1; }
.level-head p { color: rgba(255,255,255,0.8); font-size: 13px; }
.level-progress { position: relative; z-index: 1; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,0.2); font-family: var(--display); font-weight: 700; font-size: 13px; }
.level-progress b { font-size: 18px; }
.level-stops { position: relative; padding: 16px 14px 14px 62px; display: grid; gap: 10px; }
.level-stops::before { content: ""; position: absolute; left: 33px; top: 30px; bottom: 30px; width: 6px; border-radius: 6px; background: var(--line); }
.level-stops::after { content: ""; position: absolute; left: 33px; top: 30px; width: 6px; height: calc((100% - 60px) * var(--fill, 0%) / 100%); border-radius: 6px; background: var(--lvl); transition: height 0.6s ease; }
.level-stops .stop { margin: 0; padding: 12px 12px 12px 14px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.level-stops .stop::before { left: -46px; width: 36px; height: 36px; border-width: 3px; font-size: 14px; z-index: 1; }
.level-stops .stop.is-done::before { background: var(--lvl); border-color: var(--lvl); }
.level-stops .stop.is-done .stop-cta.stop-play { background: var(--lvl); }
.level-stops .stop.is-next { background: var(--lvl-soft); border-color: var(--lvl); box-shadow: none; }
.level-stops .stop.is-next::before { background: #fff; border-color: var(--lvl); color: var(--lvl); animation: ring 1.6s ease-out infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--lvl) 45%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
.level-stops .stop.is-next .stop-cta.stop-play { background: var(--lvl); }
.level-stops .stop.is-next::after { left: -50px; top: -16px; font-size: 22px; }
.level-stops .stop.is-soon { opacity: 0.6; }
.level-stops .stop.is-soon::before { background: #f3f5f9; }
.level-stops .stop strong { font-size: 16px; }
.level-stops .stop em { font-size: 12px; }
.stop-cta.stop-play { width: 40px; height: 40px; }
.stop-cta.stop-play svg { width: 18px; height: 18px; }
@media (max-width: 480px) { .level-stops { padding-left: 56px; } .level-stops::before, .level-stops::after { left: 29px; } .level-stops .stop::before { left: -42px; width: 32px; height: 32px; } .level-stops .stop.is-next::after { left: -46px; } .level-head h2 { font-size: 18px; } }
/* mapa de lenguas */
.map-link { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 8px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,0.8); font: inherit; font-weight: 700; color: var(--ink); }
.phm { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(10, 20, 50, 0.55); backdrop-filter: blur(8px); }
.phm-panel { position: relative; width: min(560px, 100%); max-height: 92vh; overflow: auto; padding: 22px 20px; border-radius: 26px; background: #fff; }
.phm-close { position: absolute; right: 14px; top: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg); font-size: 22px; }
.phm-panel h2 { font-size: 24px; margin-bottom: 4px; } .phm-panel p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.phm-map svg { width: 100%; height: auto; }
.phm-map [data-lang] { cursor: pointer; transition: opacity 0.2s ease; } .phm-map [data-lang]:hover { opacity: 1 !important; }
.phm-legend { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.phm-legend li { display: grid; grid-template-columns: 16px 1fr; gap: 4px 10px; align-items: center; padding: 6px 8px; border-radius: 10px; }
.phm-legend li.is-hl { background: var(--gold-soft); }
.phm-legend i { width: 16px; height: 16px; border-radius: 5px; }
.phm-legend b { font-size: 14px; } .phm-legend span { grid-column: 2; font-size: 12px; color: var(--muted); }
.phm-note { margin-top: 12px !important; font-size: 13px !important; }
.phm-map svg { max-height: 62vh; }
.phm-map [data-lang] { stroke: #fff; }
.level-head .level-icon { background: rgba(255,255,255,0.92); }
