/* Persönliche Gedenk- und Abschiedsseiten – ruhig, hell, ohne Animationen.
   Die Person steht im Mittelpunkt; die Plattform bleibt zurückhaltend. */

@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-latin-wght-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('fonts/source-sans-3-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* Gedämpfte, markenneutrale Palette: warmes Papier, Tinte, ein stilles Grau-Violett. */
:root {
  color-scheme: light;
  --page-bg: #f6f3ee; /* wird vom Modus-Skript für die Browserleiste gelesen */
  --paper: #f6f3ee;
  --card: #fffdf9;
  --ink: #26232b;
  --ink-soft: #57525e;
  --accent: #5a5268;
  --line: rgba(38, 35, 43, 0.12);
  --focus: #7a6f8f;
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --column: 820px;
  --gutter: clamp(16px, 5vw, 32px);
  --portrait-ring: #fffdf9;
}

/* Nacht-Modus: gedämpftes, warmes Dunkel – gleiche Automatik und Umschalter wie auf den Marken-Seiten. */
:root[data-theme='dark'] {
  color-scheme: dark;
  --page-bg: #17151b;
  --paper: #17151b;
  --card: #201d25;
  --ink: #eeebf2;
  --ink-soft: #b8b2c2;
  --accent: #c9bedd;
  --line: rgba(238, 235, 242, 0.12);
  --focus: #c9bedd;
  --portrait-ring: #2a2630;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --page-bg: #17151b;
    --paper: #17151b;
    --card: #201d25;
    --ink: #eeebf2;
    --ink-soft: #b8b2c2;
    --accent: #c9bedd;
    --line: rgba(238, 235, 242, 0.12);
    --focus: #c9bedd;
    --portrait-ring: #2a2630;
  }
}
.theme-transition,
.theme-transition * {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease !important;
}
@media (prefers-reduced-motion: reduce) {
  .theme-transition,
  .theme-transition * {
    transition: none !important;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 0.35vw + 1rem, 1.1875rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
picture {
  display: contents;
}
a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
}
p {
  margin: 0;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.m-skip {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
}
.m-skip:focus {
  top: 12px;
}

/* --- Header ---------------------------------------------------------- */
.m-header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 62px;
  padding: 18px var(--gutter) 0;
}
.m-logo {
  display: block;
  flex: none;
  background-color: var(--logo-light);
  -webkit-mask: var(--logo-url) center / contain no-repeat;
  mask: var(--logo-url) center / contain no-repeat;
}
:root[data-theme='dark'] .m-logo {
  background-color: var(--logo-dark);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .m-logo {
    background-color: var(--logo-dark);
  }
}
/* Runder Tag-/Nacht-Umschalter oben rechts, wie auf den Marken-Seiten. */
.m-theme-toggle {
  position: absolute;
  top: 14px;
  right: var(--gutter);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.m-theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.m-theme-toggle__icon {
  display: inline-flex;
}
.m-theme-toggle__icon--sun,
:root[data-theme='dark'] .m-theme-toggle__icon--moon {
  display: none;
}
:root[data-theme='dark'] .m-theme-toggle__icon--sun {
  display: inline-flex;
}
:root:not(.js) .m-theme-toggle {
  display: none;
}

/* --- Inhalt ---------------------------------------------------------- */
.m-main {
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(48px, 8vw, 88px);
}
.m-section {
  margin-top: clamp(48px, 8vw, 80px);
}

.m-hero {
  text-align: center;
  padding-top: clamp(28px, 6vw, 56px);
}
.m-hero__headline {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.2;
  text-wrap: balance;
  font-style: italic;
  font-weight: 450;
  font-size: clamp(2rem, 4vw + 1rem, 3.4rem);
  color: var(--accent);
}
.m-hero__portrait {
  width: min(78vw, 360px);
  margin: clamp(28px, 5vw, 44px) auto 0;
}
.m-hero__portrait img {
  width: 100%;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 10px var(--portrait-ring), 0 0 0 11px var(--line), 0 30px 60px -30px rgba(0, 0, 0, 0.45);
}
.m-hero__name {
  margin-top: clamp(28px, 5vw, 40px);
  font-size: clamp(2.1rem, 3.6vw + 1rem, 3.2rem);
  font-weight: 500;
}
.m-hero__dates {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 14px;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.m-hero__dates span[aria-hidden] {
  margin-right: 6px;
  color: var(--accent);
}
/* Kreuz als Grafik statt Zeichen ✝ – sonst zeigt iOS ein farbiges Emoji. */
.m-cross {
  display: inline-block;
  vertical-align: -0.12em;
}

.m-farewell {
  max-width: 62ch;
  margin-inline: auto;
  text-align: center;
}
.m-farewell p {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1vw + 1rem, 1.45rem);
  line-height: 1.65;
}

/* --- Galerie: Bilder vollständig, ohne Beschnitt ---------------------- */
/* Ausgerichtete Zeilen: Breite proportional zum Seitenverhältnis (--ar), dadurch sind
   alle Bilder einer Zeile gleich hoch und werden nicht beschnitten (Desktop: 3 + 2). */
.m-gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(12px, 2vw, 20px);
}
.m-gallery__item {
  flex: var(--ar) 1 calc(var(--ar) * 280px);
  min-width: 0;
}
.m-gallery__link {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -28px rgba(38, 35, 43, 0.5);
}
.m-gallery__link img {
  width: 100%;
}
@media (max-width: 420px) {
  .m-gallery__item {
    flex-basis: 100%;
  }
}

/* --- Widmung -------------------------------------------------------- */
.m-dedication {
  text-align: center;
}
.m-dedication__title {
  font-size: clamp(1.8rem, 2vw + 1rem, 2.3rem);
  font-style: italic;
  color: var(--accent);
}
.m-dedication__group {
  margin-top: 28px;
}
.m-dedication__group h3 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.m-dedication__group p {
  max-width: 64ch;
  margin: 10px auto 0;
  line-height: 1.85;
}

.m-dedication__photo {
  max-width: 560px;
  margin: clamp(28px, 4vw, 40px) auto 0;
}
.m-dedication__photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 20px 44px -26px rgba(0, 0, 0, 0.5);
}
.m-dedication__photo figcaption {
  margin-top: 14px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.6;
  text-wrap: balance;
  color: var(--ink-soft);
}

/* --- Infoboxen ------------------------------------------------------ */
.m-box {
  padding: clamp(24px, 4vw, 36px);
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
}
.m-box + .m-box {
  margin-top: clamp(20px, 3vw, 28px);
}
.m-box__title {
  font-size: 1.45rem;
  margin-bottom: 12px;
}
.m-box__link {
  margin-top: 16px;
  font-weight: 600;
}
.m-box__link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* --- Footer --------------------------------------------------------- */
.m-footer {
  display: grid;
  gap: 32px;
  justify-items: center;
  padding: clamp(36px, 6vw, 56px) var(--gutter) 40px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.m-footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 10px;
  border-radius: 12px;
  text-align: left;
  line-height: 1.45;
  color: var(--ink-soft);
  text-decoration: none;
}
.m-footer__domain {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  color: var(--accent);
}
.m-footer__brand:hover .m-footer__domain {
  text-decoration-thickness: 2px;
}
.m-footer__brand strong {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--ink);
}
.m-footer__corporate {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: 100%;
}
.m-footer__art {
  width: min(100%, 520px);
  border-radius: 12px;
}
.m-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.m-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
}
.m-footer__trust {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.m-footer__copy {
  margin-top: -0.4rem;
  font-size: 0.85rem;
}

/* --- Zurück nach oben (wie auf den Marken-Seiten) -------------------- */
.to-top {
  position: fixed;
  right: calc(clamp(16px, 3vw, 32px) + env(safe-area-inset-right, 0px));
  bottom: calc(clamp(16px, 3vw, 32px) + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--paper);
  background: color-mix(in srgb, var(--accent) 62%, transparent);
  border: 1px solid color-mix(in srgb, var(--paper) 35%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px -12px rgba(20, 18, 24, 0.55);
  text-decoration: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}
.to-top:hover,
.to-top:focus-visible {
  background: color-mix(in srgb, var(--accent) 92%, transparent);
}
.js .to-top:not(.is-visible) {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .to-top {
    transition: none;
  }
}

/* --- Bildansicht (Lightbox) ---------------------------------------- */
.m-lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 18, 24, 0.94);
}
.m-lightbox::backdrop {
  background: rgba(20, 18, 24, 0.6);
}
.m-lightbox[open] {
  height: 100dvh;
}
.m-lightbox__figure {
  display: grid;
  place-items: center;
  height: 100%;
  margin: 0;
}
/* Bild immer so groß wie möglich im Viewport – vergrößert wie verkleinert, festes Seitenverhältnis.
   Freiraum: oben/unten 64px für die Schaltflächen, seitlich 16px. */
.m-lightbox__img {
  --lb-w: calc(100vw - 32px);
  --lb-h: calc(100vh - 128px);
  width: min(var(--lb-w), calc(var(--lb-h) * var(--ar, 1.3333)));
  height: auto;
  max-width: none;
  max-height: none;
  aspect-ratio: var(--ar, 1.3333);
  object-fit: contain;
  border-radius: 6px;
}
@supports (height: 100dvh) {
  .m-lightbox__img {
    --lb-h: calc(100dvh - 128px);
  }
}
/* Flache Fenster (Handy quer): Schaltflächen seitlich, Bild nutzt die volle Höhe. */
@media (max-height: 520px) and (orientation: landscape) {
  .m-lightbox__img {
    --lb-w: calc(100vw - 136px);
    --lb-h: calc(100vh - 16px);
  }
  @supports (height: 100dvh) {
    .m-lightbox__img {
      --lb-h: calc(100dvh - 16px);
    }
  }
}
.m-lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.m-lightbox__btn:focus-visible {
  outline-color: #fff;
}
.m-lightbox__close {
  top: 12px;
  right: 12px;
}
.m-lightbox__prev,
.m-lightbox__next {
  top: 50%;
  margin-top: -24px;
}
.m-lightbox__prev {
  left: 12px;
}
.m-lightbox__next {
  right: 12px;
}

@media print {
  .m-header,
  .to-top,
  .m-lightbox,
  .m-box__link {
    display: none;
  }
}

/* Lebensweb-Grafik im Footer verlinkt (neuer Tab). */
.m-footer__art-link {
  display: inline-block;
  width: min(100%, 520px);
  border-radius: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.m-footer__art-link:hover {
  transform: translateY(-2px);
}
.m-footer__art-link .m-footer__art {
  display: block;
  width: 100%;
}

/* --- Anlass-Seiten (z. B. Freundesweb): Überschrift als H1, Galerietitel --- */
.m-hero__headline--h1 {
  font-size: clamp(2.2rem, 4.4vw + 1rem, 3.8rem);
}
p.m-hero__name {
  font-family: var(--font-display);
  line-height: 1.2;
}
.m-section__title {
  margin-bottom: clamp(20px, 3vw, 28px);
  text-align: center;
  font-size: clamp(1.6rem, 1.6vw + 1rem, 2rem);
  font-style: italic;
  color: var(--accent);
}

/* --- Widmungen: je Person / Paar / Gruppe ein Abschnitt ----------------- */
.m-tributes {
  text-align: center;
}
.m-tributes__title {
  font-size: clamp(1.8rem, 2vw + 1rem, 2.3rem);
  font-style: italic;
  color: var(--accent);
}
.m-tributes__sub {
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.m-tributes__list {
  list-style: none;
  margin: clamp(24px, 4vw, 36px) 0 0;
  padding: 0;
  display: grid;
  gap: clamp(28px, 5vw, 48px);
}
.m-tribute {
  max-width: 560px;
  margin-inline: auto;
  width: 100%;
}
/* Fotos vollständig, ohne Beschnitt von Gesichtern. */
.m-tribute__photos {
  display: grid;
  gap: 12px;
  margin-inline: auto;
}
/* Mehrere Fotos: nebeneinander in gleicher Höhe (Breite nach Seitenverhältnis),
   auf schmalen Bildschirmen untereinander – immer ungeschnitten. */
.m-tribute--multi {
  max-width: var(--column);
}
.m-tribute--multi .m-tribute__photos {
  display: flex;
  gap: clamp(12px, 2vw, 20px);
}
.m-tribute--multi .m-tribute__photo {
  flex: var(--ar) 1 0;
  min-width: 0;
}
@media (max-width: 600px) {
  .m-tribute--multi .m-tribute__photos {
    flex-direction: column;
  }
}
.m-tribute__photos img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 20px 44px -26px rgba(0, 0, 0, 0.5);
}
.m-tribute__body {
  margin-top: 14px;
}
.m-tribute--text .m-tribute__body {
  margin-top: 0;
}
.m-tribute__name {
  font-size: clamp(1.25rem, 0.8vw + 1rem, 1.45rem);
  font-weight: 500;
}
.m-tribute__message {
  max-width: 54ch;
  margin: 8px auto 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.m-footer__claim {
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.m-footer__claim a {
  color: inherit;
}

/* Galerie als gleichmäßiges Raster (Bilder gleichen Formats, z. B. 4:3) – Desktop 3 Spalten. */
.m-gallery--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* --- Hintergrundmotiv (lebendige Variante, z. B. Freundesweb) ------------
   Motiv in voller Breite, wiederholt sich nach unten; darüber eine halbtransparente
   Fläche in Papierfarbe, damit es nur leicht durchscheint und Texte gut lesbar bleiben. */
.memorial--bg {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
}
.memorial--bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-repeat: no-repeat, repeat-y;
  background-size: 100% 100%, 100% auto;
  background-position: 0 0, top center;
}
.memorial--bg {
  --bg-veil: color-mix(in srgb, var(--paper) 78%, transparent);
}
:root[data-theme='dark'] .memorial--bg {
  --bg-veil: color-mix(in srgb, var(--paper) 82%, transparent);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .memorial--bg {
    --bg-veil: color-mix(in srgb, var(--paper) 82%, transparent);
  }
}

/* --- Zitate / Hervorhebungen: leicht abgesetzte Fläche in Akzentfarbe ---- */
.m-highlight {
  position: relative;
  max-width: 680px;
  margin-inline: auto;
  padding: clamp(28px, 5vw, 44px) clamp(22px, 5vw, 52px);
  border-radius: 20px;
  text-align: center;
  background: color-mix(in srgb, var(--accent) 9%, var(--paper));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}
.m-highlight blockquote {
  margin: 0;
}
.m-highlight p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 1.2vw + 1rem, 1.7rem);
  line-height: 1.5;
  text-wrap: balance;
  color: var(--ink);
}
/* Typografische Anführungszeichen als Gestaltungselement. */
.m-highlight--quote p::before {
  content: '„';
}
.m-highlight--quote p::after {
  content: '“';
}
.m-highlight--quote blockquote::before {
  content: '“';
  display: block;
  height: 0.55em;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 4.2rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.55;
}
.m-highlight figcaption {
  margin-top: 16px;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.m-highlight figcaption::before {
  content: '— ';
  color: var(--accent);
}
/* Zitat innerhalb der Widmungsliste (hinter einer bestimmten Widmung). */
.m-tributes__highlight .m-highlight {
  margin-top: 0;
  text-align: center;
}

/* Kompakte Galerie-Vorschau: kleinere Bilder, mehrere je Reihe (auch am Handy). */
.m-gallery--small {
  gap: 10px;
}
.m-gallery--small .m-gallery__item {
  flex: var(--ar) 1 calc(var(--ar) * 170px);
}
.m-gallery--small .m-gallery__link {
  border-radius: 10px;
}
@media (max-width: 420px) {
  .m-gallery--small .m-gallery__item {
    flex-basis: calc(var(--ar) * 110px);
  }
}

/* --- Foto-Zitat-Kombination: Bild(er) und Zitat in einer Zitatfläche ----
   Desktop: Foto links, Zitat rechts; Handy: Foto oben, Zitat darunter. */
.m-tribute--quote {
  max-width: 760px;
}
.m-photoquote {
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 40px);
  padding: clamp(16px, 3vw, 24px);
  text-align: center;
}
.m-photoquote--text {
  grid-template-columns: 1fr;
  padding: clamp(28px, 5vw, 44px) clamp(22px, 5vw, 52px);
}
.m-photoquote__photos {
  display: grid;
  gap: 10px;
}
.m-photoquote__photos img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 16px 36px -24px rgba(0, 0, 0, 0.5);
}
.m-photoquote__text {
  padding-inline: clamp(0px, 1vw, 12px);
}
@media (max-width: 600px) {
  .m-photoquote {
    grid-template-columns: 1fr;
  }
  .m-photoquote__text {
    padding: 4px 8px 12px;
  }
}
/* Längere Zitattexte in der Foto-Zitat-Box etwas kleiner, damit sie neben dem Foto Platz finden. */
.m-photoquote--long p {
  font-size: clamp(1.05rem, 0.5vw + 0.95rem, 1.25rem);
  line-height: 1.6;
  text-wrap: pretty;
}

/* Foto-Zitat-Box mit mehreren Medien (z. B. Foto + Video): Medien nebeneinander in gleicher Höhe. */
.m-tribute--quote:has(.m-photoquote--multi) {
  max-width: var(--column);
}
.m-photoquote--multi {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}
.m-photoquote__photos--multi {
  display: flex;
  gap: 10px;
}
.m-photoquote__photos--multi .m-tribute__photo {
  flex: var(--ar) 1 0;
  min-width: 0;
}
.m-tribute__video video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 16px 36px -24px rgba(0, 0, 0, 0.5);
}
@media (max-width: 600px) {
  .m-photoquote--multi {
    grid-template-columns: 1fr;
  }
}

/* --- Persönliche Widmungen: längere Briefe mit kleiner Bildgalerie --------- */
.m-personal__title {
  text-align: center;
  font-size: clamp(1.8rem, 2vw + 1rem, 2.3rem);
  font-style: italic;
  color: var(--accent);
}
.m-personal__item {
  margin-top: clamp(24px, 4vw, 36px);
  padding: clamp(22px, 4vw, 40px);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 0 0 1px var(--line), 0 18px 40px -30px rgba(38, 35, 43, 0.45);
}
.m-personal__from {
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.m-personal__gallery {
  margin-top: 18px;
}
.m-personal__letter {
  max-width: 62ch;
  margin: clamp(22px, 4vw, 32px) auto 0;
}
.m-personal__letter p {
  margin: 0 0 1em;
  line-height: 1.75;
}
.m-personal__letter p:first-child {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15em;
}
.m-personal__signature {
  margin-top: 1.4em !important;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2em;
  text-align: right;
}

.m-personal__note {
  margin-top: 6px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* --- Abschluss-Box: Impressionen mit Abschlusswidmung --------------------- */
.m-closing__row + .m-closing__row {
  margin-top: 10px;
}
.m-closing .m-gallery {
  margin-top: 18px;
}
.m-closing .m-closing__row + .m-closing__row {
  margin-top: 10px;
}
.m-closing__dedication {
  margin: clamp(24px, 4vw, 34px) 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.35rem, 1.2vw + 1rem, 1.75rem);
  color: var(--accent);
}

/* --- Musterseiten: Markenkopf, Demo-Hinweise, Biografie, Zeitleiste, Schwerpunkt --- */
.m-header--brand {
  justify-content: space-between;
}
.m-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.m-header__brand:hover span:not(.m-logo) {
  color: var(--accent);
}
.m-demo-notice {
  max-width: 62ch;
  margin: 12px auto 0;
  padding: 10px 16px;
  border-radius: 999px;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--accent) 8%, var(--paper));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}
.m-demo-notice strong {
  color: var(--accent);
  letter-spacing: 0.04em;
}
@media (max-width: 520px) {
  .m-demo-notice {
    border-radius: 14px;
  }
}
.m-section__note {
  margin: -12px 0 18px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.m-farewell--bio {
  text-align: left;
}
.m-farewell--bio p {
  font-family: var(--font-body);
  font-size: inherit;
  line-height: 1.8;
}
.m-farewell--bio p + p {
  margin-top: 1em;
}
.m-farewell--bio p:first-of-type::first-letter {
  font-family: var(--font-display);
  float: left;
  font-size: 3.2em;
  line-height: 0.9;
  padding: 4px 10px 0 0;
  color: var(--accent);
}

/* Zeitleiste: links Jahr, rechts Text; vertikale Linie in Akzentfarbe. */
.m-timeline__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 640px;
  margin-inline: auto;
  border-left: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.m-timeline__item {
  position: relative;
  padding: 0 0 22px 26px;
}
.m-timeline__item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0.45em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 2px var(--accent);
}
.m-timeline__year {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.m-timeline__text {
  margin: 2px 0 0;
  line-height: 1.65;
}

/* Markenschwerpunkt */
.m-focus {
  text-align: center;
}
.m-focus__kicker {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.m-focus p {
  max-width: 58ch;
  margin-inline: auto;
}
.m-focus p + p {
  margin-top: 0.8em;
}
.m-focus__place {
  margin: 22px auto 0;
  max-width: 460px;
  padding: 22px 20px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 7%, var(--card));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}
.m-focus__place-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
}
.m-focus__place-note {
  margin-top: 8px !important;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.m-focus__cards {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  text-align: left;
}
.m-focus__card {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.m-focus__card-label {
  margin: 0 0 6px !important;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
/* Licht entzünden (lokal) */
.m-candle {
  margin-top: 24px;
  display: grid;
  justify-items: center;
  gap: 10px;
}
.m-candle__flame {
  width: 22px;
  height: 34px;
  border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%;
  background: color-mix(in srgb, var(--ink-soft) 25%, transparent);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.m-candle.is-lit .m-candle__flame {
  background: radial-gradient(circle at 50% 70%, #fff7d6 0 22%, #ffd36b 40%, #ff9b2f 75%);
  box-shadow: 0 0 22px 8px rgba(255, 190, 90, 0.45);
  animation: m-flicker 2.4s ease-in-out infinite;
}
@keyframes m-flicker {
  0%, 100% { transform: scale(1) rotate(-1deg); }
  50% { transform: scale(1.06, 0.96) rotate(1.5deg); }
}
@media (prefers-reduced-motion: reduce) {
  .m-candle.is-lit .m-candle__flame { animation: none; }
}
.m-candle__btn {
  font: inherit;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}
.m-candle__btn:hover,
.m-candle__btn[aria-pressed='true'] {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.m-candle__note {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.m-closing-line {
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 1.4vw + 1rem, 2rem);
  color: var(--accent);
}
.m-footer__demo {
  margin-top: 10px;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-soft);
}
/* Galerie paarweise (gleich große Bilder, z. B. Platzhalter 4:3) */
.m-gallery--pairs {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* --- QR-Code: Button neben dem Modus-Button, Layer und Druckansicht ------- */
.m-qr-toggle {
  position: absolute;
  top: 14px;
  right: calc(var(--gutter) + 54px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.m-qr-toggle:hover,
.m-qr-toggle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
:root:not(.js) .m-qr-toggle {
  display: none;
}
.m-qr {
  width: min(92vw, 420px);
  max-height: 92dvh;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
}
.m-qr::backdrop {
  background: rgba(20, 18, 24, 0.72);
}
.m-qr__panel {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 34px 28px 28px;
  text-align: center;
}
.m-qr__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}
.m-qr__close:hover {
  color: var(--accent);
}
.m-qr__title {
  font-size: 0.82rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.m-qr__name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
}
/* Code immer schwarz auf weiß – auch im Dunkelmodus gut scanbar. */
.m-qr__code {
  width: min(100%, 260px);
  height: auto;
  margin-top: 6px;
  border-radius: 10px;
  box-shadow: 0 0 0 1px var(--line);
}
.m-qr__url {
  font-size: 0.95rem;
  color: var(--accent);
  word-break: break-all;
}
.m-qr__note {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--ink-soft);
}
.m-qr__print {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.m-qr__print:hover {
  filter: brightness(1.08);
}
.m-qr-print {
  display: none;
}
@media print {
  html.is-printing-qr body > *:not(.m-qr-print) {
    display: none !important;
  }
  html.is-printing-qr .m-qr-print {
    display: block;
    padding-top: 30mm;
    text-align: center;
    color: #000;
    font-family: var(--font-body);
  }
  html.is-printing-qr body {
    background: #fff !important;
  }
  .m-qr-print__brand {
    font-size: 11pt;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
  .m-qr-print__name {
    margin-top: 4mm;
    font-family: var(--font-display);
    font-size: 24pt;
  }
  .m-qr-print__code {
    width: 90mm;
    height: 90mm;
    margin: 10mm auto 6mm;
    display: block;
  }
  .m-qr-print__url {
    font-size: 13pt;
  }
  .m-qr-print__note {
    margin-top: 4mm;
    font-size: 10pt;
    font-style: italic;
  }
  .m-qr-toggle,
  .m-qr {
    display: none;
  }
}
