/* =========================================================================
   Kiris Kunst – Stylesheet
   Design-System: Anthrazit-Buehne, helle schwebende Karten, Rosa als einziger
   lauter Akzent. Gaensebluemchen-Bleistift-Muster im Hintergrund.
   Schrift: Quicksand, lokal (DSGVO-konform, kein Google-Fonts-CDN).
   ========================================================================= */

/* ---- Schriften (lokal) -------------------------------------------------- */
@font-face {
  font-family: "Quicksand";
  src: url("../fonts/Quicksand.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Tokens (Design-System) --------------------------------------------- */
:root {
  --charcoal:        #434343;  /* Seitenhintergrund */
  --charcoal-deep:   #313131;  /* Schatten / Mustertiefen */
  --charcoal-soft:   #505050;  /* leicht erhoehte dunkle Flaechen */
  --surface:         #d9d9d9;  /* helle Karten */
  --surface-bright:  #ececec;  /* hellere Karten / Hover */
  --ink:             #424242;  /* Text auf hell */
  --ink-soft:        #5e5e5e;  /* Sekundaertext auf hell */
  --paper:           #ffffff;  /* Text/Links auf dunkel */
  --rose:            #f9a5b9;  /* Primaer-Akzent */
  --rose-deep:       #f37e9b;  /* Hover / aktiv */
  --rose-faint:      #d98a9c;  /* Muster-Bluetenakzent */
  --yellow:          #ffd34d;  /* Logo-Detail, sehr sparsam */

  --card-line: rgba(0,0,0,.08);
  --radius-card: 28px;
  --radius-pill: 999px;
  --radius-sm: 14px;
  --shadow-card: 0 18px 40px -18px rgba(0,0,0,.55);
  --shadow-soft: 0 8px 22px -12px rgba(0,0,0,.5);

  --font-head: "Quicksand", system-ui, sans-serif;
  --font-body: "Quicksand", system-ui, sans-serif;

  --wrap: 1160px;
}

/* ---- Basis -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--paper);
  background-color: var(--charcoal);
  background-image: url("../img/brand/pattern-dark.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--rose); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--rose-deep); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }

:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--charcoal-deep); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 200; }
.skip-link:focus { left: 8px; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  background: var(--rose);
  border: none;
  border-radius: var(--radius-pill);
  padding: .7em 1.6em;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 18px -8px rgba(243,126,155,.9);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--rose-deep); color: #fff; transform: translateY(-2px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-small { font-size: .9rem; padding: .5em 1.1em; }
.btn-tiny { font-size: .8rem; padding: .35em .8em; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: none; border: 2px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--paper);
  box-shadow: none;
  border: 2px solid rgba(255,255,255,.55);
  line-height: 1;
  vertical-align: middle;
}
.btn-ghost-light:hover { background: var(--rose); color: #fff; border-color: var(--rose); }
.btn-block { width: 100%; }
.btn-danger { background: transparent; color: #a3322c; border: 2px solid #d8a09c; box-shadow: none; }
.btn-danger:hover { background: #f6e3e1; color: #7e211c; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--rose); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linklike:hover { color: var(--rose-deep); }
.inline-form { display: inline-block; margin: 0; }

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(49,49,49,.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,.25);
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 88px;
  padding-block: 8px;
}
.nav-left { display: flex; gap: 24px; align-items: center; justify-self: start; }
.nav-left a, .user-nav a {
  color: var(--paper);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.18rem;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease;
}
.nav-left a:hover, .nav-left a.active,
.user-nav a:hover { border-color: var(--rose); color: var(--paper); }

.brand { justify-self: center; display: grid; place-items: center; line-height: 0; }
.brand-logo {
  width: 84px; height: 84px;
  display: block;
  transition: transform .2s ease;
}
.brand:hover .brand-logo { transform: scale(1.06) rotate(-3deg); }

.user-nav, .nav-right { display: flex; align-items: center; gap: 16px; justify-self: end; font-size: .95rem; }
.user-nav { padding-right: 2px; }
.nav-cta {
  color: var(--rose) !important;
  font-weight: 600;
}
.nav-cta:hover { border-color: var(--rose); }
.user-name { font-weight: 600; color: var(--paper); text-decoration: none; }

/* ---- Flash -------------------------------------------------------------- */
.flash-area { margin-top: 16px; }
.flash {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-radius: var(--radius-sm); padding: 11px 12px 11px 16px; margin-bottom: 8px; font-weight: 600;
  transition: opacity .3s ease, transform .3s ease;
}
.flash-hide { opacity: 0; transform: translateY(-6px); }
.flash-success { background: #e6f3ea; color: #27553a; }
.flash-error { background: #f7e7ea; color: #8a3344; }
.flash-msg { flex: 1; }
.flash-close {
  flex: 0 0 auto; background: none; border: 0; cursor: pointer;
  font-size: 1.4rem; line-height: 1; color: inherit; opacity: .6; padding: 0 6px; border-radius: 6px;
}
.flash-close:hover { opacity: 1; }

/* ---- Startseite: Begruessung (Avatar + Sprechblase) --------------------- */
.greet { padding-block: clamp(36px, 7vw, 80px) clamp(20px, 4vw, 36px); }
.greet-inner {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(8px, 3vw, 36px); flex-wrap: wrap;
}
.greet-avatar {
  width: clamp(180px, 32vw, 340px); height: auto;
  flex: 0 0 auto;
  filter: drop-shadow(0 14px 26px rgba(0,0,0,.45));
}
.speech {
  position: relative;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-card);
  padding: clamp(26px, 4vw, 40px) clamp(26px, 4vw, 44px);
  box-shadow: var(--shadow-card);
  max-width: 440px;
  text-align: center;
}
/* Sprechblasen-Zipfel zum Avatar (nur Desktop) */
.speech::before {
  content: ""; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  border: 14px solid transparent; border-right-color: var(--surface); border-left: 0;
}
.speech-title { color: var(--ink); margin-bottom: .35em; font-size: clamp(2rem, 4vw, 2.8rem); }
.speech-text { color: var(--ink-soft); font-size: 1.2rem; margin-bottom: 1.3em; }
.speech-text :last-child { margin-bottom: 0; }
.speech .btn { margin-top: .2em; }

/* ---- Durchlaufende Galerie (Marquee) ------------------------------------ */
.rolling { padding-block: clamp(20px, 4vw, 40px) clamp(40px, 7vw, 72px); }
.marquee { overflow: hidden; padding: 8px 0; touch-action: pan-y; cursor: grab; }
.marquee:active { cursor: grabbing; }
/* Fallback nur bei prefers-reduced-motion: von Hand horizontal scrollbar */
.marquee-manual {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
  cursor: default;
  padding-inline: clamp(16px, 4vw, 32px);
}
.marquee-manual::-webkit-scrollbar { display: none; }
.marquee-manual .marquee-track { width: max-content; transform: none !important; }
.marquee-track { display: flex; width: max-content; will-change: transform; }
.marquee-set { display: flex; gap: 22px; padding-right: 22px; }

.cat-card {
  display: flex; flex-direction: column;
  width: clamp(210px, 24vw, 270px);
  background: var(--surface);
  border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); color: var(--ink); }
.cat-img { display: block; aspect-ratio: 4 / 3; width: 100%; overflow: hidden; background: var(--surface-bright); flex: 0 0 auto; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .35s ease; }
.cat-card:hover .cat-img img { transform: scale(1.05); }
.cat-img-empty { display: grid; place-items: center; height: 100%; font-size: 2.4rem; color: var(--rose-deep); }
.cat-info { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 13px 16px 15px; }
.cat-info strong { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }
.cat-count { font-size: .82rem; color: var(--ink-soft); white-space: nowrap; }

.rolling-more { text-align: center; font-size: .98rem; margin-top: 20px; }
.rolling-more a { color: var(--rose); text-decoration: none; font-family: var(--font-head); font-weight: 500; }
.rolling-more a:hover { color: var(--rose-deep); text-decoration: underline; }

.empty-hint { text-align: center; padding: 48px 0; color: #cfcfcf; font-style: italic; }

/* ---- Galerie-Uebersicht (grosse Kacheln) -------------------------------- */
.gallery-overview { padding-block: clamp(32px, 6vw, 64px) clamp(48px, 8vw, 90px); }
.overview-head { text-align: center; margin-bottom: clamp(28px, 5vw, 48px); }
.overview-head .speech-title { color: var(--paper); }
.overview-sub { color: #d8d8d8; max-width: 56ch; margin-inline: auto; font-size: 1.08rem; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(22px, 3.5vw, 40px);
}
.cat-tile {
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  text-decoration: none; color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease;
}
.cat-tile:hover { transform: translateY(-6px); color: var(--ink); }
.cat-tile-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-bright); }
.cat-tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cat-tile:hover .cat-tile-img img { transform: scale(1.06); }
.cat-tile-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 6px; }
.cat-tile-name { font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; }
.cat-tile-desc { color: var(--ink-soft); font-size: .96rem; }
.cat-tile .cat-count { margin-top: 4px; }

/* ---- Kategorieseite ----------------------------------------------------- */
.cat-head { padding-block: clamp(28px, 5vw, 48px) 14px; }
.cat-head .speech-title { color: var(--paper); }
.eyebrow { font-size: .92rem; margin-bottom: 12px; }
.eyebrow a { text-decoration: none; font-weight: 600; }
.cat-desc { max-width: 65ch; color: #e0e0e0; }
.cat-meta { color: #c8c8c8; font-size: .92rem; }

/* Gleichmaessiges Raster statt Multicolumn -> sauberer Abschluss, kein Abreissen */
.grid-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(12px, 1.6vw, 18px);
  padding-bottom: clamp(48px, 7vw, 80px);
}
.g-item {
  position: relative; display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--charcoal-soft);
  box-shadow: var(--shadow-soft);
}
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.g-item:hover img { transform: scale(1.05); }
.g-cap {
  position: absolute; inset: auto 0 0 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 28px 14px 12px; color: #fff; font-size: .9rem;
  background: linear-gradient(to top, rgba(20,18,22,.82), rgba(20,18,22,0));
  opacity: 0; transition: opacity .25s ease;
}
.g-item:hover .g-cap, .g-item:focus-visible .g-cap { opacity: 1; }
.g-title { font-family: var(--font-head); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-comments { white-space: nowrap; }

/* ---- Lightbox ----------------------------------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 120; display: none; }
.lightbox.open { display: block; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(20,18,22,.94); }
.lb-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;  /* minmax(0,..) verhindert Ueberlauf der Bildspalte */
  grid-template-rows: 100dvh;                   /* feste Zeilenhoehe statt auto -> Bild kann nicht groesser werden */
  height: 100dvh;
  max-height: 100dvh;
}
.lb-stage {
  position: relative; margin: 0;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(12px, 3vw, 36px);
  min-width: 0; min-height: 0;
  height: 100dvh; max-height: 100dvh;
  overflow: hidden;
}
.lb-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 18px 60px -18px rgba(0,0,0,.8);
  user-select: none; -webkit-user-drag: none; touch-action: pan-y;
}
.lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; font-size: 2rem; line-height: 1;
  color: var(--ink); background: var(--surface);
  border: none; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--shadow-soft);
  transition: transform .15s ease, background .15s ease;
}
.lb-arrow:hover { transform: translateY(-50%) scale(1.08); background: #fff; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-panel { background: var(--surface); color: var(--ink); display: flex; flex-direction: column; min-height: 0; }
.lb-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--card-line); }
.lb-counter { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.lb-close { background: none; border: 0; cursor: pointer; font-size: 1.9rem; line-height: 1; color: var(--ink-soft); padding: 2px 8px; border-radius: 8px; }
.lb-close:hover { color: var(--rose-deep); }
.lb-panel-scroll { overflow-y: auto; padding: 18px; flex: 1; min-height: 0; }
.lb-title { margin-bottom: .25em; color: var(--ink); }
.lb-desc { color: var(--ink-soft); white-space: pre-line; }
.lb-comments { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--card-line); }
.lb-comments h4 { font-family: var(--font-head); font-weight: 600; font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 0 0 .6em; }
.lb-clist { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.lb-clist li { background: var(--surface-bright); border-radius: var(--radius-sm); padding: 10px 13px; font-size: .93rem; }
.lb-c-meta { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: .78rem; color: var(--ink-soft); margin-bottom: 2px; }
.lb-c-meta b { color: var(--ink); font-size: .88rem; }
.lb-c-del { background: none; border: 0; color: var(--ink-soft); cursor: pointer; font-size: .78rem; text-decoration: underline; padding: 0; }
.lb-c-del:hover { color: #a3322c; }
.lb-c-empty { color: var(--ink-soft); font-style: italic; font-size: .9rem; }
.lb-cform textarea { width: 100%; font: inherit; border: 1.5px solid #c4c4c4; border-radius: var(--radius-sm); padding: 9px 11px; margin-bottom: 8px; resize: vertical; background: #fff; }
.lb-cform textarea:focus { border-color: var(--rose-deep); outline: none; box-shadow: 0 0 0 3px var(--rose-faint); }
.lb-login-hint { font-size: .92rem; }

/* ---- First-Visit-Intro -------------------------------------------------- */
.intro[hidden] { display: none !important; }
.intro {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  background: #f3f1ec;  /* heller Grund passend zum hellen Logo-Video */
  transition: opacity .6s ease;
}
.intro.fade { opacity: 0; }
.intro-video {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(62vw, 62vh, 460px);
  height: auto;
  border-radius: 50%;
  transition: top .75s cubic-bezier(.5,0,.3,1),
              width .75s cubic-bezier(.5,0,.3,1),
              transform .75s cubic-bezier(.5,0,.3,1);
}
/* Endzustand: Video schrumpft gerade nach oben in die Header-Mitte (left bleibt 50%) */
.intro.to-logo {
  background: transparent;
  pointer-events: none;
}
.intro.to-logo .intro-video {
  top: 52px;                 /* etwa Header-Mitte */
  width: 84px;               /* exakt Header-Logo-Größe -> kein Sprung am Ende */
  transform: translate(-50%, -50%);
}
@media (max-width: 560px) {
  .intro.to-logo .intro-video { top: 41px; width: 60px; }  /* passt zur Mobile-Logo-Größe */
}

/* ---- Shop-Platzhalter --------------------------------------------------- */
.shop-soon { display: grid; place-items: center; padding-block: clamp(48px, 9vw, 110px); }
.shop-card {
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(36px, 6vw, 64px) clamp(28px, 5vw, 60px);
  text-align: center; max-width: 560px;
}
.shop-card .speech-title { color: var(--ink); }
.shop-text { color: var(--ink-soft); font-size: 1.08rem; max-width: 42ch; margin-inline: auto; margin-bottom: 1.6em; }
/* bluehende Blume aus CSS – symmetrisch, sanft endlos pulsierend */
.shop-flower { position: relative; width: 120px; height: 120px; margin: 0 auto 30px; }
.shop-flower .petal {
  position: absolute; top: 50%; left: 50%;
  width: 28px; height: 46px;
  background: var(--rose); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  /* Drehpunkt in der Mitte der Blume: erst zentrieren, dann drehen, dann nach aussen schieben */
  transform-origin: 50% 50%;
  animation: petalPulse 3s ease-in-out infinite;
}
.shop-flower .petal:nth-child(1){ transform: translate(-50%,-50%) rotate(0deg)   translateY(-30px); animation-delay: 0s; }
.shop-flower .petal:nth-child(2){ transform: translate(-50%,-50%) rotate(60deg)  translateY(-30px); animation-delay: .15s; }
.shop-flower .petal:nth-child(3){ transform: translate(-50%,-50%) rotate(120deg) translateY(-30px); animation-delay: .3s; }
.shop-flower .petal:nth-child(4){ transform: translate(-50%,-50%) rotate(180deg) translateY(-30px); animation-delay: .45s; }
.shop-flower .petal:nth-child(5){ transform: translate(-50%,-50%) rotate(240deg) translateY(-30px); animation-delay: .6s; }
.shop-flower .petal:nth-child(6){ transform: translate(-50%,-50%) rotate(300deg) translateY(-30px); animation-delay: .75s; }
.shop-flower .flower-core {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--yellow); border-radius: 50%; color: #fff; font-size: 1.2rem;
  z-index: 2;
  animation: corePulse 3s ease-in-out infinite;
}
/* sanftes Atmen: jedes Blatt skaliert minimal, ergibt ein lebendiges Blühen ohne Stop */
@keyframes petalPulse {
  0%, 100% { opacity: .85; }
  50%      { opacity: 1; }
}
@keyframes corePulse {
  0%, 100% { transform: translate(-50%,-50%) scale(1); }
  50%      { transform: translate(-50%,-50%) scale(1.12); }
}

/* ---- Auth-Karten -------------------------------------------------------- */
.auth-wrap { display: grid; place-items: center; padding: clamp(40px, 8vw, 90px) 16px; }
.auth-card {
  width: min(420px, 100%);
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(26px, 5vw, 40px);
}
.auth-card-wide { width: min(520px, 100%); }
.auth-card h1 { font-size: 1.8rem; color: var(--ink); }
.auth-sub { color: var(--ink-soft); margin-top: -6px; }
.auth-alt { font-size: .92rem; margin: 14px 0 0; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---- Konto-Seite -------------------------------------------------------- */
.account { padding-block: clamp(32px, 6vw, 60px) clamp(48px, 8vw, 90px); max-width: 720px; }
.account-head { text-align: center; margin-bottom: clamp(24px, 4vw, 40px); }
.account-head .speech-title { color: var(--paper); }
.account-sub { color: #d8d8d8; }
.account-card {
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  padding: clamp(22px, 4vw, 32px); margin-bottom: 20px;
}
.account-card h2 { font-size: 1.3rem; color: var(--ink); margin-bottom: .35em; }
.account-hint { color: var(--ink-soft); font-size: .95rem; margin-bottom: 1.2em; }
.account-form .field { margin-bottom: 14px; }
.account-form .field span { color: var(--ink); }
.account-admin {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  border: 2px solid var(--rose);
}
.account-admin h2 { margin-bottom: .2em; }
.account-admin-text p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.account-admin .btn { flex: 0 0 auto; }
.account-foot { text-align: center; margin-top: 28px; }

/* ---- Kontakt-Seite ------------------------------------------------------ */
.contact-wrap { padding-block: clamp(32px, 6vw, 60px) clamp(48px, 8vw, 90px); max-width: 760px; }
.contact-card {
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  padding: clamp(26px, 5vw, 44px);
}
.contact-card .speech-title { color: var(--ink); }
.contact-intro { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 1.6em; max-width: 60ch; }
.contact-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.contact-form .field span { color: var(--ink); }
.contact-form .btn { margin-top: 6px; }
.contact-note { margin-top: 18px; font-size: .88rem; color: var(--ink-soft); }
@media (max-width: 560px) { .contact-form .form-grid { grid-template-columns: 1fr; } }

/* ---- Admin: Nachrichten ------------------------------------------------- */
.nav-badge {
  display: inline-block; min-width: 18px; padding: 0 6px;
  background: var(--rose-deep); color: #fff; font-size: .72rem; font-weight: 700;
  line-height: 18px; text-align: center; border-radius: var(--radius-pill);
}
.msg-list { display: grid; gap: 14px; margin-top: 18px; }
.msg-card {
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-soft);
  padding: 18px 20px;
}
.msg-unread { box-shadow: 0 0 0 2px var(--rose), var(--shadow-soft); }
.msg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.msg-from { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rose-deep); flex: 0 0 auto; }
.msg-email { font-size: .9rem; }
.msg-date { font-size: .82rem; color: var(--ink-soft); white-space: nowrap; }
.msg-subject { font-family: var(--font-head); font-weight: 600; margin-top: 6px; }
.msg-body { margin-top: 8px; color: var(--ink); white-space: pre-line; }
.msg-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--card-line); }
.msg-actions form { margin: 0; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
.field small { font-weight: 400; color: var(--ink-soft); }
.input {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid #c4c4c4; border-radius: var(--radius-sm); padding: .6em .85em;
}
.input:focus { border-color: var(--rose-deep); outline: none; box-shadow: 0 0 0 3px var(--rose-faint); }
textarea.input { resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.check input { margin-top: 5px; accent-color: var(--rose-deep); }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---- Inhaltsseiten (Impressum etc.) ------------------------------------- */
.page-content { padding: clamp(36px, 6vw, 64px) 0 clamp(48px, 7vw, 80px); }
.page-content .speech-title, .page-content h1 { color: var(--paper); }
.page-card {
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  padding: clamp(28px, 5vw, 48px);
}
.page-card h1 { color: var(--ink); }
.page-body { white-space: normal; color: var(--ink-soft); }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: var(--charcoal-deep); color: #cfcfcf; margin-top: auto; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding-block: 16px; font-size: .9rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--rose); }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a { text-decoration: none; font-family: var(--font-head); font-weight: 500; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--rose); flex-wrap: wrap; }
.footer-icon { flex: 0 0 auto; }
.footer-wordmark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--paper);
}
.footer-copy { font-size: .8rem; color: #9a9a9a; }

/* ---- Admin (helle Arbeitsflaeche auf dunklem Grund) --------------------- */
.admin-nav { background: rgba(49,49,49,.86); border-bottom: 1px solid rgba(0,0,0,.25); }
.admin-nav-inner { display: flex; gap: 6px; align-items: center; overflow-x: auto; padding-block: 10px; }
.admin-nav-label { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #bbb; margin-right: 10px; white-space: nowrap; }
.admin-nav a { white-space: nowrap; text-decoration: none; color: var(--paper); font-weight: 500; font-size: .95rem; padding: 6px 13px; border-radius: var(--radius-pill); border: 1.5px solid transparent; }
.admin-nav a:hover { background: rgba(255,255,255,.1); }
.admin-nav a.active { background: var(--rose); color: #fff; }

.admin-wrap { padding-block: 26px 70px; }
.admin-wrap-narrow { max-width: 800px; }
.admin-wrap > h1, .admin-headrow h1 { color: var(--paper); }
.admin-wrap > .muted, .admin-wrap > p { color: #d4d4d4; }
.admin-headrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.admin-headrow h1 { margin-bottom: 0; }

.card { background: var(--surface); color: var(--ink); border-radius: var(--radius-card); padding: 22px 24px; margin-block: 18px; box-shadow: var(--shadow-card); }
.card h2 { font-size: 1.3rem; color: var(--ink); }
.card .muted, .card p { color: var(--ink-soft); }
.muted { color: var(--ink-soft); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-block: 18px; }
.stat { background: var(--surface); border-radius: var(--radius-sm); padding: 18px 20px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-soft); transition: transform .15s ease; }
.stat:hover { transform: translateY(-3px); color: var(--ink); }
.stat b { display: block; font-family: var(--font-head); font-size: 2rem; font-weight: 600; color: var(--rose-deep); }
.stat span { font-size: .85rem; color: var(--ink-soft); }

.first-steps ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* ---- Admin: Begrüßungsbild bearbeiten ---- */
.avatar-edit { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.avatar-preview {
  flex: 0 0 auto; width: 180px; height: 180px;
  display: grid; place-items: center;
  background: var(--charcoal); border-radius: var(--radius-sm); padding: 10px;
  background-image: url("../img/brand/pattern-dark.jpg"); background-size: cover;
}
.avatar-preview img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0,0,0,.4)); }
.avatar-forms { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 12px; }
.avatar-forms form { margin: 0; }

.table { width: 100%; border-collapse: collapse; font-size: .94rem; color: var(--ink); }
.table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); padding: 8px 10px; border-bottom: 2px solid #c8c8c8; }
.table td { padding: 10px; border-bottom: 1px solid #cdcdcd; vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
/* Auf schmalen Screens: Tabelle horizontal scrollbar statt aus dem Layout laufen */
@media (max-width: 720px) {
  .card:has(> .table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 560px; }
  .table th, .table td { white-space: nowrap; }
  .table .t-break { white-space: normal; word-break: break-word; }
}
.t-right { text-align: right; }
.t-nowrap { white-space: nowrap; }
.t-break { overflow-wrap: anywhere; }
.badge { background: var(--yellow); color: #4a3408; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: var(--radius-pill); }
.badge-ok { background: #cdeccf; color: #27553a; }

.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.comment-list li { border-bottom: 1px solid #cdcdcd; padding-bottom: 10px; }
.comment-list li:last-child { border-bottom: 0; }
.comment-meta { font-size: .84rem; color: var(--ink-soft); }
.comment-body { font-size: .95rem; }

.upload-form { display: grid; gap: 12px; }
.upload-form .btn { justify-self: start; }
.file-drop {
  display: grid; gap: 4px; place-items: center;
  border: 2.5px dashed #bdbdbd; border-radius: var(--radius-sm);
  padding: 28px 16px; text-align: center; cursor: pointer;
  background: var(--surface-bright);
  transition: border-color .15s ease, background .15s ease;
}
.file-drop:hover, .file-drop.dragover { border-color: var(--rose-deep); background: #fbeef1; }
.file-drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-drop-text { font-weight: 600; }
.file-drop-count { font-size: .85rem; color: var(--rose-deep); font-weight: 600; min-height: 1.2em; }

.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-block: 18px; }
.adm-grid-wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.adm-img { background: var(--surface-bright); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; }
.adm-img > img, .adm-img-thumbwrap img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.adm-img-thumbwrap { position: relative; }
.adm-img.is-cover { box-shadow: 0 0 0 3px var(--yellow), var(--shadow-soft); }
.cover-badge { position: absolute; top: 8px; left: 8px; background: var(--yellow); color: #4a3408; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: var(--radius-pill); }
.adm-img-form { padding: 12px 12px 4px; }
.adm-img-form .field { margin-bottom: 10px; }
.adm-img-form .input { font-size: .9rem; padding: .4em .6em; }
.adm-actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 12px 12px; margin-top: auto; }
.adm-actions form { margin: 0; }

/* ---- Bilder-Admin: Sammelbearbeitung + Drag&Drop ---- */
.edit-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 18px 0; }
.edit-hint { margin: 0; flex: 1; min-width: 240px; }
.edit-toolbar-bottom { justify-content: flex-end; }
.drag-pill { display: inline-block; background: var(--charcoal-soft); color: #fff; padding: 1px 8px; border-radius: var(--radius-pill); font-size: .85em; }
.sortable .adm-img { position: relative; }
.adm-img.dragging { opacity: .5; outline: 2px dashed var(--rose-deep); }
.drag-handle {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 30px; height: 30px; display: grid; place-items: center;
  background: rgba(0,0,0,.55); color: #fff; border-radius: 8px;
  cursor: grab; font-size: 1.1rem; user-select: none;
}
.drag-handle:active { cursor: grabbing; }

/* Sortier-Pfeile (zuverlässige Sortiermethode) */
.arrow-pill { display: inline-block; background: var(--charcoal-soft); color: #fff; padding: 1px 9px; border-radius: var(--radius-pill); font-size: .85em; letter-spacing: 2px; }
.sort-arrows { position: absolute; top: 8px; left: 8px; z-index: 3; display: flex; gap: 4px; }
.sort-arrow {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 8px;
  cursor: pointer; font-size: 1.05rem; line-height: 1;
}
.sort-arrow:hover { background: var(--rose-deep); }
.adm-img.just-moved { outline: 2px solid var(--rose); transition: outline .2s ease; }

/* Breadcrumb-Pfad */
.breadcrumb { font-size: .95rem; margin-bottom: 10px; color: #d8d8d8; }
.breadcrumb a { color: var(--paper); text-decoration: none; }
.breadcrumb a:hover { color: var(--rose); }
.bc-sep { margin: 0 8px; color: var(--rose); }
.bc-current { color: var(--rose); font-weight: 600; }

/* Sammlungs-Seite */
.collection-title { color: var(--paper); margin-bottom: 6px; }
.collection-desc { color: #d8d8d8; max-width: 60ch; margin-bottom: clamp(20px, 4vw, 36px); }

/* Titelbild-Auswahl (Sammlung) */
.cover-current { display: grid; place-items: start; }
.cover-current img { max-width: 280px; border-radius: var(--radius-sm); box-shadow: var(--shadow-soft); }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cover-pick { position: relative; cursor: pointer; border-radius: var(--radius-sm); overflow: hidden; display: block; }
.cover-pick img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; transition: transform .2s ease; }
.cover-pick input { position: absolute; top: 8px; left: 8px; z-index: 2; width: 20px; height: 20px; }
.cover-pick-cat { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.6); color: #fff; font-size: .72rem; padding: 3px 6px; }
.cover-pick:has(input:checked) { outline: 3px solid var(--rose); }
.cover-pick:has(input:checked) img { transform: scale(1.05); }

/* Kategorie-Baum im Admin */
.tree-mark { color: var(--rose-deep); margin-right: 2px; }
.form-hint { margin: -4px 0 14px; font-size: .9rem; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 920px) {
  .lb-layout { grid-template-columns: 1fr; grid-template-rows: 60dvh 40dvh; height: 100dvh; }
  .lb-stage { padding: 10px; height: 60dvh; max-height: 60dvh; }
  .lb-panel { border-top: 1px solid var(--card-line); min-height: 0; }
  .lb-arrow { width: 44px; height: 44px; font-size: 1.6rem; }
}
@media (max-width: 760px) {
  .header-inner { grid-template-columns: 1fr auto 1fr; gap: 10px; }
  .nav-left { gap: 16px; font-size: .98rem; }
  .nav-left a, .user-nav a { font-size: 1rem; }
  /* Sprechblase unter den Avatar */
  .greet-inner { flex-direction: column; }
  .speech { max-width: 92vw; }
  .speech::before { left: 50%; top: -16px; transform: translateX(-50%); border: 14px solid transparent; border-bottom-color: var(--surface); border-top: 0; }
}
@media (max-width: 560px) {
  .header-inner { min-height: 70px; gap: 6px; }
  .brand-logo { width: 56px; height: 56px; }
  .nav-left { gap: 12px; }
  .nav-left a, .user-nav a { font-size: .9rem; }
  .user-nav { gap: 10px; font-size: .85rem; }
  .user-nav .btn-small { padding: .35em .7em; font-size: .8rem; }
  .grid-gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 400px) {
  /* Auf sehr schmalen Phones Abmelden zu kompaktem Symbol, Name bleibt */
  .nav-left { gap: 9px; }
  .nav-left a, .user-nav a, .user-nav { font-size: .82rem; }
}

/* ---- Reduzierte Bewegung ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
