/* ============================================================
   Alchimist Wiki — Style v2
   Dark alchemy theme, aligned with alchimist-sotw.de/game/
   ============================================================ */

/* FONTS (shared with /game/) */
@font-face{font-family:'Lora';font-style:normal;font-weight:400;font-display:swap;src:url(/game/fonts/lora-400.woff2) format('woff2')}
@font-face{font-family:'Lora';font-style:normal;font-weight:500;font-display:swap;src:url(/game/fonts/lora-500.woff2) format('woff2')}
@font-face{font-family:'Lora';font-style:normal;font-weight:600;font-display:swap;src:url(/game/fonts/lora-600.woff2) format('woff2')}
@font-face{font-family:'Lora';font-style:italic;font-weight:400;font-display:swap;src:url(/game/fonts/lora-400i.woff2) format('woff2')}
@font-face{font-family:'Outfit';font-style:normal;font-weight:300;font-display:swap;src:url(/game/fonts/outfit-300.woff2) format('woff2')}
@font-face{font-family:'Outfit';font-style:normal;font-weight:400;font-display:swap;src:url(/game/fonts/outfit-400.woff2) format('woff2')}
@font-face{font-family:'Outfit';font-style:normal;font-weight:500;font-display:swap;src:url(/game/fonts/outfit-500.woff2) format('woff2')}
@font-face{font-family:'Outfit';font-style:normal;font-weight:600;font-display:swap;src:url(/game/fonts/outfit-600.woff2) format('woff2')}
@font-face{font-family:'Cinzel';font-style:normal;font-weight:400 700;font-display:swap;src:url(/game/fonts/cinzel-var.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+2000-206F,U+20AC,U+2122}
@font-face{font-family:'Cinzel';font-style:normal;font-weight:400 700;font-display:swap;src:url(/game/fonts/cinzel-var-ext.woff2) format('woff2');unicode-range:U+0100-02BA,U+1E00-1E9F,U+1EF2-1EFF}

:root {
  /* palette — identical to /game/ */
  --bg: #14100D;
  --bg-alt: #1A150F;
  --bg-card: #20190F;
  --bg-elev: #251D12;
  --ink: #ECE3D3;
  --ink-soft: #C9BCA6;
  --ink-muted: #9C8C76;
  --ink-dim: #6D6152;
  --accent: #D0982F;
  --accent-bright: #E6B34A;
  --accent-hover: #B8842A;
  --accent-soft: rgba(208,152,47,0.12);
  --emerald: #5FA98C;
  --border: rgba(236,227,211,0.09);
  --border-hover: rgba(236,227,211,0.20);

  /* legacy aliases (keep old rules working) */
  --bg-dark: var(--bg);
  --bg-darker: #100D0A;
  --bg-light: var(--bg-card);
  --bg-hover: var(--bg-elev);
  --gold: var(--accent);
  --gold-light: var(--accent-bright);
  --gold-dark: var(--accent-hover);
  --text-primary: var(--ink);
  --text-secondary: var(--ink-soft);
  --text-muted: var(--ink-muted);
  --border-color: var(--border);
  --border-gold: linear-gradient(90deg, transparent, var(--accent), transparent);

  --shadow: 0 4px 14px rgba(0,0,0,0.45);
  --shadow-lg: 0 12px 34px rgba(0,0,0,0.6);

  --font-heading: 'Cinzel', 'Lora', Georgia, serif;
  --font-display: 'Cinzel', 'Lora', Georgia, serif;
  --font-serif: 'Lora', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;

  --sidebar-width: 268px;
  --transition: all 0.25s ease;
}

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

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle alchemical vignette */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1200px 500px at 15% -10%, rgba(208,152,47,0.05), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(95,169,140,0.04), transparent 60%);
}

::selection { background: rgba(208,152,47,0.35); color: var(--ink); }

/* keep Chrome autofill on-theme */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 100px var(--bg-alt) inset;
  caret-color: var(--ink);
  transition: background-color 9999s ease-in-out 0s;
}
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ============================================================
   Header
   ============================================================ */
.main-header {
  background: rgba(20,16,13,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 22px;
  gap: 20px;
}

.logo-link { display: block; flex-shrink: 0; }

.logo {
  height: 42px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  transition: var(--transition);
}
.logo-link:hover .logo { filter: drop-shadow(0 2px 10px rgba(208,152,47,0.35)); }

/* Search */
.header-search {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

#searchInput {
  width: 100%;
  padding: 9px 38px 9px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 22px;
  outline: none;
  transition: var(--transition);
}

#searchInput:focus {
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 18px rgba(208,152,47,0.12);
}

#searchInput::placeholder { color: var(--ink-dim); }

.search-icon {
  position: absolute;
  right: 34px;
  font-size: 12px;
  color: var(--ink-dim);
  pointer-events: none;
}

.clear-search {
  position: absolute;
  right: 12px;
  font-size: 18px;
  color: var(--ink-muted);
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
}
.clear-search.visible { opacity: 1; }
.clear-search:hover { color: var(--accent-bright); }

/* Search results */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  margin-top: 8px;
  max-height: 360px;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 500;
}
.search-results.visible { display: block; }

.search-result-item {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto auto;
  align-items: center;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  gap: 15px;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover,
.search-result-item.selected { background: var(--accent-soft); }

.result-title {
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-title mark { background: transparent; color: var(--accent-bright); font-weight: 600; }

.result-biomes { display: flex; gap: 4px; min-width: 140px; justify-content: flex-start; }
.result-biomes:empty { min-width: 0; }

.result-biome-badge {
  display: inline-flex;
  align-items: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 11px;
}
.result-biome-badge mark { background: transparent; color: var(--accent-bright); font-weight: 600; }

.result-category,
.result-count {
  color: var(--ink-dim);
  font-size: 12px;
  white-space: nowrap;
  min-width: 100px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.search-divider {
  padding: 6px 16px;
  font-size: 10.5px;
  color: var(--accent);
  background: var(--bg-alt);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-family: var(--font-body);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.filter-suggestion { background: rgba(208,152,47,0.05); }
.filter-suggestion:hover { background: var(--accent-soft); }
.filter-suggestion .filter-icon { font-size: 14px; margin-right: 6px; }

.search-no-results {
  padding: 16px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 14px;
}

/* Filter */
.filter-dropdown { position: relative; }

.filter-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 13px;
  font-size: 14px;
  color: var(--ink-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 22px;
  cursor: pointer;
  transition: var(--transition);
}
.filter-btn:hover,
.filter-btn.active { border-color: var(--accent); color: var(--accent-bright); }

.filter-btn .arrow { font-size: 10px; transition: transform 0.2s; }
.filter-btn.active .arrow { transform: rotate(180deg); }

.filter-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: 12px;
  padding: 14px;
  margin-top: 8px;
  min-width: 290px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 500;
}
.filter-menu.visible { display: block; }

.filter-section { margin-bottom: 12px; }
.filter-section:last-of-type { margin-bottom: 14px; }

.filter-section-title {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 10.5px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 7px;
}

.filter-options { display: flex; flex-wrap: wrap; gap: 5px; }

.filter-options label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: var(--transition);
}
.filter-options label:hover { border-color: var(--border-hover); color: var(--ink); }
.filter-options input[type="checkbox"] { width: 12px; height: 12px; accent-color: var(--accent); }
.filter-options label:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-bright);
}

.filter-reset {
  width: 100%;
  padding: 7px 12px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}
.filter-reset:hover { color: var(--ink); border-color: var(--border-hover); }

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13.5px;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 8px 12px;
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.nav-link:hover { color: var(--accent-bright); }

.nav-dropdown { position: relative; }

.dropdown-trigger { display: flex; align-items: center; gap: 4px; }
.dropdown-trigger .arrow { font-size: 8px; transition: transform 0.2s; }
.nav-dropdown:hover .arrow { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border-hover);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 190px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 1000;
  overflow: hidden;
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--ink-soft);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 13.5px;
  transition: all 0.15s;
}
.dropdown-menu a:hover {
  background: var(--accent-soft);
  color: var(--accent-bright);
  padding-left: 20px;
}

.lang-menu { min-width: 130px; }

.header-line {
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(208,152,47,0.55), transparent 95%);
}

/* ============================================================
   Tabs
   ============================================================ */
.tabs-container {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 5;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 4px 15px 0;
  overflow-x: auto;
}

.tab {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12.5px;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  padding: 11px 18px 13px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
  letter-spacing: 0.06em;
}
.tab:hover { color: var(--ink-soft); }
.tab.active { color: var(--accent-bright); }

.tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 65%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-bright), transparent);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(208,152,47,0.5);
}

/* ============================================================
   Main Container
   ============================================================ */
.main-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}

.categories { padding: 12px 10px; }

.category-item { margin-bottom: 2px; }

.category-header {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  cursor: pointer;
  border-radius: 8px;
  transition: var(--transition);
  gap: 8px;
}
.category-header:hover { background: var(--bg-elev); color: var(--ink); }
.category-header.active {
  background: linear-gradient(90deg, var(--accent-soft), transparent);
  color: var(--accent-bright);
}

.category-arrow {
  font-size: 10px;
  color: var(--accent);
  transition: transform 0.2s;
}
.category-item.open > .category-header .category-arrow { transform: rotate(90deg); }

.category-posts {
  display: none;
  padding: 2px 0 4px 14px;
  margin-left: 12px;
  border-left: 1px solid var(--border);
}
.category-item.open > .category-posts { display: block; }

.post-item {
  padding: 6px 10px;
  color: var(--ink-muted);
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition);
  border-left: 2px solid transparent;
  margin: 1px 0;
}
.post-item:hover { background: var(--bg-elev); color: var(--ink-soft); }
.post-item.active {
  background: var(--accent-soft);
  color: var(--accent-bright);
  border-left-color: var(--accent);
}

/* ============================================================
   Content
   ============================================================ */
.content {
  flex: 1;
  padding: 26px 36px;
  overflow-y: auto;
  background: var(--bg);
}

.content-header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

#contentTitle {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 27px;
  color: var(--accent-bright);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  text-shadow: 0 2px 18px rgba(208,152,47,0.18);
}

.breadcrumb { font-size: 12.5px; color: var(--ink-dim); }
.breadcrumb span { margin: 0 7px; color: var(--accent); }
.breadcrumb a { color: var(--ink-muted); text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--accent-bright); }

/* Welcome */
.welcome-text {
  font-family: var(--font-serif);
  font-size: 16.5px;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.welcome-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

.welcome-info h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--accent-bright);
  margin-bottom: 12px;
}

.welcome-info ul { list-style: none; }

.welcome-info li {
  padding: 5px 0 5px 18px;
  position: relative;
  color: var(--ink-soft);
  font-size: 14.5px;
}
.welcome-info li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 8px;
  top: 10px;
}

/* ============================================================
   Spawn Box
   ============================================================ */
.spawn-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--emerald);
  border-radius: 10px;
  padding: 11px 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

.spawn-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 10.5px;
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

.spawn-divider { color: var(--border-hover); font-size: 14px; }

.spawn-item { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.spawn-item-label { color: var(--ink-dim); }
.spawn-item-value { color: var(--ink); }

.spawn-tag {
  display: inline-block;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  margin: 1px;
}
.spawn-tag:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-bright);
}

.spawn-sun { display: flex; align-items: center; gap: 4px; }
.spawn-sun-icon { font-size: 14px; }

/* ============================================================
   Content Tables
   ============================================================ */
.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}

.content-body th,
.content-body td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.content-body th {
  background: var(--bg-elev);
  color: var(--accent);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
}

.content-body tr:last-child td { border-bottom: none; }
.content-body tr:hover td { background: rgba(208,152,47,0.045); }

.content-description {
  font-family: var(--font-serif);
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.75;
  margin-top: 16px;
  max-width: 860px;
}
.content-description p { margin-bottom: 13px; }

.intra-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.15s;
}
.intra-link:hover { color: var(--accent-bright); text-decoration-style: solid; }

/* ============================================================
   Footer
   ============================================================ */
.main-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 22px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 2;
}

.footer-links { display: flex; align-items: center; gap: 3px; }

.footer-links a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 12.5px;
  padding: 4px 8px;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--accent-bright); }
.footer-links .divider { color: var(--border-hover); font-size: 12px; }

.trim-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-dim);
  cursor: pointer;
}
.trim-toggle input { accent-color: var(--accent); }

/* ============================================================
   Modal
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(10,8,6,0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.modal.visible { display: flex; }

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  max-height: 70vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.04em;
  color: var(--accent-bright);
}

.modal-close {
  font-size: 24px;
  color: var(--ink-muted);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--accent-bright); }

.modal-body {
  padding: 22px;
  overflow-y: auto;
  max-height: calc(70vh - 60px);
}

.modal-body section { margin-bottom: 20px; }
.modal-body section:last-child { margin-bottom: 0; }

.modal-body h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 8px;
}

.modal-body p { color: var(--ink-soft); font-size: 14px; margin-bottom: 8px; }

/* ============================================================
   Scrollbar
   ============================================================ */
html { scrollbar-color: var(--accent-hover) var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: #3a2f1e;
  border-radius: 6px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

/* ============================================================
   Category Overview Table
   ============================================================ */
.category-overview-info {
  color: var(--ink-muted);
  font-size: 14px;
  margin-bottom: 15px;
}

.overview-table-wrapper {
  overflow-x: auto;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.overview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  background: var(--bg-card);
}

.overview-table th,
.overview-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.overview-table th {
  background: var(--bg-elev);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

.overview-table tbody tr { transition: background 0.15s; }
.overview-table tbody tr:hover { background: rgba(208,152,47,0.05); }
.overview-table tbody tr:last-child td { border-bottom: none; }
.overview-table td:first-child { font-weight: 500; }

.overview-link {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(208,152,47,0.4);
  text-underline-offset: 3px;
  transition: all 0.15s;
}
.overview-link:hover { color: var(--accent-bright); text-decoration-color: var(--accent-bright); }

/* ============================================================
   Responsive - Tablet
   ============================================================ */
@media (max-width: 900px) {
  .header-content { flex-wrap: wrap; padding: 8px 15px; }
  .header-search { order: 3; max-width: 100%; width: 100%; margin-top: 8px; }
  .logo { height: 32px; }
  .sidebar { width: 210px; min-width: 210px; }
}

/* ============================================================
   Responsive - Mobile
   ============================================================ */
@media (max-width: 600px) {
  .logo-link { display: none; }
  .header-content { padding: 8px 10px; }
  .main-nav { gap: 2px; }
  .nav-link { padding: 6px 8px; font-size: 12px; }
  .nav-dropdown:not(.lang-dropdown) { display: none; }
  .tabs-container { display: none; }

  .mobile-sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 12px 15px;
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .mobile-sidebar-toggle .toggle-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.04em;
    color: var(--accent-bright);
  }

  .mobile-sidebar-toggle .toggle-arrow {
    font-size: 12px;
    color: var(--ink-muted);
    transition: transform 0.3s;
  }
  .mobile-sidebar-toggle.collapsed .toggle-arrow { transform: rotate(-90deg); }

  .main-container { flex-direction: column; }

  .sidebar {
    width: 100%;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .sidebar.collapsed { max-height: 0; border-bottom: none; }
  .sidebar.collapsed .categories { display: none; }

  .mobile-super-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }

  .mobile-super-tab {
    padding: 6px 13px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
  }
  .mobile-super-tab.active {
    color: var(--accent-bright);
    border-color: var(--accent);
    background: var(--accent-soft);
  }

  .content { padding: 16px; }
  .content-header h1 { font-size: 21px; }

  .spawn-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
  }
  .spawn-divider { display: none; }
  .spawn-tags { flex-wrap: wrap; }

  .content-table,
  .overview-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .content-table table,
  .overview-table { min-width: 600px; }

  .post-image-container { margin-bottom: 15px; }

  .admin-bar { flex-direction: column; gap: 10px; padding: 10px; }
  .admin-actions { flex-wrap: wrap; justify-content: center; }

  .search-results { max-height: 50vh; }
  .search-result-item { padding: 10px 12px; }

  .main-footer { flex-direction: column; gap: 10px; padding: 15px; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

@media (min-width: 601px) {
  .mobile-sidebar-toggle { display: none; }
  .mobile-super-tabs { display: none; }
}

/* ============================================================
   Admin Mode
   ============================================================ */
.admin-btn { opacity: 0.45; transition: opacity 0.2s; }
.admin-btn:hover { opacity: 1; }
body.admin-mode .admin-btn { opacity: 1; color: var(--accent-bright); }

.admin-bar {
  display: none;
  background: linear-gradient(90deg, #241a0c, #2e2110);
  padding: 8px 22px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(208,152,47,0.35);
}
body.admin-mode .admin-bar { display: flex; }

.admin-indicator {
  color: var(--accent-bright);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1.2px;
}

.admin-actions { display: flex; gap: 8px; }

.admin-action {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 13px;
  cursor: pointer;
  transition: var(--transition);
}
.admin-action:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-bright);
}

.admin-action.logout { color: #e07b6a; border-color: rgba(224,123,106,0.4); }
.admin-action.logout:hover { background: rgba(224,123,106,0.15); border-color: #e07b6a; }

.admin-post-actions { display: none; gap: 8px; margin-top: 10px; }
body.admin-mode .admin-post-actions { display: flex; }

.admin-post-btn {
  font-size: 12px;
  color: var(--ink-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 11px;
  cursor: pointer;
  transition: var(--transition);
}
.admin-post-btn:hover { color: var(--ink); border-color: var(--border-hover); }

body.admin-mode .editable { cursor: pointer; position: relative; transition: background 0.2s; }
body.admin-mode .editable:hover { background: var(--accent-soft); outline: 1px dashed var(--accent); }
body.admin-mode .editable:focus { background: rgba(208,152,47,0.2); outline: 2px solid var(--accent); }
body.admin-mode .content-body td { cursor: pointer; }
body.admin-mode .content-body td:hover { background: rgba(208,152,47,0.13); }

.inline-edit {
  background: var(--bg-alt);
  border: 2px solid var(--accent);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: inherit;
  padding: 4px 8px;
  border-radius: 6px;
  width: 100%;
  min-width: 60px;
}
.inline-edit:focus { outline: none; }

/* ============================================================
   Post Image
   ============================================================ */
.post-image-container {
  text-align: left;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.post-image {
  border-radius: 14px;
  border: 1px solid var(--border-hover);
  background:
    radial-gradient(ellipse at 50% 38%, rgba(208,152,47,0.10), transparent 72%),
    linear-gradient(160deg, var(--bg-elev), var(--bg-card) 70%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(236,227,211,0.06);
  display: block;
  padding: 6px;
  transition: var(--transition);
}
.post-image:hover {
  border-color: rgba(208,152,47,0.45);
  box-shadow: 0 6px 22px rgba(0,0,0,0.5), 0 0 24px rgba(208,152,47,0.10);
}

.post-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 2px dashed var(--border-hover);
  border-radius: 14px;
  color: var(--ink-dim);
  font-size: 48px;
}

.image-actions {
  display: none;
  margin-top: 8px;
  gap: 8px;
  justify-content: flex-start;
}
body.admin-mode .image-actions { display: flex; }

.image-action-btn {
  font-size: 10px;
  padding: 3px 9px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink-muted);
  cursor: pointer;
  transition: var(--transition);
}
.image-action-btn:hover { border-color: var(--accent); color: var(--accent-bright); }

.image-size-select {
  font-size: 10px;
  padding: 2px 4px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink-muted);
}

/* Draggable */
body.admin-mode .category-item,
body.admin-mode .post-item { cursor: grab; }
body.admin-mode .category-item.dragging,
body.admin-mode .post-item.dragging { opacity: 0.5; cursor: grabbing; }
.drag-over { border-top: 2px solid var(--accent) !important; }

/* Modal forms */
.modal-small { max-width: 400px; }

.login-form { display: flex; flex-direction: column; gap: 12px; }

.login-form input {
  padding: 12px 16px;
  font-size: 14px;
  font-family: var(--font-body);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--ink);
  transition: var(--transition);
}
.login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.login-error { color: #e07b6a; font-size: 13px; min-height: 20px; }

.btn-primary {
  padding: 12px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: #14100D;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 12px rgba(208,152,47,0.25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #F0C05C, var(--accent-bright));
  box-shadow: 0 4px 18px rgba(208,152,47,0.4);
  transform: translateY(-1px);
}

.form-group { margin-bottom: 15px; }

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}

.form-group input[type="text"],
.form-group select {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--ink);
  transition: var(--transition);
}
.form-group input[type="text"]:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-group input[type="checkbox"] { width: auto; margin-right: 8px; accent-color: var(--accent); }
.form-group select { cursor: pointer; }

/* History */
.history-list { max-height: 400px; overflow-y: auto; }

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.history-item:last-child { border-bottom: none; }

.history-info { flex: 1; }
.history-action { font-weight: 600; color: var(--ink); font-size: 13px; }
.history-description { color: var(--ink-muted); font-size: 12px; }
.history-time { color: var(--ink-dim); font-size: 11px; }

.history-undo {
  font-size: 11px;
  padding: 4px 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink-muted);
  cursor: pointer;
  transition: var(--transition);
}
.history-undo:hover { border-color: var(--accent); color: var(--accent-bright); }

/* Save Indicator */
.save-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #14100D;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  z-index: 1000;
  box-shadow: 0 4px 18px rgba(208,152,47,0.35);
}
.save-indicator.visible { opacity: 1; transform: translateY(0); }
.save-indicator.error { background: #c0392b; color: #fff; box-shadow: 0 4px 18px rgba(192,57,43,0.4); }

/* Editable Description */
.editable-description {
  cursor: pointer;
  min-height: 60px;
  padding: 10px;
  border-radius: 10px;
  transition: background 0.2s;
}
body.admin-mode .editable-description:hover {
  background: var(--accent-soft);
  outline: 1px dashed var(--accent);
}

.edit-placeholder { color: var(--ink-dim); font-style: italic; opacity: 0.7; }

.description-edit {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg-alt);
  border: 2px solid var(--accent);
  border-radius: 10px;
  color: var(--ink);
  resize: vertical;
}
.description-edit:focus { outline: none; }
.description-edit::placeholder { color: var(--ink-dim); }

/* Content Table Wrapper */
.content-table {
  margin-bottom: 20px;
  overflow-x: auto;
  border-radius: 12px;
}

/* ============================================================
   v3 polish — animations, post nav, overview icons
   ============================================================ */

/* content fade-in on every view switch */
@keyframes contentFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.content-body { animation: contentFade 0.28s ease both; }

/* ornament under the page title */
#contentTitle { position: relative; padding-bottom: 10px; }
#contentTitle::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 150px; height: 2px;
  background: linear-gradient(90deg, var(--accent-bright), rgba(208,152,47,0.25) 70%, transparent);
  border-radius: 2px;
}

/* Prev/Next post navigation */
.post-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.post-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 42%;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--ink-soft);
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition);
  text-align: left;
}
.post-nav-btn.next { text-align: right; }
.post-nav-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.35), 0 0 14px rgba(208,152,47,0.08);
}
.post-nav-btn:disabled { opacity: 0.28; cursor: default; }

.pn-arrow {
  font-size: 24px;
  line-height: 1;
  color: var(--accent-bright);
  font-family: var(--font-serif);
}

.pn-text { display: flex; flex-direction: column; min-width: 0; }
.pn-hint {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--ink-dim);
}
.pn-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.post-nav-btn:hover:not(:disabled) .pn-title { color: var(--accent-bright); }

.post-nav-pos {
  font-size: 11.5px;
  color: var(--ink-dim);
  letter-spacing: 0.08em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Overview table icons */
.ov-icon-th { width: 46px; }
.ov-icon-cell { width: 46px; padding: 4px 6px 4px 12px !important; }
.ov-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  background: radial-gradient(ellipse at 50% 40%, rgba(208,152,47,0.10), transparent 75%), var(--bg-elev);
  border: 1px solid var(--border);
  padding: 2px;
  transition: transform 0.15s ease;
}
.overview-table tbody tr:hover .ov-icon { transform: scale(1.5); }

/* Overview zebra + row polish */
.overview-table tbody tr:nth-child(even) { background: rgba(236,227,211,0.018); }
.overview-table tbody tr { cursor: default; }
.overview-table td { vertical-align: middle; }

/* mobile: hide verbose nav labels */
@media (max-width: 600px) {
  .pn-hint { display: none; }
  .pn-title { max-width: 90px; font-size: 12px; }
  .post-nav-btn { padding: 7px 10px; }
}

/* ============================================================
   Supercategory landing — category card grid
   ============================================================ */
.sc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 6px;
}

.sc-card {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(208,152,47,0.06), transparent 65%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 18px 16px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.sc-card::after {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(208,152,47,0.35), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.sc-card:hover {
  border-color: rgba(208,152,47,0.45);
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.45), 0 0 24px rgba(208,152,47,0.07);
}
.sc-card:hover::after { opacity: 1; }

.sc-card-icons {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  min-height: 44px;
  align-items: center;
}

.sc-card-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  background: radial-gradient(ellipse at 50% 40%, rgba(208,152,47,0.10), transparent 75%), var(--bg-elev);
  border: 1px solid var(--border);
  padding: 3px;
  transition: transform 0.2s ease;
}
.sc-card:hover .sc-card-icon { transform: translateY(-2px); }
.sc-card:hover .sc-card-icon:nth-child(2) { transition-delay: 0.03s; }
.sc-card:hover .sc-card-icon:nth-child(3) { transition-delay: 0.06s; }
.sc-card:hover .sc-card-icon:nth-child(4) { transition-delay: 0.09s; }

.sc-card-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 16.5px;
  color: var(--ink);
  margin-bottom: 2px;
  transition: color 0.2s;
}
.sc-card:hover .sc-card-name { color: var(--accent-bright); }

.sc-card-count {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--accent);
  margin-bottom: 8px;
}

.sc-card-desc {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 600px) {
  .sc-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .sc-card { padding: 13px; }
  .sc-card-icon { width: 36px; height: 36px; }
  .sc-card-desc { display: none; }
}

/* ============================================================
   Gruppierte Tabs mit Hover-Dropdown
   ============================================================ */
.tabs { overflow: visible; }
.tabs-container { position: relative; z-index: 90; }

.tab-group { position: relative; display: inline-block; }

.tab .tab-arrow {
  font-size: 9px;
  margin-left: 4px;
  opacity: 0.7;
  transition: transform 0.2s;
  display: inline-block;
}
.tab-group:hover .tab .tab-arrow { transform: rotate(180deg); }

.tab-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 185px;
  background: var(--bg-elev);
  border: 1px solid var(--border-hover);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 500;
}
.tab-group:hover .tab-menu,
.tab-group:focus-within .tab-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.tab-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink-soft);
  background: none;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
}
.tab-menu-item:hover {
  background: var(--accent-soft);
  color: var(--accent-bright);
  padding-left: 18px;
}
.tab-menu-item.active {
  color: var(--accent-bright);
  background: linear-gradient(90deg, var(--accent-soft), transparent);
}

/* ============================================================
   MOBILE v2 — Drawer-Navigation, kompakte Leisten
   (überschreibt die älteren 600px-Regeln)
   ============================================================ */
@media (max-width: 700px) {

  /* ---- Header kompakt & sticky ---- */
  .main-header { position: sticky; top: 0; z-index: 200; }
  .header-content { padding: 8px 12px; gap: 8px; flex-wrap: nowrap; }
  .logo-link { display: none; }
  .header-search { order: 0; margin-top: 0; flex: 1; min-width: 0; }
  #searchInput { padding: 8px 34px 8px 14px; font-size: 15px; }
  .main-nav { gap: 0; flex-shrink: 0; }
  .nav-link { padding: 6px 7px; font-size: 12px; }
  .nav-dropdown:not(.lang-dropdown) { display: none; }
  .tabs-container { display: none; }
  .search-results { right: 0; max-height: 60vh; }
  .result-biomes { display: none; }
  .search-result-item { grid-template-columns: 1fr auto; gap: 10px; }

  /* ---- Menü-Leiste (öffnet Drawer) ---- */
  .mobile-sidebar-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 11px 14px;
    cursor: pointer;
    position: sticky;
    top: 0;
    z-index: 150;
  }
  .mobile-sidebar-toggle::before {
    content: '';
    width: 17px; height: 12px;
    flex-shrink: 0;
    background:
      linear-gradient(var(--accent-bright), var(--accent-bright)) top/100% 2px no-repeat,
      linear-gradient(var(--accent-bright), var(--accent-bright)) center/100% 2px no-repeat,
      linear-gradient(var(--accent-bright), var(--accent-bright)) bottom/100% 2px no-repeat;
    transition: transform 0.25s;
  }
  .mobile-sidebar-toggle.open::before { transform: rotate(90deg); }
  .mobile-sidebar-toggle .toggle-title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
  }
  .mobile-sidebar-toggle .toggle-arrow { display: none; }

  /* ---- Sidebar als Drawer (schiebt Inhalt nicht mehr weg) ---- */
  /* z-index: auto hebt den Stacking-Context auf, sonst liegt das Backdrop ueber dem Drawer */
  .main-container { flex-direction: column; z-index: auto; }

  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 84%; max-width: 330px;
    max-height: none;
    z-index: 1200;
    background: var(--bg-alt);
    border-right: 1px solid var(--border-hover);
    border-bottom: none;
    box-shadow: 6px 0 34px rgba(0,0,0,0.6);
    transform: translateX(-102%);
    transition: transform 0.28s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .sidebar.open { transform: translateX(0); }
  /* alte collapsed-Regeln neutralisieren */
  .sidebar.collapsed { max-height: none; border-bottom: none; }
  .sidebar.collapsed .categories { display: block; }

  .drawer-backdrop {
    position: fixed; inset: 0; z-index: 1150;
    background: rgba(8,6,4,0.66);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0; visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
  }
  .drawer-backdrop.open { opacity: 1; visibility: visible; }
  body.drawer-open { overflow: hidden; }

  /* ---- Superkategorien: eine scrollbare Zeile statt Block ---- */
  .mobile-super-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 7px;
    padding: 12px 12px 11px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 5;
  }
  .mobile-super-tabs::-webkit-scrollbar { display: none; }
  .mobile-super-tab {
    padding: 7px 14px;
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 12.5px;
    letter-spacing: 0;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--ink-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition);
  }
  .mobile-super-tab.active {
    color: var(--accent-bright);
    border-color: var(--accent);
    background: var(--accent-soft);
  }

  /* ---- Kategorien im Drawer: größere Tap-Ziele ---- */
  .categories { padding: 8px 8px 26px; }
  .category-header { padding: 12px 12px; font-size: 14.5px; border-radius: 9px; }
  .category-posts { padding: 2px 0 6px 12px; margin-left: 14px; }
  .post-item { padding: 10px 12px; font-size: 14px; border-radius: 7px; }

  /* ---- Inhalt ---- */
  .content { padding: 16px 14px 30px; }
  #contentTitle { font-size: 22px; }
  .content-header { padding-bottom: 12px; margin-bottom: 14px; }
  .breadcrumb { font-size: 12px; }

  /* Kategorie-Karten kompakter */
  .sc-grid { grid-template-columns: 1fr; gap: 10px; }
  .sc-card { padding: 14px 16px; }
  .sc-card-icons { min-height: 40px; margin-bottom: 10px; }
  .sc-card-icon { width: 40px; height: 40px; }
  .sc-card-name { font-size: 16px; }
  .sc-card-desc { display: -webkit-box; -webkit-line-clamp: 2; font-size: 12.5px; }

  /* Übersichtstabelle: Icons kleiner */
  .ov-icon { width: 30px; height: 30px; }
  .ov-icon-th, .ov-icon-cell { width: 38px; }
  .ov-icon-cell { padding-left: 8px !important; }

  /* Post-Navigation */
  .post-nav { gap: 8px; margin-bottom: 14px; }
  .post-nav-btn { max-width: 44%; }

  .main-footer { flex-direction: column; gap: 8px; padding: 14px; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}

/* Desktop: Drawer-Reste sicher ausblenden */
@media (min-width: 701px) {
  .drawer-backdrop { display: none; }
  .mobile-sidebar-toggle { display: none; }
  .mobile-super-tabs { display: none; }
}

/* ============================================================
   Suchergebnisse: Titel darf nie kollabieren
   ============================================================ */
.result-title { min-width: 0; }

@media (max-width: 700px) {
  /* Dropdown auf volle Breite lösen (Suchfeld ist auf dem Handy zu schmal) */
  .search-results {
    position: fixed;
    left: 8px;
    right: 8px;
    top: 60px;
    margin-top: 0;
    max-height: 66vh;
  }

  /* Zweizeilig statt Spalten: Titel oben, Herkunft darunter */
  .search-result-item {
    display: block;
    padding: 11px 14px;
  }
  .result-title {
    display: block;
    white-space: normal;
    font-size: 15px;
    line-height: 1.35;
  }
  .result-category,
  .result-count {
    display: block;
    min-width: 0;
    max-width: none;
    text-align: left;
    white-space: normal;
    font-size: 11.5px;
    margin-top: 3px;
    color: var(--ink-dim);
  }
  .search-divider { padding: 7px 14px; }
}
