@font-face {
  font-family: 'Nothing You Could Do';
  src: url('../fonts/nothing-you-could-do.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Handschrift fuer Titel und Bildunterschriften (variable Achse 400-700).
   Zwei Schnitte, damit deutsche Umlaute (latin) und kroatische Zeichen
   wie c/c/z/s/dj (latin-ext) ohne Nachtladen abgedeckt sind. */
@font-face {
  font-family: 'Caveat';
  src: url('../fonts/caveat-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Caveat';
  src: url('../fonts/caveat-latin-ext.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: oklch(14% 0.008 250);
  --surface: oklch(19% 0.009 250);
  --fg: oklch(94% 0.006 250);
  --muted: oklch(67% 0.012 250);
  --border: oklch(29% 0.012 250);
  --field-border: oklch(52% 0.015 250);
  --accent: oklch(65% 0.13 245);
  --accent-ink: oklch(10% 0.02 245);
  --accent-hover: oklch(72% 0.14 245);
  --accent-soft: color-mix(in oklch, var(--accent) 16%, transparent);
  --fg-soft: color-mix(in oklch, var(--fg) 7%, transparent);
  --error: oklch(62% 0.18 25);
  --error-soft: color-mix(in oklch, var(--error) 14%, transparent);
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  --font-hand: 'Nothing You Could Do', 'Segoe Script', cursive;
  --font-hand-ui: 'Caveat', 'Segoe Script', cursive;
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;
  /* Gedichttypografie: Groesse skaliert mit dem Viewport, Zeilen leicht
     gestrafft und Spur leicht geoeffnet (Handschrift-Charakter). */
  --lyric-size: clamp(21px, 1rem + .95vw, 27px);
  --lyric-line: 1.36;
  --lyric-track: .032em;
  --fs-h1: clamp(42px, 7vw, 76px);
  --fs-h2: clamp(30px, 4vw, 48px);
  --fs-lead: 19px;
  --fs-body: 16px;
  --gutter: 32px;
  --gap-md: 20px;
  --gap-lg: 32px;
  --gap-xl: 56px;
  --gap-2xl: 96px;
  --container: 1120px;
  --radius: 10px;
  --radius-lg: 16px;
}
html[data-theme="light"] {
  --bg: oklch(97% 0.006 250);
  --surface: oklch(100% 0 0);
  --fg: oklch(18% 0.01 250);
  --muted: oklch(44% 0.015 250);
  --border: oklch(86% 0.01 250);
  --field-border: oklch(62% 0.018 250);
  --accent: oklch(50% 0.16 255);
  --accent-ink: white;
  --accent-hover: oklch(44% 0.16 255);
  --accent-soft: color-mix(in oklch, var(--accent) 16%, transparent);
  --fg-soft: color-mix(in oklch, var(--fg) 6%, transparent);
  --error: oklch(55% 0.2 25);
  --error-soft: color-mix(in oklch, var(--error) 12%, transparent);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.55; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
p, h1, h2, h3 { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--font-display); }
h1, h2, h3, p { margin-top: 0; }
.container { width: 100%; min-width: 0; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(56px, 9vw, var(--gap-2xl)); }
.section + .section { border-top: 1px solid var(--border); }

.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

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

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    animation: none;
  }
  .hero-title span.pulse {
    animation: none;
  }
  .lyrics-image img {
    transform: none !important;
    transition: none !important;
  }
}

.topnav { position: sticky; top: 0; z-index: 20; background: color-mix(in oklch, var(--bg) 84%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.topnav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: var(--gap-md); }
.logo { min-width: 0; font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 4px; color: var(--fg); }
.logo span { color: var(--accent); }
nav { display: flex; align-items: center; gap: 24px; }
nav a { color: var(--muted); font-size: 14px; position: relative; padding: 4px 0; transition: color .2s ease; }
nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
nav a:hover { color: var(--fg); }
nav a:hover::after { width: 100%; }
nav a[aria-current="page"] { color: var(--fg); font-weight: 600; }
nav a[aria-current="page"]::after { width: 100%; }

/* app.js places the mobile button in the header's normal layout.
   The menu uses a native modal dialog with its own close button. */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  position: fixed;
  top: 8px;
  right: var(--gutter);
  z-index: 50;
  flex-shrink: 0;
  transition: border-color .2s ease, background-color .2s ease;
}
.topnav-inner > .nav-toggle { position: static; }
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform .35s cubic-bezier(0.4, 0, 0.2, 1), opacity .25s ease;
}
/* Transformation der drei Balken zu einem X */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay: milchiger Blur-Effekt über der Seite */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: color-mix(in oklch, var(--bg) 45%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .35s ease;
}
.nav-overlay.open { opacity: 1; }

/* Mobiles Menü: fährt von rechts als Overlay-Panel ein (75% Breite) */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 75%;
  max-width: 360px;
  height: 100dvh;
  padding: 96px 28px 28px;
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.25);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  visibility: hidden;
}
.mobile-menu.open { transform: translateX(0); visibility: visible; }
.menu-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--fg); overflow: hidden; }
.menu-dialog::backdrop { background: oklch(8% 0.01 250 / .65); backdrop-filter: blur(4px); }
.nav-close { position: absolute; top: 16px; right: 20px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--fg); font-size: 28px; line-height: 1; }
body.menu-open { overflow: hidden; }
.mobile-menu a {
  color: var(--fg);
  font-size: 18px;
  font-weight: 600;
  padding: 14px 16px;
  border-radius: var(--radius);
  transition: background-color .2s ease, color .2s ease;
}
.mobile-menu a:hover { background: var(--fg-soft); color: var(--accent); }
.mobile-menu a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.theme-switch { display: flex; align-items: center; margin-inline: auto; flex-shrink: 0; }
.theme-switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.theme-switch-label { display: flex; align-items: center; min-height: 44px; cursor: pointer; }
.theme-switch-track {
  display: flex;
  align-items: center;
  width: 60px;
  height: 30px;
  padding: 3px;
  background: oklch(97% 0.01 250);
  border: 1px solid oklch(88% 0.01 250);
  border-radius: 999px;
  transition: background-color .3s ease, border-color .3s ease;
}
.theme-switch-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: oklch(20% 0.01 250);
  color: oklch(95% 0.006 250);
  box-shadow: 0 1px 3px oklch(0% 0 0 / 0.3);
  transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1), background-color .3s ease;
}
.theme-switch-input:checked + .theme-switch-label .theme-switch-track {
  background: oklch(16% 0.008 250);
  border-color: oklch(30% 0.01 250);
}
.theme-switch-input:checked + .theme-switch-label .theme-switch-thumb {
  transform: translateX(30px);
  background: oklch(98% 0.006 250);
  color: oklch(18% 0.01 250);
}
.theme-icon { width: 13px; height: 13px; }
.theme-icon-moon { display: none; }
.theme-switch-input:checked + .theme-switch-label .theme-icon-sun { display: none; }
.theme-switch-input:checked + .theme-switch-label .theme-icon-moon { display: block; }
.theme-switch-input:focus-visible + .theme-switch-label .theme-switch-track { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Sprach-Dropdown (DE / HR / EN) – nur auf Desktop sichtbar */
.lang-switch { position: relative; display: flex; align-items: center; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  background: var(--fg-soft);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: background-color .2s ease, border-color .2s ease;
}
.lang-btn:hover { background: color-mix(in oklch, var(--fg) 12%, transparent); border-color: color-mix(in oklch, var(--border) 80%, white); }
.lang-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lang-icon { color: var(--muted); }
.lang-caret { color: var(--muted); transition: transform .2s ease; }
.lang-btn[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px color-mix(in oklch, var(--bg) 60%, black);
  z-index: 30;
}
.lang-menu button {
  display: block;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: calc(var(--radius) - 4px);
  color: var(--fg);
  font-size: 14px;
  text-align: left;
  transition: background-color .15s ease;
}
.lang-menu button:hover { background: var(--fg-soft); }
.lang-menu button[aria-selected="true"] { color: var(--accent); font-weight: 600; }

/* Sprachauswahl im mobilen Menü (DE / HR / EN) */
.mobile-lang {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.mobile-lang-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.mobile-lang-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mobile-lang-options button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.mobile-lang-options button:hover { background: var(--fg-soft); }
.mobile-lang-options button[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
.mobile-lang-options button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: var(--radius); font-weight: 600; font-size: 15px; border: 1px solid transparent; transition: all .2s ease; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--fg-soft); color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { background: color-mix(in oklch, var(--fg) 12%, transparent); border-color: color-mix(in oklch, var(--border) 80%, white); }

.hero {
  min-height: 560px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 32%, oklch(92% 0.02 240 / 0.13) 0%, oklch(88% 0.025 240 / 0.07) 120px, oklch(75% 0.03 240 / 0.03) 240px, transparent 380px),
    radial-gradient(ellipse 70% 50% at 50% 40%, oklch(35% 0.04 250 / 0.25) 0%, transparent 70%);
}
html[data-theme="light"] .hero {
  background: none;
}
.hero-center { text-align: center; max-width: 820px; }
.eyebrow { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--accent); margin-bottom: 16px; }
.hero-title { font-size: var(--fs-h1); line-height: 1.05; letter-spacing: -.04em; margin-bottom: 20px; }
.hero-title span { color: var(--accent); transition: color 0.8s ease, text-shadow 0.8s ease; }
.lead { font-size: var(--fs-lead); color: var(--muted); line-height: 1.5; margin-bottom: 32px; max-width: 48ch; margin-inline: auto; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   ZITATE-BLOCK (dynamisch aus PostgreSQL geladen)
   ============================================================ */
.quotes-section { padding-block: clamp(40px, 6vw, 72px); }
.quotes-block {
  max-width: 760px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 22px 70px color-mix(in oklch, var(--bg) 55%, black);
  text-align: center;
  background: color-mix(in oklch, var(--bg) 80%, var(--surface));
}
.quotes-eyebrow { margin-bottom: 20px; }
.quotes-viewport {
  overflow: hidden;
  min-height: 120px;
  display: flex;
  align-items: center;
}
.quotes-track {
  display: flex;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.quote-slide {
  flex: 0 0 100%;
  min-width: 100%;
  padding: 0 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.quote-mark {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 2.05em;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  opacity: 0.9;
  user-select: none;
  display: inline-block;
  vertical-align: baseline;
  text-shadow: 0 0 14px color-mix(in oklch, var(--accent) 24%, transparent);
}
.quote-mark-open {
  transform: translateY(-0.08em);
  margin-right: 0.14em;
}
.quote-mark-close {
  transform: translateY(0.08em);
  margin-left: 0.14em;
}
.quote-text {
  font-family: var(--font-body); /* Changed to body font */
  font-size: clamp(14px, 1.6vw, 17px); /* Smaller font size */
  line-height: 1.6;
  font-style: italic; /* Kursiv */
  letter-spacing: normal; /* Reset letter spacing */
  color: var(--fg);
  max-width: 60ch;
  margin: 0 auto;
}
.quote-author {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.quote-author::before {
  content: '— ';
  color: var(--accent);
}
.quotes-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
}
.quotes-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--fg-soft);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}
.quotes-arrow:hover { background: color-mix(in oklch, var(--fg) 12%, transparent); border-color: var(--accent); color: var(--accent); }
.quotes-arrow:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.quotes-arrow:disabled { opacity: 0.4; cursor: default; }
.quotes-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.quotes-dot {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color .25s ease, transform .25s ease;
}
.quotes-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background-color .2s ease; }
.quotes-dot:hover::before { background: color-mix(in oklch, var(--accent) 55%, var(--border)); }
.quotes-dot.active::before { background: var(--accent); }
.quotes-dot:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.quotes-status {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.quotes-status.error { color: var(--error); }

.login-wrap { display: grid; grid-template-columns: minmax(0, .85fr) minmax(320px, 420px); gap: var(--gap-2xl); align-items: center; }
.login-copy h2 { font-size: var(--fs-h2); line-height: 1.1; letter-spacing: -.03em; margin-bottom: 16px; }
.login-copy p { color: var(--muted); font-size: 17px; line-height: 1.6; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 36px); box-shadow: 0 22px 70px color-mix(in oklch, var(--bg) 65%, black); }
.login-card h3 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 24px; }
.password-guidance {
  margin: -4px 0 22px;
  padding: 14px 16px 15px;
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklch, var(--accent) 35%, var(--border));
  border-radius: var(--radius);
}
.password-guidance-title {
  margin: 0 0 10px;
  color: var(--fg);
  font-size: 13px;
  font-weight: 700;
}
.password-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.password-rules li {
  position: relative;
  padding-left: 19px;
}
.password-rules li::before {
  content: '○';
  position: absolute;
  left: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.1;
}
.password-rules li.is-met { color: var(--accent); }
.password-rules li.is-met::before { content: '✓'; font-weight: 700; }
.password-rules .password-rule-recommended { color: var(--muted); font-style: italic; }
@media (max-width: 520px) {
  .password-rules { grid-template-columns: 1fr; gap: 6px; }
}
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { color: var(--muted); font-size: 13px; }
.input-wrap { position: relative; display: flex; align-items: center; width: 100%; }
.input-wrap .input { padding-right: 48px; }
.pw-toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 8px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: color .2s ease, background-color .2s ease;
}
.pw-toggle-btn:hover { color: var(--fg); background: var(--fg-soft); }
.pw-toggle-btn:focus-visible { outline: 2px solid var(--accent); }
.input { width: 100%; min-height: 46px; padding: 11px 14px; background: var(--bg); border: 1px solid var(--field-border); border-radius: var(--radius); color: var(--fg); outline: none; }
.input::placeholder, .lyrics-search input::placeholder { color: var(--muted); opacity: 1; }
.input:focus { border-color: var(--accent); outline: 3px solid var(--accent-soft); }
/* Rot umrandete Inputs bei Validierungsfehlern */
.input.input-error { border-color: var(--error); outline: 3px solid var(--error-soft); }
.input.input-error:focus { border-color: var(--error); outline: 3px solid var(--error-soft); }
.login-card .btn { width: 100%; margin-top: 8px; }
.form-error {
  color: var(--error);
  font-size: 13px;
  margin: 16px 0 0;
  padding: 10px 14px;
  background: var(--error-soft);
  border: 1px solid color-mix(in oklch, var(--error) 35%, transparent);
  border-radius: var(--radius);
  line-height: 1.4;
}
.form-note { color: var(--muted); font-size: 13px; text-align: center; margin: 18px 0 0; }
.form-note a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; }
.form-note a:hover { color: var(--accent); }

/* ============================================================
   ANMELDUNG: NACHTRÄGLICHE ZUSTÄNDE
   ============================================================ */

/* Flexibles Eingabefeld-Paar (z. B. Passwort + Auge-Icon) */
.input-wrap { display: flex; align-items: center; }

/* Meldungen: Fehler rot, Erfolge in der Akzentfarbe.
   Beide nutzen dieselbe Grundform wie .form-error, damit die
   Anmeldung optisch einheitlich bleibt. */
.form-message {
  font-size: 13px;
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  line-height: 1.4;
  border: 1px solid transparent;
}
.form-message.is-error,
.form-error.is-error {
  color: var(--error);
  background: var(--error-soft);
  border-color: color-mix(in oklch, var(--error) 35%, transparent);
}
.form-message.is-success {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in oklch, var(--accent) 35%, transparent);
}

/* Abmelden als schlichter Text-Button in der Navigation */
.nav-logout,
.mobile-logout {
  appearance: none;
  background: transparent;
  border: none;
  padding: 4px 0;
  color: var(--muted);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: color .2s ease;
}
.nav-logout:hover,
.mobile-logout:hover { color: var(--accent); }
.mobile-menu .mobile-logout {
  text-align: left;
  font-size: 18px;
  font-weight: 600;
  padding: 14px 16px;
  border-radius: var(--radius);
}
.mobile-menu .mobile-logout:hover { background: var(--fg-soft); }

/* ============================================================
   PERSÖNLICHER BEREICH
   ============================================================ */
.profile-loading-text {
  color: var(--muted);
  text-align: center;
  font-size: 15px;
}
.profile-header {
  max-width: 720px;
  margin-bottom: var(--gap-xl);
}
.profile-title {
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 12px;
}
.profile-subtitle { color: var(--muted); font-size: 17px; }

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--gap-lg);
  align-items: start;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 22px 70px color-mix(in oklch, var(--bg) 65%, black);
}
.profile-card h2 {
  font-size: 19px;
  letter-spacing: -.02em;
  margin-bottom: 20px;
}
/* Die breite Karte (Kommunikation) nutzt die volle Zeile */
.profile-card-wide { grid-column: 1 / -1; }
.profile-card-main { grid-column: span 1; }

/* Eingelesene, nicht veränderbare Felder */
.input[readonly] {
  background: color-mix(in oklch, var(--bg) 70%, var(--surface));
  color: var(--muted);
  cursor: default;
}
.field-hint {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  margin: 6px 0 0;
}
textarea.input {
  resize: vertical;
  min-height: 88px;
  font-family: inherit;
  line-height: 1.5;
}

/* Nur für Screenreader sichtbar (Dateiauswahl hat ein Label) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Avatar ---- */
.profile-card-avatar { text-align: center; }
.avatar-frame {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bg);
}
.avatar-frame svg { display: block; width: 100%; height: 100%; }
.avatar-badge {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--bg) 78%, transparent);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.avatar-pick {
  margin-top: 16px;
  cursor: pointer;
  display: inline-flex;
}
/* Die Dateiauswahl ist bereits bedienbar, der eigentliche Upload
   wird erst in einem späteren Update freigeschaltet. Deshalb wird
   direkt nach dem Button ein Hinweis auf den Status gezeigt. */
.avatar-pick:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }

.profile-footer-actions {
  margin-top: var(--gap-lg);
  display: flex;
  justify-content: flex-end;
}

/* ---- Kommunikation (read-only Dropdown) ---- */
.comm-details {
  border-radius: var(--radius);
}
.comm-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.02em;
  padding: 4px 0;
}
/* Standard-Dreieck des Browsers entfernen */
.comm-summary::-webkit-details-marker { display: none; }
.comm-summary::marker { content: ''; }
.comm-caret { color: var(--muted); transition: transform .25s ease; flex: 0 0 auto; }
.comm-details[open] .comm-caret { transform: rotate(180deg); }
.comm-body { padding-top: 18px; }

.comm-list {
  display: grid;
  gap: var(--gap-md);
  margin-top: 18px;
}
.comm-group {
  padding: 16px 18px;
  background: color-mix(in oklch, var(--bg) 72%, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.comm-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 15px;
  margin: 0 0 12px;
}
.comm-heading .comm-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.comm-username { font-weight: 700; }

.comm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 20px;
}
.comm-grid + .comm-grid {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.comm-row { display: flex; flex-direction: column; gap: 3px; }
.comm-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.comm-value {
  color: var(--fg);
  font-size: 15px;
  word-break: break-word;
}

/* ============================================================
   RESET-SEITE
   ============================================================ */
#reset .login-card .btn { margin-top: 8px; }
#reset .form-message,
#reset .form-error { margin-top: 16px; }

/* ============================================================
   LYRIK-ARCHIV
   ============================================================ */
.lyrics-main {
  min-height: calc(100vh - 150px);
  background-image: radial-gradient(ellipse at 18% 0%, color-mix(in oklch, var(--accent) 7%, transparent), transparent 42%);
}
.lyrics-heading {
  margin: 0 auto var(--gap-xl);
}
.lyrics-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, .75fr);
  align-items: start;
  gap: clamp(28px, 5vw, 64px);
  margin-bottom: var(--gap-xl);
}
.lyrics-intro h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
}
.lyrics-description {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}
.lyrics-actions {
  display: flex;
  gap: 16px;
}
.lyrics-actions .btn {
  flex: 0 0 auto;
}
.lyrics-image {
  overflow: hidden;
  border-radius: var(--radius-lg);
  perspective: 1100px;
  box-shadow: 0 24px 64px color-mix(in oklch, var(--bg) 42%, transparent);
}
.lyrics-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .22s ease-out;
  transform-style: preserve-3d;
}
.lyrics-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(160px, 220px) minmax(150px, 190px);
  align-items: end;
  gap: 14px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--border);
}
.lyrics-search {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  background: var(--surface);
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  color: var(--muted);
}
.lyrics-search:focus-within { border-color: var(--accent); outline: 3px solid var(--accent-soft); }
.lyrics-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
}
.lyrics-filter { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; }
.lyrics-filter select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--field-border);
  border-radius: var(--radius);
  color: var(--fg);
  font: inherit;
}
.lyrics-filter select:focus-visible { border-color: var(--accent); }
.lyrics-results-meta {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.lyrics-results-meta p { margin: 0; }
.lyrics-results-meta #lyrics-status.is-error { color: var(--error); }
.lyrics-login-link { color: var(--accent); white-space: nowrap; }
.lyrics-layout {
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(0, 1.18fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: start;
  min-height: 420px;
}
.lyrics-results {
  border-top: 1px solid var(--border);
}
.poem-result {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 8px;
  padding: 17px 14px;
  text-align: left;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease;
}
.poem-result:hover,
.poem-result.is-selected { background: color-mix(in oklch, var(--accent) 8%, var(--surface)); }
.poem-result.is-selected { box-shadow: inset 3px 0 var(--accent); }
.poem-result-title { font-size: 16px; font-weight: 650; line-height: 1.35; }
.poem-result-excerpt {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.poem-result-meta { color: var(--muted); font-size: 11px; }
.lyrics-reader {
  position: sticky;
  top: 92px;
  min-height: 360px;
  padding: clamp(20px, 3.5vw, 42px);
  background: color-mix(in oklch, var(--surface) 82%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px color-mix(in oklch, var(--bg) 42%, transparent);
}
.lyrics-reader-empty { margin: 0; color: var(--muted); text-align: center; padding-top: 110px; }
.poem-reading-category {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.poem-reading h2 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 30px); line-height: 1.2; }
.poem-reading-byline { margin: 0 0 28px; color: var(--muted); font-size: 12px; }
.poem-reading-body {
  margin: 0;
  color: var(--fg);
  font-family: var(--font-hand);
  font-size: 24px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.lyrics-more-wrap { display: flex; justify-content: center; padding-top: 28px; }
.lyrics-more-wrap[hidden] { display: none; }
.lyrics-more-wrap > [hidden] { display: none !important; }

@media (max-width: 800px) {
  .lyrics-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .lyrics-description {
    font-size: 16px;
  }
  .lyrics-actions {
    flex-direction: column;
    gap: 12px;
  }
  .lyrics-toolbar { grid-template-columns: 1fr 1fr; }
  .lyrics-search { grid-column: 1 / -1; }
  .lyrics-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .lyrics-reader { position: static; min-height: 240px; }
  .lyrics-reader-empty { padding-top: 76px; }
}
@media (max-width: 480px) {
  .lyrics-toolbar { grid-template-columns: 1fr; gap: 10px; }
  .lyrics-search { grid-column: auto; }
  .lyrics-results-meta { align-items: flex-start; flex-direction: column; padding: 10px 0; }
  .lyrics-reader { padding: 20px 18px; }
  .poem-reading-body { font-size: 21px; }
}

/* ============================================================
   LYRIK v3 - BILDEBENE UND LESETEXT
   ============================================================ */
/* Reine Erweiterung des Lyrik-Archivs: jede Regel greift nur auf
   lyrik.html. Bestehende Klassen und Bausteine bleiben unveraendert,
   damit das bisherige Layout nicht bricht. */

/* Bildkarte: weicher Verlauf am unteren Rand, damit die
   Glasplakette auch auf hellen Bildbereichen lesbar bleibt. */
.lyrics-figure { margin: 0; min-width: 0; }
.lyrics-image { position: relative; }
/* Die Groessenangaben im Markup dienen nur der Platzreservierung und
   duerfen das Seitenverhaeltnis aus der bestehenden Regel nicht
   ueberschreiben. */
.lyrics-image img { height: auto; }
.lyrics-image::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 58%;
  background: linear-gradient(180deg, transparent 42%, color-mix(in oklch, var(--bg) 74%, transparent) 100%);
  pointer-events: none;
}

/* Glasplakette mit Motto und Unterzeile */
.lyrics-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: calc(100% - 28px);
  padding: 10px 14px;
  border: 1px solid color-mix(in oklch, var(--fg) 18%, transparent);
  border-radius: 14px;
  background: color-mix(in oklch, var(--bg) 74%, transparent);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  transition: transform .18s ease-out;
}
.lyrics-badge b {
  font-family: var(--font-hand-ui);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.15;
}
.lyrics-badge span { color: var(--muted); font-size: 12px; }

/* Quellenangabe unter der Bildkarte */
.lyrics-credit {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

/* Illustration im Reader (Motiv passend zur Kategorie) */
.reader-art {
  margin: 0 0 22px;
  max-width: 250px;
}
.reader-art-shot {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 18px 44px color-mix(in oklch, var(--bg) 44%, transparent);
}
.reader-art-shot img {
  display: block;
  width: 100%;
  aspect-ratio: var(--art-ratio, 1 / 1);
  object-fit: cover;
}
.reader-art-shot::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 52%;
  background: linear-gradient(180deg, transparent 58%, color-mix(in oklch, var(--bg) 70%, transparent) 100%);
  pointer-events: none;
}
.reader-art-cap {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  max-width: calc(100% - 20px);
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in oklch, #000 62%, transparent);
  color: #fff;
  font-family: var(--font-hand-ui);
  font-size: 16px;
  line-height: 1.2;
}
.reader-art-credit {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

/* Lesetext: Handschnittgroesse, Zeilenabstand und Laufweite ueber Tokens,
   damit spaetere Anpassungen an einer Stelle erfolgen. */
.poem-reading-body {
  font-size: var(--lyric-size);
  line-height: var(--lyric-line);
  letter-spacing: var(--lyric-track);
  max-width: 46ch;
}

/* Einblenden der Bildkarte im Reader. Die Klassen setzt das Skript
   direkt nach dem Einsetzen; ohne JavaScript bleibt das Bild sichtbar. */
.reader-art.is-entering { opacity: 0; transform: translateY(10px); }
.reader-art.is-entering.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .3s ease, transform .3s cubic-bezier(.22, .61, .36, 1);
}

@media (max-width: 800px) {
  .lyrics-badge { left: 12px; bottom: 12px; padding: 8px 12px; }
  .lyrics-badge b { font-size: 18px; }
  .lyrics-credit { text-align: left; }
  .reader-art { max-width: 100%; margin-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .reader-art,
  .reader-art.is-entering,
  .reader-art.is-entering.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.closing { text-align: center; }
.closing h2 { max-width: 18ch; margin: 0 auto 16px; font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -.04em; }
.closing p { color: var(--muted); margin-bottom: 28px; }
.pagefoot { padding-block: 28px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; text-align: center; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.home-main { min-height: 70vh; }
.home-header { max-width: 760px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.home-header h1 { margin-bottom: 12px; font-size: var(--fs-h2); line-height: 1.12; }
.home-header > p:last-child { color: var(--muted); font-size: 17px; }
.home-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block: 22px 42px; border-bottom: 1px solid var(--border); }
.home-shortcut { display: flex; min-height: 74px; flex-direction: column; justify-content: center; gap: 2px; padding: 12px 18px; border-left: 1px solid var(--border); color: var(--muted); }
.home-shortcut:first-child { border-left: 0; padding-left: 0; }
.home-shortcut span:first-child { color: var(--fg); font-family: var(--font-display); font-size: 23px; font-weight: 700; }
.home-shortcut-direct span:first-child { color: var(--muted); font-family: var(--font-body); font-size: 16px; font-weight: 500; }
.home-shortcut:hover { color: var(--fg); }
.home-categories { margin: -18px 0 38px; }
.home-categories h2 { margin-bottom: 12px; color: var(--muted); font-family: var(--font-body); font-size: 13px; font-weight: 600; }
.home-category-list { display: flex; flex-wrap: wrap; gap: 8px; }
.home-category { padding: 7px 11px; border: 1px solid var(--border); border-radius: 6px; color: var(--fg); font-size: 14px; }
.home-category:hover { border-color: var(--accent); background: var(--accent-soft); }
.home-feature-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(240px, .75fr); align-items: start; gap: clamp(28px, 5vw, 64px); }
.home-poem { min-width: 0; padding: 24px 0 32px; border-top: 3px solid var(--accent); }
.home-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.home-section-heading .eyebrow { margin-bottom: 0; }
.home-section-heading .btn { flex: 0 0 auto; }
.home-poem h2 { margin: 22px 0 6px; font-size: clamp(26px, 3vw, 36px); line-height: 1.15; }
.home-poem-meta, .home-anniversary-meta { color: var(--muted); font-size: 14px; }
.home-poem-body { margin-top: 24px; font-family: var(--font-serif, Georgia, serif); font-size: 18px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.home-anniversary { padding: 22px 24px; border-left: 2px solid var(--accent); background: var(--accent-soft); }
.home-anniversary h2 { margin: 12px 0 8px; font-size: 23px; line-height: 1.2; }
.home-anniversary-excerpt { white-space: pre-wrap; overflow-wrap: anywhere; }
.home-anniversary > a, .home-section-heading > a { color: var(--accent); font-weight: 600; }
.home-guestbook { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--border); }
.home-guestbook .home-section-heading { margin-bottom: 8px; }
.home-guestbook .home-section-heading h2 { margin: 0; font-size: 25px; }
.home-guestbook-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.home-guestbook-entry { min-width: 0; padding: 16px 0; border-top: 1px solid var(--border); }
.home-entry-byline { margin-bottom: 7px; color: var(--muted); font-size: 13px; }
.home-entry-body { margin-bottom: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.home-empty { color: var(--muted); }

.guestbook-main { min-height: 70vh; }
.guestbook-header { margin-bottom: 34px; }
.guestbook-header .profile-subtitle { max-width: 60ch; }
.guestbook-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); align-items: start; gap: clamp(28px, 5vw, 64px); }
.guestbook-form { position: sticky; top: 100px; box-shadow: none; }
.guestbook-form h2, .guestbook-list-heading h2 { margin-bottom: 20px; font-size: 22px; }
.guestbook-form-hint { color: var(--muted); font-size: 14px; line-height: 1.6; }
.guestbook-form textarea { min-height: 144px; resize: vertical; font: inherit; }
.guestbook-form textarea[aria-invalid="true"] { border-color: var(--error); }
.guestbook-form textarea:read-only { cursor: progress; }
.guestbook-form button:disabled { cursor: wait; }
.guestbook-list-status { margin: 20px 0; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--muted); }
.guestbook-list-status.is-error, .guestbook-delete-status.is-error { color: var(--error); }
.guestbook-retry { margin-bottom: 20px; }
.guestbook-length { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; text-align: right; }
.guestbook-form > .btn { width: 100%; }
.guestbook-list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); }
.guestbook-list-heading h2 { margin-bottom: 10px; }
.guestbook-list-heading > p { color: var(--muted); font-size: 14px; }
.guestbook-entries { min-width: 0; }
.guestbook-entry { position: relative; padding: 22px 0; border-bottom: 1px solid var(--border); }
.guestbook-entry > header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.guestbook-entry h3 { margin: 0 0 8px; font-size: 18px; overflow-wrap: anywhere; }
.guestbook-entry time { flex: 0 0 auto; color: var(--muted); font-size: 13px; }
.guestbook-entry-body { max-width: 65ch; margin: 0; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.guestbook-delete { min-height: 44px; margin-top: 8px; padding: 8px 12px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.guestbook-delete:hover { color: var(--fg); }
.guestbook-delete-confirm { margin-top: 16px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); }
.guestbook-delete-confirm > p { margin-bottom: 10px; }
.guestbook-delete-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.guestbook-delete-actions .btn { min-height: 44px; padding: 8px 12px; font-size: 14px; }
.guestbook-delete-status { margin: 12px 0 0; font-size: 14px; }

@media (max-width: 800px) {
  .home-feature-grid { grid-template-columns: minmax(0, 1fr); }
  .home-anniversary { max-width: none; }
  .home-guestbook-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guestbook-layout { grid-template-columns: minmax(0, 1fr); }
  .guestbook-form { position: static; }
}
@media (max-width: 560px) {
  .home-shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-shortcut:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--border); border-left: 0; padding-left: 0; }
  .home-section-heading { align-items: flex-start; flex-direction: column; }
  .home-guestbook-list { grid-template-columns: minmax(0, 1fr); }
  .guestbook-entry > header { align-items: flex-start; flex-direction: column; gap: 0; }
  .guestbook-list-heading { align-items: flex-start; flex-direction: column; gap: 0; }
}

@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .topnav-inner { min-height: 60px; gap: 12px; }
  .theme-switch { margin-inline: auto 0; }
  /* Desktop-Navigation und Sprach-Dropdown ausblenden, Hamburger einblenden */
  nav { display: none; }
  .lang-switch { display: none; }
  .nav-toggle { display: flex; }
  .login-wrap { grid-template-columns: 1fr; gap: 36px; }
  .login-copy p { max-width: 52ch; }
  .hero { min-height: 480px; }

  /* Persönlicher Bereich: eine Spalte, kompaktere Abstände */
  .profile-grid { grid-template-columns: 1fr; gap: var(--gap-md); }
  .profile-card-wide,
  .profile-card-main { grid-column: 1 / -1; }
  .profile-header { margin-bottom: var(--gap-lg); }
  .profile-card-avatar { order: -1; }
  .profile-footer-actions { justify-content: stretch; }
  .profile-footer-actions .btn { width: 100%; }
  .comm-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .logo { font-size: 15px; }
  nav a { font-size: 13px; }
  .hero-cta .btn { width: 100%; }
  .avatar-frame { width: 120px; height: 120px; }
}

.auth-section-enter { animation: fadeIn .2s ease-out; }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
}

/* Keep this after normal motion rules, including the theme and menu. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
