:root {
    --bg: #0b0a08;
    --bg-card: #161410;
    --gold: #c9a361;
    --gold-dim: #8a7142;
    --btn: var(--gold);
    --text: #e7e2d3;
    --text-dim: #a39e8e;
    --error-bg: #3a1f1f;
    --error-text: #e29e9e;
    --ok-bg: #1f3320;
    --ok-text: #9ee29e;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.5;
}

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

h1, h2, h3 { color: var(--gold); font-weight: normal; letter-spacing: 0.03em; }

.lang-switch { display: flex; justify-content: flex-end; gap: 10px; padding: 6px 16px; background: var(--bg); font-size: 12px; }
.lang-switch a { color: var(--text-dim); letter-spacing: 0.05em; }
.lang-switch a:hover { color: var(--gold); text-decoration: none; }
.lang-switch a.active { color: var(--gold); font-weight: bold; }

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 14px 28px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--gold-dim);
    position: relative;
}

.site-header--guest { justify-content: center; }

.brand { order: 1; }
.brand img { height: 48px; display: block; }

.home-btn {
    order: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--gold-dim);
    border-radius: 6px;
    color: var(--gold);
    flex-shrink: 0;
    transition: border-color .15s, background .15s;
}
.home-btn:hover { border-color: var(--gold); background: rgba(201,168,76,.08); }

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 16px;
    padding: 6px 12px;
    border: 1px solid var(--gold-dim);
    border-radius: 5px;
    color: var(--text);
    font-size: 13px;
    transition: border-color .15s, color .15s;
}
.back-btn:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }

.global-search { order: 2; flex: 0 1 220px; min-width: 0; }
.global-search input {
    width: 100%;
    padding: 7px 12px;
    border: 1px solid var(--gold-dim);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
}
.global-search input:focus { outline: none; border-color: var(--gold); }

/* Dropdown-Nav: immer versteckt, öffnet als Panel unter der Header-Leiste */
#mainNav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 500;
    background: var(--bg-card);
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 8px 28px rgba(0,0,0,.55);
    padding: 14px 28px 22px;
    grid-template-columns: repeat(3, 1fr);
    order: 4;
}
#mainNav.open { display: grid; }

nav a { color: var(--text); font-size: 14px; letter-spacing: 0.02em; display: block; padding: 9px 12px; border-radius: 4px; }
nav a:hover { color: var(--gold); background: rgba(201,168,76,.08); text-decoration: none; }
nav a.active { color: var(--gold); font-weight: 600; }

/* Sekretariat-Gruppe in der Navigation: klappt über die volle Panelbreite auf */
.nav-group { grid-column: 1 / -1; }
.nav-group summary {
    color: var(--text);
    font-size: 14px;
    letter-spacing: 0.02em;
    padding: 9px 12px;
    border-radius: 4px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: ' ▾'; color: var(--gold); font-size: 11px; }
.nav-group[open] summary { color: var(--gold); font-weight: 600; }
.nav-group summary:hover { color: var(--gold); background: rgba(201,168,76,.08); }
.nav-group-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-left: 2px solid var(--gold-dim);
    margin-left: 14px;
    padding-left: 10px;
}
@media (max-width: 700px) { .nav-group-items { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .nav-group-items { grid-template-columns: 1fr; } }

/* Tab-Leiste innerhalb von Modulen (z.B. Whisky). Eigene Klasse damit sie immer sichtbar bleibt. */
.tab-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.tab-nav a { padding: 4px 0; border-radius: 0; }

.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 3;
    background: none;
    border: 1px solid var(--gold-dim);
    color: var(--gold);
    font-size: 20px;
    line-height: 1;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color .15s;
    flex-shrink: 0;
}
.nav-toggle:hover, .nav-toggle[aria-expanded="true"] { border-color: var(--gold); background: rgba(201,168,76,.08); }

/* Backdrop zum Schliessen per Klick ausserhalb */
#navBackdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 499;
}
#navBackdrop.open { display: block; }

.user-box { display: flex; align-items: center; gap: 14px; color: var(--text-dim); font-size: 14px; margin-left: auto; order: 2; }

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    z-index: 999;
}
.whatsapp-float:hover { background: #1ebe57; }

@media (max-width: 700px) {
    .site-header { padding: 10px 14px; }
    #mainNav { grid-template-columns: 1fr 1fr; padding: 10px 14px 18px; }
    .user-box { font-size: 13px; gap: 8px; }
    .tab-nav { gap: 10px; }
}
@media (max-width: 420px) {
    #mainNav { grid-template-columns: 1fr; }
}

.content { max-width: 1100px; margin: 0 auto; padding: 32px 24px 60px; }

.site-footer { text-align: center; color: var(--text-dim); font-size: 13px; padding: 24px; border-top: 1px solid var(--gold-dim); }

.card {
    background: var(--bg-card);
    border: 1px solid var(--gold-dim);
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 24px;
}

.login-card { max-width: 380px; margin: 60px auto; text-align: center; }
.login-card h1 { font-size: 22px; margin-bottom: 20px; }
.login-card form { text-align: left; }

label { display: block; margin-top: 14px; font-size: 14px; color: var(--text-dim); }

input[type=text], input[type=password], input[type=email], input[type=tel], input[type=url], input[type=file], textarea, select {
    width: 100%;
    margin-top: 6px;
    padding: 9px 10px;
    background: var(--bg);
    border: 1px solid var(--gold-dim);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
}

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

/* Verhindert, dass der Browser bei Autofill (z.B. Benutzername/E-Mail) das dunkle Design mit
   einer eigenen hellen Hintergrundfarbe und schwarzem Text übermalt. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0px 1000px var(--bg) inset;
    box-shadow: 0 0 0px 1000px var(--bg) inset;
    caret-color: var(--text);
    transition: background-color 0s 600000s, color 0s 600000s;
}

textarea { resize: vertical; min-height: 70px; }

.btn {
    display: inline-block;
    margin-top: 18px;
    padding: 10px 22px;
    background: var(--btn);
    color: var(--bg);
    border: none;
    font-weight: bold;
    letter-spacing: 0.03em;
    cursor: pointer;
    border-radius: 3px;
}

.btn:hover { filter: brightness(1.12); text-decoration: none; }

.btn-small {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--btn);
    color: var(--btn);
    border-radius: 3px;
    font-size: 13px;
}
.btn-small:hover { background: var(--btn); color: var(--bg); text-decoration: none; }

.btn-small.btn-danger { background: transparent; border-color: #c97a7a; color: #e29e9e; }
.btn-small.btn-danger:hover { background: #7a3030; border-color: #7a3030; color: #fff; }

.alert { padding: 10px 14px; border-radius: 3px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: var(--error-bg); color: var(--error-text); }
.alert-ok { background: var(--ok-bg); color: var(--ok-text); }

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.dashboard-grid .card { text-align: center; }
.dashboard-grid .card h2 { margin-top: 0; font-size: 18px; letter-spacing: 0.01em; word-break: break-word; }

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--gold-dim); text-align: left; font-size: 14px; vertical-align: middle; }
th { color: var(--gold); font-weight: normal; border-bottom: 1px solid var(--gold-dim); }
tr:hover td { background: var(--bg-card); }

.actions-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }

.search-box input { max-width: 320px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; }
.badge-yes { background: var(--ok-bg); color: var(--ok-text); }
.badge-no { background: var(--bg-card); color: var(--text-dim); }

.roms-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #c0392b; margin-left: 6px; vertical-align: middle; }

.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.book-grid .card { padding: 14px; }
.book-cover-pair { display: flex; gap: 6px; margin-bottom: 10px; }
.book-cover-pair img { width: 50%; aspect-ratio: 1/1; object-fit: cover; border: 1px solid var(--gold-dim); }
.book-cover-pair .placeholder { width: 50%; aspect-ratio: 1/1; background: var(--bg); border: 1px solid var(--gold-dim); display:flex; align-items:center; justify-content:center; color: var(--text-dim); font-size: 11px; }
.book-title { font-weight: bold; margin: 0 0 4px; }
.book-isbn { color: var(--text-dim); font-size: 13px; margin: 0 0 8px; }
.book-actions { margin-top: 10px; display: flex; gap: 10px; font-size: 13px; }

.cover-current { display: flex; gap: 6px; margin: 6px 0; }
.cover-current img { width: 90px; height: 90px; object-fit: cover; border: 1px solid var(--gold-dim); }

.rotate-buttons { display: flex; gap: 8px; margin-bottom: 6px; }

.form-row { display: flex; gap: 20px; flex-wrap: wrap; }
.form-row > div { flex: 1; min-width: 220px; }

.checkbox-row { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.checkbox-row input { width: auto; margin: 0; }

.muted { color: var(--text-dim); font-size: 13px; }

details.card summary { cursor: pointer; color: var(--gold); font-size: 16px; outline: none; list-style: none; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary::before { content: "▸ "; }
details.card[open] summary::before { content: "▾ "; }
details.card[open] summary { margin-bottom: 14px; }
details.card ol { padding-left: 20px; }
details.card li { margin-bottom: 6px; }

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px;
    margin-bottom: 14px;
    background: var(--bg-card);
    border: 1px solid var(--gold-dim);
}
.chat-message { display: flex; }
.chat-message.mine { justify-content: flex-end; }
.chat-bubble {
    position: relative;
    max-width: 75%;
    background: var(--bg);
    border: 1px solid var(--gold-dim);
    border-radius: 10px;
    padding: 8px 32px 8px 12px;
}
.chat-message.mine .chat-bubble { background: var(--bg-card); border-color: var(--gold); }
.chat-meta { font-size: 11px; color: var(--text-dim); margin-bottom: 3px; }
.chat-text { font-size: 14px; word-wrap: break-word; white-space: pre-wrap; }
.chat-delete-form { position: absolute; top: 4px; right: 4px; margin: 0; }
.chat-delete-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
}
.chat-delete-btn:hover { color: var(--error-text); }
.chat-input-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-input-wrap { flex: 1; display: flex; flex-direction: column; gap: 0; }
.chat-input-wrap textarea { resize: vertical; min-height: 42px; width: 100%; }
.chat-input-row .btn { flex-shrink: 0; }
.btn-icon { background: none; border: 1px solid var(--gold-dim); border-radius: 6px; color: var(--gold-dim); font-size: 18px; padding: 6px 9px; cursor: pointer; flex-shrink: 0; line-height: 1; }
.btn-icon:hover { border-color: var(--gold); color: var(--gold); }
.chat-file-preview { display: flex; align-items: center; gap: 6px; background: var(--bg-card); border: 1px solid var(--gold-dim); border-top: none; border-radius: 0 0 6px 6px; padding: 4px 8px; font-size: 12px; color: var(--text-dim); }
.chat-file-preview span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file-preview button { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 14px; line-height: 1; }
.chat-attachment { margin-top: 6px; }
.chat-attachment-img { max-width: 220px; max-height: 180px; border-radius: 6px; display: block; border: 1px solid var(--gold-dim); }
.chat-attachment-link { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); font-size: 13px; text-decoration: none; background: rgba(201,163,97,.08); border: 1px solid var(--gold-dim); border-radius: 6px; padding: 4px 10px; }
.chat-attachment-link:hover { background: rgba(201,163,97,.16); }
.chat-attachment-icon { font-size: 16px; }
.chat-link { color: var(--gold); text-decoration: underline; word-break: break-all; }
.chat-link:hover { color: var(--gold-dim); }
.chat-mention { color: var(--gold); font-weight: 600; }
.chat-quote { border-left: 3px solid var(--gold-dim); padding: 4px 8px; margin-bottom: 6px; font-size: 13px; color: var(--text-dim); background: rgba(201,163,97,.07); border-radius: 0 4px 4px 0; white-space: pre-wrap; }
.chat-quote-author { display: block; color: var(--gold-dim); font-size: 11px; font-weight: 600; margin-bottom: 2px; }
.chat-quote-preview { display: flex; align-items: center; gap: 8px; background: var(--bg-card); border: 1px solid var(--gold-dim); border-radius: 6px 6px 0 0; padding: 6px 10px; font-size: 13px; color: var(--text-dim); margin-bottom: -1px; }
.chat-quote-preview span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-quote-preview button { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 2px; }
.chat-quote-btn { background: none; border: none; color: var(--gold-dim); cursor: pointer; font-size: 11px; padding: 4px 6px; margin-left: 4px; opacity: .7; touch-action: manipulation; }
.chat-quote-btn:hover { opacity: 1; color: var(--gold); }
.mention-dropdown {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--gold-dim);
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.mention-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
}
.mention-item:hover, .mention-item.active { background: var(--gold-dim); color: var(--gold); }

.dm-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.dm-attachment-img { max-width: 200px; max-height: 200px; border-radius: 6px; display: block; cursor: pointer; }
.dm-attachment-doc { display: inline-flex; align-items: center; padding: 5px 10px; background: var(--bg-card); border: 1px solid var(--gold-dim); border-radius: 4px; font-size: 13px; color: var(--gold); text-decoration: none; }
.dm-attachment-doc:hover { background: var(--bg); }
.dm-attach-btn { cursor: pointer; color: var(--gold-dim); display: flex; align-items: center; flex-shrink: 0; padding: 0 4px; }
.dm-attach-btn:hover { color: var(--gold); }
.dm-file-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dm-file-tag { display: inline-flex; align-items: center; background: var(--bg-card); border: 1px solid var(--gold-dim); border-radius: 12px; padding: 3px 10px; font-size: 12px; color: var(--text-dim); }

.poll-option { margin-bottom: 10px; }
.poll-bar-bg {
    width: 100%;
    height: 8px;
    background: var(--bg);
    border: 1px solid var(--gold-dim);
    border-radius: 4px;
    overflow: hidden;
    margin: 2px 0 2px 26px;
    max-width: calc(100% - 26px);
}
.poll-bar-fill { height: 100%; background: var(--gold); }

.event-date-badge {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border: 1px solid var(--gold-dim);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}
.event-date-badge .event-date-day { font-size: 28px; font-weight: bold; color: var(--gold); }
.event-date-badge .event-date-month { font-size: 13px; letter-spacing: 0.06em; color: var(--text); text-transform: uppercase; }

/* ── Stuhlmeister-Ehrenbuch ──────────────────────────────────────────────── */
.stuhlmeister-header {
    text-align: center;
    padding: 32px 0 20px;
}
.stuhlmeister-ornament {
    font-size: 28px;
    color: var(--gold);
    letter-spacing: 0.3em;
    margin-bottom: 10px;
}
.stuhlmeister-subtitle {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--gold);
    text-transform: uppercase;
    margin: 0 0 6px;
}
.stuhlmeister-lodge {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 20px;
}
.stuhlmeister-line {
    width: 160px;
    height: 1px;
    background: var(--gold-dim);
    margin: 0 auto;
}
.stuhlmeister-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 560px;
    margin: 28px auto 0;
}
.stuhlmeister-entry {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: baseline;
    gap: 0 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--gold-dim);
    position: relative;
}
.stuhlmeister-entry:first-child { border-top: 1px solid var(--gold-dim); }
.stuhlmeister-years {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    color: var(--gold);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.stuhlmeister-name {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.04em;
}
.stuhlmeister-bemerkung {
    grid-column: 2;
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-top: 2px;
}
.stuhlmeister-actions {
    grid-column: 1 / -1;
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 4px;
}
.stuhlmeister-actions a { color: var(--gold-dim); }
.stuhlmeister-actions a:hover { color: var(--gold); }
.event-date-badge .event-date-year { font-size: 11px; color: var(--text-dim); }

/* ── DM Zitat (Quote) ───────────────────────────────────────────────── */
.dm-quote {
    background: rgba(201,168,76,.09);
    border-left: 3px solid var(--gold-dim);
    border-radius: 3px 6px 6px 3px;
    padding: 5px 10px;
    margin-bottom: 6px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}
.dm-quote-author { color: var(--gold); font-weight: 600; font-size: 11px; }
.dm-quote-text {
    color: var(--text-dim);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.45;
}
.dm-quote-preview {
    display: none;
    background: rgba(201,168,76,.09);
    border-left: 3px solid var(--gold);
    border-radius: 3px 6px 6px 3px;
    padding: 6px 10px;
    margin-bottom: 8px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.dm-quote-preview-text { font-size: 13px; color: var(--text-dim); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-quote-clear { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 16px; line-height: 1; padding: 0; flex-shrink: 0; }
.dm-quote-clear:hover { color: var(--text); }
.dm-quote-btn {
    display: block;
    margin-top: 5px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity .15s;
    text-align: right;
    width: 100%;
}
.chat-message:hover .dm-quote-btn,
.chat-message.mine:hover .dm-quote-btn { opacity: 1; }
.dm-quote-btn:hover { color: var(--gold); background: rgba(201,168,76,.08); }

/* ── Galerie ────────────────────────────────────────────────────────── */
.galerie-filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.galerie-filter select { background: var(--bg-card); border: 1px solid var(--gold-dim); color: var(--text); padding: 6px 10px; border-radius: 4px; font-size: 14px; }
.galerie-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .galerie-form-grid { grid-template-columns: 1fr; } }
.galerie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
@media (max-width: 500px) { .galerie-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; } }
.galerie-card { position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: 8px; cursor: pointer; background: var(--bg-card); border: 1px solid var(--gold-dim); }
.galerie-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.galerie-card:hover img { transform: scale(1.06); }
.galerie-card-nothumb { width: 100%; height: 100%; background: linear-gradient(135deg, #1a1a2e, #0d0d1a); }
.galerie-card-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 44px; height: 44px; background: rgba(0,0,0,.6); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; pointer-events: none; border: 2px solid rgba(255,255,255,.4); }
.galerie-card-overlay { position: absolute; inset: 0; background: transparent; transition: background .25s; display: flex; flex-direction: column; justify-content: flex-end; }
.galerie-card:hover .galerie-card-overlay { background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 60%); }
.galerie-card-info { padding: 8px 10px; opacity: 0; transition: opacity .2s; }
.galerie-card:hover .galerie-card-info { opacity: 1; }
.galerie-card-title { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.galerie-card-meta { color: rgba(255,255,255,.65); font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.galerie-delete-btn { position: absolute; top: 6px; right: 6px; opacity: 0; transition: opacity .2s; }
.galerie-card:hover .galerie-delete-btn { opacity: 1; }
.galerie-delete-btn button { background: rgba(0,0,0,.65); border: 1px solid rgba(255,255,255,.25); color: #fff; font-size: 13px; width: 26px; height: 26px; border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.galerie-delete-btn button:hover { background: rgba(180,40,40,.8); border-color: #c0392b; }
.galerie-empty { text-align: center; padding: 60px 20px; color: var(--text-dim); }

/* Karussell (automatisch abspielend, oben in der Galerie) */
.galerie-carousel { position: relative; height: 380px; border-radius: 10px; overflow: hidden; margin-bottom: 24px; background: var(--bg-card); border: 1px solid var(--gold-dim); }
.galerie-carousel-track { display: flex; height: 100%; transition: transform .5s ease; }
.galerie-carousel-slide { position: relative; flex: 0 0 100%; height: 100%; cursor: pointer; }
.galerie-carousel-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.galerie-carousel-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 22px 16px; background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 100%); color: #fff; display: flex; flex-direction: column; gap: 2px; }
.galerie-carousel-caption strong { font-size: 15px; }
.galerie-carousel-caption span { font-size: 12px; color: rgba(255,255,255,.75); }
.galerie-carousel-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.4); border: none; color: #fff; font-size: 32px; line-height: 1; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.galerie-carousel-nav:hover { background: rgba(0,0,0,.65); color: var(--gold); }
.galerie-carousel-nav.prev { left: 14px; }
.galerie-carousel-nav.next { right: 14px; }
.galerie-carousel-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.galerie-carousel-dots .dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,.4); cursor: pointer; padding: 0; }
.galerie-carousel-dots .dot.active { background: var(--gold); }
@media (max-width: 600px) { .galerie-carousel { height: 220px; } .galerie-carousel-nav { width: 34px; height: 34px; font-size: 24px; } }

/* Download-Button in der Lightbox */
.galerie-lb-download { background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; padding: 5px 11px; border-radius: 4px; cursor: pointer; display: flex; align-items: center; transition: border-color .15s, color .15s; }
.galerie-lb-download:hover { border-color: var(--gold); color: var(--gold); }

/* Buchhaltung */
.buch-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.buch-table th, .buch-table td { padding: 8px 10px; border-bottom: 1px solid var(--gold-dim); vertical-align: middle; }
.buch-table th { color: var(--gold); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.buch-table tfoot td { border-top: 1px solid var(--gold-dim); padding-top: 10px; }
.buch-table tr:hover td { background: var(--bg-card); }

/* Lightbox */
.galerie-lb { display: none; position: fixed; inset: 0; z-index: 1100; flex-direction: column; }
.galerie-lb.open { display: flex; }
.galerie-lb-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.93); }
.galerie-lb-panel { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; }
.galerie-lb-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 14px 18px 10px; flex-shrink: 0; gap: 12px; }
.galerie-lb-caption strong { color: var(--gold); display: block; font-size: 15px; line-height: 1.3; }
.galerie-lb-caption span { color: var(--text-dim); font-size: 12px; }
.galerie-lb-close { background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; font-size: 17px; padding: 3px 11px; border-radius: 4px; cursor: pointer; flex-shrink: 0; transition: border-color .15s, color .15s; }
.galerie-lb-close:hover { border-color: var(--gold); color: var(--gold); }
.galerie-lb-stage { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 8px; min-height: 0; }
.galerie-lb-nav { background: none; border: none; color: rgba(255,255,255,.4); font-size: 52px; line-height: 1; cursor: pointer; padding: 0 6px; flex-shrink: 0; transition: color .15s; }
.galerie-lb-nav:hover:not(:disabled) { color: var(--gold); }
.galerie-lb-nav:disabled { opacity: .15; cursor: default; }
#lbMedia { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; max-height: 100%; overflow: hidden; }
#lbMedia img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
#lbMedia iframe { width: 100%; aspect-ratio: 16/9; max-height: 100%; border: none; border-radius: 4px; }
.galerie-lb-strip { display: flex; gap: 6px; overflow-x: auto; padding: 10px 14px 12px; flex-shrink: 0; scrollbar-width: thin; scrollbar-color: var(--gold-dim) transparent; }
.galerie-lb-strip-thumb { width: 70px; height: 52px; flex-shrink: 0; border-radius: 5px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: border-color .15s, opacity .15s; opacity: .6; }
.galerie-lb-strip-thumb:hover { opacity: .9; }
.galerie-lb-strip-thumb.active { border-color: var(--gold); opacity: 1; }
.galerie-lb-strip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.galerie-strip-vid { width: 100%; height: 100%; background: #1a1a2e; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.6); font-size: 20px; }
