:root {
    --pulse-bg: #0d0d10;
    --pulse-sidebar: #000000;
    --pulse-surface: #1a1a1e;
    --pulse-surface-hover: #232328;
    --pulse-text: #e8e8ea;
    --pulse-muted: #8b8b92;
    --pulse-accent: #00c2a8;
    --pulse-accent-hover: #12e0c4;
    --pulse-border: #2a2a30;
    --pulse-online: #35d158;
}

* { box-sizing: border-box; }

body.pulse {
    margin: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--pulse-bg);
    color: var(--pulse-text);
    line-height: 1.5;
}

a { color: var(--pulse-accent); text-decoration: none; }
a:hover { color: var(--pulse-accent-hover); }

/* ---- Sidebar ---- */
.pulse-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--pulse-sidebar);
    border-right: 1px solid var(--pulse-border);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.pulse-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px 20px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    color: var(--pulse-text) !important;
    border-bottom: 1px solid var(--pulse-border);
    margin-bottom: 12px;
}
.pulse-logo-mark { color: var(--pulse-accent); font-size: 1.3rem; }

.pulse-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.pulse-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--pulse-muted) !important;
    font-size: 0.95rem;
    font-weight: 600;
}
.pulse-nav a:hover { background: var(--pulse-surface-hover); color: var(--pulse-text) !important; }
.pulse-icon { font-size: 1.1rem; width: 1.3rem; text-align: center; }

.pulse-sidebar-bottom { border-top: 1px solid var(--pulse-border); padding-top: 12px; margin-top: 12px; }
.pulse-account {
    display: flex; align-items: center; gap: 12px; padding: 10px 20px;
    color: var(--pulse-text) !important; font-weight: 600; font-size: 0.95rem;
}
.pulse-logout {
    margin: 6px 20px 0; background: none; border: 1px solid var(--pulse-border);
    color: var(--pulse-muted); padding: 6px 10px; border-radius: 6px; cursor: pointer; font: inherit;
}
.pulse-logout:hover { border-color: var(--pulse-accent); color: var(--pulse-accent); }

/* ---- Main area ---- */
.pulse-main-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; position: relative; }

.pulse-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 28px; border-bottom: 1px solid var(--pulse-border);
    background: var(--pulse-bg); position: sticky; top: 0; z-index: 5;
    flex-shrink: 0;
}
.pulse-topbar-title { font-weight: 700; font-size: 1.1rem; }
.pulse-topbar-icons { display: flex; gap: 18px; font-size: 1.2rem; }
.pulse-topbar-icons a { color: var(--pulse-muted) !important; }
.pulse-topbar-icons a:hover { color: var(--pulse-accent) !important; }

.pulse-content { padding: 24px 28px 60px; max-width: 1200px; }

.pulse-footer {
    text-align: center; padding: 18px; color: var(--pulse-muted);
    font-size: 0.82rem; border-top: 1px solid var(--pulse-border);
}

/* ---- Typo / Elemente ---- */
h1, h2, h3 { color: var(--pulse-text); }
h1 { font-size: 1.5rem; }

table { border-collapse: collapse; width: 100%; background: var(--pulse-surface); border-radius: 6px; overflow: hidden; }
th, td { padding: 10px 12px; border: 1px solid var(--pulse-border); text-align: left; }
thead th { background: rgba(255,255,255,0.04); font-weight: 700; }
tbody tr:hover { background: rgba(255,255,255,0.04); }
th { background: #000; color: var(--pulse-muted); font-size: 0.85rem; text-transform: uppercase; }

input, select, textarea, button {
    font: inherit;
    padding: 8px 10px;
    border: 1px solid var(--pulse-border);
    border-radius: 6px;
    background: var(--pulse-surface);
    color: var(--pulse-text);
}

button {
    cursor: pointer;
    background: var(--pulse-accent);
    color: #06231f;
    font-weight: 700;
    border-color: var(--pulse-accent);
}
button:hover { background: var(--pulse-accent-hover); }

/* ---- Karten-Raster fuer Suchergebnisse (siehe search/index.php: ul.profile-grid) ---- */
ul.profile-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

ul.profile-grid li.profile-grid-item {
    background: var(--pulse-surface);
    border: 1px solid var(--pulse-border);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
ul.profile-grid li.profile-grid-item:hover {
    border-color: var(--pulse-accent);
    transform: translateY(-2px);
}

ul.profile-grid img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

ul.profile-grid .profile-grid-body {
    padding: 8px 10px 10px;
}

ul.profile-grid .profile-grid-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--pulse-text);
    display: block;
}

ul.profile-grid .profile-grid-meta {
    font-size: 0.78rem;
    color: var(--pulse-muted);
}

/* ---- Profil-Hero: grosses Bild links, Angaben rechts untereinander ---- */
.profile-hero {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: var(--pulse-surface);
    border: 1px solid var(--pulse-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}
.profile-hero-image { flex: 0 0 340px; display: flex; flex-direction: column; background: var(--pulse-surface); }
.profile-hero-image img { width: 100%; height: 340px; object-fit: cover; display: block; }
.profile-hero-username {
    display: block; padding: 10px 4px 0; color: var(--pulse-text); font-weight: 700; font-size: 1.15rem;
}
.profile-hero-info { flex: 1; padding: 20px 24px; min-width: 0; }
.profile-hero-info h2 { margin-top: 0; font-size: 1rem; color: var(--pulse-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ---- Tab-Umschaltung ohne JavaScript ---- */
.profile-tab-radio { display: none; }
.profile-panel { display: none; }
#tab-info:checked ~ #panel-info,
#tab-comments:checked ~ #panel-comments,
#tab-stories:checked ~ #panel-stories,
#tab-react:checked ~ #panel-react,
#tab-friendlists:checked ~ #panel-friendlists,
#tab-report:checked ~ #panel-report,
#tab-reactions:checked ~ #panel-reactions,
#tab-manage:checked ~ #panel-manage {
    display: block;
}

.profile-action-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.profile-action-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 12px; border-radius: 20px; border: 1px solid var(--pulse-border);
    background: var(--pulse-surface); color: var(--pulse-text) !important;
    font-size: 0.88rem; cursor: pointer; text-decoration: none !important; user-select: none;
}
.profile-action-btn:hover { border-color: var(--pulse-accent); }
.profile-action-count { color: var(--pulse-muted); font-size: 0.8rem; }

/* ---- Alben-Vorschau innerhalb des Info-Panels ---- */
.profile-albums-inline { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.profile-album-thumb {
    display: block; width: 96px; text-decoration: none !important; color: var(--pulse-text) !important;
    font-size: 0.72rem; text-align: center;
}
.profile-album-thumb img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 4px; }
.profile-album-locked { width: 96px; font-size: 0.72rem; text-align: center; color: var(--pulse-muted); }
.profile-album-locked form { margin-top: 4px; }
.profile-album-locked button { font-size: 0.7rem; padding: 3px 6px; }

/* ---- Reaktions-Picker (Buttons statt JS-Klicks) ---- */
.reaction-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.reaction-pick-btn {
    background: var(--pulse-surface); border: 2px solid transparent; border-radius: 8px;
    padding: 3px; cursor: pointer; line-height: 0;
}
.reaction-pick-btn img { display: block; width: 28px; height: 28px; }
.reaction-pick-btn.is-active { border-color: var(--pulse-accent); }
.reaction-count-item {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--pulse-surface); border-radius: 20px; padding: 4px 10px; font-size: 0.85rem;
}
.reaction-count-item img { width: 20px; height: 20px; }

.profile-comment-list, .profile-story-list { list-style: none; margin: 0 0 14px; padding: 0; }
.profile-comment-list li, .profile-story-list li {
    padding: 8px 0; border-bottom: 1px solid var(--pulse-border); font-size: 0.9rem;
}
.profile-manage-list { list-style: none; margin: 0; padding: 0; }
.profile-manage-list li { padding: 4px 0; }
.profile-manage-list a { display: block; padding: 8px 10px; border-radius: 8px; }
.profile-manage-list a:hover { background: var(--pulse-surface-hover); }
dl.profile-attributes { margin: 0; }
dl.profile-attributes > div {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--pulse-border);
    font-size: 0.92rem;
}
dl.profile-attributes dt { color: var(--pulse-muted); }
dl.profile-attributes dd { margin: 0; font-weight: 600; text-align: right; }

@media (max-width: 640px) {
    .profile-hero { flex-direction: column; }
    .profile-hero-image { flex-basis: auto; }
}

/* ---- Modal-Overlay (Profil schwebend ueber der Seite) ---- */
.gh-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.75);
    z-index: 1000; display: flex; align-items: flex-start; justify-content: center;
    padding: 30px 20px; overflow-y: auto;
}
.gh-modal-panel {
    background: var(--pulse-bg); border: 1px solid var(--pulse-border); border-radius: 14px;
    max-width: 960px; width: 100%; position: relative; padding: 20px;
}
.gh-modal-close {
    position: absolute; top: 14px; right: 18px; font-size: 1.6rem; color: var(--pulse-muted);
    cursor: pointer; background: none; border: none; line-height: 1;
}
.gh-modal-close:hover { color: var(--pulse-text); }

/* ---- Chat-Overlay: schmales Panel rechts, verschwommener Hintergrund ----
   position:fixed (nicht absolute), sonst scrollt das Overlay mit dem
   eigenstaendig scrollenden .pulse-main-wrap mit. "left: 220px" statt
   "inset: 0", damit die Sidebar (Breite 220px) links sichtbar bleibt und
   nicht vom Overlay verdeckt wird. */
.gh-chat-overlay {
    position: fixed; top: 0; right: 0; bottom: 0; left: 220px; z-index: 50;
    display: flex; justify-content: flex-start;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.gh-chat-panels {
    display: flex; height: 100%; max-width: 720px;
    background: var(--pulse-bg); border-right: 1px solid var(--pulse-border);
    box-shadow: 12px 0 30px rgba(0,0,0,0.5);
    position: relative;
}
/* Panel-Breite haengt davon ab, ob eine Unterhaltung geoeffnet ist: nur die Liste
   (300px, passend zu .gh-chat-list-panel) oder Liste + Thread (volle Breite bis 720px). */
.gh-chat-panels:not(:has(.gh-chat-thread-panel:not([hidden]))) { width: 300px; }
.gh-chat-panels:has(.gh-chat-thread-panel:not([hidden])) { width: 100%; }
.gh-chat-list-panel { width: 300px; flex-shrink: 0; border-right: 1px solid var(--pulse-border); overflow-y: auto; padding: 16px; }
.gh-chat-thread-panel { flex: 1; overflow-y: auto; padding: 16px; min-width: 0; }
.gh-chat-close {
    position: absolute; top: 12px; right: 16px; font-size: 1.4rem; color: var(--pulse-muted);
    cursor: pointer; background: none; border: none; z-index: 51;
}

/* ---- Chat-Sprechblasen ---- */
.chat-message-list { max-height: 55vh; overflow-y: auto; padding: 4px 2px 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-message { display: flex; flex-direction: column; max-width: 78%; }
.chat-message--mine { align-self: flex-end; align-items: flex-end; }
.chat-message--theirs { align-self: flex-start; align-items: flex-start; }
.chat-bubble {
    padding: 9px 13px; border-radius: 16px; font-size: 0.92rem; line-height: 1.4;
    word-break: break-word;
}
.chat-message--mine .chat-bubble { background: var(--pulse-accent); color: #06231f; border-bottom-right-radius: 4px; }
.chat-message--theirs .chat-bubble { background: var(--pulse-surface); color: var(--pulse-text); border-bottom-left-radius: 4px; }
.chat-message-time { color: var(--pulse-muted); font-size: 0.7rem; margin-top: 3px; padding: 0 4px; }

/* Das "cols"-Attribut im HTML erzwingt sonst eine feste Zeichenbreite,
   die breiter als das Chat-Panel sein kann und horizontales Scrollen ausloest. */
#message-body { width: 100%; max-width: 100%; box-sizing: border-box; }

/* ---- Konversationsliste ---- */
.chat-conv-list { list-style: none; margin: 0; padding: 0; max-height: 65vh; overflow-y: auto; overflow-x: hidden; }
.chat-conv-item { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--pulse-border); }
.chat-conv-avatar { flex-shrink: 0; display: block; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: var(--pulse-surface); }
.chat-conv-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-conv-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--pulse-text) !important; text-decoration: none !important; }
.chat-conv-name { font-weight: 700; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-conv-unread { color: var(--pulse-accent); font-weight: 700; font-size: 0.78rem; margin-left: 4px; }
.chat-conv-preview { font-size: 0.82rem; color: var(--pulse-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* WICHTIG: [hidden] muss gegen die display:flex-Regeln oben gewinnen, sonst bleiben
   die Overlays permanent sichtbar (Spezifitaet von [hidden] und .klasse ist gleich,
   Autor-Regel gewinnt sonst gegen die Browser-Standardregel) */
.gh-modal-overlay[hidden],
.gh-chat-overlay[hidden],
.gh-notif-panel[hidden] {
    display: none !important;
}

.gh-image-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 2000;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.gh-image-overlay img { max-width: 92vw; max-height: 92vh; }
.gh-image-overlay .gh-modal-close { position: fixed; top: 20px; right: 26px; }

/* ---- Benachrichtigungs-Feed: schmale Seitenleiste rechts ---- */
.gh-notif-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-width: 90vw;
    background: var(--pulse-bg); border-left: 1px solid var(--pulse-border);
    box-shadow: -12px 0 30px rgba(0,0,0,0.5); z-index: 900; overflow-y: auto; padding: 20px;
}
.gh-notif-panel-close {
    position: absolute; top: 14px; right: 16px; font-size: 1.5rem; color: var(--pulse-muted);
    background: none; border: none; cursor: pointer;
}
.gh-notif-badge {
    display: inline-block; min-width: 16px; padding: 1px 5px; margin-left: 3px;
    background: var(--pulse-accent); color: #06231f; border-radius: 10px;
    font-size: 0.68rem; font-weight: 700; text-align: center; vertical-align: super;
}

.notif-list { list-style: none; margin: 0; padding: 0; max-height: 65vh; overflow-y: auto; overflow-x: hidden; }
.notif-item { padding: 10px 4px; border-bottom: 1px solid var(--pulse-border); font-size: 0.9rem; }
.notif-item--unread { background: var(--pulse-surface); border-radius: 8px; }
.notif-item a { color: var(--pulse-text) !important; }
.notif-item small { display: block; color: var(--pulse-muted); margin-top: 3px; font-size: 0.75rem; }

.dash-announcements { margin-bottom: 20px; }
.dash-announcement { background: var(--pulse-surface); border-left: 3px solid var(--pulse-accent); padding: 10px 14px; margin-bottom: 8px; border-radius: 6px; }
.dash-feed { list-style: none; margin: 0; padding: 0; }
.dash-feed li { padding: 8px 0; border-bottom: 1px solid var(--pulse-border); font-size: 0.9rem; }
.landing-stats { display: flex; gap: 24px; margin: 20px 0; flex-wrap: wrap; }
.landing-stats div { background: var(--pulse-surface); border-radius: 10px; padding: 14px 20px; text-align: center; min-width: 100px; }
.landing-stats strong { display: block; font-size: 1.6rem; color: var(--pulse-accent); }
.landing-stats span { font-size: 0.8rem; color: var(--pulse-muted); }
.landing-block { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; background: var(--pulse-surface); border-radius: 10px; padding: 14px; }
.landing-block img { width: 140px; border-radius: 8px; flex-shrink: 0; }

.gh-map-own-marker span {
    display: block; width: 16px; height: 16px; border-radius: 50%;
    background: var(--pulse-accent); border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(0,194,168,0.35);
}

/* ---- Events ---- */
.event-cover-image { width: 100%; max-height: 360px; object-fit: cover; border-radius: 12px; margin-bottom: 16px; }
.event-meta-line { color: var(--pulse-muted); margin: 4px 0 16px; }
.event-info-box { margin-bottom: 20px; }
.event-description { margin: 16px 0; line-height: 1.6; }
.event-status-note { color: var(--pulse-accent); font-weight: 600; }
.event-map { height: 300px; border-radius: 12px; margin: 12px 0 20px; }
.event-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 16px 0 20px; }
.event-gallery img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; }
.event-actions { margin: 20px 0; }
.event-rsvp-form button, .event-invite-form button { margin-right: 8px; }
.event-form-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.event-form-field { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 4px; }
.event-form-field label { white-space: nowrap; }
.event-quill-editor { height: 320px; background: #fff; color: #111; border-radius: 8px; }

/* ---- Polls / Umfragen ---- */
.poll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; margin: 1.5rem 0 2rem; }
.poll-tile {
    display: flex; flex-direction: column; border-radius: 10px; overflow: hidden;
    text-decoration: none; color: inherit; border: 1px solid var(--pulse-border);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.poll-tile:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
.poll-tile-image { height: 120px; background-size: cover; background-position: center; background-color: rgba(128,128,128,0.15); }
.poll-tile-placeholder { display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.poll-tile-body { padding: 0.75rem 1rem; }
.poll-tile-body h3 { margin: 0 0 0.35rem 0; font-size: 1rem; }
.poll-tile-body p { margin: 0; font-size: 0.85rem; color: var(--pulse-muted); }
.poll-cover-image { width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.poll-meta-line { color: var(--pulse-muted); margin: 4px 0 16px; }
.poll-results { margin: 12px 0 20px; }
.poll-result-row { margin-bottom: 12px; }
.poll-result-label { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 0.92rem; }
.poll-result-bar-bg { background: rgba(128,128,128,0.25); border-radius: 6px; height: 10px; overflow: hidden; }
.poll-result-bar { background: var(--pulse-accent); height: 100%; }
.poll-actions { margin: 16px 0; }
.poll-comment { border-top: 1px solid var(--pulse-border); padding: 10px 0; }
.poll-comment small { color: var(--pulse-muted); margin-left: 8px; }
.poll-quill-editor { height: 180px; background: #fff; color: #111; border-radius: 8px; }
.poll-description { margin: 12px 0 20px; line-height: 1.6; }

/* ============================================================
   Mobilansicht
   ============================================================ */
.pulse-nav-toggle-input { display: none; }
.pulse-nav-toggle-btn { display: none; }
.pulse-nav-backdrop { display: none; }
.pulse-topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }

@media (max-width: 900px) {
    input, select, textarea, button { font-size: 16px; }

    .pulse-sidebar {
        position: fixed; top: 0; left: 0; height: 100vh; width: 260px; max-width: 80vw;
        transform: translateX(-100%); transition: transform 0.25s ease; z-index: 1600;
        box-shadow: 12px 0 30px rgba(0,0,0,0.5);
    }
    .pulse-nav-toggle-input:checked ~ .pulse-sidebar { transform: translateX(0); }

    .pulse-nav-backdrop {
        display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
        z-index: 1590; opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
    }
    .pulse-nav-toggle-input:checked ~ .pulse-nav-backdrop { opacity: 1; pointer-events: auto; }

    .pulse-nav-toggle-btn {
        display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
        width: 38px; height: 38px; font-size: 1.3rem; line-height: 1; cursor: pointer;
        background: none; border: 1px solid var(--pulse-border); border-radius: 6px;
        color: var(--pulse-text);
    }

    .pulse-topbar { padding: 12px 16px; }
    .pulse-topbar-title { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pulse-content { padding: 16px 14px 40px; }

    table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }

    dl.profile-attributes > div { flex-direction: column; gap: 2px; }
    dl.profile-attributes dd { text-align: left; }

    /* Chat-Overlay: volle Breite statt Desktop-Offset neben der (jetzt ausgeblendeten) Sidebar */
    .gh-chat-overlay { left: 0; z-index: 350; }
    .gh-chat-panels { width: 100% !important; max-width: 100%; }
    .gh-chat-list-panel { width: 100%; border-right: none; }
    .gh-chat-thread-panel { width: 100%; }
    /* Nur eine Spalte gleichzeitig: Liste ausblenden, sobald der Thread sichtbar ist */
    .gh-chat-panels:has(.gh-chat-thread-panel:not([hidden])) .gh-chat-list-panel { display: none; }

    .gh-notif-panel { width: 100%; max-width: 100%; z-index: 950; }
    .gh-modal-panel { padding: 14px; }

    .event-form-row { gap: 10px; }
}

/* ============================================================
   Generisches Kachel-Design (wiederverwendbar: Gruppen, Forum,
   Geschichten, Buecher, Freundeslisten, ...)
   ============================================================ */
.gh-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; margin: 1.5rem 0 2rem; }
.gh-tile {
    display: flex; flex-direction: column; border-radius: 10px; overflow: hidden;
    text-decoration: none; color: inherit; border: 1px solid var(--pulse-border);
    background: var(--pulse-surface);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gh-tile:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
.gh-tile-image { height: 130px; background-size: cover; background-position: center; background-color: rgba(128,128,128,0.15); }
.gh-tile-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gh-tile-placeholder { display: flex; align-items: center; justify-content: center; font-size: 2.5rem; opacity: 0.6; }
.gh-tile-body { padding: 0.75rem 1rem; }
.gh-tile-body h3 { margin: 0 0 0.35rem 0; font-size: 1rem; color: var(--pulse-text); }
.gh-tile-body p { margin: 0; font-size: 0.85rem; color: var(--pulse-muted); }
.gh-tile-meta { font-size: 0.78rem; color: var(--pulse-muted); margin-top: 4px; }

.gh-avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.gh-avatar-chip { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.gh-avatar-chip img, .gh-avatar-chip .gh-avatar-placeholder {
    width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
    background: rgba(128,128,128,0.15);
}
.gh-avatar-placeholder { display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: bold; opacity: 0.6; color: var(--pulse-text); }
.gh-avatar-chip span { font-size: 0.85rem; color: var(--pulse-text); }

/* Mitgliederliste (Gruppen, Freundeslisten): Avatar + Name + Aktionen in einer Zeile */
.gh-member-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.gh-member-row {
    display: flex; align-items: center; gap: 12px; padding: 8px 4px;
    border-bottom: 1px solid var(--pulse-border); flex-wrap: wrap;
}
.gh-member-avatar, .gh-member-avatar-placeholder {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    background: rgba(128,128,128,0.15);
}
.gh-member-avatar-placeholder { display: flex; align-items: center; justify-content: center; font-weight: bold; opacity: 0.6; color: var(--pulse-text); }
.gh-member-name { flex: 1; min-width: 120px; font-weight: 600; color: var(--pulse-text); }
.gh-member-role { font-size: 0.8rem; color: var(--pulse-muted); font-weight: normal; }
.gh-member-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Buecher-Leseansicht: eigener dunkler Hintergrund nur fuer den Leser, nicht die ganze Seite */
.gh-book-reader { background: #0a0a0a; color: #eee; border-radius: 12px; padding: 20px; border: 1px solid var(--pulse-border); }
.gh-book-page-area { text-align: center; min-height: 60vh; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.gh-book-page-area img, .gh-book-page-area video { max-width: 100%; max-height: 80vh; }
.gh-book-controls { text-align: center; margin-top: 12px; }
.gh-book-nav-btn { font-size: 1.5em; padding: 8px 18px; cursor: pointer; }

/* Einklappbare Bereiche (z.B. erweiterte Suchkriterien) */
.gh-collapsible {
    border: 1px solid var(--pulse-border); border-radius: 8px; padding: 10px 14px; margin: 14px 0;
    background: var(--pulse-surface);
}
.gh-collapsible summary {
    cursor: pointer; font-weight: 600; padding: 4px 0; list-style: none; color: var(--pulse-text);
}
.gh-collapsible summary::-webkit-details-marker { display: none; }
.gh-collapsible summary::before { content: "▸ "; }
.gh-collapsible[open] summary::before { content: "▾ "; }
.gh-collapsible[open] summary { margin-bottom: 8px; border-bottom: 1px solid var(--pulse-border); padding-bottom: 10px; }

/* Lightbox fuer Moderationswarteschlange */
.gh-lightbox-overlay[hidden] { display: none !important; }
.gh-lightbox-overlay {
    position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.85);
    display: flex; align-items: center; justify-content: center; padding: 30px;
}
.gh-lightbox-overlay img { max-width: 100%; max-height: 90vh; border-radius: 8px; }
.gh-lightbox-close { position: absolute; top: 16px; right: 24px; font-size: 2rem; color: #fff; cursor: pointer; }

/* Kategorie-Überschriften über den gruppierten Profildaten */
.profile-attributes-category { margin: 18px 0 6px; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--pulse-muted); }
.profile-attributes-category:first-of-type { margin-top: 8px; }

/* "Persönlich bekannt"-Badge neben dem Profilnamen */
.gh-vouch-badge {
    display: inline-block; font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.03em; padding: 3px 8px; border-radius: 12px;
    background: var(--pulse-accent); color: #000; vertical-align: middle; margin-left: 6px;
}

/* Profil-Headline unter dem Namen */
.profile-hero-headline { display: block; margin-top: 2px; font-style: italic; color: var(--pulse-muted); font-size: 0.95rem; }

/* Headline auf der Speed-Dating-Karte */
.gh-sd-card-headline { font-style: italic; color: var(--pulse-muted); margin: 2px 0 8px; }

/* Icon-Kachel-Grid fuer Admin-/Moderations-Navigation (Symbol + Beschriftung) */
.gh-icon-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin: 1.5rem 0 2rem; }
.gh-icon-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    padding: 18px 8px; border-radius: 12px; border: 1px solid var(--pulse-border);
    text-decoration: none; color: inherit; text-align: center; background: var(--pulse-surface);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gh-icon-tile:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.4); border-color: var(--pulse-accent); }
.gh-icon-tile-icon { font-size: 2rem; line-height: 1; }
.gh-icon-tile-label { font-size: 0.8rem; font-weight: 600; line-height: 1.3; color: var(--pulse-text); }

/* Dokument-Kacheln (Datei-Freigabe): Icon, Name, Endung + Groesse */
.gh-doc-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 1rem 0 1.5rem; }
.gh-doc-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    padding: 16px 8px; border-radius: 12px; border: 1px solid var(--pulse-border);
    text-decoration: none; color: inherit; text-align: center; background: var(--pulse-surface);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gh-doc-tile:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.4); border-color: var(--pulse-accent); }
.gh-doc-tile-icon { font-size: 2rem; line-height: 1; }
.gh-doc-tile-name { font-size: 0.82rem; font-weight: 600; word-break: break-word; color: var(--pulse-text); }
.gh-doc-tile-meta { font-size: 0.72rem; color: var(--pulse-muted); }

/* Nach-oben-Button */
.gh-scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--pulse-accent);
    color: #06231f;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    z-index: 40;
    transition: background 0.15s ease, transform 0.15s ease;
}
.gh-scroll-top:hover { background: var(--pulse-accent-hover); transform: translateY(-2px); }
.gh-scroll-top[hidden] { display: none; }
@media (max-width: 720px) {
    .gh-scroll-top { right: 16px; bottom: 16px; }
}
