/* Hammock: sea-foam and deep-sea chrome, mango accent, vintage paperback covers, calm reader. */
:root {
  --foam: #E6EFEC; --shell: #F7FAF9; --deep: #0E2630; --tide: #1F4C59; --mango: #F0A23B; --coral: #E5573F;
  --bg: var(--foam); --raised: var(--shell); --ink: #0E2630; --muted: #4A666D; --line: rgba(14, 38, 48, .13);
  --accent-ink: #9A5B0C; --primary-bg: #0E2630; --primary-fg: #F2F7F5;
  --sans: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --display: "Futura", "Futura PT", "Century Gothic", "Avenir Next", "Trebuchet MS", sans-serif;
  --display-cond: "Futura-CondensedExtraBold", "Futura Condensed ExtraBold", "Futura", "Arial Narrow", sans-serif;
  --serif: "Iowan Old Style", "Charter", Georgia, serif;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --tabbar-h: 58px; --pad: 18px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0E2630; --raised: #153440; --ink: #E3EEEA; --muted: #9DB7B3; --line: rgba(227, 238, 234, .14);
    --accent-ink: #F0A23B; --primary-bg: #F0A23B; --primary-fg: #1B1203; }
}
html { font: -apple-system-body; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body { font-family: var(--sans); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
body.reading { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2.5px solid var(--mango); outline-offset: 2px; border-radius: 6px; }
.i { flex: none; display: block; }
[hidden] { display: none !important; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(var(--safe-t) + 10px) calc(var(--pad) + var(--safe-r)) 10px calc(var(--pad) + var(--safe-l));
  background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px); }
.wordmark { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.4rem; letter-spacing: .01em; }
.logo { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 6px; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--raised); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip.ok { color: #1E7A55; } @media (prefers-color-scheme: dark) { .chip.ok { color: #7FD9AE; } }
.chip.busy .i { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--ink); }

/* views */
main { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 28px); }
body.has-mini main { padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 100px); }
.view { display: none; padding-left: var(--safe-l); padding-right: var(--safe-r); }
.view.active { display: block; }
.section-h { font-family: var(--display); font-weight: 600; font-size: 1.2rem; margin: 30px var(--pad) 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-h small { font-family: var(--sans); font-weight: 500; font-size: .8rem; color: var(--muted); }
.lede { margin: -4px var(--pad) 14px; color: var(--muted); font-size: .9rem; line-height: 1.45; max-width: 36em; }

/* hero: continue */
.hero { display: grid; grid-template-columns: minmax(96px, 30%) 1fr; gap: 18px; margin: 10px var(--pad) 0; padding: 18px; border-radius: 24px;
  background: var(--raised); border: 1px solid var(--line); align-items: center; }
.hero h2 { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; line-height: 1.18; margin: 0 0 6px; }
.hero .where { color: var(--muted); font-size: .85rem; margin: 0 0 12px; line-height: 1.35; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.welcome { margin: 10px var(--pad) 0; padding: 22px 20px; border-radius: 24px; background: var(--deep); color: #E8F2EF; position: relative; overflow: hidden; }
.welcome h2 { font-family: var(--display); font-size: 1.5rem; line-height: 1.12; margin: 0 0 8px; max-width: 13em; }
.welcome p { margin: 0; color: #B9D2CC; line-height: 1.45; font-size: .95rem; max-width: 30em; }
.welcome .sun { position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #F7C66B, var(--mango) 55%, #D9782A); opacity: .9; }
.welcome .content { position: relative; }
.install { display: flex; align-items: center; gap: 14px; width: calc(100% - 2 * var(--pad)); margin: 12px var(--pad) 0; padding: 14px 16px; border-radius: 18px; text-align: left;
  background: color-mix(in srgb, var(--mango) 18%, var(--raised)); border: 1.5px solid color-mix(in srgb, var(--mango) 55%, transparent); }
.install b { display: block; font-size: .95rem; }
.install span { font-size: .82rem; color: var(--muted); line-height: 1.35; }
.install .i { color: var(--accent-ink); }
.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--mango); border-radius: 3px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 650; font-size: .95rem; }
.btn.primary { background: var(--primary-bg); color: var(--primary-fg); }
.btn.ghost { border: 1.5px solid var(--line); background: transparent; }
.btn.small { min-height: 38px; padding: 0 14px; font-size: .85rem; border-radius: 12px; }
.btn[disabled] { opacity: .45; }

/* covers */
.cover { position: relative; aspect-ratio: 2 / 3; border-radius: 3px 6px 6px 3px; overflow: hidden; background: var(--tide);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .1), 0 10px 22px -10px rgba(6, 22, 28, .55); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, .22) 0, rgba(255, 255, 255, .10) 2.5%, rgba(0, 0, 0, 0) 6%); }
.cover.typo { display: flex; flex-direction: column; justify-content: space-between; padding: 10% 9%; background: var(--c-bg); color: var(--c-fg); container-type: inline-size; }
.cover.typo .bars { display: grid; gap: 3px; } .cover.typo .bars i { display: block; height: 4px; background: var(--c-ac); } .cover.typo .bars i + i { height: 2px; opacity: .6; }
.cover.typo b { font-family: var(--display-cond); font-weight: 800; text-transform: uppercase; line-height: .95; font-size: 15cqi; letter-spacing: .01em; overflow-wrap: anywhere; }
.cover.typo small { display: block; margin-top: 8%; font-family: var(--display); font-size: 7cqi; color: var(--c-ac); letter-spacing: .06em; }
.badge { position: absolute; z-index: 1; left: 6px; top: 6px; padding: 3px 7px; border-radius: 7px; font-size: .66rem; font-weight: 750; background: var(--mango); color: #1B1203; font-variant-numeric: tabular-nums; }

/* shelves */
.shelf { display: flex; gap: 16px; overflow-x: auto; padding: 4px var(--pad) 10px; scroll-snap-type: x proximity; scroll-padding-left: var(--pad); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.shelf::-webkit-scrollbar { display: none; }
.shelf .book { flex: 0 0 112px; scroll-snap-align: start; text-align: left; display: block; }
.shelf.feature .book { flex-basis: 146px; }
.book .t { font-size: .86rem; font-weight: 650; line-height: 1.25; margin-top: 9px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book .a { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.book .progress { height: 3px; margin-top: 7px; }

/* listen */
.rows { margin: 0 var(--pad); border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 62px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.row h3 { margin: 2px 0 3px; font-size: 1rem; line-height: 1.25; font-weight: 650; }
.row .meta { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.row .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.row .dl { font-size: .8rem; color: var(--muted); margin-top: 8px; font-variant-numeric: tabular-nums; }
.note { color: var(--muted); font-size: .88rem; line-height: 1.5; margin: 12px var(--pad); max-width: 34em; }
.empty { margin: 30px var(--pad); padding: 26px 20px; border: 1.5px dashed var(--line); border-radius: 20px; color: var(--muted); line-height: 1.5; text-align: center; }
.empty strong { display: block; color: var(--ink); font-size: 1.02rem; margin-bottom: 4px; }

/* games */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding: 0 var(--pad); }
.game { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 196px; padding: 14px; border-radius: 20px; overflow: hidden;
  background: var(--g-bg, var(--tide)); color: #fff; isolation: isolate; }
.game::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 4px); }
.game img { width: 76px; height: 76px; image-rendering: pixelated; border-radius: 16px; margin-bottom: auto; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .5); }
.game b { font-family: var(--display); font-size: 1.05rem; line-height: 1.15; }
.game span { font-size: .78rem; opacity: .85; line-height: 1.3; }
.game em { position: absolute; top: 12px; right: 12px; font-style: normal; font-size: .68rem; font-weight: 700; padding: 3px 7px; border-radius: 7px; background: rgba(255, 255, 255, .18); }

/* tab bar */
.tabbar { position: fixed; z-index: 12; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 6px calc(8px + var(--safe-r)) calc(6px + var(--safe-b)) calc(8px + var(--safe-l));
  background: color-mix(in srgb, var(--raised) 88%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 48px; font-size: .72rem; font-weight: 600; color: var(--muted); }
.tab[aria-current="page"] { color: var(--ink); }
.tab[aria-current="page"] .i { color: var(--accent-ink); }

/* mini player */
.miniplayer { position: fixed; z-index: 11; left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px);
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; border-radius: 18px; background: var(--deep); color: #EAF3F0; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .55); }
@media (prefers-color-scheme: dark) { .miniplayer { background: #23495A; } }
.miniplayer .cover { width: 40px; flex: none; border-radius: 3px; }
.miniplayer .mp-text { flex: 1; min-width: 0; text-align: left; }
.miniplayer .mp-text b { display: block; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.miniplayer .mp-text span { display: block; font-size: .74rem; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.miniplayer .icon-btn { color: inherit; }
body.reading .miniplayer { display: none; }

/* sheets */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(4, 14, 18, .45); opacity: 0; transition: opacity .22s; }
.sheet { position: fixed; z-index: 51; left: 0; right: 0; bottom: 0; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 10px calc(20px + var(--safe-r)) calc(22px + var(--safe-b)) calc(20px + var(--safe-l)); border-radius: 24px 24px 0 0;
  background: var(--raised); color: var(--ink); transform: translateY(104%); transition: transform .3s cubic-bezier(.2, .85, .25, 1); box-shadow: 0 -10px 40px -20px rgba(0, 0, 0, .5); }
@media (min-width: 700px) { .sheet { left: 50%; right: auto; width: 560px; margin-left: -280px; } }
.sheet.open { transform: none; } .sheet-backdrop.open { opacity: 1; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 2px auto 10px; }
.sheet-close { position: absolute; top: 8px; right: calc(10px + var(--safe-r)); }
.sheet-title { font-family: var(--display); font-weight: 600; font-size: 1.15rem; margin: 6px 44px 14px 0; line-height: 1.25; }
.book-sheet .top { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: end; margin-top: 4px; }
.book-sheet h2 { font-family: var(--serif); font-size: 1.45rem; line-height: 1.15; margin: 0 0 6px; }
.book-sheet .by { color: var(--muted); font-size: .88rem; line-height: 1.4; }
.book-sheet .tagline { font-family: var(--serif); font-style: italic; font-size: 1.05rem; margin: 18px 0 8px; line-height: 1.4; }
.book-sheet .blurb { line-height: 1.55; margin: 0 0 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.facts li { font-size: .8rem; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 6%, transparent); font-variant-numeric: tabular-nums; }
.sheet .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sheet .actions .btn { flex: 1 1 140px; }
.sheet .note { margin: 14px 0 0; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; margin: 8px 0 18px; font-size: .92rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.steps { margin: 6px 0 16px; padding-left: 1.3em; line-height: 1.6; }
.credits { font-size: .8rem; color: var(--muted); line-height: 1.5; }

/* reader settings + toc */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 40px; padding: 0 12px; border-radius: 11px; border: 1.5px solid var(--line); font-size: .86rem; }
.seg button[aria-pressed="true"] { border-color: var(--mango); box-shadow: inset 0 0 0 1px var(--mango); }
.themes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 16px; }
.themes button { min-height: 52px; border-radius: 12px; font-size: .74rem; font-weight: 650; border: 1.5px solid rgba(0, 0, 0, .12); }
.themes button[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--mango); }
.row-ctl { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.row-ctl > span { font-weight: 600; font-size: .92rem; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 46px; height: 42px; border-radius: 11px; border: 1.5px solid var(--line); font-family: var(--serif); font-size: .9rem; }
.stepper button.big { font-size: 1.3rem; }
.stepper output { min-width: 2.4em; text-align: center; font-variant-numeric: tabular-nums; }
input[type="checkbox"] { width: 26px; height: 26px; accent-color: var(--mango); }
input[type="range"] { width: 100%; accent-color: var(--mango); }
select { min-height: 40px; border-radius: 11px; border: 1.5px solid var(--line); background: transparent; padding: 0 10px; max-width: 100%; }
.toc { display: grid; }
.toc-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; text-align: left; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.toc-item .toc-l { font-size: .74rem; color: var(--muted); grid-column: 1; }
.toc-item .toc-t { font-weight: 600; line-height: 1.3; grid-column: 1; }
.toc-item .toc-m { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.toc-item[aria-current="true"] .toc-t { color: var(--accent-ink); }
.toc-item.soon { opacity: .45; pointer-events: none; }

/* player sheet */
.player .art { width: min(62vw, 260px); margin: 6px auto 18px; }
.player h2 { text-align: center; font-family: var(--serif); font-size: 1.25rem; margin: 0 0 2px; line-height: 1.25; }
.player .sub { text-align: center; color: var(--muted); font-size: .88rem; margin: 0 0 16px; }
.player .times { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 4px; }
.player .ctrls { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 14px 0 18px; }
.player .ctrls .big { width: 74px; height: 74px; border-radius: 50%; background: var(--primary-bg); color: var(--primary-fg); display: inline-flex; align-items: center; justify-content: center; }
.player .ctrls .skip { width: 54px; height: 54px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; position: relative; }
.player .ctrls .skip small { position: absolute; font-size: .6rem; font-weight: 800; top: 50%; left: 50%; transform: translate(-50%, -35%); }

/* toast */
.toast { position: fixed; z-index: 70; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 84px); transform: translate(-50%, 20px); max-width: calc(100% - 40px);
  padding: 12px 16px; border-radius: 14px; background: #10303B; color: #EAF3F0; font-size: .9rem; line-height: 1.35; opacity: 0; pointer-events: none; transition: .25s; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.reading .toast { bottom: calc(var(--safe-b) + 70px); }

/* ---------- reader ---------- */
.reader { position: fixed; inset: 0; z-index: 30; background: var(--r-bg); color: var(--r-fg); overflow: hidden; }
.reader[data-theme="paper"] { --r-bg: #F5EFE3; --r-fg: #2B251D; --r-muted: #8B806F; --r-hl: rgba(240, 162, 59, .24); }
.reader[data-theme="sea"] { --r-bg: #E3EDE9; --r-fg: #13282A; --r-muted: #5D7673; --r-hl: rgba(31, 140, 130, .18); }
.reader[data-theme="dusk"] { --r-bg: #252A32; --r-fg: #D8D4CB; --r-muted: #8A8883; --r-hl: rgba(240, 162, 59, .2); }
.reader[data-theme="night"] { --r-bg: #000; --r-fg: #9C958A; --r-muted: #5A564F; --r-hl: rgba(240, 162, 59, .16); }
.reader[data-theme="sun"] { --r-bg: #FFF; --r-fg: #000; --r-muted: #4A4A4A; --r-hl: rgba(240, 162, 59, .32); }
.reader[data-theme="sun"] .r-pages { font-weight: 500; }
.r-head, .r-foot { position: absolute; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--r-muted); pointer-events: none; font-family: var(--sans);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 60px; font-variant-numeric: tabular-nums; }
.r-head { top: calc(var(--safe-t) + 10px); }
.r-foot { bottom: calc(var(--safe-b) + 10px); }
.r-viewport { position: absolute; left: var(--safe-l); right: var(--safe-r); top: calc(var(--safe-t) + 38px); bottom: calc(var(--safe-b) + 38px); overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.r-pages { position: absolute; top: 0; left: 0; column-fill: auto; font-family: var(--r-font); font-size: var(--r-size); line-height: var(--r-leading); text-align: var(--r-align);
  -webkit-hyphens: auto; hyphens: auto; hanging-punctuation: first; orphans: 2; widows: 2; will-change: transform; font-kerning: normal; text-rendering: optimizeLegibility; }
.r-pages p { margin: 0; text-indent: 1.25em; }
.r-pages .ch-head + p, .r-pages .sb + p, .r-pages h2 + p, .r-pages blockquote + p, .r-pages .verse + p { text-indent: 0; }
.r-pages .ch-head + p::first-line { font-variant-caps: small-caps; letter-spacing: .03em; }
.ch-head { padding-top: 14vh; margin-bottom: 2.4em; text-align: left; break-inside: avoid; }
.ch-label { font-family: var(--display); font-size: .7em; letter-spacing: .14em; color: var(--r-muted); }
.ch-title { font-family: var(--display); font-weight: 600; font-size: 1.6em; line-height: 1.1; margin: .3em 0 0; -webkit-hyphens: manual; hyphens: manual; text-align: left; }
.sb { text-align: center; color: var(--r-muted); margin: .8em 0; letter-spacing: .6em; text-indent: .6em; }
.r-pages h2 { font-family: var(--display); font-size: 1em; font-weight: 600; margin: 1.2em 0 .6em; text-align: center; break-after: avoid; }
.r-pages blockquote { margin: .8em 1.1em; font-style: italic; }
.r-pages .verse { margin: .8em 0 .8em 1.4em; text-align: left; font-style: italic; }
.r-pages .sc { font-variant-caps: small-caps; }
.r-pages .speaking { background: var(--r-hl); border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.end-sentinel { height: 1px; }
.r-chrome { position: absolute; left: 0; right: 0; z-index: 3; background: color-mix(in srgb, var(--r-bg) 94%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: transform .24s cubic-bezier(.2, .85, .25, 1), opacity .2s; color: var(--r-fg); }
.r-top { top: 0; display: flex; align-items: center; gap: 2px; padding: calc(var(--safe-t) + 4px) calc(8px + var(--safe-r)) 6px calc(8px + var(--safe-l)); border-bottom: 1px solid color-mix(in srgb, var(--r-fg) 10%, transparent); }
.r-top .r-title { flex: 1; min-width: 0; text-align: center; font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-btn { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border-radius: 12px; color: var(--r-fg); font-weight: 600; font-size: .9rem; padding: 0 6px; }
.r-btn.aa { font-family: var(--serif); font-size: 1.15rem; }
.r-bottom { bottom: 0; padding: 12px calc(20px + var(--safe-r)) calc(var(--safe-b) + 12px) calc(20px + var(--safe-l)); border-top: 1px solid color-mix(in srgb, var(--r-fg) 10%, transparent); }
.r-chapter { font-size: .85rem; font-weight: 600; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-meta { display: flex; justify-content: space-between; font-size: .75rem; color: var(--r-muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.reader:not(.ui) .r-top { transform: translateY(-105%); opacity: 0; pointer-events: none; }
.reader:not(.ui) .r-bottom { transform: translateY(105%); opacity: 0; pointer-events: none; }
.r-audio { position: absolute; z-index: 2; right: calc(14px + var(--safe-r)); bottom: calc(var(--safe-b) + 46px); height: 44px; padding: 0 14px 0 10px; border-radius: 22px;
  display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 650; background: color-mix(in srgb, var(--r-fg) 10%, var(--r-bg)); color: var(--r-fg); font-variant-numeric: tabular-nums; }
.r-end { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 30px; text-align: center; background: var(--r-bg); }
.r-end h2 { font-family: var(--display); font-size: 1.6rem; margin: 0; }
.r-end p { margin: 0; max-width: 26em; line-height: 1.5; color: var(--r-muted); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
