:root {
    --bg: #1a1a1a;
    --bg-panel: #232323;
    --bg-panel-alt: #2e2e2e;
    --border: #3d3d3d;
    --text: #e8e8e8;
    --text-muted: #a0a0a0;
    --gold: #c9a227;
    --gold-hover: #e0b930;
    /* Farbe des Discord-Bots (Rand seiner Nachrichten) - auch in den Vorschauen auf der Website */
    --bot-color: #206694;
    --danger: #d9534f;
    --success: #4caf50;
    --discord: #5865f2;
    --discord-hover: #4752c4;
    --sidebar-width: 260px;
}

* { box-sizing: border-box; }

/* Schmale goldene Scrollbalken ueberall (Listen in Popups, Tabellen, Textfelder ...) statt der hellen
   Standardbalken des Browsers. Eigene Regeln (Seitenleiste, Wiki-Inhaltsverzeichnis, Seite mit
   Fortschrittsleiste) gehen vor, weil * keine Spezifitaet hat. */
* { scrollbar-width: thin; scrollbar-color: rgba(201, 162, 39, 0.3) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track, *::-webkit-scrollbar-corner { background: transparent; }
*::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
*::-webkit-scrollbar-thumb { background: rgba(201, 162, 39, 0.3); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: rgba(201, 162, 39, 0.8); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.5;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hover); text-decoration: underline; }

.icon { flex-shrink: 0; }

/* Oeffentliche/nicht eingeloggte Seiten: schlichte Kopfzeile */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
}

.navbar-brand a {
    display: block;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--gold);
}

.navbar-brand img {
    display: block;
    height: 46px;
    width: auto;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

/* Eingeloggter Bereich: Sidebar-Layout */
.app-shell {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    padding: 1.5rem 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    /* Nichts in der Sidebar soll je waagerecht scrollen - lange Menuepunkte werden
       stattdessen umgebrochen (siehe .sidebar-link .label). */
    overflow-x: hidden;
}

.sidebar-brand {
    padding: 0 0.65rem 1.5rem;
    font-size: 1.15rem;
    font-weight: bold;
}

.sidebar-brand a { display: block; }

/* Logo mit Emblem und Schriftzug (Seitenverhaeltnis etwa 5:2, Hintergrund transparent).
   Breite und Hoehe beide "auto" mit Obergrenzen - so bleibt das Seitenverhaeltnis erhalten,
   egal welche Grenze greift, und es entsteht keine waagerechte Scrollleiste. */
.sidebar-brand img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 80px;
    margin: 0 auto;
}

.sidebar-brand a { color: var(--gold); }

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.sidebar-section-label {
    margin-top: 1rem;
    padding: 0.5rem 0.65rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

/* Unbeschrifteter Trenner zwischen "Dashboard/Mein Profil/Mitglieder" und
   "Raids/Premades" - optisch etwas getrennter, aber ohne eigene Ueberschrift
   wie beim Admin-Bereich. */
/* "Menü anpassen" (assets/js/sidebar-editor.js) */
button.sidebar-edit-toggle {
    display: flex;
    width: 100%;
    padding: 0.65rem 0.75rem;
    background: none;
    border: 0;
    border-radius: 6px;
    text-align: left;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}
button.sidebar-edit-toggle[hidden] { display: none; }
button.sidebar-edit-toggle:hover { color: var(--text); box-shadow: none; }
.sidebar-edit-toolbar {
    margin-bottom: 0.6rem;
    padding: 0.6rem 0.65rem;
    border: 1px solid rgba(201, 162, 39, 0.5);
    border-radius: 8px;
    background: rgba(201, 162, 39, 0.08);
}
.sidebar-edit-toolbar p { margin: 0 0 0.45rem; font-size: 0.8rem; color: var(--text-muted); }
.sidebar-edit-buttons { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.sidebar-edit-buttons .button { padding: 0.3rem 0.65rem; font-size: 0.8rem; }
.sidebar-nav.is-editing [data-nav] {
    cursor: grab;
    touch-action: none;
    user-select: none;
    border: 1px dashed rgba(201, 162, 39, 0.35);
    background: rgba(255, 255, 255, 0.03);
}
.sidebar-nav.is-editing [data-nav]::after {
    content: '⠿';
    margin-left: auto;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1;
}
.sidebar-nav.is-editing [data-nav].is-dragging {
    cursor: grabbing;
    border-style: solid;
    border-color: var(--gold);
    background: rgba(201, 162, 39, 0.18);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    position: relative;
    z-index: 2;
}
/* Die Trennlinie ist beim Anpassen ein greifbarer Balken */
.sidebar-nav.is-editing .sidebar-nav-gap {
    display: flex;
    align-items: center;
    height: auto;
    margin: 0.3rem 0;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    border-top: 1px dashed rgba(201, 162, 39, 0.35);
}
.sidebar-nav.is-editing .sidebar-nav-gap::before {
    content: 'Trennlinie';
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.sidebar-nav.is-editing .sidebar-badge { display: none; }
.sidebar-nav.is-editing .sidebar-nav-gap-extra::before { content: 'Zusätzliche Trennlinie'; }
.sidebar-nav.is-editing .sidebar-nav-gap-extra.is-new { border-color: var(--gold); background: rgba(201, 162, 39, 0.12); }
.sidebar-gap-remove {
    margin-left: auto;
    margin-right: 0.4rem;
    padding: 0 0.4rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.3;
    cursor: pointer;
}
.sidebar-gap-remove:hover { border-color: var(--danger); color: var(--danger); background: rgba(217, 83, 79, 0.1); box-shadow: none; }
/* "x" und Griff stehen zusammen rechts */
.sidebar-nav.is-editing .sidebar-nav-gap-extra::after { margin-left: 0; }
.sidebar-nav:not(.is-editing) .sidebar-gap-remove { display: none; }

.sidebar-nav-gap {
    height: 0;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
}

/* Mobile Kopfleiste mit Burger-Button: ersetzt auf schmalen Bildschirmen die
   Sidebar, die dort stattdessen als ausklappbare Schublade (siehe unten)
   fungiert. Auf Desktop-Breiten bleibt sie unsichtbar. */
.mobile-topbar {
    display: none;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 900;
}

.mobile-topbar-brand img {
    display: block;
    height: 36px;
    width: auto;
}

.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
}

.sidebar-toggle:hover { border-color: var(--gold); color: var(--gold); background: var(--bg-panel-alt); }

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 6px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Lange Bezeichnungen wie "Berechtigungsgruppen" duerfen den Menuepunkt nicht breiter
   machen als die Sidebar (Flex-Kinder waeren sonst mindestens so breit wie ihr laengstes
   Wort). */
.sidebar-link .label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.sidebar-link:hover {
    background: var(--bg-panel-alt);
    color: var(--text);
    text-decoration: none;
}

.sidebar-link.active {
    background: rgba(201, 162, 39, 0.15);
    color: var(--gold);
}

.sidebar-footer {
    border-top: 1px solid var(--border);
    margin-top: 1rem;
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 0.65rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.sidebar-user strong { color: var(--text); }

.avatar {
    display: inline-block;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    vertical-align: middle;
}

.avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.avatar-wrap { display: inline-flex; }

.hero .avatar,
.hero .avatar-wrap { margin-bottom: 1rem; }

.avatar-edit-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.avatar-edit-btn {
    position: absolute;
    top: -2px;
    right: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold);
    color: #1a1a1a;
    border: 2px solid var(--bg-panel);
    cursor: pointer;
    transition: background 0.15s ease;
}

.avatar-edit-btn:hover { background: var(--gold-hover); }
.avatar-edit-btn .icon { width: 15px; height: 15px; }

.app-content {
    flex: 1;
    min-width: 0;
}

/* Hintergrundbild des Bereichs (--page-bg, je Bereich unten bzw. eigenes Bild der Profilseite): als feste Ebene
   hinter dem Inhalt, so gross wie das Fenster rechts der Sidebar. Ueber die ganze Seitenhoehe gestreckt
   (background-size: cover am Inhalt) zoomte es bei jeder Aenderung der Hoehe - etwa wenn beim Anklicken von
   Feldern die Werteliste unter dem Daevanion-Brett laenger wird. 100vh aendert sich auch nicht, wenn mobil die
   Adressleiste ein- und ausfaehrt. */
.app-content::before {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: 100vh;
    z-index: -1;
    background-image: var(--page-bg, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
}

@media (max-width: 860px) {
    /* Die Sidebar ist hier eine Schublade ueber dem Inhalt */
    .app-content::before { left: 0; }
}

.app-content.bg-dashboard {
    --page-bg: linear-gradient(rgba(26, 26, 26, 0.55), rgba(26, 26, 26, 0.72)), url('/assets/images/Landscapes/web/landscape1-bg.jpg');
}

.app-content.bg-profile {
    --page-bg: linear-gradient(rgba(26, 26, 26, 0.55), rgba(26, 26, 26, 0.72)), url('/assets/images/Landscapes/web/landscape2-bg.jpg');
}

.app-content.bg-members {
    --page-bg: linear-gradient(rgba(26, 26, 26, 0.55), rgba(26, 26, 26, 0.72)), url('/assets/images/Landscapes/web/landscape9-bg.jpg');
}

.app-content.bg-admin {
    --page-bg: linear-gradient(rgba(26, 26, 26, 0.58), rgba(26, 26, 26, 0.74)), url('/assets/images/Landscapes/web/landscape3-bg.jpg');
}

.app-content.bg-roles {
    --page-bg: linear-gradient(rgba(26, 26, 26, 0.58), rgba(26, 26, 26, 0.74)), url('/assets/images/Landscapes/web/landscape7-bg.jpg');
}

.app-content.bg-reports {
    --page-bg: linear-gradient(rgba(26, 26, 26, 0.58), rgba(26, 26, 26, 0.74)), url('/assets/images/Landscapes/web/landscape10-bg.jpg');
}

.app-content.bg-raids {
    --page-bg: linear-gradient(rgba(20, 20, 20, 0.68), rgba(20, 20, 20, 0.82)), url('/assets/images/Landscapes/web/landscape6-bg.jpg');
}

.app-content.bg-premades {
    --page-bg: linear-gradient(rgba(20, 20, 20, 0.68), rgba(20, 20, 20, 0.82)), url('/assets/images/Landscapes/web/landscape5-bg.jpg');
}

/* Gast-Ansicht (nicht eingeloggt, z.B. Login/Startseite): .container ist mittig mit fester
   Maximalbreite, deshalb kommt der Hintergrund hier auf body statt auf einen Content-Wrapper. */
body.guest-bg {
    background-image: linear-gradient(rgba(26, 26, 26, 0.6), rgba(26, 26, 26, 0.78)), url('/assets/images/Landscapes/web/landscape11-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.panel {
    background: rgba(35, 35, 35, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.panel-narrow {
    max-width: 420px;
    margin: 3rem auto;
}

h1, h2, h3 { color: var(--gold); }

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

tr:hover td { background: var(--bg-panel-alt); }

.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 720px; }

.actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.75rem;
    white-space: nowrap;
}

/* --- Reports: Kartenliste statt Tabelle --- */

/* Alle Reports des oben gewaehlten Spielers loeschen (reports.php, assets/js/reports.js) */
.report-clear-user { align-items: flex-start; margin-top: 0.75rem; }
.report-clear-user[hidden] { display: none; }

.report-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.report-card {
    background: rgba(35, 35, 35, 0.62);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-left-width: 3px;
    border-left-color: var(--success);
    border-radius: 10px;
    padding: 1.1rem 1.35rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

/* Hover-Rahmenfarbe passt sich der Statusfarbe links an (gruen = aktiv,
   gedaempft = archiviert) statt generischem Gold - siehe .report-card-archived:hover. */
.report-card:hover {
    border-color: var(--success);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.report-card-archived {
    border-left-color: var(--text-muted);
    opacity: 0.7;
}

.report-card-archived:hover {
    border-color: var(--text-muted);
    opacity: 0.95;
}

.report-card-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.report-card-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.report-card-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.report-card-user-info strong {
    font-size: 1.05rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-card-user-info .text-muted { font-size: 0.82rem; }

.report-card-badges {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.report-card-body {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px dashed var(--border);
}

.report-reason-text {
    white-space: pre-wrap;
    line-height: 1.45;
}

.report-evidence {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px dashed var(--border);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.report-evidence .icon { width: 14px; height: 14px; flex-shrink: 0; }

.report-add-btn { margin-top: 1rem; }
.report-evidence a { color: var(--gold); }
.report-evidence a:hover { color: var(--gold-hover); }

.report-evidence-text {
    overflow-wrap: anywhere;
}

.report-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
}

#report-filter-empty {
    margin-bottom: 1.5rem;
}

.text-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 600;
    color: var(--danger);
    cursor: pointer;
    text-decoration: none;
}

.text-button:hover { color: #ff6b66; text-decoration: underline; }

form { display: flex; flex-direction: column; gap: 1rem; }

label { font-weight: 600; font-size: 0.9rem; }

input, select, textarea { font-family: inherit; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="datetime-local"],
textarea,
select {
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    color: var(--text);
    font-size: 1rem;
    width: 100%;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gold);
}

/* Chrome/Edge faerben das Kalender-/Uhr-Icon standardmaessig schwarz, das im
   dunklen Theme unsichtbar waere. */
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.field-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.5rem;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
}

.checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
}

.checkbox-grid input { width: auto; }

.button, button {
    /* Symbol und Text immer gemeinsam mittig; gleiche Hoehe fuer <a> und <button> */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    background: var(--gold);
    color: #1a1a1a;
    /* Unsichtbarer Rand, damit goldene Buttons genauso hoch sind wie dunkle mit Rand */
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 0.6rem 1.25rem;
    font-family: inherit; /* <button> erbt die Schrift sonst nicht */
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    width: fit-content;
    transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
/* Symbole in Buttons wachsen mit der Schrift (im kleinen Button kleiner) */
:where(.button, .button-small, .button-secondary, .button-success, .button-danger) > .icon { width: 1.15em; height: 1.15em; }

.button:hover, button:hover { background: var(--gold-hover); color: #1a1a1a; text-decoration: none; }
/* Rand beim Drueberfahren (als Innenschatten, damit nichts verrutscht): goldene Buttons mit
   schwarzer Schrift bekommen einen schwarzen Rand, dunkle (.button-secondary) einen goldenen.
   Die Buttons unter den Lumipunkten im Dashboard (.dashboard-cta) haben ihren eigenen Effekt. */
.button:hover, button:hover { box-shadow: inset 0 0 0 2px #111; }

/* [hidden] soll auch bei Buttons wirken (display von .button wuerde es sonst ueberstimmen) */
.button[hidden] { display: none !important; }
.button-danger { background: var(--danger); color: #fff; }
.button-danger:hover { background: #c9302c; color: #fff; }

.button-secondary { background: var(--bg-panel-alt); color: var(--text); border: 1px solid var(--border); }
.button-secondary:hover { background: #383838; border-color: var(--gold); color: var(--text); box-shadow: inset 0 0 0 1px var(--gold); }

.button-success { background: var(--success); color: #fff; }
.button-success:hover { background: #3d8b40; color: #fff; }
.button-danger:hover, .button-success:hover, .discord-connect-button:hover,
.button:disabled:hover, button:disabled:hover,
/* Knoepfe, die gar nicht gold sind (Symbole, Filter, Seitenzahlen, Menue ...) */
.icon-button:hover, .modal-close:hover, .text-button:hover, .members-chip:hover, .members-segment button:hover,
.page-link:hover, .shop-category:hover, .class-picker-option:hover, .user-filter-trigger:hover, .user-filter-option:hover,
.file-drop-clear:hover, .group-picker-option:hover, .sidebar-toggle:hover, .wiki-preview-toggle:hover,
.lightbox button:hover, .item-picker button:hover { box-shadow: none; }

.button:disabled, button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.button:disabled:hover, button:disabled:hover { background: var(--gold); }

.inline-form { display: inline; }

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.badge-active { border-color: var(--success); color: var(--success); }
.badge-disabled { border-color: var(--danger); color: var(--danger); }

.badge-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.flash-success { background: rgba(76, 175, 80, 0.15); border: 1px solid var(--success); color: var(--success); }
.flash-error { background: rgba(217, 83, 79, 0.15); border: 1px solid var(--danger); color: var(--danger); }

.text-muted { color: var(--text-muted); }

/* --- Erfolgs-Popup: zentriert mit animiertem Haken statt Balken oben --- */

.success-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.success-popup-overlay.visible { opacity: 1; }
.success-popup-overlay.closing { opacity: 0; }

.success-popup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2.25rem 2.5rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    text-align: center;
    max-width: 360px;
    transform: scale(0.85);
    transition: transform 0.25s ease;
}

.success-popup-overlay.visible .success-popup { transform: scale(1); }

.success-popup p {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
}

.success-check {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.success-check-circle {
    stroke: var(--success);
    stroke-width: 2.5;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
}

.success-check-mark {
    stroke: var(--success);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
}

.success-popup-overlay.visible .success-check-circle {
    animation: success-circle-draw 0.5s ease-out forwards;
}

.success-popup-overlay.visible .success-check-mark {
    animation: success-mark-draw 0.35s 0.45s ease-out forwards;
}

@keyframes success-circle-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes success-mark-draw {
    to { stroke-dashoffset: 0; }
}

/* --- Rueckfragen und Meldungen im Lumina-Stil (assets/js/confirm-dialog.js) ---
   Liegt ueber normalen Popups (1000), aber unter dem Erfolgs-Popup (1100). */
.lumina-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.18s ease;
}
.lumina-dialog-overlay.visible { opacity: 1; }
.lumina-dialog {
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem 1.75rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
    transform: scale(0.94);
    transition: transform 0.18s ease;
}
.lumina-dialog-overlay.visible .lumina-dialog { transform: scale(1); }
.lumina-dialog-danger, .lumina-dialog-error { border-top-color: var(--danger); }
.lumina-dialog-title { margin: 0 0 0.6rem; font-size: 1.2rem; color: var(--gold); }
.lumina-dialog-error .lumina-dialog-title, .lumina-dialog-danger .lumina-dialog-title { color: var(--danger); }
.lumina-dialog-text { margin: 0 0 1rem; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; }
.lumina-dialog-input { width: 100%; margin: 0 0 1rem; resize: vertical; font-family: inherit; }
.lumina-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0.6rem; }
body.lumina-dialog-open { overflow: hidden; }
.text-muted.error { color: var(--danger); }

.hero {
    text-align: center;
    padding: 4rem 1rem;
}

.hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card .icon-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(201, 162, 39, 0.15);
    color: var(--gold);
    flex-shrink: 0;
}

.stat-card > div:last-child { min-width: 0; }
.stat-card h3 { margin: 0 0 0.15rem; color: var(--text); font-size: 1rem; overflow-wrap: break-word; }
.stat-card p { margin: 0; overflow-wrap: break-word; }

.raid-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.raid-header h2 { margin: 0; }

.raid-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.raid-group {
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
}

.raid-group h3 { margin: 0 0 0.5rem; font-size: 0.95rem; color: var(--text); }
.raid-group ul { margin: 0; padding: 0; list-style: none; }
.raid-group li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
    min-width: 0;
}

/* Name bleibt neben dem Klassen-Icon; zu lange Namen werden mit "…" gekuerzt
   (voller Name im Tooltip), statt unter das Icon umzubrechen. */
.raid-signup-name {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.raid-group li .class-icon { flex-shrink: 0; }

/* Mobile-/Touch-Alternative zum Drag&Drop: natives HTML5-Drag&Drop funktioniert
   auf Touch-Geraeten nicht, daher gibt es im Editor-Modus zusaetzlich dieses
   Dropdown pro Spieler. Ausserhalb des Editor-Modus bleibt es versteckt. */
.raid-move-select {
    display: none;
    width: auto;
    max-width: 110px;
    margin-left: auto;
    padding: 0.15rem 0.3rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

.raid-card.editing .raid-move-select { display: block; }

@media (max-width: 480px) {
    .raid-move-select {
        max-width: none;
        flex: 1 1 100%;
        margin-left: 1.75rem;
    }
}

.class-icon {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.class-icon-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 0.5rem;
    flex-shrink: 0;
    font-size: 1rem;
}

.raid-group-bench { border-style: dashed; }

.raid-signup-pending { color: var(--text-muted); font-style: italic; }

.raid-declined {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.raid-meta-line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.raid-meta-line .icon { color: var(--text-muted); }

.panel-archived { opacity: 0.7; }

.raid-signup-note {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.raid-signup-form {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.raid-signup-form select { width: auto; }

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* --- Reports: eigenes "Nach Nutzer filtern"-Dropdown mit Avataren --- */

/* .panel triggert per backdrop-filter eine eigene Stacking-Context - ohne diese Regel
   waere das Dropdown-Popup (obwohl z-index:500) im nachfolgenden .panel (Tabelle)
   "gefangen" und wuerde dahinter gerendert, siehe Kommentar bei .user-filter-panel. */
.panel-filter-bar {
    position: relative;
    z-index: 20;
}

.user-filter {
    position: relative;
    max-width: 320px;
    margin-top: 0.75rem;
}

.user-filter-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* background explizit wiederholen: sonst gewinnt button:hover (Gold-Flaeche), siehe .icon-button */
.user-filter-trigger:hover { background: var(--bg-panel-alt); border-color: var(--gold); color: var(--text); }

.user-filter-trigger.open {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.user-filter-trigger > .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.15s ease;
}

.user-filter-trigger.open > .icon { transform: rotate(180deg); color: var(--gold); }

.user-filter-trigger-content,
.user-filter-option-visual {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    overflow: hidden;
}

.user-filter-option-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-filter-all-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--bg-panel);
    color: var(--text-muted);
    flex-shrink: 0;
}

.user-filter-all-icon .icon { width: 14px; height: 14px; }

.user-filter-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    z-index: 500;
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.5rem;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.user-filter-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.user-filter-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    width: 100%;
    background: none;
    border: none;
    border-radius: 6px;
    padding: 0.45rem 0.6rem;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease;
}

.user-filter-option:hover { background: var(--bg-panel-alt); color: var(--text); }

.user-filter-option.selected {
    background: rgba(201, 162, 39, 0.15);
    color: var(--gold);
    font-weight: 600;
}

.user-filter-option > .icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--gold);
    opacity: 0;
    transition: opacity 0.12s ease;
}

.user-filter-option.selected > .icon { opacity: 1; }

.filter-tab {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-panel-alt);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.filter-tab:hover { color: var(--text); text-decoration: none; }

.filter-tab.active {
    background: rgba(201, 162, 39, 0.15);
    border-color: var(--gold);
    color: var(--gold);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

/* Kaesten nebeneinander gleich hoch, der Button sitzt jeweils unten auf gleicher Hoehe */
.profile-card { display: flex; flex-direction: column; }
.profile-card-form { display: flex; flex-direction: column; flex: 1; }
.profile-card-button { margin-top: auto; width: 13rem; max-width: 100%; }

.discord-card {
    border: 1px solid var(--discord);
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.16), var(--bg-panel) 65%);
}

.discord-card-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.discord-card-header h2 { margin: 0 0 0.3rem; color: var(--discord); }

.discord-logo { color: var(--discord); flex-shrink: 0; }

.discord-connect-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--discord);
    color: #fff;
}

.discord-connect-button:hover { background: var(--discord-hover); color: #fff; }
.discord-connect-button .discord-logo { color: #fff; }

@media (max-width: 700px) {
    .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .app-shell {
        flex-direction: column;
        min-height: 0;
    }

    /* Die Sidebar selbst wird auf schmalen Bildschirmen zur ausklappbaren
       Schublade: per Default ausserhalb des Viewports (transform), das
       ".open"-Klasse (via assets/js/nav.js) schiebt sie rein. Sie behaelt
       dabei exakt die gleiche Optik/Beschriftung wie am Desktop. */
    .mobile-topbar { display: flex; }
    .sidebar-toggle { display: inline-flex; }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(280px, 82vw);
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 1000;
        padding: 1.25rem 1rem;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    }

    .sidebar-backdrop.open { display: block; }
}

/* --- Raid-Verwaltung: Icon-Buttons, Editor-Modus, Modal, Drag & Drop --- */

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
}

/* background explizit wiederholen: sonst gewinnt die globale "button:hover"-Regel
   (Gold-Flaeche) fuer die Hover-Hintergrundfarbe, da .icon-button sie nur im
   Ruhezustand setzt. */
.icon-button:hover { color: var(--gold); border-color: var(--gold); background: var(--bg-panel-alt); }

.icon-button-danger:hover { color: var(--danger); border-color: var(--danger); }

.raid-card.editing .raid-edit-toggle { color: var(--gold); border-color: var(--gold); }

.raid-edit-panel {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-panel-alt);
    border: 1px dashed var(--border);
    border-radius: 8px;
}

.raid-card.editing .raid-edit-panel { display: block; }

.raid-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.raid-edit-requirements { margin-bottom: 1rem; }

.raid-edit-requirements textarea {
    resize: vertical;
    min-height: 4.5rem;
    font-family: inherit;
}

.raid-edit-form .actions { align-items: center; }

.group-editor { margin-bottom: 1rem; }

.group-editor-rows {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.5rem 0 0.75rem;
}

.group-editor-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.group-editor-name {
    flex: 1;
    min-width: 0;
}

.group-editor-lock {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.group-editor-lock.checked {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(201, 162, 39, 0.15);
}

.group-editor-lock-checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.group-editor-remove { flex-shrink: 0; }

.raid-premade-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.raid-premade-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.raid-premade-row select { width: auto; }

.premade-roster {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 0.75rem 0 0;
}

@media (max-width: 480px) {
    .premade-roster { grid-template-columns: 1fr; }
}

/* Rechteck mit angeschraegten Ecken (Parallelogramm-Anmutung) statt eines reinen
   Rechtecks. clip-path schneidet dabei auch einen ggf. gesetzten "border" weg,
   deshalb simuliert ein aeusseres (Rahmenfarbe) + inneres (Fuellfarbe) Element
   in Kombination einen sauber umlaufenden Rahmen. */
.premade-slot {
    background: var(--border);
    padding: 1.5px;
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

.premade-slot-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 100%;
    min-height: 64px;
    padding: 0.7rem 1rem;
    background: var(--bg-panel-alt);
    clip-path: polygon(13px 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%, 0 13px);
}

.premade-slot-lead { background: var(--gold); }
.premade-slot-lead .premade-slot-inner { background: #332b18; }

.premade-slot-pending .premade-slot-inner { color: var(--text-muted); }

.premade-slot-empty .premade-slot-inner { justify-content: center; }

.premade-slot-empty:not(.premade-slot-invitable) { opacity: 0.4; }

.premade-slot-placeholder {
    color: var(--text-muted);
    font-size: 1.3rem;
}

.premade-slot-invite-btn {
    background: none;
    border: none;
    padding: 1rem 2rem;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.premade-slot-invite-btn:hover { background: none; box-shadow: none; color: var(--gold); }

/* Bearbeiten-Modus: Verwaltung (Einladen, Entfernen, Umbenennen, ...) erst nach Klick auf den Stift */
.premade-panel:not(.is-editing) .premade-edit-only,
.premade-panel.is-editing .premade-view-only { display: none; }
.premade-panel:not(.is-editing) .premade-slot-invitable { opacity: 0.4; }
.premade-edit-toggle[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
/* Stift so hoch wie das Mitglieder-Badge daneben */
.premade-panel .raid-header .badge-group { align-items: stretch; }
.premade-panel .raid-header .badge { display: inline-flex; align-items: center; }
.premade-edit-toggle { width: auto; height: auto; min-height: 0; padding: 0 0.4rem; border-radius: 4px; }
.premade-edit-toggle svg { width: 14px; height: 14px; }

/* Reserve (6. Platz): eigener Rahmen und ein Schild oben rechts, damit sie nicht wie ein
   weiterer Platz der Gruppe wirkt. Die Ecke oben rechts schneidet der clip-path nicht an. */
.premade-slot-reserve { background: #4b5d78; }
.premade-slot-reserve .premade-slot-inner { position: relative; background: #262a31; }
.premade-reserve-tag {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.05rem 0.45rem 0.1rem;
    border-bottom-left-radius: 6px;
    background: #4b5d78;
    color: #e8edf5;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Drag & Drop im Bearbeiten-Modus: moegliche Ziele leicht gold, das Ziel unter der Maus voll */
.premade-panel.is-editing .premade-slot[data-slot-user] { cursor: grab; }
.premade-slot.is-dragging { opacity: 0.45; }
.premade-slot.is-drop-candidate { background: rgba(201, 162, 39, 0.55); }
.premade-slot.is-drop-candidate.premade-slot-empty,
.premade-panel.is-editing .premade-slot-droppable { opacity: 1; }
.premade-slot.is-drop-over { background: var(--gold); }
.premade-slot.is-drop-over .premade-slot-inner { background: #3a3220; }
.premade-slot-drop-hint { color: var(--text-muted); font-size: 0.8rem; }
.premade-drag-hint { margin: 0; }

/* Dashboard: mehrere eigene Premades untereinander */
.dashboard-premade-name { margin: 1rem 0 0; font-size: 1rem; color: var(--text-muted); }

/* ---- Premade-Banner (includes/premade_banner.php): oben auf der Karte, im Dashboard, in Raids ---- */
.premade-banner {
    display: flex;
    align-items: flex-end;
    min-height: 150px;
    margin: -1.5rem -2rem 1.25rem;
    padding: 1rem 2rem 0.9rem;
    border-radius: 10px 10px 0 0;
    background-image: linear-gradient(to top, rgba(12, 12, 12, 0.9), rgba(12, 12, 12, 0.12) 70%), var(--banner-image);
    background-size: cover;
    background-position: center, center var(--banner-focus, 50%);
    background-repeat: no-repeat;
}
.premade-banner .raid-header { width: 100%; }
.premade-banner h2, .premade-banner h3 { margin: 0; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85); }
.premade-banner .badge { background: rgba(0, 0, 0, 0.55); border-color: rgba(255, 255, 255, 0.25); color: #eee; }
.premade-banner .icon-button { background: rgba(0, 0, 0, 0.5); }
.premade-banner-small { min-height: 90px; margin: 0.75rem 0; padding: 0.75rem 1rem; border-radius: 8px; }
.premade-banner-small h3 { font-size: 1.05rem; }
@media (max-width: 600px) {
    .premade-banner { min-height: 110px; }
}

.premade-banner-edit { margin: 0.25rem 0 0.5rem; }
.premade-banner-edit > summary { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; font-weight: 600; }
.premade-banner-edit > summary .icon { width: 16px; height: 16px; }
.premade-banner-edit[open] > summary { margin-bottom: 0.75rem; }
.premade-banner-form { gap: 0.75rem; }
.premade-banner-preview {
    display: flex;
    align-items: flex-end;
    min-height: 120px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-image: linear-gradient(to top, rgba(12, 12, 12, 0.9), rgba(12, 12, 12, 0.12) 70%), var(--banner-image, none);
    background-size: cover;
    background-position: center, center var(--banner-focus, 50%);
    background-repeat: no-repeat;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}
.premade-banner-preview.is-empty { background: var(--bg-panel-alt); color: var(--text-muted); text-shadow: none; }
.premade-banner-focus-label { display: flex; align-items: center; gap: 0.75rem; }
.premade-banner-focus-label input { flex: 1; }
.premade-banner-focus-label input:disabled { opacity: 0.4; }
.premade-banner-none { display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--text-muted); }
.premade-banner-upload { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.75rem; }

/* Raid-Gruppe, die wie eine Premade mit Banner heisst (includes/raid_card.php) */
.raid-group-premade h3 {
    margin: -1rem -1rem 0.6rem;
    padding: 0.9rem 1rem;
    border-radius: 8px 8px 0 0;
    background-image: linear-gradient(to right, rgba(12, 12, 12, 0.85), rgba(12, 12, 12, 0.35)), var(--banner-image);
    background-size: cover;
    background-position: center, center var(--banner-focus, 50%);
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}
.raid-group-premade h3 .raid-group-count { color: rgba(255, 255, 255, 0.75); }
.dashboard-premade-name:first-of-type { margin-top: 0.5rem; }

/* Klasse wechseln: Symbol im eigenen Platz, oeffnet die Klassenauswahl */
.premade-slot .premade-class-switch { color: var(--gold); }
.premade-slot .icon-button:disabled:hover { background: var(--bg-panel-alt); border-color: var(--border); color: var(--text-muted); }

.premade-invite-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 340px;
    overflow-y: auto;
    margin: 1.25rem 0;
}

.premade-invite-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    width: 100%;
}

.premade-invite-option:hover { border-color: var(--gold); color: #1a1a1a; }
.premade-invite-option[hidden] { display: none; }

.premade-slot-name {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    gap: 0.1rem;
}

.premade-slot-class {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.premade-slot-class-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.premade-slot-name strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
}

.premade-slot-name .text-muted { font-size: 0.78rem; }

.premade-crown {
    display: inline-flex;
    color: var(--gold);
    flex-shrink: 0;
    margin-left: auto;
}

.premade-crown .icon { width: 18px; height: 18px; }

.premade-slot .icon-button {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    margin-left: auto;
}

.premade-slot .icon-button .icon { width: 14px; height: 14px; }

.premade-invite-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}

.premade-invite-row:last-child { border-bottom: none; }

.premade-manage {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
}

/* Umbenennen- und Leitung-Zeile gleich breit: feste Button-Breite, Feld fuellt den Rest */
.premade-manage .raid-premade-row > input[type="text"],
.premade-manage .raid-premade-row > .member-picker { flex: 1 1 160px; min-width: 0; }
.premade-manage .raid-premade-row > button { flex: 0 0 11.5rem; }
@media (max-width: 560px) {
    .premade-manage .raid-premade-row > button { flex: 1 1 100%; }
}

.raid-empty-hint { margin: 0; }

/* Drag & Drop nur optisch aktiv, wenn die Karte im Editor-Modus ist */
.raid-card.editing .raid-signup-item { cursor: grab; }
.raid-signup-item.dragging { opacity: 0.4; }

.raid-drop-zone { transition: background 0.15s ease, border-color 0.15s ease; }
.raid-card.editing .raid-drop-zone.drag-over {
    background: rgba(201, 162, 39, 0.15);
    border-color: var(--gold);
}

/* Gesperrte Gruppen nehmen im Editor-Modus keine Drag&Drop-Ziele an. */
.raid-card.editing .raid-drop-zone.raid-group-locked {
    cursor: not-allowed;
    opacity: 0.6;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.03),
        rgba(255, 255, 255, 0.03) 6px,
        transparent 6px,
        transparent 12px
    );
}

/* --- Anmelde-Popup --- */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    padding: 1rem;
    display: none;
}

/* Das "hidden"-Attribut steuert die Sichtbarkeit; ohne diese Regel würde
   "display: flex" das Standard-UA-"display: none" von [hidden] überstimmen
   und das Popup waere immer sichtbar. */
.modal-overlay:not([hidden]) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.modal .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.class-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    margin: 1.25rem 0;
}

@media (max-width: 480px) {
    .class-picker { grid-template-columns: repeat(2, 1fr); }
}

/* Grid statt Flex-Wrap, damit jede Wunschgruppen-Kachel unabhaengig von ihrer
   Textlaenge exakt die gleiche Spaltenbreite bekommt (wie beim Klassen-Picker). */
.group-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
    margin: 0.75rem 0 1.25rem;
}

.group-picker-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.5rem 1.1rem;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.group-picker-option:hover {
    border-color: var(--gold);
    transform: translateY(-1px);
}

.group-picker-option.selected {
    border-color: var(--gold);
    background: rgba(201, 162, 39, 0.18);
    color: var(--gold);
    font-weight: 600;
    box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.4);
}

.group-picker-option.locked,
.group-picker-option:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: var(--text-muted);
}

.group-picker-option.locked:hover,
.group-picker-option:disabled:hover {
    border-color: var(--border);
    transform: none;
}

/* Grid-Zellen sind gleich breit (1fr), aber Buttons schrumpfen sich sonst
   ueber die globale "button"-Regel auf ihre Textbreite (width: fit-content)
   und wirken dadurch unterschiedlich gross - deshalb hier explizit 100%. */
.class-picker-option {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding: 0.85rem 0.5rem;
    min-height: 96px;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    cursor: pointer;
    font-size: 0.8rem;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.class-picker-option:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.class-picker-option.selected {
    border-color: var(--gold);
    background: rgba(201, 162, 39, 0.15);
    color: var(--gold);
    box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.4), 0 4px 12px rgba(0, 0, 0, 0.25);
}

.group-picker-option:focus-visible,
.class-picker-option:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* Einheitlicher Rahmen um jedes Klassen-Icon, damit alle Kaestchen trotz
   unterschiedlicher Icon-Formen/-Kontraste gleich wirken. */
.class-icon-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.15s ease;
}

.class-picker-option:hover .class-icon-frame,
.class-picker-option.selected .class-icon-frame {
    border-color: var(--gold);
}

.class-icon-frame img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.class-picker-label {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
}

.raid-modal-feedback {
    min-height: 1.2rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.raid-modal-feedback.success { color: var(--success); }
.raid-modal-feedback.error { color: var(--danger); }

/* --- Reports: Punktwert-Liste + "Rolle hinzufuegen"-Popup --- */

.role-weight-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.role-weight-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.role-weight-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.role-weight-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

/* flex-shrink:0 auf beiden Formularen der Zeile - sonst nimmt sich .role-weight-name (flex:1)
   den gesamten Platz und quetscht die Buttons/das Eingabefeld unter ihre Mindestbreite,
   wodurch der Speichern-Button in die naechste Zeile umbricht. */
.role-weight-row > form {
    flex-shrink: 0;
}

.role-weight-form {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
}

/* input[type="text"] (Attribut-Selektor, hoehere Spezifitaet als eine einzelne Klasse) setzt
   sonst width:100% und ueberstimmt die feste Breite hier. */
input.role-weight-input {
    width: 70px;
    text-align: center;
}

.role-picker-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 340px;
    overflow-y: auto;
    margin: 1.25rem 0;
}

.role-picker-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-panel-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    width: 100%;
}

.role-picker-option:hover { border-color: var(--gold); }

.role-picker-option input[type="checkbox"] { width: auto; flex-shrink: 0; }

.role-picker-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* --- Events: geplante Erinnerungen des Discord-Bots --- */

.app-content.bg-events {
    --page-bg: linear-gradient(rgba(20, 20, 20, 0.68), rgba(20, 20, 20, 0.82)), url('/assets/images/Landscapes/web/landscape4-bg.jpg');
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-card {
    border-left-width: 3px;
    border-left-color: var(--gold);
}

.event-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.event-card-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.2rem;
}

.event-card-header h2 .icon { color: var(--gold); }

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.event-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.event-meta-item .icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* Faellig, aber noch nicht versendet (z.B. Bot war offline) - auffaellig, aber kein Fehler. */
.event-meta-overdue { color: var(--gold); }

.event-role { font-weight: 600; }

.event-message {
    margin-top: 0.9rem;
    padding: 0.75rem 1rem;
    background: var(--bg-panel-alt);
    border-left: 3px solid var(--border);
    border-radius: 0 6px 6px 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* --- Anlegen-/Bearbeiten-Formular --- */

.event-edit-panel {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-panel-alt);
    border: 1px dashed var(--border);
    border-radius: 8px;
}

.event-card.editing .event-edit-panel { display: block; }
.event-card.editing .event-edit-toggle { color: var(--gold); border-color: var(--gold); }

.event-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.event-form-interval .event-interval-row {
    display: flex;
    gap: 0.5rem;
}

.event-interval-row input { max-width: 90px; }

.event-form-hint {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
}

.event-form-message { margin-top: 0.75rem; }

.event-form-message textarea {
    width: 100%;
    resize: vertical;
}

/* Vorschau auf die spaetere Discord-Nachricht - entspricht dem Vorschau-Schritt,
   den /event_planen im Bot vor dem Einplanen zeigt. */
.event-preview {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.event-preview-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.event-preview-ping {
    color: var(--discord);
    background: rgba(88, 101, 242, 0.12);
    border-radius: 4px;
    display: inline-block;
    padding: 0 0.25rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.event-preview-embed {
    border-left: 4px solid var(--bot-color);
    border-radius: 0 6px 6px 0;
    background: var(--bg-panel);
    padding: 0.7rem 0.9rem;
}

.event-preview-title { display: block; }

.event-preview-message {
    margin-top: 0.35rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.event-creator {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.8rem;
    font-size: 0.85rem;
}

/* --- Karte --- */

.app-content.bg-map {
    --page-bg: linear-gradient(rgba(20, 20, 20, 0.72), rgba(20, 20, 20, 0.85)), url('/assets/images/Landscapes/web/landscape8-bg.jpg');
}

/* Die Karte braucht mehr Platz als die 1100px der normalen Inhaltsspalte. */
.container-wide { max-width: 1600px; }

/* Der Viewer zeichnet auf ein Canvas in Fenstergroesse - im iframe also genau so gross
   wie der Rahmen. 4rem = oberes und unteres Padding von .container. */
.map-frame {
    display: block;
    width: 100%;
    height: calc(100vh - 4rem);
    min-height: 420px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #1a1a2e;
}

.map-setup {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.9rem 1.25rem;
    margin-bottom: 1rem;
}

.map-setup p { margin: 0; }

/* --- Login, Freischaltung, Discord-Abgleich --- */

.login-panel { text-align: center; }
.login-panel h1 { margin-bottom: 0.4rem; }

.login-discord-button {
    justify-content: center;
    width: 100%;
    margin: 1rem 0 1.25rem;
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.login-password {
    text-align: left;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.login-password summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    list-style: none;
}

.login-password summary::-webkit-details-marker { display: none; }
.login-password summary::after { content: ' ▾'; }
.login-password[open] summary::after { content: ' ▴'; }
.login-password summary:hover { color: var(--text); }
.login-password[open] summary { margin-bottom: 1rem; }

.pending-panel { text-align: center; }
.pending-panel .avatar { margin: 0 auto 0.75rem; }
.pending-actions { justify-content: center; }

.badge-pending { border-color: var(--gold); color: var(--gold); }
/* Raid seit dem letzten Besuch der Raid-Seite gepostet (includes/raid_card.php) */
.raid-new-badge { border-color: var(--gold); background: var(--gold); color: #1a1a1a; font-weight: 700; }
/* Raid-Lead: Zeile unter dem Termin, Krone in der Anmeldeliste, Hinweis beim Anlegen */
.raid-lead-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: -0.5rem 0 0.9rem; font-size: 0.9rem; color: var(--text-muted); }
.raid-lead-line a { color: var(--gold); font-weight: 600; }
.raid-lead-line .icon, .raid-lead-hint .icon { width: 16px; height: 16px; color: var(--gold); flex-shrink: 0; }
.raid-lead-tag { display: inline-flex; margin-left: 0.3rem; color: var(--gold); }
.raid-lead-tag .icon { width: 13px; height: 13px; }
.raid-lead-hint { display: flex; align-items: center; gap: 0.4rem; margin: -0.25rem 0 1rem; }

.row-pending td { background: rgba(201, 162, 39, 0.08); }

.button-small { padding: 0.35rem 0.8rem; font-size: 0.85rem; }

.discord-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.checkbox-managed { opacity: 0.75; cursor: default; }
.checkbox-managed .discord-logo { margin-left: 0.15rem; }

/* Einzelne Berechtigungen im Benutzerformular (admin/user_form.php) */
.user-permissions > summary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    list-style: none;
}
.user-permissions > summary::-webkit-details-marker { display: none; }
.user-permissions > summary::after { content: '▾'; color: var(--text-muted); }
.user-permissions[open] > summary::after { content: '▴'; }
.user-permissions > summary:hover { color: var(--gold); }
.user-permissions > * + * { margin-top: 0.6rem; }
.user-permissions > label { display: block; }
.user-permissions p { margin-bottom: 0; }
.permission-via { display: inline-flex; margin-left: -0.2rem; color: var(--text-muted); }
.permission-via .icon { width: 14px; height: 14px; }

/* Als Abzeichen auf dem Symbol - so bricht die Beschriftung nicht um und die Zahl bleibt
   auch bei eingeklappter Seitenleiste sichtbar. */
.sidebar-link { position: relative; }

.sidebar-badge {
    position: absolute;
    top: 0.25rem;
    left: 1.55rem;
    min-width: 1.1rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--gold);
    color: #1a1a1a;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
}

.settings-toggle {
    margin: 0 0 1.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-panel-alt);
}

.settings-toggle label { display: flex; align-items: center; gap: 0.5rem; margin: 0; cursor: pointer; }
.settings-toggle input { width: auto; }

/* Tabellen mit Aktionen-Spalte (Verwaltung): die letzte Spalte bleibt rechts angeheftet,
   damit Bearbeiten/Loeschen/Freischalten auch bei seitlich scrollender Tabelle sichtbar sind. */
.table-actions th:last-child,
.table-actions td:last-child {
    position: sticky;
    right: 0;
    z-index: 1;
    background: var(--bg-panel);
    box-shadow: -8px 0 8px -8px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.table-actions tr:hover td:last-child { background: var(--bg-panel-alt); }
.table-actions .row-pending td:last-child { background: #2e2a1c; }

/* Icon-Links (Bearbeiten) sollen beim Ueberfahren nicht unterstrichen werden. */
a.icon-button:hover { text-decoration: none; }

/* Aktionen-Spalte der Verwaltung: Icons und Freischalten-Knopf auf einer Linie. */
.table-actions td:last-child .actions { align-items: center; flex-wrap: nowrap; }

.discord-sync-form {
    display: flex;
    /* Formulare sind global als Spalte gesetzt - hier Knopf und Erklaerung nebeneinander. */
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0 0 1rem;
}

.discord-sync-form span { flex: 1; min-width: 240px; font-size: 0.85rem; }

/* Benutzerverwaltung: "Neuen Benutzer anlegen" und "Jetzt mit Discord abgleichen" gleich breit untereinander,
   die Erklaerung zum Abgleich rechts daneben (das Formular selbst bildet kein eigenes Kaestchen) */
.user-admin-actions { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.6rem 1rem; align-items: center; margin: 0 0 1rem; }
.user-admin-actions .discord-sync-form { display: contents; }
.user-admin-actions .button { grid-column: 1; width: 100%; justify-content: center; }
.user-admin-actions .discord-sync-form span { grid-column: 2; min-width: 0; }
@media (max-width: 560px) {
    .user-admin-actions { grid-template-columns: minmax(0, 1fr); }
    .user-admin-actions .discord-sync-form span { grid-column: 1; }
}

.flash-info { background: rgba(201, 162, 39, 0.12); border: 1px solid var(--gold); color: var(--gold); }

/* --- Lagerhaus --- */

.app-content.bg-warehouse {
    --page-bg: linear-gradient(rgba(20, 20, 20, 0.7), rgba(20, 20, 20, 0.85)), url('/assets/images/Landscapes/web/landscape6-bg.jpg');
}

.warehouse-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.warehouse-head h1, .warehouse-head h2 { margin-bottom: 0.25rem; }
.warehouse-head p { margin-top: 0; }

.warehouse-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
}

.warehouse-filters input { flex: 1; min-width: 220px; }
.warehouse-filters select { width: auto; min-width: 200px; }

th.num, td.num { text-align: right; white-space: nowrap; }

.warehouse-no-match { margin-top: 0.75rem; }

.warehouse-pages {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.page-link {
    min-width: 2.1rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-panel-alt);
    color: var(--text);
    text-align: center;
}

a.page-link:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
.page-link.active { border-color: var(--gold); background: var(--gold); color: #1a1a1a; font-weight: 700; }
.page-link.disabled { opacity: 0.4; }
.page-gap { padding: 0 0.2rem; color: var(--text-muted); }

.warehouse-row,
.warehouse-counterpart {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.warehouse-counterpart + .field-hint { margin: -0.25rem 0 0.75rem; }

.warehouse-new-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--gold);
    border-radius: 6px;
    background: rgba(201, 162, 39, 0.08);
}

.warehouse-new-item label { margin: 0; }
.warehouse-new-item select { width: auto; }

@media (max-width: 600px) {
    .warehouse-row, .warehouse-counterpart { grid-template-columns: 1fr; }
}

/* Bestand als Kacheln: Bild mit Menge, darunter Name und Kategorie */
.warehouse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.warehouse-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(35, 35, 35, 0.72);
    transition: border-color 0.15s, transform 0.15s;
}

.warehouse-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.warehouse-card[hidden] { display: none; }

.warehouse-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    flex: 1;
    padding: 0.9rem 0.6rem 0.6rem;
    color: var(--text);
    text-align: center;
}

.warehouse-card-link:hover { text-decoration: none; color: var(--text); }

.warehouse-card-image { position: relative; display: inline-block; }

.warehouse-card-qty {
    position: absolute;
    right: -0.5rem;
    bottom: -0.35rem;
    min-width: 1.6rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: var(--gold);
    color: #1a1a1a;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.3rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.warehouse-card-name {
    margin-top: 0.3rem;
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.warehouse-card-category { font-size: 0.75rem; color: var(--text-muted); }

.warehouse-card-actions {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    padding: 0 0.6rem 0.7rem;
}

.warehouse-card-actions .icon-button { width: 30px; height: 30px; font-size: 1.05rem; }

.warehouse-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
    background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.35));
    object-fit: contain;
}

.warehouse-icon-placeholder { color: var(--text-muted); border: 1px dashed var(--border); }
.warehouse-icon-placeholder .icon { width: 45%; height: 45%; }

.warehouse-item-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Lumipunkte --- */

.app-content.bg-contributions {
    --page-bg: linear-gradient(rgba(20, 20, 20, 0.7), rgba(20, 20, 20, 0.86)), url('/assets/images/Landscapes/web/landscape2-bg.jpg');
}

.contribution-coin { display: inline-block; vertical-align: -0.2em; flex-shrink: 0; }

.contribution-hero {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

.contribution-hero-coin { filter: drop-shadow(0 4px 10px rgba(201, 162, 39, 0.35)); }
.contribution-hero-text { flex: 1; min-width: 220px; }
.contribution-hero-text h1 { margin: 0 0 0.25rem; }
.contribution-hero-text p { margin: 0; }

.contribution-hero-balance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.85rem;
}

.contribution-hero-balance strong {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.8rem;
    color: var(--gold);
}

.contribution-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-bottom: 1rem;
}

.contribution-head h1, .contribution-head h2 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
}

.contribution-head input[type="search"] { width: auto; min-width: 240px; }

.contribution-filter-balance {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: rgba(201, 162, 39, 0.15);
    font-size: 1rem;
}

/* Rangliste */
.contribution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
}

.contribution-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(35, 35, 35, 0.72);
    transition: border-color 0.15s, transform 0.15s;
}

.contribution-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.contribution-card[hidden] { display: none; }
.contribution-card.is-me { border-color: rgba(201, 162, 39, 0.6); background: rgba(201, 162, 39, 0.08); }
.contribution-card.rank-1 { box-shadow: 0 0 0 1px #e8c35a inset, 0 0 18px rgba(232, 195, 90, 0.25); }
.contribution-card.rank-2 { box-shadow: 0 0 0 1px #c9ced6 inset; }
.contribution-card.rank-3 { box-shadow: 0 0 0 1px #c98a55 inset; }

.contribution-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem 0.6rem 0.8rem;
    color: var(--text);
    text-align: center;
}

.contribution-card-link:hover { color: var(--text); text-decoration: none; }

.contribution-rank {
    position: absolute;
    top: 0.45rem;
    left: 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.rank-1 .contribution-rank { color: #e8c35a; }
.rank-2 .contribution-rank { color: #c9ced6; }
.rank-3 .contribution-rank { color: #c98a55; }

.contribution-card-name { font-weight: 600; font-size: 0.9rem; overflow-wrap: anywhere; }

.contribution-card-points {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 700;
    color: var(--gold);
}

.contribution-card-add {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 26px;
    height: 26px;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.15s;
}

.contribution-card:hover .contribution-card-add,
.contribution-card-add:focus { opacity: 1; }
a.contribution-card-add:hover { text-decoration: none; }

@media (hover: none) {
    .contribution-card-add { opacity: 1; }
}

/* Verlauf der Vergaben */
.contribution-awards { display: flex; flex-direction: column; gap: 0.6rem; }

.contribution-award {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(35, 35, 35, 0.6);
}

.contribution-award-points {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 76px;
    gap: 0.15rem;
    font-size: 0.75rem;
}

.contribution-award-points strong { font-size: 1.25rem; color: var(--success); }
.contribution-award-points.negative strong { color: var(--danger); }

.contribution-award-body { flex: 1; min-width: 0; }

.contribution-award-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.contribution-award-note { margin: 0.3rem 0 0; font-size: 0.9rem; }
.contribution-award-meta { margin-top: 0.3rem; font-size: 0.8rem; }

.contribution-badge-raid { border-color: #d9534f; color: #ff8a86; }
.contribution-badge-event { border-color: var(--discord); color: #9aa3ff; }
.contribution-badge-other { border-color: var(--border); }
.contribution-badge-activity { border-color: var(--success); color: #7ddc8a; }
.contribution-badge-daily { border-color: #c9a227; color: #f3d77a; }

.contribution-award-members { margin-top: 0.4rem; font-size: 0.85rem; }
.contribution-award-members summary { cursor: pointer; color: var(--text-muted); }
.contribution-award-members[open] summary { margin-bottom: 0.4rem; }

.contribution-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.contribution-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.3rem 0.15rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-panel-alt);
}

.contribution-chip.highlight { border-color: var(--gold); }
.contribution-chip a { color: var(--text); }

button.contribution-chip-remove {
    padding: 0 0.3rem;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

button.contribution-chip-remove:hover { background: none; color: var(--danger); }

.contribution-award-delete { flex-shrink: 0; }

.contribution-pages {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Formular */
.contribution-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.contribution-form-wide { grid-column: 1 / -1; }
.contribution-form-grid [hidden] { display: none; }

.contribution-picker-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.contribution-picker-head label { margin-right: auto; }
.contribution-picker-head input[type="search"] { width: auto; min-width: 200px; }
.contribution-picker-count { font-weight: 400; color: var(--text-muted); }
.contribution-raid-info { margin: 0.5rem 0 0; }

.contribution-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.4rem;
    margin-top: 0.6rem;
    max-height: 420px;
    overflow-y: auto;
    padding: 0.2rem;
}

.contribution-pick {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.contribution-pick[hidden] { display: none; }
.contribution-pick input { width: auto; }
.contribution-pick.checked { border-color: var(--gold); background: rgba(201, 162, 39, 0.1); }
.contribution-pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contribution-pick-points { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.8rem; color: var(--text-muted); }

/* Lumipunkte als Kaestchen ueber dem Profil (ueber dem Strich der Fusszeile) */
.sidebar-points {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgba(201, 162, 39, 0.45);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.16), rgba(201, 162, 39, 0.04));
    color: var(--text);
    transition: border-color 0.15s, background 0.15s;
}
.sidebar-points:hover {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.24), rgba(201, 162, 39, 0.06));
    color: var(--text);
    text-decoration: none;
}
.sidebar-points img { flex-shrink: 0; filter: drop-shadow(0 2px 5px rgba(201, 162, 39, 0.35)); }
.sidebar-points > span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sidebar-points-label { font-size: 0.72rem; color: var(--text-muted); }
.sidebar-points strong { font-size: 1.2rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.sidebar-points + .sidebar-footer { margin-top: 0.85rem; }

@media (max-width: 700px) {
    .contribution-form-grid { grid-template-columns: 1fr; }
    .contribution-hero-balance { align-items: flex-start; }
    .contribution-award { flex-wrap: wrap; }
}

.contribution-more { display: flex; justify-content: center; margin-top: 1rem; }
.contribution-card[hidden] { display: none; }

.contribution-top-label {
    padding: 0.1rem 0.5rem;
    border: 1px solid var(--gold);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.contribution-own { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.contribution-own h3 { margin: 0 0 0.6rem; font-size: 1rem; }
.contribution-limit-note { margin: 1rem 0 0; font-size: 0.85rem; }

/* --- Raids: Anwesenheit und automatische Lumipunkte --- */

.raid-points-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.raid-points-fields label { display: flex; align-items: center; gap: 0.35rem; }
.raid-points-fields .field-hint { grid-column: 1 / -1; margin: 0; }

.raid-attendance-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.25rem 0 0.75rem;
}

a.button-small:hover { text-decoration: none; }
.raid-auto-points { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.85rem; }
.raid-points-fixed { display: flex; align-items: center; gap: 0.35rem; margin: 0 0 1rem; }

/* Raid erstellen: Gruppen mit optionaler Premade */
.group-editor > .field-hint { margin: 0.25rem 0 0; }
.group-editor-premade { flex: 0 1 13rem; width: auto; min-width: 0; }
.group-editor-name[readonly] { color: var(--gold); }
@media (max-width: 600px) {
    .group-editor-row:has(.group-editor-premade) { flex-wrap: wrap; }
    .group-editor-premade { flex: 1 1 100%; order: 3; }
}

/* Live-Aktualisierung: geaenderte Karte leuchtet kurz auf */
.raid-card-updated { animation: raid-card-flash 1.6s ease; }
@keyframes raid-card-flash {
    from { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px rgba(201, 162, 39, 0.35); }
}
.raid-live-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.attendance-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.attendance-head h1 { margin-bottom: 0.2rem; }
.attendance-head p { margin-top: 0; }

.attendance-status {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-panel-alt);
    font-size: 0.9rem;
}

.attendance-auto { display: inline-flex; align-items: center; gap: 0.35rem; }

.attendance-bulk {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.attendance-list { display: flex; flex-direction: column; gap: 0.35rem; }

.attendance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(35, 35, 35, 0.6);
}

.attendance-person { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem 0.6rem; }
.attendance-person .text-muted { font-size: 0.85rem; }

.attendance-choice { display: flex; gap: 0.3rem; }

.attendance-option {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.attendance-option input { position: absolute; opacity: 0; pointer-events: none; }
.attendance-option:hover { border-color: var(--text-muted); }
.attendance-present:has(input:checked) { border-color: var(--success); background: rgba(76, 175, 80, 0.2); color: #8fdc92; }
.attendance-absent:has(input:checked) { border-color: var(--danger); background: rgba(217, 83, 79, 0.2); color: #ff9b97; }
.attendance-none:has(input:checked) { border-color: var(--text-muted); background: var(--bg-panel-alt); }
.attendance-option:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

.attendance-add { display: flex; flex-direction: column; gap: 0.3rem; max-width: 420px; }

@media (max-width: 600px) {
    .raid-points-fields { grid-template-columns: 1fr; }
}

.contribution-raid-mode {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.contribution-raid-mode[hidden] { display: none; }
.contribution-raid-mode .button-small.active { border-color: var(--gold); color: var(--gold); }

/* Kina im Lagerhaus */
.warehouse-kina {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid rgba(201, 162, 39, 0.5);
    border-radius: 10px;
    background: rgba(201, 162, 39, 0.08);
}

.warehouse-kina > div:not(.warehouse-kina-actions) { display: flex; flex-direction: column; line-height: 1.2; }
.warehouse-kina .text-muted { font-size: 0.8rem; }
.warehouse-kina strong { font-size: 1.35rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.warehouse-kina .warehouse-icon { background: none; }
.warehouse-kina-actions { display: flex; flex-direction: column; gap: 0.3rem; margin-left: 0.5rem; }

/* --- Lumishop --- */
.app-content.bg-shop {
    --page-bg: linear-gradient(rgba(20, 20, 20, 0.7), rgba(20, 20, 20, 0.86)), url('/assets/images/Landscapes/web/landscape7-bg.jpg');
}

.shop-reserved { font-size: 0.75rem; margin-top: 0.1rem; }
.shop-hero-actions { display: flex; flex-direction: column; gap: 0.4rem; }
/* Beide Buttons ("Antraege", "Shop verwalten") gleich breit und hoch */
.shop-hero-actions .button { width: 11.5rem; max-width: 100%; }
.shop-hero-actions .button-secondary { border-color: var(--border); }

.shop-count {
    display: inline-block;
    min-width: 1.2rem;
    margin-left: 0.2rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #1a1a1a;
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2rem;
    text-align: center;
}
.button-secondary .shop-count { background: var(--gold); color: #1a1a1a; }

/* Info-Blase zu Gegenstaenden im Lagerhaus und Lumishop: Spieldaten von aion2hub (assets/js/item-tooltip.js) */
.item-tip {
    position: fixed;
    z-index: 3000;
    min-width: 220px;
    max-width: 300px;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(201, 162, 39, 0.55);
    border-radius: 10px;
    background: rgba(18, 18, 18, 0.97);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
    color: var(--text);
    font-size: 0.82rem;
    line-height: 1.4;
    pointer-events: none;
}
.item-tip[hidden] { display: none; }
.item-tip-head { display: flex; align-items: center; gap: 0.65rem; }
.item-tip-head .warehouse-icon { flex-shrink: 0; border-radius: 8px; }
.item-tip-title { display: flex; flex-direction: column; min-width: 0; }
.item-tip-title strong { font-size: 0.95rem; line-height: 1.25; overflow-wrap: anywhere; }
.item-tip-title strong:not([class]) { color: var(--gold); }
.item-tip-sub { color: var(--text-muted); font-size: 0.75rem; }
.item-tip-stats {
    list-style: none;
    margin: 0.55rem 0 0;
    padding: 0.45rem 0 0;
    border-top: 1px solid var(--border);
}
.item-tip-stats li,
.item-tip-lines div { display: flex; justify-content: space-between; gap: 1rem; }
.item-tip-value { color: #7ddc8a; font-weight: 600; white-space: nowrap; }
.item-tip-text { margin: 0.55rem 0 0; padding-left: 0.5rem; border-left: 2px solid rgba(201, 162, 39, 0.35); color: var(--text-muted); font-style: italic; overflow-wrap: anywhere; }
.item-tip-lines {
    display: grid;
    gap: 0.2rem;
    margin: 0.55rem 0 0;
    padding-top: 0.45rem;
    border-top: 1px solid var(--border);
}
.item-tip-lines dt { color: var(--text-muted); white-space: nowrap; }
.item-tip-lines dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.item-tip-lines dd .contribution-coin { vertical-align: -2px; }
.item-tip-note { color: var(--text-muted); }
.item-tip-source { margin-top: 0.5rem; color: var(--text-muted); font-size: 0.68rem; text-align: right; }

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.85rem;
}

.shop-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1rem 0.75rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(35, 35, 35, 0.72);
    text-align: center;
    transition: border-color 0.15s, transform 0.15s;
}
.shop-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.shop-card[hidden] { display: none; }
.shop-card.sold-out { opacity: 0.55; }
.shop-card.sold-out:hover { transform: none; border-color: var(--border); }

.shop-card-image { display: inline-block; }
.shop-card-name { margin-top: 0.3rem; font-weight: 600; font-size: 0.92rem; line-height: 1.25; overflow-wrap: anywhere; }
.shop-card-description { font-size: 0.8rem; color: var(--text-muted); line-height: 1.35; overflow-wrap: anywhere; }

.shop-card-price {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: auto;
    padding-top: 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold);
}
.shop-card-stock { font-size: 0.75rem; color: var(--text-muted); }
.shop-card-stock.is-empty { color: var(--danger); }
.shop-card .shop-buy { width: 100%; margin-top: 0.25rem; }

.shop-buy-title { margin: 0; font-size: 1.05rem; }
.shop-buy-total {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gold);
}
.shop-buy-hint { margin: 0; font-size: 0.85rem; }

/* Antraege */
.shop-orders { display: flex; flex-direction: column; gap: 0.6rem; }
/* Abstand zwischen den Reitern (Offen / Zur Uebergabe / Erledigt) und der Antragsliste */
.filter-tabs + .shop-orders { margin-top: 1rem; }

/* "Meine Antraege" als Kacheln: Bild + Angaben oben, Preis und Knopf unten; Statusfarbe als Linie oben */
.shop-orders-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 0.75rem; }
.shop-orders-tiles .shop-order {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon body" "price actions";
    align-items: start;
    gap: 0.7rem 0.8rem;
    border-left-width: 1px;
    border-top: 3px solid var(--border);
}
.shop-orders-tiles .shop-order-icon { grid-area: icon; }
.shop-orders-tiles .shop-order-body { grid-area: body; }
.shop-orders-tiles .shop-order-price { grid-area: price; align-self: center; margin-left: 0; }
.shop-orders-tiles .shop-order-actions { grid-area: actions; justify-self: end; align-self: center; margin-left: 0; }
.shop-orders-tiles .shop-order-pending { border-top-color: var(--gold); }
.shop-orders-tiles .shop-order-approved { border-top-color: #5fa8ff; }
.shop-orders-tiles .shop-order-delivered { border-top-color: var(--success); }
.shop-orders-tiles .shop-order-rejected { border-top-color: var(--danger); }

.shop-order {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    border-radius: 8px;
    background: rgba(35, 35, 35, 0.72);
}
.shop-order-pending { border-left-color: var(--gold); }
.shop-order-approved { border-left-color: #5fa8ff; }
.shop-order-delivered { border-left-color: var(--success); }
.shop-order-rejected { border-left-color: var(--danger); }
.shop-order-rejected, .shop-order-cancelled { opacity: 0.75; }

.shop-order-icon { flex-shrink: 0; }
.shop-order-body { flex: 1; min-width: 0; }
.shop-order-title { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.6rem; }
.shop-order-meta { margin-top: 0.2rem; font-size: 0.8rem; }
.shop-order-buyer { color: var(--text); }
.shop-order-note { margin-top: 0.25rem; font-size: 0.88rem; overflow-wrap: anywhere; }

.shop-order-price {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}
.shop-order-price.is-paid { color: var(--gold); }

.shop-order-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }
.shop-order-actions form { display: inline; }
.shop-order-actions .button-small { display: inline-flex; align-items: center; gap: 0.3rem; }
.shop-order-actions .button-small .icon { width: 15px; height: 15px; }

.shop-order-balance { margin: 0.4rem 0 -0.3rem 0.2rem; font-size: 0.8rem; color: var(--text-muted); }
.shop-order-balance.is-short { color: var(--danger); }

.shop-badge-approved { border-color: #5fa8ff; color: #8cc0ff; }
.shop-badge-warehouse { border-color: var(--gold); color: var(--gold); }

@media (max-width: 700px) {
    .shop-order { flex-wrap: wrap; }
    .shop-order-body { flex-basis: calc(100% - 60px); }
    .shop-order-price { margin-left: 56px; }
    .shop-order-actions { margin-left: auto; }
}

/* Verwaltung */
.shop-manage-table tr.is-inactive td:not(:last-child) { opacity: 0.55; }

.shop-categories { display: flex; flex-direction: column; gap: 0.5rem; max-width: 640px; }
.shop-category-row { display: flex; align-items: center; gap: 0.5rem; }
.shop-category-form { flex-direction: row; align-items: stretch; gap: 0.5rem; flex: 1; } /* Knopf genauso hoch wie die Felder */
.shop-category-form input[type="text"] { flex: 1; min-width: 0; }
.shop-category-new { margin-top: 0.4rem; padding-top: 0.75rem; border-top: 1px dashed var(--border); }
input.shop-sort-input { width: 80px; text-align: center; }

.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; }
.checkbox-label input { width: auto; }
[data-mode-field][hidden] { display: none; }

.modal.modal-wide { max-width: 720px; }

.shop-import-price { display: flex; gap: 0.5rem; }
.shop-import-price input { flex: 1; min-width: 0; }

.shop-import-list {
    display: flex;
    flex-direction: column;
    max-height: 45vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.shop-import-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.7rem;
    border-bottom: 1px solid var(--border);
}
.shop-import-row:last-child { border-bottom: none; }
.shop-import-row label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex: 1;
    min-width: 0;
    font-weight: 400;
    cursor: pointer;
}
.shop-import-row label input { width: auto; }
.shop-import-row label span:not(.text-muted) { overflow-wrap: anywhere; }
.shop-import-row label .text-muted { margin-left: auto; font-size: 0.8rem; white-space: nowrap; }
input.shop-import-row-price { width: 100px; }
.shop-import-all { font-weight: 400; cursor: pointer; background: var(--bg-panel-alt); position: sticky; top: 0; z-index: 1; }
.shop-import-all input { width: auto; }

.contribution-badge-shop { border-color: var(--gold); color: var(--gold); }

.warehouse-card-shop {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.72rem;
    color: var(--gold);
}

#shop-item-description { font-family: inherit; }

/* Lumishop: Teilbewilligung */
.shop-order-actions .shop-approve-form { display: inline-flex; flex-direction: row; align-items: center; gap: 0.35rem; }
input.shop-approve-quantity { width: 72px; padding: 0.3rem 0.45rem; font-size: 0.9rem; }
.shop-approve-of { font-size: 0.8rem; white-space: nowrap; }
.shop-order-partial { color: var(--gold); font-weight: 600; }
.shop-order-stock { color: var(--text-muted); }
.shop-order-stock.is-short { color: var(--danger); }

/* Dashboard: eigener Bereich fuer die Lumipunkte */
.dashboard-points {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    border-color: rgba(201, 162, 39, 0.45);
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.14), rgba(35, 35, 35, 0.92) 60%);
}
.dashboard-points-coin { flex-shrink: 0; filter: drop-shadow(0 4px 10px rgba(201, 162, 39, 0.4)); }
.dashboard-points-main { min-width: 160px; }
.dashboard-points-main h2 { margin: 0; font-size: 1rem; color: var(--text-muted); font-weight: 600; }
.dashboard-points-value { font-size: 2.2rem; font-weight: 700; line-height: 1.15; color: var(--gold); font-variant-numeric: tabular-nums; }
.dashboard-points-main p { margin: 0.1rem 0 0; font-size: 0.85rem; }
.dashboard-points-shop { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; }
.dashboard-points-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-left: auto; }
/* Buttons unter den Lumipunkten: heben sich beim Drueberfahren an, leuchten golden und ein
   Lichtstreifen laeuft darueber */
.dashboard-cta {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    isolation: isolate;
    transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.3), box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.dashboard-cta .icon { transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.4); }
.dashboard-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 60%;
    height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
    z-index: -1;
}
.dashboard-cta:hover, .dashboard-cta:focus-visible {
    transform: translateY(-3px) scale(1.04);
    text-decoration: none;
}
.dashboard-cta:hover::before, .dashboard-cta:focus-visible::before { animation: dashboard-cta-shine 0.75s ease; }
.dashboard-cta:hover .icon, .dashboard-cta:focus-visible .icon { transform: scale(1.2) rotate(-8deg); }
.dashboard-cta:active { transform: translateY(-1px) scale(1.01); }
@keyframes dashboard-cta-shine { to { left: 130%; } }

/* Rangliste & Verlauf: dunkel mit Goldrand, beim Hovern goldener Schimmer */
.dashboard-cta.button-secondary:hover, .dashboard-cta.button-secondary:focus-visible {
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.28), rgba(201, 162, 39, 0.08));
    border-color: var(--gold);
    color: #f3d77a;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 18px rgba(201, 162, 39, 0.35), inset 0 0 12px rgba(201, 162, 39, 0.15);
}
.dashboard-cta.button-secondary::before { background: linear-gradient(105deg, transparent, rgba(243, 215, 122, 0.35), transparent); }

/* Zum Lumishop: Gold mit Verlauf und kraeftigem Leuchten */
.dashboard-cta-primary { background: linear-gradient(135deg, #e6c24a, var(--gold) 55%, #a8841c); }
.dashboard-cta-primary:hover, .dashboard-cta-primary:focus-visible {
    background: linear-gradient(135deg, #fff0b3, #f0cd4f 45%, var(--gold));
    color: #1a1a1a;
    box-shadow: 0 10px 26px rgba(201, 162, 39, 0.45), 0 0 30px rgba(243, 215, 122, 0.45);
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-cta, .dashboard-cta .icon { transition: background 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s; }
    .dashboard-cta:hover, .dashboard-cta:focus-visible, .dashboard-cta:hover .icon { transform: none; }
    .dashboard-cta:hover::before, .dashboard-cta:focus-visible::before { animation: none; }
}

/* Klickbares Kaestchen (z.B. "Anstehende Raids" -> Raids) */
.stat-card-link {
    position: relative;
    color: var(--text);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.stat-card-link:hover, .stat-card-link:focus-visible {
    color: var(--text);
    text-decoration: none;
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), 0 0 14px rgba(201, 162, 39, 0.2);
}
.stat-card-arrow { margin-left: auto; color: var(--text-muted); font-size: 1.2rem; transition: transform 0.2s ease, color 0.2s ease; }
.stat-card-link:hover .stat-card-arrow, .stat-card-link:focus-visible .stat-card-arrow { color: var(--gold); transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) {
    .stat-card-link:hover, .stat-card-link:focus-visible { transform: none; }
}

/* Termin eines Raids -> Kalender an diesem Tag */
.raid-calendar-link { display: inline-flex; align-items: center; gap: 0.35rem; color: inherit; }
.raid-calendar-link .icon { width: 14px; height: 14px; opacity: 0.6; transition: opacity 0.15s, color 0.15s; }
.raid-calendar-link:hover { color: var(--gold); }
.raid-calendar-link:hover .icon { opacity: 1; color: var(--gold); }

@media (max-width: 700px) {
    .shop-order-actions { flex-wrap: wrap; justify-content: flex-end; width: 100%; }
}
/* --- Fehlermeldungen (Dashboard + /bugs.php) --- */

.bug-report-details > summary {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    cursor: pointer;
    list-style: none;
}

.bug-report-details > summary::-webkit-details-marker { display: none; }

.bug-report-details > summary > span:nth-child(2) {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.bug-report-details > summary .text-muted { font-size: 0.88rem; }

.bug-panel .icon-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(201, 162, 39, 0.15);
    color: var(--gold);
    flex-shrink: 0;
}

.bug-report-details[open] .bug-report-toggle { visibility: hidden; }

.bug-form {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}

.bug-form-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 1rem;
}

.bug-form textarea { resize: vertical; font-family: inherit; }

.bug-my-list {
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border);
}

.bug-my-list h3 { margin: 0 0 0.75rem; font-size: 1rem; }

.bug-my-item {
    padding: 0.75rem 0;
    border-bottom: 1px dashed var(--border);
}

.bug-my-item:last-child { border-bottom: none; padding-bottom: 0; }

.bug-my-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.bug-my-meta { font-size: 0.82rem; margin-top: 0.15rem; }

/* Angehaengte Bilder einer Fehlermeldung (Klick -> Grossansicht) */
.bug-images { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0 0.2rem; }
.bug-images a { display: block; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; transition: border-color 0.15s, transform 0.15s; }
.bug-images a:hover { border-color: var(--gold); transform: translateY(-1px); }
.bug-images img { display: block; width: 96px; height: 72px; object-fit: cover; }

.bug-admin-note {
    margin-top: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-left: 3px solid var(--gold);
    border-radius: 4px;
    background: rgba(201, 162, 39, 0.08);
    font-size: 0.9rem;
    white-space: pre-wrap;
}

.bug-badge-progress { border-color: #5b9bd5; color: #5b9bd5; }

.filter-tab-count {
    margin-left: 0.3rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
}

/* Statusfarbe links an der Karte */
.bug-card-open { border-left-color: var(--gold); }
.bug-card-open:hover { border-color: var(--gold); }
.bug-card-in_progress { border-left-color: #5b9bd5; }
.bug-card-in_progress:hover { border-color: #5b9bd5; }
.bug-card-done { border-left-color: var(--success); opacity: 0.8; }
.bug-card-rejected { border-left-color: var(--danger); opacity: 0.7; }
.bug-card-rejected:hover { border-color: var(--danger); }

.bug-manage-form { margin-top: 0.9rem; }

.bug-manage-row {
    display: flex;
    align-items: stretch; /* Auswahl, Feld und Knopf gleich hoch */
    gap: 0.6rem;
}

.bug-manage-row select { width: auto; flex-shrink: 0; }
.bug-manage-row input { flex: 1; min-width: 0; }
.bug-manage-row button { flex-shrink: 0; align-self: stretch; }

@media (max-width: 700px) {
    .bug-form-row { grid-template-columns: 1fr; }
    .bug-report-details > summary { flex-wrap: wrap; }
    .bug-manage-row { flex-wrap: wrap; }
    .bug-manage-row input { flex-basis: 100%; }
}

/* --- Einfuehrung (Dashboard-Tour, assets/js/tour.js) --- */

.tour-root {
    position: fixed;
    inset: 0;
    z-index: 10000;
    animation: tour-fade-in 0.25s ease;
}

.tour-root.tour-leaving {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.tour-backdrop {
    position: absolute;
    inset: 0;
    background: transparent;
    transition: background 0.3s ease;
}

.tour-backdrop.dim {
    background: rgba(8, 8, 12, 0.72);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* Das "Loch" im abgedunkelten Hintergrund um den erklaerten Bereich */
.tour-spotlight {
    position: fixed;
    border-radius: 12px;
    box-shadow:
        0 0 0 2px var(--gold),
        0 0 24px 4px rgba(201, 162, 39, 0.45),
        0 0 0 9999px rgba(8, 8, 12, 0.72);
    pointer-events: none;
    opacity: 0;
    transition: left 0.35s ease, top 0.35s ease, width 0.35s ease, height 0.35s ease, opacity 0.25s ease;
}

.tour-spotlight.visible { opacity: 1; }

.tour-card {
    position: fixed;
    width: min(360px, calc(100vw - 24px));
    padding: 1.25rem 1.35rem 1.1rem;
    background: rgba(30, 30, 34, 0.97);
    border: 1px solid rgba(201, 162, 39, 0.45);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    transition: left 0.35s ease, top 0.35s ease;
}

.tour-card.tour-animate { animation: tour-pop 0.3s ease; }

.tour-card.centered {
    left: 50% !important;
    top: 50% !important;
    width: min(440px, calc(100vw - 24px));
    transform: translate(-50%, -50%);
    text-align: center;
}

.tour-card.centered .tour-actions { justify-content: center; }

/* Handy: Karte fest am unteren (bzw. oberen) Rand */
.tour-card.docked {
    left: 12px !important;
    right: 12px;
    top: auto !important;
    bottom: 12px;
    width: auto;
}

.tour-card.docked.docked-top {
    top: 12px !important;
    bottom: auto;
}

.tour-progress {
    height: 4px;
    margin-bottom: 0.85rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.tour-progress-bar {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-hover));
    transition: width 0.35s ease;
}

.tour-step-count {
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tour-title {
    margin: 0.3rem 0 0.4rem;
    font-size: 1.2rem;
}

.tour-text {
    margin: 0;
    color: #cfcfcf;
    line-height: 1.55;
}

.tour-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.1rem;
}

.tour-nav { display: flex; gap: 0.5rem; }

.tour-actions button { padding: 0.5rem 1rem; font-size: 0.92rem; }

.tour-skip {
    background: none;
    color: var(--text-muted);
    padding-left: 0 !important;
    font-weight: 500;
}

.tour-skip:hover { background: none; color: var(--text); }

.tour-card.centered .tour-actions { flex-direction: column-reverse; }
.tour-card.centered .tour-skip { padding: 0.3rem !important; }

/* Hervorgehobene Seitenleisten-Eintraege sollen lesbar bleiben */
.sidebar .tour-target { background: var(--bg-panel-alt); }

@keyframes tour-fade-in { from { opacity: 0; } to { opacity: 1; } }

@keyframes tour-pop {
    from { opacity: 0; transform: translateY(6px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.tour-card.centered.tour-animate { animation: tour-pop-center 0.3s ease; }

@keyframes tour-pop-center {
    from { opacity: 0; transform: translate(-50%, -48%) scale(0.98); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

@media (prefers-reduced-motion: reduce) {
    .tour-root, .tour-card, .tour-spotlight, .tour-progress-bar { animation: none !important; transition: none !important; }
}

/* Profil: Einfuehrung neu starten */
.tour-restart {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tour-restart > div { flex: 1; }
.tour-restart-panel .tour-restart { min-height: 4.5rem; }
/* Beide Buttons (Link und Formular-Knopf) gleich gross */
.tour-restart-button { width: 15rem; max-width: 100%; }
.tour-restart h2 { margin: 0 0 0.2rem; }
.tour-restart p { margin: 0; }

.tour-restart .icon-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(201, 162, 39, 0.15);
    color: var(--gold);
    flex-shrink: 0;
}

@media (max-width: 700px) {
    .tour-restart { flex-wrap: wrap; }
    .tour-restart form, .tour-restart button { width: 100%; }
}

/* --- Oeffentliche Startseite --- */

body.home-page {
    --home-bg: #15120c;
    --home-surface: rgba(255, 238, 200, 0.04);
    --home-line: rgba(255, 226, 160, 0.10);
    --home-text: #ecebf2;
    --home-muted: #a3a1b0;
    --home-gold: #e6c15a;
    background: var(--home-bg);
    color: var(--home-text);
    font-family: "Segoe UI Variable Display", "Segoe UI Variable Text", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Belebter Hintergrund: langsam treibende Farbfelder (Gold, Violett, Blau) und feiner
   Sternenstaub. Beides liegt fest hinter dem Inhalt, der darueber scrollt. */
body.home-page::before,
body.home-page::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

body.home-page::before {
    background:
        radial-gradient(50% 45% at 85% 15%, rgba(230, 193, 90, 0.30), transparent 70%),
        radial-gradient(45% 40% at 15% 30%, rgba(201, 162, 39, 0.16), transparent 70%),
        radial-gradient(40% 45% at 8% 70%, rgba(139, 92, 246, 0.12), transparent 70%),
        radial-gradient(45% 40% at 90% 80%, rgba(88, 101, 242, 0.10), transparent 70%),
        radial-gradient(35% 35% at 45% 95%, rgba(230, 150, 70, 0.10), transparent 70%),
        linear-gradient(160deg, #1d170d 0%, #17130c 45%, #120f0a 100%);
    background-size: 140% 140%;
    animation: home-aurora 28s ease-in-out infinite alternate;
}

body.home-page::after {
    background-image:
        radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.55), transparent 60%),
        radial-gradient(1px 1px at 72% 34%, rgba(255, 255, 255, 0.45), transparent 60%),
        radial-gradient(1.5px 1.5px at 38% 62%, rgba(247, 227, 161, 0.55), transparent 60%),
        radial-gradient(1px 1px at 88% 82%, rgba(255, 255, 255, 0.4), transparent 60%),
        radial-gradient(1px 1px at 22% 88%, rgba(255, 255, 255, 0.35), transparent 60%),
        radial-gradient(1.5px 1.5px at 56% 12%, rgba(195, 200, 255, 0.5), transparent 60%);
    background-size: 420px 420px;
    opacity: 0.6;
}

@keyframes home-aurora {
    0% { background-position: 0% 0%; }
    50% { background-position: 60% 40%; }
    100% { background-position: 100% 100%; }
}

@media (prefers-reduced-motion: reduce) {
    body.home-page::before { animation: none; }
}

body.home-page .navbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(21, 18, 12, 0.72);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--home-line);
}

.navbar-discord {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text);
    font-weight: 500;
}

.navbar-discord:hover { color: #fff; text-decoration: none; }
.navbar-user a.button-small { border-radius: 999px; padding: 0.35rem 0.95rem; }
.navbar-user a.button-small:hover { color: #1a1a1a; }

.page-full { display: block; overflow-x: clip; } /* Lichtschein des Banners ragt seitlich hinaus */

/* Banner randlos ueber die ganze Breite, direkt unter der Kopfzeile */
.home-banner {
    position: relative;
    line-height: 0;
}

/* Das Bild selbst blendet unten weich aus (Maske statt dunkler Ueberlagerung), damit der
   farbige Seitenhintergrund durchscheint. Viele Zwischenstufen = kein sichtbarer Rand. */
.home-banner img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    max-height: 78vh;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(to bottom,
        #000 0%, #000 52%,
        rgba(0, 0, 0, 0.94) 60%, rgba(0, 0, 0, 0.82) 67%, rgba(0, 0, 0, 0.64) 74%,
        rgba(0, 0, 0, 0.44) 81%, rgba(0, 0, 0, 0.25) 88%, rgba(0, 0, 0, 0.1) 94%,
        transparent 100%);
    mask-image: linear-gradient(to bottom,
        #000 0%, #000 52%,
        rgba(0, 0, 0, 0.94) 60%, rgba(0, 0, 0, 0.82) 67%, rgba(0, 0, 0, 0.64) 74%,
        rgba(0, 0, 0, 0.44) 81%, rgba(0, 0, 0, 0.25) 88%, rgba(0, 0, 0, 0.1) 94%,
        transparent 100%);
}

/* Warmer Lichtschein: fuehrt das Gold des Banners unter dem Bild in die Seite weiter */
.home-banner::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -22vh;
    width: min(1400px, 120vw);
    height: 55vh;
    transform: translateX(-50%);
    background:
        radial-gradient(50% 45% at 50% 40%, rgba(230, 193, 90, 0.2), transparent 70%),
        radial-gradient(35% 35% at 50% 45%, rgba(247, 227, 161, 0.1), transparent 70%);
    filter: blur(20px);
    pointer-events: none;
}

/* Eckdaten: schwebende Leiste, die in den unteren Bannerrand ragt */
.home-facts-wrap {
    position: relative;
    z-index: 2;
    max-width: 1120px;
    margin: -3.25rem auto 0;
    padding: 0 1.5rem;
}

.home-facts {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0;
    padding: 0.5rem;
    list-style: none;
    background: rgba(30, 25, 16, 0.72);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.home-facts li {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.9rem 1.25rem;
    border-radius: 14px;
}

.home-facts li + li { box-shadow: -1px 0 0 var(--home-line); }

.home-facts span {
    color: var(--home-muted);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.home-facts strong {
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.home-facts li.is-highlight {
    background: linear-gradient(135deg, rgba(230, 193, 90, 0.18), rgba(230, 193, 90, 0.04));
    box-shadow: inset 0 0 0 1px rgba(230, 193, 90, 0.35);
}

.home-facts li.is-highlight strong {
    color: var(--home-gold);
    font-size: 1.5rem;
    line-height: 1.1;
}

/* Abschnitte */
.home-section {
    max-width: 1120px;
    margin: 0 auto;
    padding: 5.5rem 1.5rem 0;
}

.home-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(230, 193, 90, 0.35);
    border-radius: 999px;
    background: rgba(230, 193, 90, 0.08);
    color: var(--home-gold);
    font-size: 0.8rem;
    font-weight: 600;
}

.home-page h1,
.home-page h2,
.home-page h3 {
    color: var(--home-text);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.home-gradient-text {
    background: linear-gradient(100deg, #f7e3a1, #e6c15a 45%, #c89530);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Ueber uns: grosse Ueberschrift links, Text rechts */
.home-about {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 3rem;
    align-items: start;
}

.home-about h1 {
    margin: 1rem 0 0;
    font-size: clamp(2.4rem, 5.2vw, 4rem);
    line-height: 1.02;
}

.home-about-text { padding-top: 2.6rem; }

.home-about-text p {
    margin: 0 0 1.1rem;
    color: #c9c7d3;
    font-size: 1.1rem;
    line-height: 1.75;
}

.home-about-text strong { color: var(--home-text); font-weight: 600; }

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
    color: var(--home-gold);
    font-weight: 600;
}

.home-link span { transition: transform 0.2s ease; }
.home-link:hover { color: #f7e3a1; text-decoration: none; }
.home-link:hover span { transform: translateX(4px); }

/* Gemeinschaftsfoto */
.home-photo-section { padding-top: 4rem; }

.home-photo {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(230, 193, 90, 0.08),
        0 0 80px rgba(139, 92, 246, 0.12);
}

.home-photo img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.8s ease;
}

.home-photo:hover img { transform: scale(1.02); }

/* Dunkler Verlauf unten, damit die Bildunterschrift lesbar bleibt */
.home-photo::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 40%;
    background: linear-gradient(transparent, rgba(8, 8, 14, 0.75));
    pointer-events: none;
}

.home-photo figcaption {
    position: absolute;
    left: 1.5rem;
    right: 1.5rem;
    bottom: 1.35rem;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 0.9rem;
    color: #f1eff7;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.home-photo-tag {
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(20, 20, 28, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.85rem;
    text-shadow: none;
}

/* Im Wechsel mit freigegebenen Galeriebildern (assets/js/home-photos.js): fester Rahmen im Format des
   Gemeinschaftsfotos, zwei uebereinanderliegende Bilder blenden ineinander */
.home-photo.has-slides { aspect-ratio: 1920 / 1072; }
.home-photo.has-slides .home-photo-slide {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s ease, transform 0.8s ease;
}
.home-photo.has-slides .home-photo-slide.is-visible { opacity: 1; }
.home-photo-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 999px;
    background: rgba(20, 20, 28, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f1eff7;
}
.home-photo-toggle[hidden] { display: none; }
.home-photo-toggle:hover { background: rgba(20, 20, 28, 0.8); border-color: var(--gold); color: var(--gold); box-shadow: none; }
.home-photo-toggle .icon { width: 18px; height: 18px; }
.home-photo-toggle .icon + .icon,
.home-photo-toggle[aria-pressed="true"] .icon:first-child { display: none; }
.home-photo-toggle[aria-pressed="true"] .icon + .icon { display: block; }
@media (prefers-reduced-motion: reduce) {
    .home-photo.has-slides .home-photo-slide { transition: none; }
}

/* Werte: Bento-Raster */
.home-section-head { margin-bottom: 2rem; }

.home-section-head h2 {
    margin: 0.9rem 0 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
}

.home-values {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.home-value {
    position: relative;
    grid-column: span 5;
    padding: 1.75rem;
    overflow: hidden;
    background: var(--home-surface);
    border: 1px solid var(--home-line);
    border-radius: 24px;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.home-value:nth-child(1),
.home-value:nth-child(4) { grid-column: span 7; }

.home-value::before {
    content: '';
    position: absolute;
    inset: -40% -20% auto auto;
    width: 60%;
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(230, 193, 90, 0.14), transparent 65%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.home-value:hover { border-color: rgba(230, 193, 90, 0.3); background: rgba(255, 255, 255, 0.05); }
.home-value:hover::before { opacity: 1; }

.home-value-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.25rem;
}

.home-value-emoji {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--home-line);
    font-size: 1.6rem;
}

.home-value-no {
    color: rgba(255, 255, 255, 0.18);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
}

.home-value h3 {
    margin: 0 0 0.55rem;
    font-size: 1.4rem;
}

.home-value p {
    margin: 0;
    color: #b9b7c4;
    line-height: 1.7;
}

/* Erste Schritte: Glas-Karten mit Icon, Pfeil zum naechsten Schritt, Ziel hervorgehoben */
.home-section-lead {
    margin: 0.75rem 0 0;
    max-width: 560px;
    color: var(--home-muted);
    font-size: 1.05rem;
}

.home-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-step {
    position: relative;
    padding: 1.5rem 1.5rem 1.6rem;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 22px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.home-step:hover {
    transform: translateY(-4px);
    border-color: rgba(230, 193, 90, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(230, 193, 90, 0.08);
}

/* Pfeil zwischen den Karten einer Reihe */
.home-step:not(:nth-child(3n))::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -1.55rem;
    width: 1.1rem;
    height: 1.1rem;
    border-top: 2px solid rgba(230, 193, 90, 0.55);
    border-right: 2px solid rgba(230, 193, 90, 0.55);
    transform: translateY(-50%) rotate(45deg) scale(0.6);
}

.home-step-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
}

.home-step-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(230, 193, 90, 0.28), rgba(139, 92, 246, 0.22));
    border: 1px solid rgba(230, 193, 90, 0.35);
    color: #f7e3a1;
    box-shadow: 0 6px 18px rgba(230, 193, 90, 0.12);
}

.home-step-icon .icon,
.home-step-icon .discord-logo { color: #f7e3a1; width: 22px; height: 22px; }

.home-step-label {
    color: var(--home-gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-step h3 {
    margin: 0 0 0.45rem;
    font-size: 1.2rem;
}

.home-step p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #c2c0cd;
    line-height: 1.65;
}

/* Grosse, blasse Nummer in der Ecke */
.home-step-no {
    position: absolute;
    right: 1.1rem;
    top: 0.4rem;
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    pointer-events: none;
}

/* Letzter Schritt = das Ziel */
.home-step:last-child {
    background:
        radial-gradient(120% 120% at 100% 0%, rgba(230, 193, 90, 0.28), transparent 60%),
        linear-gradient(160deg, rgba(230, 193, 90, 0.14), rgba(255, 255, 255, 0.03));
    border-color: rgba(230, 193, 90, 0.5);
    box-shadow: 0 0 40px rgba(230, 193, 90, 0.12);
}

.home-step:last-child .home-step-icon {
    background: linear-gradient(135deg, #f7e3a1, #e6c15a 55%, #c89530);
    border-color: transparent;
}

.home-step:last-child .home-step-icon .icon { color: #1a1406; }
.home-step:last-child .home-step-no {
    background: linear-gradient(180deg, rgba(247, 227, 161, 0.35), rgba(247, 227, 161, 0));
    -webkit-background-clip: text;
    background-clip: text;
}

/* Discord */
.home-discord {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 2.5rem;
    padding: 2.5rem;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(230, 193, 90, 0.32);
    background:
        radial-gradient(700px 300px at 0% 0%, rgba(230, 193, 90, 0.18), transparent 70%),
        radial-gradient(600px 320px at 100% 100%, rgba(200, 149, 48, 0.12), transparent 70%),
        linear-gradient(145deg, #2c2414 0%, #221c10 55%, #1b160d 100%);
    color: #f1e6cb;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 230, 170, 0.08);
}

.home-discord-server {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.home-discord-server img {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.home-discord-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #e6c15a;
    font-size: 0.85rem;
    font-weight: 600;
}

.home-discord-label .discord-logo { color: #8f98ff; }

.home-page .home-discord h2 {
    color: #f5ead0;
    margin: 0.15rem 0 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.1;
}

.home-discord-main p {
    margin: 0 0 1.75rem;
    color: #d6c8a6;
    font-size: 1.05rem;
    line-height: 1.7;
}

.home-discord-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #e6c15a, #c89530);
    color: #1d170c;
    font-weight: 700;
    font-size: 1.02rem;
    box-shadow: 0 10px 26px rgba(90, 65, 20, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-discord-button .discord-logo { color: #1d170c; }

.home-discord-button:hover {
    color: #1d170c;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(90, 65, 20, 0.45);
}

.home-discord-stats {
    display: grid;
    gap: 0.75rem;
    align-content: center;
}

.home-discord-stats > div {
    padding: 1.1rem 1.35rem;
    border-radius: 18px;
    background: rgba(255, 236, 190, 0.05);
    border: 1px solid rgba(230, 193, 90, 0.18);
    box-shadow: 0 4px 14px rgba(120, 90, 30, 0.08);
}

.home-discord-stats strong {
    color: #f5ead0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.home-discord-stats span { color: #b9a883; font-size: 0.9rem; }

.pulse {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #23a55a;
}

.pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #23a55a;
    animation: home-pulse 2s ease-out infinite;
}

@keyframes home-pulse {
    from { transform: scale(1); opacity: 0.7; }
    to { transform: scale(2.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .pulse::after { animation: none; }
}

.home-footer {
    max-width: 1120px;
    margin: 5.5rem auto 0;
    padding: 1.75rem 1.5rem 2.5rem;
    border-top: 1px solid var(--home-line);
    text-align: center;
    color: var(--home-muted);
    font-size: 0.85rem;
}

.home-footer p { margin: 0.2rem 0; }

@media (max-width: 900px) {
    .home-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-facts li + li { box-shadow: none; }
    .home-facts li.is-highlight { grid-column: 1 / -1; order: -1; }
    .home-about { grid-template-columns: 1fr; gap: 0; }
    .home-about-text { padding-top: 1.5rem; }
    .home-value,
    .home-value:nth-child(1),
    .home-value:nth-child(4) { grid-column: span 12; }
    .home-discord { grid-template-columns: 1fr; padding: 1.75rem; }
    .home-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
    .home-step:not(:nth-child(3n))::after { display: none; }
    .home-discord-stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}

@media (max-width: 520px) {
    .navbar { padding: 0.6rem 1rem; }
    .navbar-brand img { height: 36px; }
    .navbar-discord { font-size: 0; gap: 0; } /* nur das Logo */
    .home-facts-wrap { margin-top: -1.5rem; padding: 0 1rem; }
    .home-facts li { padding: 0.75rem 0.9rem; }
    .home-section { padding: 4rem 1rem 0; }
    .home-about-text p { font-size: 1rem; }
    .home-value { padding: 1.4rem; border-radius: 20px; }
    .home-value-top { margin-bottom: 1.5rem; }
    .home-discord { border-radius: 22px; padding: 1.4rem; }
    .home-steps { grid-template-columns: 1fr; }
    .home-step { padding: 1.25rem; border-radius: 18px; }
    .home-step-no { font-size: 3.6rem; }
    .home-discord-button { width: 100%; justify-content: center; }
    .home-discord-stats strong { font-size: 1.6rem; }
    .home-footer { margin-top: 4rem; }
    .home-photo-section { padding-top: 3rem; }
    .home-photo { border-radius: 18px; }
    .home-photo figcaption { left: 0.9rem; right: 0.9rem; bottom: 0.8rem; font-size: 0.85rem; }
}
/* --- Administrator-Rechte (users.is_admin) --- */
.badge-admin {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(201, 162, 39, 0.12);
}

.badge-admin .icon { width: 13px; height: 13px; }

/* Benutzerliste: einzeln (nicht ueber Gruppen) vergebene Berechtigungen */
.badge-direct-permissions { border-color: rgba(201, 162, 39, 0.5); color: var(--gold); cursor: help; white-space: nowrap; }

.admin-toggle {
    padding: 0.85rem 1rem;
    border: 1px solid rgba(201, 162, 39, 0.4);
    border-radius: 8px;
    background: rgba(201, 162, 39, 0.07);
}

.admin-toggle label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gold);
}

.admin-toggle .icon { width: 18px; height: 18px; }
.field-hint .icon { width: 14px; height: 14px; vertical-align: -2px; }

/* Entwickler der Website (DEVELOPER_DISCORD_IDS) */
.badge-developer {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-color: #8b5cf6;
    color: #b79cff;
    background: rgba(139, 92, 246, 0.14);
}

.badge-developer .icon { width: 13px; height: 13px; }

/* Profil: Profilbild von Discord */
.avatar-sync-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.4rem 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.avatar-sync-hint .discord-logo { flex-shrink: 0; }

.avatar-sync-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

/* --- Mitgliederliste: Karten mit Klassen-Icon und Gruppen-Abzeichen --- */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: 0.9rem;
}

/* Nur eine Person in der Gruppe (z.B. Brigadegeneral): Ueberschrift und Karte mittig */
.member-section-single .raid-header { justify-content: center; }
.member-section-single .member-grid:not(.member-list) { grid-template-columns: minmax(0, 420px); justify-content: center; }

.member-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin: 0;
    padding: 1rem 1.1rem;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.member-card:hover {
    border-color: rgba(201, 162, 39, 0.5);
    transform: translateY(-2px);
}

.member-card-body { min-width: 0; flex: 1; }

.member-name {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.1rem 0 0;
    font-size: 1.05rem;
}

.member-name > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Klassen-Icon hinter dem Namen - wie das Rollen-Icon in Discord */
.class-badge {
    flex-shrink: 0;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.member-class {
    margin-top: 0.05rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.member-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.55rem;
}

/* Gruppen-Tag - eigene Farben je Gruppe (Berechtigungsgruppen) kommen als --tag-bg / --tag-color,
   ein Verlauf als --tag-fill (liegt auch unter dem dann unsichtbaren Rand) */
.member-role {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.55rem;
    border: 1px solid var(--tag-border, var(--tag-bg, var(--border)));
    border-radius: 999px;
    background: var(--tag-fill, var(--tag-bg, rgba(255, 255, 255, 0.04)));
    background-origin: border-box;
    font-size: 0.75rem;
    color: var(--tag-color, var(--text));
    white-space: nowrap;
}

/* Symbol einer Gruppe vor ihrem Namen (Tags, Abschnitte und Filter der Mitgliederliste, Dashboard) -
   wie die Rollen-Symbole bei Discord */
.role-icon {
    height: 1.3em;
    width: auto;
    max-width: 2.6em;
    object-fit: contain;
    margin-right: 0.35em;
    vertical-align: -0.3em;
    flex: none;
}
.member-role:has(.role-icon) { padding-left: 0.3rem; }
.members-chip .role-icon { margin-right: 0; }

/* Mitgliederliste nach Rang: die Gruppen mit Reihenfolge sind die Abschnitte - ihre Tags entfallen dort */
#members-list.is-sectioned .member-role-rank { display: none; }
#members-list.is-sectioned .member-roles:not(:has(.member-role:not(.member-role-rank))) { display: none; }

/* Berechtigungsgruppe bearbeiten: Farbwahl fuer das Tag mit Vorschau */
.role-tag-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin-top: 0.3rem; }
.role-tag-color { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0; font-weight: 400; cursor: pointer; }
.role-tag-color input[type="checkbox"] { width: auto; margin: 0; accent-color: var(--gold); }
.role-tag-color input[type="color"] { width: 2.4rem; height: 1.8rem; padding: 0.1rem; border-radius: 6px; cursor: pointer; }
.role-tag-color:has(input[type="checkbox"]:not(:checked)) input[type="color"] { opacity: 0.45; }
.role-tag-preview { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--text-muted); font-size: 0.85rem; }

/* Berechtigungsgruppe bearbeiten: Symbol hochladen oder per Link */
.role-icon-field { display: grid; gap: 0.6rem; margin-top: 0.3rem; }
.role-icon-field .file-drop { margin-top: 0; }
.role-icon-remove { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0; font-weight: 400; cursor: pointer; }
.role-icon-remove input { width: auto; margin: 0; accent-color: var(--gold); }

/* Profil: Klassen laut Discord-Klassenrollen, Main-Klasse per Auswahl (profile.php) */
.profile-classes { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.6rem; }
.profile-class {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-panel-alt);
    font-weight: 500;
    cursor: default;
}
.profile-class:has(input) { cursor: pointer; }
.profile-class:has(input):hover { border-color: var(--gold); }
.profile-class input { width: auto; margin: 0; accent-color: var(--gold); }
.profile-class.is-main { border-color: var(--gold); background: rgba(201, 162, 39, 0.12); }
.profile-class-main {
    padding: 0.05rem 0.4rem;
    border-radius: 4px;
    background: var(--gold);
    color: #1a1a1a;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.profile-classes-sync { margin-top: auto; padding-top: 0.5rem; }
.profile-classes-sync button { display: inline-flex; align-items: center; gap: 0.4rem; }

/* Mitgliederliste und Profilseite: Klassen nur als Icons (Name im Tooltip), die Main-Klasse zuerst */
.member-class:has(.member-class-more) { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: 0.2rem; }
.member-class-more { display: inline-flex; align-items: center; }
.member-class-more .class-badge { opacity: 0.85; }
.member-profile-classes { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.member-profile-class {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.member-profile-class.is-main { border-color: rgba(201, 162, 39, 0.6); color: var(--text); }

/* Klassenauswahl (Raid, Premade): eigene Klassen dezent hervorgehoben, die Main-Klasse markiert */
.class-picker-option { position: relative; }
.class-picker-option.is-own:not(.selected) { border-color: rgba(201, 162, 39, 0.45); }
.class-picker-tag {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 0 0.3rem;
    border-radius: 4px;
    background: var(--gold);
    color: #1a1a1a;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* --- Wiki (Einsteiger-Guide) --- */
.wiki-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.wiki-nav {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    margin: 0;
    padding: 1rem;
}

.wiki-nav-home {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--gold);
}

.wiki-nav-home.active, .wiki-nav-home:hover { text-decoration: none; color: var(--gold-hover); }

.wiki-search input { width: 100%; margin-bottom: 0.75rem; }

.wiki-toc { font-size: 0.9rem; }

.wiki-toc-chapter > summary {
    display: flex;
    align-items: center;
    padding: 0.3rem 0.4rem;
    border-radius: 6px;
    cursor: pointer;
    list-style: none;
}

.wiki-toc-chapter > summary::-webkit-details-marker { display: none; }

.wiki-toc-chapter > summary::before {
    content: '▸';
    width: 1rem;
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: transform 0.15s ease;
}

.wiki-toc-chapter[open] > summary::before { transform: rotate(90deg); }

.wiki-toc a {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    flex: 1;
    min-width: 0;
    padding: 0.2rem 0.35rem;
    border-radius: 5px;
    color: var(--text);
}
/* Titel nimmt den Platz ein, "WIP" sitzt immer am rechten Rand - so stehen alle untereinander */
.wiki-toc-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.wiki-toc .wiki-num { flex-shrink: 0; }
.wiki-toc .wiki-wip { flex-shrink: 0; align-self: center; margin-left: auto; }

.wiki-toc-chapter > summary > a { font-weight: 600; }

.wiki-toc a:hover { background: rgba(255, 255, 255, 0.05); text-decoration: none; color: var(--text); }
.wiki-toc a.active { background: rgba(201, 162, 39, 0.15); color: var(--gold); }

/* rechts so viel Abstand wie die Kapitelzeile (summary-Padding), damit "WIP" genau untereinander steht */
.wiki-toc ul { list-style: none; margin: 0.1rem 0.4rem 0.35rem 1rem; padding: 0; border-left: 1px solid var(--border); }
.wiki-toc li a { padding-left: 0.6rem; font-size: 0.86rem; color: #cfcfcf; }

.wiki-num { color: var(--text-muted); font-variant-numeric: tabular-nums; margin-right: 0.15rem; }
.wiki-toc a.active .wiki-num { color: var(--gold); }

.wiki-wip {
    display: inline-block;
    margin-left: 0.3rem;
    padding: 0 0.35rem;
    border: 1px solid rgba(240, 178, 50, 0.6);
    border-radius: 4px;
    color: #f0b232;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

.wiki-wip-large { font-size: 0.75rem; padding: 0.1rem 0.45rem; }

.wiki-new-chapter { display: block; width: 100%; margin-top: 0.9rem; }

.wiki-main { min-width: 0; }

.wiki-breadcrumb { margin-bottom: 0.5rem; font-size: 0.85rem; color: var(--text-muted); }
.wiki-breadcrumb span { margin: 0 0.3rem; }

.wiki-article-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 0.9rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid var(--border);
}

.wiki-article-head h1 { margin: 0; font-size: 1.8rem; line-height: 1.25; }

.wiki-article-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.wiki-article-actions .button-small { display: inline-flex; align-items: center; gap: 0.3rem; }
.wiki-article-actions .button-small .icon { width: 15px; height: 15px; }

/* Seiteninhalt */
.wiki-content { line-height: 1.7; font-size: 1rem; overflow-wrap: anywhere; }
.wiki-content h2 { margin: 1.8rem 0 0.6rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--border); font-size: 1.3rem; }
.wiki-content h3 { margin: 1.4rem 0 0.5rem; font-size: 1.1rem; }
.wiki-content h4, .wiki-content h5 { margin: 1.2rem 0 0.4rem; }
.wiki-content p { margin: 0 0 0.9rem; }
.wiki-content ul, .wiki-content ol { margin: 0 0 0.9rem; padding-left: 1.4rem; }
.wiki-content li { margin-bottom: 0.3rem; }
.wiki-content img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); margin: 0.3rem 0; }
.wiki-content code { padding: 0.1rem 0.35rem; border-radius: 4px; background: rgba(255, 255, 255, 0.08); font-size: 0.9em; }
.wiki-content hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }

.wiki-note {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--gold);
    border-radius: 6px;
    background: rgba(201, 162, 39, 0.08);
}

.wiki-table-wrap { overflow-x: auto; margin: 0 0 1.1rem; }
.wiki-table { width: auto; min-width: 50%; border-collapse: collapse; font-size: 0.92rem; }
.wiki-table th, .wiki-table td { padding: 0.5rem 0.8rem; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.wiki-table th { background: rgba(201, 162, 39, 0.12); color: var(--gold); font-weight: 700; }
.wiki-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.025); }

.wiki-missing-link { color: #e57373; border-bottom: 1px dashed #e57373; cursor: help; }

.wiki-empty { color: var(--text-muted); font-style: italic; }

.wiki-subpages { margin-top: 1.8rem; }
.wiki-subpages h2 { font-size: 1.1rem; margin-bottom: 0.7rem; }

/* Alle Kacheln gleich gross: jede Zeile so hoch wie die hoechste Kachel (auch bei umbrechenden Titeln) */
.wiki-subpage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); grid-auto-rows: 1fr; gap: 0.6rem; }

.wiki-subpage {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}

.wiki-subpage { transition: background 0.15s ease, border-color 0.15s ease; }
/* Beim Drueberfahren dunkler, damit sich die Kachel vom Hintergrund abhebt */
.wiki-subpage:hover { background: rgba(0, 0, 0, 0.45); border-color: var(--gold); text-decoration: none; color: var(--text); }
.wiki-subpage-title { flex: 1; min-width: 0; }
.wiki-subpage .wiki-wip { flex-shrink: 0; margin-left: auto; }

.wiki-article-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}

.wiki-pager { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Uebersicht */
.wiki-hero h1 { display: flex; align-items: center; gap: 0.6rem; margin-top: 0; }
.wiki-hero h1 .icon { width: 28px; height: 28px; color: var(--gold); }
.wiki-hero p { margin: 0.3rem 0; }

.wiki-chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.wiki-chapter-card {
    position: relative;
    margin: 0;
    padding: 1.1rem 1.2rem;
    color: var(--text);
    transition: background 0.15s ease, border-color 0.15s ease;
}

/* Wie die Unterseiten-Kacheln: beim Drueberfahren dunkel mit Goldrand (kraeftiger, weil die Kachel
   selbst schon ein halbdunkles Panel ist) */
.wiki-chapter-card:hover { background: rgba(10, 10, 10, 0.85); border-color: var(--gold); text-decoration: none; color: var(--text); }

.wiki-chapter-no {
    position: absolute;
    top: 0.6rem;
    right: 1rem;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(201, 162, 39, 0.25);
}

.wiki-chapter-card h2 { margin: 0 2.5rem 0.4rem 0; font-size: 1.15rem; }
.wiki-chapter-card p { margin: 0; font-size: 0.85rem; line-height: 1.5; }

.wiki-contributor-list { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.75rem 0; }

.wiki-contributor {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.5rem 0.3rem 0.3rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
}

.wiki-contributor .icon-button { padding: 0.15rem; }
.wiki-contributor .icon-button .icon { width: 14px; height: 14px; }

.wiki-contributor-add { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.wiki-contributor-add select { width: auto; min-width: 220px; }

.wiki-results { list-style: none; padding: 0; margin: 0; }
.wiki-results li { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.wiki-results li:last-child { border-bottom: none; }
.wiki-results a { font-weight: 700; font-size: 1.05rem; }
.wiki-results p { margin: 0.25rem 0 0; font-size: 0.88rem; }

/* Editor */
.wiki-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wiki-editor-head h1 { margin: 0; }

.wiki-editor-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: end; }
.wiki-wip-toggle { display: flex; align-items: center; gap: 0.45rem; padding-bottom: 0.6rem; white-space: nowrap; }

.wiki-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.4rem;
    border: 1px solid var(--border);
    border-radius: 8px 8px 0 0;
    border-bottom: none;
    background: var(--bg-panel-alt);
}

.wiki-toolbar button {
    padding: 0.3rem 0.65rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
}

.wiki-toolbar button:hover { background: rgba(201, 162, 39, 0.15); border-color: var(--gold); }
.wiki-toolbar-spacer { flex: 1; }
.wiki-preview-toggle[aria-pressed="true"] { background: rgba(201, 162, 39, 0.2); border-color: var(--gold); color: var(--gold); }

.wiki-editor { gap: 0; }
.wiki-editor > * + * { margin-top: 1rem; }
.wiki-editor .wiki-toolbar + .wiki-editor-panes { margin-top: 0; }

.wiki-editor-panes { display: grid; grid-template-columns: 1fr; gap: 0; }

.wiki-editor-panes textarea {
    min-height: 460px;
    border-radius: 0 0 8px 8px;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 0.92rem;
    line-height: 1.6;
    resize: vertical;
}

.wiki-editor-split .wiki-editor-panes { grid-template-columns: 1fr 1fr; gap: 1rem; }

.wiki-preview {
    max-height: 620px;
    overflow-y: auto;
    padding: 1rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.wiki-help summary { cursor: pointer; color: var(--text-muted); font-size: 0.9rem; }

.wiki-help-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.45rem 1rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    align-items: start;
}

.wiki-help-grid code { padding: 0.2rem 0.45rem; border-radius: 4px; background: rgba(255, 255, 255, 0.07); }

.wiki-editor-foot { display: flex; gap: 0.75rem; align-items: center; }
.wiki-editor-foot input { flex: 1; }

/* Dashboard-Hinweis auf den Guide */
.dashboard-wiki {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    color: var(--text);
    transition: border-color 0.15s ease;
}

.dashboard-wiki:hover { border-color: var(--gold); text-decoration: none; color: var(--text); }
.dashboard-wiki > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dashboard-wiki .text-muted { font-size: 0.88rem; }
.dashboard-wiki-arrow { color: var(--gold); font-size: 1.3rem; }

.dashboard-wiki .icon-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(201, 162, 39, 0.15);
    color: var(--gold);
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .wiki-layout { grid-template-columns: 1fr; }
    .wiki-nav { position: static; max-height: none; }
    .wiki-editor-split .wiki-editor-panes { grid-template-columns: 1fr; }
    .wiki-editor-meta { grid-template-columns: 1fr; }
    .wiki-wip-toggle { padding-bottom: 0; }
}

/* Wiki: Inhaltsverzeichnis einklappbar (nur am Handy sichtbar als Knopf) */
.wiki-toc-summary { display: none; }

@media (max-width: 900px) {
    .wiki-toc-summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.5rem 0.2rem;
        font-weight: 600;
        cursor: pointer;
        list-style: none;
    }
    .wiki-toc-summary::-webkit-details-marker { display: none; }
    .wiki-toc-summary::after { content: '▾'; color: var(--text-muted); }
    .wiki-toc-wrap[open] > .wiki-toc-summary { margin-bottom: 0.4rem; }
    .wiki-toc-wrap[open] > .wiki-toc-summary::after { content: '▴'; }
}

/* --- Mitgliederliste: Werkzeugleiste, Listenansicht, Charaktere --- */
a.member-card { color: var(--text); }
a.member-card:hover { text-decoration: none; color: var(--text); }

.member-characters { display: flex; flex-wrap: wrap; gap: 0.3rem 0.7rem; margin-top: 0.4rem; font-size: 0.82rem; color: #cfcfcf; }
.member-character { display: inline-flex; align-items: center; gap: 0.25rem; }

/* Listenansicht: eine Zeile pro Mitglied */
.member-list { grid-template-columns: 1fr; gap: 0.4rem; }
.member-list .member-card { align-items: center; padding: 0.55rem 0.9rem; }
.member-list .avatar, .member-list .avatar-wrap { transform: scale(0.8); }
.member-list .member-card-body { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1.2rem; }
.member-list .member-name { min-width: 200px; margin: 0; }
.member-list .member-class { min-width: 90px; margin: 0; }
.member-list .member-characters, .member-list .member-roles { margin-top: 0; }

/* --- Profilseite --- */
.member-profile-head { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.member-profile-info { flex: 1; min-width: 220px; }
.member-profile-info h1 { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.3rem; }
.member-profile-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.9rem; }
.member-profile-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.member-profile-actions .button-small { display: inline-flex; align-items: center; gap: 0.3rem; }
.member-profile-actions .icon { width: 15px; height: 15px; }
.member-profile-empty { text-align: center; }

.character-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 1rem; }

.character-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.character-card.is-main { border-color: rgba(201, 162, 39, 0.55); box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.15); }

.character-portrait img, .character-portrait-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--border);
    background: var(--bg-panel-alt);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-muted);
}

.character-info h3 { display: flex; align-items: center; gap: 0.35rem; margin: 0 0 0.2rem; }
.character-info .badge { margin-top: 0.4rem; }
.character-info p { margin: 0.5rem 0 0; font-size: 0.9rem; color: #cfcfcf; }

.character-image { grid-column: 1 / -1; display: block; }
.character-image img { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.75rem; }
.gallery-item { margin: 0; }
.gallery-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); transition: transform 0.15s ease; }
.gallery-item a:hover img { transform: scale(1.02); }
.gallery-item figcaption { margin-top: 0.3rem; font-size: 0.82rem; color: var(--text-muted); }

/* Profilseite bearbeiten */
.character-edit { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 0.6rem; padding: 0.6rem 0.9rem; }
.character-edit > summary { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; list-style: none; flex-wrap: wrap; }
.character-edit > summary::-webkit-details-marker { display: none; }
.character-edit-hint { margin-left: auto; font-size: 0.8rem; color: var(--text-muted); }
.character-edit > form { margin-top: 0.9rem; }
.character-new { border-style: dashed; }

.character-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.9rem; align-items: end; }
.character-main-toggle { display: flex; align-items: center; gap: 0.4rem; padding-bottom: 0.6rem; }
.character-current-image { display: flex; align-items: center; gap: 0.6rem; margin: 0.3rem 0; font-weight: 400; }
.character-current-image img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.character-current-image label { font-weight: 400; display: flex; align-items: center; gap: 0.3rem; }

.gallery-upload { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.gallery-upload input[type="text"] { flex: 1 1 200px; }
.gallery-edit-grid { margin-top: 1rem; }
.gallery-item-form { gap: 0.35rem; margin-top: 0.35rem; }
.gallery-item-actions { display: flex; justify-content: space-between; align-items: center; }
/* Galeriebilder fuer die oeffentliche Startseite: Markierung im Profil-Editor, Auswahl in der Galerie (site.homepage) */
.gallery-home-badge {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(201, 162, 39, 0.92);
    color: #1a1a1a;
    font-size: 0.72rem;
    font-weight: 700;
}
.gallery-home-badge .icon { width: 12px; height: 12px; }
.gallery-home-form { flex-basis: 100%; margin: 0; }
.gallery-home-toggle { gap: 0.3rem; padding: 0.2rem 0.6rem; border: 1px solid var(--border); border-radius: 999px; background: none; color: var(--text-muted); font-size: 0.78rem; font-weight: 600; }
.gallery-home-toggle .icon, .gallery-home-chip .icon { width: 13px; height: 13px; }
.gallery-home-toggle:hover { background: rgba(201, 162, 39, 0.1); border-color: var(--gold); color: var(--gold); box-shadow: none; }
.gallery-home-toggle.is-on { border-color: var(--gold); background: rgba(201, 162, 39, 0.18); color: var(--gold); }

/* Grossansicht fuer Bilder (assets/js/lightbox.js) */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.88);
}

.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 92vw; text-align: center; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); }
.lightbox figcaption { margin-top: 0.6rem; color: #ddd; }
.lightbox button { background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); font-size: 1.6rem; padding: 0.3rem 0.9rem; }
.lightbox button:hover { background: rgba(255, 255, 255, 0.2); }
.lightbox button[hidden] { display: none; }
.lightbox-close { position: absolute; top: 1rem; right: 1rem; font-size: 1.1rem !important; }

@media (max-width: 700px) {
    .member-list .member-name { min-width: 0; }
    .character-card { grid-template-columns: 72px minmax(0, 1fr); }
    .character-portrait img, .character-portrait-empty { width: 72px; height: 72px; }
    .lightbox-prev, .lightbox-next { position: absolute; bottom: 1rem; }
    .lightbox-prev { left: 1rem; }
    .lightbox-next { right: 1rem; }
}

/* --- Datei-Auswahl (assets/js/file-input.js) --- */
.file-drop {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.3rem;
}

.file-drop-body {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1.1rem 1rem;
    border: 1.5px dashed rgba(201, 162, 39, 0.45);
    border-radius: 12px;
    background: rgba(201, 162, 39, 0.05);
    color: var(--gold);
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}

.file-drop-body:hover,
.file-drop.is-focused .file-drop-body {
    border-color: var(--gold);
    background: rgba(201, 162, 39, 0.1);
}

.file-drop.is-dragging .file-drop-body {
    border-style: solid;
    border-color: var(--gold-hover);
    background: rgba(201, 162, 39, 0.16);
    transform: scale(1.01);
}

.file-drop-title { font-weight: 700; color: var(--text); }
.file-drop-hint { font-size: 0.78rem; color: var(--text-muted); }

/* Das echte Eingabefeld liegt unsichtbar ueber der Flaeche (Klick und Ablegen) */
.file-drop-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-drop.has-files .file-drop-body { padding: 0.6rem 1rem; flex-direction: row; gap: 0.6rem; }
.file-drop.has-files .file-drop-hint { display: none; }
.file-drop.has-files .file-drop-body svg { width: 20px; height: 20px; }

.file-drop-files { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }

.file-drop-file {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    padding: 0.3rem 0.6rem 0.3rem 0.3rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.file-drop-file img { width: 44px; height: 44px; object-fit: cover; border-radius: 7px; }
.file-drop-name { font-size: 0.8rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.file-drop-clear {
    padding: 0.3rem 0.7rem;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.file-drop-clear:hover { background: rgba(217, 83, 79, 0.12); border-color: var(--danger); color: var(--danger); }

/* Bild per Strg+V eingefuegt: kurzes goldenes Aufleuchten */
.file-drop.is-pasted .file-drop-body { border-color: var(--gold-hover); background: rgba(201, 162, 39, 0.2); box-shadow: 0 0 18px rgba(201, 162, 39, 0.35); }
.file-drop-note { font-size: 0.8rem; color: var(--gold); }

kbd {
    display: inline-block;
    padding: 0 0.35rem;
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    font-family: inherit;
    font-size: 0.85em;
    line-height: 1.5;
}

/* Ohne JavaScript: wenigstens der Knopf im Stil der Seite */
input[type="file"]::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--gold);
    border-radius: 999px;
    background: rgba(201, 162, 39, 0.12);
    color: var(--gold);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.gallery-upload .file-drop { flex: 1 1 100%; }

/* --- Mitgliederliste: Filterflaeche --- */
.members-filter {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.members-search {
    position: relative;
    display: block;
    margin: 0;
    font-weight: 400;
}

.members-search .icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.members-search input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.6rem;
    border-radius: 999px;
    font-size: 0.95rem;
}

.members-search input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15); outline: none; }

.members-filter-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem 0.75rem;
}
/* Viele Chips brechen in ihrem eigenen Bereich um - die Beschriftung bleibt links daneben */
.members-filter-row > .members-chips { flex: 1; min-width: 0; }

.members-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    /* Feste Breite fuer alle Beschriftungen (Klasse, Gruppe, Sortieren), damit die Chips jeder
       Zeile auf derselben Linie beginnen */
    width: 7.5rem;
    flex-shrink: 0;
    min-height: 2.15rem; /* so hoch wie ein Chip: steht auf Hoehe der ersten Chip-Zeile */
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.members-filter-label .icon { width: 15px; height: 15px; }

.members-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.members-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    /* Alle Chips gleich hoch - auch die mit Klassen-Icon und die Ansicht-Umschaltung */
    min-height: 2.15rem;
    line-height: 1.2;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.members-chip:hover { background: rgba(201, 162, 39, 0.1); border-color: rgba(201, 162, 39, 0.5); color: var(--text); }
.members-chip[hidden] { display: none; }

.members-chip.active {
    background: rgba(201, 162, 39, 0.2);
    border-color: var(--gold);
    color: var(--gold);
    font-weight: 700;
}

/* Klassen nur als Icon - der Name steht im Tooltip und erscheint beim aktiven Chip */
.members-chip-class { padding: 0.2rem 0.45rem; }
.members-chip-class span { display: none; }
.members-chip-class.active { padding-right: 0.8rem; }
.members-chip-class.active span { display: inline; }
.members-chip-class:hover .class-badge { transform: scale(1.1); }
.members-chip .class-badge { transition: transform 0.15s ease; }

.members-filter-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--border);
}

.members-segment {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.2);
}

.members-segment button {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.members-segment button:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.members-segment button.active { background: var(--gold); color: #1a1a1a; }
.members-segment .icon { width: 17px; height: 17px; }
.members-view button { padding: 0.35rem 0.6rem; }
.members-view .members-chip .icon { width: 17px; height: 17px; }
.members-view.members-chips { flex-wrap: nowrap; }

.members-filter-meta { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
#members-count { font-size: 0.85rem; white-space: nowrap; }

.members-reset {
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.members-reset:hover { border-color: var(--danger); color: var(--danger); background: rgba(217, 83, 79, 0.08); }
.members-reset[hidden] { display: none; }

@media (max-width: 700px) {
    .members-filter-row { flex-wrap: wrap; }
    .members-filter-label { width: 100%; }
    .members-segment { max-width: 100%; overflow-x: auto; }
    .members-segment button { padding: 0.35rem 0.65rem; white-space: nowrap; }
    .members-filter-meta { margin-left: 0; width: 100%; justify-content: space-between; }
}

/* --- Gemeinsames Suchfeld (Raids, Benutzerverwaltung) --- */
.search-field {
    position: relative;
    display: block;
    margin: 0;
    font-weight: 400;
}

/* In einer Zeile (Raid-Suche) nimmt das Feld den freien Platz ein */
.list-search-bar .search-field { flex: 1 1 260px; }

.search-field .icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.search-field input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.6rem;
    border-radius: 999px;
    font-size: 0.95rem;
}

.search-field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15); outline: none; }

.list-search-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.list-search-count { font-size: 0.85rem; white-space: nowrap; }

.list-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.25rem 0 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.15);
}

.list-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.list-toolbar-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }

.chip-count {
    display: inline-block;
    min-width: 1.4em;
    padding: 0 0.35em;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    text-align: center;
}

.members-chip.active .chip-count { background: rgba(201, 162, 39, 0.3); }

#users-table tr[hidden] { display: none; }

/* Raid-Suche: gefundene Spieler in den Gruppen hervorheben */
.raid-card[hidden] { display: none; }

.raid-signup-item.search-hit {
    margin-left: -0.35rem;
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    background: rgba(201, 162, 39, 0.2);
    box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.6);
}

@media (max-width: 700px) {
    .list-toolbar-meta { width: 100%; }
    .list-toolbar-meta .members-segment { max-width: 100%; overflow-x: auto; }
}

/* ---- Auswahlfeld fuer Gegenstaende (assets/js/item-picker.js) ---- */
.item-picker .search-field input { border-radius: 10px; }
.item-picker-icon { display: contents; }

.item-picker-preview {
    width: 24px !important;
    height: 24px !important;
    left: 0.6rem !important;
    border-radius: 5px;
    object-fit: contain;
}

.item-picker-list {
    position: fixed;
    z-index: 1100;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    overflow-y: auto;
    background: rgba(30, 30, 30, 0.97);
    border: 1px solid rgba(201, 162, 39, 0.35);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    animation: item-picker-in 0.12s ease-out;
}

.item-picker-list[hidden] { display: none; }

@keyframes item-picker-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

.item-picker-option {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
}

.item-picker-option:hover { background: rgba(255, 255, 255, 0.05); }
.item-picker-option.active { background: rgba(201, 162, 39, 0.16); }

.item-picker-thumb {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 7px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.item-picker-thumb-empty {
    display: grid;
    place-items: center;
    color: var(--gold);
    font-weight: 700;
    border-style: dashed;
}

.item-picker-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.item-picker-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-picker-name mark { background: none; color: var(--gold); font-weight: 700; }
.item-picker-meta { font-size: 0.78rem; color: var(--text-muted); }

.item-picker-qty {
    flex-shrink: 0;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    background: rgba(76, 175, 80, 0.14);
    color: #8fd392;
    font-size: 0.75rem;
    white-space: nowrap;
}

.item-picker-note { padding: 0.55rem 0.7rem; color: var(--text-muted); font-size: 0.85rem; }

/* Bestand: Suche und Kategorie-Chips */
.warehouse-filters.list-toolbar { margin: 1rem 0; }

/* ---- Kommentare unter Galeriebildern ---- */
.gallery-item { position: relative; }
.gallery-comment-badge {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.78rem;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.15s ease;
}
.gallery-comment-badge .icon { width: 14px; height: 14px; }
.gallery-comment-badge.has-comments,
.gallery-item:hover .gallery-comment-badge,
.gallery-comment-badge:focus-visible { opacity: 1; }
.gallery-comment-badge:hover { color: var(--gold); text-decoration: none; }
@media (hover: none) { .gallery-comment-badge { opacity: 1; } }

.lightbox-comments {
    display: inline-block;
    margin-left: 0.75rem;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: rgba(201, 162, 39, 0.2);
    color: var(--gold);
    font-size: 0.9rem;
}

.picture-view-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.picture-owner { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text); }
.picture-owner:hover { text-decoration: none; color: var(--gold); }
.picture-view-image { position: relative; margin: 0; text-align: center; }
.picture-view-frame { position: relative; display: inline-block; max-width: 100%; vertical-align: top; }
.picture-view-frame > a:first-child { display: block; }
.picture-view-image img { display: block; max-width: 100%; max-height: 75vh; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.picture-view-image figcaption { margin-top: 0.6rem; color: var(--text-muted); }
.picture-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    z-index: 1;
    backdrop-filter: blur(4px);
    transition: background 0.15s ease, transform 0.15s ease;
}
.picture-nav svg { display: block; }
.picture-nav:hover { transform: translateY(-50%) scale(1.08); }
.picture-nav:hover { background: rgba(201, 162, 39, 0.8); color: #111; text-decoration: none; }
.picture-nav-prev { left: 0.75rem; }
.picture-nav-next { right: 0.75rem; }

.picture-comments h2 { display: flex; align-items: center; gap: 0.5rem; }
.comment-list { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.comment { display: flex; gap: 0.75rem; align-items: flex-start; }
.comment-body {
    flex: 1;
    min-width: 0;
    padding: 0.55rem 0.85rem;
    border-radius: 4px 12px 12px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.comment-head time { font-size: 0.8rem; }
.comment-delete { margin-left: auto; }
.comment-delete .icon-button { width: 28px; height: 28px; }
.comment-body p { margin: 0.3rem 0 0; overflow-wrap: anywhere; }

.comment-form { display: flex; gap: 0.75rem; align-items: flex-start; }
.comment-form-body { flex: 1; min-width: 0; }
.comment-form textarea { width: 100%; border-radius: 12px; resize: vertical; min-height: 3rem; }
.comment-form-actions { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-top: 0.4rem; flex-wrap: wrap; }

/* ---- Audit-Log ---- */
.audit-search-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.audit-search-row .search-field { flex: 1 1 280px; }
.audit-date { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0; font-size: 0.85rem; color: var(--text-muted); font-weight: 400; }
.audit-date input { width: auto; padding: 0.45rem 0.6rem; border-radius: 10px; background: var(--bg-panel-alt); color: var(--text); border: 1px solid var(--border); color-scheme: dark; }
.audit-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: rgba(201, 162, 39, 0.16);
    border: 1px solid rgba(201, 162, 39, 0.5);
    font-size: 0.85rem;
}
.audit-filter-pill .icon { width: 14px; height: 14px; }
.audit-filter-pill:hover { text-decoration: none; background: rgba(201, 162, 39, 0.25); }

.audit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.audit-entry {
    padding: 0.7rem 0.95rem;
    border: 1px solid var(--border);
    border-left: 4px solid #5865f2;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
}
.audit-success { border-left-color: #3ba55d; }
.audit-warning { border-left-color: #f0b232; }
.audit-danger { border-left-color: #ed4245; background: rgba(237, 66, 69, 0.06); }
.audit-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.audit-area { font-size: 0.72rem; }
.audit-details { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin: 0.4rem 0 0; font-size: 0.88rem; }
.audit-details div { display: flex; gap: 0.35rem; min-width: 0; }
.audit-details dt { color: var(--text-muted); }
.audit-details dt::after { content: ':'; }
.audit-details dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.audit-meta { margin-top: 0.4rem; font-size: 0.8rem; }

/* ---- 404-Seite: Bildkarte (einsamer Turm unterm Mond), darunter Text und Buttons ---- */
.not-found {
    max-width: 720px;
    margin: 2.5rem auto;
    border: 1px solid rgba(201, 162, 39, 0.35);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(28, 28, 28, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.3);
    text-align: center;
}
.not-found-scene {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: clamp(210px, 44vw, 320px);
    padding-bottom: 0.6rem;
    background:
        linear-gradient(180deg, rgba(10, 14, 24, 0.15) 0%, rgba(10, 14, 24, 0.35) 60%, rgba(28, 28, 28, 1) 100%),
        url('/assets/images/Landscapes/web/landscape8-bg.jpg') center 35% / cover no-repeat;
    overflow: hidden;
}
/* Leichtes Funkeln ueber dem Bild */
.not-found-stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 12% 22%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 28% 60%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 72% 18%, rgba(243, 215, 122, 0.8), transparent),
        radial-gradient(1px 1px at 86% 48%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 55% 12%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1.5px 1.5px at 40% 35%, rgba(243, 215, 122, 0.6), transparent);
    animation: not-found-twinkle 4s ease-in-out infinite alternate;
}
@keyframes not-found-twinkle { from { opacity: 0.35; } to { opacity: 1; } }
.not-found-code {
    position: relative;
    font-size: clamp(5rem, 18vw, 9rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.06em;
    background: linear-gradient(180deg, #fff3c4 0%, #f3d77a 35%, var(--gold) 65%, #7a5c12 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 28px rgba(201, 162, 39, 0.35));
    animation: not-found-float 6s ease-in-out infinite;
}
@keyframes not-found-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.not-found-body { padding: 0.25rem 2rem 2.2rem; }
.not-found-kicker {
    margin: 0;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.not-found h1 { margin: 0.4rem 0 0.6rem; font-size: 1.45rem; }
.not-found .text-muted { max-width: 520px; margin: 0 auto; }
.not-found code {
    overflow-wrap: anywhere;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
}
.not-found-actions { justify-content: center; margin-top: 1.5rem; }
@media (max-width: 600px) {
    .not-found { margin: 1.25rem auto; }
    .not-found-body { padding: 0.25rem 1.1rem 1.6rem; }
    .not-found h1 { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
    .not-found-stars, .not-found-code { animation: none; }
}

/* ---- Gear-Planer ---- */
/* Seltenheit wie im Spiel: Farbe von Name und Rahmen */
.grade-common { --grade: #c8c8c8; }
.grade-rare { --grade: #5cc16b; }
.grade-epic { --grade: #4aa3ff; }
.grade-unique { --grade: #e0b930; }
.grade-heroic { --grade: #ff7a3d; }
.grade-special { --grade: #d46cff; }
a.grade-common, a.grade-rare, a.grade-epic, a.grade-unique, a.grade-heroic, a.grade-special,
span.grade-common, span.grade-rare, span.grade-epic, span.grade-unique, span.grade-heroic, span.grade-special,
strong.grade-common, strong.grade-rare, strong.grade-epic, strong.grade-unique, strong.grade-heroic, strong.grade-special { color: var(--grade); }
.gear-icon {
    display: inline-block;
    flex-shrink: 0;
    border-radius: 6px;
    border: 1px solid var(--grade, var(--border));
    background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.35));
    object-fit: contain;
}
.gear-icon-empty { border-style: dashed; border-color: var(--border); background: rgba(255, 255, 255, 0.02); }
.gear-estimated { color: var(--gold); font-weight: 600; margin-right: 0.15rem; cursor: help; }
.gear-hint { font-size: 0.82rem; margin: 0.5rem 0 0; }

.gear-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; }
.gear-head > div:first-child { flex: 1 1 420px; }
.gear-head p { margin: 0.25rem 0 0; max-width: 760px; }
.gear-head-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.gear-empty p { margin: 0 0 0.5rem; }

/* Uebersicht */
.gear-overview-head { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.gear-overview-head h2 { margin: 0; }
.gear-create-form { display: flex; flex-direction: row; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.gear-create-form input { width: auto; min-width: 0; flex: 1 1 200px; height: auto; }
.gear-create-form select { width: auto; }
.gear-set-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 0.75rem; }
.gear-set-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.15s, background 0.15s;
}
.gear-set-card:hover { border-color: rgba(201, 162, 39, 0.6); }
.gear-set-card.is-checked { border-color: var(--gold); background: rgba(201, 162, 39, 0.08); }
.gear-set-card-link { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.9rem 2.6rem 0.9rem 1rem; color: var(--text); }
.gear-set-card-link:hover { text-decoration: none; color: var(--text); }
.gear-set-card-title { display: flex; align-items: center; gap: 0.4rem; font-weight: 600; font-size: 1.05rem; }
.gear-set-card-icons { display: flex; flex-wrap: wrap; gap: 3px; min-height: 26px; }
.gear-set-card-note { font-size: 0.85rem; color: var(--text-muted); font-style: italic; }
.gear-set-card-check { position: absolute; top: 0.75rem; right: 0.75rem; }
.gear-set-card-check input { width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; }
.gear-compare-bar { margin-top: 1rem; align-items: center; flex-wrap: wrap; }

/* Ein Set */
.gear-set-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; }
.gear-set-title h2 { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.2rem; }
.gear-set-title p { margin: 0.5rem 0 0; }
.gear-set-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.gear-set-actions form { margin: 0; }
.gear-compare-with select { width: auto; }
.gear-layout { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 1.5rem; align-items: start; }
@media (max-width: 800px) { .gear-layout { grid-template-columns: 1fr; } }

/* Ausruestung als Raster wie im Spiel: zwei quadratische Slots pro Reihe */
.gear-slots-panel { padding: 1rem; }
.gear-doll { display: grid; grid-template-columns: repeat(2, 76px); gap: 8px; justify-content: center; }
.gear-doll-slot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(20, 22, 30, 0.9), rgba(12, 13, 18, 0.95));
    color: rgba(255, 255, 255, 0.16);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.gear-doll-slot:hover { border-color: rgba(201, 162, 39, 0.6); color: rgba(255, 255, 255, 0.3); text-decoration: none; transform: translateY(-1px); }
/* Belegt: Hintergrund in der Farbe der Seltenheit (wie im Spiel gruen/blau/gold ...) */
.gear-doll-slot.is-filled {
    border-color: color-mix(in srgb, var(--grade) 55%, transparent);
    background:
        radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.08), transparent 65%),
        linear-gradient(180deg, color-mix(in srgb, var(--grade) 14%, #121418), color-mix(in srgb, var(--grade) 42%, #121418));
}
.gear-doll-slot.is-active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.45), 0 0 14px rgba(201, 162, 39, 0.35); }
/* Passt nicht (mehr) zum Set, z.B. nach einem Klassenwechsel: roter Rahmen innen (Seltenheit, Auswahl
   und Fokus bleiben sichtbar) - geloescht wird nichts */
.gear-doll-slot.is-mismatch::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--danger); border-radius: 5px; pointer-events: none; }
.gear-doll-slot img { width: 84%; height: 84%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.gear-doll-silhouette { width: 58%; height: 58%; }
.gear-doll-initial { font-size: 1.6rem; font-weight: 700; color: var(--grade); }
.gear-doll-enchant, .gear-doll-exceed {
    position: absolute;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 3px #000, 0 1px 2px #000, 0 0 6px #000;
}
.gear-doll-enchant { right: 4px; bottom: 4px; }
.gear-doll-exceed { left: 4px; top: 4px; color: #ffd76b; }
/* Manasteine: Punkte unten links (gold = eingesetzt) */
.gear-doll-stones { position: absolute; left: 4px; bottom: 5px; display: flex; gap: 2px; }
.gear-doll-stones i { width: 5px; height: 5px; border-radius: 50%; background: rgba(0, 0, 0, 0.55); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }
.gear-doll-stones i.is-set { background: var(--gold); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6); }
.gear-doll-hint { margin: 0.75rem 0 0; font-size: 0.78rem; text-align: center; }
/* Kleine Variante fuer Set-Karten (Profilseite, "Meine Sets"): sechs Slots pro Reihe */
.gear-doll.gear-doll-mini { grid-template-columns: repeat(6, minmax(0, 40px)); gap: 4px; justify-content: start; margin: 0.35rem 0 0.15rem; }
.gear-doll-mini .gear-doll-slot { border-radius: 4px; }
.gear-doll-mini .gear-doll-slot:hover { transform: none; }
.gear-doll-mini .gear-doll-enchant { right: 2px; bottom: 2px; font-size: 0.6rem; }
.gear-doll-mini .gear-doll-initial { font-size: 1rem; }
/* Saeule wie im Spiel: zwei Slots pro Reihe (Profilseite) */
.gear-doll.gear-doll-mini.gear-doll-column { grid-template-columns: repeat(2, 46px); gap: 5px; margin: 0; }
.gear-set-card-profile .gear-set-card-link { flex-direction: row; align-items: flex-start; gap: 1rem; padding-right: 1rem; }
.gear-set-card-info { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.gear-set-card-more { margin-top: 0.4rem; font-size: 0.82rem; color: var(--gold); }
.gear-set-card-profile .gear-set-card-info { flex: 1; }
/* Werte-Summe neben der Saeule: Name links, Zahl rechtsbuendig */
.gear-set-card-stats {
    display: flex;
    flex-direction: column;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    line-height: 1.55;
}
.gear-set-card-stat { display: flex; justify-content: space-between; gap: 0.75rem; }
.gear-set-card-stat-name { color: var(--text-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gear-set-card-stat-value { flex-shrink: 0; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.gear-set-card-profile:hover .gear-set-card-more { text-decoration: underline; }
.gear-set-card-skills { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border); font-size: 0.8rem; }
/* Build-Link unter der Karte (die Karte selbst ist schon ein Link) */
.gear-set-card-build { display: inline-block; margin: 0 1rem 0.9rem; font-size: 0.82rem; }
@media (max-width: 800px) {
    .gear-doll { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 520px; margin: 0 auto; }
}
@media (max-width: 420px) {
    .gear-doll { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.gear-side { display: flex; flex-direction: column; min-width: 0; }
.gear-slot-editor h3, .gear-totals h3 { margin-top: 0; }
.gear-item-card { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: 1rem; }
.gear-item-card > div { min-width: 0; }
.gear-item-stats { font-size: 0.85rem; margin-top: 0.25rem; }
.gear-slot-form { display: flex; flex-direction: column; gap: 0.75rem; }
.gear-slot-form label { display: flex; flex-direction: column; gap: 0.3rem; }
.gear-form-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.gear-form-row label { flex: 1 1 140px; }
.gear-fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 0.6rem 0.8rem 0.8rem; margin: 0; }
.gear-fieldset legend { padding: 0 0.3rem; font-weight: 600; }
.gear-fieldset legend .text-muted { font-weight: 400; font-size: 0.82rem; }
.gear-roll-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: 0.5rem; margin-top: 0.45rem; }
.gear-roll-row input:invalid { border-color: var(--danger); }
.gear-clear-form { margin-top: 0.75rem; }
.gear-slot-actions { align-items: center; }
.gear-save-status { font-size: 0.85rem; color: var(--text-muted); min-height: 1.2em; }
.gear-save-status.is-ok { color: #7ddc8a; }
.gear-save-status.is-busy { color: var(--text-muted); font-style: italic; }
.gear-save-status.is-error { color: #f08a86; }
.gear-delete-form { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.gear-detail-list { display: flex; flex-direction: column; gap: 0.4rem; margin: 0; }
.gear-detail-list div { display: flex; gap: 0.5rem; }
.gear-detail-list dt { color: var(--text-muted); min-width: 110px; }
.gear-detail-list dd { margin: 0; }

.gear-totals-table, .gear-compare, .gear-diff-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.gear-totals .table-scroll table { min-width: 560px; }
.gear-totals-table th, .gear-totals-table td, .gear-compare th, .gear-compare td, .gear-diff-table th, .gear-diff-table td {
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
    vertical-align: top;
}
.gear-totals-table thead th, .gear-compare thead th, .gear-diff-table thead th { color: var(--text-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.gear-totals-table tbody th, .gear-compare tbody th { font-weight: 400; color: var(--text-muted); white-space: nowrap; }
.gear-totals-table td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gear-total-col { font-weight: 700; color: var(--text); }
.gear-totals-table td.gear-total-col { color: var(--gold); }
.gear-source-col { color: var(--text-muted); }

.gear-compare td { font-variant-numeric: tabular-nums; }
.gear-compare thead th a { font-size: 1rem; text-transform: none; letter-spacing: 0; }
.gear-compare-owner { text-transform: none; letter-spacing: 0; font-weight: 400; }
.gear-compare-group th { padding-top: 1rem; color: var(--gold) !important; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; }
.gear-diff { display: inline-block; margin-left: 0.35rem; padding: 0 0.35rem; border-radius: 4px; font-size: 0.78rem; font-weight: 600; }
.gear-diff.is-up { color: #7ddc8a; background: rgba(76, 175, 80, 0.15); }
.gear-diff.is-down { color: #f08a86; background: rgba(217, 83, 79, 0.15); }
.gear-compare-item { display: inline-flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }

/* Unterseiten eines Sets: Ausruestung, Skills, Stigmen */
.gear-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; }
.gear-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-panel);
    color: var(--text);
    font-weight: 600;
}
.gear-tab:hover { border-color: rgba(201, 162, 39, 0.6); color: var(--text); text-decoration: none; }
.gear-tab.is-active { border-color: var(--gold); background: rgba(201, 162, 39, 0.14); color: var(--gold); }
.gear-tab-count { padding: 0 0.4rem; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 0.75rem; font-weight: 600; color: var(--text-muted); }
.gear-tab.is-active .gear-tab-count { background: rgba(201, 162, 39, 0.25); color: var(--gold); }

/* Skills eines Sets: Raster aus Karten (Icon mit Stufe, Name, Art, Auswahl der Stufe) */
.gear-skills-head { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; align-items: baseline; }
.gear-skills-head h3 { margin: 0; }
.gear-skills-head .gear-save-status { margin-left: auto; }
.gear-skills-legend { margin: 0.35rem 0 0; }
.gear-skill-costs { font-size: 0.85rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.gear-skills-details { margin-top: 0.35rem; font-size: 0.82rem; }
.gear-skills-details summary { cursor: pointer; color: var(--text-muted); }
.gear-skills-details summary:hover { color: var(--gold); }
.gear-skills-details p { margin: 0.35rem 0 0; }
.gear-skill-bonus-text { color: #b9a3ff; font-weight: 600; }
.gear-skills-kind { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.75rem; margin: 1.1rem 0 0.5rem; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); }
.gear-skills-kind-count { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 0.82rem; color: var(--text-muted); }
.gear-skills-kind-count.is-full { color: var(--gold); }
.gear-skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 0.5rem; align-items: start; }
.gear-skill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.15s, background 0.15s;
}
.gear-skill.is-planned { border-color: rgba(201, 162, 39, 0.45); background: rgba(201, 162, 39, 0.07); }
/* Stufe 11-16 gibt es nur mit Boni (Daevanion-Bretter u. a.): violett */
.gear-skill.is-bonus { border-color: rgba(150, 120, 255, 0.6); background: rgba(150, 120, 255, 0.1); }
.gear-skill.is-unlisted { border-style: dashed; }
.gear-skill-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: #0e0f14;
    overflow: hidden;
}
.gear-skill-icon img { width: 36px; height: 36px; object-fit: contain; }
.gear-skill:not(.is-planned) .gear-skill-icon img { filter: grayscale(0.8) brightness(0.65); }
.gear-skill-initial { font-weight: 700; color: var(--text-muted); }
.gear-skill-level {
    position: absolute;
    right: 2px;
    bottom: 1px;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 3px #000, 0 1px 2px #000, 0 0 6px #000;
}
.gear-skill.is-bonus .gear-skill-level { color: #cdbdff; }
/* Kopf jeder Karte so hoch wie bei einem zweizeiligen Namen - so sind alle Karten gleich gross */
.gear-skill-info { display: flex; flex-direction: column; justify-content: center; flex: 1; min-width: 0; min-height: 2.95rem; }
/* Lange Namen ("Incandescent Blow") duerfen zweizeilig werden statt abgeschnitten - umgebrochen wird zwischen Woertern */
.gear-skill-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
    overflow-wrap: break-word;
}
.gear-skill:not(.is-planned) .gear-skill-name { color: var(--text-muted); font-weight: 500; }
.gear-skill-cat { font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); min-height: 1em; }
.gear-skill-cat.skill-cat-attack { color: #e0708a; }
.gear-skill-cat.skill-cat-buff { color: #5fd38d; }
.gear-skill-cat.skill-cat-heal { color: #6fc3ff; }
.gear-skill-cat.skill-cat-debuff { color: #d9a24a; }
.gear-skill { flex-wrap: wrap; }
.gear-skill select { flex-shrink: 0; width: 4.3rem; padding: 0.25rem 0.4rem; }
/* Spezialisierungen (aktive Skills) bzw. Boni (Stigmen) unter dem Skill: aufklappbar wie im aion2hub-Planer,
   je Zeile "ab Stufe" und Effekt - gold = gewaehlt bzw. erreicht, blass mit Schloss = noch nicht freigeschaltet */
.gear-skill-parts { flex-basis: 100%; margin-top: 0.15rem; padding-top: 0.3rem; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.gear-skill-parts summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    list-style: none;
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}
.gear-skill-parts summary::-webkit-details-marker { display: none; }
.gear-skill-parts summary::after { content: '▾'; font-size: 0.8rem; }
.gear-skill-parts[open] summary::after { content: '▴'; }
.gear-skill-parts summary:hover { color: var(--gold); }
.gear-parts-count { margin-left: auto; text-transform: none; letter-spacing: 0; }
.gear-parts-hint { margin: 0.3rem 0 0.1rem; font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gear-part {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin: 0.25rem 0 0;
    padding: 0.3rem 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.3;
}
label.gear-part { cursor: pointer; }
label.gear-part:hover:not(.is-locked) { border-color: rgba(201, 162, 39, 0.6); }
.gear-part input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.gear-part:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 1px; }
.gear-part:has(input:disabled):not(.is-on) { cursor: not-allowed; }
.gear-part.is-on { border-color: var(--gold); background: rgba(201, 162, 39, 0.14); }
.gear-part.is-locked { opacity: 0.45; }
.gear-part-level {
    flex-shrink: 0;
    min-width: 1.5rem;
    padding: 0 0.2rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    color: var(--text-muted);
}
.gear-part.is-on .gear-part-level { background: var(--gold); color: #1a1a1a; }
/* Jede Zeile genau zwei Zeilen hoch (laengere Texte mit "…", ganz im Tooltip) - aufgeklappte Karten sind so alle gleich gross */
.gear-part-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-width: 0;
    min-height: 2.6em;
    line-height: 1.3;
}
/* Breite Karten (eine pro Reihe, z.B. schmales Fenster): die meisten Texte passen in eine Zeile - dann nur eine hoch */
.gear-skill { container-type: inline-size; }
@container (min-width: 440px) {
    .gear-part-text { min-height: 1.3em; }
}
.gear-part-lock { display: none; flex-shrink: 0; color: var(--text-muted); }
.gear-part-lock svg { width: 12px; height: 12px; }
.gear-part.is-locked .gear-part-lock { display: inline-flex; }
/* Stigma-Boni kommen automatisch - pink wie die Stigmen, kein Anhaken */
.gear-skill[data-kind="stigma"] .gear-part.is-on { border-color: rgba(224, 112, 138, 0.6); background: rgba(224, 112, 138, 0.1); }
.gear-skill[data-kind="stigma"] .gear-part.is-on .gear-part-level { background: #e0708a; }
/* Fremdes Set: nur die gewaehlten Spezialisierungen */
.gear-skill-parts-list { flex-basis: 100%; margin: 0.2rem 0 0; padding: 0; list-style: none; }
/* Stigma: Boni bei Stufe 5/10/15/20 als Punkte hinter der Art */
.gear-stigma-perks { display: inline-flex; gap: 3px; margin-left: 0.35rem; vertical-align: middle; }
.gear-stigma-perks i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.15); }
.gear-stigma-perks i.is-on { background: #e0708a; box-shadow: 0 0 4px rgba(224, 112, 138, 0.7); }
/* Die ausgeruesteten Stigmen als Plaetze wie im Spiel */
.gear-stigma-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 0.5rem; margin: 0.9rem 0 0.4rem; }
.gear-stigma-slot {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 54px;
    padding: 0.4rem 0.55rem;
    border: 1px dashed var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}
.gear-stigma-slot.is-filled { border-style: solid; border-color: rgba(224, 112, 138, 0.55); background: rgba(224, 112, 138, 0.08); }
.gear-stigma-slot-text { display: flex; flex-direction: column; min-width: 0; font-size: 0.85rem; }
.gear-stigma-slot-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gear-stigma-slot-text span { font-size: 0.75rem; color: var(--text-muted); }
.gear-stigma-slot-empty { font-size: 0.8rem; color: var(--text-muted); }
.gear-skill select:disabled { opacity: 0.45; cursor: not-allowed; }
.gear-skill-level-text { flex-shrink: 0; font-size: 0.85rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.gear-skill.is-planned .gear-skill-level-text { color: var(--text); font-weight: 600; }
.gear-skill.is-bonus .gear-skill-level-text { color: #cdbdff; }
.gear-skills-actions { margin-top: 1rem; }
/* Kleine Icon-Reihe der geplanten Skills (Set-Karten, Profilseite) */
.gear-skill-mini { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0.15rem 0; }
.gear-skill-mini-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(201, 162, 39, 0.45);
    border-radius: 5px;
    background: #0e0f14;
    overflow: hidden;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.gear-skill-mini-icon.is-bonus { border-color: rgba(150, 120, 255, 0.7); }
.gear-skill-mini-icon.is-stigma { border-color: rgba(224, 112, 138, 0.75); }
.gear-skill-mini-icon img { width: 27px; height: 27px; object-fit: contain; }
.gear-skill-mini-level {
    position: absolute;
    right: 1px;
    bottom: 0;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-shadow: 0 0 3px #000, 0 1px 2px #000;
}
.gear-skill-mini-icon.is-bonus .gear-skill-mini-level { color: #cdbdff; }
.gear-skill-mini-more { font-size: 0.78rem; color: var(--text-muted); padding-left: 0.2rem; }
.gear-skill-compare-icon { width: 22px; height: 22px; border-radius: 4px; background: #0e0f14; object-fit: contain; }
.gear-skill-stigma-tag { font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #e0708a; }

/* Skills: Stufe mit - und + wie bei aion2hub ("3/10"), Boni aus Daevanion und Arcana als "+4 → 14" */
.gear-stepper { display: inline-flex; align-items: center; gap: 0.2rem; flex-shrink: 0; }
.gear-step {
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--bg-panel-alt);
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
}
.gear-step:hover { background: #383838; border-color: var(--gold); color: var(--gold); box-shadow: none; }
.gear-step:disabled { opacity: 0.3; cursor: not-allowed; }
.gear-step:disabled:hover { background: var(--bg-panel-alt); border-color: var(--border); color: var(--text); }
.gear-step-value { min-width: 2.7rem; text-align: center; font-size: 0.82rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gold); }
.gear-skill:not(.is-planned) .gear-step-value { color: var(--text-muted); font-weight: 500; }
.gear-skill-boost, .gear-skill-boost-text { color: #7ddc8a; font-weight: 700; white-space: nowrap; }
.gear-skill-boost { margin-left: 0.3rem; text-transform: none; letter-spacing: 0; cursor: help; }
.gear-skill-costs.is-over { color: #f08a86; }

/* Info-Blase beim Drueberfahren (Skills, Daevanion-Felder - assets/js/gear.js) */
.gear-tip {
    position: fixed;
    z-index: 1000;
    max-width: min(340px, calc(100vw - 16px));
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(201, 162, 39, 0.5);
    border-radius: 8px;
    background: #15171d;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--text);
    pointer-events: none;
}
.gear-tip[hidden] { display: none; }
.gear-tip-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.5rem; }
.gear-tip-head strong { color: var(--gold); font-size: 0.9rem; }
.gear-tip-sub { color: var(--text-muted); font-size: 0.75rem; }
.gear-tip-meta { margin-top: 0.1rem; color: var(--text-muted); font-size: 0.75rem; }
.gear-tip-tags { margin-top: 0.15rem; color: #e0b36a; font-size: 0.75rem; }
.gear-tip-text { margin: 0.4rem 0 0; }
/* Werte, die mit der Stufe wachsen */
.gear-tip-val { color: #7ddc8a; font-weight: 600; }
.gear-tip-note { margin-top: 0.35rem; color: var(--text-muted); font-size: 0.7rem; }
.gear-tip-state { margin-top: 0.3rem; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); }
.gear-tip-state.is-on, .gear-tip-state.is-open { color: #7ddc8a; }
.gear-tip-state.is-budget { color: #f08a86; }
[data-skill-tip] { cursor: help; }

/* ---- Planer-Seiten: Arcana, Pets, Daevanion, Pantheon, Closet (includes/gear_planner_view.php) ---- */
.gear-tab-count:empty { display: none; }
button.gear-tab { font-size: 0.9rem; line-height: 1.25; cursor: pointer; }
button.gear-tab { background: var(--bg-panel); color: var(--text); padding: 0.4rem 0.8rem; }
button.gear-tab:hover { background: var(--bg-panel); color: var(--text); box-shadow: none; }
button.gear-tab.is-active, button.gear-tab.is-active:hover { background: rgba(201, 162, 39, 0.14); color: var(--gold); }
.gear-plan [hidden] { display: none !important; }
.gear-plan-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 320px); gap: 1rem 1.5rem; align-items: start; margin-top: 0.9rem; }
.gear-plan-main { min-width: 0; }
.gear-plan-summary {
    position: sticky;
    top: 1rem;
    min-width: 0;
    padding: 0.2rem 1rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
}
.gear-plan-summary .gear-skills-kind:first-child { margin-top: 0.8rem; }
.gear-plan-empty { margin: 0.2rem 0; font-size: 0.85rem; }
.gear-plan-stats { display: flex; flex-direction: column; margin: 0; font-size: 0.88rem; }
.gear-plan-stats > div { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.22rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.gear-plan-stats dt { color: var(--text-muted); min-width: 0; }
.gear-plan-stats dt[title] { cursor: help; }
.gear-plan-stats dd { margin: 0; flex-shrink: 0; font-weight: 600; color: var(--gold); font-variant-numeric: tabular-nums; }
.gear-plan-stats dd.is-minus { color: #7ddc8a; }
.gear-plan-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid color-mix(in srgb, var(--grade, var(--border)) 55%, transparent);
    border-radius: 7px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--grade, #888) 10%, #121418), color-mix(in srgb, var(--grade, #888) 30%, #121418));
    overflow: hidden;
}
.gear-plan-icon img { width: 86%; height: 86%; object-fit: contain; }
.gear-plan-icon.is-empty { font-weight: 700; color: var(--grade, var(--text-muted)); }
.gear-plan-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.45rem;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.07);
    font-size: 0.74rem;
    color: var(--text);
    white-space: nowrap;
}
.gear-plan-chip strong { color: var(--gold); }
.gear-plan-chip-set { background: rgba(92, 193, 107, 0.12); color: #9fdca8; }
.gear-plan-badge { margin-left: 0.3rem; padding: 0 0.35rem; border-radius: 4px; background: rgba(255, 255, 255, 0.08); font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.gear-plan-badge.is-set { background: rgba(76, 175, 80, 0.18); color: #7ddc8a; }
.gear-plan-skill-bonus { list-style: none; margin: 0; padding: 0; font-size: 0.86rem; }
.gear-plan-skill-bonus li { display: flex; align-items: center; gap: 0.45rem; padding: 0.2rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.gear-plan-skill-bonus img { width: 22px; height: 22px; border-radius: 4px; background: #0e0f14; object-fit: contain; }
.gear-plan-skill-bonus span { flex: 1; min-width: 0; }
.gear-plan-skill-bonus strong { color: #cdbdff; font-variant-numeric: tabular-nums; }
.gear-plan-skill-dot { flex: 0 0 22px !important; height: 22px; border-radius: 4px; background: rgba(150, 120, 255, 0.2); }
.gear-plan-filter { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.6rem 0; }
.gear-plan-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0 0 0.75rem; }
.gear-plan-tools input[type="search"] { flex: 1 1 220px; width: auto; min-width: 0; padding: 0.45rem 0.7rem; font-size: 0.92rem; }
.gear-plan-tools select { width: auto; padding: 0.45rem 0.7rem; font-size: 0.92rem; }
.gear-plan-tools .checkbox-label { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 400; font-size: 0.88rem; }
.gear-plan-copy { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 1.25rem; padding-top: 0.9rem; border-top: 1px solid var(--border); }
.gear-plan-copy select { width: auto; max-width: 100%; padding: 0.4rem 0.6rem; font-size: 0.9rem; }

/* Arcana: je Kartenart ein Platz mit Karte, Aufwertung, Domaenenpunkten und gepraegten Skills */
.gear-arcana-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 0.6rem; align-items: start; }
.gear-arcana-slot { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.6rem 0.7rem; border: 1px dashed var(--border); border-radius: 8px; background: rgba(255, 255, 255, 0.02); min-width: 0; }
.gear-arcana-slot.is-filled { border-style: solid; border-color: color-mix(in srgb, var(--grade) 45%, transparent); background: color-mix(in srgb, var(--grade) 6%, transparent); }
.gear-arcana-head { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.gear-arcana-title { display: flex; flex-direction: column; min-width: 0; font-size: 0.85rem; }
.gear-arcana-title strong { font-size: 0.95rem; overflow-wrap: anywhere; }
.gear-arcana-title .text-muted { font-size: 0.76rem; }
.gear-arcana-type { font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.gear-arcana-pick { display: flex; gap: 0.4rem; }
.gear-arcana-pick select { padding: 0.35rem 0.5rem; font-size: 0.88rem; }
.gear-arcana-pick select[data-arcana-enchant] { width: 4.3rem; flex-shrink: 0; }
.gear-arcana-points { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.gear-arcana-skills { padding-top: 0.4rem; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.gear-arcana-skills-head { display: flex; align-items: center; gap: 0.5rem; font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.25rem; }
.gear-arcana-skills.is-over [data-arcana-used] { color: #f08a86; }
.gear-arcana-skill-row { display: grid; grid-template-columns: minmax(0, 1fr) 4.3rem; gap: 0.35rem; margin-top: 0.3rem; }
.gear-arcana-skill-row select { padding: 0.3rem 0.45rem; font-size: 0.85rem; }
.gear-arcana-skill-row select:disabled { opacity: 0.45; }
.gear-arcana-skills .gear-plan-skill-bonus { margin-top: 0.2rem; }
.gear-arcana-set-bonus { margin: 0.3rem 0 0.6rem; font-size: 0.86rem; }
.gear-arcana-set-bonus ul { list-style: none; margin: 0.25rem 0 0; padding: 0; }
.gear-arcana-set-bonus li { display: flex; gap: 0.45rem; align-items: flex-start; padding: 0.15rem 0; color: var(--text-muted); font-size: 0.82rem; }
.gear-arcana-set-bonus li span { flex-shrink: 0; min-width: 1.4rem; padding: 0 0.25rem; border-radius: 4px; background: rgba(255, 255, 255, 0.08); text-align: center; font-weight: 700; font-size: 0.72rem; line-height: 1.5; }
.gear-arcana-set-bonus li.is-on { color: var(--text); }
.gear-arcana-set-bonus li.is-on span { background: var(--gold); color: #1a1a1a; }

/* Pets: Sammlung mit Stufe je Pet, Gattungs-Einsicht je Gattung */
.gear-pet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(235px, 100%), 1fr)); gap: 0.45rem; }
.gear-pet { display: flex; align-items: center; gap: 0.55rem; min-width: 0; padding: 0.35rem 0.5rem; border: 1px solid var(--border); border-radius: 8px; background: rgba(255, 255, 255, 0.02); }
.gear-pet.is-on { border-color: rgba(201, 162, 39, 0.45); background: rgba(201, 162, 39, 0.07); }
.gear-pet:not(.is-on) .gear-plan-icon img { filter: grayscale(0.7) brightness(0.7); }
.gear-pet-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.gear-pet-name { font-size: 0.88rem; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.gear-pet:not(.is-on) .gear-pet-name { color: var(--text-muted); font-weight: 500; }
.gear-pet-family { font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }
.gear-pet select { flex-shrink: 0; width: 4.6rem; padding: 0.25rem 0.4rem; font-size: 0.88rem; }
.gear-pet-toggle { display: inline-flex; align-items: center; gap: 0.3rem; flex-shrink: 0; font-size: 0.8rem; font-weight: 500; cursor: pointer; }
.gear-pet-toggle input { width: 16px; height: 16px; accent-color: var(--gold); }
.gear-pet-level { flex-shrink: 0; font-size: 0.82rem; color: var(--gold); font-weight: 600; }
.gear-insight-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 0.6rem; align-items: start; }
.gear-insight { display: flex; flex-direction: column; gap: 0.35rem; }
.gear-insight-level { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.88rem; }
.gear-insight-level label { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; }
.gear-insight-level select { width: 4.3rem; padding: 0.25rem 0.4rem; }
.gear-insight-slot { padding: 0.35rem 0.5rem; font-size: 0.85rem; }
.gear-insight-pick { font-size: 0.86rem; }

/* Daevanion: Bretter als Raster wie im Spiel - Start in der Mitte, Linien zwischen aktiven Nachbarn */
.gear-dv-budgets { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1rem; margin: 0.8rem 0 0.2rem; font-size: 0.88rem; color: var(--text-muted); }
.gear-dv-budget strong { color: var(--gold); font-variant-numeric: tabular-nums; }
/* Kristalle und Reiter der Bretter mittig ueber dem Brett */
.gear-dv-tabs { justify-content: center; margin: 0.6rem 0 0.4rem; }
.gear-dv-board { margin-top: 0.8rem; }
.gear-dv-board-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1rem; }
.gear-dv-board-head h4 { margin: 0; font-size: 1rem; }
.gear-dv-board-head h4 .text-muted { font-size: 0.82rem; font-weight: 400; }
.gear-dv-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
/* Jedes Brett gleich gross und mittig (11x11, 13x13 oder 15x15 Felder auf derselben Flaeche, die Felder passen sich an),
   die Werte des Bretts darunter - so aendert nichts neben dem Brett dessen Groesse */
.gear-dv-board-head { width: min(100%, 680px); margin: 0 auto; }
.gear-dv-layout { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-top: 0.6rem; }
.gear-dv-scroll { width: min(100%, 680px); overflow-x: auto; }
.gear-dv-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
    grid-template-rows: repeat(var(--rows), minmax(0, 1fr));
    width: 100%;
    aspect-ratio: var(--cols) / var(--rows);
    padding: 6px;
    border-radius: 12px;
    background: radial-gradient(circle at 50% 50%, rgba(201, 162, 39, 0.09), rgba(0, 0, 0, 0.25) 70%);
}
.gear-dv-node { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; margin: 0; font-weight: 400; }
label.gear-dv-node { cursor: pointer; }
.gear-dv-node input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.gear-dv-node:has(input:disabled) { cursor: default; }
.gear-dv-node:has(input:focus-visible) .gear-dv-cell { outline: 2px solid var(--gold); outline-offset: 1px; }
.gear-dv-cell {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78%;
    height: 78%;
    border: 1px solid color-mix(in srgb, var(--grade) 30%, #2c3142);
    border-radius: 5px;
    background: rgba(8, 10, 18, 0.72);
    color: var(--gold);
    font-size: 0.7rem;
    transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.gear-dv-node.is-on .gear-dv-cell { border-color: var(--grade); background: color-mix(in srgb, var(--grade) 28%, #10131c); box-shadow: 0 0 7px color-mix(in srgb, var(--grade) 55%, transparent); }
.gear-dv-node.is-open .gear-dv-cell { box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.7); }
label.gear-dv-node.is-open:hover .gear-dv-cell, label.gear-dv-node.is-on:hover .gear-dv-cell { border-color: var(--gold); }
.gear-dv-cell img { width: 90%; height: 90%; object-fit: contain; border-radius: 3px; }
.gear-dv-node:not(.is-on) .gear-dv-cell img { filter: grayscale(0.9) brightness(0.55); }
.gear-dv-dot, .gear-dv-skill-dot { display: block; width: 30%; height: 30%; border-radius: 50%; background: var(--grade); opacity: 0.4; }
.gear-dv-skill-dot { border-radius: 2px; }
.gear-dv-node.is-on .gear-dv-dot, .gear-dv-node.is-on .gear-dv-skill-dot { opacity: 1; box-shadow: 0 0 4px var(--grade); }
.gear-dv-node.grade-common .gear-dv-dot { width: 24%; height: 24%; }
.gear-dv-node.is-start .gear-dv-cell { font-size: 1.05rem; }
.gear-dv-node.link-r::after, .gear-dv-node.link-d::before { content: ''; position: absolute; background: rgba(227, 189, 110, 0.55); z-index: 0; }
.gear-dv-node.link-r::after { left: 50%; top: calc(50% - 1px); width: 100%; height: 2px; }
.gear-dv-node.link-d::before { top: 50%; left: calc(50% - 1px); width: 2px; height: 100%; }
.gear-dv-side { width: min(100%, 680px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; align-items: start; font-size: 0.88rem; }
.gear-dv-count { grid-column: 1 / -1; margin: 0 0 0.4rem; color: var(--text-muted); }
.gear-dv-count strong { color: var(--gold); }
.gear-dv-summary { position: static; margin-top: 1.1rem; }

/* Pantheon: Domaenen mit Balken, Dekorationen zum Aufstellen */
.gear-pantheon-domains { display: flex; flex-direction: column; gap: 0.35rem; }
.gear-pantheon-domain { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 0.5rem; font-size: 0.82rem; }
.gear-pantheon-domain.is-empty { opacity: 0.45; }
.gear-pantheon-domain-name { color: var(--text-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gear-pantheon-domain-value { font-weight: 600; color: var(--gold); font-variant-numeric: tabular-nums; }
.gear-pantheon-bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.gear-pantheon-bar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #a07d1c, #e6c15a); }
.gear-deco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 0.45rem; }
.gear-deco { position: relative; display: flex; align-items: flex-start; gap: 0.55rem; min-width: 0; margin: 0; padding: 0.45rem 0.55rem; border: 1px solid var(--border); border-radius: 8px; background: rgba(255, 255, 255, 0.02); font-weight: 400; }
label.gear-deco { cursor: pointer; }
label.gear-deco:hover { border-color: rgba(201, 162, 39, 0.6); }
.gear-deco input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.gear-deco:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 1px; }
.gear-deco.is-on { border-color: var(--gold); background: rgba(201, 162, 39, 0.1); }
.gear-deco.is-full { opacity: 0.45; cursor: not-allowed; }
.gear-deco-info { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; min-width: 0; }
.gear-deco-name { font-size: 0.86rem; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.gear-deco-meta { font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.gear-deco-domains { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.1rem; }
.gear-deco-check { flex-shrink: 0; display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 50%; color: transparent; }
.gear-deco-check svg { width: 13px; height: 13px; }
.gear-deco.is-on .gear-deco-check { border-color: var(--gold); background: var(--gold); color: #1a1a1a; }

/* Closet: Sammelpunkte je Kategorie, Skins zum Abhaken */
.gear-closet-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.gear-closet-table th, .gear-closet-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.gear-closet-table thead th { color: var(--text-muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.gear-closet-table tbody th { font-weight: 600; white-space: nowrap; }
.gear-closet-table tr:not(.is-on) tbody th, .gear-closet-table tbody tr:not(.is-on) th { color: var(--text-muted); }
.gear-closet-points-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }
.gear-closet-points-cell strong { color: var(--gold); }
.gear-closet-stat { color: var(--text-muted); font-size: 0.85rem; }
.gear-closet-table tr.is-on .gear-closet-stat { color: var(--text); }
.gear-closet-table input { width: 6rem; padding: 0.3rem 0.45rem; font-size: 0.9rem; }
.gear-skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 0.35rem; }
.gear-skin { position: relative; display: grid; grid-template-columns: 4px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 0.55rem; margin: 0; padding: 0.35rem 0.55rem 0.35rem 0.4rem; border: 1px solid var(--border); border-radius: 7px; background: rgba(255, 255, 255, 0.02); font-weight: 400; cursor: pointer; }
.gear-skin:hover { border-color: rgba(201, 162, 39, 0.6); }
.gear-skin input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.gear-skin:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 1px; }
.gear-skin.is-on { border-color: var(--gold); background: rgba(201, 162, 39, 0.1); }
.gear-skin-grade { grid-row: 1 / 3; border-radius: 2px; background: var(--grade); opacity: 0.35; }
.gear-skin.is-on .gear-skin-grade { opacity: 1; }
.gear-skin-name { font-size: 0.86rem; line-height: 1.25; overflow-wrap: anywhere; }
.gear-skin:not(.is-on) .gear-skin-name { color: var(--text-muted); }
.gear-skin-meta { font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
span.gear-skin-meta { color: color-mix(in srgb, var(--grade) 80%, #999); }

@media (max-width: 1100px) {
    .gear-plan-layout { grid-template-columns: minmax(0, 1fr); }
    .gear-plan-summary { position: static; }
}
@media (max-width: 700px) {
    .gear-dv-side { grid-template-columns: minmax(0, 1fr); }
    .gear-plan-filter .gear-tab { padding: 0.3rem 0.6rem; font-size: 0.84rem; }
    /* Closet-Tabelle: je Kategorie zwei Zeilen (Name und Punkte links, Eingabe rechts), darunter der Wert */
    .gear-closet-table thead { display: none; }
    .table-scroll .gear-closet-table { min-width: 0; }
    .gear-closet-table, .gear-closet-table tbody { display: block; }
    .gear-closet-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.1rem 0.75rem; padding: 0.45rem 0; border-bottom: 1px solid var(--border); }
    .gear-closet-table th, .gear-closet-table td { display: block; padding: 0; border: 0; }
    .gear-closet-table tbody th { grid-column: 1; grid-row: 1; }
    .gear-closet-points-cell { grid-column: 1; grid-row: 2; }
    .gear-closet-table td:has(input) { grid-column: 2; grid-row: 1 / 3; align-self: center; }
    .gear-closet-stat { grid-column: 1 / -1; grid-row: 3; }
}

/* Admin: Katalog */
.gear-import { margin-top: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: 8px; background: rgba(255, 255, 255, 0.025); }
.gear-import h2 { margin: 0 0 0.3rem; font-size: 1.1rem; }
.gear-import p { margin: 0.3rem 0; }
.gear-import-examples { margin: 0.3rem 0; padding-left: 1.2rem; font-size: 0.88rem; }
.gear-import-examples li { margin: 0.15rem 0; }
.gear-import-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.75rem; }
.gear-import-row input[type="text"] { flex: 1 1 320px; width: auto; min-width: 0; }
.gear-import-progress { margin-top: 1rem; }
.gear-progress-bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-bottom: 0.4rem; }
.gear-progress-bar span { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.3s; }
.gear-import-log { list-style: none; margin: 0.6rem 0 0; padding: 0; max-height: 320px; overflow-y: auto; font-size: 0.88rem; }
.gear-import-log > li { padding: 0.3rem 0.5rem; border-left: 3px solid var(--border); margin-bottom: 0.25rem; background: rgba(255, 255, 255, 0.02); }
.gear-import-log ul { margin: 0.25rem 0 0; padding-left: 1.1rem; color: var(--text-muted); }
.gear-log-new { border-left-color: var(--success) !important; }
.gear-log-changed { border-left-color: var(--gold) !important; }
.gear-log-error { border-left-color: var(--danger) !important; color: #f08a86; }
.gear-log-same, .gear-log-info { color: var(--text-muted); }
.gear-admin-sub { display: block; font-size: 0.78rem; max-width: 420px; }
.gear-admin-actions { display: flex; gap: 0.4rem; align-items: center; justify-content: flex-end; }
.gear-admin-actions form { margin: 0; }
.gear-admin-table td { vertical-align: middle; }
/* Skill-Namen (admin/gear_skills.php): Klassenwahl und Eingabetabelle */
.gear-skill-classes { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.9rem 0 0.6rem; }
.gear-skill-names input { min-width: 8.5rem; padding: 0.3rem 0.45rem; font-size: 0.85rem; }
.gear-skill-names td:first-child { white-space: nowrap; }
.gear-diff-modal { max-width: 760px; }
.gear-diff-table td.is-new { color: var(--gold); }
.gear-diff-table tbody th { white-space: nowrap; color: var(--text-muted); font-weight: 400; }

/* ---- Daten zuruecksetzen (nur Entwickler) ---- */
.reset-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 1.25rem 0 0.9rem; }
.reset-toolbar .text-muted { margin-left: auto; font-size: 0.9rem; }
.reset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.75rem; }
.reset-option {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.reset-option:hover { border-color: rgba(217, 83, 79, 0.55); }
.reset-option.is-checked { border-color: var(--danger); background: rgba(217, 83, 79, 0.1); }
.reset-option input { width: auto; margin: 0.2rem 0 0; accent-color: var(--danger); flex-shrink: 0; }
.reset-option-body { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.reset-option-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; }
.reset-option-text { color: var(--text-muted); font-size: 0.85rem; line-height: 1.4; }
.reset-option.is-empty .reset-count { opacity: 0.55; }
.reset-confirm {
    margin-top: 1.5rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(217, 83, 79, 0.45);
    border-radius: 8px;
    background: rgba(217, 83, 79, 0.07);
}
.reset-confirm label { display: block; margin-bottom: 0.5rem; }
.reset-confirm-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.reset-confirm-row input { flex: 1 1 200px; width: auto; }
.reset-confirm-row .button { display: inline-flex; align-items: center; gap: 0.4rem; }
.reset-confirm-row .button:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---- Moderation: Freigabe, Melden ---- */
.pending-badge {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    z-index: 1;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(240, 178, 50, 0.92);
    color: #1a1a1a;
    font-size: 0.72rem;
    font-weight: 700;
}
.gallery-item.is-pending img { opacity: 0.55; filter: grayscale(0.4); }
.pending-badge-inline {
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: rgba(240, 178, 50, 0.18);
    color: #f0b232;
    font-size: 0.75rem;
    font-weight: 600;
}
.comment.is-pending .comment-body { border-style: dashed; border-color: rgba(240, 178, 50, 0.5); }
.pending-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    background: rgba(240, 178, 50, 0.1);
    border: 1px solid rgba(240, 178, 50, 0.4);
}
.picture-view-tools { display: flex; align-items: center; gap: 0.6rem; }
.report-button { opacity: 0.7; }
.report-button:hover { opacity: 1; color: #f0b232; }
.report-done { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.78rem; color: var(--text-muted); }
.report-done .icon { width: 14px; height: 14px; }
.comment-report .icon-button { width: 28px; height: 28px; }
.comment-head .comment-report { margin-left: auto; }
.comment-head .comment-report + .comment-delete { margin-left: 0; }

.moderation-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.9rem; margin-bottom: 0.9rem; }
.moderation-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    overflow: hidden;
}
.moderation-grid .moderation-thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.moderation-comment { flex-direction: row; align-items: flex-start; gap: 0.8rem; padding: 0.7rem; margin-bottom: 0.7rem; }
.moderation-thumb-small img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.moderation-body { padding: 0.7rem 0.9rem; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.moderation-comment .moderation-body { padding: 0; }
.moderation-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.88rem; }
.moderation-body p { margin: 0; overflow-wrap: anywhere; }
.moderation-text { padding: 0.45rem 0.7rem; border-radius: 8px; background: rgba(255, 255, 255, 0.04); }
.moderation-reason { font-size: 0.82rem; color: #f0b232; }
.moderation-reports { list-style: none; margin: 0; padding: 0; font-size: 0.82rem; display: flex; flex-direction: column; gap: 0.2rem; }
.moderation-reports .icon { width: 13px; height: 13px; color: #ed4245; vertical-align: -2px; }
.moderation-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.2rem; }

/* Moderation: Reiter, Markierungen, Schimpfwortfilter */
.moderation-tabs { margin-top: 1rem; }
.moderation-tabs a { text-decoration: none; }
.moderation-comment.is-critical { border-color: rgba(237, 66, 69, 0.55); background: rgba(237, 66, 69, 0.06); }
.moderation-comment.is-flagged { border-color: rgba(240, 178, 50, 0.45); }
.moderation-flags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.mod-flag { padding: 0.1rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.mod-flag-critical { background: rgba(237, 66, 69, 0.18); color: #ff8a8c; }
.mod-flag-warning { background: rgba(240, 178, 50, 0.16); color: #f0b232; }

.filter-word-form { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0.6rem; }
.filter-word-form input[type="text"] { flex: 1 1 220px; }
.filter-word-form select { width: auto; }
.filter-word-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.filter-word-heading { display: flex; align-items: center; gap: 0.5rem; margin: 1.2rem 0 0.5rem; font-size: 1rem; }
.filter-word-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.filter-word {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.2rem 0.3rem 0.2rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
}
.filter-word-legend .filter-word { padding: 0.1rem 0.6rem; }
.filter-word-flag { background: rgba(240, 178, 50, 0.1); border-color: rgba(240, 178, 50, 0.4); }
.filter-word-hold { background: rgba(88, 101, 242, 0.12); border-color: rgba(88, 101, 242, 0.5); }
.filter-word-block { background: rgba(237, 66, 69, 0.12); border-color: rgba(237, 66, 69, 0.5); }
.filter-word select { width: auto; padding: 0 0.2rem; font-size: 0.75rem; background: transparent; border: none; color: var(--text-muted); cursor: pointer; }
.filter-word-remove { padding: 0 0.45rem; min-width: 0; background: transparent; border: none; color: var(--text-muted); font-size: 1rem; line-height: 1; cursor: pointer; }
.filter-word-remove:hover { color: #ed4245; background: transparent; }

/* ---- Reaktionen (Emojis) wie bei Discord ---- */
.picture-reactions { display: flex; justify-content: center; margin-top: 0.8rem; }
.reaction-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-top: 0.45rem; }
.reaction-bar.is-busy { opacity: 0.6; pointer-events: none; }
.reaction-form { display: inline; margin: 0; }
.reaction {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.15rem 0.55rem;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}
.reaction:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.18); }
.reaction.is-mine { background: rgba(88, 101, 242, 0.22); border-color: #5865f2; }
.reaction.is-mine .reaction-count { color: #c9cdfb; }
.reaction-count { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.reaction.pop { animation: reaction-pop 0.25s ease; }
@keyframes reaction-pop { 50% { transform: scale(1.18); } }
span.reaction { cursor: default; }

.reaction-add { position: relative; }
.reaction-add > summary { list-style: none; }
.reaction-add > summary::-webkit-details-marker { display: none; }
.reaction-add-button { opacity: 0.65; }
.reaction-add-button:hover, .reaction-add[open] .reaction-add-button { opacity: 1; }
.reaction-plus { font-weight: 700; font-size: 0.8rem; margin-left: -0.15rem; }
.reaction-bar-compact .reaction-add-button { opacity: 0; }
.comment:hover .reaction-bar-compact .reaction-add-button,
.reaction-bar-compact .reaction-add[open] .reaction-add-button,
.reaction-bar-compact .reaction-add-button:focus-visible { opacity: 0.8; }
@media (hover: none) { .reaction-bar-compact .reaction-add-button { opacity: 0.65; } }

.reaction-picker {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(8, 2.2rem);
    gap: 0.15rem;
    padding: 0.4rem;
    border-radius: 12px;
    background: #1e1f22;
    border: 1px solid var(--border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
    animation: item-picker-in 0.12s ease-out;
}
.reaction-pick {
    width: 2.2rem;
    height: 2.2rem;
    min-width: 0;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}
.reaction-pick:hover { background: rgba(255, 255, 255, 0.1); transform: scale(1.12); }
@media (max-width: 480px) { .reaction-picker { grid-template-columns: repeat(6, 2.2rem); } }

.gallery-reaction-summary {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.8rem;
    backdrop-filter: blur(4px);
}
.gallery-reaction-summary:hover { text-decoration: none; color: var(--gold); }
.gallery-reaction-summary span { font-weight: 700; font-size: 0.75rem; }

/* Zuletzt aktiv (Mitgliederliste, Profil) */
.member-last-seen { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #6b6f76; flex-shrink: 0; }
.member-last-seen.is-online { color: #57d68d; font-weight: 600; }
.member-last-seen.is-online .online-dot { background: #3ba55d; box-shadow: 0 0 0 3px rgba(59, 165, 93, 0.25); }
.member-list .member-last-seen { margin-top: 0; }
.reaction-picker.align-right { left: auto; right: 0; }
.moderation-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
}
.moderation-tabs a:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); text-decoration: none; }
.moderation-tabs a.active { background: var(--gold); color: #1a1a1a; }
.moderation-tabs a.active .chip-count { background: rgba(0, 0, 0, 0.2); }
.filter-word-form, .filter-word { flex-direction: row; align-items: center; }
.filter-word-form input[type="text"] { width: auto; }
.filter-word select { -webkit-appearance: none; appearance: none; flex: 0 0 auto; padding: 0.05rem 0.45rem; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.filter-word select:hover { color: var(--text); }

/* ---- Kalender ---- */
.calendar-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.calendar-head h1 { margin-bottom: 0.2rem; }
.calendar-nav { display: flex; align-items: center; gap: 0.5rem; }
.calendar-nav .icon-button { font-size: 1.3rem; line-height: 1; text-decoration: none; }
.calendar-month { min-width: 10.5rem; text-align: center; font-size: 1.15rem; color: var(--gold); }
.calendar-legend { display: flex; gap: 0.5rem; margin: 0.9rem 0 0.7rem; }
.calendar-chip { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.calendar-chip .icon { width: 14px; height: 14px; }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}
.calendar-weekday { padding: 0.3rem; text-align: center; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; color: var(--text-muted); text-transform: uppercase; }
.calendar-day {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 6.5rem;
    padding: 0.35rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    min-width: 0;
}
.calendar-day.is-outside { opacity: 0.35; }
.calendar-day.is-today { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); background: rgba(201, 162, 39, 0.06); }
.calendar-date { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.calendar-day.is-today .calendar-date { color: var(--gold); }
.calendar-entry {
    display: block;
    padding: 0.1rem 0.35rem;
    border-radius: 5px;
    font-size: 0.74rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}
a.calendar-entry:hover { text-decoration: none; filter: brightness(1.25); }
.calendar-entry.is-past { opacity: 0.55; }
.calendar-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.calendar-day-entries {
    /* Alle Termine eines Tages: drei ganz, der vierte angeschnitten - dann scrollt die Zelle */
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 4.6rem;
    overflow-y: auto;
    min-width: 0;
}
.calendar-day-entries .calendar-entry { flex-shrink: 0; }
.calendar-dots { display: none; gap: 3px; margin-top: auto; }
.calendar-dots i { width: 7px; height: 7px; border-radius: 50%; }

/* Farben: Raid gold, Event blau */
.calendar-raid { background: rgba(201, 162, 39, 0.2); border-left: 3px solid var(--gold); }
.calendar-event { background: rgba(88, 101, 242, 0.2); border-left: 3px solid #5865f2; }
.calendar-chip.calendar-raid, .calendar-chip.calendar-event { border-left: none; }
.calendar-dots i.calendar-raid { background: var(--gold); border: 0; }
.calendar-dots i.calendar-event { background: #5865f2; border: 0; }

.calendar-agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.calendar-agenda-day { display: flex; gap: 1rem; align-items: flex-start; }
.calendar-agenda-day.is-past { opacity: 0.55; }
.calendar-agenda-date { flex: 0 0 4.5rem; display: flex; flex-direction: column; line-height: 1.15; }
.calendar-agenda-date strong { font-size: 1.35rem; }
.calendar-agenda-date span { font-size: 0.78rem; color: var(--text-muted); }
.calendar-agenda-day.is-today .calendar-agenda-date { color: var(--gold); }
.calendar-agenda-entries { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.calendar-agenda-entry {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.8rem;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    color: var(--text);
    font-size: 0.9rem;
}
a.calendar-agenda-entry:hover { text-decoration: none; filter: brightness(1.2); }
.calendar-agenda-title { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; }
.calendar-agenda-title .icon { width: 15px; height: 15px; }
.calendar-agenda-entry .text-muted { font-size: 0.8rem; }
.calendar-public-toggle { margin-top: 1.2rem; }
.navbar-calendar .icon { width: 16px; height: 16px; }

@media (max-width: 700px) {
    .calendar-day { min-height: 3.2rem; align-items: center; padding: 0.3rem 0.1rem; }
    .calendar-entry, .calendar-day-entries { display: none; }
    .calendar-dots { display: flex; }
    .calendar-month { min-width: 8rem; }
    .calendar-agenda-date { flex-basis: 3.6rem; }
}
.calendar-day { position: relative; }
.calendar-day-link { display: none; }
.calendar-agenda-day { scroll-margin-top: 5rem; }
.calendar-agenda-day:target .calendar-agenda-entries { animation: calendar-flash 1.2s ease; }
@keyframes calendar-flash { 30% { filter: brightness(1.6); } }
@media (max-width: 700px) { .calendar-day-link { display: block; position: absolute; inset: 0; } }

/* Kalender: Termine der Mitglieder (gruen) */
.calendar-member { background: rgba(59, 165, 93, 0.18); border-left: 3px solid #3ba55d; }
.calendar-chip.calendar-member { border-left: none; }
.calendar-audience-badge {
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background: rgba(201, 162, 39, 0.15);
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 600;
}
.calendar-dots i.calendar-member { background: #3ba55d; border: 0; }
.calendar-new { margin: 0.9rem 0 0.2rem; }
.calendar-new > summary { list-style: none; display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; }
.calendar-new > summary::-webkit-details-marker { display: none; }
.calendar-new[open] > summary { opacity: 0.7; }
.calendar-form { margin-top: 0.8rem; padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: rgba(0, 0, 0, 0.2); max-width: 640px; }
.calendar-form label { display: flex; flex-direction: column; gap: 0.3rem; }
.calendar-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.calendar-form input[type="datetime-local"] { color-scheme: dark; }
@media (max-width: 600px) { .calendar-form-row { grid-template-columns: 1fr; } }

.calendar-member-entry { padding: 0.6rem 0.8rem; border-radius: 10px; display: flex; flex-direction: column; gap: 0.45rem; scroll-margin-top: 5rem; }
.calendar-member-entry:target { box-shadow: 0 0 0 2px #3ba55d; }
.calendar-member-entry.is-pending { border-left-style: dashed; opacity: 0.85; }
.calendar-member-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; }
.calendar-member-title { font-size: 1rem; }
.calendar-member-author { display: inline-flex; align-items: center; gap: 0.35rem; margin-left: auto; font-size: 0.85rem; }
.calendar-member-description { margin: 0; font-size: 0.9rem; overflow-wrap: anywhere; }
.calendar-member-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; }
/* Teilnehmer eines Mitglieder-Termins: Avatar-Reihe, aufklappbar zur Liste mit Namen */
.calendar-member-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.calendar-people > summary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.25rem 0.6rem 0.25rem 0.3rem;
    border-radius: 999px;
    list-style: none;
    cursor: pointer;
    transition: background 0.15s ease;
}
.calendar-people > summary::-webkit-details-marker { display: none; }
.calendar-people > summary:hover { background: rgba(255, 255, 255, 0.06); }
.calendar-people[data-empty] > summary { cursor: default; background: none; }
.calendar-people-stack { display: inline-flex; align-items: center; }
.calendar-people-stack .avatar, .calendar-people-stack .avatar-wrap { margin-right: -8px; border: 2px solid #1f2a1f; border-radius: 50%; }
.calendar-people-more {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    padding: 0 0.3rem;
    border-radius: 999px;
    border: 2px solid #1f2a1f;
    background: #2f3b2f;
    color: #cfe8d3;
    font-size: 0.72rem;
    font-weight: 700;
}
.calendar-people-label { margin-left: 0.5rem; font-size: 0.85rem; font-weight: 600; color: #bfe3c6; }
.calendar-people-toggle { font-size: 0.75rem; color: var(--text-muted); transition: transform 0.2s ease; }
.calendar-people[open] .calendar-people-toggle { transform: rotate(180deg); }

.calendar-people-list {
    list-style: none;
    margin: 0.6rem 0 0.2rem;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.4rem;
    animation: item-picker-in 0.15s ease-out;
}
.calendar-people-list a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.55rem 0.35rem 0.35rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text);
    font-size: 0.88rem;
}
.calendar-people-list a:hover { text-decoration: none; background: rgba(0, 0, 0, 0.32); border-color: rgba(59, 165, 93, 0.5); color: var(--text); }
.calendar-people-list .is-host a { border-color: rgba(201, 162, 39, 0.5); }
.calendar-people-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.calendar-people-badge {
    flex-shrink: 0;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: rgba(201, 162, 39, 0.18);
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 700;
}
.calendar-people-badge.is-me { background: rgba(59, 165, 93, 0.2); color: #7fd694; }
@media (max-width: 600px) {
    .calendar-member-foot { grid-template-columns: minmax(0, 1fr); }
}
.calendar-member-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.calendar-edit { position: relative; }
.calendar-edit > summary { list-style: none; cursor: pointer; }
.calendar-edit > summary::-webkit-details-marker { display: none; }
.calendar-edit[open] .calendar-form { position: absolute; right: 0; z-index: 15; width: min(560px, 90vw); background: #232323; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6); }
.moderation-calendar-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 8px; background: rgba(59, 165, 93, 0.15); color: #57d68d; flex-shrink: 0; }
.moderation-calendar-icon .icon { width: 28px; height: 28px; }

/* ---- Orte auf der Karte (Links, Kalender-Treffpunkt) ---- */
.map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.05rem 0.55rem;
    border-radius: 999px;
    background: rgba(229, 57, 53, 0.14);
    border: 1px solid rgba(229, 57, 53, 0.45);
    color: #ff9a97;
    font-weight: 600;
    font-size: 0.88em;
    white-space: nowrap;
}
.map-link:hover { text-decoration: none; background: rgba(229, 57, 53, 0.24); color: #ffc2c0; }
.calendar-location { font-size: 0.88rem; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }

.calendar-location-field { display: flex; flex-direction: column; gap: 0.35rem; }
.calendar-location-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.calendar-location-chosen { font-size: 0.88rem; color: var(--text-muted); }
.calendar-location-chosen.is-set { color: #ff9a97; font-weight: 600; }
.calendar-location-clear { background: transparent; border: 1px solid var(--border); color: var(--text-muted); }
.calendar-location-clear[hidden] { display: none; }

#map-pick-modal { padding: 1rem; align-items: center; justify-content: center; }
.map-pick-dialog {
    display: flex;
    flex-direction: column;
    width: min(1200px, 100%);
    height: min(820px, calc(100vh - 2rem));
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-panel);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}
.map-pick-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 1rem; padding: 0.6rem 3rem 0.6rem 1rem; position: relative; border-bottom: 1px solid var(--border); }
.map-pick-head .text-muted { font-size: 0.85rem; }
.map-pick-head .modal-close { position: absolute; top: 0.45rem; right: 0.6rem; }
.map-pick-dialog iframe { flex: 1; width: 100%; border: 0; background: #0a0a1e; }

/* ---- Hintergrund der Profilseite (Auswahl im Profil-Editor) ---- */
.background-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.7rem; margin: 0.8rem 0; }
.background-option { position: relative; display: flex; flex-direction: column; gap: 0.3rem; margin: 0; cursor: pointer; font-weight: 400; }
.background-option input { position: absolute; opacity: 0; pointer-events: none; }
.background-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.background-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.background-option:hover .background-thumb { border-color: rgba(201, 162, 39, 0.6); transform: translateY(-2px); }
.background-option.is-selected .background-thumb { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.3); }
.background-option.is-selected::after {
    content: '✓';
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--gold);
    color: #1a1a1a;
    font-weight: 800;
    font-size: 0.85rem;
}
.background-option input:focus-visible + .background-thumb { outline: 2px solid var(--gold); outline-offset: 2px; }
.background-name { font-size: 0.8rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.background-thumb { position: relative; }
.background-pending {
    position: absolute;
    left: 0.35rem;
    bottom: 0.35rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 600;
}
.background-own .background-name { color: var(--gold); }
/* Eigenes Bild nur fuer den Hintergrund hochladen */
.background-upload { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.background-upload h3 { margin: 0 0 0.6rem; font-size: 1rem; }
.background-upload-form { display: flex; flex-direction: column; gap: 0.6rem; }
.background-upload-form button { align-self: flex-start; }
.background-upload .inline-form { margin-top: 0.75rem; }
.background-option.is-selected .background-name { color: var(--gold); font-weight: 600; }
.background-default .background-thumb img { filter: grayscale(0.6) brightness(0.8); }
/* Kommentarfeld: Avatar neben dem Feld (Formulare sind sonst global untereinander) */
.comment-form { flex-direction: row; }
.comment-form textarea { font-family: inherit; font-size: 0.95rem; }

/* ---- Wiki: eingebettete Videos ---- */
.wiki-video {
    position: relative;
    width: 100%;
    max-width: 860px;
    aspect-ratio: 16 / 9;
    margin: 1rem 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.wiki-video iframe, .wiki-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.wiki-video-portrait { max-width: 340px; aspect-ratio: 9 / 16; }
.wiki-video-file video { object-fit: contain; background: #000; }

/* Wiki: Mitwirkende hinzufuegen mit Suchliste (Avatare rund) */
.wiki-contributor-add { align-items: stretch; } /* Knopf genauso hoch wie das Suchfeld */
.wiki-contributor-add .item-picker { flex: 1 1 240px; min-width: 0; }
.item-picker-round .item-picker-thumb { border-radius: 50%; object-fit: cover; }
.item-picker[data-picker-round] .item-picker-preview { border-radius: 50% !important; object-fit: cover; }

/* ---- Aktivitaetschecks ---- */
.activity-form-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 1000px) { .activity-form-grid { grid-template-columns: 1fr; } }
.activity-form-fields { display: flex; flex-direction: column; gap: 1rem; }
.activity-form fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 0.9rem 1rem 1rem; margin: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.activity-form legend { padding: 0 0.4rem; color: var(--gold); font-weight: 700; }
.activity-form label { display: flex; flex-direction: column; gap: 0.3rem; }
.activity-form label.checkbox-label { flex-direction: row; align-items: center; gap: 0.5rem; }
.activity-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.activity-color-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.activity-color-row > span { margin-right: 0.3rem; }
.activity-swatch { position: relative; flex-direction: row !important; width: 28px; height: 28px; border-radius: 50%; background: var(--swatch); cursor: pointer; border: 2px solid transparent; }
.activity-swatch input { position: absolute; opacity: 0; }
.activity-swatch:has(input:checked) { border-color: #fff; box-shadow: 0 0 0 2px var(--swatch); }
.activity-color-row input[type="color"] { width: 36px; height: 30px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: none; cursor: pointer; }

.activity-preview-wrap { position: sticky; top: 1rem; }
.discord-preview { margin-top: 0.4rem; padding: 1rem; border-radius: 10px; background: #313338; color: #dbdee1; font-size: 0.92rem; }
.discord-ping { display: inline-block; margin-bottom: 0.4rem; padding: 0 0.2rem; border-radius: 3px; background: rgba(88, 101, 242, 0.3); color: #c9cdfb; font-weight: 600; }
.discord-ping[hidden] { display: none; }
.discord-embed { border-left: 4px solid var(--bot-color); border-radius: 4px; background: #2b2d31; padding: 0.7rem 0.9rem; display: flex; flex-direction: column; gap: 0.5rem; max-width: 520px; }
.discord-embed-title { color: #fff; font-size: 1rem; }
.discord-embed-text { line-height: 1.45; overflow-wrap: anywhere; }
.discord-embed-field { display: flex; flex-direction: column; font-size: 0.85rem; }
.discord-embed-field b { color: #fff; }
.discord-embed-image { max-width: 100%; border-radius: 4px; }
.discord-embed-image[hidden] { display: none; }
.discord-embed-footer { font-size: 0.75rem; color: #949ba4; }
.discord-buttons { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.discord-button { padding: 0.35rem 0.9rem; border-radius: 4px; background: #4e5058; color: #fff; font-weight: 600; font-size: 0.85rem; }
.discord-button-green { background: #248046; }

.activity-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.8rem; }
.activity-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent, var(--gold));
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}
.activity-card:hover { text-decoration: none; background: rgba(255, 255, 255, 0.06); }
.activity-card .text-muted { font-size: 0.82rem; }
.activity-bar { display: flex; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.activity-bar i { display: block; height: 100%; }
.bar-present { background: #3ba55d; }
.bar-absent { background: #ed4245; }
.activity-counts { font-size: 0.82rem; color: var(--text-muted); }
.activity-past { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.activity-past li { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; align-items: baseline; }

.activity-detail-head .raid-header { margin-top: 0.4rem; }
.activity-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0; }
.activity-consequences { margin-top: 0.4rem; font-size: 0.9rem; }
.activity-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 900px) { .activity-columns { grid-template-columns: 1fr; } }
.activity-column h2 { display: flex; align-items: center; gap: 0.5rem; font-size: 1.1rem; }
.activity-column ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.activity-person { display: flex; align-items: center; gap: 0.5rem; }
.activity-present { border-top: 3px solid #3ba55d; }
.activity-absent { border-top: 3px solid #ed4245; }
.activity-missing { border-top: 3px solid #f0b232; }
.activity-form textarea { font-family: inherit; resize: vertical; }

/* ---- Seitenleiste: kein grober Scrollbalken ----
   Bei vielen Menuepunkten und niedrigen Bildschirmen scrollt die Leiste. Der Balken ist dann
   hauchduenn und nur beim Ueberfahren sichtbar; bei wenig Hoehe rueckt das Menue enger zusammen. */
.sidebar { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.sidebar:hover { scrollbar-color: rgba(201, 162, 39, 0.35) transparent; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: transparent; border-radius: 999px; }
.sidebar:hover::-webkit-scrollbar-thumb { background: rgba(201, 162, 39, 0.35); }
.sidebar:hover::-webkit-scrollbar-thumb:hover { background: rgba(201, 162, 39, 0.6); }

/* Wiki-Inhaltsverzeichnis: schmale goldene Scrollbar statt der hellen Standard-Leiste des Browsers,
   dezent immer sichtbar (das Verzeichnis ist oft laenger als der Bildschirm) */
.wiki-nav { scrollbar-width: thin; scrollbar-color: rgba(201, 162, 39, 0.3) transparent; }
.wiki-nav:hover { scrollbar-color: rgba(201, 162, 39, 0.55) transparent; }
.wiki-nav::-webkit-scrollbar { width: 6px; }
.wiki-nav::-webkit-scrollbar-track { background: transparent; }
.wiki-nav::-webkit-scrollbar-button { display: none; height: 0; }
.wiki-nav::-webkit-scrollbar-thumb { background: rgba(201, 162, 39, 0.3); border-radius: 999px; }
.wiki-nav:hover::-webkit-scrollbar-thumb { background: rgba(201, 162, 39, 0.55); }
.wiki-nav::-webkit-scrollbar-thumb:hover { background: rgba(201, 162, 39, 0.8); }

@media (max-height: 1000px) and (min-width: 861px) {
    .sidebar { padding-top: 1.1rem; padding-bottom: 1rem; }
    .sidebar-brand { padding-bottom: 1rem; }
    .sidebar-brand img { max-height: 64px; }
    .sidebar-nav { gap: 0.05rem; }
    .sidebar-link { padding: 0.5rem 0.75rem; font-size: 0.92rem; }
    .sidebar-section-label { margin-top: 0.6rem; padding-top: 0.35rem; }
    .sidebar-nav-gap { margin-top: 0.4rem; padding-top: 0.4rem; }
}

@media (max-height: 820px) and (min-width: 861px) {
    .sidebar-brand img { max-height: 52px; }
    .sidebar-link { padding: 0.38rem 0.75rem; font-size: 0.9rem; }
    .sidebar-link .icon { width: 17px; height: 17px; }
}

/* ---- Eigene Scroll-Leiste (assets/js/scroll-progress.js) ----
   Browser-Balken aus, stattdessen eine schmale Schiene rechts, die sich golden fuellt. */
html.has-scroll-progress { scrollbar-width: none; }
html.has-scroll-progress::-webkit-scrollbar { display: none; }

.scroll-progress {
    position: fixed;
    top: 0.75rem;
    right: 4px;
    bottom: 0.75rem;
    width: 4px;
    z-index: 900;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    touch-action: none;
    transition: width 0.18s ease, background 0.18s ease, opacity 0.25s ease;
}
/* Etwas breitere Trefferflaeche zum Anklicken, ohne die Leiste dicker aussehen zu lassen */
.scroll-progress::before { content: ''; position: absolute; inset: -6px -4px; }
.scroll-progress:hover, .scroll-progress.is-dragging { width: 8px; background: rgba(255, 255, 255, 0.1); }
.scroll-progress.is-hidden { opacity: 0; pointer-events: none; }

.scroll-progress-fill {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, #f7e3a1 0%, var(--gold) 55%, #b8891f 100%);
    box-shadow: 0 0 8px rgba(201, 162, 39, 0.55);
    transform: scaleY(0);
    transform-origin: top;
    will-change: transform;
}
/* Unten angekommen: kurz aufleuchten */
.scroll-progress.is-end .scroll-progress-fill { box-shadow: 0 0 12px rgba(247, 227, 161, 0.8); }

@media (max-width: 860px) {
    .scroll-progress { width: 3px; right: 2px; }
}
@media print {
    .scroll-progress { display: none; }
}

/* ---- Lumishop: Kategorien links, Suche und Gegenstaende rechts ---- */
/* Kategorien und Gegenstandsliste gleich hoch */
.shop-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.25rem; align-items: stretch; }
.shop-layout-single { grid-template-columns: minmax(0, 1fr); }
.shop-layout > .panel { margin-bottom: 0; }
.shop-layout + .panel { margin-top: 1.25rem; }

.shop-categories { padding: 1rem 0.75rem; }
.shop-categories h2 { display: flex; align-items: center; gap: 0.45rem; margin: 0 0.5rem 0.75rem; font-size: 1.05rem; }
.shop-categories h2 .icon { width: 18px; height: 18px; color: var(--gold); }
.shop-category-list { display: flex; flex-direction: column; gap: 0.2rem; }
.shop-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-size: 0.93rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}
.shop-category:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.shop-category.active { background: rgba(201, 162, 39, 0.14); border-left-color: var(--gold); color: var(--gold); font-weight: 600; }
.shop-category > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.shop-category-count {
    flex-shrink: 0;
    min-width: 1.8rem;
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
}
.shop-category.active .shop-category-count { background: var(--gold); color: #1a1a1a; }

.shop-searchbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1.1rem; }
.shop-searchbar .search-field { flex: 1 1 260px; }

@media (max-width: 860px) {
    .shop-layout { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
    .shop-categories { position: static; padding: 0.75rem; }
    .shop-categories h2 { display: none; }
    /* Auf dem Handy: Kategorien als waagerecht scrollbare Leiste */
    .shop-category-list { flex-direction: row; overflow-x: auto; gap: 0.4rem; scrollbar-width: none; }
    .shop-category-list::-webkit-scrollbar { display: none; }
    .shop-category { width: auto; flex-shrink: 0; border-left: 0; border: 1px solid var(--border); border-radius: 999px; padding: 0.4rem 0.8rem; }
    .shop-category.active { border-color: var(--gold); }
}

/* Mitglieder-Suchliste (includes/member_picker.php) in Formular-Zeilen */
.member-picker { flex: 1 1 220px; min-width: 0; }

/* ---- Patchnotes (patchnotes.php) ---- */
/* Hinweis der Live-Aktualisierung (assets/js/live.js), wenn die Seite gerade nicht von selbst neu laden kann */
.live-notice {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    z-index: 900;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.9rem;
    max-width: calc(100vw - 2rem);
    padding: 0.55rem 0.6rem 0.55rem 1.1rem;
    border: 1px solid rgba(201, 162, 39, 0.6);
    border-radius: 999px;
    background: rgba(35, 35, 35, 0.96);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: var(--text);
    font-size: 0.9rem;
    animation: live-notice-in 0.25s ease;
}
.live-notice .button { border-radius: 999px; white-space: nowrap; }
@keyframes live-notice-in { from { opacity: 0; transform: translate(-50%, 12px); } }
@media (prefers-reduced-motion: reduce) { .live-notice { animation: none; } }

.sidebar-badge-new, .sidebar-badge-count { position: static; margin-left: auto; padding: 0 0.45rem; }
/* Zahl ohne Neuigkeit (anstehende Raids, schon gesehen): zurueckhaltend statt golden */
.sidebar-badge-count { background: var(--bg-panel-alt); color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); }
.patchnote-legend { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.patchnote-new { border-color: rgba(201, 162, 39, 0.55); }
.patchnote-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.patchnote-head h2 { margin: 0.1rem 0 0; }
.patchnote-date { color: var(--text-muted); font-size: 0.85rem; }
.patchnote-new-badge { flex-shrink: 0; border-color: var(--gold); color: var(--gold); }
.patchnote-summary { margin: 0.5rem 0 0; color: var(--text-muted); }
.patchnote-list { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.patchnote-list li { display: flex; align-items: flex-start; gap: 0.75rem; }
.patchnote-list p { margin: 0.15rem 0 0; }
.patchnote-text { min-width: 0; }
.patchnote-area { color: var(--text); }
.patchnote-type {
    flex-shrink: 0;
    min-width: 5.6rem;
    padding: 0.1rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}
.patchnote-type-neu { border-color: rgba(201, 162, 39, 0.6); background: rgba(201, 162, 39, 0.12); color: var(--gold); }
.patchnote-type-verbessert { border-color: rgba(32, 102, 148, 0.8); background: rgba(32, 102, 148, 0.18); color: #7fb8de; }
.patchnote-type-behoben { border-color: rgba(76, 175, 80, 0.6); background: rgba(76, 175, 80, 0.12); color: #7ccf80; }
.patchnote-audience {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0 0.4rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-muted);
    vertical-align: 1px;
}
.patchnote-legend .patchnote-audience { margin-left: 0; padding: 0.1rem 0.5rem; font-size: 0.75rem; }
@media (max-width: 560px) {
    .patchnote-head { flex-direction: column-reverse; gap: 0.4rem; }
    .patchnote-list li { flex-direction: column; gap: 0.3rem; }
    .patchnote-type { min-width: 0; }
}

/* ---- Ankuendigungsbanner (includes/site_notice.php) ---- */
.site-announcement {
    --announce: var(--gold);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 0 0 1.25rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid color-mix(in srgb, var(--announce) 55%, transparent);
    border-left: 5px solid var(--announce);
    border-radius: 10px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--announce) 16%, var(--bg-panel)), var(--bg-panel) 70%);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.site-announcement-info { --announce: var(--gold); }
.site-announcement-warning { --announce: #e8912d; }
.site-announcement-urgent { --announce: var(--danger); }
.site-announcement-icon { font-size: 2rem; line-height: 1; }
.site-announcement-body { flex: 1; min-width: 0; }
.site-announcement-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--announce);
}
.site-announcement h2 { margin: 0.15rem 0 0.3rem; font-size: 1.35rem; color: var(--text); }
.site-announcement p { margin: 0; overflow-wrap: anywhere; }
.site-announcement-by { margin-top: 0.4rem; font-size: 0.85rem; color: var(--text-muted); }
.site-announcement-close { margin: 0; }
.site-announcement-wrap { max-width: 1100px; margin: 1rem auto 0; padding: 0 1rem; }
@media (max-width: 560px) {
    .site-announcement { gap: 0.7rem; padding: 0.9rem 1rem; }
    .site-announcement-icon { font-size: 1.5rem; }
    .site-announcement h2 { font-size: 1.15rem; }
}

/* Hinweis fuer alle, die trotz Wartung auf der Seite sind */
.maintenance-notice {
    margin: 0 0 1rem;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(217, 83, 79, 0.6);
    border-radius: 8px;
    background: rgba(217, 83, 79, 0.14);
}

/* ---- Wartungsseite ---- */
.maintenance-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem 1rem;
}
.maintenance-card { max-width: 520px; width: 100%; text-align: center; }
.maintenance-logo { width: 220px; height: auto; margin: 0 auto 0.5rem; display: block; }
.maintenance-icon { font-size: 2.6rem; }
.maintenance-card h1 { margin: 0.3rem 0 0.8rem; }
.maintenance-actions { margin-top: 1.25rem; }

/* ---- Verwaltung: Discord-Bot (admin/bot.php) ---- */
.bot-admin-form { gap: 0.8rem; }
.bot-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.bot-panel { padding: 1rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-panel-alt); gap: 0.6rem; }
.bot-panel h3, .bot-panel p { margin: 0; }
.bot-panel .actions { margin-top: auto; }

/* ---- Verwaltung: Wartung & Ankuendigung ---- */
.site-admin-section.is-active { border-color: rgba(217, 83, 79, 0.6); }
.site-admin-form { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.75rem; }
.site-admin-form label { margin-top: 0.4rem; }
.site-admin-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
.site-admin-row select, .site-admin-row input { width: 100%; }
.site-admin-check { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.site-admin-check input { width: auto; }
.site-admin-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.site-admin-remove { margin-top: 0.75rem; }
.site-admin-preview { margin-top: 1rem; }
.site-admin-preview-label { margin-bottom: 0.4rem; font-size: 0.85rem; }

/* ---- Impressum & Datenschutz (includes/legal.php) ---- */
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.2rem 0.55rem; font-size: 0.82rem; }
.legal-links a { color: var(--text-muted); }
.legal-links a:hover { color: var(--gold-hover); }
.legal-links span { color: #5a5a5a; }
.site-footer { padding: 0.5rem 1rem 2rem; }
.sidebar-legal { justify-content: flex-start; padding: 0.35rem 0.65rem 0; font-size: 0.78rem; }
.home-footer-legal { margin-top: 0.75rem; }
.home-footer-legal a { color: var(--home-muted); }
.maintenance-legal { margin-top: 1.25rem; }
.login-privacy { max-width: 340px; margin: 0.9rem auto 0; font-size: 0.8rem; line-height: 1.45; }

.legal-page { max-width: 860px; margin: 0 auto 1.5rem; }
.legal-page h1 { margin-top: 0; }
.legal-page h2 { font-size: 1.2rem; margin: 2rem 0 0.5rem; scroll-margin-top: 1rem; }
.legal-page h3 { font-size: 1rem; margin: 1.25rem 0 0.35rem; color: var(--text); }
.legal-page ul { padding-left: 1.25rem; }
.legal-page li + li { margin-top: 0.3rem; }
.legal-page address { font-style: normal; line-height: 1.6; }
.legal-updated { font-size: 0.85rem; margin-top: 0; }
.legal-summary { background: rgba(201, 162, 39, 0.08); border: 1px solid rgba(201, 162, 39, 0.35); border-radius: 8px; padding: 0.4rem 1.1rem; }
.legal-missing { background: rgba(217, 83, 79, 0.08); border: 1px dashed rgba(217, 83, 79, 0.6); border-radius: 8px; padding: 0.75rem 1rem; }
.legal-toc { columns: 2 240px; column-gap: 2rem; margin: 1rem 0 0; padding: 0.9rem 1rem 0.9rem 2.3rem; background: rgba(0, 0, 0, 0.18); border: 1px solid var(--border); border-radius: 8px; }
.legal-toc li { break-inside: avoid; }
.legal-toc a { color: var(--text); }
.legal-toc a:hover { color: var(--gold-hover); }
.legal-table-wrap { overflow-x: auto; }
.legal-table td, .legal-table th { vertical-align: top; font-size: 0.92rem; }
.embed-consent-settings { margin-top: 0.75rem; padding: 0.75rem 1rem; background: rgba(0, 0, 0, 0.18); border: 1px solid var(--border); border-radius: 8px; }
.embed-consent-settings ul { margin: 0.35rem 0 0.75rem; }
.legal-admin-hint { font-size: 0.85rem; margin: 0.15rem 0 0; }
.legal-admin-todo li + li { margin-top: 0.35rem; }

/* ---- Inhalte fremder Server: erst nach Klick laden (assets/js/embed-consent.js) ---- */
.wiki-video.embed-consent {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Der Text darf den Rahmen strecken, wenn das Video schmal ist (Handy, Shorts) */
    overflow: visible;
    background: radial-gradient(circle at 50% 30%, rgba(201, 162, 39, 0.16), transparent 62%), #111;
}
.embed-consent-inner { display: flex; flex-direction: column; align-items: center; gap: 0.55rem; max-width: 470px; padding: 1.25rem; text-align: center; }
.embed-consent-title { color: var(--gold); font-weight: 600; }
.wiki-video .embed-consent-title::before {
    content: "▶";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.5rem;
    padding-left: 0.2rem;
    border-radius: 50%;
    background: rgba(201, 162, 39, 0.18);
    border: 1px solid rgba(201, 162, 39, 0.5);
    font-size: 1.2rem;
}
.embed-consent-text { color: var(--text-muted); font-size: 0.85rem; line-height: 1.45; }
.embed-consent-remember { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--text-muted); cursor: pointer; }
.embed-consent-remember input { width: auto; margin: 0; }
.embed-consent-image { display: inline-flex; max-width: 100%; margin: 0.25rem 0; vertical-align: middle; background: rgba(0, 0, 0, 0.25); border: 1px dashed var(--border); border-radius: 10px; }
.embed-consent-image .embed-consent-inner { padding: 0.9rem 1rem; }

/* ---- Mein Profil: Konto & Daten (bewusst unauffaellig, zugeklappt) ---- */
.account-data { margin: 2.5rem 0 1rem; }
.account-data > summary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.1rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    list-style: none;
    opacity: 0.75;
}
.account-data > summary::-webkit-details-marker { display: none; }
.account-data > summary::before { content: "▸"; transition: transform 0.15s ease; }
.account-data[open] > summary::before { transform: rotate(90deg); }
.account-data > summary:hover { color: var(--text); opacity: 1; }
.account-data-body { margin-top: 0.6rem; }
.account-data-body section + section { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.account-data-body h2 { font-size: 1.05rem; margin: 0 0 0.35rem; }

/* ---- Verwaltung: Daten & Loeschung (admin/user_export.php) ---- */
.data-admin-back { margin: 0 0 0.25rem; font-size: 0.85rem; }
.data-link-new { margin: 0.75rem 0 1rem; padding: 0.75rem 1rem; background: rgba(76, 175, 80, 0.08); border: 1px solid rgba(76, 175, 80, 0.45); border-radius: 8px; }
.data-link-new label { display: block; margin-bottom: 0.4rem; font-size: 0.9rem; }
.data-link-new p { margin: 0.4rem 0 0; font-size: 0.85rem; }
.data-link-copy { display: flex; gap: 0.5rem; }
.data-link-copy input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.85rem; }
.data-links-table { margin-top: 1rem; }
.data-links-table td { vertical-align: top; font-size: 0.9rem; }

/* ---- Galerie aller Mitglieder (gallery.php) ---- */
.gallery-feed-head { align-items: flex-start; flex-wrap: wrap; gap: 0.75rem 1rem; }
.gallery-feed-head h1 { margin-bottom: 0.2rem; }
.gallery-feed-head p { margin: 0; }
.gallery-feed-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.25rem; margin-top: 1rem; }
a.members-chip, a.members-chip:hover { text-decoration: none; }
.gallery-feed-filter { display: flex; align-items: center; gap: 0.5rem; }
.gallery-feed-filter select { width: auto; min-width: 220px; max-width: 100%; padding: 0.4rem 0.6rem; font-size: 0.9rem; }
.gallery-feed-image { position: relative; display: block; }
.gallery-new-badge {
    position: absolute;
    bottom: 0.45rem;
    left: 0.45rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--gold);
    color: #1a1a1a;
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}
.gallery-feed-item figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.5rem; }
.gallery-feed-author { display: inline-flex; align-items: center; gap: 0.35rem; min-width: 0; max-width: 100%; color: var(--text); font-weight: 600; }
.gallery-feed-author span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-feed-date { margin-left: auto; font-size: 0.78rem; }
.gallery-feed-caption { flex-basis: 100%; }
@media (max-width: 560px) {
    .gallery-feed-filter { width: 100%; }
    .gallery-feed-filter select { flex: 1; min-width: 0; }
    /* Auf dem Handy zwei Bilder nebeneinander statt eines */
    .gallery-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
    .gallery-feed-date { margin-left: 0; }
}
