@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/literata-latin-ext-400-normal.woff2?v=1d0ff814dc80ea4f7fec416f91972eceea148bd3") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/literata-latin-400-normal.woff2?v=1d0ff814dc80ea4f7fec416f91972eceea148bd3") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/literata-latin-ext-400-italic.woff2?v=1d0ff814dc80ea4f7fec416f91972eceea148bd3") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/literata-latin-400-italic.woff2?v=1d0ff814dc80ea4f7fec416f91972eceea148bd3") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/literata-latin-ext-600-normal.woff2?v=1d0ff814dc80ea4f7fec416f91972eceea148bd3") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/literata-latin-600-normal.woff2?v=1d0ff814dc80ea4f7fec416f91972eceea148bd3") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/literata-latin-ext-700-normal.woff2?v=1d0ff814dc80ea4f7fec416f91972eceea148bd3") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/literata-latin-700-normal.woff2?v=1d0ff814dc80ea4f7fec416f91972eceea148bd3") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/source-sans-3-latin-ext-400-normal.woff2?v=1d0ff814dc80ea4f7fec416f91972eceea148bd3") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/source-sans-3-latin-400-normal.woff2?v=1d0ff814dc80ea4f7fec416f91972eceea148bd3") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/source-sans-3-latin-ext-600-normal.woff2?v=1d0ff814dc80ea4f7fec416f91972eceea148bd3") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/source-sans-3-latin-600-normal.woff2?v=1d0ff814dc80ea4f7fec416f91972eceea148bd3") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/source-sans-3-latin-ext-700-normal.woff2?v=1d0ff814dc80ea4f7fec416f91972eceea148bd3") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/source-sans-3-latin-700-normal.woff2?v=1d0ff814dc80ea4f7fec416f91972eceea148bd3") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root,
:root[data-theme="paper"] {
  color-scheme: light;
  --ink: #1f1b16;
  --paper: #f6f1e7;
  --accent: #85301d;
  --on-accent: #f6f1e7;
  --muted: #554b40;
  --line: #8e8170;
  --panel: #fffaf1;
  --focus: #704800;
  --danger-bg: #f3d6c6;
  --danger-ink: #3a1d12;
}
:root[data-theme="sepia"] {
  color-scheme: light;
  --ink: #2c2116;
  --paper: #f4e8d0;
  --accent: #7a3414;
  --on-accent: #f4e8d0;
  --muted: #5a4634;
  --line: #7d654c;
  --panel: #fbf3e4;
  --focus: #6a3400;
  --danger-bg: #f0d2bc;
  --danger-ink: #3a1d12;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ede5d6;
  --paper: #16140f;
  --accent: #e7b89a;
  --on-accent: #16140f;
  --muted: #cfc1ad;
  --line: #a89983;
  --panel: #252118;
  --focus: #ffd07a;
  --danger-bg: #4a2c22;
  --danger-ink: #f3e6df;
}
:root[data-theme="oled"] {
  color-scheme: dark;
  --ink: #8a8178;
  --paper: #000000;
  --accent: #9a8b78;
  --on-accent: #000000;
  --muted: #8a8178;
  --line: #6e6256;
  --panel: #141210;
  --focus: #b7a898;
  --danger-bg: #1c1410;
  --danger-ink: #c4b4a2;
}
:root[data-theme="contrast"] {
  color-scheme: light;
  --ink: #000000;
  --paper: #ffffff;
  --accent: #001a8a;
  --on-accent: #ffffff;
  --muted: #1a1a1a;
  --line: #000000;
  --panel: #ffffff;
  --focus: #000000;
  --danger-bg: #ffffff;
  --danger-ink: #000000;
}
:root[data-theme="auto"] {
  color-scheme: light;
  --ink: #1f1b16;
  --paper: #f6f1e7;
  --accent: #85301d;
  --on-accent: #f6f1e7;
  --muted: #554b40;
  --line: #8e8170;
  --panel: #fffaf1;
  --focus: #704800;
  --danger-bg: #f3d6c6;
  --danger-ink: #3a1d12;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    color-scheme: dark;
    --ink: #ede5d6;
    --paper: #16140f;
    --accent: #e7b89a;
    --on-accent: #16140f;
    --muted: #cfc1ad;
    --line: #a89983;
    --panel: #252118;
    --focus: #ffd07a;
    --danger-bg: #4a2c22;
    --danger-ink: #f3e6df;
  }
}

:root {
  --read-size: 1.2rem;
  --read-leading: 1.65;
  --read-measure: 40rem;
  --read-pad: 1.15rem;
}

* { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.skip {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  background: var(--paper);
  color: var(--ink);
  padding: 0.4rem 0.6rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.skip:focus { top: 0.5rem; z-index: 5; }
header {
  background: var(--panel);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 0.35rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}
.brand {
  font-family: Literata, Palatino, Georgia, serif;
  font-weight: 700;
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.menu-toggle { margin-left: auto; }
header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin-left: auto;
  align-items: center;
}
header nav a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  padding: 0 0.7rem;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}
header nav a:hover { border-bottom-color: var(--accent); color: var(--accent); }
@media (min-width: 761px) {
  .menu-toggle { display: none; }
}
@media (max-width: 760px) {
  html.js .menu-toggle { display: inline-flex; }
  html:not(.js) .menu-toggle { display: none; }
  html.js header nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
  }
  html.js header nav.is-open { display: flex; }
  header nav a { width: 100%; }
}
main {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}
h1, h2, h3, .brand { font-family: Literata, Palatino, Georgia, serif; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; font-weight: 700; margin: 0.2rem 0 0.8rem; letter-spacing: -0.03em; }
h2 { font-size: 1.35rem; line-height: 1.25; }
footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1rem;
}
form.search { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; margin: 1rem 0 1.2rem; }
label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.95rem; }
input, select, button, summary {
  font: inherit;
  color: inherit;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  padding: 0.45rem 0.7rem;
  min-height: 44px;
}
input[type="hidden"] {
  min-height: 0;
  padding: 0;
  border: 0;
}
button, .pager a, .menu-toggle, button.primary, a.primary, .clear-filters {
  min-height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button.primary, a.primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  font-weight: 700;
  min-height: 48px;
  padding: 0 1.3rem;
  border-radius: 0.2rem;
}
.catalog-form { display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.catalog-main { min-width: 0; }
.filters-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}
.filters-button, .sheet-close {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 0.9rem;
  cursor: pointer;
  line-height: 1;
}
.filter-sheet { display: none; }
.sheet-head { display: none; }
.facets { min-width: 0; }
.facet { border-bottom: 1px solid var(--line); padding: 0.35rem 0; }
.facet summary {
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 8px 0;
}
.facet summary::-webkit-details-marker { display: none; }
.facet summary::after { content: "▼"; margin-left: auto; font-size: 0.7rem; }
.facet .check { min-height: 44px; display: flex; flex-direction: row; align-items: center; gap: 0.5rem; }
.facet .check .label { flex: 1; min-width: 0; }
.facet .check.is-zero { color: var(--muted); }
.facet input[type="checkbox"] { width: 1.15rem; height: 1.15rem; min-width: 1.15rem; min-height: 1.15rem; }
.facet .count, .author-list .count {
  margin-left: auto;
  color: var(--muted);
  white-space: nowrap;
  flex: none;
  font-variant-numeric: tabular-nums;
}
.sheet-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  position: sticky;
  bottom: 0;
  background: var(--panel);
  padding: 0.6rem 0;
  z-index: 1;
}
.sheet-actions > * { flex: 1; min-height: 48px; }
.clear-long { display: none; }
.catalog-main .search { width: 100%; }
.chiprow, .termrow, .viewbar { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.viewbar { border-bottom: 1px solid var(--line); margin: 0.6rem 0; }
.viewbar a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 0.7rem; text-decoration: none; color: inherit; }
.viewbar a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -3px var(--accent); font-weight: 700; }
.chip { border: 1px solid var(--line); border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; padding: 0 0.8rem; text-decoration: none; color: inherit; }
.chip.active { border-color: var(--accent); color: var(--accent); }
.books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
.book { min-width: 0; }
.cover, .cover-0 {
  aspect-ratio: 4 / 5;
  background: #8d4b3a;
  color: #f6f1e7;
  border: 1px solid #8d4b3a;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  overflow: hidden;
}
.cover-1 { background: #3e6b4f; color: #f4f7f2; border-color: #3e6b4f; }
.cover-2 { background: #3e5678; color: #f3f6fa; border-color: #3e5678; }
.cover-3 { background: #8a6232; color: #fbf6ee; border-color: #8a6232; }
:root[data-theme="dark"] .cover,
:root[data-theme="dark"] .cover-0,
:root[data-theme="dark"] .cover-1,
:root[data-theme="dark"] .cover-2,
:root[data-theme="dark"] .cover-3 {
  color: #d5cec3;
  border-color: #3a342c;
}
:root[data-theme="dark"] .cover,
:root[data-theme="dark"] .cover-0 { background: #241816; }
:root[data-theme="dark"] .cover-1 { background: #162018; }
:root[data-theme="dark"] .cover-2 { background: #161c28; }
:root[data-theme="dark"] .cover-3 { background: #241c12; }
:root[data-theme="oled"] .cover,
:root[data-theme="oled"] .cover-0,
:root[data-theme="oled"] .cover-1,
:root[data-theme="oled"] .cover-2,
:root[data-theme="oled"] .cover-3 {
  background: #0c0c0c;
  color: #b7b1a6;
  border-color: #2a2a2a;
}
.cover small { letter-spacing: 0.14em; text-transform: uppercase; font: 600 10px "Source Sans 3", sans-serif; }
.cover strong { font: 600 22px/1.05 Literata, Palatino, Georgia, serif; overflow-wrap: anywhere; }
.cover em, .book .by { font: 12px "Source Sans 3", sans-serif; }
.book h2 { font-family: Literata, Palatino, Georgia, serif; font-size: 1.15rem; margin: 0.45rem 0 0.15rem; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .book h2, .book .by { display: none; }
}
.book h2 a { color: var(--ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.book .by { margin: 0; color: var(--muted); }
.author-group { grid-column: 1 / -1; margin: 0.4rem 0 0; }
.work-list, .author-list { list-style: none; padding: 0; margin: 0; }
.work-list li, .author-list li { position: relative; padding: 0; border-bottom: 1px solid var(--line); min-width: 0; }
.author-list li { display: flex; gap: 0.6rem; align-items: center; }
.work-list li > a, .author-list li > a, .catalog li > a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  text-decoration: none;
  font-family: Literata, Palatino, Georgia, serif;
  font-size: 1.125rem;
}
.author-list li > a::after, .catalog li > a::after { content: ""; position: absolute; inset: 0; }
.work-list .meta a, .meta a, .termrow a, .crumb a, .poems a, .clear-filters {
  position: relative;
  z-index: 1;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.incipit { font-style: italic; }
.untitled { font-family: "Source Sans 3", sans-serif; font-size: 0.75rem; letter-spacing: 0.08em; color: var(--muted); }
.poems { padding-left: 1.4rem; }
.poems a, .chapters a { min-height: 44px; display: flex; align-items: center; color: var(--ink); text-decoration: none; }
.detail { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.detail .cover { width: 180px; min-height: 220px; aspect-ratio: auto; }
@media (max-width: 700px) {
  .detail { grid-template-columns: 1fr; }
}
@media (min-width: 1024px) {
  .catalog-form { display: grid; grid-template-columns: 240px minmax(0, 1fr); column-gap: 2rem; align-items: start; }
  .filters-button { display: none; }
  .filter-sheet, .filters-toggle:checked ~ .filter-sheet {
    display: block;
    position: static;
    grid-column: 1;
    grid-row: 1;
    width: 240px;
    max-width: 240px;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }
  .catalog-main { grid-column: 2; grid-row: 1; }
  .books { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 22px; }
  .cover strong { font-size: clamp(20px, 2.4vw, 34px); }
  .filter-sheet button.show-results, .clear-short, .sheet-head { display: none; }
  .clear-long { display: inline-flex; }
  .catalog-form:has(.empty) .sheet-actions { display: none; }
}
@media (max-width: 1023px) {
  .filters-toggle:checked ~ .filter-sheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 40;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 85vh;
    overflow: hidden;
    background: var(--panel);
    color: var(--ink);
    border-radius: 1rem 1rem 0 0;
    padding: 0;
    box-shadow: 0 -10px 40px #0006;
  }
  .filters-toggle:checked ~ .filter-sheet .sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 1rem 0.2rem;
  }
  .filters-toggle:checked ~ .filter-sheet .facets { overflow: auto; padding: 0 1rem; }
  .filters-toggle:checked ~ .filter-sheet .sheet-actions { padding: 0.7rem 1rem; }
}
.catalog { list-style: none; padding: 0; margin: 0; }
.catalog li { position: relative; padding: 0; border-bottom: 1px solid var(--line); }
.meta, .crumb { margin: 0.25rem 0 0; color: var(--muted); }
.resultbar { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin: 0.4rem 0 0.8rem; }
.resultbar .sort { flex-direction: row; align-items: center; gap: 0.4rem; }
.resultbar select, .dir-toggle { width: auto; min-height: 44px; min-width: 44px; }
.dir-toggle { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; border: 1px solid var(--line); padding: 0 0.6rem; }
.pager { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1.2rem; }
.pager a { min-height: 44px; }
.chapters { list-style: none; padding: 0; margin: 0; }
.chapters li { border-bottom: 1px solid var(--line); }
.chapters a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0;
  text-decoration: none;
}
.reader {
  width: min(100%, var(--read-measure));
  margin-inline: auto;
  padding-inline: var(--read-pad);
}
.readerbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.crumb { font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 0.15rem 0.35rem; align-items: center; min-width: 0; }
.crumb a { min-height: 44px; min-width: 0; display: inline-flex; align-items: center; overflow-wrap: anywhere; }
.crumb a:not(:last-child)::after { content: " ›"; white-space: nowrap; }
.aa-toggle { min-width: 44px; white-space: nowrap; font-family: Literata, Palatino, Georgia, serif; font-size: 1.15rem; }
.aa-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.4rem 0.9rem;
  margin: 0.4rem 0 1rem;
}
.aa-panel label {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 50px;
}
.aa-panel select { min-width: 9rem; }
.chapter-pos { margin: 0.8rem 0 0.35rem; color: var(--muted); }
.progress { height: 4px; background: var(--line); margin: 0 0 1.4rem; }
.progress > span { display: block; height: 100%; background: var(--accent); }
.reading {
  font-family: Literata, Palatino, Georgia, serif;
  font-size: var(--read-size);
  line-height: var(--read-leading);
  overflow-wrap: anywhere;
}
.reading section { margin: 0.85em 0; }
.reading section.p { margin: 0.7em 0; }
.reading p { margin: 0.7em 0; }
.reading .stanza { margin: 0 0 1lh; }
.reading .stanza > br { display: none; }
.reading .verse {
  display: block;
  margin: 0;
  padding-inline-start: 1.5em;
  text-indent: -1.5em;
  white-space: normal;
}
.reading .verse.indent {
  padding-inline-start: 3em;
  text-indent: -1.5em;
}
.reading a.note-ref,
article a.note-ref {
  display: inline;
  position: relative;
  vertical-align: super;
  font-size: 0.72em;
  line-height: 1;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-decoration: none;
  color: var(--accent);
}
.reading a.note-ref::after,
article a.note-ref::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}
.reading a.note-back,
article a.note-back {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  position: relative;
}
.reader-nav { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.2rem 0; }
.reader-nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 0.2rem; }
aside.notes, aside.footnote {
  font-size: 0.95rem;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding-top: 0.6rem;
}
.note-pop {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  max-width: 36rem;
  width: calc(100% - 2rem);
  padding: 1rem 1.1rem 1.2rem;
}
.note-pop::backdrop { background: #0008; }
.note-pop p { margin: 0.4rem 0 0.8rem; }
.note-pop ul, .note-pop ol { list-style: none; margin: 0; padding: 0; }
.note-pop li { display: block; list-style: none; }
.note-pop li::marker { content: none; }
#note-pop-back { min-height: 44px; min-width: 44px; }
@media (max-width: 700px) {
  .note-pop {
    margin-top: auto;
    margin-bottom: 0;
    width: 100%;
    max-width: none;
    border-radius: 1rem 1rem 0 0;
  }
}
.license { border-top: 1px solid var(--line); margin-top: 1.5rem; }
.license summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
  border: 0;
  background: transparent;
  padding-inline: 0;
  gap: 0.5rem;
}
.license summary::-webkit-details-marker { display: none; }
.license summary::before { content: "▸"; transition: transform 0.15s; }
.license[open] summary::before { transform: rotate(90deg); }
.license summary::after { content: "pokaż"; margin-left: auto; font-weight: 400; font-size: 0.85rem; color: var(--muted); text-decoration: underline; }
.license[open] summary::after { content: "ukryj"; }
.attribution { margin-top: 0.6rem; font-size: 0.95rem; }
.notice { margin: 0.8rem 0 1.2rem; }
.notice p { margin: 0.3rem 0; }
.notice details { color: var(--muted); font-size: 0.85rem; }
.key { font-size: 0.8rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 0.75rem; max-width: 32rem; }
.stack label { gap: 0.3rem; }
fieldset.roles {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  margin: 0;
  padding: 0.7rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.form-error {
  background: var(--danger-bg);
  color: var(--danger-ink);
  border: 1px solid var(--line);
  padding: 0.6rem 0.8rem;
  border-radius: 0.4rem;
}
.check { flex-direction: row; align-items: center; gap: 0.55rem; min-height: 44px; }
input[type="checkbox"] { width: 1.15rem; height: 1.15rem; min-width: 1.15rem; min-height: 1.15rem; accent-color: var(--accent); }
fieldset.roles input[type="checkbox"] { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
footer details.build-info summary {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 44px;
  padding-inline: 0;
  display: flex;
  align-items: center;
}
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.empty { margin: 1.2rem 0; }
.empty h2 { margin-bottom: 0.3rem; }
.appearance { margin: 0 0 1.4rem; max-width: 32rem; }
.appearance label { min-height: 44px; }
@media (max-width: 480px) {
  main { width: min(72rem, calc(100% - 1.25rem)); }
}
@media (min-width: 761px) {
  button.menu-toggle { display: none; }
}
.session-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  align-items: center;
  margin: 0 0 1rem;
}
.session-bar .account { font-weight: 600; }
.session-bar form.logout { margin: 0; }
.merged-head {
  font-family: Literata, Palatino, Georgia, serif;
  font-size: 0.82rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 0.45rem;
}
.page-nav { display: none; }
html.js .reader[data-mode="pages"] .page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.6rem;
}
html.js .reader[data-mode="pages"] .page-nav button {
  min-height: 44px;
  min-width: 44px;
}
html.js .reader[data-mode="pages"] .page-frame {
  overflow: clip;
  width: 100%;
  max-width: 100%;
}
html.js .reader[data-mode="pages"] .reading {
  height: var(--page-h, 70vh);
  column-width: var(--page-w, 100%);
  column-gap: 0;
  column-fill: auto;
  overflow: visible;
}
@media (max-width: 700px) {
  html.pages-fixed { overflow: hidden; overscroll-behavior: none; }
  html.js .reader[data-mode="pages"] .page-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(3.7rem + env(safe-area-inset-bottom));
    z-index: 25;
    margin: 0;
    padding: 0.4rem 0.7rem calc(0.4rem + env(safe-area-inset-bottom));
    background: var(--paper);
    border-top: 1px solid var(--line);
  }
  html.js .reader[data-mode="pages"] .page-frame { touch-action: pan-x pinch-zoom; }
  html.js .reader[data-mode="pages"] { padding-bottom: 4.6rem; }
}

.page-frame { touch-action: pan-y; overscroll-behavior-x: contain; }
.crumb { flex-wrap: nowrap; overflow: hidden; flex: 1; }
.crumb a { display: block; line-height: 44px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chapter-pos { margin: 0; white-space: nowrap; }
.progress { margin-bottom: 0.3rem; }
.attribution a, .reader-nav a { display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 701px) { .sheet-actions { display: none; } }
@media (max-width: 700px) { .readerbar { flex-wrap: nowrap; } .chapter-pos { display: none; } }

html.js .reader[data-mode="pages"] { position: relative; }
html.js .reader[data-mode="pages"] .aa-panel {
  position: absolute; z-index: 30; right: 0; top: 44px;
  width: min(25rem, 100%); max-height: calc(100vh - 60px); overflow-y: auto;
  margin: 0; box-shadow: 0 0.4rem 1rem #0003;
}
html.js .reader[data-mode="pages"] .reading aside.notes,
html.js .reader[data-mode="pages"] .reading aside.footnote,
html.js .reader[data-mode="pages"] .reading aside[role="doc-endnotes"],
html.js .reader[data-mode="pages"] .reading section.notes,
html.js .reader[data-mode="pages"] .reading section[role="doc-endnotes"] { display: none; }
#notes-open[hidden] { display: none; }
@media (max-width: 700px) {
  html.js .reader[data-mode="pages"] .page-nav { gap: 0.2rem; }
  html.js .reader[data-mode="pages"] .page-nav button { padding-inline: 0.4rem; }
  #page-label { white-space: nowrap; font-size: 0.85rem; }
}

.reading-list { display: grid; gap: 1rem; }
.reading-card { display: flex; align-items: flex-start; gap: 1rem; }
.reading-card .cover { flex: 0 0 64px; width: 64px; height: 96px; min-height: 0; aspect-ratio: auto; padding: 6px; font-size: 0.65rem; }
.reading-card h3, .reading-card p { margin: 0 0 0.25rem; }
.book h3 a { display: inline-flex; align-items: center; min-height: 44px; }
.page-nav button, #page-label { white-space: nowrap; }

.reader-brand, .fullscreen-toggle { display: none; }
.size-steps { display: flex; gap: 0.5rem; }
.size-steps button { min-width: 44px; }
@media (max-width: 700px) {
  html.js:has(.reader) body > header { display: contents; }
  html.js:has(.reader) body > header .brand { display: none; }
  html.js:has(.reader) body > header .menu-toggle { position: absolute; top: env(safe-area-inset-top); right: 0; z-index: 31; min-width: 44px; padding-inline: 0.3rem; }
  html.js:has(.reader) body > header nav.is-open { display: flex; position: absolute; top: calc(48px + env(safe-area-inset-top)); right: 0; z-index: 32; background: var(--panel); border: 1px solid var(--line); }
  html.js:has(.reader) main { width: 100%; padding: 0; }
  html.js:has(.reader) .reader { width: 100%; padding-top: env(safe-area-inset-top); }
  html.js:has(.reader) .readerbar { height: 46px; gap: 0.2rem; margin-inline: calc(-1 * var(--read-pad)); padding-left: 0.35rem; padding-right: 3.5rem; }
  html.js:has(.reader) .reader-brand { display: inline-flex; align-items: center; height: 44px; color: var(--ink); font-weight: 700; text-decoration: none; }
  html.js:has(.reader) .crumb a:first-child:not(:last-child) { display: none; }
  html.js:has(.reader) .crumb a { text-overflow: ellipsis; }
  html.js:has(.reader) .fullscreen-toggle:not([hidden]) { display: inline-flex; min-width: 44px; padding-inline: 0.4rem; }
  html.js:has(.reader) .progress { height: 2px; margin: 0 calc(-1 * var(--read-pad)); }
  html.js .reader[data-mode="pages"] .reader-nav { display: none; }
  html.js .reader[data-mode="pages"] .reading h1 { font-size: 1.5rem; }
  html.js .reader[data-mode="pages"] .merged-head { font-size: 0.75rem; margin: 0; }
  html.js .reader[data-mode="pages"] .page-nav { height: calc(45px + env(safe-area-inset-bottom)); padding: 0 0.7rem env(safe-area-inset-bottom); }
  html.reader-immersive .readerbar, html.reader-immersive .progress, html.reader-immersive body > header .menu-toggle, html.reader-immersive body > header nav, html.reader-immersive .reader[data-mode="pages"] .page-nav { display: none; }
  html.reader-immersive:has(.reader) .reader { padding-top: env(safe-area-inset-top); }
}
.translation-pending { opacity: .5; }
.translation-toggle { white-space: nowrap; font-size: .8rem; }
#translation-status { margin: .25rem 0; font-size: .85rem; }
#translation-dialog label { display: block; margin: .75rem 0; }
#translation-dialog textarea { display: block; width: 100%; min-height: 6rem; }
@media (max-width: 700px) { .readerbar .translation-toggle { padding: .3rem; font-size: .72rem; } }

.translation-errata { padding: .5rem .8rem; margin: .5rem 0; border-inline-start: 3px solid currentColor; font-size: .9rem; }
.translation-errata p { margin: .25rem 0; }
.translation-errata button { margin-inline-start: .5rem; font-size: .85rem; }
.errata-list > li { margin-block: 1.5rem; }
