:root {
  color-scheme: light;
  --paper: #faf6ef;
  --ink: #201c18;
  --ink-soft: #55504a;
  --rule: #d8d0c2;
  --akzent: #7a2e2e;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  line-height: 1.65;
}

body {
  margin: 0 auto;
  max-width: 48rem;
  padding: 2rem 1rem;
  background: var(--paper);
  color: var(--ink);
}

body.seite-eintrag,
body.seite-landing,
body.seite-ueber {
  max-width: 46rem;
}

header,
.site-header {
  text-align: center;
  padding: 1.5rem 0;
}

header a,
.site-header a {
  color: inherit;
  text-decoration: none;
}

header h1,
.site-header h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(2.4rem, 7vw, 3.4rem);
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}

header p,
.site-header p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.doppelregel {
  border-top: 1px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  height: 4px;
  margin: 1.4rem 0 0;
}

.site-meta-nav {
  margin-top: 1rem;
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
}

.site-meta-nav a {
  color: var(--akzent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-meta-nav a:hover {
  border-bottom-color: var(--akzent);
}

.site-footer {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--akzent);
}

/* Über-Seite */
.ueber-inhalt h2 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2rem);
  margin: 2rem 0 0.85rem;
}

.ueber-inhalt section:first-child > h2 {
  margin-top: 0.5rem;
}

.ueber-inhalt h3 {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--akzent);
  margin: 2rem 0 1rem;
  font-weight: 600;
}

.ueber-inhalt p {
  margin: 0 0 0.9rem;
}

.autor-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0 0 0.5rem;
}

.autor-portrait {
  margin: 0;
}

.autor-portrait img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--rule);
}

.autor-portrait figcaption,
.buch-cover figcaption {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.autor-portrait-platzhalter,
.buch-cover-platzhalter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  aspect-ratio: 3 / 4;
  background: linear-gradient(160deg, #ebe4d8, #d8d0c2);
  color: var(--ink-soft);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.autor-text {
  flex: 1;
  min-width: 0;
}

.buch-cover {
  margin: 0.35rem 0 1.5rem;
  text-align: center;
}

.buch-cover img {
  display: block;
  width: min(100%, 22rem);
  height: auto;
  margin: 0 auto;
  box-shadow: 0 12px 28px rgba(32, 28, 24, 0.14);
}

.buch-cover-platzhalter {
  max-width: 22rem;
  margin: 0 auto;
  aspect-ratio: 3 / 4;
}

/* Rezensionen über Lexikon-Kulisse */
.buch-rezensionen-stage {
  position: relative;
  margin: 0.35rem 0 1.5rem;
  padding: 0.85rem 0 2.5rem;
  min-height: 28rem;
  overflow: hidden;
}

/* Durchgehender Papier-Wash über die ganze Bühne */
.buch-rezensionen-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: color-mix(in srgb, var(--paper) 70%, transparent);
}

/* Weicher Übergang zurück zur Seite */
.buch-rezensionen-stage::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5rem;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent,
    color-mix(in srgb, var(--paper) 55%, transparent) 45%,
    var(--paper)
  );
}

.buch-cover--backdrop {
  position: absolute;
  inset: 0;
  left: 50%;
  width: min(100%, 36rem);
  height: 100%;
  margin: 0;
  transform: translateX(-50%);
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  filter: saturate(0.88);
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.buch-cover--backdrop img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center top;
  box-shadow: none;
}

.buch-cover--backdrop .buch-cover-platzhalter {
  max-width: none;
  width: 100%;
  height: 100%;
  opacity: 0.7;
}

.buch-cover--backdrop figcaption {
  display: none;
}

.buch-rezensionen {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1rem 1rem 1.75rem;
  box-sizing: border-box;
  background: none;
}

.buch-rezensionen > *:first-child {
  margin-top: 0;
}

.buch-rezensionen blockquote {
  position: relative;
  max-width: 36rem;
  margin: 0 auto 1.65rem;
  padding: 0;
  border: none;
  border-bottom: none;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink);
}

.buch-rezensionen blockquote:first-of-type::before {
  content: "„";
  position: absolute;
  top: -0.35em;
  left: -0.05em;
  font-size: 3.2rem;
  line-height: 1;
  color: color-mix(in srgb, var(--akzent) 28%, transparent);
  font-style: normal;
  pointer-events: none;
}

.buch-rezensionen blockquote:last-of-type {
  margin-bottom: 0;
}

.buch-rezensionen blockquote p {
  margin: 0 0 0.5rem;
}

.buch-rezensionen blockquote p:last-child {
  margin: 0;
  font-family: 'Source Sans 3', sans-serif;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

@media (max-width: 719px) {
  .buch-rezensionen-stage {
    min-height: 24rem;
    padding: 0.7rem 0 2rem;
    margin-bottom: 1.25rem;
  }

  .buch-cover--backdrop {
    width: min(100%, 26rem);
    opacity: 0.38;
  }

  .buch-rezensionen {
    padding: 0.85rem 0.75rem 1.4rem;
  }
}

@media (min-width: 720px) {
  .autor-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.75rem;
  }

  .autor-portrait {
    flex: 0 0 14.5rem;
  }

  .autor-portrait img,
  .autor-portrait-platzhalter {
    max-width: none;
  }

  .buch-rezensionen-stage {
    min-height: 32rem;
    padding: 1rem 0 2.75rem;
  }

  .buch-cover--backdrop {
    width: min(100%, 38rem);
    opacity: 0.45;
  }
}

.ueber-inhalt blockquote {
  margin: 1.75rem 0;
  padding: 0 0 1.25rem;
  border-bottom: 1px solid var(--rule);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink);
}

.ueber-inhalt .buch-rezensionen blockquote {
  margin: 0 auto 1.65rem;
  padding: 0;
  border: none;
  border-bottom: none;
}

.ueber-inhalt .buch-rezensionen blockquote:last-of-type {
  margin-bottom: 0;
  border-bottom: none;
}

.ueber-inhalt blockquote:last-of-type {
  border-bottom: none;
}

.ueber-inhalt blockquote p {
  margin: 0 0 0.5rem;
}

.ueber-inhalt blockquote p:last-child {
  margin: 0;
  font-family: 'Source Sans 3', sans-serif;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.ueber-cta {
  margin-top: 2.5rem !important;
  text-align: center;
}

.ueber-cta a {
  display: inline-block;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  color: var(--akzent);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--akzent);
}

.ueber-cta a:hover {
  background: var(--akzent);
  color: var(--paper);
}

/* Alphabetisches Register auf der Landingpage */
.wort-az {
  margin: 1.25rem 0 2.5rem;
}

.wort-az h2 {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.9rem;
}

.wort-az ul {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
}

.wort-az li {
  break-inside: avoid;
  margin: 0.2rem 0;
  font-family: 'Fraunces', serif;
}

.wort-az a {
  color: var(--ink);
  text-decoration: none;
}

.wort-az a:hover {
  color: var(--akzent);
}

@media (min-width: 900px) {
  .wort-az ul {
    columns: 3;
  }
}

/* Trennregel zwischen Einträgen in der Übersicht */
.trennregel {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3rem 0 2.25rem;
  position: relative;
}

.trennregel::after {
  content: "\00a7";
  position: absolute;
  top: -0.7em;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  padding: 0 0.6em;
  color: var(--rule);
  font-size: 0.9rem;
}

/* Eintrag: Kopfzeile, dann Bild + Text nebeneinander (Desktop) */
.wort-eintrag {
  margin-top: 1.5rem;
}

.wort-kopf {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 1.25rem;
}

.wort-titel {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 2.4rem);
  margin: 0;
}

.wort-titel a {
  color: inherit;
  text-decoration: none;
}

.wort-titel a:hover {
  color: var(--akzent);
}

.wort-nr {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-variant-numeric: oldstyle-nums;
}

.wort-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 2rem;
  align-items: start;
}

.wort-bild {
  margin: 0;
}

.wort-bild img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}

.wort-bild figcaption {
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 0.4rem;
  font-style: italic;
}

.wort-text > :first-child {
  margin-top: 0;
}

.wort-text h3 {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--akzent);
  margin: 1.1rem 0 0.3rem;
  font-weight: 600;
}

.wort-text p {
  margin: 0 0 0.6rem;
}

.wort-text strong {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.wort-teaser-link {
  margin-top: 1rem !important;
}

.wort-teaser-link a {
  color: var(--akzent);
  font-family: 'Fraunces', serif;
  font-weight: 600;
  text-decoration: none;
}

.wort-teaser-link a:hover {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Tafel-Platzhalter für Einträge ohne Illustration */
.tafel-platzhalter {
  aspect-ratio: 3 / 4;
  border: 1px solid var(--rule);
  background: repeating-linear-gradient(45deg, transparent 0 7px, var(--rule) 7px 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
}

.tafel-platzhalter span {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--paper);
  padding: 0.3rem 0.6rem;
}

/* Navigation auf Einzelseiten */
.wort-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
}

.wort-nav a {
  text-decoration: none;
  color: var(--ink);
}

.wort-nav a:hover {
  color: var(--akzent);
}

.wort-nav-index {
  align-self: center;
  text-align: center;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  color: var(--akzent);
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--akzent);
}

.wort-nav-index:hover {
  background: var(--akzent);
  color: var(--paper);
}

.wort-nav-neighbors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.wort-nav-prev,
.wort-nav-next {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.wort-nav-prev {
  text-align: left;
  justify-self: start;
}

.wort-nav-next {
  text-align: right;
  justify-self: end;
}

.wort-nav-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.wort-nav-begriff {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
}

.wort-nav .is-disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.seite-eintrag .wort-nav:last-of-type {
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
}

/* Mobile: Bild unter Kopfzeile, vor dem Text */
@media (max-width: 768px) {
  .wort-layout {
    grid-template-columns: 1fr;
  }

  .wort-az ul {
    columns: 2;
  }
}

/* Buch-Export (HTML): Vorschau und Druck als Doppelseite */
.buch-export {
  max-width: 90rem;
}

.buch-export .buch-titel {
  margin: 2rem 0 1rem;
  font-family: 'Fraunces', serif;
}

.buch-export .buch-spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 3rem;
}

.buch-export .buch-bildseite img {
  width: 100%;
  height: auto;
}

@media print {
  .buch-eintrag {
    break-after: page;
  }

  .buch-spread {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
  }

  .buch-bildseite,
  .buch-textseite {
    break-inside: avoid;
    padding: 2rem;
    box-sizing: border-box;
  }

  .buch-bildseite {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .buch-bildseite img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
  }
}
