/* Presentación de la lección. El video y el avance siguen usando el reproductor existente. */
body.is-course-player { background: #f3f6fa; }
body.is-course-player .topbar { padding-inline: 20px; }
body.is-course-player .course-player-title-copy strong { font-size: 14px; font-weight: 600; }
body.is-course-player .player-layout { --curriculum-width:clamp(320px,25vw,380px); max-width:none; width:100%; margin:20px 0 0; padding:0 0 0 clamp(16px,1.7vw,32px); gap:24px; grid-template-columns:minmax(0,1fr) var(--curriculum-width); transition:none; }
body.is-course-player.is-curriculum-collapsed .player-layout { max-width:none; grid-template-columns:minmax(0,1fr); padding-right:clamp(16px,1.7vw,32px); }
body.is-course-player .player-column { background: transparent; display: block; height: auto; overflow: visible; }
body.is-course-player .student-live-banner { border: 1px solid #dae4ef; border-left: 3px solid #2764ae; border-radius: 12px; min-height: 64px; margin-bottom: 16px; padding: 12px 16px; }
body.is-course-player .student-live-banner.is-empty { min-height: 56px; grid-template-columns: 30px minmax(0, 1fr) auto; }
body.is-course-player .student-live-banner-icon { width: 36px; height: 36px; border-radius: 10px; }
body.is-course-player .student-live-banner.is-empty .student-live-banner-icon { width: 30px; height: 30px; }
body.is-course-player .student-live-banner-copy > strong { font-size: 14px; font-weight: 600; line-height: 1.5; }
body.is-course-player .student-live-banner-action { font-size: 12px; min-height: 40px; font-weight: 600; }
.player-view-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.player-view-toolbar > span { color: #53677f; font-size: 12px; font-weight: 500; }
.player-view-tools { display: flex; align-items: center; gap: 8px; }
.player-view-tools button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 9px 12px; border: 1px solid #d4dfec; border-radius: 9px; background: #fff; color: #304e71; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.player-view-tools button:hover { background: #eaf1fb; border-color: #afc5e1; }
.player-view-tools button[aria-pressed="true"] { background: #e8f0fc; color: #22549a; border-color: #adc7eb; }
.player-view-tools svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
body.is-course-player .video-player { border-radius: 14px; overflow: hidden; box-shadow: 0 8px 28px rgb(18 39 69 / 9%); }
body.is-course-player .player-stage { height:auto; aspect-ratio:16 / 9; max-height:68dvh; border-radius:14px; }
body.is-course-player .player-stage.is-reading-stage { height: auto; max-height: none; min-height: 280px; background: #fff; }
body.is-course-player .player-video-controls { padding: 28px 16px 12px; }
body.is-course-player .player-video-controls button { width: 40px; height: 40px; min-height: 40px; }
body.is-course-player .player-time { font-size: 12px; font-weight: 500; }
body.is-course-player .player-video-controls .player-speed-button { font-size: 13px; }
body.is-course-player .video-screen.is-playing:not(.is-mini-player) .player-video-controls { opacity: 1; transform: none; }
body.is-course-player .player-lesson-bar { background: transparent; gap: 18px; padding: 24px 2px 20px; border-bottom: 0; }
body.is-course-player .player-lesson-actions button { min-height: 44px; font-size: 12px; }
body.is-course-player .player-lesson-identity h1 { font-size: clamp(23px, 2vw, 30px); }
body.is-course-player .content-tabs { position: static; background: #fff; border: 1px solid #dce5ef; border-radius: 12px; padding: 5px; gap: 4px; min-height: 54px; }
body.is-course-player .content-tabs button { flex: 1; justify-content: center; border: 0; border-radius: 8px; font-size: 13px; font-weight: 500; min-height: 44px; padding: 10px 12px; }
body.is-course-player .content-tabs button.active { color: #22549a; background: #eaf1fc; box-shadow: none; transform: none; font-weight: 600; }
body.is-course-player .content-panel { background: transparent; padding: 24px 0 64px; min-height: 0; }
body.is-course-player .curriculum-panel { grid-column:2; grid-row:1; width:var(--curriculum-width); height:calc(100dvh - var(--player-header-height) - 20px); top:calc(var(--player-header-height) + 20px); left:auto; right:0; border:1px solid #d8e3ef; border-right:0; border-bottom:0; border-radius:14px 0 0 0; background:#fff; box-shadow:0 4px 20px rgb(18 39 69 / 4%); }
body.is-course-player .curriculum-head { background:#fff; border-bottom:1px solid #e1e8f1; min-height:72px; padding:14px 18px; grid-template-columns:minmax(0,1fr) 44px; }
body.is-course-player .curriculum-head-copy strong { color:#182c45; font-size:18px; font-weight:600; line-height:1.4; }
body.is-course-player .curriculum-toggle { color: #53677f; background: #f4f7fb; border-color: #dce5ef; border-radius: 9px; }
body.is-course-player .curriculum-toggle:hover { color: #22549a; background: #eaf1fc; border-color: #bed0e9; }
body.is-course-player .curriculum-progress { background:#f7faff; padding:16px 18px; }
body.is-course-player .curriculum-list { background: #fff; }
body.is-course-player .curriculum-module summary { min-height: 68px; }
body.is-course-player .curriculum-module-copy strong { font-weight: 600; }
body.is-course-player .lesson-row { min-height: 64px; }
body.is-course-player .lesson-row-copy strong { font-weight: 500; }
body.is-course-player.is-player-cinema .player-layout { max-width:none; }
body.is-course-player.is-player-cinema .player-stage:not(.is-reading-stage) { height: 70dvh; max-height: 760px; }
body.is-course-player .player-stage:fullscreen, body.is-course-player.is-player-cinema .player-stage:fullscreen { height: 100%; max-height: none; border-radius: 0; }
@media (min-width: 1101px) {
  html:has(body.is-course-player), body.is-course-player { height: auto; overflow: visible; }
  body.is-course-player .learning-shell { display: block; height: auto; min-height: 100dvh; overflow: visible; }
  body.is-course-player .learning-main, body.is-course-player .player-view, body.is-course-player .player-layout { height: auto; overflow: visible; }
  body.is-course-player .topbar { position: sticky; top: 0; z-index: 250; }
  body.is-course-player .curriculum-panel { position: sticky; }
}
.player-shortcuts-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid #dce5ef; border-radius: 16px; color: #182c45; background: #fff; box-shadow: 0 24px 80px rgb(10 28 50 / 22%); }
.player-shortcuts-dialog::backdrop { background: rgb(12 26 46 / 45%); }
.player-shortcuts-dialog h2 { margin: 0; font-size: 22px; line-height: 1.4; }
.player-shortcuts-dialog > p { font-size: 13px; line-height: 1.7; color: #53677f; }
.player-shortcuts-dialog dl { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding-block: 12px; font-size: 13px; }
.player-shortcuts-dialog dt { font-weight: 600; }
.player-shortcuts-dialog dd { margin: 0; line-height: 1.5; color: #53677f; }
.player-shortcuts-dialog kbd { display: inline-block; padding: 4px 7px; border: 1px solid #d5e0ec; border-radius: 6px; background: #f4f7fb; font: inherit; font-size: 12px; }
.player-shortcuts-dialog button { min-height: 44px; padding: 10px 16px; border: 0; border-radius: 9px; background: #22549a; color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
body.is-course-player :is(.player-view-tools button, .player-shortcuts-dialog button, .content-tabs button):focus-visible { outline: 3px solid #3767ac; outline-offset: 3px; }
@media (max-width: 1100px) {
  body.is-course-player .player-layout, body.is-course-player.is-curriculum-collapsed .player-layout { display:block; margin:20px 0 0; padding:0 20px; }
  body.is-course-player .curriculum-panel, body.is-course-player.is-curriculum-collapsed .curriculum-panel { position:fixed; left:auto; right:0; top:var(--player-header-height); bottom:0; width:min(440px,calc(100vw - 24px)); max-width:none; height:calc(100dvh - var(--player-header-height)); border-radius:14px 0 0 0; }
  body.is-course-player .player-lesson-bar { align-items: flex-start; flex-wrap: wrap; }
}
@media (max-width: 680px) {
  body.is-course-player .topbar { padding-inline: 8px; }
  body.is-course-player .player-layout, body.is-course-player.is-curriculum-collapsed .player-layout { margin-top: 14px; padding-inline: 12px; }
  .player-view-toolbar > span { display: none; }
  .player-view-toolbar { justify-content: flex-end; }
  body.is-course-player .student-live-banner { gap: 10px; padding: 12px; }
  body.is-course-player .student-live-banner.is-empty { grid-template-columns: minmax(0, 1fr) auto; }
  body.is-course-player .student-live-banner.is-empty .student-live-banner-icon { display: none; }
  body.is-course-player .player-stage { height: auto; aspect-ratio: 16 / 10; max-height: none; }
  body.is-course-player .player-video-controls { padding: 22px 8px 8px; }
  body.is-course-player .player-video-controls button { width: 32px; height: 36px; min-height: 36px; padding: 6px; }
  body.is-course-player .player-time { font-size: 10px; }
  body.is-course-player .content-tabs { gap: 0; padding: 4px; }
  body.is-course-player .content-tabs button { gap: 4px; padding: 10px 4px; font-size: 11px; }
  body.is-course-player .content-tabs button { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  body.is-course-player .content-tabs button > span { min-width: 0; overflow-wrap: anywhere; }
  body.is-course-player .content-tabs button svg { width: 14px; height: 14px; }
  body.is-course-player .player-lesson-bar { padding-top: 20px; }
  body.is-course-player .curriculum-panel, body.is-course-player.is-curriculum-collapsed .curriculum-panel { left:auto; right:0; width:100%; border-radius:0; }
  body.is-course-player.is-player-cinema .player-stage:not(.is-reading-stage) { height: 55dvh; }
}
@media (prefers-reduced-motion: reduce) { .player-view-tools button { transition: none; } }

/* One clear lesson surface and a readable, right-aligned curriculum. */
body.is-course-player .player-column { grid-column:1; grid-row:1; }
body.is-course-player .curriculum-toggle { width:44px; height:44px; min-height:44px; }
body.is-course-player .curriculum-progress > div:first-child { gap:8px; align-items:baseline; flex-wrap:wrap; }
body.is-course-player .curriculum-progress strong { font-size:14px; font-weight:600; }
body.is-course-player .curriculum-progress small { font-size:12px; font-weight:400; line-height:1.5; }
body.is-course-player .curriculum-progress .progress-bar { height:5px; }
body.is-course-player .curriculum-side-panel { min-height:0; }
body.is-course-player .curriculum-search { padding:14px 18px; gap:10px; }
body.is-course-player .curriculum-search input { height:44px; min-height:44px; font-size:14px; font-weight:400; padding:10px 12px; }
body.is-course-player .curriculum-search input::placeholder { color:#63748a; font-weight:400; opacity:1; }
body.is-course-player .curriculum-module summary { padding:16px 18px; min-height:76px; gap:12px; }
body.is-course-player .curriculum-module-copy strong { font-size:15px; font-weight:600; line-height:1.5; overflow-wrap:anywhere; }
body.is-course-player .curriculum-module-copy small { font-size:12px; font-weight:400; line-height:1.6; }
body.is-course-player .lesson-row { padding:15px 18px; gap:12px; min-height:76px; }
body.is-course-player .lesson-row-copy { min-width:0; }
body.is-course-player .lesson-row-copy strong { font-size:14px; font-weight:500; line-height:1.6; overflow-wrap:anywhere; }
body.is-course-player .lesson-row-copy small { font-size:12px; font-weight:400; line-height:1.5; }
body.is-course-player .lesson-row-status { font-size:10px; font-weight:600; }
body.is-course-player :is(.curriculum-toggle,.curriculum-search input,.curriculum-module summary,.lesson-row):focus-visible { outline:3px solid #427ab7; outline-offset:-4px; }
body.is-course-player .player-stage.is-reading-stage { min-height:0; aspect-ratio:auto; border:1px solid #dbe5f0; }
body.is-course-player .player-stage.is-reading-stage .video-screen.is-reading { display:grid; grid-template-columns:minmax(0,1fr); justify-content:stretch; justify-items:stretch; align-content:stretch; align-items:stretch; height:auto; min-height:360px; aspect-ratio:auto; padding:0; background:#fff; }
body.is-course-player .player-reading-card { max-width:none; width:100%; border:0; border-radius:0; box-shadow:none; padding:clamp(28px,3.5vw,56px); grid-template-columns:64px minmax(0,1fr) auto; gap:18px 24px; align-content:center; background:linear-gradient(115deg,#fff 55%,#f1f6fc); }
body.is-course-player .player-reading-icon { width:64px; height:64px; border-radius:16px; }
body.is-course-player .player-reading-icon svg { width:30px; height:30px; }
body.is-course-player .player-reading-card > div:nth-child(2) { gap:12px; min-width:0; }
body.is-course-player .player-reading-card small { font-size:11px; font-weight:600; letter-spacing:.07em; line-height:1.6; overflow-wrap:anywhere; }
body.is-course-player .player-reading-card h2 { font-size:clamp(28px,2.7vw,42px); font-weight:600; line-height:1.2; overflow-wrap:anywhere; }
body.is-course-player .player-reading-card p { font-size:16px; font-weight:400; line-height:1.75; max-width:65ch; }
body.is-course-player .player-reading-meta { gap:6px; min-width:54px; padding-top:3px; }
body.is-course-player .player-reading-meta span { font-size:12px; font-weight:400; line-height:1.5; }
body.is-course-player .player-reading-meta strong { font-size:15px; font-weight:600; line-height:1.5; }
body.is-course-player .player-reading-card > button { min-height:46px; padding:12px 18px; font-size:14px; font-weight:600; line-height:1.5; font-family:inherit; }
body.is-course-player .player-view-toolbar { flex-wrap:wrap; }
body.is-course-player .player-view-tools button { min-height:44px; font-size:13px; font-weight:500; }
body.is-course-player .player-lesson-identity p { font-size:13px; font-weight:400; line-height:1.6; }
body.is-course-player .player-lesson-actions { flex-wrap:wrap; }
@media (max-width:1100px) {
  body.is-course-player .curriculum-panel,body.is-course-player.is-curriculum-collapsed .curriculum-panel { box-shadow:-16px 0 60px rgb(12 33 58 / 16%); }
  body.is-course-player .curriculum-panel:not(.is-collapsed) { transform:translateX(0); }
  body.is-course-player .curriculum-search input { font-size:16px; }
}
@media (max-width:680px) {
  body.is-course-player .player-stage.is-reading-stage .video-screen.is-reading { min-height:0; }
  body.is-course-player .player-reading-card { grid-template-columns:48px minmax(0,1fr); padding:26px 22px; gap:16px; }
  body.is-course-player .player-reading-icon { width:48px; height:48px; border-radius:12px; }
  body.is-course-player .player-reading-icon svg { width:25px; height:25px; }
  body.is-course-player .player-reading-card h2 { font-size:27px; }
  body.is-course-player .player-reading-card p { font-size:15px; }
  body.is-course-player .player-reading-meta { grid-column:2; display:flex; align-items:center; gap:10px; padding:0; }
  body.is-course-player .player-reading-card > button { grid-column:1 / -1; justify-self:stretch; }
  body.is-course-player .player-lesson-actions { gap:10px; }
}
@media (max-height:500px) and (max-width:1100px) {
  body.is-course-player .curriculum-head { min-height:58px; padding:7px 18px; }
  body.is-course-player .curriculum-progress { padding:10px 18px; }
  body.is-course-player .curriculum-search { padding-block:10px; }
}

/* Focus on the lesson. The curriculum folds away using its edge tab. */
body.is-course-player .player-layout { gap:44px; margin-top:16px; }
body.is-course-player .player-stage:not(.is-reading-stage) { max-height:none; aspect-ratio:16 / 9; }
body.is-course-player .curriculum-edge-toggle { position:fixed; z-index:242; top:calc(var(--player-header-height) + 34px); right:var(--curriculum-width); display:flex; align-items:center; gap:10px; width:44px; min-height:118px; padding:14px 9px; writing-mode:vertical-rl; border:1px solid #c4d6ea; border-right:0; border-radius:13px 0 0 13px; background:#eaf2fc; color:#245b97; font:inherit; font-size:12px; font-weight:600; cursor:pointer; box-shadow:-4px 3px 12px #1635530b; transition:right .2s ease,background .15s ease,color .15s ease; }
body.is-course-player .curriculum-edge-toggle svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; flex:0 0 18px; transition:transform .2s ease; }
body.is-course-player .curriculum-edge-toggle > span { display:inline-block; transform:rotate(180deg); }
body.is-course-player .curriculum-edge-toggle:hover { background:#245f9f; color:#fff; }
body.is-course-player .curriculum-edge-toggle:focus-visible { outline:3px solid #4884c3; outline-offset:-4px; }
body.is-course-player.is-curriculum-collapsed .curriculum-edge-toggle { right:0; }
body.is-course-player.is-curriculum-collapsed .curriculum-edge-toggle svg { transform:rotate(180deg); }
body.is-course-player .curriculum-head { grid-template-columns:minmax(0,1fr); }
body.is-course-player .curriculum-head .curriculum-toggle { display:none; }
@media (min-width:1101px) {
  body.is-course-player .player-layout .curriculum-panel { top:calc(var(--player-header-height) + 16px); height:calc(100dvh - var(--player-header-height) - 32px); }
}
body.is-course-player .player-lesson-bar { padding:19px 2px 17px; gap:16px; }
body.is-course-player .player-lesson-identity h1 { font-size:clamp(22px,1.85vw,29px); line-height:1.3; }
body.is-course-player .player-lesson-actions button { font-size:13px; }
body.is-course-player .content-tabs { border:0; border-bottom:1px solid #d5e1ee; border-radius:0; background:transparent; padding:0; gap:16px; min-height:56px; overflow:visible; }
body.is-course-player .content-tabs button { position:relative; min-height:54px; padding:14px 16px; border:0; border-radius:0; color:#536b84; font-size:14px; font-weight:500; background:transparent; transition:color .15s ease,background .15s ease; }
body.is-course-player .content-tabs button::after { content:""; position:absolute; bottom:-1px; left:14px; right:14px; height:3px; border-radius:3px 3px 0 0; background:#2467ab; transform:scaleX(0); transition:transform .18s ease; }
body.is-course-player .content-tabs button.active { background:transparent; color:#18558e; font-weight:600; }
body.is-course-player .content-tabs button.active::after { transform:scaleX(1); }
body.is-course-player .content-tabs button:hover { color:#18558e; background:#eaf2fa; }
body.is-course-player .content-tabs button svg { width:18px; height:18px; }
body.is-course-player .content-panel { padding:22px 0 40px; }
@media (max-width:1100px) {
  body.is-course-player .player-layout,body.is-course-player.is-curriculum-collapsed .player-layout { margin-top:16px; }
  body.is-course-player:not(.is-curriculum-collapsed) .curriculum-edge-toggle { display:none; }
  body.is-course-player .curriculum-head { grid-template-columns:minmax(0,1fr) auto; gap:12px; }
  body.is-course-player .curriculum-head .curriculum-toggle { display:inline-flex; align-items:center; gap:5px; width:auto; padding:10px; font-family:inherit; font-size:12px; font-weight:500; }
  body.is-course-player .curriculum-toggle span { display:inline; }
}
@media (max-width:680px) {
  body.is-course-player .player-layout,body.is-course-player.is-curriculum-collapsed .player-layout { margin-top:12px; }
  body.is-course-player .curriculum-edge-toggle { min-height:96px; top:calc(var(--player-header-height) + 22px); width:44px; font-size:11px; padding-inline:7px; }
  body.is-course-player .content-tabs { gap:0; }
  body.is-course-player .content-tabs button { font-size:12px; padding:12px 3px; gap:5px; flex-direction:column; min-height:65px; line-height:1.4; }
  body.is-course-player .content-tabs button svg { width:17px; height:17px; }
  body.is-course-player .content-tabs button::after { left:5px; right:5px; }
  body.is-course-player .player-lesson-bar { gap:12px; padding:17px 2px; }
  body.is-course-player .player-lesson-identity h1 { font-size:22px; }
  body.is-course-player .content-panel { padding-top:18px; }
  body.is-course-player .player-video-controls button { width:44px; height:44px; min-height:44px; padding:10px; }
  body.is-course-player .player-video-controls [data-video-speed],body.is-course-player .player-video-controls [data-video-fullscreen] { display:inline-flex; }
  body.is-course-player .player-video-controls .player-speed-button { width:44px; font-size:13px; font-weight:600; }
  body.is-course-player .player-controls-row,body.is-course-player .player-controls-left,body.is-course-player .player-controls-right { gap:4px; }
  body.is-course-player .player-time { display:inline !important; position:absolute; right:12px; top:0; font-size:11px; font-weight:400; }
}
@media (prefers-reduced-motion:reduce) {
  body.is-course-player :is(.curriculum-panel,.curriculum-edge-toggle,.curriculum-edge-toggle svg,.content-tabs button,.content-tabs button::after) { transition:none; }
}

body.is-course-player .content-tabs { position:sticky; top:var(--player-header-height); z-index:180; background:#f3f6fa; box-shadow:0 8px 12px -12px #163c67; scroll-margin-top:var(--player-header-height); }
body.is-course-player :is(.learning-shell,.learning-main,.player-view,.player-layout) { height:auto; overflow:visible; }
html:has(body.is-course-player),body.is-course-player { height:auto; overflow:visible; }
@media (max-width:1100px) {
  html:has(body.is-course-player:not(.is-curriculum-collapsed)),body.is-course-player:not(.is-curriculum-collapsed) { overflow:hidden; }
  body.is-course-player.is-lesson-tabs-pinned .curriculum-edge-toggle { display:none; }
}
body.is-course-player :is(.content-panel,.qa-card-v18,.review-card-v18,.qa-composer-v18,.review-editor-v18) { scroll-margin-top:calc(var(--player-header-height) + 82px); }
