/* =========================================================
   Ustadh Abu Umar – Design System
   Farben: Creme/Beige Hintergrund, tiefes Marineblau, Gold
   Fonts: Cinzel (Display), EB Garamond (Fließtext)
   ========================================================= */

:root {
  --cream:        #F4EFE1;
  --cream-soft:   #EFE8D6;
  --cream-card:   #FBF7EC;
  --navy:         #16244F;
  --navy-soft:    #25356B;
  --gold:         #B5893B;
  --gold-soft:    #C8A35A;
  --line:         #D8CBA8;
  --text-muted:   #4A5170;
  --shadow:       0 10px 40px rgba(22, 36, 79, 0.08);
  --radius:       14px;
  --max:          1100px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Das hidden-Attribut muss display-Regeln (flex/grid) überschreiben */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: 'EB Garamond', Georgia, serif;
  background-color: var(--cream);
  color: var(--navy);
  line-height: 1.65;
  font-size: 19px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typografie ---------- */
h1, h2, h3, .display {
  font-family: 'Cinzel', 'EB Garamond', serif;
  color: var(--navy);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.25;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.25rem; letter-spacing: 0.06em; }

p { margin-bottom: 1.1rem; }
strong { color: var(--navy); }

/* Goldener Trenner mit Raute (wie auf den Beiträgen) */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 2.2rem 0;
  color: var(--gold);
}
.divider::before,
.divider::after {
  content: "";
  height: 1px;
  width: 120px;
  max-width: 28vw;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.divider::after { background: linear-gradient(90deg, var(--gold), transparent); }
.divider .diamond { font-size: 0.7rem; letter-spacing: 0.4em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 225, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 24px;
  max-width: var(--max);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cream);
  border: 2px solid var(--gold);
  padding: 2px;
  box-shadow: 0 2px 8px rgba(22, 36, 79, 0.12);
}
.brand-name {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--navy);
}
.brand-name small {
  display: block;
  font-family: 'EB Garamond', serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  padding: 6px 0;
  position: relative;
  transition: color 0.2s;
}
.nav a:hover { color: var(--gold); }
.nav a.active { color: var(--gold); }
.nav a.active::after,
.nav a:hover::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--gold);
}

/* Social-Icons */
.socials { display: flex; align-items: center; gap: 14px; }
.socials a {
  width: 34px; height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy);
  transition: all 0.2s ease;
}
.socials a:hover {
  background: var(--navy);
  color: var(--cream);
  border-color: var(--navy);
  transform: translateY(-2px);
}
.socials svg { width: 17px; height: 17px; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: var(--navy);
}
.menu-toggle svg { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 72px 24px 40px;
  position: relative;
}
.hero .logo-lg {
  width: 300px;
  max-width: 80vw;
  height: auto;
  margin: 0 auto 26px;
  border-radius: 22px;
  background: var(--cream-card);
  border: 1px solid var(--line);
  padding: 10px;
  box-shadow: var(--shadow);
}
.hero h1 { margin-bottom: 8px; }
.hero .subtitle {
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  margin-bottom: 18px;
}
.hero .lead {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.18rem;
  color: var(--text-muted);
}

/* ---------- Buttons ---------- */
.btn-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.btn {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: 999px;
  border: 1px solid var(--navy);
  transition: all 0.2s ease;
  cursor: pointer;
}
.btn-primary { background: var(--navy); color: var(--cream); }
.btn-primary:hover { background: var(--navy-soft); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--cream); }

/* ---------- Sections / Cards ---------- */
.section { padding: 56px 0; }
.section-narrow { max-width: 820px; margin: 0 auto; }

.quote-card {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 36px;
  text-align: center;
  box-shadow: var(--shadow);
  max-width: 700px;
  margin: 0 auto;
}
.quote-card .label {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 0.8rem;
  margin-bottom: 18px;
}
.quote-card .big {
  font-size: 1.7rem;
  line-height: 1.4;
  color: var(--navy);
  margin-bottom: 6px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 36px;
}
.card {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .icon { color: var(--gold); margin-bottom: 14px; }
.card .icon svg { width: 32px; height: 32px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 1rem; margin-bottom: 0; }

/* ---------- Über mich ---------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose p { font-size: 1.12rem; color: #2a3050; }
.legal h2 { font-size: 1.3rem; margin: 2rem 0 0.6rem; }
.legal p { font-size: 1.05rem; }
.prose h2 { margin: 2.4rem 0 1rem; }
.prose h3 { margin: 1.8rem 0 0.8rem; color: var(--gold); }

.grade {
  display: inline-block;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 12px;
  font-size: 0.95rem;
  color: var(--navy);
  white-space: nowrap;
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px 22px;
  margin: 18px 0 8px;
  list-style: none;
}
.subject-grid li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--cream-soft);
  font-size: 1.02rem;
}
.subject-grid li .num {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  font-size: 0.8rem;
  min-width: 24px;
}
.subject-grid li .ar { color: var(--text-muted); font-size: 0.95rem; margin-left: auto; direction: rtl; }

.works {
  list-style: none;
  counter-reset: work;
  margin: 14px 0;
}
.works > li {
  counter-increment: work;
  position: relative;
  padding: 14px 0 14px 46px;
  border-bottom: 1px solid var(--cream-soft);
}
.works > li::before {
  content: counter(work);
  position: absolute;
  left: 0; top: 12px;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 50%;
}
.works .ar { display: block; color: var(--text-muted); direction: rtl; font-size: 1rem; margin-top: 2px; }
.works .sub { display: block; padding-left: 14px; margin-top: 6px; font-size: 0.96rem; color: var(--text-muted); border-left: 2px solid var(--line); }
.works .sub .ar { display: inline; }

/* ---------- Abhandlungen (Platzhalter) ---------- */
.coming {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 0;
}
.coming .glyph { color: var(--gold); margin-bottom: 22px; }
.coming .glyph svg { width: 64px; height: 64px; margin: 0 auto; }
.coming p { color: var(--text-muted); font-size: 1.15rem; }

.cat-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 30px;
}
.cat-preview span {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  opacity: 0.7;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: var(--cream);
  margin-top: 60px;
  padding: 50px 24px 30px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
.site-footer h4 {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 16px;
}
.site-footer a { color: var(--cream); opacity: 0.85; transition: opacity 0.2s; }
.site-footer a:hover { opacity: 1; color: var(--gold-soft); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; font-size: 1rem; }
.footer-brand p { opacity: 0.8; font-size: 1rem; }
.footer-socials { display: flex; gap: 12px; margin-top: 16px; }
.footer-socials a {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(244,239,225,0.3);
  border-radius: 50%;
  color: var(--cream);
}
.footer-socials a:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.footer-socials svg { width: 18px; height: 18px; }
.footer-bottom {
  max-width: var(--max);
  margin: 36px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(244,239,225,0.2);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
  .nav, .header-socials { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    padding: 18px 24px;
    gap: 16px;
    align-items: flex-start;
  }
  .subject-grid li .ar { display: none; }
}

/* =========================================================
   Abhandlungen – Übersicht, Karten & Filter
   ========================================================= */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}
.chip {
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.chip:hover { border-color: var(--gold); color: var(--gold); }
.chip.active { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.chip-count {
  font-family: 'EB Garamond', serif;
  font-size: 0.78rem;
  background: rgba(0,0,0,0.08);
  border-radius: 999px;
  padding: 0 7px;
}
.chip.active .chip-count { background: rgba(244,239,225,0.25); }

/* Smart-Suche */
.search-box {
  position: relative;
  max-width: 620px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 18px;
  width: 20px; height: 20px;
  color: var(--gold);
  pointer-events: none;
}
#searchInput {
  width: 100%;
  padding: 14px 48px 14px 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream-card);
  font-family: 'EB Garamond', serif;
  font-size: 1.1rem;
  color: var(--navy);
}
#searchInput::placeholder { color: #9a9686; }
#searchInput:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(181, 137, 59, 0.15);
}
.search-clear {
  position: absolute;
  right: 12px;
  width: 30px; height: 30px;
  border: none;
  background: var(--cream-soft);
  border-radius: 50%;
  color: var(--navy);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.18s;
}
.search-clear:hover { background: var(--navy); color: var(--cream); }
.search-info {
  text-align: center;
  color: var(--text-muted);
  margin: 0 0 26px;
  font-size: 1.02rem;
}
.search-info strong { color: var(--gold); }
.pc-snippet { color: var(--text-muted); font-size: 0.97rem; margin-bottom: 14px; line-height: 1.55; }
mark {
  background: rgba(181, 137, 59, 0.28);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 22px;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pc-cat {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.pc-title { font-size: 1.3rem; margin-bottom: 6px; line-height: 1.3; }
.pc-date { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 12px; }
.pc-excerpt { color: var(--text-muted); font-size: 1.02rem; margin-bottom: 16px; }
.pc-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pc-tag {
  font-family: 'Cinzel', serif;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}
.pc-more {
  margin-left: auto;
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.empty-hint { text-align: center; color: var(--text-muted); padding: 20px; }

/* =========================================================
   Einzelansicht eines Beitrags
   ========================================================= */
.article { max-width: 780px; margin: 0 auto; }
.back-link {
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-block;
  margin-bottom: 26px;
}
.back-link:hover { color: var(--navy); }
.art-cat {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.art-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 8px; }
.art-date { color: var(--text-muted); margin-bottom: 0; }
.art-lead { color: var(--text-muted); font-size: 1.15rem; margin: 0.6rem 0 1.2rem; }
.art-body { font-size: 1.14rem; color: #2a3050; }
.art-body h2 { margin: 1.8rem 0 0.8rem; }
.art-body h3 { margin: 1.5rem 0 0.7rem; color: var(--gold); }
.art-body p { margin-bottom: 1.1rem; }
.art-body ul, .art-body ol { margin: 0 0 1.1rem 1.4rem; }
.art-body li { margin-bottom: 0.4rem; }
.art-body a { color: var(--gold); text-decoration: underline; }
.art-body blockquote {
  border-left: 3px solid var(--gold);
  margin: 1.4rem 0;
  padding: 6px 0 6px 20px;
  color: var(--text-muted);
  font-style: italic;
}
.art-body blockquote + blockquote { margin-top: 0; padding-top: 0; }
.art-files { margin-top: 40px; }
.art-files h3 { margin-bottom: 14px; }
.attach {
  display: flex;
  flex-direction: column;
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s, transform 0.2s;
}
.attach:hover { border-color: var(--gold); transform: translateY(-2px); }
.attach-icon { font-size: 1.4rem; color: var(--gold); }
.attach-name { font-size: 1.08rem; color: var(--navy); font-weight: 500; }
.attach-size { font-size: 0.88rem; color: var(--text-muted); }
.art-tg { margin-top: 30px; }

/* =========================================================
   Admin / Login / Editor
   ========================================================= */
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-logo {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  padding: 3px;
  background: var(--cream);
}
.login-note { color: var(--text-muted); font-size: 1rem; margin-bottom: 20px; }
.login-card input[type="email"],
.login-card input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  margin-bottom: 14px;
  background: var(--cream);
  color: var(--navy);
}
.login-card input[type="email"]:focus,
.login-card input[type="password"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(181, 137, 59, 0.15);
}
.login-error { color: #a8323a; font-size: 0.95rem; margin-top: 12px; }

.admin-wrap { max-width: 1180px; }
.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 30px;
}
.admin-head-actions { display: flex; gap: 12px; }
.admin-head .btn { padding: 10px 18px; }

.admin-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 28px;
  align-items: start;
}
.editor-panel, .list-panel {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 30px;
}
.editor-panel > h3, .list-panel > h3 { margin-bottom: 18px; }

.fld { display: block; margin-bottom: 18px; }
.fld > span {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 7px;
}
.fld > span small { text-transform: none; letter-spacing: 0; color: var(--text-muted); font-size: 0.8rem; }
.fld input[type="text"], .fld input[type="url"], .fld select, .fld textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: 'EB Garamond', serif;
  font-size: 1.05rem;
  background: var(--cream);
  color: var(--navy);
}
.fld textarea { resize: vertical; }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fld.checkbox { display: flex; align-items: center; gap: 10px; }
.fld.checkbox span { margin: 0; text-transform: none; letter-spacing: 0; font-family: 'EB Garamond', serif; font-size: 1.02rem; color: var(--navy); }
.fld.checkbox small { color: var(--text-muted); }

/* Kategorien-Mehrfachauswahl (Checkboxen) */
.cat-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.cat-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--cream);
  cursor: pointer;
  font-size: 0.98rem;
  transition: all 0.15s;
}
.cat-check:hover { border-color: var(--gold); }
.cat-check input { accent-color: var(--navy); cursor: pointer; }
.cat-check:has(input:checked) {
  background: var(--navy);
  color: var(--cream);
  border-color: var(--navy);
}

/* Kategorie-Verwaltung */
.cat-manage { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 20px; }
.cat-manage-hint { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 14px; }
.cat-manage-list { display: flex; flex-direction: column; gap: 8px; }
.cat-manage-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
}
.cm-name { flex: 1; color: var(--navy); }
.cm-count {
  font-family: 'EB Garamond', serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 9px;
}

.newcat { display: flex; gap: 8px; }
.newcat input { flex: 1; }
.btn-mini {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--navy);
  background: transparent;
  color: var(--navy);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.btn-mini:hover { background: var(--navy); color: var(--cream); }
.btn-mini.danger { border-color: #a8323a; color: #a8323a; }
.btn-mini.danger:hover { background: #a8323a; color: #fff; }

/* Editor */
.editor { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--cream); }
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: var(--cream-soft);
  border-bottom: 1px solid var(--line);
}
.editor-toolbar button {
  font-family: 'EB Garamond', serif;
  font-size: 0.92rem;
  min-width: 34px;
  padding: 6px 9px;
  border: 1px solid transparent;
  background: var(--cream-card);
  color: var(--navy);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
}
.editor-toolbar button:hover { border-color: var(--gold); }
.editor-toolbar button.active { background: var(--navy); color: var(--cream); }
.tb-sep { width: 1px; background: var(--line); margin: 2px 4px; }
.editor-area {
  min-height: 260px;
  padding: 16px 18px;
  font-size: 1.08rem;
  line-height: 1.7;
  color: #2a3050;
  outline: none;
}
.editor-area:empty::before { content: attr(data-placeholder); color: #9a9686; }
.editor-area h2 { font-size: 1.5rem; margin: 1rem 0 0.6rem; }
.editor-area h3 { font-size: 1.2rem; margin: 0.9rem 0 0.5rem; color: var(--gold); }
.editor-area blockquote {
  border-left: 3px solid var(--gold);
  margin: 1rem 0; padding-left: 16px; color: var(--text-muted); font-style: italic;
}
.editor-area ul, .editor-area ol { margin-left: 1.4rem; }
.editor-area a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  background: rgba(181, 137, 59, 0.10);
  border-radius: 3px;
  padding: 0 2px;
}

/* ---- Quill-Editor an das Design anpassen ---- */
.ql-toolbar.ql-snow,
.ql-container.ql-snow { border-color: var(--line); }
.ql-toolbar.ql-snow {
  background: var(--cream-soft);
  border-radius: 10px 10px 0 0;
  padding: 9px 10px;
}
.ql-container.ql-snow {
  border-radius: 0 0 10px 10px;
  background: var(--cream);
  font-family: 'EB Garamond', Georgia, serif;
}
.ql-editor {
  min-height: 300px;
  font-size: 1.1rem;
  line-height: 1.75;
  color: #2a3050;
  padding: 18px 20px;
}
.ql-editor.ql-blank::before {
  color: #9a9686;
  font-style: normal;
  font-family: 'EB Garamond', serif;
  left: 20px;
}
.ql-editor h2 { font-family: 'Cinzel', serif; font-size: 1.5rem; color: var(--navy); margin: 0.8rem 0 0.5rem; }
.ql-editor h3 { font-family: 'Cinzel', serif; font-size: 1.2rem; color: var(--gold); margin: 0.7rem 0 0.4rem; }
.ql-editor blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 16px;
  margin: 0;                 /* aufeinanderfolgende Zitatzeilen ohne Lücke */
  color: var(--text-muted);
  font-style: italic;
}
.ql-editor a { color: var(--gold); text-decoration: underline; }

/* Toolbar-Icons in den Markenfarben */
.ql-snow .ql-stroke { stroke: var(--navy); }
.ql-snow .ql-fill { fill: var(--navy); }
.ql-snow .ql-picker { color: var(--navy); }
.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke,
.ql-snow .ql-toolbar button:hover .ql-stroke { stroke: var(--gold); }
.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--gold); }
.ql-snow.ql-toolbar button.ql-active,
.ql-snow.ql-toolbar button:hover { color: var(--gold); }
.ql-snow .ql-picker.ql-expanded .ql-picker-label { border-color: var(--line); }
.ql-snow .ql-picker-options { background: var(--cream-card); border-color: var(--line); }

/* Deutsche Beschriftung der Überschriften-Auswahl */
.ql-snow .ql-picker.ql-header { width: 168px; }
.ql-snow .ql-picker.ql-header .ql-picker-label::before,
.ql-snow .ql-picker.ql-header .ql-picker-item::before { content: 'Normaler Text'; }
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { content: 'Überschrift'; }
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { content: 'Zwischenüberschrift'; }

/* Deutsche Beschriftung des Link-Tooltips */
.ql-snow .ql-tooltip::before { content: "Link-Adresse:"; }
.ql-snow .ql-tooltip[data-mode=link]::before { content: "Link eingeben:"; }
.ql-snow .ql-tooltip a.ql-action::after { content: 'Bearbeiten'; }
.ql-snow .ql-tooltip a.ql-remove::before { content: 'Entfernen'; }
.ql-snow .ql-tooltip.ql-editing a.ql-action::after { content: 'Speichern'; }
.ql-snow .ql-tooltip input[type=text] { font-family: 'EB Garamond', serif; }

.editor-fallback {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 22px;
  color: #a8323a;
  background: var(--cream);
  text-align: center;
}

.file-list { list-style: none; margin-top: 10px; }
.file-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--cream);
}
.fl-icon { color: var(--gold); }
.fl-name { flex: 1; font-size: 1rem; }
.fl-size { font-size: 0.85rem; color: var(--text-muted); }
.fl-remove {
  border: none; background: none; color: #a8323a; font-size: 1.3rem;
  cursor: pointer; line-height: 1; padding: 0 4px;
}

.editor-actions { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.save-msg { font-size: 0.98rem; color: var(--gold); }
.save-msg.error { color: #a8323a; }

.list-panel .count {
  font-family: 'EB Garamond', serif;
  font-size: 0.9rem;
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 10px;
  color: var(--text-muted);
}
.post-admin-list { display: flex; flex-direction: column; gap: 12px; }
.pa-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
}
.pa-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pa-cat {
  font-family: 'Cinzel', serif; font-size: 0.62rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold);
}
.pa-title { font-size: 1.08rem; color: var(--navy); }
.pa-meta { font-size: 0.85rem; color: var(--text-muted); }
.pa-actions { display: flex; gap: 6px; flex-shrink: 0; }
.pa-actions .btn-mini { padding: 6px 11px; font-size: 0.64rem; }

.local-note {
  margin-top: 30px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: var(--cream-soft);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 14px 18px;
}

/* Vorschau-Overlay */
.preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--cream);
  display: flex;
  flex-direction: column;
}
.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 24px;
  background: var(--navy);
  color: var(--cream);
  box-shadow: 0 2px 14px rgba(22,36,79,0.25);
}
.preview-label {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.preview-label small {
  font-family: 'EB Garamond', serif;
  text-transform: none;
  letter-spacing: 0;
  color: var(--cream);
  opacity: 0.8;
  font-size: 0.92rem;
}
.preview-actions { display: flex; gap: 12px; }
.preview-bar .btn { padding: 10px 20px; }
.preview-bar .btn-ghost { color: var(--cream); border-color: rgba(244,239,225,0.45); }
.preview-bar .btn-ghost:hover { background: var(--cream); color: var(--navy); }
.preview-scroll { flex: 1; overflow-y: auto; padding: 44px 0 80px; }

@media (max-width: 860px) {
  .admin-grid { grid-template-columns: 1fr; }
  .fld-row { grid-template-columns: 1fr; }
  .preview-bar { justify-content: center; }
}
