/* Photo Dictionary by Storitellah
   Layout: an open reference book on a dark desk. Spread on wide screens, single page on narrow.
   Single deliberate look: dark desk, printed paper pages in both themes. */
:root {
  color-scheme: dark;
  --desk: #172124;
  --desk-2: #22303a;
  --desk-ink: #e8eef0;
  --desk-muted: #9fb0b5;
  --paper: #fdfdfb;
  --paper-edge: #e7e3d8;
  --ink: #1b1f21;
  --ink-soft: #4a5357;
  --cy: #0a9ec0;          /* headwords, large accents */
  --cy-text: #00738c;     /* small accent text on paper (AA) */
  --cy-wash: #d7f0f6;
  --rule: #c8d3d6;
  --ov: #0a9ec0;          /* diagram guides */
  --hot: #d9472b;         /* diagram focal point */
  --cloth: #0c5263;
  --cloth-deep: #083c49;
  --gilt: #f2e7c9;

  --f-hw: "Libre Baskerville", Baskerville, "Baskerville Old Face", Georgia, serif;
  --f-body: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --f-label: "IBM Plex Sans Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-ipa: "Gentium Book Plus", "Charis SIL", "Doulos SIL", "Lucida Sans Unicode", serif;

  --pw: 520px;
  --ph: 740px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(120% 90% at 50% 40%, var(--desk-2), var(--desk) 70%);
  background-color: var(--desk);
  color: var(--desk-ink);
  font: 400 15px/1.5 var(--f-body);
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--cy-text); }
:focus-visible { outline: 3px solid #f0b552; outline-offset: 2px; border-radius: 3px; }
kbd { font: 600 0.75rem var(--f-label); border: 1px solid currentColor; border-radius: 3px; padding: 0 0.35em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- App frame ---------- */
.app {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-columns: minmax(0, 1fr);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.bar { display: flex; align-items: center; gap: 0.9rem; padding-block: 0.8rem 0.4rem; min-width: 0; }
.brand { color: var(--desk-ink); display: grid; place-items: center; width: 40px; height: 40px; flex: none; }
.brand svg { width: 34px; height: 34px; }
.brand:hover { color: #7fd3e6; }
.titles { min-width: 0; flex: 1; }
.app-title { margin: 0; font: 700 1.2rem/1.15 var(--f-hw); letter-spacing: -0.005em; }
.app-title span { font-weight: 400; font-style: italic; color: var(--desk-muted); font-size: 0.85em; }
.app-tag { margin: 0.1rem 0 0; font: 500 0.72rem/1.3 var(--f-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--desk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.index-btn {
  display: inline-flex; align-items: center; gap: 0.45rem; flex: none;
  background: var(--cy); color: #04232b; border: 0; border-radius: 999px;
  padding: 0.5rem 1rem; font: 700 0.85rem var(--f-label); letter-spacing: 0.06em; text-transform: uppercase;
}
.index-btn svg { width: 16px; height: 16px; }
.index-btn:hover { background: #3cc0de; }

.stage { position: relative; display: grid; place-items: center; min-height: 0; min-width: 0; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; outline: none; }
.stage.is-dragging { cursor: grabbing; }
.viewport { perspective: calc(var(--pw) * 4.2); perspective-origin: 50% 40%; }
body[data-mode="single"] .viewport { overflow: hidden; padding: 4px 0 14px; }

.controls { display: flex; align-items: center; justify-content: center; gap: 0.9rem; padding-block: 0.5rem 0.2rem; }
.nav-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid #3c4f57; background: #1e2b31; color: var(--desk-ink);
  display: grid; place-items: center; flex: none;
}
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn:hover:not(:disabled) { border-color: var(--cy); color: #7fd3e6; }
.nav-btn:disabled { opacity: 0.35; cursor: default; }
.scrub { display: flex; align-items: center; gap: 0.8rem; min-width: 0; width: min(420px, 60vw); }
.scrub input { flex: 1; min-width: 0; accent-color: var(--cy); height: 24px; }
.pagelabel { font: 600 0.8rem var(--f-label); letter-spacing: 0.04em; color: var(--desk-muted); white-space: nowrap; min-width: 6.5em; text-align: right; font-variant-numeric: tabular-nums; }
.hint { margin: 0; text-align: center; font: 500 0.7rem var(--f-label); letter-spacing: 0.06em; color: #71858b; padding-block: 0.15rem calc(0.55rem + env(safe-area-inset-bottom, 0px)); }

/* ---------- Book & leaves ---------- */
.book {
  position: relative; width: calc(var(--pw) * 2); height: var(--ph);
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(.45,.05,.25,1);
  font-size: calc(var(--pw) * 0.0305);
}
body[data-mode="single"] .book { width: var(--pw); font-size: clamp(12px, calc(var(--pw) * 0.037), 15.5px); }
@media (prefers-reduced-motion: reduce) { .book { transition: none; } }

/* page-edge thickness either side */
.book::before, .book::after {
  content: ""; position: absolute; top: 3px; bottom: 3px; transform: translateZ(-2px);
  background: repeating-linear-gradient(90deg, #ebe7dc 0 1px, #cfc9bb 1px 2px);
  box-shadow: 0 14px 30px -12px rgba(0,0,0,.7);
}
.book::before { left: calc(var(--lt, 0px) * -1); width: var(--lt, 0px); border-radius: 3px 0 0 3px; }
.book::after { right: calc(var(--rt, 0px) * -1); width: var(--rt, 0px); border-radius: 0 3px 3px 0; }

.leaf {
  position: absolute; top: 0; left: var(--pw); width: var(--pw); height: 100%;
  transform-origin: 0 50%; transform-style: preserve-3d; will-change: transform;
}
body[data-mode="single"] .leaf { left: 0; }
.face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  overflow: hidden; background: var(--paper);
  box-shadow: 0 18px 34px -16px rgba(0,0,0,.75);
}
.face--back { transform: rotateY(180deg); }
.shade { position: absolute; inset: 0; pointer-events: none; opacity: var(--s, 0); }
.face--front .shade { background: linear-gradient(90deg, rgba(0,0,0,.38), rgba(0,0,0,.08) 30%, rgba(255,255,255,.18) 82%, rgba(0,0,0,.12)); }
.face--back .shade { background: linear-gradient(270deg, rgba(0,0,0,.38), rgba(0,0,0,.08) 30%, rgba(255,255,255,.18) 82%, rgba(0,0,0,.12)); }

/* corner peel hints */
.peel {
  position: absolute; bottom: 0; width: 0; height: 0; transform: translateZ(3px); pointer-events: none; opacity: 0;
  transition: width .25s ease, height .25s ease, opacity .2s;
}
.peel--next { right: 0; background: linear-gradient(to top left, transparent 50%, rgba(0,0,0,.18) 50%, #efece3 56%, #fff 100%); box-shadow: -2px -2px 6px rgba(0,0,0,.08); }
.peel--prev { left: 0; background: linear-gradient(to top right, transparent 50%, rgba(0,0,0,.18) 50%, #efece3 56%, #fff 100%); }
@media (hover: hover) {
  .stage:not(.is-dragging) .book.can-next:hover .peel--next,
  .stage:not(.is-dragging) .book.can-prev:hover .peel--prev { width: 2.6em; height: 2.6em; opacity: 1; }
}

/* ---------- Page ---------- */
.page {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  padding: 5.2% 8.5% 3.2% 7%;
  line-height: 1.4;
}
.page--left { padding: 5.2% 7% 3.2% 8.5%; }
.page--right::before, .page--left::before { content: ""; position: absolute; top: 0; bottom: 0; width: 9%; pointer-events: none; }
.page--right::before { left: 0; background: linear-gradient(90deg, rgba(0,0,0,.16), rgba(0,0,0,.04) 40%, transparent); }
.page--left::before { right: 0; background: linear-gradient(270deg, rgba(0,0,0,.16), rgba(0,0,0,.04) 40%, transparent); }
body[data-mode="single"] .page--right::before { width: 4%; }
.page--blank { background: linear-gradient(90deg, #f4f2ec, var(--paper)); }

.rh {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 1em;
  font: 700 0.78em var(--f-label); letter-spacing: 0.02em; color: var(--ink);
  padding-bottom: 0.45em; margin-bottom: 0.9em;
  border-bottom: 1.5px dotted #6d777b;
}
.rh-num { font-weight: 500; font-family: var(--f-body); font-size: 1.05em; }
.rh-r { justify-self: end; display: inline-flex; align-items: center; gap: 0.35em; font-weight: 500; }
.rh .key { width: 1.1em; height: 1.1em; color: var(--cy-text); }

.body { flex: 1; min-height: 0; overflow: hidden; position: relative; }
body[data-mode="single"] .body { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }

.pkey {
  display: flex; flex-wrap: wrap; gap: 0; margin-top: 0.7em; padding-top: 0.45em; border-top: 1px solid var(--rule);
  font: 600 0.62em/1.6 var(--f-label); color: var(--ink-soft);
}
.pkey span { padding: 0 0.6em; border-right: 1px solid #9aa5a8; white-space: nowrap; }
.pkey span:first-child { border-left: 1px solid #9aa5a8; }
.pkey i { font: normal 400 1.15em var(--f-ipa); color: var(--ink); }

.thumb {
  position: absolute; top: calc(11% + var(--ti, 0) * 9.2%); width: 1.15em; height: 2.4em;
  display: grid; place-items: center; background: var(--cy); color: #fff;
  font: 700 1.25em/1 var(--f-label);
}
.page--right .thumb { right: 0; border-radius: 0.6em 0 0 0.6em; }
.page--left .thumb { left: 0; border-radius: 0 0.6em 0.6em 0; }
body[data-mode="single"] .thumb { width: 1.1em; font-size: 1em; }

/* ---------- Entry typography ---------- */
.bigletter {
  font: 700 4.6em/1 var(--f-hw); color: var(--cy); letter-spacing: -0.04em; margin-top: -0.12em !important;
  margin: 0 0 0.1em -0.04em;
}
.page--entry .body { display: flex; flex-direction: column; }
.bigletter { flex: none; }
.cols { flex: 1; min-height: 0; column-count: 2; column-gap: 1.4em; column-rule: 1px solid #e3e8e9; column-fill: balance; font-size: 0.8em; line-height: 1.36; hyphens: auto; -webkit-hyphens: auto; }
body[data-mode="single"] .cols { column-count: 1; flex: none; font-size: 0.88em; }
.head { margin-bottom: 0.7em; }
.hwline { margin: 0 0 0.25em; text-indent: -0.9em; padding-left: 0.9em; }
.key { width: 0.95em; height: 0.95em; vertical-align: -0.08em; color: var(--cy-text); margin-right: 0.2em; }
.hw { font: 700 1.36em/1.15 var(--f-hw); color: var(--cy-text); font-style: normal; }
.ipa { font-family: var(--f-ipa); font-weight: 400; white-space: nowrap; }
.pos { font-style: italic; }
.gram { font: 700 0.86em var(--f-label); }
.also { font-size: 0.95em; }
.dom {
  display: inline-block; font: 700 0.72em/1.35 var(--f-label); letter-spacing: 0.04em;
  background: var(--cy-wash); color: #0b3c47; padding: 0 0.35em; border-radius: 2px; vertical-align: 0.08em; text-indent: 0; margin-left: 0.15em;
}
.sense { margin: 0 0 0.35em; padding-left: 0.9em; text-indent: -0.9em; text-align: left; }
.sn { font: 700 1em var(--f-label); }
.sign {
  display: inline-block; text-indent: 0; font: 600 0.7em/1.3 var(--f-label); letter-spacing: 0.04em;
  border: 1px solid var(--ink); padding: 0 0.3em; vertical-align: 0.1em; margin-right: 0.1em;
}
.ex { font-style: italic; color: #2c3437; }
.ex b { font-weight: 700; color: var(--ink); }
.exsep { color: var(--ink-soft); font-size: 0.8em; }
.runon { margin: 0.1em 0 0.3em; }
.partners { break-inside: avoid; border: 1px solid var(--cy); margin-top: 0.6em; }
.partners-h { margin: 0; background: var(--cy-wash); padding: 0.25em 0.5em; font: 600 0.8em var(--f-label); letter-spacing: 0.04em; color: #0b3c47; display: flex; align-items: center; gap: 0.45em; }
.partners-h b { font: 700 italic 1.12em var(--f-body); color: var(--cy-text); letter-spacing: 0; }
.pz { width: 1.5em; height: 1em; flex: none; background:
  radial-gradient(circle at 50% 0, var(--cy) 0.22em, transparent 0.24em) 0.2em 0 / 0.6em 1em no-repeat,
  linear-gradient(var(--cy), var(--cy)) 0 0.18em / 100% 0.82em no-repeat; opacity: 0.85; }
.partners p:last-child { overflow-wrap: anywhere; margin: 0; padding: 0.35em 0.5em 0.45em; font-weight: 600; }
.partners p:last-child b { font-weight: 700; }

/* ---------- Plate page ---------- */
.fig { margin: 0 0 0.7em; }
.plate { display: block; width: auto; max-width: 100%; max-height: calc(var(--ph) * 0.42); margin-inline: auto; height: auto; border: 1px solid #b9c4c7; background: #fff; }
.plate .lbl { font: 600 7px var(--f-label); fill: var(--ink); letter-spacing: 0.02em; }
.plate .lbl.on { fill: #fff; }
.plate .lbl.hot { fill: var(--hot); font-weight: 700; }
.plate .lbl.big { font: italic 400 15px var(--f-hw); fill: #8ea3a9; }
.plate .tag-bg rect { fill: var(--cy-text); }
.plate .bill { font: 700 24px var(--f-label); fill: var(--hot); letter-spacing: 0.06em; }
figcaption { margin-top: 0.4em; font: 500 0.74em/1.35 var(--f-label); color: var(--ink-soft); }

.box-h { margin: 0 0 0.3em; font: 700 0.74em var(--f-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cy-text); display: flex; align-items: center; gap: 0.6em; }
.box-h::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.practice p { margin: 0 0 0.7em; font-size: 0.82em; line-height: 1.4; }
.lower { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.1em; font-size: 0.76em; line-height: 1.36; }
body[data-mode="single"] .lower { grid-template-columns: minmax(0, 1fr); }
.note { background: #f2f6f7; border-left: 3px solid var(--cy); padding: 0.45em 0.7em 0.55em; }
.note p { margin: 0; }
.see ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.15em; }
.arr { color: var(--cy-text); margin-right: 0.35em; font-family: var(--f-label); }
.xref { font: 700 1.04em var(--f-hw); color: var(--cy-text); text-decoration: none; border-bottom: 1px solid #9fd6e3; }
.xref:hover { border-bottom-color: currentColor; }
.also-rel { margin: 0.45em 0 0; color: var(--ink-soft); }

/* ---------- Front & back matter ---------- */
.sec-h { margin: 0 0 0.6em; font: 700 1.55em/1.15 var(--f-hw); color: var(--ink); text-wrap: balance; }
.sec-h2 { margin: 1em 0 0.4em; font: 700 0.78em var(--f-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cy-text); }
.small { font-size: 0.82em; color: var(--ink-soft); margin: 0 0 0.6em; }
.eyebrow { margin: 1.2em 0 0.4em; font: 600 0.78em var(--f-label); letter-spacing: 0.2em; text-transform: uppercase; color: var(--cy-text); }
.title-h { margin: 0; font: 700 3em/1 var(--f-hw); letter-spacing: -0.02em; }
.title-sub { margin: 0.5em 0 0; font: italic 400 1.15em/1.35 var(--f-hw); color: var(--ink-soft); max-width: 22em; }
.rule { border: 0; border-top: 1.5px dotted #6d777b; margin: 1.4em 0; }
.intro p { margin: 0 0 0.8em; font-size: 0.95em; line-height: 1.55; }
.imprint { position: absolute; bottom: 0; left: 0; margin: 0; font: 500 0.72em var(--f-label); letter-spacing: 0.04em; color: var(--ink-soft); }
body[data-mode="single"] .imprint { position: static; margin-top: 1.5em; }

.toc { list-style: none; margin: 0; padding: 0; }
.toc a { display: flex; align-items: baseline; gap: 0.6em; padding: 0.42em 0; text-decoration: none; color: var(--ink); border-bottom: 1px solid #edf0f1; }
.toc a:hover .toc-t { color: var(--cy-text); text-decoration: underline; }
.toc-l { width: 1.6em; flex: none; font: 700 1.25em var(--f-hw); color: var(--cy); }
.toc-t { font: 700 0.95em var(--f-hw); min-width: 0; }
.toc-dots { flex: 1; border-bottom: 1.5px dotted #a5b0b3; transform: translateY(-0.25em); min-width: 1em; }
.toc-n { font: 600 0.85em var(--f-label); font-variant-numeric: tabular-nums; }
.toc--fm .toc-l { width: 0; }
.toc--fm .toc-t { font: 500 0.88em var(--f-body); }

.sample { border: 1px solid var(--rule); background: #fafcfc; padding: 0.8em 0.9em; font-size: 0.88em; line-height: 1.5; margin-bottom: 0.9em; }
.sample .hwline, .sample .sense { text-indent: 0; padding-left: 0; }
.callout {
  display: inline-grid; place-items: center; width: 1.35em; height: 1.35em; border-radius: 50%;
  background: var(--hot); color: #fff; font: 700 0.68em/1 var(--f-label); vertical-align: 0.25em; margin-right: 0.25em;
}
.xref-sample { font: 700 1em var(--f-hw); color: var(--cy-text); }
.legend { margin: 0; padding-left: 1.4em; font-size: 0.84em; line-height: 1.42; display: flex; flex-direction: column; gap: 0.35em; }
.legend li::marker { font: 700 0.9em var(--f-label); color: var(--hot); }

.codes { width: 100%; border-collapse: collapse; font-size: 0.82em; margin-bottom: 0.8em; }
.codes caption { text-align: left; font: 700 0.86em var(--f-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--cy-text); padding-bottom: 0.25em; }
.codes th { text-align: left; font-weight: 400; width: 8.5em; padding: 0.22em 0.6em 0.22em 0; vertical-align: baseline; }
.codes td { padding: 0.22em 0; border-bottom: 1px solid #edf0f1; }
.codes .sym { font: 700 1.1em var(--f-label); color: var(--cy-text); }
.ipa-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.2em 0.8em; font-size: 0.82em; }
.ipa-grid i { font-style: normal; font-size: 1.2em; display: inline-block; min-width: 1.6em; }

.tablewrap { overflow-x: auto; }
.qref { width: 100%; border-collapse: collapse; font-size: 0.8em; line-height: 1.35; }
.qref thead th { text-align: left; font: 700 0.84em var(--f-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--cy-text); border-bottom: 1.5px solid var(--ink); padding: 0.3em 0.5em 0.3em 0; }
.qref tbody th { text-align: left; font-weight: 400; padding: 0.45em 0.5em 0.45em 0; white-space: nowrap; }
.qref td { padding: 0.45em 0.5em 0.45em 0; border-bottom: 1px solid #edf0f1; vertical-align: top; }
.qref tbody th, .qref td { border-bottom: 1px solid #edf0f1; }

.colophon .emblem { width: 3em; height: 3em; color: var(--cy); margin: 0.8em 0 0.6em; }
.colophon p { font-size: 0.9em; line-height: 1.5; margin: 0 0 0.7em; }
.contact a { font-weight: 700; }

/* ---------- Covers ---------- */
.cover {
  padding: 0; color: var(--gilt);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,.05) 0 2px, transparent 2px 5px),
    linear-gradient(90deg, var(--cloth-deep), var(--cloth) 9%, var(--cloth) 100%);
}
.cover--back { background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,.05) 0 2px, transparent 2px 5px),
    linear-gradient(270deg, var(--cloth-deep), var(--cloth) 9%, var(--cloth) 100%); }
.cover::before { display: none; }
.cover-in {
  position: absolute; inset: 6% 8% 6% 12%; border: 1.5px solid rgba(242,231,201,.55); outline: 1px solid rgba(242,231,201,.25); outline-offset: 5px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8%;
}
.cover--back .cover-in { inset: 6% 12% 6% 8%; }
.cover .emblem { width: 4.6em; height: 4.6em; color: var(--gilt); margin-bottom: 1.4em; }
.cover-pub { position: absolute; top: 6%; left: 0; right: 0; margin: 0; font: 600 0.72em var(--f-label); letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.8; }
.cover-title { margin: 0; font: 700 3.5em/0.98 var(--f-hw); letter-spacing: -0.02em; color: #fffaf0; }
.cover-by { margin: 0.6em 0 1.4em; font: italic 400 1.3em var(--f-hw); }
.cover-by a { color: var(--gilt); }
.cover-tag { margin: 0; font: 400 1.05em/1.4 var(--f-body); max-width: 16em; opacity: 0.92; padding-top: 1.1em; border-top: 1px solid rgba(242,231,201,.45); }
.cover-foot { position: absolute; bottom: 6%; left: 0; right: 0; margin: 0; font: 600 0.66em var(--f-label); letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.75; }
.cover-hint { position: absolute; bottom: -3.4em; left: 0; right: 0; margin: 0; font: 500 0.72em var(--f-label); color: #7fd3e6; display: none; }
.back-blurb { font: 400 1.05em/1.55 var(--f-body); max-width: 19em; margin: 0 0 1.4em; }
.back-blurb b { font-family: var(--f-hw); }

/* ---------- Index dialog ---------- */
.index[hidden] { display: none; }
.index {
  position: fixed; inset: 0; z-index: 50; background: rgba(8, 14, 16, .72);
  display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.index-card { background: var(--paper); color: var(--ink); width: min(520px, 100%); max-height: 100%; overflow: auto; border-radius: 4px; padding: 1.2rem 1.4rem 1.4rem; box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.index-top { display: flex; align-items: center; justify-content: space-between; border-bottom: 1.5px dotted #6d777b; padding-bottom: 0.5rem; margin-bottom: 0.4rem; }
.index-top h2 { margin: 0; font: 700 1.6rem var(--f-hw); color: var(--cy-text); }
.index-close { border: 0; background: none; font-size: 1.2rem; width: 40px; height: 40px; border-radius: 50%; color: var(--ink); }
.index-close:hover { background: #eef2f3; }
.index-list { list-style: none; margin: 0; padding: 0; }
.index-list a { display: flex; align-items: baseline; gap: 0.8rem; padding: 0.6rem 0.3rem; border-bottom: 1px solid #edf0f1; text-decoration: none; color: var(--ink); }
.index-list a:hover, .index-list a:focus-visible { background: var(--cy-wash); }
.ix-l { font: 700 1.3rem var(--f-hw); color: var(--cy); width: 1.4rem; flex: none; }
.ix-t { flex: 1; font: 700 1rem var(--f-hw); }
.ix-n { font: 600 0.8rem var(--f-label); color: var(--ink-soft); }
.index-fm { list-style: none; margin: 0.9rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; font: 500 0.85rem var(--f-label); }

/* ---------- Narrow screens ---------- */
@media (max-width: 600px) {
  .app-title { font-size: 1.02rem; }
  .app-title span { display: block; font-size: 0.82em; }
  .app-tag { display: none; }
  .index-btn { padding: 0.45rem 0.8rem; }
  .hint { display: none; }
  .controls { padding-bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px)); }
  .pagelabel { min-width: 5.2em; }
}
body[data-mode="single"] .cover-title { font-size: 3em; }
