html, body {
  overflow-x: hidden;
}

@font-face {
  font-family: "SBL Greek";
  src: url("../data/SBL_grk.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Gleiche maximale Inhaltsbreite auf allen Seiten mit .wrap (index, liste, quellen, …) */
  /* Lesewelt: hell, viel Weißraum, Navy-Teal-Akzent (vgl. digitale Bibelportale) */
  --layout-max-width: 1180px;
  --bg: #ffffff;
  --bg-muted: #f5f6f8;
  --bg2: #ffffff;
  --paper: #333333;
  --heading: #4a4a68;
  --muted: #999999;
  --accent: #0d4a5c;
  --accent-ink: #083542;
  --accent-on: #ffffff;
  --accent-soft: rgba(13, 74, 92, 0.08);
  --accent-mid: rgba(13, 74, 92, 0.14);
  --accent-strong: rgba(13, 74, 92, 0.35);
  --accent-ring: rgba(13, 74, 92, 0.45);
  --mt: #2a6ea8;
  --mk: #9a8230;
  --lk: #2f8f5f;
  --jn: #6b5b9e;
  --border: #e2e5ea;
  --border-strong: #cfd4dc;
  --ink-4: rgba(51, 51, 51, 0.04);
  --ink-6: rgba(51, 51, 51, 0.06);
  --ink-10: rgba(51, 51, 51, 0.08);
  --ink-12: rgba(51, 51, 51, 0.12);
  --radius: 10px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-elevate: 0 8px 28px rgba(0, 0, 0, 0.08);
  /* Dialog-/Modal-Hintergrund (Light) */
  --dialog-backdrop: rgba(255, 255, 255, 0.72);
  --dialog-backdrop-strong: rgba(255, 255, 255, 0.86);
  /* Toolbar, Filter-Dropdown, Preset-Gruppen: einheitliche Abstände */
  --filter-gap: 0.65rem;
}

/* Dark-Referenz: tiefes Schwarz/Anthrazit, Terrakotta-Akzent, gemütliche Pillen-Badges */
html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f0f;
  --bg-muted: #121212;
  --bg2: #161616;
  --bg-row-hover: #1e1e1e;
  --paper: #e2e2e2;
  --heading: #e2e2e2;
  --muted: #7a7a7a;
  --accent: #b07248;
  --accent-ink: #d4a078;
  --accent-on: #0f0f0f;
  --accent-soft: rgba(176, 114, 72, 0.16);
  --accent-mid: rgba(176, 114, 72, 0.26);
  --accent-strong: rgba(176, 114, 72, 0.52);
  --accent-ring: rgba(176, 114, 72, 0.55);
  --mt: #a8bdd4;
  --mk: #d4b896;
  --lk: #9eb89a;
  --jn: #c4a8d4;
  --border: #262626;
  --border-strong: #333333;
  --ink-4: rgba(255, 255, 255, 0.04);
  --ink-6: rgba(255, 255, 255, 0.07);
  --ink-10: rgba(255, 255, 255, 0.1);
  --ink-12: rgba(255, 255, 255, 0.14);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.45);
  --shadow-elevate: 0 12px 36px rgba(0, 0, 0, 0.55);
  --dialog-backdrop: rgba(0, 0, 0, 0.65);
  --dialog-backdrop-strong: rgba(0, 0, 0, 0.8);
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Minimalistischer Hell-/Dunkel-Schalter: Hell = links, Dunkel = rechts (js/theme.js) */
.theme-switch {
  --sw-w: 2.9rem;
  --sw-h: 1.52rem;
  --sw-thumb: 1.14rem;
  /* Abstand Thumb zur Innenkante der Bahn (optisch bündig mit 2px-Rahmen) */
  --sw-pad: 2px;
  --sw-border: 2px;
  position: relative;
  width: var(--sw-w);
  height: var(--sw-h);
  padding: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  flex-shrink: 0;
  border: 2px solid transparent;
  background: #d3d3d3;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

html[data-theme="dark"] .theme-switch {
  background: transparent;
  border-color: #ffffff;
  box-shadow: none;
}

html[data-theme="light"] .theme-switch {
  background: #d3d3d3;
  border-color: transparent;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
}

.theme-switch:hover {
  filter: brightness(1.05);
}

html[data-theme="dark"] .theme-switch:hover {
  filter: none;
  border-color: #f0f0f0;
}

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

.theme-switch__thumb {
  position: absolute;
  top: 50%;
  left: var(--sw-pad);
  z-index: 1;
  width: var(--sw-thumb);
  height: var(--sw-thumb);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Vertikal zentriert: Hell (aria-checked false) = links, Dunkel (true) = rechts */
.theme-switch[aria-checked="false"] .theme-switch__thumb {
  transform: translateY(-50%) translateX(0);
}

/* Innenbreite = Gesamtbreite − linker/rechter Rahmen (border-box) */
.theme-switch[aria-checked="true"] .theme-switch__thumb {
  transform: translateY(-50%)
    translateX(
      calc(
        var(--sw-w) - 2 * var(--sw-border) - var(--sw-thumb) - 2 * var(--sw-pad)
      )
    );
}

@media (prefers-reduced-motion: reduce) {
  .theme-switch__thumb {
    transition: none;
  }
}

.compare-home-theme {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.theme-switch-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  white-space: nowrap;
  line-height: 1.2;
  user-select: none;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: var(--accent-soft);
  font-family: "DM Sans", system-ui, sans-serif;
  font-optical-sizing: auto;
  background-color: var(--bg);
  color: var(--paper);
  line-height: 1.5;
}

.wrap {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 2.5rem max(1.25rem, env(safe-area-inset-right)) 4rem max(1.25rem, env(safe-area-inset-left));
  padding-bottom: max(4rem, calc(4rem + env(safe-area-inset-bottom)));
}

header {
  margin-bottom: 2rem;
}

header h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.1;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
  color: var(--heading);
}

header h1 em {
  font-style: italic;
  color: var(--accent);
}

header p.lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 52ch;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.controls label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Eine Zeile: Suche (wächst) | Filter-Button bleibt kompakt; Panel klappt darunter auf */
.filter-toolbar {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--filter-gap);
  margin-bottom: var(--filter-gap);
  padding-bottom: 0;
  /* Trennung zur Liste: nur .top-filter-venn { border-bottom } */
}

/* Sanfter Platz für das Dropdown (margin wird per JS gesetzt) */
#filter-accordion.filter-toolbar {
  transition: margin-bottom 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes filterDropdownIn {
  from {
    opacity: 0;
    transform: translateY(-0.45rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-toolbar-search {
  display: flex;
  flex-direction: column;
  gap: var(--filter-gap);
  flex: 1 1 auto;
  min-width: 0;
  order: 0;
}

.filter-toolbar-search input[type="search"] {
  width: 100%;
  max-width: none;
  min-height: 2.65rem;
  line-height: 1.35;
}

.filter-acc-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-muted);
  overflow: hidden;
  flex: 0 0 auto;
  width: fit-content;
  max-width: 100%;
  align-self: center;
}

.filter-acc-panel[data-filter-kind="presets"] {
  order: 1;
}

.filter-acc-panel[open] {
  overflow: visible;
  align-self: center;
}

.filter-acc-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--filter-gap) 0.75rem;
  list-style: none;
  cursor: pointer;
  padding: var(--filter-gap) 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--paper);
  user-select: none;
  touch-action: manipulation;
}

.filter-acc-summary--toolbar {
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: var(--filter-gap);
  padding: 0 !important;
  font-size: 0.8rem;
  font-weight: 600;
  width: auto;
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
  transition: background 0.22s ease, color 0.2s ease;
  display: flex;
  height: 100%;
}

.filter-acc-btn-icon {
  display: flex;
  align-items: center;
}

.filter-line {
  stroke: currentColor;
  stroke-width: 10;
  stroke-linecap: round;
}

.filter-knob {
  fill: var(--paper);
  stroke: currentColor;
  stroke-width: 8;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 150ms ease-out;
  will-change: transform;
  backface-visibility: hidden;
}

.filter-acc-panel[open] .filter-knob {
  fill: var(--paper);
}

.filter-acc-panel[open] .filter-k1 { 
  transform: translateX(26px); 
}

.filter-acc-panel[open] .filter-k2 { 
  transform: translateX(-22px); 
}

.filter-acc-panel[open] .filter-k3 { 
  transform: translateX(28px); 
}

.filter-acc-summary-note {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--muted);
}

.filter-acc-summary::-webkit-details-marker {
  display: none;
}

.filter-acc-summary::after {
  content: "";
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.filter-acc-panel[open] .filter-acc-summary::after {
  transform: rotate(-135deg);
}

/* Toolbar: kein Pfeil-Chevron */
.filter-acc-summary--toolbar::after {
  content: "";
  display: none;
  width: auto;
  height: auto;
  border: none;
  transform: none;
}

.filter-acc-body {
  padding: 0 var(--filter-gap) var(--filter-gap);
  border-top: 1px solid var(--border);
}

.filter-acc-panel[open] .filter-acc-body--presets {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + var(--filter-gap));
  z-index: 25;
  margin-top: 0;
  padding: var(--filter-gap);
  border-top: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-muted);
  box-shadow: var(--shadow-elevate);
  animation: filterDropdownIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: top center;
}

.filter-acc-body--presets {
  padding-top: var(--filter-gap);
}

.filter-acc-body input[type="search"] {
  width: 100%;
  max-width: none;
}

input[type="search"],
select {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  color: var(--paper);
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-size: 0.9rem;
}

input[type="search"] {
  min-width: 200px;
  flex: 1;
}

/* Größerer, klarer Clear-Button (erscheint bei Eingabe; WebKit/Blink) */
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 1.65rem;
  height: 1.65rem;
  margin-right: 0.05rem;
  margin-left: 0.35rem;
  cursor: pointer;
  opacity: 1;
  background: center / 1.55rem 1.55rem no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23dde1e8'/%3E%3Cpath fill='none' stroke='%232d3a47' stroke-width='2.1' stroke-linecap='round' d='M8.2 8.2l7.6 7.6M15.8 8.2l-7.6 7.6'/%3E%3C/svg%3E");
  transition: transform 0.12s ease, filter 0.12s ease;
}

input[type="search"]::-webkit-search-cancel-button:hover {
  filter: brightness(0.92);
  transform: scale(1.06);
}

input[type="search"]::-webkit-search-cancel-button:active {
  transform: scale(0.96);
}

html[data-theme="dark"] input[type="search"]::-webkit-search-cancel-button {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='%233a3a3a'/%3E%3Cpath fill='none' stroke='%23c8c8c8' stroke-width='2.1' stroke-linecap='round' d='M8.2 8.2l7.6 7.6M15.8 8.2l-7.6 7.6'/%3E%3C/svg%3E");
}

html[data-theme="dark"] input[type="search"]::-webkit-search-cancel-button:hover {
  filter: brightness(1.12);
}

select {
  max-width: 100%;
}

.preset-wrap {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
}

.preset-group {
  display: flex;
  flex-direction: column;
  gap: var(--filter-gap);
  padding: 0;
}

.preset-group + .preset-group {
  margin-top: var(--filter-gap);
  padding-top: var(--filter-gap);
  border-top: 1px solid var(--border);
}

.preset-group-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.3;
}

.preset {
  display: flex;
  flex-wrap: wrap;
  gap: var(--filter-gap);
}

.preset button {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--paper);
  border-radius: var(--radius-pill);
  padding: 0.38rem 0.85rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.preset button:hover,
.preset button.active {
  background: var(--accent-soft);
  border-color: var(--accent-strong);
  color: var(--accent);
  box-shadow: var(--shadow-card);
}

.count {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: var(--filter-gap);
  transition: opacity 0.25s ease;
}

.count.count--pulse {
  animation: countPulse 0.45s ease;
}

@keyframes countPulse {
  0% {
    opacity: 0.45;
  }
  100% {
    opacity: 1;
  }
}

/* Obere Zeile: Filter links, Venn rechts; darunter Liste in voller Breite */
.top-filter-venn {
  margin-bottom: 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.filter-venn-row {
  display: grid;
  gap: 1.25rem 1.35rem;
  align-items: stretch;
}

.filter-col {
  min-width: 0;
}

.venn-aside {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-muted);
  padding: 0.75rem 0.65rem 0.5rem;
  box-shadow: var(--shadow-card);
}

.venn-wrap {
  position: relative;
  width: 100%;
  padding-top: 1.35rem;
  padding-bottom: 1.1rem;
}

.venn-aside .venn-lbl {
  position: absolute;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  pointer-events: none;
  z-index: 1;
}

.venn-aside .venn-lbl-mt {
  top: 0;
  left: 6%;
  color: var(--mt);
}

.venn-aside .venn-lbl-mk {
  top: 0;
  right: 6%;
  color: var(--mk);
}

.venn-aside .venn-lbl-lk {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  color: var(--lk);
}

#venn-chart {
  width: 100%;
  min-height: 200px;
}

#venn-chart svg {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
}

.venn-fallback {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

@media (min-width: 960px) {
  .filter-venn-row {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  }

  /* Eine Spalte, wenn das Venn-Aside fehlt (z. B. temporär in index.html auskommentiert) */
  .filter-venn-row:has(> .filter-col:only-child) {
    grid-template-columns: 1fr;
  }
}

.list-section {
  margin-top: 0;
  padding-top: 1.1rem;
  border-top: none;
}

/* Nach ?section= oder wenn Abschnitt gesetzt: Nummer + Titel über der Liste */
.section-list-heading {
  margin: 0 0 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
}

/* [hidden] allein reicht nicht: .section-list-heading setzt display:flex und überschreibt das UA-[hidden] */
.section-list-heading[hidden] {
  display: none;
}

.section-list-heading__title {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.35rem, 3.2vw, 1.7rem);
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--heading);
  line-height: 1.2;
}

.section-list-heading__all {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.section-list-heading__all:hover {
  color: var(--paper);
  border-bottom-color: var(--accent-strong);
}

.section-list-heading__all:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@keyframes listResultIn {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.list.list--reveal > .row-wrap,
.list.list--reveal > .empty {
  animation: listResultIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.list.list--reveal > .row-wrap:nth-child(1) {
  animation-delay: 0.02s;
}
.list.list--reveal > .row-wrap:nth-child(2) {
  animation-delay: 0.045s;
}
.list.list--reveal > .row-wrap:nth-child(3) {
  animation-delay: 0.07s;
}
.list.list--reveal > .row-wrap:nth-child(4) {
  animation-delay: 0.095s;
}
.list.list--reveal > .row-wrap:nth-child(5) {
  animation-delay: 0.12s;
}
.list.list--reveal > .row-wrap:nth-child(6) {
  animation-delay: 0.145s;
}
.list.list--reveal > .row-wrap:nth-child(7) {
  animation-delay: 0.17s;
}
.list.list--reveal > .row-wrap:nth-child(8) {
  animation-delay: 0.195s;
}
.list.list--reveal > .row-wrap:nth-child(9) {
  animation-delay: 0.22s;
}
.list.list--reveal > .row-wrap:nth-child(10) {
  animation-delay: 0.245s;
}
.list.list--reveal > .row-wrap:nth-child(11) {
  animation-delay: 0.27s;
}
.list.list--reveal > .row-wrap:nth-child(12) {
  animation-delay: 0.295s;
}
.list.list--reveal > .row-wrap:nth-child(n + 13) {
  animation-delay: 0.32s;
}

.list.list--reveal > .empty {
  animation-delay: 0s;
}

.row-wrap .row-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1.2rem 1.35rem;
  transition: background 0.15s;
}

.row-wrap .row-main {
  grid-column: 1;
  display: flex;
  flex-direction: column;
}

.row-wrap .row-main h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  color: var(--heading);
}

.row-wrap .row-actions {
  grid-column: 2;
  justify-self: end;
  align-self: center;
}

.row-wrap:hover {
  border-color: var(--border-strong);
}

.row-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.row-head {
  cursor: pointer;
  transition: background 0.15s ease;
}

.row-head:hover {
  background: var(--ink-4);
}

html[data-theme="dark"] .row-head:hover {
  background: var(--bg-row-hover);
}

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

.row-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-self: start;
  padding-top: 0.1rem;
}

.row-wrap .chev {
  font-size: 0.7rem;
  opacity: 0.45;
  transition: transform 0.25s ease, opacity 0.2s ease;
  user-select: none;
  flex-shrink: 0;
}

.row-head:hover .chev {
  transform: translate(2px, -1px);
  opacity: 0.85;
}

.text-grid {
  display: grid;
  gap: 1rem;
  align-items: start;
  /* Spaltenzahl wird per JS gesetzt (nur Bücher mit Perikope) */
}

.translation-buttons {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Alle Sprachen in einer Zeile; Klick öffnet Dropdown unter der jeweiligen Sprache */
.translation-buttons--lang-strip {
  gap: 0.35rem;
  min-width: 0;
}

.translation-lang-strip {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.translation-lang-pick {
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-muted);
  overflow: hidden;
}

.translation-lang-trigger {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.5rem;
  min-height: 44px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--paper);
  background: transparent;
}

.translation-lang-trigger::-webkit-details-marker {
  display: none;
}

.translation-lang-trigger::after {
  content: "";
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  margin-left: auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  opacity: 0.75;
}

.translation-lang-pick[open] > .translation-lang-trigger::after {
  transform: rotate(225deg);
}

.translation-lang-trigger__label {
  flex: 1;
  min-width: 0;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes translationDropdownIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.translation-lang-dropdown-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem 0.65rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.translation-lang-pick[open] .translation-lang-dropdown-body {
  animation: translationDropdownIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.translation-lang-pick[open] {
  box-shadow: var(--shadow-elevate);
}

.compare-translations-box--wide {
  max-width: none;
}

.translation-lang-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.translation-lang-group + .translation-lang-group {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.translation-lang-fold {
  display: block;
}

.translation-lang-fold + .translation-lang-fold {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.translation-lang-fold-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 0.35rem 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.translation-lang-fold-summary::-webkit-details-marker {
  display: none;
}

.translation-lang-fold-summary::before {
  content: "▸";
  display: inline-block;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  opacity: 0.85;
  font-size: 0.75rem;
  margin-right: 0.15rem;
}

.translation-lang-fold[open] > .translation-lang-fold-summary::before {
  transform: rotate(90deg);
}

.translation-lang-fold-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.15rem 0 0.25rem 0.1rem;
}

.translation-lang-more {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.translation-more-summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  padding: 0.4rem 0;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.translation-more-summary::-webkit-details-marker {
  display: none;
}

.translation-more-summary::before {
  content: "▸";
  display: inline-block;
  transition: transform 0.2s ease;
  opacity: 0.85;
  font-size: 0.75rem;
}

.translation-lang-more[open] .translation-more-summary::before {
  transform: rotate(90deg);
}

/* Stufen: Griechisch / weitere Sprachen erst nach Aufklappen */
.translation-reveal {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.translation-reveal-summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  padding: 0.4rem 0;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.translation-reveal-summary::-webkit-details-marker {
  display: none;
}

.translation-reveal-summary::before {
  content: "▸";
  display: inline-block;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  opacity: 0.85;
  font-size: 0.75rem;
  margin-right: 0.15rem;
}

.translation-reveal[open] > .translation-reveal-summary::before {
  transform: rotate(90deg);
}

.translation-reveal-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 0.35rem;
}

.translation-reveal-body > .translation-lang-fold:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.translation-more-inner {
  padding-top: 0.35rem;
}

.translation-more-inner .translation-lang-group + .translation-lang-group {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.translation-lang-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.translation-lang-fold-summary .translation-lang-label {
  text-transform: none;
  letter-spacing: 0.04em;
}

.translation-lang-label--with-mark {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.translation-lang-mark--emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.38rem;
  height: 1.38rem;
  font-size: 0.78rem;
  line-height: 1;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-muted);
}

.translation-lang-label--urtext {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.translation-lang-urtext-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
  border: 1px solid var(--accent-strong);
  border-radius: 6px;
  background: var(--accent-soft);
}

.translation-option-row {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
}

.translation-option-main {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--paper);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.translation-option-main:active {
  transform: scale(0.99);
}

.translation-option-main:hover,
.translation-option-main.active {
  background: var(--accent-soft);
  border-color: var(--accent-strong);
}

.translation-option-main.active {
  box-shadow: var(--shadow-card);
  color: var(--accent);
}

.translation-info-btn {
  flex: 0 0 1.85rem;
  width: 1.85rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-muted);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}

.translation-info-btn:hover {
  border-color: var(--accent-strong);
  color: var(--accent);
  background: var(--accent-soft);
}

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

.translation-info-dialog {
  z-index: 1260;
  max-width: min(26rem, calc(100vw - 2rem));
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
  color: var(--paper);
  box-shadow: var(--shadow-elevate);
}

.translation-info-dialog::backdrop {
  background: var(--dialog-backdrop);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.translation-info-dialog-inner {
  position: relative;
  padding: 1rem 1.1rem 1.05rem;
}

.translation-info-dialog-x {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-muted);
  color: var(--paper);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}

.translation-info-dialog-x:hover {
  border-color: var(--accent-ring);
  color: var(--accent);
}

.translation-info-dialog-h {
  margin: 0 2rem 0.55rem 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.translation-info-dialog-body {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--paper);
}

.translation-info-dialog-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.translation-info-dialog-body a:hover {
  color: var(--accent-ink);
}

.site-info-dialog {
  --site-info-gold: #9a7324;
  max-width: min(52rem, calc(100vw - 2.5rem));
  max-height: min(92dvh, 92vh);
  overflow-y: auto;
}

html[data-theme="dark"] .site-info-dialog {
  --site-info-gold: #d4b05c;
}

.site-info-dialog-inner {
  padding: 1.45rem 1.65rem 1.55rem;
}

.site-info-dialog__head {
  margin: 0 0 0.9rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid color-mix(in srgb, var(--site-info-gold) 35%, var(--border));
}

.site-info-dialog .site-info-dialog__title {
  margin: 0 0 0.3rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--heading);
  font-family: "Instrument Serif", Georgia, serif;
  line-height: 1.15;
}

.site-info-dialog__kicker {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--site-info-gold);
}

.site-info-intro {
  margin: 0 0 1.35rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--paper);
}

.site-info-intro p {
  margin: 0 0 1rem;
}

.site-info-intro p:last-child {
  margin-bottom: 0;
}

.site-info-intro strong {
  font-weight: 600;
  color: var(--heading);
}

.site-info-footer {
  margin: 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--muted);
}

.site-info-footer__links {
  margin: 0;
  font-weight: 600;
}

.site-info-footer__links a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-info-footer__links a:hover {
  color: var(--accent-ink);
}

@media (max-width: 520px) {
  .site-info-dialog-inner {
    padding: 1.2rem 1.15rem 1.3rem;
  }
}

.compare-modal-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  width: min(var(--layout-max-width), calc(100vw - 2rem));
  max-width: 100%;
  box-sizing: border-box;
  transition: transform 0.42s cubic-bezier(0.22, 1.05, 0.36, 1);
}

/* Modal: Shell bis unteren Rand, Scroll nur im Evangelien-Grid */
.compare-modal .compare-modal-shell {
  flex: 0 1 auto;
  max-height: min(
    calc(100dvh - 2rem),
    calc(100svh - 2rem)
  );
  min-height: 0;
}

.compare-modal:not(.is-open) .compare-modal-shell {
  transform: scale(0.94) translateY(14px);
}

.compare-modal.is-open .compare-modal-shell {
  transform: scale(1) translateY(0);
}

/* Sprach-Leiste über dem Vergleich, volle Breite */
.compare-translations-bar {
  width: 100%;
  flex: 0 0 auto;
  transition:
    transform 0.44s cubic-bezier(0.16, 1, 0.35, 1) 0.04s,
    opacity 0.38s ease 0.04s;
}

.compare-modal:not(.is-open) .compare-translations-bar {
  transform: translateY(-12px);
  opacity: 0;
}

.compare-modal.is-open .compare-translations-bar {
  transform: translateY(0);
  opacity: 1;
}

.compare-modal:not(.is-open) .compare-modal-panel {
  transform: translateY(16px);
  opacity: 0;
}

.compare-modal.is-open .compare-modal-panel {
  transform: translateY(0);
  opacity: 1;
}

.compare-modal-translations-box {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-muted);
  max-width: 100%;
}

/* Kompakte Lesetext-Leiste: nur Schnellbuttons + „Weitere“ */
.translation-toolbar-wrap {
  width: 100%;
}

.translation-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.translation-toolbar__pickers {
  margin-top: 0;
}

.compare-modal-translations-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.compare-modal-translations-book {
  width: 1.45rem;
  height: 1.45rem;
  flex-shrink: 0;
  opacity: 0.9;
}

.compare-modal-translations-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.compare-translations-bar .translation-buttons {
  max-height: none;
  overflow: visible;
}

/* Schnellauswahl + Übersichts-Overlay */
.translation-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem 0.65rem;
  width: 100%;
}

.translation-quick__btn {
  flex: 1 1 9.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 48px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
  color: var(--paper);
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}

.translation-quick__btn:hover {
  border-color: var(--accent-strong);
  background: var(--bg-muted);
}

.translation-quick__btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-card);
}

.translation-quick__btn.active .translation-quick__primary {
  color: var(--accent);
}

.translation-quick__pin-wrap {
  flex: 1 1 10rem;
  display: flex;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
  overflow: hidden;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}

.translation-quick__pin-wrap:has(.translation-quick__btn.active) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-card);
}

.translation-quick__pin-wrap .translation-quick__btn--extra {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.translation-quick__pin-wrap .translation-quick__btn--extra:hover {
  background: var(--bg-muted);
}

.translation-quick__pin-wrap .translation-quick__btn--extra.active {
  background: transparent;
  box-shadow: none;
}

.translation-quick__unpin {
  flex: 0 0 2.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 0.15rem;
  border: none;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg-muted);
  color: var(--muted);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.translation-quick__unpin:hover {
  background: rgba(220, 80, 70, 0.12);
  color: #b83228;
}

.translation-quick__pin-wrap:has(.translation-quick__btn.active) .translation-quick__unpin {
  border-left-color: var(--accent);
}

.translation-quick__btn--extra {
  flex: 1 1 10rem;
  max-width: 100%;
}

.translation-quick__btn--extra .translation-quick__primary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.translation-quick__primary {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.25;
}

.translation-quick__more {
  flex: 1 1 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-muted);
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s,
    color 0.15s;
}

.translation-quick__more-icon {
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

.translation-quick__more-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}

.translation-quick__more:not(.translation-quick__more--swap) {
  min-width: min(12rem, 100%);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.translation-quick__more--swap {
  color: var(--accent-ink);
}

.translation-quick__more:hover {
  border-color: var(--accent-strong);
  background: var(--accent-soft);
}

@media (min-width: 600px) {
  .translation-quick__more {
    flex: 0 1 auto;
    align-self: center;
  }
}

/* Schmale Viewports: 2–3 Übersetzungen pro Zeile (Grid), kein horizontales Scrollen */
@media (max-width: 720px) {
  .translation-quick {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5rem), 1fr));
    gap: 0.5rem;
    align-items: stretch;
    overflow: visible;
    padding-bottom: 0;
  }

  .translation-quick__btn {
    flex: unset;
    min-width: 0;
    max-width: none;
  }

  .translation-quick__pin-wrap {
    flex: unset;
    min-width: 0;
    max-width: none;
  }

  .translation-quick__more {
    flex: unset;
    min-width: 0;
    box-sizing: border-box;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  /* Text „Weitere Übersetzungen“ unter der Rasterzeile */
  .translation-quick__more:not(.translation-quick__more--swap) {
    grid-column: 1 / -1;
    width: 100%;
  }

  .translation-quick__more--swap {
    justify-self: stretch;
    min-height: 48px;
  }

  .translation-quick__more-label {
    white-space: normal;
  }
}

.translation-picker-overview {
  max-width: 44rem;
  margin: 0 auto;
}

.translation-picker-overview--mega {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.translation-picker-mega {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.translation-picker-mega:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.translation-picker-mega__title {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin: 0 0 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--accent-soft);
}

.translation-picker-mega__body .translation-picker-group {
  margin-bottom: 1.15rem;
}

.translation-picker-mega__body .translation-picker-group:last-child {
  margin-bottom: 0;
}

.translation-picker-group {
  margin-bottom: 1.5rem;
}

.translation-picker-group:last-child {
  margin-bottom: 0;
}

.translation-picker-group__title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.12rem;
  font-weight: 400;
  color: var(--heading);
  margin: 0 0 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.translation-picker-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

@media (min-width: 480px) {
  .translation-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.translation-picker-row {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  min-width: 0;
}

.translation-picker-card {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
  color: var(--paper);
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.12s,
    background 0.12s;
}

.translation-picker-card:hover {
  border-color: var(--accent-strong);
}

.translation-picker-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.translation-picker-card__name {
  display: block;
}

.translation-picker-inner.translation-buttons {
  gap: 0;
}

.translation-lang-mobile-btn {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
  padding: 0.65rem 0.85rem;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-muted);
  color: var(--paper);
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}

.translation-lang-mobile-btn:hover {
  border-color: var(--accent-strong);
  background: var(--accent-soft);
  box-shadow: var(--shadow-card);
}

.translation-lang-mobile-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.translation-lang-mobile-inner {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.translation-lang-mobile-hint {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.translation-lang-mobile-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--paper);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.translation-lang-mobile-chev {
  flex-shrink: 0;
  opacity: 0.85;
  font-size: 0.9rem;
  line-height: 1;
}

.translation-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  padding: max(env(safe-area-inset-top), 0.85rem) max(env(safe-area-inset-right), 1.35rem)
    max(env(safe-area-inset-bottom), 1.15rem) max(env(safe-area-inset-left), 1.35rem);
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.translation-picker-overlay.is-visible {
  opacity: 1;
}

.translation-picker-overlay[hidden] {
  display: none !important;
}

.translation-picker-overlay.is-visible .translation-picker-toolbar {
  animation: translationPickerChromeIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.translation-picker-overlay.is-visible .translation-picker-scroll {
  animation: translationPickerChromeIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

@keyframes translationPickerChromeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.translation-picker-toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.15rem 0 1rem;
  border-bottom: 1px solid var(--border);
}

.translation-picker-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--paper);
  line-height: 1.25;
}

.translation-picker-close {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-muted);
  color: var(--paper);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}

.translation-picker-close:hover {
  border-color: var(--accent-ring);
  color: var(--accent);
}

.translation-picker-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.35rem 0 1.5rem;
}

.translation-picker-inner {
  padding-bottom: 0.75rem;
}

/* Luft im Vollbild-Sprachpicker (nur #translation-picker-body) */
.translation-picker-inner.translation-buttons {
  gap: 1.15rem;
}

.translation-picker-inner .translation-lang-dropdown-body {
  gap: 0.55rem;
}

.translation-picker-inner .translation-option-row {
  gap: 0.55rem;
}

.translation-picker-inner .translation-option-main {
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
}

.translation-picker-inner .translation-info-btn {
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
}

.translation-picker-inner .translation-lang-more {
  margin-top: 0.35rem;
  padding-top: 1rem;
}

.translation-picker-inner .translation-reveal {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
}

.translation-picker-inner .translation-reveal-body {
  padding-top: 0.5rem;
}

.translation-picker-inner .translation-more-inner {
  padding-top: 0.55rem;
}

.translation-picker-inner .translation-more-inner .translation-lang-group + .translation-lang-group {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
}

.text-col h4 {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.text-col.mt h4 { color: var(--mt); }
.text-col.mk h4 { color: var(--mk); }
.text-col.lk h4 { color: var(--lk); }
.text-col.jn h4 { color: var(--jn); }

.text-col .ref-tag {
  display: block;
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.85;
  margin-top: 0.15rem;
  word-break: break-word;
}

.text-col-body {
  font-size: 0.84rem;
  line-height: 1.58;
  /* Kein eigenes Scrollen pro Evangelium: Höhe folgt dem Text, Seite/Modal scrollt */
  overflow: visible;
}

/* Griechischer NT-Text: SBL Greek (lokal data/SBL_grk.ttf) */
.compare-modal-panel.is-greek-script .text-col-body {
  font-family: "SBL Greek", "Times New Roman", "Palatino Linotype", Palatino, serif;
  font-feature-settings: "kern" 1;
  font-synthesis: none;
  font-size: 0.95rem;
  line-height: 1.62;
}

.compare-modal-panel.is-greek-script .text-col-body .verse-addr {
  font-size: 0.76rem;
}

.compare-main-panel.is-greek-script .text-col-body {
  font-family: "SBL Greek", "Times New Roman", "Palatino Linotype", Palatino, serif;
  font-feature-settings: "kern" 1;
  font-synthesis: none;
  font-size: 0.95rem;
  line-height: 1.62;
}

.compare-main-panel.is-greek-script .text-col-body .verse-addr {
  font-size: 0.76rem;
}

.verse-line {
  margin: 0 0 0.55rem;
}

.verse-addr {
  font-size: 0.68rem;
  color: var(--muted);
  margin-right: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.compare-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

.compare-note--urtext {
  font-style: normal;
  color: var(--muted);
}

.compare-note--urtext strong {
  font-weight: 600;
  font-style: normal;
  color: var(--paper);
}

.text-col-empty {
  opacity: 0.45;
}

.text-col .missing {
  color: var(--muted);
}

.aland {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.42rem;
  font-weight: 400;
  color: var(--accent);
  min-width: 2.85rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  letter-spacing: -0.02em;
  padding-top: 0.12rem;
}

.row-main {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.row-main h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--heading);
}

.row-main .sec {
  font-size: 0.73rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.45;
}

.gospels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  justify-content: flex-end;
  align-items: center;
}

.pill {
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.32rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  opacity: 0.35;
  white-space: nowrap;
  line-height: 1.2;
}

.pill.on {
  opacity: 1;
}

.pill.on.bold {
  box-shadow: var(--shadow-card);
}

.pill.mt.on { background: rgba(42, 110, 168, 0.12); border-color: rgba(42, 110, 168, 0.45); color: #1a4d78; }
.pill.mk.on { background: rgba(154, 130, 48, 0.12); border-color: rgba(154, 130, 48, 0.45); color: #5c4d1c; }
.pill.lk.on { background: rgba(47, 143, 95, 0.12); border-color: rgba(47, 143, 95, 0.45); color: #1a5c3a; }
.pill.jn.on { background: rgba(107, 91, 158, 0.12); border-color: rgba(107, 91, 158, 0.45); color: #3d3358; }

html[data-theme="dark"] .pill.mt.on {
  background: #253447;
  border-color: #334a62;
  color: #c5d2e3;
}
html[data-theme="dark"] .pill.mk.on {
  background: #4f4227;
  border-color: #6b5a36;
  color: #e8dcc4;
}
html[data-theme="dark"] .pill.lk.on {
  background: #2b3628;
  border-color: #3d4a38;
  color: #c8d4c4;
}
html[data-theme="dark"] .pill.jn.on {
  background: #432644;
  border-color: #5c3560;
  color: #dfc4e4;
}

.pill .ref {
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.88;
  margin-left: 0.3rem;
}

.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

footer {
  margin-top: 2.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

footer a {
  color: var(--accent);
}

footer p {
  margin: 0 0 0.65rem;
  max-width: 62ch;
}

footer p:last-child {
  margin-bottom: 0;
}

/* Seite „Quellen & Lizenzen“ */
.sources-page h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 1.35rem;
  margin: 2rem 0 0.85rem;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.sources-page h2:first-of-type {
  margin-top: 0.5rem;
}

.sources-page .src-intro {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 68ch;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.sources-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  line-height: 1.45;
  margin-bottom: 0.25rem;
}

.sources-page th,
.sources-page td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.sources-page th {
  background: var(--bg-muted);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sources-page td:first-child {
  font-weight: 600;
  color: var(--paper);
  min-width: 8.5rem;
}

.sources-page td a {
  color: var(--accent);
  word-break: break-word;
}

.sources-page .src-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.5rem 0 1.5rem;
  max-width: 72ch;
}

.sources-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.15rem;
  padding-bottom: 0.35rem;
}

.subnav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.subnav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-muted);
  transition: color 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.subnav a:hover {
  color: var(--paper);
  border-color: var(--border-strong);
  background: var(--bg);
  box-shadow: var(--shadow-card);
}

.subnav a.here {
  color: var(--accent-on);
  background: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 720px) {
  .gospels { justify-content: flex-start; }
  .text-grid {
    grid-template-columns: 1fr !important;
  }
}

.fab-stack {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 101;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.scroll-top-fab {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--paper);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.scroll-top-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: inherit;
}

.scroll-top-fab svg {
  display: block;
  margin-top: -2px;
}

.scroll-top-fab.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-fab:hover {
  border-color: var(--accent-strong);
  color: var(--accent);
  box-shadow: var(--shadow-elevate);
}

.scroll-top-fab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.compare-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(0.75rem, env(safe-area-inset-top, 0px)) max(0.75rem, env(safe-area-inset-right, 0px))
    max(0.75rem, env(safe-area-inset-bottom, 0px)) max(0.75rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.44s cubic-bezier(0.16, 1, 0.35, 1),
    visibility 0s linear 0.44s;
}

.compare-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.44s cubic-bezier(0.16, 1, 0.35, 1),
    visibility 0s;
}

.compare-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--dialog-backdrop-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.compare-modal-panel {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg2);
  box-shadow: var(--shadow-elevate);
  padding: 1.15rem 1.35rem 1.45rem;
  transition:
    transform 0.44s cubic-bezier(0.16, 1, 0.35, 1) 0.08s,
    opacity 0.38s ease 0.08s;
}

.compare-modal-shell > .compare-modal-panel {
  flex: 1 1 auto;
  min-height: 0;
}

/* Scroll nur im Evangelien-Grid (Modal + Startseite) */
.compare-modal-panel > .compare-modal-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
}

.compare-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-muted);
  color: var(--paper);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}

.compare-modal-close:hover {
  border-color: var(--accent-ring);
  color: var(--accent);
  background: var(--accent-soft);
}

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

.compare-modal-header {
  flex: 0 0 auto;
  padding-right: 2.5rem;
  margin-bottom: 1rem;
}

.compare-modal-aland {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.compare-modal-header h2 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.25rem, 3.5vw, 1.65rem);
  line-height: 1.2;
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
  color: var(--heading);
}

.compare-modal-sec {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.compare-modal-grid {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  transition: opacity 0.28s ease;
}

.compare-modal-grid.is-swapping {
  opacity: 0.35;
  pointer-events: none;
}

/* Nur Einblenden — kein Versatz (weder links/rechts noch unten/oben) */
@keyframes compareColIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Alle Spalten gleichzeitig */
.compare-modal-grid.compare-grid--reveal > .text-col {
  animation: compareColIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.compare-modal-grid.compare-grid--reveal > .compare-note {
  animation: compareColIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .compare-modal,
  .compare-modal-shell,
  .compare-translations-bar,
  .compare-modal-panel,
  .compare-modal-grid,
  .translation-option-main,
  .translation-info-btn {
    transition-duration: 0.01ms !important;
  }

  #filter-accordion.filter-toolbar {
    transition-duration: 0.01ms !important;
  }

  .filter-acc-panel[open] .filter-acc-body--presets,
  .list.list--reveal > .row-wrap,
  .list.list--reveal > .empty,
  .count.count--pulse {
    animation: none !important;
  }

  .filter-acc-summary--toolbar {
    transition-duration: 0.01ms !important;
  }

  .translation-picker-overlay,
  .translation-lang-pick[open] .translation-lang-dropdown-body,
  .translation-picker-overlay.is-visible .translation-picker-toolbar,
  .translation-picker-overlay.is-visible .translation-picker-scroll,
  .compare-modal-grid.compare-grid--reveal > .text-col,
  .compare-modal-grid.compare-grid--reveal > .compare-note {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mobile: touch targets, safe areas, layout */
@media (max-width: 720px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  input[type="search"],
  select {
    width: 100%;
    min-width: 0;
    font-size: 16px;
    min-height: 44px;
  }

  .preset-wrap {
    width: 100%;
  }

  .preset-group {
    width: 100%;
  }

  .preset button {
    min-height: 44px;
    padding: 0.45rem 0.9rem;
  }

  .filter-acc-summary,
  .filter-acc-summary--toolbar {
    min-height: 44px;
  }

  .subnav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
  }

  .row-wrap .row-head {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 0.5rem 0.7rem;
    padding: 0.8rem 0.9rem;
    position: relative;
  }

  .row-wrap .row-head .row-main {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .row-wrap .row-head .row-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    align-self: stretch;
    margin-top: 0.15rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
  }

  .row-wrap .row-head .chev {
    position: absolute;
    top: 0.95rem;
    right: 1.1rem;
  }

  .row-wrap .row-head .gospels {
    width: 100%;
    justify-content: flex-start;
    gap: 0.65rem;
  }

  .pill {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.55rem;
  }

  .fab-stack {
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .scroll-top-fab {
    width: 3rem;
    height: 3rem;
    min-width: 48px;
    min-height: 48px;
  }

  .compare-modal {
    padding:
      max(0.5rem, env(safe-area-inset-top))
      max(0.5rem, env(safe-area-inset-right))
      max(0.75rem, env(safe-area-inset-bottom))
      max(0.5rem, env(safe-area-inset-left));
  }

  /* Vergleichs-Modal (z. B. Liste): ein Scrollbereich für Leiste + Text — nicht nur das Evangelien-Grid */
  .compare-modal .compare-modal-shell {
    width: 100%;
    max-height: min(calc(100dvh - 1rem), calc(100svh - 1rem));
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
  }

  .compare-modal-shell > .compare-modal-panel {
    flex: 0 0 auto;
    min-height: 0;
  }

  #compare-modal-grid.compare-modal-grid {
    flex: 0 0 auto;
    min-height: 0;
    overflow: visible;
    -webkit-overflow-scrolling: auto;
    overscroll-behavior: auto;
  }

  .compare-modal-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    top: max(0.5rem, env(safe-area-inset-top));
    right: max(0.5rem, env(safe-area-inset-right));
  }

  .compare-modal-header {
    padding-right: 3rem;
  }

  .compare-modal-panel {
    padding: 1rem max(1rem, env(safe-area-inset-right)) 1.15rem max(1rem, env(safe-area-inset-left));
    overflow: visible;
  }

  .translation-option-main {
    min-height: 44px;
    padding: 0.5rem 0.65rem;
    font-size: 0.8rem;
  }

  .translation-info-btn {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .translation-more-summary {
    min-height: 44px;
    padding: 0.5rem 0;
    align-items: center;
  }

  .translation-info-dialog:not(.site-info-dialog) {
    max-width: min(26rem, calc(100vw - 1rem - env(safe-area-inset-left) - env(safe-area-inset-right)));
  }

  .site-info-dialog {
    max-width: min(48rem, calc(100vw - 1rem - env(safe-area-inset-left) - env(safe-area-inset-right)));
    max-height: min(88dvh, 90vh);
  }
}

/* Startseite: Hero + scrollbare Seite; Beispiel-Panel mit begrenzter Höhe, Scroll im Grid */
body.compare-home {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  height: auto;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  body.compare-home {
    scroll-behavior: auto;
  }
}

body.compare-home .compare-home-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
}

.compare-home-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-bottom: 2rem;
}

.compare-home-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
  flex: 0 0 auto;
}

/* Minimaler Kopf: Info | Titel | Theme */
.compare-home-header--landing {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  align-content: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0;
  flex-wrap: nowrap;
}

.compare-home-header--landing .compare-home-info-btn {
  justify-self: start;
}

.compare-home-header--landing h1.compare-home-header__mark {
  grid-column: 2;
  justify-self: center;
  align-self: center;
  margin: 0;
  max-width: min(100%, 22rem);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--heading);
  text-align: center;
}

.compare-home-header__right {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.compare-home-header--landing .liste-nav-back {
  grid-column: 1;
  justify-self: start;
  align-self: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
  white-space: nowrap;
}

.compare-home-header--landing .liste-nav-back:hover {
  color: var(--accent);
  border-bottom-color: var(--accent-mid);
}

.compare-home-header--landing .liste-nav-back:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Quellen: eine Zeile Navigation + Theme über dem Titelblock */
.sources-page__header {
  display: block;
}

.sources-page__header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sources-page__header-bar .liste-nav-back {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}

.sources-page__header-bar .liste-nav-back:hover {
  color: var(--accent);
  border-bottom-color: var(--accent-mid);
}

.sources-page__header-bar .liste-nav-back:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Perikopensuche */
.liste-page__header {
  margin-bottom: 1.25rem;
}

.liste-page .liste-page__search .filter-toolbar {
  margin-bottom: 0;
}

.liste-page .list-section {
  padding-top: 1.5rem;
}

.liste-page .liste-page__footer {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.liste-page .filter-toolbar-search input[type="search"] {
  min-height: 3rem;
  padding: 0.6rem 1.15rem;
  font-size: 0.95rem;
  border-color: var(--border-strong);
  background: var(--bg);
}

/* Pill nur auf <summary> — sonst zeichnet <details> einen rechteckigen Hintergrund hinter die Rundung */
.liste-page .filter-acc-panel {
  border: none;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

.liste-page .filter-acc-summary--toolbar {
  background: transparent;
  box-sizing: border-box;
}

/* Unterseiten: langer Einleitungstext — Button oben bündig zum Titel */
body:not(.compare-home) .compare-home-header {
  align-items: flex-start;
}

body.compare-home .compare-home-header h1 {
  margin-bottom: 0;
}

.compare-home-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  max-width: 100%;
}

/* Titel + Info direkt nebeneinander (Info unmittelbar am Wortlaut) */
.compare-home-title-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
}

.compare-home-title-heading h1 {
  margin: 0;
  flex: 0 1 auto;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
}

.compare-home-header__actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
}

.compare-home-info-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.95rem;
  height: 1.95rem;
  min-width: 1.95rem;
  min-height: 1.95rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--muted);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 0.12s,
    color 0.12s,
    background 0.12s,
    box-shadow 0.12s;
}

.compare-home-info-btn:hover {
  border-color: var(--accent-strong);
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-card);
}

.compare-home-info-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.compare-home-header__text .lead {
  margin-top: 0.5rem;
  margin-bottom: 0;
  max-width: 62ch;
}

.sources-page-kicker {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.25rem, 2.8vw, 1.55rem);
  font-weight: 400;
  margin: 0.4rem 0 0;
  color: var(--heading);
  line-height: 1.2;
}

.compare-home-header__text .sources-page-kicker + .lead {
  margin-top: 0.65rem;
}

.compare-home-header__text {
  flex: 1 1 min(100%, 42rem);
  min-width: 0;
}

.compare-home-lead {
  margin-bottom: 0;
}

.compare-home-code {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
  font-size: 0.85em;
  padding: 0.12em 0.45em;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  color: var(--heading);
}

.compare-home-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-on);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.compare-home-cta:hover {
  border-color: var(--accent-ink);
  background: var(--accent-ink);
  color: var(--accent-on);
  box-shadow: var(--shadow-elevate);
}

.compare-home-cta--search {
  gap: 0.45rem;
}

.compare-home-cta__icon {
  flex-shrink: 0;
  display: block;
}

.compare-home-cta__label {
  display: inline;
}

.compare-main-header.compare-modal-header {
  padding-right: 0;
}

.compare-home-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.compare-home-shell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: min(var(--layout-max-width), calc(100vw - 2rem));
  max-width: 100%;
  margin: 0 auto;
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
}

/* Hero: viel Weißraum, zentriert (Anmutung: ruhige Landing) */
.compare-home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: min(calc(100dvh - 5.5rem), 52rem);
  padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.compare-home-hero__inner {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
}

.compare-home-hero__title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.85rem, 5.5vw, 3rem);
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 1.25rem;
  letter-spacing: -0.03em;
  background: linear-gradient(
    100deg,
    var(--mt) 0%,
    var(--mk) 28%,
    var(--lk) 58%,
    var(--jn) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@supports not (background-clip: text) {
  .compare-home-hero__title {
    background: none;
    color: var(--heading);
  }
}

.compare-home-hero__sub {
  margin: 0 0 2rem;
}

.compare-home-hero__sub p {
  margin: 0;
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  line-height: 1.6;
  color: var(--muted);
}

.compare-home-hero__sub p + p {
  margin-top: 0.75rem;
}

.compare-home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 0.85rem;
}

.compare-home-info-bar {
  padding: 0.75rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.compare-home-info-bar p {
  margin: 0;
}

.compare-home-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0.55rem 1.35rem;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    box-shadow 0.15s;
}

.compare-home-pill__icon {
  flex-shrink: 0;
  display: block;
}

.compare-home-pill--primary {
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--heading);
  box-shadow: none;
}

.compare-home-pill--primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.compare-home-pill--primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.compare-home-pill--ghost:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.compare-home-pill--ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
}

.compare-home-pill--ghost:hover {
  border-color: var(--border-strong);
  color: var(--heading);
  background: var(--ink-4);
}

button.compare-home-pill {
  cursor: pointer;
  font-family: inherit;
}

/* Beispielperikope: festes Overlay statt Seiten-Scroll */
.compare-home-example-layer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: max(0.5rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right))
    max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  box-sizing: border-box;
}

.compare-home-example-layer:not([hidden]) {
  display: flex;
}

.compare-home-example-layer[hidden] {
  display: none !important;
}

.compare-home-example-layer__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: var(--dialog-backdrop-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}

.compare-home-example-layer__sheet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(var(--layout-max-width), calc(100vw - 1.5rem));
  max-height: min(94dvh, 920px);
  min-height: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: var(--shadow-elevate);
  /* Ein Scrollbereich für die ganze Karte — nicht separat im Evangelien-Grid */
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.compare-home-example-layer__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
  position: sticky;
  top: 0;
  z-index: 2;
  /* Globalregel header { margin-bottom: 2rem } greift sonst mit */
  margin-bottom: 0;
}

.compare-home-example__heading {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  font-weight: 400;
  margin: 0;
  color: var(--heading);
  line-height: 1.2;
}

.compare-home-example-layer__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-muted);
  color: var(--paper);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 0.12s,
    color 0.12s,
    background 0.12s;
}

.compare-home-example-layer__close:hover {
  border-color: var(--accent-ring);
  color: var(--accent);
  background: var(--accent-soft);
}

.compare-home-example-layer__close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.compare-home-example-layer__body {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem 1rem;
  overflow: visible;
}

.compare-home-example-layer .compare-main-panel.compare-modal-panel {
  flex: 0 0 auto;
  min-height: auto;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0.85rem 0 0;
  background: transparent;
  overflow: visible !important;
}

/* Kein eigenes Scrollen im Perikopen-Text — Höhe wächst mit Inhalt, Scroll nur an der Karte */
.compare-home-example-layer #compare-main-grid.compare-modal-grid {
  overflow: visible !important;
  flex: 0 0 auto !important;
  min-height: auto !important;
  -webkit-overflow-scrolling: auto;
  overscroll-behavior: auto;
}

body.compare-home-example-is-open {
  overflow: hidden !important;
}

.compare-main-panel {
  flex: 1 1 auto;
  min-height: 0;
}

@media (max-width: 720px) {
  .compare-home-shell {
    min-height: 0;
  }

  .compare-home-hero {
    min-height: min(calc(100dvh - 4rem), 40rem);
    padding-top: 1rem;
  }

  /* Smartphone: kein eigenes Scrollen in der Evangelien-Ansicht — Seite scrollt als Ganzes */
  body.compare-home {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.compare-home .compare-home-wrap {
    max-height: none;
  }

  body.compare-home .compare-home-main {
    overflow: visible;
    flex: 0 0 auto;
  }

  body.compare-home .compare-home-shell {
    flex: 0 0 auto;
    min-height: 0;
  }

  .compare-home-example-layer {
    padding: 0;
    align-items: stretch;
  }

  .compare-home-example-layer__sheet {
    width: 100%;
    max-width: none;
    max-height: 100dvh;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  /* Weniger vertikaler Platz für Steuerung — Lesetext wird priorisiert */
  body.compare-home .compare-home-header {
    margin-bottom: 0.65rem;
    gap: 0.5rem 0.85rem;
  }

  body.compare-home .compare-home-shell {
    gap: 0.5rem;
  }
}

