/* Approved reading-library presentation. Course content and playback stay in their existing modules. */
:root {
  --coral: #e7755b;
  --navy: #243653;
  --ink: #243653;
  --muted: #667387;
  --line: #e4e8ee;
  --paper: #fff;
}
body { background: #f5f7fa; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 3px solid #3876b6;
  outline-offset: 3px;
}
.app-shell.library-home, .app-shell.library-reader { width: min(1400px, calc(100% - 64px)); padding-top: 0; }
.topbar { min-height: 76px; padding: 12px 0; background: #f5f7fa; backdrop-filter: none; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 0; background: transparent; color: var(--navy); border-radius: 8px; font-size: 21px; white-space: nowrap; }
.library-icon { width: 22px; height: 22px; flex: 0 0 auto; vertical-align: middle; }
.brand .library-icon { width: 30px; height: 30px; color: #d75e45; }
.nav { align-items: center; gap: 10px; }
.nav > button, .nav-menu > summary { min-height: 44px; padding: 0 10px; font-weight: 600; background: transparent; border: 0; border-radius: 6px; box-shadow: none; }
.nav > .nav-current { color: #b7442e; box-shadow: inset 0 -2px #e7755b; }
.nav-course-menu > summary { margin: 0; color: #b7442e; }
.library-bottom-nav { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0,0,0,0); overflow: hidden; white-space: nowrap; border: 0; }

.library-home .home-shell { grid-template-columns: 188px minmax(0, 1fr); gap: 32px; margin-top: 24px; }
.library-home .home-sidebar { top: 96px; padding: 0 18px 20px 0; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; gap: 18px; }
.library-home .sidebar-brand { padding: 0 10px 14px; border: 0; }
.library-home .sidebar-brand strong { font-size: 16px; color: var(--navy); }
.library-home .sidebar-brand span { font-weight: 400; font-size: 12px; margin-top: 5px; }
.library-home .sidebar-brand small, .library-home .sidebar-product-meta { display: none; }
.library-home .sidebar-nav { gap: 4px; }
.library-home .sidebar-product { padding: 11px 10px; border: 0; border-radius: 8px; background: transparent; gap: 4px; }
.library-home .sidebar-product-name { font-size: 14px; font-weight: 600; }
.library-home .sidebar-product.is-current { background: #fff0eb; box-shadow: inset 3px 0 #e7755b; }
.library-home .sidebar-product.is-current .sidebar-product-name { color: #ac402e; }
.library-home .sidebar-product .course-access-badge { background: transparent; padding: 0; font-size: 11px; font-weight: 400; }
.library-home .sidebar-product.is-owned .course-access-badge { color: #38765b; }
.library-home .sidebar-tools { border-top: 1px solid var(--line); padding-top: 12px; }
.library-home .sidebar-tool { min-height: 44px; padding: 8px; border: 0; background: transparent; font-size: 13px; font-weight: 500; }
.library-home .sidebar-upsell-link { background: transparent; border: 0; padding: 10px; box-shadow: none; }
.library-home .home-main { min-width: 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.library-home .continue-card { display: grid; grid-template-columns: 150px minmax(0,1fr) auto; align-items: center; gap: 24px; padding: 16px; margin: 0 0 30px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 3px 10px #24365305; }
.library-home .continue-card img { display: block; width: 150px; height: 125px; object-fit: cover; object-position: top; border-radius: 10px; }
.library-home .continue-card:not(.has-cover) { grid-template-columns: minmax(0,1fr) auto; }
.library-home .continue-card > div { display: grid; gap: 9px; min-width: 0; }
.library-home .continue-card span { font-size: 13px; color: #667387; font-weight: 500; }
.library-home .continue-card strong { font-size: clamp(20px, 2.3vw, 28px); line-height: 1.3; color: var(--navy); }
.library-home .continue-card small { font-size: 12px; font-weight: 400; }
.library-home .continue-card button { display: inline-flex; justify-content: center; align-items: center; gap: 12px; border: 0; border-radius: 10px; min-height: 46px; padding: 10px 22px; margin: 0; background: #c9533b; color: #fff; font-size: 15px; font-weight: 650; }
.library-home .my-courses-panel { border: 0; padding: 0; margin: 0 0 32px; background: transparent; }
.library-home .my-courses-heading { align-items: center; gap: 12px; margin-bottom: 14px; }
.library-home .my-courses-heading h2 { margin: 0; font-size: 20px; }
.library-home .my-courses-heading > span { color: var(--muted); font-size: 13px; }
.library-text-action { margin-left: auto; border: 0; background: transparent; color: #b7442e; min-height: 40px; padding: 4px; font-size: 13px; }
.library-home .my-courses-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 0; overflow: visible; }
.library-home .my-courses-list:not(.is-expanded) > :nth-child(n+5) { display: none; }
.library-home .my-courses-list .owned-course-card { position: relative; display: flex; align-items: center; gap: 18px; padding: 0; overflow: hidden; text-align: left; border: 1px solid var(--line); border-radius: 14px; color: var(--navy); background: #fff; box-shadow: 0 2px 7px #24365304; }
.library-home .my-courses-list button[aria-pressed="true"] { border-color: #d3ded9; background: #fff; color: var(--navy); }
.owned-course-card img, .owned-course-card > .course-cover-placeholder { width: 100px; height: 125px; object-fit: cover; object-position: top; flex: 0 0 auto; }
.owned-course-copy { display: grid; gap: 10px; min-width: 0; padding: 14px 0; }
.owned-course-copy strong { font-size: 18px; line-height: 1.4; }
.owned-course-copy > span { color: var(--muted); font-size: 12px; font-weight: 400; }
.owned-course-copy .course-access-badge, .discovery-course .course-access-badge.is-owned { background: #eaf4ee; color: #286344; font-weight: 600; }
.owned-course-arrow { margin-left: auto; padding-right: 16px; color: #7c8796; font-size: 23px; }
.course-cover-placeholder { display: grid; place-items: center; background: #edf1f5; color: #8799af; }
.course-cover-placeholder .library-icon { width: 40px; height: 40px; }
.library-catalog { scroll-margin-top: 95px; }
.library-home .home-main-header { margin-bottom: 16px; padding-bottom: 0; border: 0; align-items: center; }
.library-home .home-main-header h2 { font-size: 25px; margin: 0; }
.library-home .home-main-header p { color: var(--muted); font-size: 13px; font-weight: 400; margin: 7px 0 0; }
.library-home .home-status { font-size: 12px; border-radius: 6px; background: transparent; padding: 5px 0; font-weight: 500; }
.library-catalog-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.library-home .cefr-filter-row { margin: 0; gap: 4px; }
.library-home .cefr-filter-button { border: 0; min-height: 38px; padding: 5px 10px; border-radius: 7px; background: transparent; font-size: 13px; font-weight: 500; }
.library-home .cefr-filter-button.is-active { background: #243653; color: #fff; }
.library-search { display: flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 0 8px; min-width: 0; }
.library-search label { color: #748299; }
.library-search input { min-width: 0; width: 150px; border: 0; padding: 10px 2px; font-size: 13px; background: transparent; }
.library-search button { border: 0; color: #445c79; background: transparent; font-size: 12px; padding: 6px 3px; min-height: 42px; }
.library-home .lesson-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.library-home .lesson-tile { position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 2px 7px #24365304; }
.library-home .lesson-tile > img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; object-position: top; border-radius: 0; }
.library-home .lesson-tile > div { display: flex; flex-direction: column; flex: 1; padding: 14px; }
.library-home .lesson-tile p { font-size: 12px; font-weight: 400; color: var(--muted); margin: 0 0 8px; }
.library-home .lesson-tile h4 { font-size: 17px; font-weight: 650; line-height: 1.4; margin: 0 0 10px; }
.library-home .lesson-tile button { align-self: flex-start; margin-top: auto; min-height: 32px; padding: 0; border: 0; background: transparent; color: #426250; border-radius: 0; font-size: 12px; font-weight: 600; }
.library-home .lesson-tile button::after { content: ""; position: absolute; inset: 0; }
.library-home .lesson-tile:focus-within { outline: 3px solid #3876b6; outline-offset: 3px; }
.library-home .lesson-tile.is-locked { opacity: 1; }
.library-home .lesson-tile.is-locked button { color: #966041; }
.library-home .cefr-level-badge { padding: 0; border: 0; background: transparent; font-size: inherit; color: inherit; }
.library-home .preview-pill { border-radius: 4px; font-size: 10px; color: #286344; background: #eaf4ee; }
.library-home .load-more { margin: 20px auto; border-color: var(--line); background: #fff; color: #44566e; font-size: 14px; border-radius: 9px; }
.library-empty { padding: 30px; border: 1px dashed var(--line); border-radius: 12px; font-size: 14px; line-height: 1.7; }
.library-home .recent-updates { margin: 32px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.library-home .recent-updates-header h3 { font-size: 17px; }
.library-home .recent-updates-header p { font-size: 12px; font-weight: 400; }
.library-home .recent-update-card { background: #fff; border-color: var(--line); }
.library-home .reading-level-entry { margin: 26px 0 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; align-items: center; }
.library-home .reading-level-entry span { display: none; }
.library-home .reading-level-entry strong { font-size: 15px; }
.library-home .reading-level-entry p { font-size: 12px; font-weight: 400; margin: 4px 0 0; }
.library-home .reading-level-entry button { flex: 0 0 auto; background: transparent; color: #b7442e; border: 0; font-size: 13px; }
.library-footer-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; padding: 20px 0; }
.library-footer-links button, .library-footer-links a { font-size: 12px; color: #607289; border: 0; background: transparent; text-decoration: none; padding: 10px 0; }
.library-discovery header { margin-bottom: 26px; }
.library-discovery h1 { margin: 8px 0 12px; font-size: 30px; }
.library-discovery header p { font-size: 14px; color: var(--muted); }
.discovery-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.discovery-course { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; padding: 0; background: #fff; text-align: left; }
.discovery-course > img, .discovery-course > .course-cover-placeholder { width: 100%; height: 180px; object-fit: cover; object-position: top; }
.discovery-course > span:not(.course-cover-placeholder) { display: grid; gap: 9px; padding: 16px; }
.discovery-course strong { font-size: 17px; }
.discovery-course small { color: var(--muted); }

.library-reader .study-shell { margin-top: 22px; }
.library-reader .lesson-hero { padding: 0 0 22px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.library-reader .reader-title { gap: 14px; }
.library-reader .reader-title h1 { font-size: clamp(26px,3vw,36px); letter-spacing: -.025em; line-height: 1.2; margin: 8px 0 0; }
.library-reader .reader-title p { color: #597065; font-size: 13px; font-weight: 400; }
.library-reader .lesson-actions button { border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #44566e; min-height: 42px; font-size: 13px; font-weight: 500; }
.library-reader .study-layout { grid-template-columns: minmax(0,1.25fr) minmax(330px,.8fr); gap: 36px; padding: 24px 0 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; align-items: start; }
.library-reader .reader-surface { padding: 0; background: transparent; border: 0; box-shadow: none; min-width: 0; }
.library-reader .course-page-switch { border-bottom: 1px solid var(--line); gap: 24px; margin-bottom: 20px; }
.library-reader .course-page-switch button { min-height: 44px; padding: 0 10px 12px; border: 0; border-radius: 0; background: transparent; font-weight: 600; }
.library-reader .course-page-switch button.is-active { color: #b7442e; box-shadow: inset 0 -3px #e7755b; }
.library-reader .hero-image-frame { border: 0; border-radius: 14px; background: #fff; padding: 0; }
.library-reader .lesson-image { border-radius: 0; box-shadow: none; }
.library-reader .reading-text { font-size: 22px; line-height: 1.85; font-weight: 450; letter-spacing: 0; padding: 20px 0; }
.library-reader .full-translation { border: 0; padding: 0; }
.library-reader .full-translation-toggle { border: 0; background: transparent; color: #b7442e; padding: 0; font-size: 15px; width: auto; font-weight: 600; }
.library-reader .side-section { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: #fff; box-shadow: none; }
.library-reader .player-kicker, .library-reader .player-label { display: none; }
.library-reader .player-shell { gap: 20px; margin: 0; }
.library-audio-dock { position: relative; display: grid; gap: 10px; }
.library-reader .player-main { grid-template-columns: 56px minmax(0,1fr) auto; gap: 12px; }
.library-reader .player-play { width: 56px; height: 56px; background: #c9533b; box-shadow: none; }
.library-reader .player-title { font-size: 19px; font-weight: 650; }
.library-reader .player-caption { font-size: 12px; margin-top: 4px; }
.library-reader .player-jump { grid-column: auto; min-height: 44px; border-radius: 8px; padding: 4px 8px; box-shadow: none; color: #53647b; background: #f5f7fa; font-size: 11px; }
.library-reader .player-progress { padding: 0; min-height: 28px; background: transparent; box-shadow: none; font-weight: 400; }
.library-reader .player-progress input { min-height: 28px; }
.library-reader .player-status { font-size: 12px; color: #667387; font-weight: 400; }
.player-options { border-top: 1px solid var(--line); padding-top: 8px; }
.player-options summary { cursor: pointer; font-size: 12px; color: #44566e; padding: 6px 0; min-height: 36px; list-style: none; width: fit-content; }
.player-options summary::-webkit-details-marker { display: none; }
.player-options summary > span:last-child { display: inline-block; margin-left: 6px; }
.player-options[open] summary > span:last-child { transform: rotate(180deg); }
.library-reader .player-tools { padding: 12px 0 4px; gap: 8px; }
.library-reader .speed-chip, .library-reader .loop-chip { min-height: 40px; border-radius: 8px; font-size: 12px; font-weight: 500; box-shadow: none; background: #f1f4f8; color: #44566e; }
.library-reader .speed-chip.active, .library-reader .loop-chip.active { background: #243653; color: #fff; }
.library-reader .audio-download-panel { padding: 0; border: 0; }
.library-reader [data-audio-download] { position: absolute; top: 0; right: 0; font-size: 12px; background: transparent; color: #52667f; }
.library-reader .audio-download-panel [hidden] { display: none; }
.library-reader .audio-download-status { font-size: 12px; padding: 8px; border-radius: 8px; background: #f3f6f9; margin: 0; }
.library-reader .library-audio-dock.has-download .player-main { padding-top: 36px; }
.library-reader .sentence-panel { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; padding: 20px 0 0; }
.library-reader .sentence-panel-title { font-size: 18px; font-weight: 650; }
.library-reader .sentence-chip { background: #f7f9fb; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; line-height: 1.65; font-weight: 450; }
.library-reader .sentence-chip.is-looping { background: #243653; color: #fff; }
.library-reader .sentence-chip-index { font-size: 12px; border-radius: 6px; }
.library-reader .words-card h2 { font-size: 22px; margin-top: 0; }
.library-reader .words-card { max-height: none; overflow: visible; min-width: 0; }
.library-reader .sidebar-word-list { overflow: visible; padding-right: 0; }
.library-reader .sidebar-word-row { grid-template-columns: minmax(0, 1fr); overflow-wrap: anywhere; }
.library-reader .sidebar-word-top { align-items: center; }
.library-reader .sidebar-word-row > .recap-chip { justify-self: start; }
.library-reader .sidebar-word-top strong { font-size: 22px; }
.library-reader .mini-recap { border: 0; border-radius: 10px; background: #edf2f6; padding: 14px; }
.library-reader .recap-chip { border-radius: 6px; font-weight: 500; }

@media (min-width: 1300px) {
  .library-home .lesson-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 1100px) and (min-width: 821px) {
  .app-shell.library-home, .app-shell.library-reader { width: calc(100% - 32px); }
  .brand { font-size: 17px; }
  .nav { gap: 0; font-size: 13px; }
  .library-home .home-shell { grid-template-columns: 160px minmax(0,1fr); gap: 20px; }
  .library-home .continue-card { grid-template-columns: 110px minmax(0,1fr); gap: 14px; }
  .library-home .continue-card img { width: 110px; height: 140px; grid-row: span 2; }
  .library-home .continue-card button { grid-column: 2; justify-self: start; }
  .owned-course-card img { width: 75px; }
  .owned-course-copy strong { font-size: 15px; }
  .owned-course-arrow { display: none; }
  .library-reader .study-layout { gap: 20px; grid-template-columns: minmax(0,1fr) minmax(310px,.8fr); }
}
@media (max-width: 820px) {
  .app-shell.library-home, .app-shell.library-reader { width: calc(100% - 32px); padding-top: 0; }
  .has-library-nav { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  .topbar { min-height: 64px; padding: 8px 0; gap: 8px; background: #f5f7fa; }
  .brand { font-size: 19px; gap: 8px; }
  .brand .library-icon { width: 26px; height: 26px; }
  .mobile-menu-toggle { min-height: 44px; border: 0; background: transparent; font-size: 14px; color: #44566e; }
  .nav.is-mobile-open { background: #fff; border-radius: 10px; padding: 12px; border: 1px solid var(--line); max-height: 65vh; overflow: auto; }
  .library-bottom-nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; padding: 6px max(10px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
  .library-bottom-nav button { display: grid; justify-items: center; align-content: center; gap: 5px; min-height: 54px; padding: 5px; color: #667387; border: 0; background: transparent; font-size: 11px; }
  .library-bottom-nav .is-current { color: #b7442e; font-weight: 650; }
  .has-library-nav .toast { z-index: 45; bottom: calc(82px + env(safe-area-inset-bottom)); }
  .library-reader .toast { z-index: 45; bottom: calc(var(--audio-dock-height, 205px) + 12px); }
  .library-home .home-shell { display: block; margin-top: 18px; }
  .library-home .home-sidebar { display: none; }
  .library-home .home-main > .access-entry-panel { display: flex; flex-direction: column; padding: 18px; margin-bottom: 24px; }
  .library-home .access-entry-actions { width: 100%; }
  .library-home .continue-card { grid-template-columns: 92px minmax(0,1fr); gap: 8px 14px; padding: 12px; margin-bottom: 26px; }
  .library-home .continue-card img { width: 92px; height: 146px; grid-row: span 2; object-fit: cover; }
  .library-home .continue-card > div { gap: 6px; }
  .library-home .continue-card span { font-size: 11px; }
  .library-home .continue-card strong { font-size: 18px; line-height: 1.35; }
  .library-home .continue-card small { font-size: 10px; line-height: 1.5; }
  .library-home .continue-card button { grid-column: 2; width: 100%; padding: 8px 10px; font-size: 13px; min-height: 42px; justify-content: space-between; }
  .library-home .continue-card:not(.has-cover) { grid-template-columns: minmax(0,1fr); }
  .library-home .continue-card:not(.has-cover) button { grid-column: 1; }
  .library-home .my-courses-heading { gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
  .library-home .my-courses-heading h2 { font-size: 18px; }
  .library-home .my-courses-heading > span { font-size: 11px; }
  .library-text-action { font-size: 12px; }
  .library-home .my-courses-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .library-home .my-courses-list:not(.is-expanded) > :nth-child(n+3) { display: none; }
  .library-home .my-courses-list.is-expanded > :nth-child(n) { display: flex; }
  .library-home .my-courses-list .owned-course-card { flex-direction: column; align-items: stretch; gap: 0; border-radius: 12px; }
  .owned-course-card img, .owned-course-card > .course-cover-placeholder { width: 100%; height: 130px; }
  .owned-course-copy { gap: 7px; padding: 12px; }
  .owned-course-copy strong { font-size: 16px; }
  .owned-course-copy > span { font-size: 11px; }
  .owned-course-arrow { display: none; }
  .library-home .home-main-header { display: flex; gap: 12px; align-items: flex-start; }
  .library-home .home-main-header h2 { font-size: 22px; }
  .library-home .home-main-header p { font-size: 12px; }
  .library-home .home-status { white-space: normal; text-align: right; width: auto; max-width: 120px; font-size: 11px; }
  .library-catalog { scroll-margin-top: 80px; }
  .library-catalog-tools { gap: 12px; }
  .library-home .cefr-filter-row { flex-wrap: wrap; gap: 2px; width: 100%; }
  .library-home .cefr-filter-button { font-size: 12px; padding: 5px 9px; }
  .library-search { width: 100%; }
  .library-search input { flex: 1; width: 0; font-size: 16px; }
  .library-home .lesson-grid { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .library-home .lesson-tile { display: grid; grid-template-columns: 94px minmax(0,1fr); gap: 0; }
  .library-home .lesson-tile > img { width: 94px; height: 100%; min-height: 120px; aspect-ratio: auto; object-fit: cover; }
  .library-home .lesson-tile > div { padding: 12px; }
  .library-home .lesson-tile h4 { font-size: 16px; margin-bottom: 6px; }
  .library-home .lesson-tile p { font-size: 11px; margin-bottom: 7px; }
  .library-home .reading-level-entry { display: flex; gap: 14px; }
  .library-home .reading-level-entry p { display: none; }
  .library-home .reading-level-entry strong { font-size: 14px; line-height: 1.5; }
  .library-home .reading-level-entry button { width: auto; padding: 5px; }
  .library-footer-links { gap: 14px; }
  .library-discovery h1 { font-size: 26px; line-height: 1.4; }
  .discovery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .discovery-course > img, .discovery-course > .course-cover-placeholder { height: 150px; }
  .discovery-course > span:not(.course-cover-placeholder) { padding: 12px; }
  .discovery-course strong { font-size: 15px; }
  .discovery-course .course-access-badge { font-size: 10px; padding: 4px; }

  .app-shell.library-reader { padding-bottom: calc(var(--audio-dock-height, 205px) + 28px); }
  .library-reader .study-shell { margin-top: 18px; }
  .library-reader .lesson-hero { display: flex; flex-direction: column; gap: 12px; padding: 0 0 18px; }
  .library-reader .reader-title { display: flex; width: 100%; gap: 10px; padding-right: 0; }
  .library-reader .reader-title > button { position: static; flex: 0 0 32px; align-self: flex-start; width: 32px; height: 40px; margin: 0; background: transparent; color: #243653; }
  .library-reader .reader-title p { font-size: 11px; line-height: 1.5; }
  .library-reader .reader-title h1 { font-size: 27px; line-height: 1.23; }
  .library-reader .lesson-actions { position: static; display: flex; justify-content: flex-end; gap: 8px; width: 100%; }
  .library-reader .lesson-actions button { min-height: 36px; margin: 0; padding: 6px 10px; font-size: 12px; }
  .library-reader .study-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 24px; padding-top: 16px; }
  .library-reader .hero-image-frame { aspect-ratio: 3/4; }
  .library-reader .reading-text { font-size: 20px; line-height: 1.85; padding: 20px 0 12px; }
  .library-reader .side-section { padding: 16px; }
  .library-reader .player-card { background: transparent; padding: 0; border: 0; }
  .library-reader .sentence-panel { padding: 0; border: 0; }
  .library-reader .library-audio-dock { position: fixed; z-index: 25; bottom: 0; left: 0; right: 0; max-height: 65vh; overflow-y: auto; padding: 12px 18px calc(10px + env(safe-area-inset-bottom)); background: #fff; border: 1px solid #e1e6ed; border-bottom: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -3px 16px #2436530b; gap: 5px; }
  .library-reader .library-audio-dock .player-main, .library-reader .library-audio-dock.has-download .player-main { grid-template-columns: 50px minmax(0,1fr) 64px; gap: 10px; padding-top: 0; }
  .library-reader .player-play { width: 50px; height: 50px; }
  .library-reader .player-title { font-size: 16px; line-height: 1.4; }
  .library-reader .player-caption { display: none; }
  .library-reader .player-jump { grid-column: auto; min-height: 44px; font-size: 0; padding: 3px; }
  .library-reader .player-jump::after { content: "↶ 10秒"; font-size: 12px; }
  .library-reader .player-progress { font-size: 11px; gap: 8px; }
  .library-reader .player-status { font-size: 11px; line-height: 1.4; }
  .library-reader .player-options { padding-top: 3px; }
  .library-reader .player-options summary { min-height: 36px; padding: 9px 0; }
  .library-reader [data-audio-download] { top: auto; bottom: calc(10px + env(safe-area-inset-bottom)); right: 16px; min-height: 36px; padding: 4px; font-size: 12px; }
  .library-reader .audio-download-panel.has-download-status { padding-bottom: 36px; }
  .library-reader .audio-download-status { margin-top: 4px; }
  .library-reader .player-options[open] .player-tools { padding-bottom: 36px; }
  .library-reader .library-audio-dock.is-unavailable { position: static; border: 1px solid var(--line); box-shadow: none; }
  .library-reader .library-audio-dock.is-unavailable .player-play { display: none; }
}
@media (max-width: 360px) {
  .app-shell.library-home, .app-shell.library-reader { width: calc(100% - 24px); }
  .brand { font-size: 17px; }
  .library-home .continue-card { grid-template-columns: 76px minmax(0,1fr); gap: 8px 10px; }
  .library-home .continue-card img { width: 76px; }
  .library-home .continue-card strong { font-size: 16px; }
  .library-home .my-courses-heading > span { display: none; }
  .owned-course-copy { padding: 10px; }
  .owned-course-copy strong { font-size: 14px; }
  .library-reader .library-audio-dock { padding-inline: 12px; }
  .library-reader .player-title { font-size: 14px; }
}
@media (max-height: 500px) and (max-width: 820px) {
  .library-reader .library-audio-dock { max-height: 48vh; }
  .library-reader .player-status { display: none; }
  .library-reader .player-play { width: 40px; height: 40px; }
}
@media print {
  .library-bottom-nav, .library-audio-dock, .topbar { display: none !important; }
  .app-shell.library-reader, .has-library-nav { padding-bottom: 0; }
}
