/* Style „RFT in rot“ (Starlight Red) – importiert aus rft-in-rot-style */
:root {
  --page-outer: #313131;
  --page-bg: #d8d8d8;
  --content-bg: #e2e2e2;
  --box-bg: #f2f2f2;
  --box-border: #cccccc;
  --ink: #666666;
  --ink-dark: #333333;
  --muted: #808080;
  --brand: #6d0101;
  --brand-dark: #430101;
  --brand-hover: #530000;
  --brand-btn: #9c0000;
  --brand-btn-end: #740101;
  --radius: 6px;
  --font: "Trebuchet MS", Arial, Helvetica, sans-serif;
  --width: 1400px; /* wie forum-rft-hifi.de (#main > div max-width) */
  --side-pad: 80px; /* wie layoutFluid padding */
  --img: url("../img/style/");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/*
 * Schriftstufen für das gesamte Forum:
 * Zoom skaliert Texte, Buttons, Abstände und UI gemeinsam.
 * Stufe 3 ist bewusst sehr groß (Sehhilfe / 70+).
 */
html {
  font-size: 14px;
  --ui-zoom: 1;
  --line-loose: 1.45;
}
html[data-font-size="1"] {
  --ui-zoom: 1;
  --line-loose: 1.45;
}
html[data-font-size="2"] {
  --ui-zoom: 1.35;
  --line-loose: 1.5;
}
html[data-font-size="3"] {
  --ui-zoom: 1.85;
  --line-loose: 1.65;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--page-outer);
  line-height: var(--line-loose, 1.45);
}

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

.page-frame {
  width: 100%;
  /* Zoom vergrößert das Layout → max-width anpassen, damit es im Viewport bleibt */
  max-width: min(100%, calc(var(--width) / var(--ui-zoom, 1)));
  margin: 0 auto;
  background: var(--page-bg);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.35);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  zoom: var(--ui-zoom, 1);
}
@supports not (zoom: 1) {
  html[data-font-size="2"] .page-frame,
  html[data-font-size="3"] .page-frame {
    transform: scale(var(--ui-zoom));
    transform-origin: top center;
    width: calc(100% / var(--ui-zoom));
    max-width: calc(min(100vw, var(--width)) / var(--ui-zoom));
  }
}

/* Äußerer Rahmen wie WBB layoutFluid: Abstand links/rechts auf breiten Screens */
@media (min-width: 1561px) {
  body {
    padding-left: var(--side-pad);
    padding-right: var(--side-pad);
  }
}

/* ----- Header (pageHeaderBG) ----- */
.site-header {
  position: relative;
  z-index: 20;
  min-height: 128px;
  background-color: #252525;
  background-image:
    url("../img/style/pageHeaderBG2.png"),
    url("../img/style/pageHeaderBG1.png");
  background-repeat: repeat-x, repeat;
  background-position: bottom, top;
  box-shadow: 0 3px 4px rgba(0, 0, 0, 0.3), inset 0 10px 10px rgba(0, 0, 0, 0.3);
}

.header-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 4px 16px 0;
  flex-wrap: wrap;
  min-height: 98px;
  width: 100%;
}

.brand-logo {
  display: block;
  line-height: 0;
  text-decoration: none;
  background-image:
    url("../img/style/stars.png"),
    url("../img/style/logoBG.png");
  background-repeat: no-repeat, no-repeat;
  background-position: center right, bottom left;
  background-size: auto 100%, auto;
  padding: 0 12px 4px 0;
  height: 90px; /* wie #logo im alten Style */
}
.brand-logo img {
  height: 90px;
  width: auto;
  max-width: min(596px, 100%);
  max-height: 90px;
  object-fit: contain;
  object-position: left bottom;
  display: block;
  position: relative;
  z-index: 1;
}
.brand-fallback {
  font-size: 2.1rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.02em;
  padding: 20px 0;
}
.brand-fallback span {
  color: #ffcccc;
}

.header-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  font-size: 13px;
  margin-bottom: 0;
}
.header-tools .user-line {
  background: linear-gradient(to bottom, #252525 25%, #353535 50%, #555 100%);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 4px rgba(0, 0, 0, 0.7);
  padding: 8px 14px;
  color: #ddd;
  min-width: 200px;
  text-align: right;
}
.header-tools .user-line a {
  color: #eee;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
}
.header-tools .user-line a:hover {
  color: #fff;
  text-decoration: none;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

.search-mini {
  display: flex;
  background: linear-gradient(to bottom, #430101 0%, #6d0101 100%);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow:
    inset 0 -4px 5px rgba(0, 0, 0, 0.3),
    -2px 0 4px rgba(0, 0, 0, 0.8),
    2px 0 4px rgba(0, 0, 0, 0.8),
    inset 1px 1px 1px rgba(255, 255, 255, 0.2);
  padding: 6px 10px;
  width: 260px;
  max-width: 100%;
}
.search-mini input {
  border: 1px solid rgba(0, 0, 0, 0.7);
  border-radius: 3px;
  padding: 5px 10px;
  flex: 1;
  font: inherit;
  color: var(--ink-dark);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: inset 1px 2px 4px rgba(0, 0, 0, 0.5);
  outline: none;
}
.search-mini input:hover,
.search-mini input:focus {
  background: rgba(255, 255, 255, 0.8);
}
.search-mini button {
  border: 0;
  background: transparent;
  color: #fff;
  padding: 0 4px 0 8px;
  cursor: pointer;
  font-size: 14px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.8);
}

/* ----- Hauptmenü ----- */
.main-nav {
  background: transparent;
  border-bottom: 0;
  padding: 0 16px 6px;
  width: 100%;
}
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.main-nav a {
  display: block;
  padding: 9px 21px;
  color: #eee;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  text-transform: none;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.35), 0 1px 2px rgba(0, 0, 0, 0.8);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  border-right: 1px solid rgba(0, 0, 0, 0.35);
  transition: text-shadow 0.2s, color 0.2s;
}
.main-nav li:first-child a {
  border-left: 0;
}
.main-nav a:hover {
  color: #fff;
  text-decoration: none;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5), 0 0 10px rgba(255, 255, 255, 0.8);
}
.main-nav a.is-active {
  color: #fff;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 65%);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5), 0 0 8px rgba(255, 255, 255, 0.7);
  font-size: 1.15em; /* wie altes Forum (.active 1.2rem) */
}

/* ----- Inhalt ----- */
main.wrap {
  flex: 1;
  width: 100%;
  padding: 15px;
  background-color: var(--content-bg);
  background-image: url("../img/style/stars2.png");
  background-repeat: repeat;
  background-position: center right;
  border-left: 1px solid rgba(0, 0, 0, 0.2);
  border-right: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.5), inset -1px 0 0 rgba(255, 255, 255, 0.5);
  min-height: 350px;
}

.hero-bar {
  margin: 0 0 12px;
  padding: 10px 14px;
  background: linear-gradient(to bottom, #4674a4, #304d77);
  color: #fff;
  border-radius: 7px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), inset 0 0 1px rgba(0, 0, 0, 0.2);
  border: 0;
}
.hero-bar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.hero-bar h1 {
  margin: 0;
  font-size: 1.35rem;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.hero-bar p {
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
}
.display-prefs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 5px;
  padding: 3px 6px;
}
.display-prefs-header {
  margin-bottom: 6px;
  align-self: flex-end;
}
.header-tools .display-prefs-header {
  background: linear-gradient(to bottom, #3a3a3a, #252525);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.display-prefs-label {
  font-size: 11px;
  font-weight: 700;
  margin-right: 2px;
  opacity: 0.9;
}
.display-prefs-sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.35);
  margin: 0 3px;
}
.display-pref-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 3px;
  cursor: pointer;
  min-width: 1.7em;
}
.display-pref-btn-lg {
  font-size: 14px;
  padding: 3px 7px;
}
.display-pref-btn[data-font="2"] {
  font-size: 12px;
}
.display-pref-btn:hover,
.display-pref-btn.is-active {
  background: rgba(255, 255, 255, 0.35);
  border-color: #fff;
}
.display-pref-btn[data-theme-toggle] {
  min-width: 3.6em;
  font-size: 11px;
}

.stats {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
}
.stats strong {
  color: var(--brand);
}

/* Kategorie-Box (tabularBox / gradientColor) */
.category {
  margin-bottom: 16px;
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  overflow: visible;
}
.category-title {
  position: relative;
  display: inline-block;
  margin: 0 14px 0;
  padding: 4px 16px 5px;
  font-size: 13px;
  font-weight: 400;
  color: #fff;
  background: linear-gradient(to bottom, #430101 0%, #6d0101 100%);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 255, 255, 0.35);
  z-index: 2;
}
.category-title::before,
.category-title::after {
  content: "";
  position: absolute;
  top: 0;
  border-top: 10px solid transparent;
}
.category-title::before {
  left: -10px;
  border-right: 10px solid #4a0101;
}
.category-title::after {
  right: -10px;
  border-left: 10px solid #4a0101;
}

.category-shell {
  margin-top: -2px;
  padding-top: 14px;
  background: linear-gradient(to bottom, #9a9a9a 0%, #d2d2d2 100%);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 1px -1px 0 rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.board-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.board-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(to bottom, #f2f2f2 1%, #f2f2f2 85%, #e6e6e6 100%);
  align-items: start;
}
.board-list li:last-child {
  border-bottom: 0;
}
.board-list li:hover {
  background: linear-gradient(to bottom, #f2f2f2 1%, #efefef 85%, #e3e3e3 100%);
}
.board-list h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}
.board-list h3 a {
  color: var(--brand);
}
.board-meta {
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}
.board-counts {
  text-align: right;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.badge-count {
  display: inline-block;
  min-width: 1.6em;
  padding: 1px 7px;
  border-radius: 10px;
  background: linear-gradient(15deg, #b71908 65%, rgba(255, 255, 255, 0.45) 100%);
  background-color: #b71908;
  color: #fff;
  font-size: 11px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
  vertical-align: middle;
  line-height: 1.4;
}
.main-nav .badge-count,
.user-menu-links .badge-count {
  margin-left: 0.35em;
  animation: badge-pop 0.45s ease-out;
}
@keyframes badge-pop {
  0% { transform: scale(0.6); opacity: 0.4; }
  70% { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}

.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.breadcrumb a {
  color: var(--brand);
}

h1.page-title,
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink-dark);
  margin: 0 0 12px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.table-list {
  width: 100%;
  border-collapse: collapse;
  background: var(--box-bg);
  border: 1px solid var(--box-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-list th,
.table-list td {
  padding: 8px 10px;
  border-bottom: 1px solid #e0e0e0;
  text-align: left;
  vertical-align: top;
}
.table-list th {
  background: linear-gradient(to top, #9a9a9a 0%, #d2d2d2 100%);
  color: var(--ink-dark);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.table-list tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.35);
}
.table-list tr:last-child td {
  border-bottom: 0;
}
.sticky-mark {
  color: var(--brand);
  font-size: 10px;
  font-weight: 700;
  margin-right: 0.3rem;
}

.post {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0;
  border: 1px solid var(--box-border);
  background: linear-gradient(to bottom, #f2f2f2 1%, #f2f2f2 85%, #e6e6e6 100%);
  margin-bottom: 8px;
  border-radius: var(--radius);
  overflow: hidden;
}
.post-side {
  background: rgba(255, 255, 255, 0.35);
  padding: 10px;
  border-right: 1px solid var(--box-border);
  font-size: 12px;
  text-align: center;
}
.post-side .meta {
  text-align: left;
}
.post-side .msg-rank {
  margin-top: 6px;
}
.post-side .name {
  font-weight: 700;
  color: var(--brand);
  word-break: break-word;
}
.post-side .meta {
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}
.post-body {
  padding: 10px 12px;
  color: var(--ink-dark);
  background: rgba(255, 255, 255, 0.45);
}
.post-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.post-content {
  overflow-wrap: anywhere;
  font-size: 13px;
}
.post-content img.bb-img {
  max-width: 100%;
  height: auto;
}
.attachments {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.attachments-title {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.attachments-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-start;
}
.attachment-image {
  margin: 0;
  max-width: min(100%, 420px);
}
.attachment-image a {
  display: block;
}
.attachment-image img.att-img,
.att-img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 4px;
}
.attachment-image figcaption {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.attachment-file {
  font-size: 0.9rem;
}
.bb-quote {
  margin: 0.6rem 0;
  padding: 0.55rem 0.75rem;
  border-left: 3px solid var(--brand);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
}
.bb-quote cite {
  display: block;
  font-style: normal;
  color: var(--brand);
  margin-bottom: 0.3rem;
  font-size: 11px;
  font-weight: 700;
}
.bb-code {
  background: #1e1e1e;
  color: #ddd;
  padding: 0.65rem;
  overflow-x: auto;
  font-size: 12px;
  border-radius: 4px;
}
.signature {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #ccc;
  color: var(--muted);
  font-size: 12px;
}

.pagination {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 10px 0;
}
.pagination a,
.pagination span {
  padding: 3px 8px;
  border: 1px solid var(--box-border);
  background: linear-gradient(to bottom, #fff 0%, #f6f6f6 47%, #ededed 100%);
  color: var(--brand);
  border-radius: 3px;
  font-size: 12px;
  box-shadow: inset 0 -1px 1px rgba(255, 255, 255, 0.8), inset 0 2px 2px rgba(0, 0, 0, 0.08);
}
.pagination .current {
  background: linear-gradient(to bottom, #9c0000 0%, #740101 100%);
  color: #fff;
  border-color: #5a0000;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.8);
}

.auth-box,
.panel {
  max-width: 420px;
  margin: 16px auto;
  padding: 14px 16px;
  background: linear-gradient(to bottom, #f2f2f2 1%, #f2f2f2 85%, #e6e6e6 100%);
  border: 1px solid var(--box-border);
  border-radius: var(--radius);
}
.auth-box h1 {
  font-size: 1.35rem;
  margin: 0 0 10px;
  color: var(--ink-dark);
}
.form-row {
  margin-bottom: 10px;
}
.form-row label,
.form-row .form-label {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}
.form-row label.check-inline {
  display: flex;
  align-items: center;
  font-weight: 400;
  color: var(--ink-dark);
  cursor: pointer;
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #bbb;
  background: #fff;
  color: var(--ink-dark);
  border-radius: 5px;
  font: inherit;
}
.form-row input[type="checkbox"],
.form-row input[type="radio"] {
  width: auto;
  padding: 0;
  margin: 0 8px 0 0;
  vertical-align: middle;
  flex-shrink: 0;
}
.form-row input:focus,
.form-row textarea:focus {
  border-color: #ffaa22;
  background: #fff9f4;
  outline: none;
}
.check-list {
  border: 1px solid #bbb;
  border-radius: 5px;
  padding: 6px 8px;
  max-height: 260px;
  overflow: auto;
  background: #fff;
}
.check-list label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 4px;
  font-weight: 400 !important;
  font-size: 13px !important;
  color: var(--ink-dark) !important;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}
.check-list label:last-child {
  border-bottom: 0;
}
.check-list label:hover {
  background: #f7f7f7;
}
.check-list .check-id {
  color: var(--muted);
  font-size: 11px;
  margin-left: auto;
}
.alert {
  padding: 8px 10px;
  margin-bottom: 10px;
  background: linear-gradient(#c95145, #913d37);
  border: 0;
  color: #fff;
  font-size: 12px;
  border-radius: 7px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 5px;
  border: 1px solid #5a0000;
  background: linear-gradient(to bottom, #9c0000 0%, #740101 100%);
  color: #f5f5f5 !important;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none !important;
  font-family: inherit;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45), inset 0 -2px 2px rgba(0, 0, 0, 0.2);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.8);
}
.btn:hover {
  filter: brightness(1.08);
  color: #fff !important;
}
.btn-ghost {
  background: linear-gradient(to bottom, #fff 0%, #f6f6f6 47%, #ededed 100%);
  color: #666 !important;
  border-color: #ccc;
  box-shadow: inset 0 -1px 1px rgba(255, 255, 255, 0.8), inset 0 2px 2px rgba(0, 0, 0, 0.1);
  text-shadow: none;
}
.btn-ghost:hover {
  color: var(--ink-dark) !important;
}
.btn-green {
  background: linear-gradient(to bottom, #3d9b3d 0%, #2a7a2a 100%);
  border-color: #1f5c1f;
  color: #f5f5f5 !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), inset 0 -2px 2px rgba(0, 0, 0, 0.2);
}
.btn-green:hover {
  filter: brightness(1.08);
  color: #fff !important;
}

/* ----- Footer ----- */
.site-footer {
  position: relative;
  width: 100%;
  min-height: 80px;
  padding: 18px 16px 20px;
  color: #ddd;
  font-size: 11px;
  text-align: center;
  background-color: #252525;
  background-image: url("../img/style/pageFooterBG.png");
  background-repeat: repeat-x;
  background-position: top;
  box-shadow: inset 0 10px 10px rgba(0, 0, 0, 0.3);
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}
.site-footer a {
  color: #ddd;
}
.site-footer a:hover {
  color: #fff;
  text-decoration: none;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}
.footer-bar {
  position: relative;
  display: inline-block;
  margin: -10px auto 12px;
  padding: 5px 16px 7px;
  background: linear-gradient(to bottom, #430101 0%, #6d0101 100%);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.5);
  color: #ddd;
}
.footer-bar::before,
.footer-bar::after {
  content: "";
  position: absolute;
  top: 0;
  border-top: 10px solid transparent;
}
.footer-bar::before {
  left: -10px;
  border-right: 10px solid #4a0101;
}
.footer-bar::after {
  right: -10px;
  border-left: 10px solid #4a0101;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.gallery-card {
  background: linear-gradient(to bottom, #f2f2f2 1%, #e6e6e6 100%);
  border: 1px solid var(--box-border);
  padding: 8px;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
}
.gallery-card:hover {
  text-decoration: none;
  border-color: var(--brand);
}
.gallery-card h3 {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--brand);
}
.gallery-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

/* ----- Avatare ----- */
.user-avatar {
  display: inline-block;
  vertical-align: middle;
  object-fit: cover;
  background: #ddd;
  border: 1px solid var(--box-border);
  border-radius: 3px;
}
.avatar-xs { width: 24px; height: 24px; }
.avatar-md { width: 64px; height: 64px; }
.avatar-lg { width: 96px; height: 96px; max-width: 100%; }
.post-avatar {
  display: block;
  margin: 0 0 8px;
  line-height: 0;
}
.post-avatar .user-avatar {
  width: 96px;
  height: 96px;
  max-width: 100%;
}

/* ----- User-Menü (wie WCF UserPanel) ----- */
.user-menu {
  position: relative;
  display: inline-block;
  padding-bottom: 4px; /* Hover-Brücke zum Popup */
}
.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ddd !important;
  text-decoration: none !important;
}
.user-menu-trigger:hover {
  color: #fff !important;
}
.user-menu-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% - 4px); /* überlappt die Brücke – Maus bleibt im Menü */
  z-index: 50;
  min-width: 280px;
  margin-top: 0;
  background: #f2f2f2;
  border: 1px solid #999;
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  color: var(--ink-dark);
}
.user-menu-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  height: 8px;
}
.user-menu:hover .user-menu-panel,
.user-menu:focus-within .user-menu-panel {
  display: block;
}
.user-menu-head {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid #ddd;
}
/* Popup auf hellem Grund: dunkle Schrift (überschreibt .user-line a) */
.header-tools .user-line .user-menu-panel {
  color: #333;
}
.header-tools .user-line .user-menu-panel .user-menu-head a {
  color: #333 !important;
  text-shadow: none !important;
}
.header-tools .user-line .user-menu-panel .user-menu-head a:hover {
  color: var(--brand) !important;
  text-decoration: underline;
  text-shadow: none !important;
}
.user-menu-panel strong a {
  font-size: 14px;
  font-weight: 700;
  color: #222 !important;
}
.user-menu-panel .board-meta {
  color: #666;
}
.user-menu-links {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  font-size: 13px;
}
.user-menu-links li {
  margin: 3px 0;
}
.header-tools .user-line .user-menu-links a {
  color: var(--brand) !important;
  font-weight: 600;
  text-shadow: none !important;
}
.user-menu-logout {
  display: block;
  padding: 8px 12px;
  text-align: center;
  background: linear-gradient(to bottom, #430101 0%, #6d0101 100%);
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 700;
  font-size: 13px;
}
.header-tools .user-line .user-menu-panel a.user-menu-logout,
.header-tools .user-line .user-menu-panel a.user-menu-logout:hover {
  color: #ffffff !important;
  text-decoration: none !important;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.85) !important;
}
.user-menu-logout:hover {
  filter: brightness(1.1);
}

/* ----- Dashboard ----- */
.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 12px;
  align-items: start;
}
.dash-content-box {
  margin: 0 0 12px;
  background: linear-gradient(to bottom, #f2f2f2 1%, #f2f2f2 85%, #e6e6e6 100%);
  border: 1px solid var(--box-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.dash-content-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 6px 10px;
  background: linear-gradient(to top, #9a9a9a 0%, #d2d2d2 100%);
  border-bottom: 1px solid var(--box-border);
}
.dash-content-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
}
.dash-content-head h2 a {
  color: inherit;
  text-decoration: none;
}
.dash-content-head h2 a:hover {
  color: var(--brand);
  text-decoration: underline;
}
.dash-content-box .table-list {
  border: 0;
  border-radius: 0;
  margin: 0;
}
.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.activity-item {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  align-items: flex-start;
}
.activity-item:last-child {
  border-bottom: 0;
}
.activity-body {
  flex: 1;
  min-width: 0;
}
.activity-head {
  font-size: 12px;
  font-weight: 700;
}
.activity-title {
  margin: 2px 0;
  font-size: 13px;
  color: var(--ink-dark);
}
.activity-excerpt {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.dashboard-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dash-box {
  background: linear-gradient(to bottom, #f2f2f2 1%, #f2f2f2 85%, #e6e6e6 100%);
  border: 1px solid var(--box-border);
  border-radius: var(--radius);
  padding: 8px 10px 10px;
}
.dash-box h3 {
  margin: 0 0 8px;
  padding: 4px 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-dark);
  background: linear-gradient(to top, #9a9a9a 0%, #d2d2d2 100%);
  border-radius: 3px;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
}
.dash-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dash-list > li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 12px;
}
.dash-list > li:last-child {
  border-bottom: 0;
}
.dash-user,
.dash-media {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.dash-online {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 12px;
}
.dash-subcats {
  list-style: none;
  margin: 6px 0 0;
  padding: 0 0 0 10px;
  font-size: 12px;
}
.dash-subcats li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0;
}

/* ----- Profil ----- */
.profile-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 0 0 12px;
  padding: 12px;
  background: linear-gradient(to bottom, #f2f2f2 1%, #e6e6e6 100%);
  border: 1px solid var(--box-border);
  border-radius: var(--radius);
}
.profile-intro h1 {
  margin: 0 0 6px;
  font-family: var(--font);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink-dark);
}
.user-title-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  background: linear-gradient(to bottom, #9c0000 0%, #740101 100%);
  color: #fff;
  border-radius: 3px;
  vertical-align: middle;
}
.profile-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--muted);
  font-size: 12px;
}
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 12px;
  align-items: start;
}
.profile-main,
.profile-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.profile-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 0;
  font-size: 12px;
}
.profile-dl dt {
  color: var(--muted);
  font-weight: 700;
}
.profile-dl dd {
  margin: 0;
  color: var(--ink-dark);
}

@media (max-width: 900px) {
  .dashboard-layout,
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

/* ----- Beitragseditor (WBB messageForm) ----- */
.msg-composer {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 0 14px;
  align-items: start;
  margin: 1.25rem 0 0;
}
.msg-topic-row {
  margin-bottom: 0.75rem;
}
.msg-topic-row label {
  display: block;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 0.25rem;
}
.msg-topic-row input {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--box-border);
  border-radius: 3px;
  font: inherit;
}
.msg-sidebar {
  position: relative;
}
.msg-sidebar-inner {
  background: linear-gradient(to bottom, #f7f7f7, #ececec);
  border: 1px solid var(--box-border);
  border-radius: var(--radius);
  padding: 10px 10px 12px;
  text-align: center;
}
.msg-sidebar-name {
  display: block;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 8px;
  word-break: break-word;
}
.msg-sidebar-avatar {
  display: inline-block;
  border: 1px solid #bbb;
  background: #fff;
  padding: 2px;
  line-height: 0;
}
.msg-sidebar-avatar .user-avatar {
  width: 96px;
  height: 96px;
  object-fit: cover;
  display: block;
}
.msg-rank {
  display: inline-block;
  margin: 8px 0 6px;
  padding: 2px 10px;
  border-radius: 10px;
  background: #555;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}
.msg-credits {
  margin: 8px 0 0;
  text-align: left;
  font-size: 11px;
  color: var(--brand);
}
.msg-credits > div {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  gap: 0.25rem;
  margin: 2px 0;
}
.msg-credits dt {
  font-weight: 700;
  margin: 0;
}
.msg-credits dd {
  margin: 0;
  color: var(--ink-dark);
  min-height: 1em;
}
/* Sprechblasen-Pfeil zur Editor-Box */
.msg-sidebar::after {
  content: "";
  position: absolute;
  top: 48px;
  right: -11px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 11px;
  border-color: transparent transparent transparent var(--box-border);
  z-index: 2;
}
.msg-sidebar::before {
  content: "";
  position: absolute;
  top: 49px;
  right: -9px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 9px 0 9px 10px;
  border-color: transparent transparent transparent #f2f2f2;
  z-index: 3;
}
.msg-main {
  min-width: 0;
}
.msg-editor-box {
  border: 1px solid var(--box-border);
  border-radius: var(--radius);
  background: #f2f2f2;
  overflow: hidden;
}
.msg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
  padding: 6px 8px;
  background: linear-gradient(to bottom, #fafafa, #e8e8e8);
  border-bottom: 1px solid var(--box-border);
}
.msg-tool,
.msg-tool-select,
.msg-tool-color {
  font: inherit;
  font-size: 12px;
  line-height: 1;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-dark);
  border-radius: 3px;
  padding: 4px 6px;
  cursor: pointer;
  min-height: 26px;
}
.msg-tool:hover,
.msg-tool-select:hover {
  background: #fff;
  border-color: #bbb;
}
.msg-tool-select {
  max-width: 7.5rem;
  padding: 3px 4px;
}
.msg-tool-color {
  padding: 2px;
  display: inline-flex;
  align-items: center;
}
.msg-tool-color input {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #bbb;
  background: #fff;
  cursor: pointer;
}
.msg-tool-sep {
  width: 1px;
  height: 18px;
  background: #ccc;
  margin: 0 3px;
}
.msg-subject-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding: 6px 10px;
  border-bottom: 1px solid var(--box-border);
  background: #efefef;
}
.msg-subject-row label {
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
}
.msg-subject-row input {
  flex: 1;
  border: 1px solid var(--box-border);
  border-radius: 3px;
  padding: 0.35rem 0.5rem;
  font: inherit;
}
.msg-textarea {
  display: block;
  width: 100%;
  min-height: 160px;
  border: 0;
  resize: vertical;
  padding: 10px 12px;
  font: inherit;
  background: #f7f7f7;
  color: var(--ink-dark);
}
.msg-textarea:focus {
  outline: none;
  background: #fff;
}
.msg-composer.is-advanced .msg-textarea {
  min-height: 260px;
  background: #fff;
}
.msg-tabs {
  border-top: 1px solid var(--box-border);
  background: #ebebeb;
}
.msg-tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--box-border);
  background: #e4e4e4;
}
.msg-tab {
  appearance: none;
  border: 0;
  border-right: 1px solid var(--box-border);
  background: transparent;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  color: var(--brand);
  cursor: pointer;
}
.msg-tab:hover {
  background: rgba(255, 255, 255, 0.45);
}
.msg-tab.is-active {
  background: #f2f2f2;
  color: var(--ink-dark);
  box-shadow: inset 0 2px 0 var(--brand);
}
.msg-tab-panels {
  padding: 10px 12px;
  background: #f2f2f2;
  min-height: 72px;
}
.msg-smilies {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.msg-smiley {
  border: 1px solid transparent;
  background: transparent;
  padding: 3px;
  border-radius: 3px;
  cursor: pointer;
  line-height: 0;
}
.msg-smiley:hover {
  border-color: #bbb;
  background: #fff;
}
.msg-smiley img,
img.smiley {
  width: 24px;
  height: 24px;
  vertical-align: middle;
}
.msg-file-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border: 1px dashed #aaa;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  color: var(--brand);
  font-weight: 700;
}
.msg-file-label input {
  font: inherit;
  max-width: 100%;
}
.msg-hint {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 11px;
}
.msg-check {
  display: block;
  margin: 0.35rem 0;
  color: var(--ink-dark);
  cursor: pointer;
}
.msg-check input {
  width: auto;
  margin-right: 0.4rem;
}
.msg-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.bb-spoiler {
  margin: 0.5rem 0;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--box-border);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 4px;
}
.bb-spoiler summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 700;
}
.bb-inline {
  font-family: Consolas, "Courier New", monospace;
  background: rgba(0, 0, 0, 0.06);
  padding: 0 0.25em;
  border-radius: 2px;
}
.bb-center {
  text-align: center;
}
.bb-list {
  margin: 0.5rem 0 0.5rem 1.25rem;
  padding: 0;
}
.bb-table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0;
}
.bb-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.bb-table th,
.bb-table td {
  border: 1px solid var(--box-border);
  padding: 0.4rem 0.55rem;
  vertical-align: top;
}
.bb-media {
  margin: 0.75rem 0;
  max-width: 100%;
}
.bb-media iframe {
  max-width: 100%;
  border: 0;
  border-radius: 4px;
  background: #000;
}
.bb-attach,
.bb-ealbum {
  display: inline-block;
  margin: 0.25rem 0;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--box-border);
  border-radius: 3px;
  background: #fff;
  font-weight: 700;
}
.bb-eimage-caption {
  font-size: 11px;
  color: var(--muted);
  margin: 0.25rem 0 0.5rem;
}
.bb-progress {
  position: relative;
  height: 25px;
  margin: 0.5rem 0;
  border: 1px solid var(--box-border);
  border-radius: 3px;
  overflow: hidden;
  background: #d8e7f5;
}
.bb-progress-track {
  display: none;
}
.bb-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #254c73;
}
.bb-progress-label {
  position: relative;
  z-index: 1;
  display: block;
  line-height: 25px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-dark);
  text-shadow: 0 0 2px #fff;
}

@media (max-width: 1560px) {
  body {
    padding-left: 0;
    padding-right: 0;
  }
  .page-frame {
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .msg-composer {
    grid-template-columns: 1fr;
  }
  .msg-sidebar::before,
  .msg-sidebar::after {
    display: none;
  }
  .msg-sidebar-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 0.75rem;
    text-align: left;
    align-items: start;
  }
  .msg-sidebar-name {
    grid-column: 2;
    margin: 0;
  }
  .msg-sidebar-avatar {
    grid-row: 1 / span 3;
  }
  .msg-sidebar-avatar .user-avatar {
    width: 64px;
    height: 64px;
  }
  .msg-rank {
    margin: 0;
  }
  .msg-credits {
    grid-column: 1 / -1;
  }
  .post {
    grid-template-columns: 1fr;
  }
  .post-side {
    border-right: 0;
    border-bottom: 1px solid var(--box-border);
    display: flex;
    gap: 1rem;
    align-items: baseline;
  }
  .board-list li {
    grid-template-columns: 1fr;
  }
  .board-counts {
    text-align: left;
  }
  .main-nav a {
    border-left: 0;
    border-right: 0;
    font-size: 13px;
    padding: 8px 12px;
  }
  .search-mini {
    width: 100%;
  }
  .brand-logo {
    height: 72px;
    background-size: 0, auto;
  }
  .brand-logo img {
    height: 72px;
    max-height: 72px;
  }
}

/* ========== Dunkelmodus (gesamtes Forum) ========== */
html[data-theme="dark"] {
  --page-outer: #121212;
  --page-bg: #1e1e1e;
  --content-bg: #262626;
  --box-bg: #2b2b2b;
  --box-border: #4a4a4a;
  --ink: #cfcfcf;
  --ink-dark: #f0f0f0;
  --muted: #a0a0a0;
  --brand: #e88888;
  --brand-dark: #c55;
  --brand-hover: #ffb0b0;
  color-scheme: dark;
}
html[data-theme="dark"] body {
  color: var(--ink);
  background-color: var(--page-outer);
}
html[data-theme="dark"] .page-frame {
  background: var(--page-bg);
  box-shadow: 0 0 28px rgba(0, 0, 0, 0.7);
}
html[data-theme="dark"] main.wrap {
  background: transparent;
  color: var(--ink);
}
html[data-theme="dark"] .dash-box,
html[data-theme="dark"] .dash-content-box,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .post,
html[data-theme="dark"] .category-shell,
html[data-theme="dark"] .board-list li,
html[data-theme="dark"] .msg-editor-box,
html[data-theme="dark"] .msg-sidebar-inner,
html[data-theme="dark"] .table-list,
html[data-theme="dark"] .user-menu-panel,
html[data-theme="dark"] .gallery-card,
html[data-theme="dark"] .profile-header,
html[data-theme="dark"] .profile-grid .dash-box {
  background: var(--box-bg) !important;
  border-color: var(--box-border) !important;
  color: var(--ink-dark);
}
html[data-theme="dark"] .dash-box h3,
html[data-theme="dark"] .dash-content-head,
html[data-theme="dark"] .category-title,
html[data-theme="dark"] .page-title,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3 {
  color: var(--ink-dark);
}
html[data-theme="dark"] .board-meta,
html[data-theme="dark"] .post-head,
html[data-theme="dark"] .post-side .meta,
html[data-theme="dark"] .signature,
html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .stats {
  color: var(--muted);
}
html[data-theme="dark"] .table-list th,
html[data-theme="dark"] .table-list td,
html[data-theme="dark"] .table-list tr {
  border-color: var(--box-border);
  color: var(--ink);
  background: transparent;
}
html[data-theme="dark"] .table-list thead th {
  background: #333;
  color: var(--ink-dark);
}
html[data-theme="dark"] .table-list tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}
html[data-theme="dark"] .post-body,
html[data-theme="dark"] .post-side,
html[data-theme="dark"] .post-content,
html[data-theme="dark"] .activity-item,
html[data-theme="dark"] .activity-list,
html[data-theme="dark"] .dash-list li,
html[data-theme="dark"] .msg-textarea,
html[data-theme="dark"] .msg-tab-panels,
html[data-theme="dark"] .msg-tabs,
html[data-theme="dark"] .msg-toolbar,
html[data-theme="dark"] .msg-subject-row,
html[data-theme="dark"] .form-row input,
html[data-theme="dark"] .form-row textarea,
html[data-theme="dark"] .form-row select,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background: #232323 !important;
  color: var(--ink-dark) !important;
  border-color: var(--box-border) !important;
}
html[data-theme="dark"] .attachments {
  border-top-color: rgba(255, 255, 255, 0.12);
}
html[data-theme="dark"] .bb-quote {
  background: rgba(0, 0, 0, 0.35);
  border-left-color: var(--brand);
  color: var(--ink);
}
html[data-theme="dark"] .bb-code {
  background: #111;
  color: #ddd;
}
html[data-theme="dark"] .bb-spoiler {
  background: #222;
  border-color: var(--box-border);
}
html[data-theme="dark"] .btn-ghost {
  background: linear-gradient(to bottom, #3a3a3a 0%, #2e2e2e 100%);
  color: #e0e0e0 !important;
  border-color: #555;
  text-shadow: none;
}
html[data-theme="dark"] .btn-ghost:hover {
  color: #fff !important;
  background: linear-gradient(to bottom, #454545 0%, #353535 100%);
}
html[data-theme="dark"] .msg-tool:hover,
html[data-theme="dark"] .msg-tool-select:hover,
html[data-theme="dark"] .msg-smiley:hover {
  background: #3a3a3a;
  border-color: #666;
}
html[data-theme="dark"] .msg-tab {
  color: var(--brand);
}
html[data-theme="dark"] .msg-tab.is-active {
  background: #2b2b2b;
  color: var(--ink-dark);
}
html[data-theme="dark"] .msg-tab-nav {
  background: #242424;
  border-color: var(--box-border);
}
html[data-theme="dark"] .msg-credits,
html[data-theme="dark"] .msg-sidebar-name,
html[data-theme="dark"] .post-side .name a {
  color: var(--brand);
}
html[data-theme="dark"] .msg-credits dd {
  color: var(--ink-dark);
}
html[data-theme="dark"] .pagination a,
html[data-theme="dark"] .pagination span {
  background: #2b2b2b;
  border-color: var(--box-border);
  color: var(--ink);
}
html[data-theme="dark"] .alert {
  opacity: 0.95;
}
html[data-theme="dark"] .user-menu-panel {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}
html[data-theme="dark"] .user-menu-links a,
html[data-theme="dark"] .user-menu-head a {
  color: var(--ink-dark);
}
html[data-theme="dark"] .user-menu-logout {
  background: #3a1010;
  color: #fff !important;
}
html[data-theme="dark"] .activity-excerpt {
  color: var(--muted);
}
html[data-theme="dark"] .footer-bar,
html[data-theme="dark"] .site-footer {
  color: #bbb;
}
html[data-theme="dark"] .hero-bar {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
html[data-theme="dark"] .search-mini input {
  background: rgba(255, 255, 255, 0.88);
  color: #222;
}
html[data-theme="dark"] .board-list li {
  background: linear-gradient(to bottom, #303030, #282828) !important;
}
html[data-theme="dark"] .dash-content-head {
  background: linear-gradient(to bottom, #3a3a3a, #2c2c2c);
  border-bottom: 1px solid var(--box-border);
}
html[data-theme="dark"] .dash-box h3 {
  background: linear-gradient(to bottom, #3a3a3a, #2c2c2c);
  border-bottom: 1px solid var(--box-border);
  color: var(--ink-dark);
}

/* Private Nachrichten */
.table-list tr.pm-unread td {
  background: rgba(183, 25, 8, 0.06);
}
html[data-theme="dark"] .table-list tr.pm-unread td {
  background: rgba(232, 136, 136, 0.12);
}

/* Nach oben – floating scroll button */
.scroll-top {
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  margin: 0;
  border: 1px solid var(--brand-dark);
  border-radius: var(--radius);
  background: linear-gradient(to bottom, var(--brand-btn), var(--brand-btn-end));
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease, background 0.15s ease;
}
.scroll-top.is-visible {
  opacity: 0.92;
  visibility: visible;
  pointer-events: auto;
}
.scroll-top:hover,
.scroll-top:focus-visible {
  opacity: 1;
  background: linear-gradient(to bottom, var(--brand-hover), var(--brand-dark));
  outline: none;
}
.scroll-top:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand);
}
.scroll-top[hidden] {
  display: none;
}
@media (max-width: 600px) {
  .scroll-top {
    width: 2.5rem;
    height: 2.5rem;
    right: max(0.5rem, env(safe-area-inset-right, 0px));
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  }
}
