:root {
  color-scheme: dark;
  --background: #070b14;
  --surface: #101624;
  --text: #f0f2fc;
  --muted: #b3bed4;
  --accent: #d9b882;
  --line: #30394f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { position: relative; isolation: isolate; margin: 0; background: radial-gradient(ellipse at 85% 12%, #30234370, transparent 35%), radial-gradient(ellipse at 10% 35%, #15395a55, transparent 35%), radial-gradient(ellipse at 80% 60%, #51301a20, transparent 40%), var(--background); color: var(--text); line-height: 1.6; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .42; background-image: radial-gradient(1px 1px at 24px 45px, #d5e4ff 98%, transparent), radial-gradient(1px 1px at 104px 112px, #b9c8e0 98%, transparent), radial-gradient(1px 1px at 180px 25px, #dac9b5 98%, transparent); background-size: 239px 197px, 373px 311px, 457px 389px; }
a { color: inherit; }
button, select { font: inherit; }
a:focus-visible, button:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid #c5d2ff; outline-offset: 5px; }
.shell { width: min(100% - 2.5rem, 1240px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; z-index: 10; top: .75rem; left: 1rem; transform: translateY(-180%); background: #e0e7ff; color: #080c17; padding: .8rem 1rem; border-radius: .4rem; }
.skip-link:focus { transform: translateY(0); }
.site-header { border-bottom: 1px solid var(--line); background: #080c17e8; }
.header-inner { width: min(100% - 2.5rem, 1240px); margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 1rem; padding-block: 1rem; }
.language-control { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .65rem; margin-inline-start: auto; }
.language-control label { font-size: .8rem; color: var(--muted); }
.language-control select { min-height: 44px; padding: .5rem 1.9rem .5rem .8rem; border: 1px solid #53617c; border-radius: .5rem; background: #141b2e; color: var(--text); cursor: pointer; }
.language-control select:disabled { cursor: default; opacity: .65; }
.hero { position: relative; display: grid; gap: 1rem; padding-block: 3rem 1.5rem; }
.hero::before { content: ""; position: absolute; inset: 5% -1rem; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 80% 60%, #bf80331a, transparent 50%), radial-gradient(ellipse at 35% 20%, #7374c315, transparent 55%); }
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.eyebrow { display: flex; align-items: center; gap: .6rem; color: var(--accent); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; }
.light-dot { width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: #e0bc85; box-shadow: 0 0 12px #d2a55e; }
h1 { margin: 1.1rem 0 1.5rem; font-size: clamp(2.5rem, 6.4vw, 5rem); font-weight: 500; line-height: 1.08; letter-spacing: -.05em; }
.title-accent { color: #dfc09a; }
.hero-description { color: var(--muted); max-width: 470px; margin: 0 0 1.7rem; font-size: 1rem; }
.library-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 48px; padding: .7rem 1.1rem; border: 1px solid #a48a65; border-radius: .5rem; background: #292336; text-decoration: none; font-size: .9rem; }
.library-link:hover { background: #393045; }
.library-link span:last-child { font-size: 1.3rem; }
.hero-visual { display: grid; place-items: center; justify-self: center; width: 100%; min-width: 0; padding-block: 1.5rem; }
.hero-logo { display: block; width: min(100%, 280px); max-width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; border-radius: .4rem; box-shadow: 0 12px 40px #0005; }
.continue-section { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1.5rem; background: linear-gradient(105deg, #141d31, #191828); border: 1px solid var(--line); border-radius: .8rem; }
.continue-symbol { display: flex; align-items: center; justify-content: center; gap: 4px; width: 48px; height: 48px; flex-shrink: 0; border: 1px solid #475375; border-radius: 50%; }
.continue-symbol span { width: 2px; height: 12px; background: #aab9e8; }
.continue-symbol span:nth-child(2), .continue-symbol span:nth-child(4) { height: 22px; }
.continue-symbol span:nth-child(3) { height: 30px; }
.continue-copy { flex: 1 1 220px; min-width: 0; }
.continue-copy h2 { margin: 0 0 .3rem; font-size: 1rem; font-weight: 600; }
.continue-copy p { margin: 0; color: var(--muted); font-size: .85rem; max-width: 660px; }
.status-label { border: 1px solid #505376; background: #23233d; color: #d0c9ef; border-radius: 2rem; padding: .35rem .8rem; font-size: .75rem; }
.notice { padding: 1rem; border: 1px solid var(--line); color: var(--muted); }
.library { padding-block: 3.5rem 2rem; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1.5rem; }
.section-heading .eyebrow { margin: 0 0 .5rem; }
.section-heading h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.3rem); font-weight: 500; letter-spacing: -.03em; }
.collection-count { margin: 0 0 .2rem; color: var(--muted); font-size: .85rem; }
.library-description { margin: .8rem 0 1.8rem; color: var(--muted); font-size: .9rem; }
.book-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.book-card { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: .6rem; box-shadow: 0 12px 30px #0003; }
.cover { position: relative; aspect-ratio: 2 / 3; overflow: hidden; background: #0b0e16; border-bottom: 1px solid var(--line); }
.cover img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.book-details { padding: 1.3rem 1.4rem 0; }
.book-language { margin: 0 0 .55rem; color: #d9b882; font-size: .75rem; }
.book-details h3 { margin: 0 0 1.2rem; font-size: 1.15rem; font-weight: 600; line-height: 1.4; }
.book-meta { margin: 0; font-size: .8rem; }
.book-meta > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .5rem; margin-bottom: .5rem; }
.book-meta dt { color: var(--muted); }
.book-meta dd { margin: 0; color: var(--text); }
.playback-status { display: flex; gap: .5rem; align-items: center; margin: 1.3rem 0 0; padding-block: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.playback-status span:first-child { color: #d9b882; }
.catalog-note { max-width: 810px; color: var(--muted); font-size: .8rem; margin-top: 1.5rem; }
.private-use-notice { margin-block: 1rem 2rem; padding: clamp(1rem, 3vw, 1.75rem); border: 1px solid var(--line); border-radius: .6rem; background: linear-gradient(110deg, #101624, #191828); }
.private-use-notice h2 { display: flex; align-items: center; gap: .65rem; margin: 0 0 .9rem; color: var(--accent); font-size: .95rem; font-weight: 500; }
.security-icon { width: 22px; height: 22px; flex-shrink: 0; }
.private-use-copy { max-width: 85ch; color: var(--muted); font-size: .875rem; line-height: 1.7; overflow-wrap: break-word; }
.private-use-copy p { margin: 0 0 .65rem; }
.private-use-copy p:last-child { margin-bottom: 0; }
@media (forced-colors: active) { .private-use-notice { border-color: CanvasText; } .private-use-notice h2 { color: CanvasText; } }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; padding-block: 1.5rem 2rem; margin-top: 1.5rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.site-footer span { color: #d0d9ef; letter-spacing: .03em; }
.site-footer p { margin: 0; }
@media (min-width: 640px) {
  .shell, .header-inner { width: min(100% - 4rem, 1240px); }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-card { display: flex; flex-direction: column; }
  .book-details { display: flex; flex: 1; flex-direction: column; }
  .playback-status { margin-top: auto; }
  .book-meta { margin-bottom: 1.2rem; }
  .hero { padding-block: 4rem 2rem; }
  .hero-logo { width: min(100%, 320px); }
}
@media (min-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; min-height: 480px; gap: 2rem; padding-block: 3.5rem; }
  .hero-logo { width: min(100%, 340px); }
}
@media (min-width: 1100px) { .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (forced-colors: active) {
  body::before { display: none; }
  .book-card, .continue-section, .cover, .library-link, .status-label, .hero-logo { border: 1px solid CanvasText; }
  .title-accent { color: CanvasText; }
}

/* Real playback is restricted to the local synthetic fixture. */
[hidden] { display: none !important; }
.preview-button, .back-button { display: inline-flex; align-items: center; justify-content: space-between; gap: .8rem; min-height: 48px; padding: .75rem 1rem; border: 1px solid #a48a65; border-radius: .4rem; background: #292336; color: var(--text); cursor: pointer; text-align: left; font-size: .85rem; }
.preview-button { width: 100%; margin-block: .25rem 1.3rem; }
.preview-button:hover:not(:disabled), .back-button:hover { background: #393045; }
.preview-button:disabled { color: var(--muted); border-color: var(--line); background: var(--surface); cursor: default; }
.player-view { padding-block: 2rem 3rem; }
.back-button { justify-content: flex-start; margin-bottom: 2rem; }
.player-layout { display: grid; gap: 2rem; max-width: 1120px; margin-inline: auto; }
.player-artwork { width: min(100%, 280px); justify-self: center; align-self: start; }
.player-artwork img { display: block; width: 100%; height: auto; object-fit: contain; border: 1px solid var(--line); border-radius: .5rem; box-shadow: 0 18px 45px #0006; }
.player-panel { min-width: 0; }
.player-panel h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); line-height: 1.2; margin-block: .75rem 1.4rem; overflow-wrap: break-word; }
.player-meta { display: flex; flex-wrap: wrap; gap: 1rem 2rem; margin-bottom: 1.5rem; font-size: .85rem; }
.player-meta dt { color: var(--muted); }
.player-meta dd { margin: .2rem 0 0; }
.player-notice { padding: 1.2rem; border: 1px solid var(--line); border-radius: .6rem; background: #151b2c; }
.player-notice p { margin: .8rem 0 0; font-size: .85rem; color: var(--muted); }
.player-progress { margin-block: 1.75rem; }
.control-label { font-size: .85rem; color: var(--muted); margin-bottom: .75rem; }
.progress-track { height: 7px; border-radius: 1rem; background: #293247; border: 1px solid #46516b; }
.progress-track { position: relative; }
.progress-fill { width: 0; height: 100%; background: var(--accent); border-radius: inherit; }
.progress-label { display: block; }
.progress-seek { position: absolute; top: 50%; left: 0; transform: translateY(-50%); width: 100%; height: 44px; margin: 0; appearance: none; background: transparent; cursor: pointer; }
.progress-seek:disabled { cursor: default; }
.progress-seek:focus-visible { outline: 3px solid #c5d2ff; outline-offset: 2px; border-radius: .4rem; }
.progress-seek::-webkit-slider-runnable-track { height: 7px; background: transparent; }
.progress-seek::-moz-range-track { height: 7px; background: transparent; }
.progress-seek::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; margin-top: -2.5px; border-radius: 50%; border: 1px solid var(--accent); background: var(--accent); }
.progress-seek::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--accent); background: var(--accent); }
.progress-seek:disabled::-webkit-slider-thumb { opacity: 0; }
.progress-seek:disabled::-moz-range-thumb { opacity: 0; }
.transport-button:not(:disabled) { cursor: pointer; }
.transport-button:hover:not(:disabled) { background: #292336; }
#audio-status { color: var(--text); }
@media (forced-colors: active) { .progress-fill { background: Highlight; } }
.player-times { display: flex; justify-content: space-between; gap: 1rem; margin-block: .75rem .5rem; font-size: .8rem; }
.player-times > div:last-child { text-align: right; }
.player-times dt { color: var(--muted); }
.player-times dd { margin: 0; font-variant-numeric: tabular-nums; }
.control-note { margin: .5rem 0 0; color: var(--muted); font-size: .8rem; }
.playback-controls { border: 0; padding: 0; margin: 0 0 1.75rem; min-width: 0; }
.playback-controls legend { padding: 0; margin-bottom: .75rem; color: var(--muted); font-size: .85rem; }
.transport-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.transport-button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; min-height: 80px; min-width: 0; padding: .7rem .4rem; border: 1px solid #3b455d; border-radius: .5rem; background: #151b2a; color: var(--muted); cursor: default; }
.transport-button > span:first-child { font-size: 1.35rem; line-height: 1.2; }
.transport-button > span:last-child { font-size: .72rem; line-height: 1.4; overflow-wrap: break-word; }
.primary-transport { border-color: #8c7757; color: #d5bc94; background: #252231; }
.speed-control { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1rem; font-size: .85rem; color: var(--muted); }
.speed-control select { min-height: 44px; padding: .5rem .75rem; border: 1px solid #46516b; border-radius: .4rem; background: #151b2a; color: var(--muted); opacity: 1; }
.chapter-panel { padding: 1.2rem; border: 1px solid var(--line); border-radius: .6rem; background: #101624; }
.chapter-panel h2 { margin: 0 0 .7rem; font-size: 1.1rem; font-weight: 500; }
.chapter-panel p { color: var(--muted); font-size: .85rem; margin: 0; }
.chapter-panel button { min-height: 44px; max-width: 100%; margin-block: .4rem; padding: .5rem .75rem; white-space: normal; overflow-wrap: anywhere; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: .4rem; cursor: pointer; }
.chapter-panel button[aria-current=true] { border-color: var(--accent); }
.chapter-panel ol { padding-left: 1.4rem; }
@media (min-width: 760px) {
  .player-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); gap: 2rem; }
  .player-artwork { width: 100%; max-width: 340px; }
}
@media (min-width: 1100px) {
  .player-layout { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 3rem; }
  .transport-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (forced-colors: active) {
  .preview-button, .back-button, .transport-button, .player-notice, .chapter-panel, .progress-track { border: 1px solid CanvasText; }
}
