@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/newsreader-400.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/newsreader-400-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/newsreader-600.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --paper: #f3eee4;
  --paper-raised: #faf7f1;
  --ink: #211c16;
  --muted: #5c5348;
  --line: #e4d9c8;
  --accent: #6f2c2c;
  --accent-ink: #fffaf3;
  --notice: #f4e6d0;
  --chip-border: #d9cbb8;
  --serif: "Newsreader", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Segoe UI", system-ui, sans-serif;
  --sticky-h: 12rem;
}

html[data-installed="true"] .install-link {
  display: none !important;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #141210;
  --paper-raised: #1e1a17;
  --ink: #f3eadc;
  --muted: #c4b6a4;
  --line: #3a332c;
  --accent: #e6b15a;
  --accent-ink: #1a140c;
  --notice: #2a2318;
  --chip-border: #4a4036;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.45;
}

button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 20;
  background: var(--paper-raised);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

.skip:focus {
  top: 0.5rem;
}

.app {
  width: min(100%, 40rem);
  margin: 0 auto;
  min-height: 100dvh;
  padding: 0 1.1rem calc(2.25rem + env(safe-area-inset-bottom));
}

.top,
.hymn-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
}

.top {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: calc(0.75rem + env(safe-area-inset-top));
  padding-bottom: 0.65rem;
  margin-bottom: 0.2rem;
  border-bottom: 1px solid var(--line);
}

.brand-row,
.hymn-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  min-width: 0;
}

.brand h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.brand-home {
  color: inherit;
  text-decoration: none;
}

.brand-home:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.hymn-bar .brand-home {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.icon {
  width: 1.3rem;
  height: 1.3rem;
  display: block;
}

.icon-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0.35rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.text-btn {
  min-width: 0;
  padding: 0 0.2rem 0 0;
  color: var(--accent);
  font-weight: 600;
}

.icon-btn[aria-disabled="true"] {
  opacity: 0.28;
  pointer-events: none;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.install-link {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}

.install-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.install-help {
  width: min(100% - 1.5rem, 26rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 1.1rem 1.15rem 1rem;
  border: 0;
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
}

.install-help::backdrop {
  background: rgba(20, 18, 16, 0.45);
}

.install-help h2,
.install-page h2 {
  margin: 0 0 0.45rem;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
}

.install-steps h3,
.install-help h3 {
  margin: 0.95rem 0 0.3rem;
  font-size: 1rem;
}

.install-steps p,
.install-help p,
.install-steps li,
.install-help li {
  margin: 0.25rem 0;
}

.install-steps ol,
.install-help ol {
  margin: 0;
  padding-left: 1.25rem;
}

.install-help a,
.install-page a {
  color: var(--accent);
  font-weight: 600;
}

.install-close {
  width: 100%;
  min-height: 2.75rem;
  margin-top: 1rem;
  border: 1px solid var(--chip-border);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.install-page {
  padding-top: 0.8rem;
}

.qr-card {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  margin: 0.85rem 0 0.4rem;
  padding: 0.75rem 0.75rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.qr-card img {
  width: min(100%, 168px);
  height: auto;
}

.qr-card p,
.qr-card figcaption {
  margin: 0;
  color: #3d342c;
  font-size: 0.9rem;
  text-align: center;
}

.search {
  position: relative;
}

.search input {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 2.7rem 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-raised);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.search input::placeholder {
  color: var(--muted);
}

.search input::-webkit-search-cancel-button {
  appearance: none;
}

.search .clear {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
}

.chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip,
.tabs button,
.retry,
.install-now {
  font: inherit;
  cursor: pointer;
}

.chip {
  flex: 0 0 auto;
  min-height: 2.4rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
}

.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.tabs {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 3px;
  border-radius: 12px;
  background: var(--line);
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs button {
  flex: 0 0 auto;
  min-height: 2.5rem;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.tabs button[aria-selected="true"] {
  background: var(--paper-raised);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(33, 28, 22, 0.08);
}

.count {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.theme-jumps {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0.15rem 0 0.35rem;
}

.theme-jumps::-webkit-scrollbar {
  display: none;
}

.theme-jumps button {
  flex: 0 0 auto;
  min-height: 2.4rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
}

.theme-kind {
  margin: 1rem 0 0.15rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.theme-group {
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--sticky-h) + 0.35rem);
}

.theme-group > summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.65rem 0;
  cursor: pointer;
  list-style: none;
}

.theme-group > summary::-webkit-details-marker {
  display: none;
}

.theme-group > summary::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.15rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  flex: none;
}

.theme-group[open] > summary::before {
  margin-top: 0.35rem;
  transform: rotate(45deg);
}

.theme-name {
  flex: 1;
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
}

.theme-count {
  color: var(--muted);
  font-size: 0.82rem;
}

.sins {
  padding-bottom: 1.5rem;
}

.catechism,
.scripture {
  margin: 0.8rem 0;
  padding: 0.15rem 0 0.15rem 0.85rem;
  border-left: 3px solid var(--accent);
}

.catechism p,
.scripture p,
.sin-note {
  margin: 0.35rem 0;
}

.catechism-q {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
}

.scripture-ref,
.sermon-meta,
.sermon-text {
  color: var(--muted);
  font-size: 0.88rem;
}

.scripture p:not(.scripture-ref) {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.4;
}

.sin-list {
  margin: 0.2rem 0 0.8rem;
  padding-left: 1.2rem;
}

.sin-list li {
  margin: 0.28rem 0;
}

.sin-item {
  margin: 0.15rem 0 0.35rem;
  border-top: 1px solid var(--line);
}

.sin-item summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-weight: 600;
}

.sin-item summary::-webkit-details-marker {
  display: none;
}

.sin-item summary::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  flex: none;
}

.sin-item[open] summary::before {
  transform: rotate(45deg);
}

.sin-part {
  margin: 0.8rem 0 1rem;
}

.sin-part h3,
.sin-hymns h3,
.sermons h3,
.gospel h2 {
  margin: 0.8rem 0 0.3rem;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.stop-it {
  margin: 1.2rem 0 0.4rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-raised);
}

.stop-it p {
  margin: 0;
}

.stop-it a {
  color: var(--accent);
  font-weight: 700;
}

.gospel {
  margin-top: 1.2rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--sticky-h) + 0.35rem);
}

.sermon {
  margin: 0.45rem 0 0.8rem;
}

.sermon-title {
  margin: 0.1rem 0;
  font-weight: 600;
}

.sin-note a {
  color: var(--accent);
  font-weight: 600;
}

.theme-group .hymn-list {
  margin: 0 0 0.4rem;
}

.theme-page-title {
  margin: 0.2rem 0 0.8rem;
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.15;
}

.theme-back {
  margin: 0.6rem 0 0.2rem;
}

.theme-back a {
  color: var(--accent);
  font-weight: 600;
}

.theme-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 0.2rem;
}

.theme-chips a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.85rem;
  text-decoration: none;
}

.theme-chips a.season {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.hymn-bar {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  padding: 0.25rem 0;
  padding-top: calc(0.25rem + env(safe-area-inset-top));
  margin: 0 -0.2rem 0.4rem;
  border-bottom: 1px solid var(--line);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
}

.pager-num {
  margin: 0;
  min-width: 2.6rem;
  text-align: center;
  font-family: var(--serif);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
}

main.has-jump {
  padding-right: 1.35rem;
}

.hymn-list,
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hymn-link,
.toc-link {
  display: grid;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
}

.hymn-link {
  grid-template-columns: 3rem 1fr;
  gap: 0.1rem 0.7rem;
  padding: 0.78rem 0.1rem;
  align-items: start;
}

.num,
.toc-num {
  font-family: var(--serif);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.num {
  grid-row: 1 / span 2;
  padding-top: 0.12rem;
  font-size: 1.05rem;
}

.hymn-link-text,
.toc-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.title,
.toc-title,
.author-name,
.hymn-title {
  font-family: var(--serif);
}

.title,
.toc-title {
  font-size: 1.18rem;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.meta,
.toc-tune {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.38rem;
  border: 1px solid var(--chip-border);
  border-radius: 999px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  vertical-align: 0.15em;
}

.letter {
  margin: 1.05rem 0 0.15rem;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--accent);
  scroll-margin-top: calc(var(--sticky-h) + 0.4rem);
}

.index > .letter:first-child {
  margin-top: 0.35rem;
}

.author-name {
  margin: 0.85rem 0 0.1rem;
  font-size: 1.18rem;
  font-weight: 600;
}

.toc-link {
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.8rem;
  align-items: baseline;
  padding: 0.72rem 0.05rem;
}

.toc-num {
  font-size: 1.05rem;
}

@media (hover: hover) {
  .hymn-link:hover,
  .toc-link:hover,
  .end-nav a:hover {
    background: color-mix(in srgb, var(--accent) 8%, transparent);
  }
}

.hymn-link:active,
.toc-link:active {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.jump {
  position: fixed;
  z-index: 4;
  top: calc(var(--sticky-h) + 0.3rem);
  bottom: calc(0.4rem + env(safe-area-inset-bottom));
  right: max(0.15rem, calc((100vw - 40rem) / 2));
  width: 1.45rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  touch-action: none;
  user-select: none;
}

.jump button {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.jump button[aria-disabled="true"] {
  color: var(--muted);
  opacity: 0.35;
}

.jump button:focus-visible {
  outline-offset: -2px;
}

.jump-bubble {
  position: fixed;
  z-index: 6;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: 4.5rem;
  height: 4.5rem;
  display: grid;
  place-items: center;
  border-radius: 1.1rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 600;
  pointer-events: none;
}

.jump-bubble[hidden] {
  display: none;
}

.empty {
  margin: 1.5rem 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.25rem;
}

.hymn {
  padding-top: 0.85rem;
}

.hymn-number {
  margin: 0;
  color: var(--accent);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.hymn-title {
  margin: 0.15rem 0 0.7rem;
  font-size: clamp(1.85rem, 7.2vw, 2.4rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

.hymn-title:focus {
  outline: none;
}

.attribution {
  margin: 0.15rem 0;
  color: var(--muted);
  font-size: 0.92rem;
  overflow-wrap: break-word;
}

.recordings {
  margin: 1rem 0 0.4rem;
  padding: 0.75rem 0.85rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-raised);
}

.recordings h2,
.refrain-label,
.end-kicker {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recordings h2.faith-heading {
  margin: 0 0 0.55rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.faith-note {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.faith-item {
  margin: 0 0 0.85rem;
}

.faith-date {
  margin: 0;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
}

.faith-label {
  margin: 0.12rem 0 0.5rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.3;
}

.faith-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 0.35rem;
  color: var(--accent);
  font-weight: 600;
}

.faith-play summary,
.earlier summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 600;
}

.earlier {
  margin-top: 0.2rem;
}

.earlier .faith-item {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.recordings figure {
  margin: 0 0 0.75rem;
}

.recordings figcaption {
  margin-bottom: 0.3rem;
  font-size: 0.92rem;
}

.recordings audio,
.recordings video {
  width: 100%;
}

.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 8px;
}

.watch-card {
  margin: 0.45rem 0 0.1rem;
}

.watch-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #1c1917;
}

.watch-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.watch-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3.2rem;
  height: 3.2rem;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(20, 16, 12, 0.72);
}

.watch-play::after {
  content: "";
  position: absolute;
  left: 1.28rem;
  top: 1rem;
  border-style: solid;
  border-width: 0.6rem 0 0.6rem 1rem;
  border-color: transparent transparent transparent #fffaf3;
}

.watch-thumb:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.notice {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--notice);
}

.notice h2 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.notice p,
.colophon,
.coming {
  margin: 0.35rem 0 0;
}

.notice p:first-of-type {
  margin-top: 0;
}

.text {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.35rem;
}

.stanza {
  display: grid;
  grid-template-columns: 1.7rem 1fr;
  column-gap: 0.7rem;
  margin: 1rem 0 0.25rem;
}

.stanza-num {
  margin: 0;
  padding-top: 0.18rem;
  color: var(--accent);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
}

.line {
  display: block;
  font-family: var(--serif);
  font-size: 1.32rem;
  line-height: 1.45;
  text-wrap: pretty;
  hyphens: manual;
}

.refrain {
  margin: 0.2rem 0 1rem 2.4rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--accent);
}

.refrain .line {
  font-style: italic;
  font-size: 1.18rem;
}

.refrain-label {
  margin-bottom: 0.15rem;
  color: var(--accent);
}

.omitted {
  margin: 0.85rem 0 0.85rem 2.4rem;
  color: var(--muted);
  font-style: italic;
}

.coming {
  margin-top: 1.8rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.end-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 1.6rem;
}

.end-nav a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 4.4rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-raised);
  color: inherit;
  text-decoration: none;
}

.end-nav a.next {
  text-align: right;
  grid-column: 2;
}

.end-num {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.end-title {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.colophon {
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.retry,
.install-now {
  margin-top: 0.8rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
}

@media (max-height: 520px) {
  .brand h1 {
    font-size: 1.45rem;
  }

  .top {
    gap: 0.4rem;
  }
}

.comments-page h2 {
  margin: 1rem 0 0.4rem;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.comments-page {
  padding-top: 0.4rem;
}

.request-form {
  display: grid;
  gap: 0.75rem;
}

.request-field {
  display: grid;
  gap: 0.25rem;
}

.request-field input,
.request-field textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-raised);
  color: var(--ink);
  font: inherit;
}

.request-field textarea {
  min-height: 8rem;
  resize: vertical;
}

.request-form button {
  min-height: 2.75rem;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.request-honey {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.request-empty {
  margin: 0.35rem 0 0.2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.see-more {
  margin: 0.15rem 0 0.4rem;
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.see-more:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.request-card {
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
}

.request-card h3,
.request-card h4 {
  margin: 0.2rem 0;
  font-family: var(--serif);
}

.request-meta,
.request-body,
.request-replies p {
  margin: 0.25rem 0;
  white-space: pre-wrap;
}

.request-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.music-block {
  margin: 1.2rem 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-raised);
  padding: 0.2rem 0.85rem 0.7rem;
}

.music-block summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.music-credit,
.music-note {
  margin: 0.2rem 0 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.music-score {
  background: #f7f1e6;
  color: #211c16;
  border-radius: 8px;
  overflow-x: auto;
}

.music-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.music-controls button {
  min-height: 2.75rem;
  min-width: 4.5rem;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.music-controls .tempo {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
