:root {
  --ink: #292421;
  --ink-soft: #5f5752;
  --paper: #f7f2e9;
  --paper-deep: #ebe2d4;
  --wine: #6f2430;
  --wine-dark: #4e1821;
  --gold: #b48a51;
  --white: #fffdf9;
  --line: rgba(41, 36, 33, 0.16);
  --shadow: 0 22px 60px rgba(34, 26, 22, 0.14);
  --shell: min(1160px, calc(100% - 2rem));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img,
svg,
iframe {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.1;
  text-wrap: balance;
}

h1 {
  margin-bottom: 0.65rem;
  font-size: clamp(3.25rem, 9vw, 7.5rem);
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  letter-spacing: -0.035em;
}

h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.narrow {
  max-width: 780px;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--white);
  background: var(--wine-dark);
  border-radius: 0.25rem;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  color: var(--white);
  background: linear-gradient(to bottom, rgba(23, 19, 18, 0.8), transparent);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(34, 29, 27, 0.96);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.1;
}

.brand small {
  margin-top: 0.12rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.main-nav a {
  position: relative;
  color: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.055em;
  text-decoration: none;
  text-transform: uppercase;
}

.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: -0.45rem;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
  width: 2.8rem;
  height: 2.8rem;
  padding: 0.65rem;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 1px;
  margin-block: 0.34rem;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.hero {
  position: relative;
  min-height: min(880px, 100svh);
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  color: var(--white);
  background: #302a27;
}

.hero-photo,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-photo {
  z-index: -2;
  background-image: url("assets/lothar-kurzius.jpg");
  background-position: 58% 30%;
  background-size: cover;
  transform: scale(1.015);
}

.hero-shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(21, 17, 16, 0.9) 0%, rgba(21, 17, 16, 0.62) 42%, rgba(21, 17, 16, 0.06) 76%),
    linear-gradient(0deg, rgba(21, 17, 16, 0.8) 0%, transparent 46%);
}

.hero-content {
  padding-top: 10rem;
  padding-bottom: clamp(5rem, 10vw, 8rem);
}

.hero-content > * {
  max-width: 720px;
}

.eyebrow {
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--wine);
}

.hero-subtitle {
  margin-bottom: 0.25rem;
  color: rgba(255, 255, 255, 0.88);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
}

.hero-date {
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.72);
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(180, 138, 81, 0.68);
  outline-offset: 3px;
}

.button-light {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.button-light:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.button-primary {
  color: var(--white);
  background: var(--wine);
}

.button-primary:hover {
  background: var(--wine-dark);
}

.section {
  padding-block: clamp(5rem, 10vw, 9rem);
}

.remembrance {
  position: relative;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(180, 138, 81, 0.13), transparent 30rem),
    var(--paper);
}

.remembrance::before,
.remembrance::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  content: "";
  background: linear-gradient(transparent, var(--line), transparent);
}

.remembrance::before {
  left: max(1rem, calc((100% - 980px) / 2));
}

.remembrance::after {
  right: max(1rem, calc((100% - 980px) / 2));
}

.ornament {
  margin: 0 auto 2rem;
  color: var(--gold);
  font-size: 0.7rem;
}

.lead {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1.5;
}

.remembrance p:not(.eyebrow) {
  max-width: 700px;
  margin-right: auto;
  margin-left: auto;
}

.signature {
  margin-top: 2.5rem;
}

.quiet-note {
  margin-top: 2.5rem;
  padding-top: 2rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.media-section {
  background: var(--white);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  align-items: end;
  gap: 3rem;
  margin-bottom: 3rem;
}

.section-heading h2,
.section-heading p:last-child {
  margin-bottom: 0;
}

.section-heading > p {
  color: var(--ink-soft);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.media-card {
  position: relative;
  min-height: 430px;
  padding: clamp(1.5rem, 4vw, 3rem);
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #fffefc, #f1e9de);
  box-shadow: 0 12px 35px rgba(41, 36, 33, 0.06);
}

.media-card::after {
  position: absolute;
  right: -4rem;
  bottom: -4rem;
  width: 13rem;
  height: 13rem;
  content: "";
  border: 1px solid rgba(111, 36, 48, 0.15);
  border-radius: 50%;
}

.media-symbol {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 2rem;
  place-items: center;
  color: var(--wine);
  border: 1px solid rgba(111, 36, 48, 0.24);
  border-radius: 50%;
}

.media-symbol svg {
  width: 1.45rem;
  fill: currentColor;
}

.media-label {
  margin-bottom: 0.4rem;
  color: var(--wine);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.media-card > p:not(.media-label) {
  max-width: 34rem;
  color: var(--ink-soft);
}

.media-card .button {
  margin-top: 0.55rem;
  margin-right: 0.75rem;
}

.text-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--wine);
  font-size: 0.88rem;
  font-weight: 700;
  text-underline-offset: 0.25rem;
}

.embed-target:not(:empty) {
  position: relative;
  z-index: 2;
  margin-top: 1.5rem;
}

.embed-target iframe {
  width: 100%;
  border: 0;
  border-radius: 0.75rem;
  background: #000;
}

.embed-target iframe[data-provider="spotify"] {
  height: 152px;
}

.video-frame {
  aspect-ratio: 16 / 9;
  height: auto;
}

.guestbook-section {
  color: var(--white);
  background:
    radial-gradient(circle at 85% 10%, rgba(180, 138, 81, 0.19), transparent 25rem),
    #24201e;
}

.guestbook-heading {
  align-items: center;
}

.heading-actions {
  display: flex;
  justify-content: flex-end;
}

.guestbook-intro {
  max-width: 760px;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.72);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
}

.guestbook-frame-wrap {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.8rem;
  background: var(--white);
  box-shadow: var(--shadow);
}

.guestbook-frame {
  width: 100%;
  height: 760px;
  border: 0;
  background: var(--white);
}

.frame-fallback {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.86rem;
}

.frame-fallback a {
  color: var(--white);
  font-weight: 700;
  text-underline-offset: 0.22rem;
}

.contact-section {
  background: var(--paper-deep);
}

.contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid rgba(111, 36, 48, 0.18);
  background: rgba(255, 253, 249, 0.68);
}

.contact-panel h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.contact-panel p:last-child {
  max-width: 690px;
  margin-bottom: 0;
  color: var(--ink-soft);
}

.contact-panel .button {
  flex: 0 0 auto;
}

.site-footer {
  padding-block: 2rem;
  color: rgba(255, 255, 255, 0.68);
  background: #181513;
  font-size: 0.84rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-inner p {
  margin-bottom: 0;
}

.footer-inner nav {
  display: flex;
  gap: 1.25rem;
}

.footer-inner a {
  color: inherit;
  text-underline-offset: 0.25rem;
}

@media (max-width: 800px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: grid;
    gap: 0;
    padding: 0.75rem 1rem 1.25rem;
    background: rgba(34, 29, 27, 0.98);
    transform: translateY(-0.75rem);
    visibility: hidden;
    opacity: 0;
    transition: transform 180ms ease, opacity 180ms ease, visibility 180ms ease;
  }

  .main-nav.is-open {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
  }

  .main-nav a {
    padding: 0.9rem 0.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(4) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .hero {
    min-height: 780px;
  }

  .hero-photo {
    background-position: 63% 24%;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, rgba(21, 17, 16, 0.92) 0%, rgba(21, 17, 16, 0.45) 60%, rgba(21, 17, 16, 0.1) 100%);
  }

  .hero-content {
    padding-bottom: 4rem;
  }

  .section-heading,
  .media-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 0.75rem;
  }

  .media-card {
    min-height: 0;
  }

  .heading-actions {
    justify-content: flex-start;
  }

  .guestbook-frame {
    height: 680px;
  }

  .contact-panel,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  :root {
    --shell: min(100% - 1.25rem, 1160px);
  }

  .brand small {
    display: none;
  }

  .hero {
    min-height: 700px;
  }

  .hero-photo {
    background-position: 66% 20%;
  }

  .section {
    padding-block: 4.5rem;
  }

  .remembrance::before,
  .remembrance::after {
    display: none;
  }

  .media-card {
    padding: 1.4rem;
  }

  .media-card .button,
  .text-link {
    width: 100%;
    margin-right: 0;
    text-align: center;
  }

  .guestbook-frame {
    height: 620px;
  }

  .footer-inner nav {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Eigenständiger Bild- und Erinnerungsbuchbereich */
.portrait-section {
  padding-block: clamp(5rem, 10vw, 9rem);
  background:
    linear-gradient(90deg, rgba(235, 226, 212, 0.75), rgba(255, 253, 249, 0.96)),
    var(--paper-deep);
}

.portrait-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 7rem);
}

.portrait-figure {
  position: relative;
  margin: 0;
  padding: clamp(0.65rem, 1.5vw, 1rem);
  background: var(--white);
  box-shadow: var(--shadow);
  transform: rotate(-1deg);
}

.portrait-figure::before {
  position: absolute;
  z-index: -1;
  inset: 1rem -1.2rem -1.2rem 1.2rem;
  content: "";
  border: 1px solid rgba(111, 36, 48, 0.22);
}

.portrait-figure img {
  width: 100%;
  height: auto;
  filter: grayscale(1);
}

.portrait-figure figcaption {
  padding: 0.85rem 0.4rem 0.25rem;
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  text-align: center;
}

.portrait-copy h2 {
  max-width: 760px;
}

.portrait-copy > p:not(.eyebrow) {
  max-width: 650px;
  color: var(--ink-soft);
}

.guestbook-section {
  color: var(--white);
  background:
    radial-gradient(circle at 86% 8%, rgba(180, 138, 81, 0.2), transparent 27rem),
    radial-gradient(circle at 8% 84%, rgba(111, 36, 48, 0.24), transparent 34rem),
    #24201e;
}

.guestbook-heading-native {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3rem;
}

.guestbook-heading-native h2 {
  margin-bottom: 0.75rem;
}

.guestbook-heading-native .guestbook-intro {
  margin-bottom: 0;
}

.archive-link {
  flex: 0 0 auto;
  padding-bottom: 0.3rem;
  color: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.archive-link:hover,
.archive-link:focus-visible {
  color: var(--white);
  border-color: var(--white);
}

.memory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.72fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.memory-entries {
  display: grid;
  gap: 1rem;
}

.memory-card {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2.25rem);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--white);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}

.memory-card-mark {
  position: absolute;
  top: 1.25rem;
  right: 1.4rem;
  color: var(--gold);
  font-size: 0.72rem;
}

.memory-message {
  max-width: 720px;
  margin-bottom: 1.5rem;
  padding-right: 1.25rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 1.62;
}

.memory-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.15rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

.memory-meta strong,
.memory-meta span {
  display: block;
}

.memory-meta strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.memory-meta strong a {
  text-underline-offset: 0.2rem;
}

.memory-meta time {
  flex: 0 0 auto;
  white-space: nowrap;
}

.js .memory-card.is-collapsible {
  display: none;
}

.js .memory-card.is-collapsible.is-visible {
  display: block;
}

.show-more-memories {
  justify-self: start;
  margin-top: 0.5rem;
}

.button-quiet {
  color: var(--ink);
  border-color: var(--line);
  background: var(--white);
}

.button-quiet:hover {
  border-color: rgba(41, 36, 33, 0.32);
  background: #f2ece3;
}

.button-danger {
  color: #fff;
  background: #8b1f2b;
}

.button-danger:hover {
  background: #661620;
}

.memory-form-panel {
  position: sticky;
  top: 6.5rem;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  color: var(--ink);
  border-top: 4px solid var(--gold);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.memory-form-panel h3 {
  margin-bottom: 0.8rem;
}

.memory-form-panel > p:not(.eyebrow) {
  color: var(--ink-soft);
  font-size: 0.91rem;
}

.memory-form {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.memory-form label:not(.consent-row) {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.optional {
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 500;
}

.memory-form input[type="text"],
.memory-form input[type="url"],
.memory-form input[type="password"],
.memory-form textarea {
  width: 100%;
  padding: 0.78rem 0.85rem;
  color: var(--ink);
  border: 1px solid rgba(41, 36, 33, 0.24);
  border-radius: 0;
  background: var(--white);
}

.memory-form textarea {
  min-height: 11rem;
  resize: vertical;
}

.memory-form input:focus,
.memory-form textarea:focus {
  border-color: var(--wine);
  outline: 3px solid rgba(111, 36, 48, 0.13);
}

.field-hint {
  margin: -0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
  text-align: right;
}

.consent-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.7rem;
  margin-block: 0.75rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.consent-row input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.18rem;
  accent-color: var(--wine);
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.notice {
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  color: var(--ink);
  border-left: 4px solid var(--gold);
  background: var(--white);
}

.notice ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.notice-success {
  border-color: #4d7554;
}

.notice-error {
  border-color: #a42b38;
  background: #fff5f5;
}

.empty-state {
  padding: 2rem;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

/* Verwaltung */
.admin-body {
  min-height: 100vh;
  background: var(--paper);
}

.admin-shell {
  width: min(980px, calc(100% - 2rem));
  margin-inline: auto;
  padding-block: 2.5rem 5rem;
}

.admin-back {
  color: var(--wine);
  font-weight: 700;
  text-underline-offset: 0.25rem;
}

.admin-header {
  margin-block: 3rem 2rem;
}

.admin-header h1 {
  max-width: 900px;
  color: var(--ink);
  font-size: clamp(2.6rem, 7vw, 5rem);
}

.admin-panel,
.admin-entry {
  padding: clamp(1.4rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 12px 35px rgba(41, 36, 33, 0.06);
}

.admin-panel {
  max-width: 640px;
}

.admin-panel h2,
.admin-entry h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.admin-toolbar p {
  margin: 0;
}

.admin-entry-list {
  display: grid;
  gap: 1rem;
}

.admin-entry {
  position: relative;
}

.admin-entry-state {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-entry-state.is-approved {
  color: #31573a;
  background: #e7f2e9;
}

.admin-entry-state.is-pending {
  color: #704d13;
  background: #f8edcf;
}

.admin-entry-date {
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.admin-entry-message {
  padding: 1.25rem;
  background: var(--paper);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.admin-actions form {
  margin: 0;
}

.password-panel {
  margin-top: 3rem;
}

@media (max-width: 960px) {
  .portrait-layout,
  .memory-layout {
    grid-template-columns: 1fr;
  }

  .portrait-figure {
    width: min(580px, 92%);
    margin-inline: auto;
  }

  .memory-form-panel {
    position: static;
  }
}

@media (max-width: 800px) {
  .guestbook-heading-native {
    align-items: flex-start;
    flex-direction: column;
  }

  .memory-meta,
  .admin-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .portrait-figure {
    width: calc(100% - 1rem);
  }

  .portrait-figure::before {
    inset: 0.6rem -0.6rem -0.6rem 0.6rem;
  }

  .memory-card,
  .memory-form-panel {
    padding: 1.25rem;
  }

  .memory-message {
    padding-right: 0;
  }

  .footer-inner nav {
    flex-wrap: wrap;
  }
}


/* Eigenständige Unterseiten: Kontakt, Impressum und Datenschutz */
.subpage-body {
  background: var(--paper);
}

.subpage-site-header {
  position: sticky;
  color: var(--white);
  background: rgba(34, 29, 27, 0.98);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.09);
}

.subpage-main {
  min-height: 70vh;
}

.page-hero {
  padding: clamp(4.5rem, 10vw, 8rem) 0;
  color: var(--white);
  background:
    radial-gradient(circle at 82% 25%, rgba(180, 138, 81, 0.22), transparent 34%),
    linear-gradient(135deg, #2d2724, #171413);
}

.page-hero h1 {
  margin-bottom: 1rem;
  font-size: clamp(3rem, 8vw, 6.5rem);
}

.page-hero p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.contact-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.content-card {
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--white);
  box-shadow: 0 18px 50px rgba(34, 26, 22, 0.08);
}

.contact-copy {
  position: sticky;
  top: 7rem;
}

.contact-copy h2,
.legal-content h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.form-card .memory-form {
  margin-top: 0;
}

.form-card button[disabled] {
  cursor: not-allowed;
  opacity: 0.48;
}

.legal-layout {
  max-width: 940px;
}

.configuration-notice {
  margin-bottom: 1.5rem;
}

.legal-content > section + section {
  margin-top: 2.75rem;
  padding-top: 2.75rem;
  border-top: 1px solid var(--line);
}

.legal-content h3 {
  margin-top: 1.75rem;
  font-size: 1.45rem;
}

.legal-content address {
  font-style: normal;
}

.legal-content p:last-child {
  margin-bottom: 0;
}

code {
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  background: rgba(41, 36, 33, 0.08);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

.consent-row a {
  color: var(--wine);
  text-underline-offset: 0.18em;
}

.main-nav a[aria-current="page"],
.site-footer a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

@media (max-width: 820px) {
  .contact-page-layout {
    grid-template-columns: 1fr;
  }

  .contact-copy {
    position: static;
  }
}

/* Lokaler Kontakt-Posteingang */
.memory-form input[type="email"] {
  width: 100%;
  padding: 0.78rem 0.85rem;
  color: var(--ink);
  border: 1px solid rgba(41, 36, 33, 0.24);
  border-radius: 0;
  background: var(--white);
}

.memory-form input[type="email"]:focus {
  border-color: var(--wine);
  outline: 3px solid rgba(111, 36, 48, 0.13);
}

.admin-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.75rem;
}

.admin-summary p {
  margin: 0;
}

.admin-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 3rem;
}

.admin-section-nav a {
  padding: 0.6rem 0.85rem;
  color: var(--wine);
  border: 1px solid rgba(111, 36, 48, 0.22);
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.admin-section-nav a:hover,
.admin-section-nav a:focus-visible {
  border-color: var(--wine);
}

.admin-section + .admin-section {
  margin-top: 4.5rem;
}

.admin-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.admin-section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.admin-section-heading > p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.admin-entry h3 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.45rem, 4vw, 2.2rem);
}

.admin-entry-state.is-new {
  color: #7a2430;
  background: #f9e4e7;
}

.admin-entry-state.is-read {
  color: #4c5750;
  background: #e8ece9;
}

.contact-admin-entry.is-unread {
  border-left: 5px solid var(--wine);
}

.admin-contact-meta {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0;
}

.admin-contact-meta div {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 0.8rem;
}

.admin-contact-meta dt {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-contact-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.admin-empty {
  padding: 1.5rem;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.55);
}

@media (max-width: 760px) {
  .admin-section-heading {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .admin-contact-meta div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* SMTP-Benachrichtigungen in der Verwaltung */
.notification-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.notification-config-card,
.notification-actions-card {
  margin: 0;
}

.status-line {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: rgba(49, 112, 77, 0.09);
}

.status-ok strong {
  color: #285d40;
}

.compact-list .admin-entry {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.smtp-error {
  padding: 0.75rem 1rem;
  border-left: 4px solid #a9353f;
  background: rgba(169, 53, 63, 0.07);
  overflow-wrap: anywhere;
}

.smtp-log {
  display: grid;
  gap: 0.65rem;
}

.smtp-log-entry {
  display: grid;
  grid-template-columns: minmax(9rem, auto) 1fr;
  gap: 0.35rem 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(36, 32, 30, 0.14);
  border-radius: 0.5rem;
  background: #fff;
}

.smtp-log-entry time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.smtp-log-entry small {
  grid-column: 2;
  overflow-wrap: anywhere;
}

.smtp-log-entry.level-error {
  border-left: 4px solid #a9353f;
}

.smtp-log-entry.level-success,
.smtp-log-entry.level-recovered {
  border-left: 4px solid #397954;
}

@media (max-width: 760px) {
  .notification-status-grid {
    grid-template-columns: 1fr;
  }

  .smtp-log-entry {
    grid-template-columns: 1fr;
  }

  .smtp-log-entry small {
    grid-column: 1;
  }
}
