/* TuAula.lat — Menú Pro (v1): menú, lectura a medida, voz, resaltados y notas, metas, compartir,
   tema que se expande desde el botón y bienvenida de cada curso. Usa los tokens de app.css. */

:root { --pro-gold: #f2a516; --hl0: #fde68a; --hl1: #a7f3d0; --hl2: #bfdbfe; --hl3: #fbcfe8; }
:root[data-theme="dark"] { --hl0: rgba(250, 204, 21, .32); --hl1: rgba(52, 211, 153, .3); --hl2: rgba(96, 165, 250, .32); --hl3: rgba(244, 114, 182, .3); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Lectura a medida (tamaño, fuente, interlineado) ---------- */
.reader { --rs: var(--pro-rs, 18px); }
.reader .r-p { font-family: var(--pro-rf, inherit); }
.reader .r-p { line-height: var(--pro-rlh, 1.66); }
.reader .r-ex .q-prompt, .reader .r-ex .q-context { font-family: var(--pro-rf, inherit); }

/* ---------- Barra del lector: escuchar y menú ---------- */
.r-bar [data-r="listen"].on { background: var(--teal); border-color: var(--teal); color: #fff; }
:root[data-theme="dark"] .r-bar [data-r="listen"].on { color: #04223a; }
.r-bar [data-r="listen"].on svg { animation: pro-beat 1.2s ease-in-out infinite; }
@keyframes pro-beat { 50% { transform: scale(1.12); } }
.ch-top { position: relative; }
.ch-share { position: absolute; top: -4px; right: -4px; color: var(--ink-2); }
.ch-share:hover { color: var(--teal-ink); border-color: var(--teal); }
.course-hero .ch-top > div { padding-right: 40px; }

/* ---------- Tema: círculo que se expande desde el botón ---------- */
html.pro-vt::view-transition-old(root), html.pro-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.pro-vt::view-transition-new(root) { z-index: 9999; }
.pro-veil { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }

/* ---------- Capa del menú ---------- */
body.pro-menu-open { overflow: hidden; }
.pro-layer { position: fixed; inset: 0; z-index: 70; display: flex; justify-content: flex-end; }
.pro-scrim { position: absolute; inset: 0; border: 0; background: rgba(4, 18, 34, .5); backdrop-filter: blur(3px); cursor: default; }
.pro-panel { position: relative; width: 100%; max-width: 460px; height: 100%; background: var(--paper); color: var(--ink); box-shadow: -20px 0 60px -20px rgba(0, 0, 0, .45); overflow: hidden; }
@media (min-width: 700px) { .pro-panel { height: calc(100% - 24px); margin: 12px; border-radius: 24px; border: 1px solid var(--line); } }
.pro-stack { position: relative; height: 100%; }
.pro-page { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.pro-page[hidden] { display: none; }
.pro-head { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; padding: 12px 14px; padding-top: calc(12px + env(safe-area-inset-top)); background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.pro-head h2 { margin: 0; text-align: center; font-size: 1.12rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pro-hbtn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: grid; place-items: center; padding: 0; transition: transform .15s ease, border-color .2s ease; }
.pro-hbtn:hover { border-color: var(--teal); }
.pro-hbtn:active { transform: scale(.92); }
.pro-hbtn svg { width: 22px; height: 22px; }
.pro-hsp { width: 44px; }
.pro-body { padding: 14px 16px 8px; }
.pro-group { margin: 0 0 18px; }
.pro-group > h3 { font-size: .92rem; margin: 0 4px 8px; color: var(--teal-ink); letter-spacing: .01em; }
.pro-card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); }
.pro-pad { padding: 16px; }
.pro-row { width: 100%; display: grid; grid-template-columns: 46px 1fr auto; gap: 14px; align-items: center; padding: 14px; border: 0; background: none; color: inherit; text-align: left; text-decoration: none; font: inherit; }
.pro-row + .pro-row { border-top: 1px solid var(--line); }
button.pro-row, a.pro-row, .pro-row[role="button"] { cursor: pointer; transition: background .2s ease; }
button.pro-row:hover, a.pro-row:hover, .pro-row[role="button"]:hover { background: color-mix(in srgb, var(--teal) 6%, transparent); }
.pro-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--teal) 12%, var(--paper-2)); color: var(--teal-ink); }
.pro-ico svg { width: 22px; height: 22px; }
.pro-txt { min-width: 0; }
.pro-txt b { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; line-height: 1.25; }
.pro-txt small { display: block; margin-top: 3px; color: var(--ink-3); font-size: .85rem; line-height: 1.4; }
.pro-chev svg { width: 20px; height: 20px; color: var(--ink-3); display: block; }
.pro-row.locked .pro-ico { color: var(--ink-3); background: var(--paper-2); }
.pro-lock { white-space: nowrap; }
.pro-row.danger .pro-ico { color: var(--red); background: var(--red-bg); }
.pro-row.danger b { color: var(--red); }
.pro-foot { text-align: center; font-size: .78rem; color: var(--ink-3); margin: 6px 0 4px; }
.pro-hint { color: var(--ink-3); font-size: .9rem; margin: 2px 4px 14px; }
.pro-note { padding: 12px 14px; border-radius: 14px; background: var(--red-bg); color: var(--ink); font-size: .9rem; margin-bottom: 14px; }

/* Tarjeta de promoción para usuarios gratis */
.pro-promo { width: 100%; display: grid; grid-template-columns: 44px 1fr 20px; gap: 12px; align-items: center; margin: 0 0 18px; padding: 14px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--pro-gold) 45%, var(--line)); background: linear-gradient(120deg, color-mix(in srgb, var(--pro-gold) 16%, var(--card)), var(--card)); color: var(--ink); text-align: left; font: inherit; position: relative; overflow: hidden; }
.pro-promo > svg:first-child { width: 44px; height: 44px; padding: 10px; border-radius: 14px; background: var(--pro-gold); color: #3b2500; }
.pro-promo b { display: block; font-family: var(--font-head); }
.pro-promo small { color: var(--ink-3); }
.pro-promo > svg:last-child { width: 20px; color: var(--ink-3); }
.pro-promo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); animation: r-shine 3.4s 1s ease-in-out infinite; pointer-events: none; }

/* Interruptor */
.pro-switch { position: relative; width: 56px; height: 32px; flex: none; border-radius: 99px; border: 0; padding: 0; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); transition: background .25s ease; }
.pro-switch i { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .3s var(--e-spring, ease); }
.pro-switch[aria-checked="true"] { background: var(--teal); box-shadow: none; }
.pro-switch[aria-checked="true"] i { transform: translateX(24px); }

/* Deslizadores */
.pro-range { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; }
.pro-range output, .pro-rtop output { font-family: var(--font-head); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 58px; text-align: right; }
.pro-a { font-family: var(--font-head); font-weight: 700; color: var(--ink-2); }
.pro-a.sm { font-size: .85rem; }
.pro-a.lg { font-size: 1.35rem; }
.pro-rrow { margin-bottom: 20px; }
.pro-rtop { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 10px; }
.pro-rtop b { display: block; font-family: var(--font-head); font-weight: 600; }
.pro-rtop small { color: var(--ink-3); font-size: .82rem; }
.pro-layer input[type="range"], .pro-custom-box input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer; }
.pro-layer input[type="range"]::-webkit-slider-runnable-track { height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--teal) var(--v, 50%), var(--paper-2) var(--v, 50%)); box-shadow: inset 0 0 0 1px var(--line); }
.pro-layer input[type="range"]::-moz-range-track { height: 8px; border-radius: 99px; background: var(--paper-2); }
.pro-layer input[type="range"]::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--teal); }
.pro-layer input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: var(--card); border: 3px solid var(--teal); box-shadow: 0 3px 10px rgba(0, 0, 0, .25); transition: transform .15s ease; }
.pro-layer input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--card); border: 3px solid var(--teal); box-shadow: 0 3px 10px rgba(0, 0, 0, .25); }
.pro-layer input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }

/* Vista previa del texto y fuentes */
.pro-preview { margin-bottom: 18px; padding: 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transition: font-size .2s ease; }
.pro-preview .eyebrow { font-size: .72rem; }
.pro-preview p { margin: 8px 0 0; color: var(--ink); }
.pro-fonts { display: grid; gap: 8px; }
.pro-font { display: grid; grid-template-columns: 56px 1fr 22px; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); text-align: left; font: inherit; transition: border-color .2s ease, background .2s ease, transform .15s ease; }
.pro-font:active { transform: scale(.98); }
.pro-font.on { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 7%, var(--card)); }
.pro-aa { font-size: 1.6rem; font-weight: 600; text-align: center; color: var(--teal-ink); }
.pro-font b { display: block; font-family: var(--font-head); font-weight: 600; }
.pro-font small { color: var(--ink-3); font-size: .82rem; }
.pro-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); transition: border .2s ease; }
.on > .pro-radio, .pro-pick.on .pro-radio { border: 7px solid var(--teal); }
.pro-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--paper-2); border: 1px solid var(--line); margin-bottom: 18px; }
.pro-seg button { padding: 11px 8px; border: 0; border-radius: 12px; background: none; color: var(--ink-2); font-family: var(--font-head); font-weight: 600; transition: background .25s ease, color .25s ease, box-shadow .25s ease; }
.pro-seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 2px 10px -4px rgba(0, 0, 0, .3); }
.pro-seg.sm { margin: 0; flex: 1; max-width: 260px; }
.pro-seg.sm button { padding: 9px 6px; font-size: .9rem; }

/* Metas */
.pro-goal-sum { font-family: var(--font-head); font-size: 1.35rem; line-height: 1.35; margin: 4px 4px 18px; }
.pro-goal-sum b { color: var(--teal-ink); }
.pro-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; align-items: end; height: 190px; padding: 18px 10px 12px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.pro-bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--ink-3); font: 600 .72rem/1.1 var(--font-body); }
.pro-bar i { width: min(40px, 80%); border-radius: 12px; background: color-mix(in srgb, var(--teal) 16%, var(--paper-2)); transition: background .25s ease, transform .3s var(--e-spring, ease); transform-origin: bottom; }
.pro-bar:hover i { transform: scaleY(1.04); }
.pro-bar.on { color: var(--teal-ink); }
.pro-bar.on i { background: linear-gradient(180deg, var(--aqua), var(--teal)); box-shadow: 0 10px 24px -10px var(--teal); }
.pro-bar span { white-space: nowrap; }
.pro-custom { display: inline-flex; align-items: center; gap: 10px; margin: 14px 4px; padding: 8px 4px; border: 0; background: none; color: var(--ink-2); font: 600 1rem var(--font-head); }
.pro-custom svg { width: 20px; height: 20px; }
.pro-custom.on { color: var(--teal-ink); }
.pro-custom-box { margin-bottom: 14px; }
.pro-custom-box[hidden] { display: none; }
.pro-today { display: flex; justify-content: center; margin: 4px 0 16px; }
.pro-today span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--paper-2); color: var(--ink-2); font-size: .9rem; }
.pro-today svg { width: 16px; height: 16px; color: #f97316; }
.pro-goalcard { font: inherit; color: inherit; text-align: left; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.pro-goalcard:hover { transform: translateY(-2px); }
.pro-goalcard .pro-ringv { transition: stroke-dasharray .8s var(--e-out, ease); }
.pro-cele { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 18px; background: var(--ink); color: var(--paper); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .5); max-width: calc(100vw - 32px); }
.pro-cele-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--teal); color: #fff; flex: none; }
.pro-cele-ico svg { width: 22px; height: 22px; }
.pro-cele b { display: block; font-family: var(--font-head); }
.pro-cele small { opacity: .75; }

/* Compartir */
.pro-share-prev { position: relative; display: grid; place-items: center; margin: 0 auto 14px; max-width: 340px; border-radius: 20px; overflow: hidden; background: var(--paper-2); aspect-ratio: 1080 / 1350; }
.pro-share-prev.story { max-width: 270px; aspect-ratio: 1080 / 1920; }
.pro-share-prev canvas { width: 100%; height: 100%; display: block; opacity: 0; }
.pro-share-prev.ready canvas { opacity: 1; }
.pro-share-prev .spinner { position: absolute; margin: 0; }
.pro-share-prev.ready .spinner { display: none; }
.pro-share-opts { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.pro-swatches { display: flex; gap: 10px; }
.pro-sw { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: var(--sw); padding: 0; box-shadow: inset 0 0 0 3px var(--paper); transition: transform .2s var(--e-spring, ease), border-color .2s ease; }
.pro-sw.on { border-color: var(--teal); transform: scale(1.08); }
.pro-share-go { position: relative; overflow: hidden; }
.pro-share-row, .pro-sheet-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; }
.pro-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 4px; border: 0; background: none; color: var(--teal-ink); font: 600 .98rem var(--font-head); text-decoration: none; }
.pro-link svg { width: 20px; height: 20px; }
.pro-link.danger { color: var(--red); }
.pro-code { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 20px; background: rgba(4, 18, 34, .78); backdrop-filter: blur(6px); }
.pro-code > .pro-hbtn { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; }
.pro-code-card { width: min(420px, 100%); padding: 26px 24px 22px; border-radius: 28px; background: #fff; color: #0b2545; text-align: center; border-top: 8px solid var(--c); }
.pro-code-card h2 { margin: 6px 0 14px; font-size: 1.5rem; }
.pro-code-card .pro-qr { width: 100%; height: auto; display: block; }
.pro-code-card p { margin: 12px 0 0; color: #5b6b82; font-size: .9rem; }
.pro-code-card .eyebrow { color: var(--c); }

/* Hoja inferior */
.pro-sheet-layer { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.pro-sheet { position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow: auto; background: var(--card); color: var(--ink); border-radius: 24px 24px 0 0; padding: 10px 20px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(0, 0, 0, .25); animation: r-sheet-in .45s var(--e-out, ease) both; }
.pro-grab { width: 40px; height: 4px; border-radius: 99px; background: var(--line); margin: 0 auto 14px; }
.pro-sheet .eyebrow { display: flex; align-items: center; gap: 6px; }
.pro-sheet .eyebrow svg { width: 16px; height: 16px; }
.pro-sheet textarea, .pro-page textarea { width: 100%; min-height: 110px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: 1rem/1.5 var(--font-body); resize: vertical; margin: 6px 0 14px; }
.pro-sheet textarea:focus, .pro-page textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 20%, transparent); }
.pro-lbl { display: block; font-family: var(--font-head); font-weight: 600; margin-top: 14px; }
.pro-up-ico { width: 64px; height: 64px; margin: 4px auto 10px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, #ffd56a, var(--pro-gold)); color: #3b2500; box-shadow: 0 14px 30px -14px var(--pro-gold); animation: r-icon-in .6s var(--e-spring, ease) both; }
.pro-up-ico svg { width: 32px; height: 32px; }
.pro-sheet .pro-up-eye { justify-content: center; }
.pro-up-title { text-align: center; font-size: 1.35rem; margin: 6px 0 4px; text-wrap: balance; }
.pro-up-sub { text-align: center; color: var(--ink-3); font-size: .9rem; margin: 0 0 14px; }
.pro-up-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.pro-up-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--paper); }
.pro-up-list svg { width: 22px; height: 22px; color: var(--teal-ink); flex: none; }

/* ---------- Resaltados ---------- */
mark.pro-hl { color: inherit; border-radius: 4px; padding: .06em 0; background-image: linear-gradient(var(--hlc), var(--hlc)); background-repeat: no-repeat; background-size: 100% 100%; background-color: transparent; cursor: pointer; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
mark.pro-hl.c0 { --hlc: var(--hl0); } mark.pro-hl.c1 { --hlc: var(--hl1); } mark.pro-hl.c2 { --hlc: var(--hl2); } mark.pro-hl.c3 { --hlc: var(--hl3); }
mark.pro-hl.has-note::after { content: ""; display: inline-block; width: .7em; height: .7em; margin-left: .18em; vertical-align: .32em; border-radius: 3px 3px 3px 0; background: var(--teal); }
.pro-bubble { position: fixed; z-index: 85; display: flex; align-items: center; gap: 6px; padding: 7px; border-radius: 16px; background: var(--ink); color: var(--paper); box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .55); }
.pro-bubble button { width: 38px; height: 38px; border-radius: 12px; border: 0; display: grid; place-items: center; background: none; color: inherit; padding: 0; }
.pro-bubble button:hover { background: rgba(255, 255, 255, .12); }
.pro-bubble svg { width: 20px; height: 20px; }
.pro-bsep { width: 1px; height: 24px; background: rgba(255, 255, 255, .2); margin: 0 2px; }
:root[data-theme="dark"] .pro-bsep { background: rgba(0, 0, 0, .2); }
:root[data-theme="dark"] .pro-bubble button:hover { background: rgba(0, 0, 0, .08); }
.pro-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, .08); padding: 0; transition: transform .2s var(--e-spring, ease); }
.pro-bubble .pro-dot { width: 30px; height: 30px; }
.pro-dot.c0 { background: #fde68a; } .pro-dot.c1 { background: #a7f3d0; } .pro-dot.c2 { background: #bfdbfe; } .pro-dot.c3 { background: #fbcfe8; }
.pro-dot:hover { transform: scale(1.12); }
.pro-colors { display: flex; gap: 12px; margin: 14px 0 4px; }
.pro-colors .pro-dot { width: 36px; height: 36px; }
.pro-colors .pro-dot.on { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--teal); }
.pro-quote { margin: 10px 0 0; padding: 12px 14px; border-radius: 14px; border-left: 5px solid; font-size: 1rem; line-height: 1.55; color: var(--ink); }
.pro-quote.c0 { background: color-mix(in srgb, #fde68a 45%, var(--card)); border-color: #f2c94c; }
.pro-quote.c1 { background: color-mix(in srgb, #a7f3d0 45%, var(--card)); border-color: #34d399; }
.pro-quote.c2 { background: color-mix(in srgb, #bfdbfe 50%, var(--card)); border-color: #60a5fa; }
.pro-quote.c3 { background: color-mix(in srgb, #fbcfe8 50%, var(--card)); border-color: #f472b6; }
:root[data-theme="dark"] .pro-quote { background: color-mix(in srgb, var(--hlc, #fde68a) 18%, var(--card)); }
:root[data-theme="dark"] .pro-quote.c0 { --hlc: #facc15; } :root[data-theme="dark"] .pro-quote.c1 { --hlc: #34d399; } :root[data-theme="dark"] .pro-quote.c2 { --hlc: #60a5fa; } :root[data-theme="dark"] .pro-quote.c3 { --hlc: #f472b6; }

/* Guardar preguntas y simulaciones */
.pro-hold .r-ex .q-prompt, .pro-hold .r-exnum, .pro-hold .r-simcard { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.r-exnum .pro-save { margin-left: auto; }
.pro-save { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink-3); display: grid; place-items: center; padding: 0; transition: color .2s ease, border-color .2s ease, transform .15s ease; }
.pro-save svg { width: 18px; height: 18px; }
.pro-save:hover { color: var(--teal-ink); border-color: var(--teal); }
.pro-save[aria-pressed="true"] { color: var(--pro-gold); border-color: color-mix(in srgb, var(--pro-gold) 50%, var(--line)); }
.r-simcard .pro-save { position: absolute; top: 10px; right: 10px; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #cfd9e6; }
.r-simcard .pro-save[aria-pressed="true"] { color: #ffd56a; }
.r-ex, .r-simcard { transition: transform .3s var(--e-out, ease), box-shadow .3s ease; }
.pro-pressing { transform: scale(.985); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pro-gold) 35%, transparent) !important; transition-duration: .55s !important; }
.pro-flash { animation: pro-flash 2s ease-out; }
mark.pro-flash { animation: pro-flash-mark 2s ease-out; }
@keyframes pro-flash { 0%, 40% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 55%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes pro-flash-mark { 0%, 30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 50%, transparent); } 100% { box-shadow: none; } }

/* ---------- Voz ---------- */
.r-p, .r-sec > h2 { transition: background-color .3s ease, box-shadow .3s ease; border-radius: 10px; }
.pro-speaking { background-color: color-mix(in srgb, var(--teal) 11%, transparent); box-shadow: 0 0 0 8px color-mix(in srgb, var(--teal) 11%, transparent); }
body.reading.pro-listening main { padding-bottom: 200px; }
.pro-player { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 26; width: min(560px, calc(100% - 24px)); display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 16px; border-radius: 20px; background: var(--ink); color: var(--paper); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55); }
.pro-pl-txt { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: .82rem; font-weight: 600; }
.pro-pl-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pro-pl-btns { display: flex; align-items: center; gap: 2px; flex: none; }
.pro-pl-btns button { width: 40px; height: 40px; border-radius: 12px; border: 0; background: none; color: inherit; display: grid; place-items: center; padding: 0; }
.pro-pl-btns button:hover { background: rgba(255, 255, 255, .1); }
:root[data-theme="dark"] .pro-pl-btns button:hover { background: rgba(0, 0, 0, .08); }
.pro-pl-btns svg { width: 20px; height: 20px; }
.pro-pl-main { background: var(--teal) !important; color: #fff !important; border-radius: 50% !important; }
.pro-pl-speed { width: auto !important; padding: 0 8px !important; font: 700 .85rem var(--font-head); font-variant-numeric: tabular-nums; }
.pro-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.pro-eq i { width: 3px; height: 4px; border-radius: 2px; background: var(--aqua); }
.pro-player.on .pro-eq i { animation: pro-eq 1s ease-in-out infinite; }
.pro-player.on .pro-eq i:nth-child(2) { animation-delay: .2s; }
.pro-player.on .pro-eq i:nth-child(3) { animation-delay: .4s; }
@keyframes pro-eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
@media (max-width: 420px) { .pro-pl-txt { font-size: .76rem; } .pro-pl-btns button { width: 36px; height: 36px; } }

/* ---------- Guardados ---------- */
.pro-sv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 8px 0 14px; }
.pro-sv-head h1 { margin: 2px 0 0; }
.pro-search { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); margin-bottom: 12px; }
.pro-search svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.pro-search input { flex: 1; min-width: 0; border: 0; background: none; padding: 13px 0; font: inherit; color: var(--ink); outline: none; }
.pro-search:focus-within { border-color: var(--teal); }
.pro-filters { margin-bottom: 16px; }
.pro-filters .filter span { opacity: .6; font-variant-numeric: tabular-nums; }
.pro-sv-list { display: grid; gap: 14px; }
.pro-sv-card { border-top: 5px solid var(--c); padding: 16px; }
.pro-sv-card header { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.pro-sv-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-top: 6px; flex: none; }
.pro-sv-card small { color: var(--ink-3); font-size: .78rem; }
.pro-sv-card h3 { margin: 2px 0 0; font-size: 1.05rem; }
.pro-sv-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pro-sv-item { padding: 10px 0; border-top: 1px solid var(--line); }
.pro-sv-item:first-child { border-top: 0; }
.pro-sv-note, .pro-sv-q { display: flex; gap: 10px; margin: 10px 0 0; color: var(--ink-2); line-height: 1.5; white-space: pre-line; }
.pro-sv-note svg, .pro-sv-q svg { width: 20px; height: 20px; flex: none; color: var(--teal-ink); margin-top: 2px; }
.pro-sv-q { margin: 0; color: var(--ink); }
.pro-sv-q small { display: block; color: var(--ink-3); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.pro-sv-act { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 16px; margin-top: 4px; }
.pro-sv-act .pro-link { font-size: .9rem; padding: 6px 0; }
.pro-sv-act .danger { margin-left: auto; }
.pro-empty { text-align: center; padding: 28px 8px 8px; }
.pro-empty h1 { font-size: clamp(1.5rem, 5vw, 1.9rem); margin: 18px 0 16px; }
.pro-empty-art { width: min(300px, 80%); height: auto; }
.pro-empty-art .ln { fill: var(--line); } .pro-empty-art .cd { fill: var(--card); stroke: var(--line); }
.pro-empty-art .hlb { fill: color-mix(in srgb, #facc15 35%, transparent); } .pro-empty-art .hlt { fill: color-mix(in srgb, var(--ink) 18%, transparent); }
.pro-empty-art .acc { fill: var(--teal); } .pro-empty-art .acc2 { fill: color-mix(in srgb, var(--teal) 55%, transparent); }
.pro-empty-art .dash { stroke: var(--teal); stroke-width: 2; stroke-dasharray: 3 4; fill: none; }
.pro-empty-art .ax { stroke: var(--ink-3); stroke-width: 1.5; fill: none; } .pro-empty-art .cv { stroke: var(--teal); stroke-width: 3; fill: none; stroke-linecap: round; }
.pro-hints { list-style: none; padding: 0; margin: 0 auto 22px; max-width: 380px; display: grid; gap: 14px; text-align: left; }
.pro-hints li { display: flex; gap: 14px; align-items: center; color: var(--ink-3); }
.pro-hints b { color: var(--ink); font-weight: 600; }
.pro-hints svg { width: 24px; height: 24px; color: var(--teal-ink); flex: none; }

/* Botones del perfil */
.pro-prof { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 0; }
.pro-prof .btn { gap: 8px; }

/* ---------- Bienvenida al curso ---------- */
body.pro-welcoming { overflow: hidden; }
body.pro-welcoming #view * { animation-play-state: paused !important; }
.pro-welcome { position: fixed; inset: 0; z-index: 100; overflow: hidden; color: #fff; background: radial-gradient(120% 90% at 50% 30%, color-mix(in srgb, var(--c) 78%, #fff) 0%, var(--c) 45%, color-mix(in srgb, var(--c) 45%, #050c16) 100%); animation: pw-in .5s ease both; cursor: pointer; }
@keyframes pw-in { from { opacity: 0; } to { opacity: 1; } }
.pw-art { position: absolute; inset: 0; }
.pw-fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.pw-ico { position: relative; width: 132px; height: 132px; border-radius: 38px; display: grid; place-items: center; margin-top: -18vh; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(8px); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .5); animation: pw-ico 1s var(--e-spring, ease) .15s both; }
.pw-ico svg { width: 66px; height: 66px; }
@keyframes pw-ico { from { opacity: 0; transform: scale(.5) rotate(-10deg); } to { opacity: 1; transform: none; } }
.pw-ring { position: absolute; left: 50%; top: calc(50% - 18vh); border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28); transform: translate(-50%, -50%) scale(.6); opacity: 0; animation: pw-ring 2.6s ease-out infinite; }
.pw-ring.r1 { width: 220px; height: 220px; }
.pw-ring.r2 { width: 340px; height: 340px; animation-delay: .5s; }
.pw-ring.r3 { width: 480px; height: 480px; animation-delay: 1s; }
@keyframes pw-ring { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 30% { opacity: .9; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.1); } }
.pw-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity 1s ease, transform 3.2s cubic-bezier(.2, .8, .2, 1); }
.pro-welcome.has-img .pw-img { opacity: 1; transform: none; }
.pro-welcome.has-img .pw-fallback { opacity: 0; transition: opacity .8s ease; }
.pw-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 12, 22, 0) 35%, rgba(5, 12, 22, .35) 60%, rgba(5, 12, 22, .85) 100%); }
.pw-txt { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 24px calc(96px + env(safe-area-inset-bottom)); max-width: 720px; margin: 0 auto; }
.pw-eye { display: inline-block; font: 600 .78rem var(--font-head); letter-spacing: .16em; text-transform: uppercase; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); animation: pw-up .7s var(--e-out, ease) .35s both; }
.pw-txt h2 { font-size: clamp(2rem, 8vw, 3.2rem); line-height: 1.05; margin: 14px 0 10px; text-wrap: balance; text-shadow: 0 6px 30px rgba(0, 0, 0, .35); animation: pw-up .8s var(--e-out, ease) .5s both; }
.pw-txt p { margin: 0 0 22px; font-size: 1.02rem; opacity: .9; animation: pw-up .8s var(--e-out, ease) .65s both; }
@keyframes pw-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.pw-hint { display: inline-flex; align-items: center; gap: 10px; font: 600 .92rem var(--font-head); opacity: .9; animation: pw-up .6s ease .9s both, pw-breathe 2.4s ease-in-out 1.6s infinite; }
.pw-hint::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 0 rgba(255, 255, 255, .6); animation: pw-dot 2s ease-out 1.6s infinite; }
@keyframes pw-breathe { 0%, 100% { opacity: .9; } 50% { opacity: .55; } }
@keyframes pw-dot { to { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); } }
.pw-skip { position: absolute; right: 20px; bottom: calc(28px + env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .14); color: #fff; font: 600 .95rem var(--font-head); backdrop-filter: blur(8px); animation: pw-up .6s ease .9s both; }
.pw-skip svg { width: 18px; height: 18px; }
@media (min-width: 760px) { .pw-txt { padding-bottom: 120px; } .pw-ico { width: 160px; height: 160px; } .pw-ico svg { width: 80px; height: 80px; } }

/* Sin animaciones si el sistema lo pide */
@media (prefers-reduced-motion: reduce) {
  .pro-welcome, .pro-welcome *, .pro-player *, .pro-promo::after, .pro-sheet, .pro-flash, mark.pro-flash, .r-bar [data-r="listen"].on svg { animation: none !important; transition: none !important; }
  .pw-img { transform: none; }
}
