:root {
  color-scheme: light;
  --ink: #203044;
  --muted: #596978;
  --line: #dbe2e8;
  --paper: #fff;
  --canvas: #f6f5f0;
  --blue: #1677bd;
  --blue-soft: #e7f3fb;
  --green: #387d65;
  --green-soft: #e5f2ec;
  --yellow: #f4c95d;
  --coral: #b9533f;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: var(--canvas); }
a { color: inherit; text-decoration: none; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }

/* 首页：直接继承WebApp 1.0的书库信息层级与视觉节奏。 */
.app-shell { min-height: 100vh; }
.library-page .site-filing-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: 20px;
  border-top: 1px solid var(--line);
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  text-align: center;
  font-size: .875rem;
  line-height: 1.6;
}
.library-page .site-filing-footer a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 4px; white-space: nowrap; }
.library-page .site-filing-footer img { display: block; flex: 0 0 auto; object-fit: contain; }
.library-page .site-filing-footer a:hover { text-decoration: underline; }
.library-page .site-filing-footer a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
.site-header {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 72px; padding: 10px max(24px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94); backdrop-filter: blur(14px);
}
.library-brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 8px; background: var(--ink); color: white; }
.brand-mark svg { width: 34px; height: 34px; overflow: visible; }
.brand-mark path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; }
.brand-mark text { fill: currentColor; font: 700 9px Georgia,"STKaiti",serif; }
.library-brand strong, .library-brand small { display: block; }
.library-brand strong { font-size: 20px; line-height: 1.2; font-weight: 720; }
.library-brand small { margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 700; }
.continue-band { border-bottom: 1px solid var(--line); background: var(--paper); }
.continue-inner { position: relative; display: grid; grid-template-columns: 190px minmax(0,1fr) 146px; align-items: center; gap: 34px; width: min(1180px, calc(100% - 48px)); min-height: 330px; margin: 0 auto; padding: 30px 0; }
.continue-cover { display: block; width: 190px; aspect-ratio: 929/1323; object-fit: cover; border: 1px solid #ccd5dd; border-radius: 6px; box-shadow: 0 18px 36px rgba(32,48,68,.16); }
.continue-copy { max-width: 620px; }
.eyebrow { margin: 0 0 8px; color: var(--coral); font-size: 13px; font-weight: 900; }
.continue-copy h1, .section-heading h2, .catalog-heading h2 { margin: 0; }
.continue-copy h1 { font: 700 clamp(30px,4vw,48px)/1.1 Georgia,"Times New Roman",serif; }
.book-name { margin: 9px 0 22px; color: var(--muted); font-size: 16px; font-weight: 800; }
.primary-action { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 148px; min-height: 48px; margin-top: 4px; padding: 0 22px; border-radius: 8px; background: var(--ink); color: white; font-size: 16px; font-weight: 900; }
.daily-target-wrap { display: flex; flex-direction: column; align-items: center; width: 146px; justify-self: end; }
.daily-target {
  --daily-progress: 0%;
  position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 146px; height: 146px; border-radius: 50%; color: var(--green);
  background: conic-gradient(var(--green) var(--daily-progress),var(--green-soft) 0);
}
.daily-target::before { content: ""; position: absolute; z-index: -1; inset: 12px; border-radius: 50%; background: white; }
.daily-target-label { color: var(--muted); font-size: 11px; line-height: 1.2; font-weight: 500; }
.daily-target strong { display: flex; align-items: baseline; gap: 3px; margin-top: 8px; font: 700 34px/1 Georgia,"Times New Roman",serif; }
.daily-target strong small { font: 500 11px/1 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; }
.daily-target-breakdown { margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.2; font-weight: 400; white-space: nowrap; }
.library-band { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 34px 0 72px; }
.section-heading, .catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { font-size: 20px; line-height: 1.2; font-weight: 720; }
.catalog-heading { min-height: 0; align-items: center; margin-bottom: 12px; }
.catalog-heading h2 { font-size: 20px; line-height: 1.2; font-weight: 720; }
.library-count { color: var(--muted); font-size: 12px; line-height: 1.4; font-weight: 400; }
.book-shelf { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.book-row { width: 100%; min-height: 160px; display: grid; grid-template-columns: 86px minmax(0,1fr); align-items: center; gap: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: white; text-align: left; }
.book-row.active { border-color: #9ecde9; box-shadow: inset 0 0 0 2px rgba(22,119,189,.08); }
.book-cover { display: block; width: 86px; aspect-ratio: 929/1323; object-fit: cover; border: 1px solid var(--line); border-radius: 5px; }
.book-info { display: block; min-width: 0; }
.book-info small { display: inline-block; margin-bottom: 5px; color: var(--green); font-size: 12px; font-weight: 900; }
.book-info strong { display: block; overflow: hidden; font-size: 22px; line-height: 1.25; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.book-info em { display: block; margin-top: 9px; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 400; }
.book-info .progress-key { color: var(--ink); font-weight: 400; }
.catalog-panel { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.unit-track-shell { position: relative; width: 100%; padding-bottom: 20px; isolation: isolate; }
.unit-track-shell::before,
.unit-track-shell::after { content: ""; position: absolute; z-index: 2; top: 0; bottom: 20px; width: 68px; pointer-events: none; opacity: 0; transition: opacity .18s ease; }
.unit-track-shell::before { left: 0; background: linear-gradient(90deg,var(--canvas) 8%,rgba(246,245,240,0)); }
.unit-track-shell::after { right: 0; background: linear-gradient(270deg,var(--canvas) 8%,rgba(246,245,240,0)); }
.unit-track-shell.can-scroll-left::before,
.unit-track-shell.can-scroll-right::after { opacity: 1; }
.unit-tabs { width: 100%; overflow-x: auto; display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 8px; padding: 4px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.unit-tabs button { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: white; font-weight: 500; }
.unit-tabs button { flex: 0 0 auto; scroll-snap-align: center; }
.unit-tabs button span { white-space: nowrap; }
.unit-tabs button small { margin-left: 7px; color: var(--muted); font-size: 11px; font-weight: 500; }
.unit-tabs button:disabled { cursor: default; opacity: .48; }
.unit-tabs button.active { border-color: #9ecde9; background: var(--blue-soft); color: #0e5b96; font-weight: 650; }
.unit-tabs button.active small { color: inherit; }
.unit-scroll-hint { position: absolute; right: 2px; bottom: 0; display: none; color: var(--muted); font-size: 12px; line-height: 1.4; font-weight: 400; }
.unit-scroll-hint.visible { display: block; }
.episode-tools { display: block; margin-top: 10px; }
.episode-search { display: grid; width: min(560px,100%); }
.episode-search input, .popover-search input { width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; background: white; outline: 0; }
.episode-search input, .popover-search input { font-size: 14px; font-weight: 400; }
.episodes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.episode-item { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; align-items: center; gap: 13px; min-height: 76px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.episode-item:hover { border-color: #9ecde9; background: #fbfdff; }
.episode-number { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 8px; background: #edf1f4; font: 700 14px Georgia,serif; }
.episode-copy { min-width: 0; }
.episode-copy strong, .episode-copy small { display: block; }
.episode-copy strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.episode-copy small { margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }
.episode-state { color: var(--blue); font-size: 12px; font-weight: 900; }
.catalog-empty { grid-column: 1 / -1; margin: 0; padding: 28px; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); text-align: center; }
.catalog-group { grid-column: 1 / -1; margin: 10px 0 -2px; color: var(--muted); font-size: 13px; font-weight: 850; }

/* 阅读页：布局、控件顺序与信息密度以WebApp 1.0为母版。 */
.reader-page { overflow: hidden; }
.reader-app { position: relative; height: 100vh; display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.reader-header { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 12px 24px; border-bottom: 1px solid rgba(32,48,68,.12); background: rgba(255,255,255,.92); backdrop-filter: blur(12px); }
.reader-brand { min-width: 180px; }
.reader-brand strong, .reader-brand small { display: block; }
.reader-brand strong { font-size: clamp(18px,1.8vw,24px); }
.reader-brand small { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.title-selectors { position: relative; display: grid; grid-template-columns: minmax(260px,390px) minmax(260px,390px) auto; align-items: center; gap: 12px; min-width: 0; }
.title-chip { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; min-width: 0; min-height: 44px; padding: 6px 8px 6px 12px; border: 1px solid rgba(32,48,68,.12); border-radius: 12px; background: rgba(255,255,255,.75); }
.title-chip span { color: #8a96a3; font-size: 12px; font-weight: 900; white-space: nowrap; }
.title-chip strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.book-toggle, .item-toggle { min-height: 38px; padding: 0 14px; border: 1px solid rgba(32,48,68,.12); border-radius: 9px; background: #eef4f8; font-weight: 900; }
.item-toggle { border-color: transparent; background: var(--ink); color: white; }
.mode-switch { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #f2f5f7; }
.mode-button { min-height: 36px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 900; }
.mode-button.active { background: white; color: var(--blue); box-shadow: 0 3px 9px rgba(32,48,68,.12); }
.selector-popover { position: absolute; top: calc(100% + 10px); z-index: 40; width: min(390px,calc(100vw - 32px)); max-height: min(620px,calc(100vh - 120px)); overflow: auto; padding: 12px; border: 1px solid rgba(32,48,68,.14); border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 20px 54px rgba(32,48,68,.18); backdrop-filter: blur(18px); }
.book-popover { left: 0; }
.item-popover { right: 0; }
.popover-search { position: sticky; top: 0; z-index: 2; display: grid; gap: 6px; padding-bottom: 10px; background: rgba(255,255,255,.96); }
.popover-search span { color: var(--muted); font-size: 12px; font-weight: 800; }
.popover-list { display: grid; gap: 8px; }
.popover-group { padding: 8px 4px 2px; color: var(--muted); font-size: 12px; font-weight: 900; }
.selector-card { width: 100%; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 58px; padding: 8px 10px; border: 1px solid rgba(32,48,68,.1); border-radius: 10px; background: white; text-align: left; }
.selector-card.active { border-color: var(--blue); background: var(--blue-soft); }
.selector-no { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 8px; background: #e8edf2; font-weight: 900; }
.selector-card strong, .selector-card small { display: block; }
.selector-card small, .selector-card em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 700; }
.reader-main { min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) auto; gap: 12px; padding: 16px 24px 18px; }
.reader-stage { min-height: 0; overflow: hidden; border: 1px solid rgba(32,48,68,.12); border-radius: 8px; background: white; }
.split-reader { width: 100%; height: 100%; display: grid; grid-template-columns: 1fr 1.1fr; gap: 18px; padding: 0; }
.split-panel { min-width: 0; min-height: 0; display: grid; place-items: center; border: 1px solid rgba(32,48,68,.1); background: white; }
.art-viewport { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; }
.page-image { display: block; max-width: 100%; max-height: calc(100vh - 250px); object-fit: contain; background: white; }
.split-page-image { max-width: calc(100% - 36px); max-height: calc(100% - 36px); border-radius: 3px; box-shadow: 0 18px 40px rgba(33,42,54,.14); }
.text-panel { display: flex; flex-direction: column; align-items: stretch; justify-content: center; padding: clamp(22px,4vw,52px); }
.page-meta { margin-bottom: 14px; color: var(--muted); font-size: 12px; font-weight: 800; }
.story-text { max-height: 100%; overflow: auto; color: #26313e; font: 400 clamp(22px,2.25vw,34px)/1.56 Georgia,"Times New Roman",serif; }
.story-segment { display: inline; margin: 0; padding: 1px 2px; border: 0; border-radius: 4px; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.story-segment:hover { background: var(--blue-soft); }
.story-segment.active { background: #fff1ad; }
.cover-copy { text-align: center; font-size: clamp(30px,4vw,54px); line-height: 1.25; }
.full-page-reader { width: 100%; height: 100%; display: grid; place-items: center; padding: 14px; }
.page-wrap { position: relative; display: inline-block; max-width: 100%; max-height: 100%; line-height: 0; }
.full-page-reader .page-image { max-height: calc(100vh - 250px); border-radius: 4px; box-shadow: 0 18px 40px rgba(33,42,54,.18); }
.highlight-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; mix-blend-mode: multiply; }
.page-highlight { position: absolute; border-radius: 5px; background: rgba(255,224,54,.54); box-shadow: 0 0 0 2px rgba(255,205,64,.22); }
.vocab-tips { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 8px 12px; border: 1px solid rgba(32,48,68,.1); border-radius: 8px; background: rgba(255,255,255,.86); }
.vocab-title { color: #536477; font-size: 13px; font-weight: 900; white-space: nowrap; }
.words { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.word-chip { border: 0; border-radius: 999px; padding: 7px 13px; background: #e9f4ff; color: #1a5c94; font-size: 14px; font-weight: 900; }
.poem-card { width: min(590px,92%); padding: clamp(24px,4vh,48px) clamp(22px,4vw,52px); border: 12px solid #f4eedb; border-radius: 16px; background: #fffefa; box-shadow: 0 14px 36px rgba(59,72,62,.13); text-align: center; }
.poem-position { color: var(--muted); font-size: 12px; font-weight: 900; }
.poem-card h1 { margin: 15px 0 7px; font: 700 clamp(34px,3.6vw,52px) "STKaiti","KaiTi",serif; }
.poem-credits { margin: 0 0 24px; color: #66746c; font: clamp(18px,1.8vw,24px) "STKaiti","KaiTi",serif; }
.poem-lines { display: grid; gap: 5px; }
.poem-line { width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; font: clamp(23px,2.4vw,35px)/1.46 "STKaiti","KaiTi",serif; }
.poem-line.active { background: #ffe49a; }
.next-poem { width: 100%; text-align: center; font-family: "STKaiti","KaiTi",serif; }
.next-poem small { color: var(--muted); font: 900 12px sans-serif; }
.next-poem h2 { margin: 14px 0 5px; font-size: clamp(28px,3vw,44px); }
.next-poem p { margin: 5px 0; color: var(--muted); font-size: 20px; }
.next-poem-copy { white-space: pre-line; font-size: clamp(21px,2.1vw,31px); line-height: 1.7; }
.content-poetry .page-meta { text-align: center; }
.content-poetry .story-text { width: 100%; }
.player-bar { display: grid; grid-template-columns: auto minmax(220px,1fr); align-items: center; gap: 14px; min-height: 104px; padding: 12px 24px 8px; border-top: 1px solid rgba(32,48,68,.12); background: rgba(255,255,255,.92); }
.control-group { display: inline-flex; align-items: center; gap: 8px; }
.control { min-width: 42px; min-height: 42px; padding: 0 13px; border: 0; border-radius: 9px; background: var(--ink); color: white; font-weight: 900; }
.control.secondary { background: transparent; color: var(--ink); font-size: 20px; }
.control.ghost { background: transparent; color: var(--ink); }
.control.primary-play { width: 50px; height: 50px; border-radius: 50%; padding: 0; box-shadow: 0 8px 18px rgba(32,48,68,.18); }
.progress-stack { min-width: 0; }
.progress { display: grid; grid-template-columns: 48px minmax(0,1fr) 48px; align-items: center; gap: 10px; }
.progress span { color: #657482; font-size: 13px; font-weight: 900; text-align: center; }
.progress input { width: 100%; accent-color: #2f8fdf; }
.timeline { overflow-x: auto; display: flex; gap: 6px; padding: 8px 2px 2px; scrollbar-width: thin; }
.timeline button { flex: 0 0 auto; min-width: 72px; min-height: 42px; display: grid; grid-template-columns: 1fr; place-items: center; gap: 1px; padding: 4px 9px; border: 1px solid transparent; border-radius: 8px; background: transparent; font-size: 12px; font-weight: 900; }
.timeline button small { color: var(--muted); font-size: 10px; }
.timeline button.active { border-color: var(--blue); background: var(--blue-soft); color: #0e5b96; }
.player-notice { position: fixed; left: 50%; bottom: 118px; z-index: 50; transform: translateX(-50%); padding: 10px 16px; border-radius: 9px; background: var(--ink); color: white; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
audio { display: none; }

:where(a,button,input,[tabindex]):focus-visible { outline: 3px solid rgba(22,119,189,.62); outline-offset: 3px; }
.episode-search input:focus-visible,.popover-search input:focus-visible { border-color: var(--blue); outline: 0; box-shadow: 0 0 0 3px rgba(22,119,189,.16); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 920px) {
  .book-shelf, .episodes { grid-template-columns: 1fr; }
  .reader-header { align-items: flex-start; flex-wrap: wrap; }
  .reader-brand { min-width: 0; }
  .title-selectors { order: 3; width: 100%; grid-template-columns: 1fr 1fr auto; }
  .reader-main { padding: 12px 14px; }
}

@media (max-width: 720px) {
  .continue-inner { grid-template-columns: 116px minmax(0,1fr) 112px; gap: 20px; width: min(100% - 30px,1180px); min-height: auto; }
  .continue-cover { width: 116px; }
  .daily-target-wrap { width: 112px; }
  .daily-target { width: 112px; height: 112px; }
  .daily-target::before { inset: 9px; }
  .daily-target-label { font-size: 9px; }
  .daily-target strong { margin-top: 5px; font-size: 26px; }
  .daily-target-breakdown { margin-top: 6px; font-size: 9px; }
  .library-band { width: min(100% - 30px,1180px); }
  .book-row { grid-template-columns: 68px minmax(0,1fr) auto; gap: 13px; padding: 13px; }
  .book-cover { width: 68px; }
  .unit-tabs { justify-content: flex-start; }
  .reader-page { overflow: auto; }
  .reader-app { min-height: 100vh; height: auto; grid-template-rows: auto minmax(0,1fr) auto; }
  .reader-header { padding: 10px 14px; }
  .reader-brand small { display: none; }
  .title-selectors { grid-template-columns: 1fr auto; }
  .title-chip:first-of-type { display: none; }
  .title-chip { min-height: 40px; }
  .selector-popover { position: fixed; top: 72px; left: 14px; right: 14px; width: auto; }
  .reader-main { min-height: 68vh; }
  .split-reader { grid-template-columns: 1fr; grid-template-rows: minmax(38vh,1fr) auto; gap: 8px; }
  .illustration-panel { min-height: 38vh; }
  .text-panel { min-height: 250px; padding: 20px; }
  .story-text { font-size: clamp(21px,5.5vw,29px); }
  .content-poetry .split-reader { grid-template-rows: auto auto; }
  .poem-card { width: min(94%,560px); margin: 10px 0; border-width: 8px; }
  .player-bar { position: sticky; bottom: 0; grid-template-columns: 1fr; gap: 5px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .control-group { justify-content: center; }
  .vocab-tips { display: none; }
}

@media (max-width: 480px) {
  .site-header { padding: 9px 15px; }
  .continue-inner { grid-template-columns: 88px 1fr; padding: 22px 0; }
  .continue-cover { width: 88px; }
  .daily-target-wrap { grid-column: 1 / -1; width: auto; justify-self: center; }
  .daily-target { width: 96px; height: 96px; }
  .daily-target::before { inset: 8px; }
  .daily-target-label { font-size: 8px; }
  .daily-target strong { margin-top: 4px; font-size: 22px; }
  .daily-target strong small { font-size: 9px; }
  .daily-target-breakdown { margin-top: 5px; font-size: 9px; }
  .continue-copy h1 { font-size: 27px; }
  .book-name { margin-bottom: 14px; font-size: 13px; }
  .primary-action { min-height: 44px; margin-top: 15px; }
  .book-row { grid-template-columns: 58px minmax(0,1fr); }
  .book-cover { width: 58px; }
  .book-action { display: none; }
  .episode-tools { width: 100%; }
  .episode-item { grid-template-columns: 44px minmax(0,1fr); }
  .episode-number { width: 44px; height: 44px; }
  .episode-state { display: none; }
  .title-selectors { width: 100%; }
  .title-chip strong { font-size: 13px; }
  .mode-button { padding: 0 9px; }
  .timeline button { min-width: 58px; }
}

/* UIUE-110 phone library hierarchy: the product brand remains the strongest
   label; section, book and metadata sizes step down calmly instead of jumping
   between oversized headings and tiny bold captions. */
@media (max-width: 480px) {
  .library-brand { gap: 9px; }
  .brand-mark { width: 40px; height: 40px; }
  .library-brand strong { font-size: 20px; line-height: 1.2; font-weight: 720; }
  .library-brand small { margin-top: 3px; font-size: 12px; line-height: 1.35; font-weight: 500; }
  .continue-inner { gap: 15px; padding: 18px 0; }
  .continue-copy h1 { font-size: 24px; }
  .book-name { font-size: 13px; font-weight: 550; }
  .primary-action { min-width: 136px; font-size: 15px; font-weight: 720; }

  .library-band { padding-top: 26px; }
  .section-heading { margin-bottom: 14px; }
  .section-heading h2 { font-size: 20px; line-height: 1.2; font-weight: 720; }
  .library-count { font-size: 12px; line-height: 1.4; font-weight: 400; }
  .book-shelf { gap: 10px; }
  .book-row { min-height: 112px; gap: 12px; padding: 12px; }
  .book-info small { margin-bottom: 4px; font-size: 12px; font-weight: 650; }
  .book-info strong { font-size: 18px; line-height: 1.3; font-weight: 650; }
  .book-info em { margin-top: 6px; font-size: 12px; line-height: 1.45; font-weight: 400; }
  .book-info .progress-key { font-weight: 400; }

  .catalog-panel { margin-top: 26px; padding-top: 22px; }
  .catalog-heading h2 { font-size: 20px; line-height: 1.2; font-weight: 720; }
  .catalog-group { font-weight: 550; }
  .episode-copy small { font-weight: 400; }
  .unit-tabs button { font-size: 14px; font-weight: 500; }
  .unit-tabs button.active { font-weight: 650; }
}
