/* The catalogue (books.py, books.js), in the public site's look (docs/index.html; tasks card 26: the owner, 2026-10-27,
   Netflix's and Spotify's colour and shine): deep near-black, warm white type, one shining accent (orange to amber),
   glass surfaces with a light edge. Covers are set in type, in the colour each book keeps, and glow in it. */
:root {
  color-scheme: dark;
  --bg: #0a0d0c;
  --bg-2: #0e1311;
  --surface: #131a17;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --text: #f5f0e8;
  --text-2: #b6c0bb;
  --text-3: #7f8b86;
  --signal: #ff6a2c;
  --amber: #ffb24c;
  --shine: linear-gradient(120deg, #ff5a2a 0%, #ff8a36 52%, #ffb54e 100%);
  --glow: rgba(255, 106, 44, .42);
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --player: 0px;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; color: var(--text); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased;
       padding-bottom: var(--player);
       background: radial-gradient(70vmax 40vmax at 85% -10%, rgba(255, 106, 44, .13), transparent 70%),
                   radial-gradient(60vmax 40vmax at -10% 30%, rgba(38, 122, 98, .12), transparent 70%), var(--bg) no-repeat; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; margin: 0; letter-spacing: -.015em; }
h1 em { font-style: italic; padding-right: .06em; background: var(--shine); -webkit-background-clip: text; background-clip: text; color: transparent; }
p { margin: 0; }
.inner { padding-inline: var(--gutter); max-width: 1240px; margin-inline: auto; }
button { font: inherit; color: inherit; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px;
       border-radius: 999px; border: 1px solid transparent; font: 500 15.5px/1 var(--body); text-decoration: none; cursor: pointer;
       transition: background .2s, border-color .2s, color .2s, transform .2s, box-shadow .25s, filter .2s; }
.btn-primary { background: var(--shine); color: #1a0c04; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 10px 28px -10px var(--glow); }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 14px 38px -8px var(--glow); }
.btn-secondary { background: rgba(255, 255, 255, .06); color: var(--text); border-color: var(--line-2); }
.btn-secondary:hover { background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .32); }

/* ---------- masthead ---------- */
.masthead { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top, 0px);
            background: rgba(10, 13, 12, .72); backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--line); }
.masthead .inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 500 20px/1 var(--display); color: var(--text); }
.wordmark svg { width: 22px; height: 22px; flex: none; }
.nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); }
.nav a:not(.btn) { text-decoration: none; font-size: 15px; color: rgba(245, 240, 232, .68); }
.nav a:not(.btn):hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); text-decoration: underline; text-decoration-color: var(--amber, #ffb15c);
                              text-decoration-thickness: 2px; text-underline-offset: 8px; }
.nav .btn { min-height: 40px; padding: 0 18px; font-size: 14.5px; }
.account-menu { position: relative; }
.account-menu > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 36px; height: 36px;
                          border-radius: 50%; background: rgba(255, 255, 255, .1); border: 1px solid var(--line-2);
                          font: 500 14px/1 var(--body); color: var(--text); }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu[open] > summary, .account-menu > summary:hover { background: rgba(255, 255, 255, .16); }
.account-menu .menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; display: grid; gap: 2px;
                      min-width: 230px; max-width: calc(100vw - 32px); padding: 8px; border-radius: 14px; background: var(--surface);
                      border: 1px solid var(--line-2); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7); }
.account-menu .who { padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 13px;
                     color: var(--text-3); overflow-wrap: anywhere; }
.account-menu .menu a, .account-menu .menu button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px;
                      background: none; text-align: left; text-decoration: none; font-size: 15px; color: var(--text); cursor: pointer; }
.account-menu .menu a:hover, .account-menu .menu button:hover { background: rgba(255, 255, 255, .07); }

/* ---------- the shelf ---------- */
.intro { padding-block: clamp(40px, 7vw, 88px) 28px; }
.eyebrow { font: 500 12.5px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--amber); margin-bottom: 18px; }
.eyebrow a { text-decoration: none; }
.intro h1 { font-size: clamp(38px, 6.2vw, 72px); line-height: 1.02; max-width: 15ch; }
.lede { margin-top: 20px; max-width: 60ch; font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); }
.search { display: flex; align-items: center; gap: 12px; margin-top: 34px; max-width: 560px; min-height: 54px; padding: 0 20px;
          background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); border-radius: 999px; transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: rgba(255, 178, 76, .6); box-shadow: 0 0 0 4px rgba(255, 140, 60, .12); }
.search svg { flex: none; width: 19px; height: 19px; fill: none; stroke: var(--text-3); stroke-width: 1.8; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: 400 16.5px/1 var(--body); color: var(--text); outline: none; }
.search input::placeholder { color: var(--text-3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { min-height: 36px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03);
        font-size: 14px; color: var(--text-2); cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.chip:hover { border-color: rgba(255, 255, 255, .32); color: var(--text); }
.chip.on { background: var(--shine); border-color: transparent; color: #1a0c04; font-weight: 500; }
a.chip { display: inline-flex; align-items: center; text-decoration: none; }          /* (the store's choices are links) */
.count { margin: 8px 0 18px; font-size: 14px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.grid { list-style: none; margin: 0; padding: 0 0 72px; display: grid; gap: 34px 26px;
        grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); }

/* ---------- a book in a row or a grid: its cover with a play button, how far a listener got ---------- */
.card { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card-art { position: relative; margin-bottom: 10px; }
.card-art > a { display: block; outline-offset: 6px; text-decoration: none; color: inherit; }
.card-art .badge { position: absolute; left: 8px; top: 8px; z-index: 3; padding: 3px 8px; border-radius: 999px; pointer-events: none;
                   background: rgba(10, 13, 12, .78); border: 1px solid rgba(255, 255, 255, .18); color: var(--text);
                   font: 500 11.5px/1.3 var(--body); letter-spacing: .02em; backdrop-filter: blur(6px); }
.feature-cover { display: block; text-decoration: none; color: inherit; }
.card:hover .cover, .card:focus-within .cover { transform: translateY(-8px) scale(1.03);
  box-shadow: 0 30px 60px -22px color-mix(in srgb, var(--cloth, #1f3a5f) 85%, #fff 15%), 0 0 0 1px rgba(255, 255, 255, .16); }
.card:hover .cover::before, .card:focus-within .cover::before { transform: translateX(75%); }
.card-play { position: absolute; right: 10px; bottom: 10px; z-index: 3; width: 46px; height: 46px; border: 0; border-radius: 50%;
             display: grid; place-items: center; cursor: pointer; background: var(--shine); color: #1a0c04;
             box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 10px 24px -6px rgba(0, 0, 0, .7), 0 8px 26px -10px var(--glow);
             opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s, filter .2s; }
.card-play svg { width: 20px; height: 20px; fill: currentColor; margin-left: 2px; }
.card:hover .card-play, .card:focus-within .card-play, .card-play:focus-visible { opacity: 1; transform: translateY(-8px); }
.card-play:hover { filter: brightness(1.08); }
@media (hover: none) { .card-play { opacity: 1; transform: none; width: 40px; height: 40px; right: 8px; bottom: 8px; } }
.card-progress { position: absolute; left: 8%; right: 8%; bottom: 7px; z-index: 2; height: 3px; border-radius: 2px; overflow: hidden;
                 background: rgba(255, 255, 255, .22); }
.card-progress i { display: block; height: 100%; background: var(--shine); }
.card-link { display: flex; flex-direction: column; gap: 3px; text-decoration: none; min-width: 0; }
.card-title { font: 500 16.5px/1.25 var(--display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { font-size: 13.5px; color: var(--text-3); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-price { font-size: 13.5px; line-height: 1.35; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- the store with no book yet ---------- */
.store-empty { margin: 28px 0 80px; max-width: 640px; padding: clamp(24px, 4vw, 36px); border: 1px solid var(--line);
               border-radius: 20px; background: linear-gradient(160deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .01)); }
.store-empty h2 { margin: 0 0 10px; font: 500 clamp(24px, 3vw, 30px)/1.15 var(--display); text-wrap: balance; }
.store-empty p { margin: 0; color: var(--text-2); max-width: 52ch; line-height: 1.55; }
.store-empty-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- the featured book ---------- */
.feature { position: relative; overflow: hidden; padding-block: clamp(36px, 6vw, 80px) clamp(28px, 4vw, 48px); }
.feature-glow { position: absolute; inset: -20% -10% 0; pointer-events: none;
                background: radial-gradient(48% 70% at 22% 40%, color-mix(in srgb, var(--cloth) 70%, transparent), transparent 70%),
                            radial-gradient(40% 60% at 85% 10%, rgba(255, 106, 44, .14), transparent 70%); filter: saturate(1.2); }
.feature-inner { position: relative; display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.feature-cover .cover { box-shadow: 0 50px 100px -40px color-mix(in srgb, var(--cloth) 85%, #fff 15%), 0 0 0 1px rgba(255, 255, 255, .1); }
.feature h1 { font-size: clamp(36px, 5.2vw, 64px); line-height: 1.02; max-width: 16ch; }
.feature h1 a { text-decoration: none; }
.feature-by { margin-top: 12px; font-size: 18px; color: var(--text); }
.feature .facts { margin-top: 10px; }
.feature-about { margin-top: 16px; max-width: 58ch; color: var(--text-2); font-size: 16px; line-height: 1.6; }
.btn svg { width: 18px; height: 18px; fill: currentColor; margin-left: -4px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .3); }
.btn-ghost.save[aria-pressed="true"] { border-color: rgba(255, 178, 76, .55); color: var(--amber); }

/* ---------- search and shelves; the rows ---------- */
.browse { padding-block: 8px 6px; }
.browse .search { margin-top: 0; }
.rows { padding-bottom: 56px; }
.row { padding-top: clamp(22px, 3vw, 34px); }
.row-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 4px; }
.row-head h2 { font-size: clamp(22px, 2.3vw, 28px); line-height: 1.15; }
.row-head .eyebrow { margin-bottom: 8px; }
.row-tools { display: flex; align-items: center; gap: 6px; }
.row-arrow { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04);
             color: var(--text); font-size: 22px; line-height: 1; cursor: pointer; transition: background .2s, opacity .2s; }
.row-arrow:hover { background: rgba(255, 255, 255, .1); }
.row-arrow:disabled { opacity: .3; cursor: default; }
@media (hover: none) { .row-arrow { display: none; } }
.row-cards { list-style: none; margin: 0 auto; max-width: 1240px; padding: 18px var(--gutter) 8px; display: grid; grid-auto-flow: column;
             grid-auto-columns: clamp(132px, 14.5vw, 188px); gap: clamp(14px, 1.6vw, 22px); overflow-x: auto; scroll-snap-type: x proximity;
             scroll-padding-inline: var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain; }
.row-cards::-webkit-scrollbar { display: none; }
.row-cards .card { scroll-snap-align: start; }
.all { padding-top: 18px; }
.lib { padding-block: 10px 30px; }
.lib h2 { font-size: clamp(22px, 2.3vw, 28px); margin-bottom: 18px; }
.lib .grid { padding-bottom: 10px; }
.lib .empty { padding: 0 0 10px; }
.lib .empty a { color: var(--amber); }
.empty { padding: 32px 0 80px; color: var(--text-2); }

/* ---------- a listener's own books (own.py) ---------- */
.bring-form { display: grid; gap: 20px; max-width: 620px; padding: clamp(20px, 3vw, 30px); border-radius: 18px;
              background: rgba(255, 255, 255, .035); border: 1px solid var(--line); }
.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > span, .field legend { font-size: 14px; font-weight: 500; color: var(--text-2); padding: 0; margin-bottom: 2px; }
.field small { font-size: 13px; color: var(--text-3); }
.field input[type="text"], .field select, .field input[type="file"] { width: 100%; min-height: 46px; padding: 10px 14px;
              border-radius: 12px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .25); color: var(--text); font: inherit; font-size: 15.5px; }
.field input[type="file"] { padding: 9px 12px; }
.field select option { background: var(--surface); }
.quality { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
           cursor: pointer; font-size: 15.5px; }
.quality:has(input:checked) { border-color: rgba(255, 178, 76, .6); background: rgba(255, 138, 54, .07); }
.quality input { margin-top: 4px; accent-color: var(--signal); }
.quality small { display: block; margin-top: 2px; font-size: 13.5px; color: var(--text-3); }
.quality.soon { cursor: default; opacity: .55; margin: 0; }
.form-error { min-height: 1.2em; color: #ff8a70; font-size: 14.5px; }
.own-status { margin-top: 18px; font-size: 16px; color: var(--text-2); }
.own-progress { margin-top: 12px; max-width: 460px; }
.own-progress .bar { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.own-progress .bar i { display: block; height: 100%; width: 3%; background: var(--shine); transition: width .6s; }
.own-sample { margin-top: 22px; display: grid; gap: 8px; max-width: 460px; }
.own-sample audio { width: 100%; }
.own-book .actions { flex-wrap: wrap; }
.agree { display: flex; gap: 10px; align-items: flex-start; flex-basis: 100%; max-width: 520px; font-size: 14.5px; color: var(--text-2); }
.agree input { margin-top: 4px; accent-color: var(--signal); }
.own-files { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.own-files a { color: var(--amber); text-decoration: none; font-size: 15px; }
.own-files a:hover { text-decoration: underline; }
.own-sample[hidden], .own-files[hidden], .own-progress[hidden] { display: none; }

/* ---------- a cover set in type ---------- */
.cover { position: relative; display: flex; flex-direction: column; justify-content: space-between; width: 100%; max-width: 100%;
         aspect-ratio: 2 / 3; padding: 17% 12% 13%; overflow: hidden; border-radius: 4px 7px 7px 4px; text-align: center;
         background: linear-gradient(90deg, rgba(0,0,0,.26), rgba(0,0,0,0) 7%, rgba(255,255,255,.06) 9%, rgba(0,0,0,0) 14%),
                     linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,0) 45%),
                     linear-gradient(0deg, rgba(0,0,0,.28), rgba(0,0,0,0) 55%), var(--cloth, #1f3a5f);
         color: #f6f1e6; box-shadow: 0 14px 34px -16px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .06); --cover-size: 15.5px;
         transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s; }
.cover::after { content: ""; position: absolute; inset: 6% 6% 6% 9%; border: 1px solid rgba(246, 241, 230, .32); border-radius: 2px; pointer-events: none; }
.cover::before { content: ""; position: absolute; inset: -20% -60%; z-index: 1; pointer-events: none;
                 background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .26) 50%, transparent 60%);
                 transform: translateX(-75%); transition: transform 1s ease; }
.cover-title { position: relative; z-index: 2; font: 500 var(--cover-size)/1.15 var(--display); text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 6;
               -webkit-box-orient: vertical; overflow: hidden; }
.cover-rule { position: relative; z-index: 2; width: 22%; height: 1px; margin: 0 auto; background: rgba(246, 241, 230, .5); }
.cover-by { position: relative; z-index: 2; font: 500 max(7px, calc(var(--cover-size) * .48))/1.25 var(--body); letter-spacing: .14em; text-transform: uppercase;
            opacity: .9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cover.lg { --cover-size: 24px; box-shadow: 0 40px 90px -40px color-mix(in srgb, var(--cloth, #1f3a5f) 80%, #fff 20%), 0 0 0 1px rgba(255, 255, 255, .08); }

/* ---------- a book's page ---------- */
.page-book main { position: relative; }
.book-backdrop { position: absolute; inset: 0 0 auto; height: 620px; pointer-events: none; z-index: 0;
                 background: radial-gradient(60% 100% at 20% 0%, color-mix(in srgb, var(--cloth) 75%, transparent), transparent 72%),
                             linear-gradient(180deg, color-mix(in srgb, var(--cloth) 30%, transparent), transparent 80%); }
.book-page { position: relative; z-index: 1; padding-block: clamp(32px, 6vw, 72px) 30px; }
.book-progress { display: flex; align-items: center; gap: 12px; margin-top: 18px; max-width: 460px; font-size: 14px; color: var(--text-2); }
.book-progress .bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.book-progress .bar i { display: block; height: 100%; background: var(--shine); }
.book-head { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.book-facts h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.05; }
.subtitle { margin-top: 10px; font: italic 400 clamp(19px, 2vw, 23px)/1.35 var(--display); color: var(--text-2); }
.author { margin-top: 18px; font-size: 18px; }
.years { color: var(--text-3); }
.translator { margin-top: 4px; color: var(--text-2); font-size: 15.5px; }
.facts { margin-top: 18px; font-size: 14.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
/* the book's editions to choose from: the full cast, one narrator */
.readings { display: inline-flex; gap: 4px; margin-top: 16px; padding: 4px; border-radius: 999px;
            border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); }
.readings .reading { padding: 6px 14px; border-radius: 999px; font-size: 13.5px; color: var(--text-2); text-decoration: none; }
.readings .reading:hover { color: var(--text); }
.readings .reading.on { background: var(--text); color: var(--bg, #0a0d0c); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.note { margin-top: 14px; max-width: 52ch; font-size: 14px; color: var(--text-3); }
.about, .chapters, .subjects { margin-top: clamp(44px, 6vw, 72px); max-width: 760px; }
.about h2, .chapters h2, .subjects h2 { font-size: 26px; margin-bottom: 16px; }
.about p { font: 400 19px/1.65 var(--display); color: var(--text); max-width: 65ch; }
.chapter-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.chapter-list li { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.chapter-list .get { flex: none; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px;
                     letter-spacing: .06em; color: var(--text-3); text-decoration: none; }
.chapter-list .get:hover { color: var(--text); border-color: rgba(255, 255, 255, .32); }
.chapter { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) auto; align-items: baseline; gap: 12px; flex: 1; min-width: 0;
           padding: 13px 4px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.chapter:hover .name { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.chapter .n { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chapter .name { font: 400 17.5px/1.35 var(--display); min-width: 0; }
.chapter .len { font-size: 13.5px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ch.playing .name, .ch.playing .n { color: var(--amber); }
.ch.done .n::before { content: "✓"; color: var(--amber); margin-right: 2px; }
.ch.done .name { color: var(--text-2); }
.ch.current .name { font-weight: 500; }
.chapters-note { margin: -4px 0 16px; font-size: 14.5px; color: var(--text-2); }
.chapters-note a { color: var(--amber); }
.tag { display: inline-block; margin: 0 8px 8px 0; padding: 6px 13px; border: 1px solid var(--line-2); border-radius: 999px;
       font-size: 13.5px; color: var(--text-2); text-decoration: none; }
.tag:hover { border-color: rgba(255, 255, 255, .32); color: var(--text); }

/* ---------- the player: one bar for every page, playing on as pages change ---------- */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding-bottom: env(safe-area-inset-bottom, 0px);
          background: rgba(12, 16, 14, .9); backdrop-filter: blur(20px) saturate(160%); border-top: 1px solid var(--line);
          box-shadow: 0 -24px 60px -24px rgba(0, 0, 0, .8); }
.player-progress { position: absolute; left: 0; right: 0; top: -7px; height: 14px; }
.player-progress input[type=range] { width: 100%; height: 14px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; --done: 0%; }
.player-progress input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 0;
  background: linear-gradient(90deg, #ff6a2c 0, #ffb54e var(--done), rgba(255, 255, 255, .16) var(--done)); }
.player-progress input[type=range]::-moz-range-track { height: 3px; background: rgba(255, 255, 255, .16); }
.player-progress input[type=range]::-moz-range-progress { height: 3px; background: var(--shine); }
.player-progress input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 4px rgba(255, 140, 60, .3); opacity: 0; transition: opacity .2s; }
.player-progress:hover input[type=range]::-webkit-slider-thumb { opacity: 1; }
.player-progress input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; }
.player-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
              min-height: 82px; padding: 8px clamp(12px, 3vw, 28px); max-width: 1440px; margin-inline: auto; }
.now { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.now-art { flex: none; width: 48px; height: 60px; border-radius: 3px 5px 5px 3px; display: grid; place-items: center;
           font: 500 22px/1 var(--display); color: rgba(246, 241, 230, .92);
           background: linear-gradient(90deg, rgba(0,0,0,.26), rgba(0,0,0,0) 12%), linear-gradient(160deg, rgba(255,255,255,.18), rgba(255,255,255,0) 50%), var(--cloth, #1f3a5f);
           box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--cloth, #1f3a5f) 90%, #fff 10%); }
.now-text { display: flex; flex-direction: column; min-width: 0; }
.now-title { font: 500 15.5px/1.3 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-sub { font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transport { display: flex; align-items: center; gap: clamp(4px, 1vw, 10px); }
.ctl { position: relative; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--text-2);
       display: grid; place-items: center; cursor: pointer; transition: color .2s, background .2s; }
.ctl:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.ctl:disabled { opacity: .3; cursor: default; background: transparent; }
.ctl svg { width: 22px; height: 22px; fill: currentColor; }
.ctl b { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); font: 600 8px/1 var(--body); }
.play { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--shine); color: #1a0c04; cursor: pointer;
        display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 8px 24px -8px var(--glow);
        transition: transform .2s, filter .2s; }
.play:hover { transform: scale(1.05); filter: brightness(1.06); }
.play svg { width: 22px; height: 22px; fill: currentColor; }
.play .i-pause, .play.on .i-play { display: none; }
.play.on .i-pause { display: inline; }
.extras { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.times { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; margin-right: 6px; }
.pill { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04);
        font-size: 13px; color: var(--text-2); cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; transition: color .2s, background .2s, border-color .2s; }
.pill:hover { color: var(--text); background: rgba(255, 255, 255, .09); }
.pill.on, .pill[aria-pressed="true"] { color: var(--amber); border-color: rgba(255, 178, 76, .5); }
.now-line { margin: 0 auto; max-width: 900px; padding: 0 20px 12px; text-align: center; font: italic 400 17px/1.45 var(--display); color: var(--text-2); min-height: 1.45em; }
.now-line a { color: var(--amber); }

/* ---------- foot ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 32px 40px; font-size: 14px; color: var(--text-3); }
.foot .inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.foot .links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }

@media (max-width: 760px) {
  .feature-inner { grid-template-columns: minmax(0, 1fr); }
  .feature-cover { max-width: 170px; }
  .feature-about { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .player-bar { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; min-height: 72px; }
  .transport #prev, .transport #next, .transport #back, .transport #ahead { display: none; }
  .extras { grid-column: 1 / -1; justify-content: space-between; padding-bottom: 6px; }
  .book-head { grid-template-columns: minmax(0, 1fr); }
  .book-cover { max-width: 220px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 28px 18px; }
  .cover { --cover-size: 13.5px; }
  .cover.lg { --cover-size: 20px; }
  .nav > a[href^="/login"] { display: none; }       /* (on a phone: Discover, Library or Join free; signing in is on Join free's page) */
}
/* ---------- the main page, signed out (card 67): a welcome line, the questions, a bar to join ---------- */
.welcome { padding-block: 22px 4px; }
.welcome p { margin: 0; font: 500 clamp(18px, 2.2vw, 22px)/1.3 var(--display); color: var(--text); }
.faq { padding-block: 24px 72px; }
.faq h2, .faq dl { max-width: 820px; }                               /* (left, as the rows above it) */
.faq h2 { margin: 0 0 18px; font: 500 clamp(24px, 3vw, 30px)/1.2 var(--display); }
.faq dl { margin: 0; display: grid; gap: 0; }
.faq dt { padding-top: 18px; border-top: 1px solid var(--line); font-weight: 500; color: var(--text); }
.faq dd { margin: 6px 0 18px; color: var(--text-2); line-height: 1.6; max-width: 68ch; }
.faq dd a { color: var(--amber); }
.join-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding-bottom: env(safe-area-inset-bottom, 0px);
            background: linear-gradient(90deg, rgba(255, 106, 44, .22), rgba(120, 104, 214, .22)), rgba(10, 13, 12, .94);
            backdrop-filter: blur(14px); border-top: 1px solid var(--line-2); }
.join-bar .inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; min-height: 64px; flex-wrap: wrap; }
.join-bar p { margin: 0; color: var(--text-2); }
.join-bar p b { color: var(--text); font-weight: 500; }
.join-bar .btn { min-height: 40px; padding: 0 18px; }
body:has(.join-bar) .foot { padding-bottom: 88px; }                 /* (the bar doesn't hide the foot) */
body:has(#player:not([hidden])) .join-bar { display: none; }         /* (a book playing: its player there instead) */

@media (max-width: 420px) {           /* (a phone's header: Discover, Store, Library and the account; the mark alone) */
  .wordmark { font-size: 0; gap: 0; }
  .wordmark svg { width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce) { .btn, .chip, .cover, .cover::before, .play, .card-play { transition: none; } }

/* A row's way on (home: "Discover more", "Library"), beside its arrows. */
.row-more { color: var(--text-2); text-decoration: none; font-size: 14px; margin-right: 10px; white-space: nowrap; }
.row-more:hover { color: var(--text); }

/* The store's books (market.py): the byline, the badge of a book made here, the price. */
.store-book .byline { margin: 4px 0 10px; font-size: 18px; color: var(--muted, #b6c0bb); }
.badge-made { display: inline-block; margin: 6px 0 4px; padding: 4px 10px; border-radius: 999px; font-size: 13px; letter-spacing: .02em;
  background: linear-gradient(120deg, rgba(255, 90, 42, .18), rgba(255, 181, 78, .18)); color: #ffb54e; border: 1px solid rgba(255, 181, 78, .35); }
.store-book .price { margin: 14px 0 6px; font-size: 22px; font-weight: 500; }
.store-book .about { margin-top: 22px; max-width: 62ch; line-height: 1.6; }
.cover.pictured { padding: 0; overflow: hidden; background: #111; }
.cover.pictured img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover.pictured::after { display: none; }                        /* (the type-set cover's inner frame: not on a picture) */

/* ---------- the main page after mockup-3 (card 70, the owner's choice of 2026-11-08): an editorial bookshop ---------- */
.welcome { padding-block: clamp(20px, 2.2vw, 30px) 0; }
.welcome .welcome-line { margin: 0; font: 400 clamp(28px, 3.3vw, 42px)/1.08 var(--display); color: var(--text); text-wrap: balance; }
.welcome .welcome-line em { font-style: italic; color: var(--amber); }
.welcome .welcome-more { margin: 12px 0 0; font: 400 clamp(17px, 1.5vw, 19px)/1.5 var(--body); color: var(--text); }
.welcome .welcome-more span { display: block; }
.welcome .welcome-more b { font-weight: 500; color: var(--amber); }
.welcome + .feature { padding-top: clamp(24px, 4vw, 52px); }
.welcome + .feature .feature-glow { top: 0; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%); mask-image: linear-gradient(to bottom, transparent, #000 40%); }
.text-link { color: var(--text-2); text-decoration: none; font-size: 16px; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.text-link:hover { color: var(--text); border-color: var(--line-2); }
.browse { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; padding-block: 14px 4px; }
.browse .search { flex: 1 1 320px; max-width: 520px; min-height: 48px; border-radius: 10px; }
.browse > .chips { margin: 0; gap: 0; flex-wrap: nowrap; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.browse > .chips .chip { border: 0; border-radius: 0; min-height: 46px; padding: 0 18px; background: transparent; }
.browse > .chips .chip + .chip { border-left: 1px solid var(--line-2); }
.browse > .chips .chip.on { background: var(--shine); }
.more-shelves summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; color: var(--text-2); font-size: 14.5px; }
.more-shelves summary::-webkit-details-marker { display: none; }
.more-shelves summary::after { content: "+"; font-size: 17px; line-height: 1; color: var(--text-3); }
.more-shelves[open] summary::after { content: "–"; }
.more-shelves .chips { margin-top: 12px; }
.row-head { align-items: center; }
.row-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; min-width: 0; }
.row-kicker { margin: 0; font: italic 400 16px/1.2 var(--display); color: var(--text-2); }
.row-rule { flex: 1; height: 1px; min-width: 24px; background: var(--line); }
.cast-mark { font-weight: 500; color: var(--amber); }
.cast-mark::before { content: " · "; color: var(--text-3); font-weight: 400; }
.faq-list { max-width: 820px; border-top: 1px solid var(--line-2); }
.faq-list details { border-bottom: 1px solid var(--line-2); }
.faq-list summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 2px; cursor: pointer; list-style: none;
                    font: 400 18px/1.3 var(--display); color: var(--text); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; font: 300 24px/1 var(--body); color: var(--text-2); transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list p { margin: 0 2px 18px; max-width: 68ch; color: var(--text-2); line-height: 1.6; }
.faq-list p a { color: var(--amber); }
.join-bar p { font: italic 400 clamp(17px, 2vw, 21px)/1.3 var(--display); color: var(--text); }
.join-bar p b { font-weight: 400; }
@media (max-width: 760px) {
  .welcome .welcome-more { font-size: 16px; }
  .welcome .welcome-more span { display: inline; }
  .join-bar .inner { flex-wrap: nowrap; min-height: 60px; }
  .join-bar p { font-size: 15.5px; }
  .join-bar .btn { flex: none; }
  .browse > .chips { flex-basis: 100%; overflow-x: auto; }
  .browse > .chips .chip { flex: 1 0 auto; padding: 0 14px; }
}

/* ---------- the book on top, small (card 70, Codex's compact-2, the owner's choice): more books on the first screen ---------- */
.feature { padding-block: 24px 0; }
.welcome + .feature { padding-top: 24px; }
.feature-inner { grid-template-columns: 88px minmax(0, 1fr) auto; gap: 20px 28px; align-items: center; padding-block: 8px;
                 background: linear-gradient(var(--line-2), var(--line-2)) center top / calc(100% - 2 * var(--gutter)) 1px no-repeat,
                             linear-gradient(var(--line-2), var(--line-2)) center bottom / calc(100% - 2 * var(--gutter)) 1px no-repeat; }
.feature-cover { width: 88px; }
.feature + .browse { padding-top: 18px; }
.more-shelves { position: relative; flex-basis: auto; }
.more-shelves[open] .chips { position: absolute; z-index: 20; top: calc(100% + 10px); right: 0; width: min(640px, 86vw); margin: 0;
                             padding: 14px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface);
                             box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8); }
.browse + .rows .row:first-child { padding-top: 12px; }
.row-cards .card-art { margin-bottom: 8px; }
.row-cards { padding-top: 14px; }
.feature-cover .cover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 18px 40px -18px rgba(0, 0, 0, .8), 0 0 40px -10px var(--glow); }
.feature-text { min-width: 0; }
.feature-eyebrow { display: flex; align-items: center; gap: 16px; margin: 0 0 6px; font: italic 400 17px/1.2 var(--display); color: var(--text-2); }
.feature-eyebrow::after { content: ""; flex: 1; max-width: 420px; height: 1px; background: var(--line); }
.feature h1 { font-size: clamp(28px, 2.6vw, 38px); line-height: 1.16; max-width: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feature-by { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin: 6px 0 0; }
.feature-author { font: italic 400 20px/1.2 var(--display); color: var(--text); }
.feature-by .facts { margin: 0; font-size: 14.5px; }
.feature-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.feature-actions .btn-primary { min-height: 46px; min-width: 210px; }
.row-cards { grid-auto-columns: clamp(132px, 10.8vw, 156px); gap: clamp(14px, 2.2vw, 32px); }
@media (max-width: 760px) {
  .more-shelves[open] .chips { left: 0; right: auto; }
  .feature-inner { grid-template-columns: 72px minmax(0, 1fr); gap: 14px 16px; }
  .feature-cover { width: 72px; }
  .feature h1 { font-size: 24px; white-space: normal; }
  .feature-eyebrow { font-size: 15px; }
  .feature-author { font-size: 17px; }
  .feature-actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
  .feature-actions .btn-primary { min-width: 0; flex: 1; }
}

/* The fundraiser for more free classics (books.GIVE, GIVE_NOTE; the owner, 2026-11-11): a plain link to it */
.give { padding-block: 12px 4px; }
.give p { max-width: 820px; padding: 18px 22px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface);
          font-size: 16px; color: var(--text-2); }
.give b { font-weight: 500; color: var(--text); }
.give-link, .give-note a { color: var(--amber); text-decoration: none; border-bottom: 1px solid rgba(255, 178, 76, .4);
                           transition: border-color .2s; }
.give-link:hover, .give-note a:hover { border-color: var(--amber); }
.give-note { margin-top: 10px; max-width: 52ch; font-size: 14px; color: var(--text-3); }
