.player{position:relative;background:#163f47;border-radius:20px;overflow:hidden;margin:24px 0;color:#fff;direction:ltr}.player video{display:block;width:100%;margin:0;border-radius:0;max-height:80vh}.player-tools{display:flex;align-items:center;justify-content:center;gap:8px;padding:12px;flex-wrap:nowrap;direction:rtl}.player-tools button,.player-tools select{font:inherit;font-size:14px;background:#27545a;color:#fff;border:1px solid #8ab0ad;border-radius:8px;padding:8px;cursor:pointer}.player-tools label{display:flex;align-items:center;gap:6px;font-size:14px}.player :focus-visible{outline:3px solid #e6b64d;outline-offset:2px}#player-chapters{max-height: min(300px,40vh);overflow:auto;padding:12px;direction:rtl;background:#163f47;border:0;border-radius:0;box-shadow:none}#player-chapters[hidden]{display:none}#player-chapters button{display:block;width:100%;text-align:right;background:transparent;border:0;border-bottom:1px solid #527578;color:white;font:inherit;font-size:15px;padding:12px;cursor:pointer}#player-chapters button[aria-current="true"]{background:#315f61;color:#ffe1a0}.seek-feedback{position:absolute;top:35%;left:50%;transform:translateX(-50%);border-radius:40px;padding:12px 24px;background:#102f39cc;color:white;pointer-events:none;opacity:0}.seek-feedback.visible{opacity:1}.player:fullscreen{display:flex;flex-direction:column;justify-content:center;background:#10252b;border-radius:0}.player:fullscreen video{max-height:calc(100vh - 80px);min-height:0;object-fit:contain}.player:fullscreen #player-chapters{position:absolute;right:0;top:0;bottom:80px;width:min(85%,420px);max-height:none;background:#163f47f5}article{scroll-margin-top:20px}
.player{position:sticky;top:0;z-index:10;max-width:1050px;margin:0 auto 20px;box-shadow:0 8px 25px #163f4720}.player video{max-height:48vh;object-fit:contain}.lesson-layout{display:block!important;max-width:1050px;margin:auto}.lesson-layout>aside{display:none}.reader article[hidden]{display:none}.reader-nav{display:flex;align-items:center;gap:8px;justify-content:space-between;padding:14px 0}.reader-nav button,.reader-nav select{font:inherit;font-size:15px;padding:12px 8px;border:1px solid #c6d6cc;border-radius:10px;background:#fffdf8;color:#163f47}.reader-nav select{min-width:0;max-width:60%;flex:1}.reader-nav button:disabled{opacity:.4}.reader article{margin-top:5px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#reading-status{font-size:14px;color:#60746d;padding:5px}.reader{min-width:0}@media(max-width:650px){.player{border-radius:0;margin-left:0;margin-right:0}.player-tools{padding:6px;gap:5px}.player-tools button,.player-tools select{font-size:12px;padding:6px}.reader-nav button,.reader-nav select{font-size:13px}.reader article{padding:20px!important}.reader article p{font-size:18px!important;line-height:1.9!important}.reader article h2{font-size:25px!important}}
.reader-nav{position:sticky;top:var(--player-height,280px);z-index:9;background:#fcf5e8;box-shadow:0 5px 12px #163f4708}.reader-nav select{background:#fffdf8}

@media(max-width:650px){.player-tools{display:grid;grid-template-columns:1fr 1fr 1.1fr 1.65fr 38px;gap:5px;padding:8px}.player-tools>*,.player-tools label{min-width:0;width:100%;box-sizing:border-box}.player-tools button,.player-tools select{height:40px;padding:4px;font-size:12px;white-space:nowrap}.player-tools select{width:100%}.reader-nav{display:grid;grid-template-columns:1fr 1fr;gap:8px}.reader-nav select{grid-row:1;grid-column:1/-1;width:100%;max-width:100%;font-size:15px}.reader-nav #previous-section{grid-row:2;grid-column:1}.reader-nav #next-section{grid-row:2;grid-column:2}}
.reader article p+p{margin-top:1em}
/* Compact reading controls; indexes are temporary dialogs, not page sections. */
.reader-nav{display:flex!important;gap:10px;padding:5px 0;min-height:44px}.reader-nav>button{padding:5px 10px;font-size:14px;height:38px;white-space:nowrap}.reader-arrows{display:flex;gap:6px;margin-inline-start:auto}.reader-arrows button{height:38px;width:44px;font-size:22px;padding:0;border-radius:8px}.reader-nav #reading-status{padding:0;font-size:13px;white-space:nowrap}.player-tools{padding-top:5px;padding-bottom:5px}.player-tools button,.player-tools select{height:36px}
#video-index,#text-index{padding:0;border:1px solid #ccd9cf;border-radius:20px;box-shadow:0 20px 80px #0004;background:#fcf5e8;color:#163f47;width:min(620px,calc(100vw - 24px));max-height:75dvh;direction:rtl;box-sizing:border-box}dialog::backdrop{background:#102d36aa}.index-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border-bottom:1px solid #d8dfd2}.index-header h2{font-size:19px!important;margin:0!important}.index-header p{font-size:13px!important;line-height:1.6;margin:5px 0 0!important}.index-header button{width:38px;height:38px;flex-shrink:0;padding:0;font-size:25px;background:#e8eee5;color:#163f47;border:0;border-radius:50%;cursor:pointer}#player-chapters,#text-chapters{max-height:55dvh;overflow:auto;padding:6px 12px;background:#fcf5e8;border:0;border-radius:0;box-shadow:none;margin:0}#player-chapters button,#text-chapters button{display:block;box-sizing:border-box;width:100%;padding:12px 8px;border:0;border-bottom:1px solid #d8dfd2;background:transparent;color:#163f47;text-align:right;font:inherit;font-size:15px;cursor:pointer}#player-chapters button[aria-current="true"],#text-chapters button[aria-current="true"]{background:#e2eddf;color:#163f47;border-radius:8px;font-weight:700}.player:fullscreen #player-chapters{position:static;width:auto;max-height:55dvh;background:#fcf5e8}@media(max-width:650px){#video-index,#text-index{margin:auto auto 12px}.reader-nav{padding:4px 0}.reader-nav>button{font-size:13px}.reader-arrows button{height:36px;width:40px}.player-tools{grid-template-columns:.85fr .85fr .9fr 1.8fr 34px;gap:4px}.player-tools button,.player-tools select{font-size:11px;height:34px}.reader article{margin-top:8px}}
