/* Dynasty Studios download site. One dark, cinematic theme matching the posters:
   ink #0e0d0c, cream #ece5d8, gold #bca782; Libre Baskerville for titles, DM Sans for text. */
:root {
  --bg: #0e0d0c;
  --panel: #161412;
  --line: #2c2823;
  --text: #ece5d8;
  --muted: #a59d8f;
  --gold: #bca782;
  --gold-hi: #d8c49c;
  --serif: 'Libre Baskerville', Baskerville, Georgia, serif;
  --sans: 'DM Sans', 'Avenir Next', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1180px;
  --pad: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
a { color: var(--gold-hi); }
a:hover { color: var(--text); }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--gold); color: var(--bg); padding: 8px 12px; }

/* header */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--pad); background: rgba(14, 13, 12, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(188, 167, 130, .14); }
.mark { color: var(--gold); text-decoration: none; font: 500 12px/1 var(--sans); letter-spacing: .42em; white-space: nowrap; }
.top nav { display: flex; gap: clamp(14px, 3vw, 30px); }
.top nav a { color: var(--muted); text-decoration: none; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.top nav a:hover { color: var(--text); }

/* type */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: .04em; margin: 0; }
h2 { font-size: clamp(26px, 3.2vw, 36px); }
.kicker { font: 500 12px/1.4 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.credit { font: 500 12px/1.4 var(--sans); letter-spacing: .3em; color: var(--muted); margin: 14px 0 0; }
.tagline { font: italic 400 clamp(17px, 2vw, 21px)/1.5 var(--serif); color: var(--text); opacity: .86; margin: 18px auto 0; max-width: 46rem; }
.lede { color: var(--muted); margin: 10px 0 28px; max-width: 44rem; }

/* buttons */
.btn { display: inline-block; padding: 12px 20px; border: 1px solid var(--gold); color: var(--gold); text-decoration: none;
  font: 500 12px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; transition: background .2s, color .2s; }
.btn:hover { background: var(--gold); color: var(--bg); }
.btn.ghost { border-color: var(--line); color: var(--text); padding: 10px 16px; }
.btn.ghost:hover { border-color: var(--gold); background: transparent; color: var(--gold); }

/* home hero: one slide per title, stacked in one grid cell. Without JavaScript only the first slide shows;
   site.js adds .is-live (rotation, crossfades, title picker, sound toggle). */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.hero { position: relative; display: grid; overflow: hidden; background: var(--bg); }
.hero .slide { grid-area: 1 / 1; position: relative; min-height: min(88vh, 900px); display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
  background-color: var(--bg); background-position: var(--focus, 50% 50%); background-size: cover; background-repeat: no-repeat; }
.hero video.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
/* The veil is darkest where the words sit (the lower half) so the small gold lines keep 4.5:1 over the brighter
   loops (EDEN's river, WHITE CHIP's city lights, THE FINISH LINE's sky); a soft scrim behind the words and a dark
   halo round the gold lines do the rest. */
.hero .veil { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14, 13, 12, .96) 0%, rgba(14, 13, 12, .82) 24%,
  rgba(14, 13, 12, .62) 42%, rgba(14, 13, 12, .36) 62%, rgba(14, 13, 12, .22) 78%, rgba(14, 13, 12, .42) 100%); }
.hero-copy { position: relative; isolation: isolate; text-align: center; padding: 0 var(--pad) clamp(48px, 9vh, 96px); }
.hero-copy::before { content: ''; position: absolute; z-index: -1; left: 50%; top: -22%; width: min(1180px, 140%); height: 132%; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(14, 13, 12, .6), rgba(14, 13, 12, .46) 55%, rgba(14, 13, 12, 0)); pointer-events: none; }
.hero .kicker { color: var(--gold-hi); }  /* the lightest gold: the 12 px line sits highest, over the brightest picture */
.hero .kicker, .hero .sub { text-shadow: 0 0 2px rgba(14, 13, 12, .9), 0 0 10px rgba(14, 13, 12, .8), 0 0 24px rgba(14, 13, 12, .6); }
.hero .tagline, .hero .hero-title { text-shadow: 0 0 18px rgba(14, 13, 12, .55); }
.hero .hero-title { font-size: clamp(44px, 9vw, 112px); letter-spacing: .06em; line-height: 1; }
.hero .hero-title.long { font-size: clamp(40px, 7.2vw, 96px); }
.hero .sub { font: 500 13px/1 var(--sans); letter-spacing: .5em; text-transform: uppercase; color: var(--gold); margin: 18px 0 0; }
.hero .sub.long { line-height: 1.7; margin-top: 13px; text-wrap: balance; }
.hero .tagline { margin-bottom: 28px; }

/* rotation: the new slide fades in over the old one, which stays put underneath until it is covered;
   the old title fades out first and the new one fades in after it, so the two never overlap */
.hero.is-live .slide { opacity: 0; visibility: hidden; transition: opacity 1s ease, visibility 0s linear 1s; }
.hero.is-live .slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity 1s ease; }
.hero.is-live .slide.is-leaving { opacity: 1; visibility: visible; transition: none; }
.hero.is-live { touch-action: pan-y pinch-zoom; }  /* sideways swipes change the title; the page still scrolls */
.hero.is-live .hero-copy { padding-bottom: max(clamp(48px, 9vh, 96px), 88px); transition: opacity .6s ease .4s; }
.hero.is-live .slide:not(.is-active) .hero-copy { opacity: 0; transition: opacity .35s ease; }

/* controls: Pause/Play, title picker (with a progress line to the next title) and sound toggle; every target 44 px */
.hero-ui { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 0 var(--pad) clamp(10px, 2vh, 20px); }
.hero-ui button { -webkit-appearance: none; appearance: none; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent; }
.hero-ui button:focus-visible, .hero .btn:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 4px; }
.hero-nav { grid-column: 2; display: flex; align-items: center; gap: 10px; min-width: 0; }
.picks { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 26px); }
.hero-ui .pick { position: relative; display: grid; align-content: center; gap: 8px; min-height: 44px; padding: 8px 0 6px; color: rgba(236, 229, 216, .62); font: 500 11px/1 var(--sans);
  letter-spacing: .26em; text-transform: uppercase; white-space: nowrap; transition: color .3s; }
.hero-ui .pick:hover { color: var(--text); }
.hero-ui .pick[aria-selected="true"] { color: var(--gold); }
.pick .name { margin-right: -.26em; }
.pick .bar { position: relative; display: block; height: 1px; overflow: hidden; background: rgba(236, 229, 216, .45); }
.pick[aria-selected="true"] .bar { height: 2px; background: rgba(188, 167, 130, .55); }
.pick .fill { position: absolute; inset: 0; background: var(--gold-hi); transform: scaleX(0); transform-origin: left center; }
.hero.is-still .pick[aria-selected="true"] .fill { transform: none; }
.hero-ui .arrow { display: grid; place-items: center; width: 44px; height: 44px; color: rgba(236, 229, 216, .7); transition: color .2s; }
.hero-ui .arrow:hover { color: var(--gold-hi); }
.hero-ui .playpause { grid-column: 1; justify-self: start; display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid rgba(188, 167, 130, .42); background: rgba(14, 13, 12, .38); color: var(--text); transition: border-color .2s, color .2s; }
.hero-ui .playpause:hover { border-color: var(--gold); color: var(--gold-hi); }
.playpause .i-play, .playpause.is-paused .i-pause { display: none; }
.playpause.is-paused .i-play { display: inline; }
.hero.is-still .playpause { visibility: hidden; }  /* reduced motion: nothing moves, so nothing to pause */
.hero-ui .sound { grid-column: 3; justify-self: end; margin-left: auto; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 11px;
  border: 1px solid rgba(188, 167, 130, .42); background: rgba(14, 13, 12, .38); color: var(--text); font: 500 11px/1 var(--sans);
  letter-spacing: .26em; text-transform: uppercase; white-space: nowrap; transition: border-color .2s, color .2s, background-color .2s; }
.hero-ui .sound:hover { border-color: var(--gold); color: var(--gold-hi); }
.hero-ui .sound[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: rgba(14, 13, 12, .55); }
.sound .ico { flex: none; width: 18px; height: 18px; }
.sound .sound-label { margin-right: -.26em; }
.sound .waves, .sound[aria-pressed="true"] .mute { display: none; }
.sound[aria-pressed="true"] .waves { display: inline; }
.sound.is-loading .waves, .sound.is-pending .waves { animation: hero-wait .9s ease-in-out infinite alternate; }
@keyframes hero-wait { from { opacity: .2; } }
@media (max-width: 1099px) {
  .hero-ui { display: flex; justify-content: space-between; }
  .hero-ui .arrow { display: none; }
}
@media (max-width: 819px) {  /* the titles become a row of short progress lines; each keeps its name for screen readers */
  .picks { gap: 0; }
  .hero-ui .pick { width: 40px; height: 44px; padding: 0 7px; gap: 0; }
  .pick .name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .pick .bar { height: 2px; }
  .pick[aria-selected="true"] .bar { height: 4px; }
}
@media (max-width: 559px) {  /* phones: Pause and Sound show as icons; the button keeps the word "Sound" as its name */
  .hero-ui { gap: 8px; }
  .hero-ui .sound { width: 44px; padding: 0; justify-content: center; }
  .sound .sound-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 359px) {
  .hero-ui .pick { width: 36px; padding: 0 6px; }
}
@media (prefers-reduced-motion: reduce) {  /* posters only, no autoplay, no crossfades */
  .hero video.bg { display: none; }
  .hero.is-live .slide, .hero.is-live .slide.is-active, .hero.is-live .hero-copy, .hero.is-live .slide:not(.is-active) .hero-copy { transition: none; }
  .sound.is-loading .waves, .sound.is-pending .waves { animation: none; opacity: .5; }
}

/* home sections */
.films, .read { max-width: var(--wrap); margin: 0 auto; padding: clamp(56px, 8vw, 96px) var(--pad) 0; }
.read { padding-bottom: clamp(56px, 8vw, 96px); }
.cards { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 860px) { .cards { grid-template-columns: 1fr 1fr; } .cards .card:first-child:nth-last-child(2n+1) { grid-column: 1 / -1; } }  /* a lead card only when it evens the rows */
.card { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; background: var(--panel); text-decoration: none; color: var(--text); border: 1px solid var(--line); }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover img { transform: scale(1.03); }
.card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14, 13, 12, .9) 0%, rgba(14, 13, 12, .2) 46%, rgba(14, 13, 12, 0) 70%); }
.card-copy { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: clamp(16px, 2.4vw, 28px); display: grid; gap: 4px; }
.card-copy .kicker { margin: 0; }
.card-title { font: 400 clamp(24px, 3.4vw, 40px)/1.1 var(--serif); letter-spacing: .05em; }
.card-credit { color: var(--muted); font-size: 14px; }
.card-has { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-hi); margin-top: 6px; }
.books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
@media (min-width: 640px) { .books { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .books { grid-template-columns: repeat(6, minmax(0, 1fr)); } }  /* six books: 2, 3 or 6 to a row, never an orphan */
.book { display: grid; gap: 4px; align-content: start; color: var(--text); }
.book-cover img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border: 1px solid var(--line); transition: border-color .2s; }
.book-cover img.contain { object-fit: contain; background: var(--panel); padding: 10% 0; }
.book-cover:hover img { border-color: var(--gold); }
.book-title { font: 400 18px/1.3 var(--serif); letter-spacing: .05em; margin-top: 8px; color: var(--text); text-decoration: none; }
.book-title:hover { color: var(--gold-hi); }
.book-what { color: var(--muted); font-size: 14px; }
.book-dl { font-size: 13px; letter-spacing: .06em; color: var(--muted); }
.book-dl a { color: var(--gold-hi); text-underline-offset: 3px; }

/* film page */
.film-hero { text-align: center; padding: clamp(48px, 8vw, 96px) var(--pad) 28px; }
.film-hero h1 { font-size: clamp(42px, 7.5vw, 96px); letter-spacing: .06em; line-height: 1.05; }
.player { margin: 0 auto; padding: 0 var(--pad); }
.player.wide { max-width: var(--wrap); }
.player.tall { max-width: 460px; }
.player video, .player img { width: 100%; background: #000; border: 1px solid var(--line); }
.about { max-width: 44rem; margin: 0 auto; padding: 40px var(--pad) 8px; text-align: center; }
.about p { font: 400 clamp(17px, 1.9vw, 20px)/1.75 var(--serif); margin: 0 0 14px; }
.about .cta { margin-top: 26px; }
.parts, .shorts, .posters, .downloads { max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 7vw, 80px) var(--pad) 0; }
.downloads { padding-bottom: clamp(56px, 8vw, 96px); }
.parts h2, .shorts h2, .posters h2, .downloads h2 { margin-bottom: 24px; }
.grid3 { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 860px) { .grid3 { grid-template-columns: repeat(3, 1fr); } }
.part video { width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); margin-bottom: 14px; }
.part h3 { font-size: 21px; margin-bottom: 8px; }
.part p { color: var(--muted); margin: 0; }
.part .kicker { margin: 0 0 6px; }
.row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.row figure { margin: 0; width: min(100%, 420px); }
.row figure.tall { width: min(100%, 250px); }
.row video { width: 100%; background: #000; border: 1px solid var(--line); }
.row figcaption { color: var(--muted); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-top: 8px; }
.pgrid { display: grid; gap: 16px; align-items: start; margin-bottom: 16px; }
.pgrid.wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.pgrid.tall { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pf img { width: 100%; border: 1px solid var(--line); transition: border-color .2s; }
.pf:hover img { border-color: var(--gold); }
.dl { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.dl li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.dl-label { font-weight: 500; }
.dl-spec { color: var(--muted); font-size: 13px; grid-column: 1; }
.dl .btn { grid-column: 2; grid-row: 1 / span 2; }
.fine { color: var(--muted); font-size: 14px; margin-top: 18px; }

/* reader */
.reader { max-width: 40rem; margin: 0 auto; padding: clamp(48px, 8vw, 96px) var(--pad); }
.reader header { text-align: center; margin-bottom: 40px; }
.reader h1 { font-size: clamp(36px, 6vw, 64px); letter-spacing: .06em; }
.reader h2 { font: 500 13px/1.6 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); text-align: center; margin: 40px 0 26px; }
.reader p { font: 400 clamp(17px, 1.8vw, 19px)/1.85 var(--serif); margin: 0 0 1.1em; }
.reader .note { font: 400 14px/1.5 var(--sans); color: var(--muted); margin-top: 18px; }
.reader .break { border: 0; text-align: center; margin: 2em 0; }
.reader .break::before { content: '·  ·  ·'; color: var(--gold); letter-spacing: .4em; }
.reader-end { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 24px; text-align: center; }
.reader-end p { font: 400 14px/1.6 var(--sans); color: var(--muted); }
.terms h2 { text-align: left; margin-top: 32px; }
.reader { overflow-wrap: break-word; }
.reader .kicker { font: 500 12px/1.4 var(--sans); margin: 0 0 12px; }
.reader .kicker a { color: inherit; text-decoration: none; }
.reader .credit { font: 500 12px/1.4 var(--sans); margin: 14px 0 0; }
.reader .tagline { font: italic 400 clamp(17px, 2vw, 21px)/1.5 var(--serif); margin: 18px auto 0; }

/* books: contents and chapter pages */
.reader .book-actions { margin: 28px 0 0; }
.reader p.free-dl, .reader p.book-meta, .reader p.rights { font: 400 14px/1.6 var(--sans); color: var(--muted); margin: 12px 0 0; }
.reader p.free-dl { color: var(--text); margin-top: 22px; }
.reader p.free-dl a { color: var(--gold-hi); text-underline-offset: 3px; }
.reader .dl-size { color: var(--muted); }
.reader .front { border-top: 1px solid var(--line); padding-top: 4px; }
.reader .epigraph { font-style: italic; text-align: center; margin: 32px 0; }
.reader .end { font: 500 12px/1.6 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); text-align: center; margin: 2.6em 0 0; }
.toc { border-top: 1px solid var(--line); margin-top: 40px; }
.toc h3 { font: 500 12px/1.6 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin: 34px 0 4px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.toc-label { flex: 0 0 auto; min-width: 8.5em; font: 500 12px/1.5 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.toc-title { font: 400 17px/1.45 var(--serif); }
.toc li a:hover .toc-label, .toc li a:hover .toc-title { color: var(--gold-hi); }
.chap-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font: 500 12px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.chap-nav a { color: var(--gold-hi); text-decoration: none; }
.chap-nav a:hover { color: var(--text); }
.chap-nav .off { color: var(--line); }
.chap-nav.nav-top { margin-bottom: 44px; }
.chap-nav.nav-bottom { margin-top: 52px; }
.reader.chapter .reader-end { border-top: 0; margin-top: 28px; padding-top: 0; }
.reader.chapter { padding-top: clamp(24px, 4vw, 48px); }
.reader.chapter header { margin-bottom: 40px; }
.reader h1.ch { font-size: clamp(28px, 4.6vw, 44px); letter-spacing: .05em; }
.reader .ch-sub { font: italic 400 clamp(18px, 2.2vw, 22px)/1.5 var(--serif); opacity: .88; margin: 12px 0 0; }
.reader .part { font: 500 12px/1.6 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin: 0 0 20px; }
.reader .reader-end p.free-dl { margin-top: 0; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 28px var(--pad) 40px; text-align: center; color: var(--muted); font-size: 13px; }
.foot p { margin: 6px 0; }
.foot .ai { opacity: .8; }

@media (max-width: 560px) {
  .top { flex-direction: column; gap: 10px; }
  .hero .hero-title, .hero .hero-title.long { font-size: min(44px, 9.4vw); }  /* EKALADERHAN is one long word: keep it inside the screen */
  .hero .sub.long { letter-spacing: .32em; }
  .film-hero h1 { font-size: min(42px, 9.4vw); }
  .reader.book h1 { font-size: min(36px, 9.4vw); }
  .chap-nav { letter-spacing: .1em; }
  .toc-label { min-width: 0; flex-basis: 100%; }
  .dl li { grid-template-columns: 1fr; }
  .dl .btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
}

/* opening films and audiobooks */
.opening, .audiobook { max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 7vw, 80px) var(--pad) 0; }
.opening .player { padding: 0; margin-top: 20px; }
.opening h2, .audiobook h2 { margin: 6px 0 10px; }
.audiobook .cta { margin: 18px 0 8px; }
.chapters { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.chapters li { display: grid; grid-template-columns: 2.5em 1fr minmax(220px, 340px); gap: 6px 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.chapters .ch-n { font: 500 13px/1 var(--sans); color: var(--dim, #9b958a); letter-spacing: .08em; }
.chapters .ch-t { font: 400 16px/1.4 var(--serif); }
.chapters audio { width: 100%; height: 36px; }
@media (max-width: 640px) {
  .chapters li { grid-template-columns: 2.2em 1fr; }
  .chapters audio { grid-column: 1 / -1; }
}

/* read along: chapter pages with a timed audiobook chapter (data-ra-* on the article; site.js builds all of this,
   so without JavaScript nothing here applies). A slim bar fixed to the bottom, the paragraph and word being read
   lit softly, and "Back to the voice" when the visitor has scrolled away from it. */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html.ra-on { scroll-padding-top: 96px; scroll-padding-bottom: calc(var(--ra-pad, 72px) + 16px); }
body.ra-on { padding-bottom: var(--ra-pad, 72px); }
.ra-player { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; padding: 8px var(--pad) calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(14, 13, 12, .95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid rgba(188, 167, 130, .24);
  color: var(--text); font: 500 13px/1.3 var(--sans); }
.ra-inner { max-width: 46rem; margin: 0 auto; display: grid; align-items: center; gap: 2px 8px;
  grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "play label resume hide"; }
.ra-player button { -webkit-appearance: none; appearance: none; margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent; }
.ra-player button:focus-visible, .ra-player a:focus-visible, .ra-voice:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 3px; }
.ra-player .ico { display: block; width: 20px; height: 20px; }
.ra-skip .ico { width: 24px; height: 24px; }
.ra-play { grid-area: play; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--gold) !important;
  color: var(--gold-hi); transition: background-color .2s, color .2s; }
.ra-play:hover { background: var(--gold); color: var(--bg); }
.ra-play .i-pause, .ra-player.is-playing .ra-play .i-play { display: none; }
.ra-player.is-playing .ra-play .i-pause { display: block; }
.ra-play.is-loading .ico { animation: ra-wait .9s ease-in-out infinite alternate; }
.ra-play.is-ready { box-shadow: 0 0 0 0 rgba(216, 196, 156, .5); animation: ra-ready 1.6s ease-out infinite; }
@keyframes ra-wait { from { opacity: .35; } }
@keyframes ra-ready { to { box-shadow: 0 0 0 12px rgba(216, 196, 156, 0); } }
.ra-skip { display: grid; place-items: center; width: 40px; height: 44px; color: rgba(236, 229, 216, .78); transition: color .2s; }
.ra-skip:hover, .ra-rate:hover, .ra-hide:hover { color: var(--gold-hi); }
.ra-back { grid-area: back; }
.ra-fwd { grid-area: fwd; }
.ra-label { grid-area: label; min-width: 0; display: grid; gap: 1px; padding-left: 4px; }
.ra-kicker { font: 500 11px/1.4 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ra-title { font: 400 14px/1.35 var(--serif); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ra-seek { grid-area: seek; display: flex; align-items: center; gap: 10px; min-width: 0; padding-left: 4px; }
.ra-time { flex: none; min-width: 2.9em; font: 500 12px/1 var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.ra-time.ra-dur { text-align: right; }
.ra-range { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 24px; margin: 0; background: transparent; cursor: pointer; --pct: 0%; }
.ra-range::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(to right, var(--gold) var(--pct), rgba(236, 229, 216, .2) var(--pct)); }
.ra-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 13px; height: 13px; margin-top: -5px; border: 0; border-radius: 50%; background: var(--gold-hi); }
.ra-range::-moz-range-track { height: 3px; border-radius: 2px; background: rgba(236, 229, 216, .2); }
.ra-range::-moz-range-progress { height: 3px; border-radius: 2px; background: var(--gold); }
.ra-range::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: var(--gold-hi); }
.ra-range:focus-visible { outline: 1px solid var(--gold-hi); outline-offset: 2px; }
.ra-resume { grid-area: resume; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px !important; border: 1px solid var(--line) !important;
  color: var(--gold-hi) !important; font: 500 11px/1.2 var(--sans) !important; letter-spacing: .14em !important; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: border-color .2s, color .2s; }
.ra-resume:hover { border-color: var(--gold) !important; color: var(--text) !important; }
.ra-rate { grid-area: rate; min-width: 48px; height: 44px; padding: 0 6px !important; font: 500 13px/1 var(--sans) !important; color: var(--text); font-variant-numeric: tabular-nums;
  transition: color .2s; }
.ra-hide { grid-area: hide; display: grid; place-items: center; width: 36px; height: 44px; color: var(--muted); transition: color .2s, transform .2s; }
/* idle (nothing played yet on this page): play, what this is, and Resume; the rest appears once listening starts */
.ra-player:not(.is-engaged) :is(.ra-back, .ra-fwd, .ra-seek, .ra-rate) { display: none; }
.ra-player.is-engaged .ra-inner { grid-template-columns: auto auto auto minmax(0, 1fr) auto auto;
  grid-template-areas: "play back fwd label rate hide" "play back fwd seek rate hide"; }
.ra-player.is-engaged .ra-kicker, .ra-player.is-engaged .ra-resume { display: none; }
/* hidden: a small round control in the corner that keeps play/pause */
.ra-player.is-collapsed { left: auto; right: var(--pad); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); padding: 4px; border: 1px solid rgba(188, 167, 130, .4);
  border-radius: 30px; }
.ra-player.is-collapsed .ra-inner { grid-template-columns: auto auto; grid-template-areas: "play hide"; gap: 0; }
.ra-player.is-collapsed :is(.ra-back, .ra-fwd, .ra-label, .ra-seek, .ra-rate, .ra-resume) { display: none; }
.ra-player.is-collapsed .ra-hide { transform: rotate(180deg); }
/* the voice: the paragraph being read, the word being spoken (CSS Custom Highlight API; paragraph only without it) */
.reader.ra-active .ch-text > :is(p, h2) { border-radius: 2px; transition: background-color .3s ease, box-shadow .3s ease; }
.reader.ra-active .ch-text > :is(p, h2):not(.ra-now) { cursor: pointer; }
@media (hover: hover) { .reader.ra-active .ch-text > :is(p, h2):not(.ra-now):hover { background: rgba(188, 167, 130, .035); box-shadow: 0 0 0 .55em rgba(188, 167, 130, .035); } }
.reader .ch-text > .ra-now, .reader header .ra-now { background: rgba(188, 167, 130, .085); box-shadow: 0 0 0 .55em rgba(188, 167, 130, .085); }
::highlight(ra-word) { background-color: rgba(188, 167, 130, .36); color: #fffaf0; }
.ra-voice { position: fixed; z-index: 6; left: 50%; bottom: calc(var(--ra-pad, 72px) + 12px); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 16px 0 12px; border: 1px solid var(--gold); border-radius: 22px; background: rgba(14, 13, 12, .94); color: var(--gold-hi); cursor: pointer;
  font: 500 11px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
  -webkit-tap-highlight-color: transparent; transition: background-color .2s, color .2s; }
.ra-voice:hover { background: var(--gold); color: var(--bg); }
.ra-voice .ico { width: 16px; height: 16px; transition: transform .2s; }
.ra-voice.is-up .ico { transform: rotate(180deg); }
@media (max-width: 559px) {  /* phones: the position bar runs the full width above the buttons */
  .ra-player { padding-top: 4px; }
  .ra-player.is-engaged .ra-inner { grid-template-columns: auto auto auto minmax(0, 1fr) auto auto;
    grid-template-areas: "seek seek seek seek seek seek" "play back fwd label rate hide"; column-gap: 4px; }
  .ra-seek { padding-left: 0; }
  .ra-resume { padding: 0 10px !important; letter-spacing: .1em !important; }
  .ra-player.has-resume:not(.is-engaged) .ra-kicker { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reader.ra-active .ch-text > :is(p, h2), .ra-hide, .ra-voice .ico { transition: none; }
  .ra-play.is-loading .ico, .ra-play.is-ready { animation: none; }
}
@media print { .ra-player, .ra-voice { display: none !important; } body.ra-on { padding-bottom: 0; } }
/* film page: "Read along" beside each audiobook chapter */
.chapters .ra-link { font: 500 11px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-hi); text-decoration: none;
  white-space: nowrap; padding: 10px 0; text-underline-offset: 4px; }
.chapters .ra-link:hover { color: var(--text); text-decoration: underline; }
.chapters.has-ra li { grid-template-columns: 2.5em 1fr auto minmax(220px, 340px); }
.chapters.has-ra .ra-link { grid-column: 3; }
.chapters.has-ra audio { grid-column: 4; }
@media (max-width: 640px) {
  .chapters.has-ra li { grid-template-columns: 2.2em 1fr auto; }
  .chapters.has-ra audio { grid-column: 1 / -1; }
}
.ra-resume-slot { display: none; }
