@font-face {
  font-family: 'Instrument Sans';
  src: url('./assets/fonts/instrument-sans.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto Condensed';
  src: url('./assets/fonts/anthos-condensed.woff2') format('woff2');
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #17231e;
  --muted: #4c5e54;
  --frame: #cbd6cd;
  --background: #eaf0ea;
  --paper: #fbfcf9;
  --forest: #20392f;
  --dark: #183027;
  --lime: #d9e7ac;
  --radius: 3px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', system-ui, sans-serif;
  --header-font: 'Roboto Condensed', 'Arial Narrow', var(--sans);
  --mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --settle: cubic-bezier(.2,.8,.2,1);
  background: var(--background);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:enabled { cursor: pointer; }
[hidden] { display: none !important; }
body[data-reader-concealed] > :not(.reader-session-lock) { display: none !important; }
.reader-session-lock { padding-block: 5rem; }
.reader-session-lock .button { margin-inline-end: .5rem; }
:focus-visible { outline: 2px solid #54785e; outline-offset: 3px; }
::selection { color: var(--ink); background: #e0e9b5; }
a { color: inherit; }
p, h1, h2, h3 { margin: 0; }
img { max-width: 100%; display: block; object-fit: cover; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
[data-icon] { display: inline-grid; place-items: center; flex: none; line-height: 0; }
.shell { width: min(calc(100% - 112px), 1136px); margin-inline: auto; }

.site-header { border-bottom: 1px solid #3a5947; background: #10241b; color: var(--paper); }
.header-inner {
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 64px;
}
.wordmark, .text-button { border: 0; background: transparent; padding: 0; min-height: 44px; }
.wordmark {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 8px;
  font: 600 1.6rem/.95 var(--header-font);
  letter-spacing: -.025em;
  white-space: nowrap;
}
.brand-mark {
  flex: none;
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.workspace-nav {
  display: flex;
  align-self: stretch;
  gap: clamp(16px, 3vw - 8px, 36px);
}
.workspace-nav a {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--frame);
  font: 600 .86rem/1 var(--header-font);
  letter-spacing: .035em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .15s ease;
}
.workspace-nav a[aria-current="page"], .workspace-nav a:focus-visible { color: var(--paper); }
.workspace-nav a[aria-current="page"]::after {
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--paper);
  content: '';
}
.header-tab-icon, .header-label-short { display: none; }
.header-actions { display: flex; justify-self: end; align-items: center; gap: 12px; }
.header-anthos {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 600 .88rem/1.2 var(--header-font);
  letter-spacing: .025em;
  text-decoration: underline;
  text-underline-offset: .22em;
  white-space: nowrap;
}
.site-header :where(a, button):focus-visible { outline-color: var(--lime); }
@media (hover: hover) {
  .workspace-nav a:hover { color: var(--paper); }
  .header-anthos:hover { color: var(--lime); }
}
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 45px; padding: 0 15px; border: 1px solid transparent; border-radius: var(--radius);
  font-weight: 650; font-size: .92rem; white-space: nowrap;
  transition: transform .18s var(--settle), background-color .18s ease, border-color .18s ease;
  touch-action: manipulation;
}
.button:enabled:active, .icon-button:enabled:active { transform: translateY(1px) scale(.98); }
.button:disabled { opacity: .5; }
.button svg { width: 18px; height: 18px; }
.button-primary { background: var(--forest); color: var(--paper); }
.button-primary:enabled:hover { background: #294d3c; }
.button-import {
  min-height: 40px;
  padding-inline: 11px;
  background: var(--dark);
  color: var(--paper);
  border-color: color-mix(in srgb, var(--frame) 65%, transparent);
  font: 600 .88rem/1.2 var(--header-font);
}
.button-import:enabled:hover {
  background: var(--paper);
  color: var(--forest);
}
.button-secondary { background: var(--paper); border-color: var(--frame); }
.button-secondary:enabled:hover { background: var(--background); border-color: #a7b8a9; }

.library { position: relative; padding-top: 52px; }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: 25px; }
.library-heading h1 { font-size: 4rem; line-height: .98; letter-spacing: -.04em; font-weight: 650; }
.library-search {
  position: relative; display: flex; align-items: center; gap: 9px; width: min(100%, 245px);
  min-height: 45px; padding: 0 13px; border: 1px solid var(--frame); border-radius: var(--radius); background: var(--paper); color: var(--muted);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.library-search:focus-within { border-color: #6c8572; box-shadow: 0 0 0 2px #6c857224; }
.library-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: .9rem; }
.library-search input::placeholder { color: var(--muted); opacity: 1; }
.search-icon { position: relative; flex: none; width: 13px; height: 13px; border: 1.6px solid currentColor; border-radius: 50%; margin-right: 2px; }
.search-icon::after { content: ''; position: absolute; width: 6px; height: 1.6px; background: currentColor; border-radius: 2px; right: -4px; bottom: -2px; transform: rotate(48deg); }

.featured {
  min-height: 374px; display: grid; grid-template-columns: minmax(0, 47fr) minmax(0, 53fr);
  overflow: hidden; border: 1px solid var(--frame); border-radius: var(--radius); background: var(--paper);
}
.featured-copy {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  min-width: 0; padding: clamp(32px, 5vw, 66px);
}
.featured h2 {
  max-width: 13ch; font: 500 clamp(2.5rem, 4.6vw, 4.35rem)/.99 var(--serif);
  letter-spacing: -.04em; overflow-wrap: anywhere; text-wrap: balance;
}
.featured-details { display: flex; flex-wrap: wrap; gap: 7px 13px; margin-top: 15px; color: var(--muted); }
.featured-author { font-size: .96rem; line-height: 1.52; }
.featured-kind { border: 1px solid #cfdad0; border-radius: var(--radius); background: #ecf2e9; padding: 3px 7px; font-size: .74rem; line-height: 1.3; font-weight: 650; }
.featured-kind:empty { display: none; }
.featured .button { margin-top: 30px; }
.featured-showcase {
  position: relative; display: grid; place-items: center; min-width: 0; padding: 27px 22px;
  overflow: hidden; isolation: isolate; perspective: 820px; border: 0;
  background: radial-gradient(ellipse at 47% 43%, #4b6a55 0%, #2d4a3b 52%, #1f392e 100%);
  text-align: center; touch-action: manipulation;
}
.featured-showcase::before, .featured-showcase::after {
  position: absolute; z-index: -1; left: 50%; top: 50%; width: min(74%, 389px); aspect-ratio: 1;
  border: 1px solid #e4edce1c; border-radius: 50%; content: '';
  transform: translate(-50%, -50%);
}
.featured-showcase::after { width: min(88%, 454px); border-color: #e4edce0d; }
.featured-showcase:focus-visible { outline-color: var(--lime); outline-offset: -5px; }

.shelf { margin-top: 35px; }
.shelf h2 { font-size: 1.43rem; letter-spacing: -.025em; font-weight: 650; }
.book-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(245px, 100%), 1fr)); gap: 10px; margin-top: 13px; }
.book-meta { display: grid; gap: 4px; min-width: 0; }
.book-meta strong { font-weight: 650; font-size: 1rem; line-height: 1.2; overflow-wrap: anywhere; }
.book-meta small { color: var(--muted); overflow-wrap: anywhere; }
.library-empty { padding: 2rem 0; color: var(--muted); }
.library-footer { margin-top: 32px; padding: 17px 0 25px; border-top: 1px solid var(--frame); color: var(--muted); font-size: .82rem; }
.book-drop { position: absolute; inset: 16px -10px; z-index: 4; display: grid; place-items: center; border: 2px dashed #527661; border-radius: var(--radius); background: #e5eee7e8; pointer-events: none; }
.book-drop span { padding: 13px 17px; border-radius: var(--radius); background: var(--forest); color: var(--paper); font-weight: 650; }

body:has(.reader:not([hidden])) .site-header { display: none; }
.reader {
  --reader-paper: #fcfaf0;
  --reader-surround: #e9ece3;
  --reader-ink: #263125;
  --reader-font: var(--serif);
  --reader-font-size: 22px;
  --reader-rule: color-mix(in srgb, var(--reader-ink) 18%, transparent);
  --reader-muted: color-mix(in srgb, var(--reader-ink) 77%, var(--reader-paper));
  --reader-accent: color-mix(in srgb, #3b7852 62%, var(--reader-ink));
  --reader-active-ink: #fff;
  --page-measure: 590px;
  --page-leading: 1.56;
  min-height: 100svh;
  background: var(--reader-surround);
  color: var(--reader-ink);
}
.reader[data-paper='dusk'] { --reader-accent: #a8ccae; --reader-active-ink: #173022; }
.reader-tools {
  min-height: 68px; display: grid; grid-template-columns: 1fr minmax(0, 2fr) 1fr;
  gap: 9px; align-items: center; max-width: 860px;
}
.reader-tools h1 { text-align: center; color: var(--reader-muted); font: 630 .88rem/1.2 var(--sans); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.reader-tools h1:focus { outline: none; }
.reader-tool-group { display: flex; justify-content: end; gap: 2px; }
.reader-tools .back-button { min-height: 44px; padding-inline: 7px 10px; }
.reader-tools .back-button:hover { color: inherit; }
.reader-tools .icon-button { flex: none; }
.reader[data-controls='hidden'] :is(.back-button, .reader-tools h1, .reader-tool-group [data-panel], .edition-bar, .reader-controls) { visibility: hidden; }
#reading-controls { color: var(--reader-muted); }
.reader[data-controls='hidden'] #reading-controls { opacity: .70; }
.text-button { display: inline-flex; align-items: center; gap: 5px; justify-self: start; font-size: .88rem; font-weight: 650; }
.text-button:hover { color: #385c48; text-decoration: underline; text-underline-offset: 4px; }
.icon-button {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid transparent;
  border-radius: var(--radius); background: transparent; transition: background-color .15s, transform .15s;
}
.icon-button:enabled:hover { background: #73826d1a; }
.icon-button:disabled { opacity: .32; }
.appearance-button { font: 600 1.1rem var(--serif); }
.edition-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; max-width: 860px; padding-bottom: 12px; }
.edition-bar:not(:has(button:nth-child(2))) { display: none; }
.edition-option {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; border: 1px solid var(--reader-rule);
  border-radius: var(--radius); background: transparent; padding: 8px 11px; font-size: .82rem; font-weight: 650;
  transition: background-color .15s, border-color .15s;
}
.edition-option svg { width: 16px; height: 16px; }
.edition-option:enabled:hover { border-color: #7e9380; }
.edition-option[aria-pressed='true'] { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.reading-wrap { max-width: 860px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.page-stage {
  position: relative; min-width: 0; overflow: clip;
  border-radius: 4px; box-shadow: 0 13px 36px #14241b12;
  touch-action: pan-y pinch-zoom;
}
.page {
  display: flex; flex-direction: column;
  margin: 0 auto; min-height: clamp(400px, calc(100svh - 166px), 870px);
  padding: clamp(29px, 5.35vh, 60px) clamp(25px, 8vw, 112px) clamp(24px, 4.5vh, 50px);
  background: var(--reader-paper); color: var(--reader-ink);
  border: 1px solid var(--reader-rule); border-radius: inherit; overflow-wrap: anywhere;
}
.page[data-mode='original'] { padding: 15px; }
.page > .page-reading { width: min(100%, var(--page-measure)); margin-inline: auto; }
.page-running, .page-folio {
  color: var(--reader-muted);
  font: 620 .65rem/1.35 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.page-running {
  min-height: 15px;
  margin-bottom: clamp(22px, 3.6vh, 38px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-folio { margin-top: auto; padding-top: 28px; text-align: center; font-variant-numeric: tabular-nums; }
.page-reading :is(h2, .page-chapter-title) {
  margin: 0 0 .64em;
  font: 500 clamp(1.9rem, 5.7vw, 3.2rem)/1.04 var(--reader-font);
  letter-spacing: -.034em;
  text-wrap: pretty;
}
.page-reading p[data-start]:not(.page-chapter-title) {
  font: 400 var(--reader-font-size)/var(--page-leading) var(--reader-font);
  white-space: pre-line;
}
.page-reading p[data-start] + p[data-start]:not(.page-chapter-title) { margin-top: .72em; }
.page-turn-layer {
  position: absolute; inset: 0 0 auto; z-index: 1;
  pointer-events: none; user-select: none;
}
.page-turn-layer > :is(.page, canvas, .page-curl-reverse) {
  position: absolute; inset: 0; width: 100%;
}
.page-turn-layer > :is(.page-curl-front, canvas, .page-curl-reverse) { height: 100%; }
.page-turn-layer > .page-curl-front { z-index: 1; }
.page-curl-reverse {
  z-index: 2; transform-origin: 0 0;
  background: var(--reader-paper);
  box-shadow: inset 0 0 70px #17201a20, inset 0 0 1px 1px #30392a2e;
}
.page-curl-reverse > .page {
  height: 100%; border-color: transparent; background: transparent; opacity: .16;
}
.page-curl-shading { z-index: 3; }
mark.annotation-mark, mark.spoken-mark { color: inherit; padding-block: 1px; }
mark.annotation-mark { background: #edc45f88; }
mark.spoken-mark { background: #87b99a8c; }
.pdf-canvas { display: block; max-width: 100%; height: auto; margin-inline: auto; background: white; }
.reader-controls {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, .69fr);
  gap: 6px 26px; align-items: center; margin-top: 10px;
}
.page-nav { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 5px; align-items: center; }
.page-position { min-width: 0; text-align: center; }
#reading-progress { display: block; width: 100%; min-height: 28px; margin: 0; accent-color: var(--reader-accent); cursor: pointer; }
.page-caption { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 9px; }
#page-count { font-size: .75rem; font-weight: 650; }
#page-context { font-size: .72rem; color: var(--reader-muted); }
.page-turn { color: var(--reader-ink); }
.reader-dock {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px;
  padding: 3px; border: 1px solid var(--reader-rule); border-radius: 5px;
  color: var(--reader-ink); background: color-mix(in srgb, var(--reader-paper) 68%, transparent);
}
.reader-dock button {
  display: grid; place-items: center; gap: 2px; padding: 5px 2px; min-height: 44px; font-size: .69rem; font-weight: 640;
  background: transparent; border: 0; border-radius: var(--radius); transition: background-color .17s, color .17s, transform .17s;
}
.reader-dock button:hover { background: color-mix(in srgb, var(--reader-ink) 8%, transparent); }
.reader-dock button:active { transform: translateY(1px) scale(.98); }
.reader-dock button[aria-pressed='true'] { background: var(--reader-accent); color: var(--reader-active-ink); }
.reader-dock #listen[data-state='loading'] { background: color-mix(in srgb, var(--reader-accent) 15%, var(--reader-paper)); color: var(--reader-ink); }
.reader-dock button svg { width: 18px; height: 18px; }
.playback-status { grid-column: 1/-1; margin: 2px auto 0; color: var(--reader-muted); text-align: center; line-height: 1.4; font-size: .8rem; }

dialog { color: var(--ink); }
dialog::backdrop { background: #152b2478; }
.panel[open] { animation: panel-in .22s var(--settle) both; }
@keyframes panel-in { from { transform: translateY(7px) scale(.985); opacity: .72; } to { transform: none; opacity: 1; } }
.panel { border: 1px solid var(--frame); border-radius: var(--radius); width: min(465px, calc(100% - 28px)); max-height: 82dvh; margin: auto; padding: 20px; background: var(--paper); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--frame); }
.panel h2 { font: 650 1.35rem/1.1 var(--sans); letter-spacing: -.025em; }
.panel h3 { font-size: .83rem; line-height: 1.4; color: var(--muted); margin: 16px 0 9px; }
.panel-group { display: grid; gap: 10px; margin-top: 14px; }
.field { display: grid; gap: 6px; font-size: .88rem; font-weight: 650; }
.field input[type='range'] { width: 100%; accent-color: var(--forest); min-height: 30px; }
.field output { font-size: .81rem; color: var(--muted); }
.field select,.field textarea { width: 100%; padding: 9px; border: 1px solid #b7bdab; border-radius: var(--radius); background: #fcfbf4; color: var(--ink); }
.field textarea { min-height: 120px; resize: vertical; font-weight: 420; }
.switch-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; font-size: .88rem; }
.switch-row input { accent-color: var(--forest); width: 17px; height: 17px; }
.panel-action { margin-top: 13px; }
.panel-row {
  width: 100%; display: block; padding: 9px 0; text-align: start; min-height: 42px; border: 0;
  border-bottom: 1px solid var(--frame); background: transparent; font-size: .92rem;
  white-space: normal; overflow-wrap: anywhere;
}
.panel-row:hover { color: #496541; }
.panel-row[aria-current] { font-weight: 720; }
.panel-status { color: var(--muted); font-size: .88rem; line-height: 1.5; margin-top: 13px; }
.audio-group { gap: 12px; min-width: 0; }
.audio-group + .audio-group { border-top: 1px solid var(--frame); padding-top: 15px; margin-top: 17px; }
.audio-group h3 { margin: 0; color: var(--ink); font-size: 1rem; }
.audio-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.audio-actions .button { flex: 1 1 auto; min-height: 42px; padding-inline: 10px; font-size: .83rem; }
.audio-help { margin: -3px 0 0; color: var(--muted); font-size: .81rem; line-height: 1.44; }
.audio-status:empty { display: none; }
.notes-list { padding: 0; margin: 14px 0 0; list-style: none; display: grid; gap: 10px; }
.note-item { min-width: 0; border: 1px solid var(--frame); padding: 12px; border-radius: var(--radius); overflow-wrap: anywhere; }
.note-item blockquote, .note-quote { font: italic 1rem/1.45 var(--serif); border-left: 3px solid #a6b285; padding-left: 9px; margin: 8px 0; }
.note-item p { white-space: pre-wrap; line-height: 1.45; }
.note-item small { color: var(--muted); }
.note-actions { display: flex; flex-wrap: wrap; gap: 5px 16px; }
.note-actions button { min-height: 35px; border: 0; background: transparent; padding: 0; font-size: .82rem; font-weight: 640; text-decoration: underline; text-underline-offset: 3px; }
.note-buttons { display: flex; gap: 8px; margin-top: 12px; }
.focus {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; border: 0; padding: 0; margin: 0;
  background: var(--reader-paper, #fcfaf0); color: var(--reader-ink, #263125);
}
.focus[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.focus-header, .focus-footer {
  width: min(calc(100% - 46px), 880px); margin-inline: auto; display: flex;
  align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0;
}
.focus-header { border-bottom: 1px solid color-mix(in srgb, currentColor 24%, transparent); }
.focus-header h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; font-weight: 650; }
.focus-header .icon-button, .focus-footer .icon-button { flex: none; color: inherit; }
.focus-sentence {
  --focus-font-size: clamp(1.85rem, 5.25vw, 4rem);
  display: grid; align-content: safe center; min-height: 0; overflow-y: auto; width: 100%; border: 0;
  padding: 28px max(24px, calc((100% - 910px) / 2));
  background: transparent; color: inherit; overflow-wrap: anywhere; text-wrap: pretty;
  font-family: var(--reader-font, var(--serif)); font-size: var(--focus-font-size);
  line-height: 1.23; font-weight: 400; letter-spacing: -.035em; touch-action: pan-y;
}
.focus-sentence:focus-visible { outline: 2px solid currentColor; outline-offset: -5px; }
.focus-footer { border-top: 1px solid color-mix(in srgb, currentColor 24%, transparent); text-align: center; padding-bottom: max(22px, env(safe-area-inset-bottom)); }
.focus-footer p { font-size: .87rem; }
#focus-count { margin-top: 4px; font: 500 .72rem/1.35 var(--mono); opacity: .76; }
.selection-tools {
  display: inline-flex; align-items: center; gap: 3px; position: fixed; padding: 4px;
  border-radius: var(--radius); color: var(--paper); background: var(--dark); z-index: 5; box-shadow: 0 5px 16px #14201943;
}
.selection-tools button { display: flex; align-items: center; gap: 6px; background: transparent; border: 0; border-radius: var(--radius); padding: 8px; min-height: 36px; font-weight: 650; font-size: .8rem; }
.selection-tools button:hover { background: #ffffff24; }
.selection-tools svg { width: 17px; height: 17px; }
.toast {
  position: fixed; z-index: 6; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  min-width: min(calc(100% - 24px), 270px); max-width: min(calc(100% - 24px), 560px); padding: 11px 16px;
  border-radius: var(--radius); background: var(--dark); color: var(--paper); text-align: center; box-shadow: 0 5px 16px #14201943;
  font-size: .88rem; line-height: 1.45;
}
@media (max-width: 900px) {
  .shell { width: calc(100% - 58px); }
  .featured { min-height: 323px; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 880px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 55px auto;
    min-height: 0;
    gap: 0 8px;
  }
  .wordmark { font-size: 1.38rem; }
  .workspace-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid color-mix(in srgb, var(--frame) 32%, transparent);
  }
  .workspace-nav a {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-height: 52px;
    padding: 3px 1px 5px;
    font: 650 .72rem/1.04 var(--sans);
    letter-spacing: 0;
    text-transform: none;
  }
  .workspace-nav a[aria-current="page"]::after {
    inset-inline: 0;
    width: 22px;
    margin-inline: auto;
  }
  .header-tab-icon { display: inline-grid; }
  .header-tab-icon svg { width: 16px; height: 16px; }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 32px); }
  .wordmark { gap: 7px; font-size: 1.25rem; }
  .brand-mark { width: 29px; height: 29px; }
  .header-actions { gap: 9px; }
  .header-label-full { display: none; }
  .header-label-short { display: inline; }
  .button-import { min-height: 38px; padding-inline: 8px; }
  .button-import svg { width: 15px; height: 15px; }
  .library { padding-top: 28px; }
  .library-heading { align-items: start; flex-direction: column; gap: 15px; margin-bottom: 17px; }
  .library-heading h1 { font-size: 3rem; }
  .library-search { width: 100%; }
  .featured { grid-template-columns: 1fr; min-height: auto; }
  .featured-showcase { grid-row: 1; min-height: 206px; padding-block: 18px; }
  .featured-showcase::before { width: 198px; }
  .featured-showcase::after { width: 237px; }
  .featured-copy { padding: 23px 20px 22px; }
  .featured h2 { max-width: none; font-size: 2.49rem; }
  .featured-details { margin-top: 10px; }
  .featured .button { margin-top: 19px; }
  .shelf { margin-top: 27px; }
  .library-footer { margin-top: 25px; }
  .reader-tools { min-height: 55px; grid-template-columns: 77px minmax(0,1fr) 132px; gap: 4px; }
  .reader-tool-group { gap: 0; }
  .back-button { gap: 0; }
  .reading-wrap { width: 100%; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .page-stage { border-radius: 0; box-shadow: none; }
  .page {
    min-height: clamp(350px, calc(100svh - 181px), 900px);
    padding: clamp(22px, 4vh, 32px) clamp(23px, 6.5vw, 42px) clamp(18px, 3.6vh, 30px);
    border-inline: 0;
  }
  .page[data-mode='original'] { padding: 6px; }
  .page-running { margin-bottom: clamp(19px, 3.4vh, 31px); }
  .page-folio { padding-top: 21px; }
  .reader-controls { grid-template-columns: minmax(0, 1fr); gap: 4px; padding-inline: 16px; margin-top: 3px; }
  .reader-dock { width: min(100%, 380px); margin-inline: auto; }
  .edition-bar { padding-bottom: 10px; }
  .focus-header, .focus-footer { width: calc(100% - 36px); padding-top: 13px; padding-bottom: max(13px, env(safe-area-inset-bottom)); }
}
@media (max-width: 335px) {
  .shell { width: calc(100% - 24px); }
  .wordmark { gap: 6px; font-size: 1.12rem; }
  .brand-mark { width: 24px; height: 24px; }
  .header-actions { gap: 6px; }
  .button-import { gap: 5px; padding-inline: 7px; }
  .reader-tools { grid-template-columns: 44px minmax(0, 1fr) 132px; }
  .reader-tools .back-button { justify-self: stretch; justify-content: center; padding: 0; }
  .reader-tools .back-button > :last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  .page-turn-layer { display: none; }
}


.clone-form input[type='text'] {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line, #bdccc0);
  border-radius: var(--radius);
  background: var(--paper, #f8faf7);
  color: var(--ink);
}

.clone-form > .audio-help { margin: 0; }
.clone-confirmation { min-height: 44px; }
.clone-confirmation input { flex: none; }
.clone-form .audio-actions { flex-wrap: wrap; }
.clone-form .audio-actions .field { width: 100%; }
.clone-form #clone-status { margin-block: 0; }
.clone-form .clone-actions { margin-block-start: 3px; }
.clone-form #clone-record[aria-pressed='true'] {
  background: var(--forest, #264536);
  color: #fff;
}
