:root {
    /* Ludothek "Nachtbibliothek": tiefes Violett-Navy mit Blau-Violett-Akzenten */
    --color-bg: #0b0918;
    --color-bg-glow-1: rgba(124, 58, 237, 0.20);
    --color-bg-glow-2: rgba(59, 91, 255, 0.12);
    --color-surface: #161330;
    --color-surface-raised: #1f1a42;
    --color-surface-gradient: linear-gradient(160deg, #1c1740 0%, #141129 100%);
    --color-border: rgba(167, 139, 250, 0.14);
    --color-border-strong: rgba(167, 139, 250, 0.32);
    --color-text: #f4f2ff;
    --color-text-muted: #a39fc4;
    --accent-rgb: 139, 92, 246;
    --color-accent: #a78bfa;
    --color-accent-strong: #8b5cf6;
    --color-accent-hover: #7c3aed;
    --color-accent-blue: #4f6bff;
    --color-accent-pink: #e879f9;
    --color-accent-cyan: #818cf8;
    --gradient-primary: linear-gradient(135deg, #4f6bff 0%, #8b5cf6 55%, #a855f7 100%);
    --gradient-primary-hover: linear-gradient(135deg, #3f5bf0 0%, #7c3aed 55%, #9333ea 100%);
    --color-success: #34d399;
    --color-danger: #f87171;
    --color-warning: #fbbf24;

    --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 32px;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    --shadow-glow: 0 6px 22px rgba(var(--accent-rgb), 0.35);
}

html, body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    color-scheme: dark;
    letter-spacing: -0.01em;
}

html {
    /* Only html (not body too) should clip horizontal overflow - setting overflow-x on
       both makes the browser promote overflow-y to "auto" on both per spec, creating two
       competing scroll containers. body never actually gets shorter than its content in
       that case, so position: sticky elements bind to body's non-clipping scrollport and
       never see any scroll happen, which means they never engage. */
    overflow-x: hidden;
}

input[type="file"] {
    max-width: 100%;
    min-width: 0;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

input[type="file"]::file-selector-button {
    background-color: var(--color-surface-raised);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    color: var(--color-text);
    padding: var(--space-1) var(--space-3);
    margin-right: var(--space-2);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

input[type="file"]::file-selector-button:hover {
    background-color: var(--color-border);
}

.card-body {
    min-width: 0;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
    text-align: left;
    margin-top: 0;
    margin-bottom: var(--space-3);
}

h1 { font-size: 1.4rem; }
h2 { font-size: 1.05rem; }
h3 { font-size: 0.95rem; }

h1:not(:first-child), h2:not(:first-child), h3:not(:first-child) {
    margin-top: var(--space-5);
}

.hero-title {
    text-align: left;
}

p, span, div {
    color: inherit;
}

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

a, .btn-link {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover, .btn-link:hover {
    color: var(--color-accent-hover);
}

.btn {
    border-radius: var(--radius-pill);
    font-weight: 600;
    padding: 0.5rem 1.15rem;
}

.btn-primary {
    color: #fff;
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
}

.btn-outline-primary {
    color: var(--color-accent);
    border-color: var(--color-border);
}

.btn-outline-primary:hover {
    background-color: var(--color-surface);
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 2px var(--color-accent);
}

.form-control {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
}

.form-control:focus {
    background-color: var(--color-surface);
    color: var(--color-text);
}

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

.card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.content {
    padding: var(--space-3);
    max-width: 640px;
    margin: 0 auto;
    min-width: 0;
    width: 100%;
}

.hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-4);
    margin: calc(var(--space-3) * -1) calc(var(--space-3) * -1) var(--space-4);
    background: radial-gradient(120% 100% at 0% 0%, rgba(var(--accent-rgb), 0.22), transparent 55%),
                radial-gradient(120% 100% at 100% 100%, rgba(168, 85, 247, 0.18), transparent 55%),
                var(--color-surface);
    border: 1px solid var(--color-border);
}

@media (min-width: 768px) {
    .hero {
        margin: calc(var(--space-4) * -1) calc(var(--space-4) * -1) var(--space-4);
    }
}

.hero-glow {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.45;
    pointer-events: none;
    animation: hero-float 14s ease-in-out infinite;
}

.hero-glow-1 {
    width: 200px;
    height: 200px;
    top: -70px;
    left: -50px;
    background: var(--color-accent);
}

.hero-glow-2 {
    width: 160px;
    height: 160px;
    bottom: -60px;
    right: -30px;
    background: var(--color-accent-pink);
    animation-delay: -7s;
}

.hero-glow-3 {
    width: 140px;
    height: 140px;
    top: 40%;
    right: 10%;
    background: var(--color-accent-cyan);
    opacity: 0.3;
    animation-delay: -3s;
}

@keyframes hero-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(18px, -14px) scale(1.12); }
}

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

.hero-cover-grid {
    position: absolute;
    inset: -10% -10%;
    z-index: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    grid-auto-rows: 100px;
    gap: 6px;
    transform: rotate(-3deg) scale(1.15);
}

.hero-cover-tile {
    background-size: cover;
    background-position: center;
    border-radius: 6px;
    filter: saturate(1.05);
}

.hero-cover-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, rgba(11, 9, 24, 0.62) 0%, rgba(11, 9, 24, 0.88) 65%, var(--color-surface) 100%);
}

@media (min-width: 768px) {
    .hero-cover-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        grid-auto-rows: 130px;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent-cyan);
    margin-bottom: var(--space-2);
}

.hero-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin-bottom: var(--space-1);
    background: linear-gradient(90deg, var(--color-text) 0%, var(--color-accent) 55%, var(--color-accent-pink) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
    max-width: 480px;
}

.hero-cta-row {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.hero-cta-row .btn {
    border-radius: 999px;
}

.search-pill {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-pill:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.25), 0 10px 30px rgba(0, 0, 0, 0.35);
}

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

.search-pill .search-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    color: var(--color-text);
    outline: none;
    padding: var(--space-2) 0;
}

.search-pill .search-btn {
    border-radius: 999px;
    white-space: nowrap;
}

.hero-scanner {
    margin-top: var(--space-3);
}

@media (min-width: 768px) {
    .content {
        padding: var(--space-4);
        width: auto;
    }
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--color-success);
}

.invalid {
    outline: 1px solid var(--color-danger);
}

.validation-message {
    color: var(--color-danger);
}

.status-box {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background-color: var(--color-surface);
    border-left: 3px solid var(--color-text-muted);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-3);
}

.status-box.warning { border-left-color: var(--color-warning); }
.status-box.danger { border-left-color: var(--color-danger); }
.status-box.success { border-left-color: var(--color-success); }

.password-strength {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-1);
    margin-bottom: var(--space-2);
}

.password-strength-bar {
    flex: 1;
    height: 4px;
    background-color: var(--color-surface);
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.2s ease;
}

.password-strength-label {
    font-size: 0.75rem;
    min-width: 50px;
}

.strength-Weak { color: var(--color-danger); }
.password-strength-fill.strength-Weak { background-color: var(--color-danger); }
.strength-Fair { color: var(--color-warning); }
.password-strength-fill.strength-Fair { background-color: var(--color-warning); }
.strength-Good { color: var(--color-accent); }
.password-strength-fill.strength-Good { background-color: var(--color-accent); }
.strength-Strong { color: var(--color-success); }
.password-strength-fill.strength-Strong { background-color: var(--color-success); }

.status-success { color: var(--color-success); }
.status-accent { color: var(--color-accent); }

.bar-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) 0;
}

.bar-label {
    width: 4.5rem;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.bar-track {
    flex: 1;
    background-color: var(--color-surface);
    border-radius: var(--radius-sm);
    height: 0.9rem;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background-color: var(--color-accent);
    border-radius: var(--radius-sm);
}

.bar-value {
    width: 2.5rem;
    text-align: right;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.achievement-icon {
    font-size: 1.6rem;
    width: 2.2rem;
    flex-shrink: 0;
    text-align: center;
    color: var(--color-text-muted);
    opacity: 0.4;
}

.achievement-icon-unlocked {
    color: var(--color-accent);
    opacity: 1;
}

.achievement-title {
    font-weight: 600;
}

.scanner-video {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    margin-bottom: var(--space-2);
}

.auth-card {
    max-width: 400px;
    margin: var(--space-4) auto;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.list-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-border);
}

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

.trade-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
}

.trade-condition-badge {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    background-color: var(--color-surface-raised);
    border: 1px solid var(--color-border);
}

.trade-price-badge {
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    background-color: var(--color-accent);
}

.trade-price-badge-tradeonly {
    color: var(--color-accent);
    background-color: rgba(var(--accent-rgb), 0.15);
}

.trade-photo-viewer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.trade-photo-viewer .lightbox-nav {
    background-color: var(--color-surface);
    color: var(--color-text);
}

.trade-photo-viewer .lightbox-nav:hover {
    background-color: var(--color-border);
}

.trade-photo-viewer-image {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 320px;
    max-height: 320px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    cursor: pointer;
}

/* Gezoomter Spielbild-Ausschnitt (GameImage): der Rahmen trägt die Größen-/Form-Klasse
   (.thumb, .poster-img, ...) und schneidet das um den Fokuspunkt skalierte Bild ab.
   Steht vor diesen Klassen, damit deren Breite/Höhe Vorrang hat. */
.img-zoom-frame {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.img-zoom-frame > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background-color: var(--color-surface);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: var(--space-3);
}

.profile-header .profile-header-name {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    margin-top: var(--space-2);
    margin-bottom: var(--space-1);
}

.profile-header-edit {
    font-size: 0.8em;
}

.profile-achievement-strip {
    display: flex;
    gap: var(--space-2);
    font-size: 1.3rem;
    color: var(--color-accent);
    margin-top: var(--space-1);
}

.profile-friend-actions {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.btn-icon-edit {
    background: none;
    border: none;
    color: var(--color-text-muted);
    padding: 0 var(--space-1);
    font-size: 0.85em;
    cursor: pointer;
    vertical-align: middle;
    text-decoration: none;
    display: inline-flex;
}

.btn-icon-edit:hover {
    color: var(--color-accent);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-3);
}

.badge-group {
    display: inline-block;
    margin-left: var(--space-2);
    padding: 1px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-accent);
    background-color: rgba(var(--accent-rgb), 0.15);
    border-radius: 999px;
    vertical-align: middle;
}

.list-row-lent {
    opacity: 0.55;
}

.badge-lent {
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-danger);
    border: 1px solid var(--color-danger);
    border-radius: var(--radius-sm);
    transform: rotate(-8deg);
    flex-shrink: 0;
}

.modal-box {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    max-width: 360px;
    width: 100%;
}

.modal-box-lg {
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
}

.lightbox-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: var(--space-3);
}

.lightbox-content {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    max-width: 100%;
    min-width: 0;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    min-width: 0;
    border-radius: var(--radius-md);
    object-fit: contain;
}

.lightbox-nav {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox-nav:hover {
    background-color: rgba(255, 255, 255, 0.22);
}

.lightbox-counter {
    margin-top: var(--space-2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.clickable-thumb {
    cursor: pointer;
}

.rsvp-toggle {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    border-radius: var(--radius-pill);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.rsvp-option {
    flex: 1 1 auto;
    min-width: 0;
    padding: var(--space-2) var(--space-3);
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.rsvp-option.active {
    background-color: var(--color-accent);
    color: #fff;
}

.tab-strip {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    border-radius: var(--radius-pill);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tab-strip::-webkit-scrollbar {
    display: none;
}

.tab-option {
    flex: 0 0 auto;
    padding: var(--space-2) var(--space-3);
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
    cursor: pointer;
    border-radius: var(--radius-pill);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.tab-option.active {
    background-color: var(--color-accent);
    color: #fff;
}

.group-image {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--color-surface);
}

.more-menu {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.more-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
}

.more-menu-item:hover {
    background-color: var(--color-surface-raised);
}

.more-menu-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.nav-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background-color: var(--color-danger);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

@media (min-width: 768px) {
    .more-menu {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .more-menu-item {
        flex: 0 0 auto;
    }
}

.dice-rating {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.dice-rating button {
    background: none;
    border: none;
    padding: 0;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color 0.15s ease, transform 0.1s ease;
}

.dice-rating button.active {
    color: var(--color-accent);
    transform: scale(1.1);
}

.picker-row {
    cursor: pointer;
}

.picker-row .form-check-input {
    flex-shrink: 0;
    margin-left: auto;
}

.invite-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
}

.staged-chip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: var(--space-1) 0;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: flex-end;
    margin-top: var(--space-3);
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--color-surface);
    flex-shrink: 0;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-2);
    min-width: 0;
}

.section-head h2 {
    margin-bottom: 0;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.section-head .section-see-all {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    flex-shrink: 0;
    margin-left: var(--space-2);
}

.rail-wrap {
    position: relative;
    min-width: 0;
    max-width: 100%;
    margin-bottom: var(--space-4);
}

.rail {
    display: flex;
    gap: var(--space-3);
    overflow-x: auto;
    overflow-y: visible;
    padding: 2px 2px var(--space-2);
    scrollbar-width: none;
    cursor: grab;
    min-width: 0;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.rail::-webkit-scrollbar {
    display: none;
}

.rail.rail-dragging {
    cursor: grabbing;
    user-select: none;
}

/* No `.rail.rail-dragging a { pointer-events: none }` here on purpose - rail.js sets
   .rail-dragging synchronously on every mousedown, before it's known whether the user is
   actually dragging or just clicking. Disabling pointer-events on the link at that point makes
   the browser's own mouseup hit-test land on this container instead of the link, so the
   resulting click event never reaches the link at all - breaking every single click, not just
   ones that turn into drags. rail.js's own capture-phase click handler already suppresses
   navigation correctly for actual drags (checks a `moved` distance threshold), so this CSS rule
   was redundant on top of being broken. */

.rail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--color-surface-raised);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.rail-wrap:hover .rail-nav {
    opacity: 1;
}

.rail-nav-prev {
    left: -8px;
}

.rail-nav-next {
    right: -8px;
}

@media (max-width: 640px) {
    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .section-head .section-see-all {
        margin-left: 0;
    }

    .rail-nav {
        display: none;
    }
}

.poster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.poster-card {
    flex: 0 0 140px;
    display: block;
    text-decoration: none;
    color: inherit;
}

.poster-card .poster-img {
    width: 140px;
    height: 210px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background-color: var(--color-surface);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease;
}

.poster-card:hover .poster-img {
    transform: translateY(-3px) scale(1.03);
}

.poster-card .poster-title {
    margin-top: var(--space-2);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.poster-card .poster-meta {
    margin-top: 2px;
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

@media (max-width: 640px) {
    .poster-grid {
        display: flex;
        flex-direction: column;
        gap: var(--space-4);
    }

    .poster-grid .poster-card {
        flex: none;
        width: 100%;
    }

    .poster-grid .poster-img {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .poster-grid .poster-title {
        font-size: 1.05rem;
    }

    .poster-grid .poster-meta {
        font-size: 0.85rem;
    }
}

.poster-card {
    position: relative;
}

.drag-handle-btn {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(11, 9, 24, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: none;
    z-index: 2;
}

.wishlist-item-dragging {
    opacity: 0.85;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
    z-index: 3;
}

.wishlist-item-placeholder {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    background: transparent;
    box-shadow: none;
}

.avatar-tile {
    position: relative;
    flex: 0 0 78px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.avatar-tile .avatar {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.avatar-tile-name {
    font-size: 0.78rem;
    font-weight: 600;
    max-width: 78px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avatar-tile-meta {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}


.avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f0f10;
    font-weight: 600;
}

.list-row .info {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.compare-row-game {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-border);
}

.compare-row-game:last-child {
    border-bottom: none;
}

.compare-header-game {
    font-weight: 600;
    padding-bottom: var(--space-2);
}

.compare-title-cell {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.compare-title-cell span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compare-check-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    text-align: center;
}

.rsvp-table-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-border);
}

.rsvp-table-row:last-child {
    border-bottom: none;
}

.rsvp-table-header {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.wishlist-row {
    cursor: default;
}

.wishlist-row .drag-handle {
    cursor: grab;
    flex-shrink: 0;
}

.wishlist-row.dragging {
    opacity: 0.4;
}

.cover {
    display: block;
    margin: 0 auto;
    max-width: 240px;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: var(--radius-lg);
    object-fit: cover;
    background-color: var(--color-surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.focal-picker-viewport {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
}

.focal-picker-image {
    display: block;
    width: 260px;
    height: 260px;
    object-fit: cover;
    cursor: crosshair;
    transition: transform 0.15s ease, transform-origin 0.15s ease, object-position 0.15s ease;
}

/* Fokuspunkt-Markierung: sitzt immer auf dem gespeicherten Punkt, auch wenn ein
   (fast) quadratisches Bild im quadratischen Rahmen nicht verschoben werden kann. */
.focal-picker-marker {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px rgba(11, 9, 24, 0.6);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    transition: left 0.15s ease, top 0.15s ease;
}

/* Vorschau im Format des Titelbilds (breit), wo sich der Ausschnitt am stärksten auswirkt */
.focal-picker-preview {
    width: 260px;
    aspect-ratio: 2 / 1;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
}

.focal-picker-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.focal-nudge-btn {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background-color: rgba(11, 9, 24, 0.55);
    color: #fff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.focal-nudge-btn:hover {
    background-color: rgba(11, 9, 24, 0.8);
}

.focal-nudge-top {
    top: var(--space-2);
    left: 50%;
    transform: translateX(-50%);
}

.focal-nudge-bottom {
    bottom: var(--space-2);
    left: 50%;
    transform: translateX(-50%);
}

.focal-nudge-left {
    left: var(--space-2);
    top: 50%;
    transform: translateY(-50%);
}

.focal-nudge-right {
    right: var(--space-2);
    top: 50%;
    transform: translateY(-50%);
}

.focal-picker-zoom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.focal-picker-zoom .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

a.list-row,
.list-row .info-link {
    color: inherit;
    text-decoration: none;
}

a.list-row {
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-2);
    margin: 0 calc(var(--space-2) * -1);
    transition: background-color 0.15s ease, transform 0.15s ease;
}

a.list-row:hover {
    background-color: var(--color-surface);
    transform: translateX(2px);
}

a.list-row:hover .thumb {
    transform: scale(1.04);
}

.list-row .info-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex: 1;
    min-width: 0;
}

.priority-input {
    width: 4rem;
    flex-shrink: 0;
}

/* Marks a search hit that only exists on BoardGameGeek so far. */
.bgg-badge {
    display: inline-block;
    margin-left: var(--space-1);
    padding: 0 6px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    color: var(--color-text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    vertical-align: middle;
}

/* Credit and link back to BoardGameGeek, required by its XML API terms. */
.bgg-attribution {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    text-decoration: none;
}

.bgg-attribution:hover {
    color: var(--color-accent);
}

.bgg-attribution .bi {
    font-size: 0.7em;
}

.bgg-attribution .bgg-logo {
    width: auto;
    height: 28px;
    border-radius: 4px;
    opacity: 0.85;
}

.bgg-attribution:hover .bgg-logo {
    opacity: 1;
}

.app-footer {
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

/* The chat thread docks itself to the viewport (.chat-page), so there is no page end to put
   the footer at - it would only show through behind the messages. */
.content:has(.chat-page) .app-footer {
    display: none;
}

.list-row .meta {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    overflow-wrap: anywhere;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.suggest-cta-wrap {
    display: flex;
    justify-content: center;
    margin: var(--space-4) 0;
}

.suggest-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.85rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-pink) 100%);
    border: none;
    border-radius: var(--radius-pill);
    box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.suggest-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.45);
    color: #fff;
}

.suggest-cta i {
    font-size: 1.15rem;
}

.suggest-cta-secondary {
    background: linear-gradient(90deg, var(--color-accent-cyan) 0%, var(--color-accent) 100%);
    box-shadow: 0 6px 20px rgba(79, 107, 255, 0.3);
}

.suggest-cta-secondary:hover {
    box-shadow: 0 8px 24px rgba(79, 107, 255, 0.4);
}

.discover-step-counter {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: var(--space-3);
}

.discover-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: center;
    margin-bottom: var(--space-4);
}

.discover-chip {
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-pill);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.discover-chip:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.discover-chip.active {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

.discover-wizard-actions {
    display: flex;
    justify-content: space-between;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.chat-last-message {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge-pill {
    flex-shrink: 0;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background-color: var(--color-accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-page {
    /* Docked directly to the bottom nav/composer instead of relying on page-level
       scrolling: the message list gets its own bounded, internally-scrolling box, so
       there is no document scroll for the back button/name/composer to be scrolled
       away from, and no way for a message to render underneath them. */
    position: fixed;
    top: 3.5rem;
    bottom: 68px;
    left: 0;
    right: 0;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 var(--space-3);
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .chat-page {
        left: 220px;
        bottom: 0;
    }
}

.chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-2) 0;
}

.chat-bubble {
    max-width: 75%;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    overflow-wrap: anywhere;
}

.chat-bubble-mine {
    align-self: flex-end;
    background-color: var(--color-accent);
    color: #fff;
}

.chat-bubble-time {
    display: block;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.chat-bubble-mine .chat-bubble-time {
    color: rgba(255, 255, 255, 0.75);
}

.chat-footer {
    flex-shrink: 0;
    padding: var(--space-2) 0;
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.chat-footer-context {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    font-size: 0.8rem;
    color: var(--color-text-muted);
    min-width: 0;
}

.chat-footer-name {
    font-weight: 600;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.chat-footer-topic {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.chat-composer {
    display: flex;
    gap: var(--space-2);
}


/* ---------- Ludothek-Theme (violett, nach Mockup) ---------- */
body {
    background:
        radial-gradient(80vw 60vh at 0% 0%, var(--color-bg-glow-1), transparent 60%),
        radial-gradient(70vw 60vh at 100% 100%, var(--color-bg-glow-2), transparent 60%),
        var(--color-bg);
    background-attachment: fixed;
    min-height: 100vh;
}

.btn {
    border-radius: var(--radius-md);
    padding: 0.65rem 1.2rem;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn-sm {
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.8rem;
}

.btn:active { transform: scale(0.98); }

.btn-primary,
.btn-primary:disabled {
    background: var(--gradient-primary);
    border: none;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background: var(--gradient-primary-hover) !important;
    box-shadow: 0 8px 28px rgba(var(--accent-rgb), 0.5);
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-secondary {
    background-color: var(--color-surface-raised);
    border: 1px solid var(--color-border-strong);
    color: var(--color-text);
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-secondary:hover {
    background-color: rgba(var(--accent-rgb), 0.18);
    border-color: var(--color-accent);
    color: var(--color-text);
}

.btn-outline-danger {
    background-color: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.45);
    color: var(--color-danger);
}

.btn-danger-soft {
    background-color: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: var(--color-danger);
}

.btn-danger-soft:hover {
    background-color: rgba(248, 113, 113, 0.22);
    color: #fff;
}

.btn:focus-visible, .form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.35);
    border-color: var(--color-accent);
}

.form-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.form-control, .form-select {
    background-color: rgba(22, 19, 48, 0.85);
    border-color: var(--color-border-strong);
    color: var(--color-text);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.85rem;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23a39fc4' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.form-select:focus { background-color: rgba(22, 19, 48, 0.85); color: var(--color-text); }

.form-check-input {
    background-color: var(--color-surface-raised);
    border-color: var(--color-border-strong);
}

.form-check-input:checked {
    background-color: var(--color-accent-strong);
    border-color: var(--color-accent-strong);
}

.card, .modal-box, .auth-card {
    background: var(--color-surface-gradient);
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 30px rgba(5, 3, 20, 0.35);
}

.card { border-radius: var(--radius-lg); }

.hero {
    background:
        radial-gradient(120% 100% at 0% 0%, rgba(79, 107, 255, 0.28), transparent 55%),
        radial-gradient(120% 100% at 100% 100%, rgba(168, 85, 247, 0.30), transparent 55%),
        var(--color-surface);
    border-color: var(--color-border-strong);
}

h2:not(:first-child) { margin-top: var(--space-4); }

/* Seitenkopf: Zurück-Pfeil + Titel links, Aktionen rechts */
.page-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 40px;
    margin-bottom: var(--space-3);
}

.page-header h1 {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
    font-size: 1.3rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    background-color: var(--color-surface-raised);
    border: 1px solid var(--color-border-strong);
    color: var(--color-text);
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
    background-color: rgba(var(--accent-rgb), 0.18);
    border-color: var(--color-accent);
    color: var(--color-text);
}

.icon-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #fff;
}

.icon-btn-sm { width: 32px; height: 32px; font-size: 0.95rem; border-radius: var(--radius-sm); }

.icon-btn-ghost {
    background: none;
    border-color: transparent;
}

.back-btn {
    background: none;
    border: none;
    width: 32px;
    margin-left: -6px;
    font-size: 1.3rem;
}

.back-btn:hover { background: none; color: var(--color-accent); }

/* Segment-Tabs über volle Breite */
.tab-strip,
.rsvp-toggle {
    display: flex;
    width: 100%;
    max-width: 100%;
    margin: 0 0 var(--space-3);
    padding: 4px;
    gap: 4px;
    border-radius: var(--radius-md);
    background-color: rgba(22, 19, 48, 0.85);
    border: 1px solid var(--color-border);
}

.tab-option,
.rsvp-option {
    flex: 1 1 0;
    min-width: max-content;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-align: center;
    text-decoration: none;
}

.tab-option:hover, .rsvp-option:hover { color: var(--color-text); }

.tab-option.active, .rsvp-option.active {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.4);
}

.tab-count { opacity: 0.75; font-weight: 500; }

/* Listen-Zeilen als einzelne Karten */
.list-row,
a.list-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 10px 12px;
    margin: 0 0 var(--space-2);
    background: var(--color-surface-gradient);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: inherit;
}

.list-row:last-child { border-bottom: 1px solid var(--color-border); }

a.list-row:hover {
    background: var(--color-surface-raised);
    border-color: var(--color-border-strong);
    transform: none;
}

.list-row .info { font-weight: 600; font-size: 0.92rem; }
.list-row .info .meta, .list-row .meta { font-weight: 400; font-size: 0.78rem; }
.list-row > .bi-chevron-right { color: var(--color-text-muted); }

.thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(5, 3, 20, 0.5);
}

.avatar { box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.35); }

/* Gruppierte Liste (Einstellungen, Statusblöcke) */
.list-group-card {
    background: var(--color-surface-gradient);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-3);
}

.list-group-card > .group-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 12px 14px;
    color: var(--color-text);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
}

.list-group-card > .group-row + .group-row { border-top: 1px solid var(--color-border); }
a.group-row:hover, button.group-row:hover { background-color: rgba(var(--accent-rgb), 0.08); }
.group-row .group-row-main { flex: 1; min-width: 0; }
.group-row .group-row-sub { display: block; font-size: 0.75rem; color: var(--color-text-muted); }
.group-row .group-row-value { font-size: 0.8rem; color: var(--color-text-muted); }
.group-row > .bi { font-size: 1.05rem; color: var(--color-text-muted); }
.group-row > .bi-chevron-right { font-size: 0.85rem; }

/* Farbige Icon-Kachel */
.icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(79, 107, 255, 0.35), rgba(139, 92, 246, 0.35));
    border: 1px solid var(--color-border-strong);
    color: #fff;
    font-size: 1.25rem;
}

.icon-tile-lg { width: 52px; height: 52px; font-size: 1.5rem; }

/* Kennzahl-Kacheln */
.stat-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.stat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 8px;
    background: var(--color-surface-gradient);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text);
    text-align: center;
}

a.stat-tile:hover { border-color: var(--color-border-strong); color: var(--color-text); }

.stat-tile-value {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.stat-tile-label {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.stat-tile-accent .stat-tile-value { color: var(--color-accent); }

/* Chips & Badges */
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--space-3);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    background-color: rgba(var(--accent-rgb), 0.14);
    border: 1px solid var(--color-border-strong);
    color: var(--color-text);
    white-space: nowrap;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    border-radius: 6px;
    white-space: nowrap;
    background-color: rgba(var(--accent-rgb), 0.18);
    color: var(--color-accent);
}

.badge-soft.success { background-color: rgba(52, 211, 153, 0.16); color: var(--color-success); }
.badge-soft.warning { background-color: rgba(251, 191, 36, 0.16); color: var(--color-warning); }
.badge-soft.danger { background-color: rgba(248, 113, 113, 0.18); color: var(--color-danger); }
.badge-soft.info { background-color: rgba(79, 107, 255, 0.2); color: #9fb0ff; }
.badge-soft.solid { background: var(--gradient-primary); color: #fff; }

.meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.meta-line .bi { margin-right: 3px; }

.rating-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.rating-line .bi-star-fill { color: var(--color-warning); }
.rating-line strong { color: var(--color-text); }

/* Floating Action Button */
.fab {
    position: fixed;
    right: 20px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 26px rgba(var(--accent-rgb), 0.6);
    z-index: 15;
    text-decoration: none;
}

.fab:hover { color: #fff; filter: brightness(1.1); }

@media (min-width: 768px) {
    .fab { bottom: 28px; right: 28px; }
}

/* Toolbar (Suche + Filter) */
.search-field {
    position: relative;
    margin-bottom: var(--space-3);
}

.search-field > .bi-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
}

.search-field .form-control { padding-left: 40px; }

.toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.toolbar .form-select {
    width: auto;
    min-width: 0;
    flex: 0 1 auto;
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.toolbar-spacer { flex: 1; }

/* Poster-Karten */
.poster-card .poster-img {
    border-radius: var(--radius-md);
    box-shadow: 0 8px 22px rgba(5, 3, 20, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.poster-card .poster-title { font-size: 0.8rem; }

.poster-rail-sm .poster-card { flex-basis: 104px; }
.poster-rail-sm .poster-card .poster-img { width: 104px; height: 140px; }

/* 2-spaltiges Cover-Grid mit Overlay (Sammlung) */
.cover-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

@media (min-width: 560px) {
    .cover-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.cover-tile {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: 0 8px 22px rgba(5, 3, 20, 0.5);
    color: #fff;
    text-decoration: none;
}

.cover-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.cover-tile:hover img { transform: scale(1.04); }
/* Gezoomte Bilder tragen ihren Zoom inline am <img>, daher den Hover-Effekt am Rahmen */
.cover-tile .img-zoom-frame { transition: transform 0.2s ease; }
.cover-tile:hover .img-zoom-frame { transform: scale(1.04); }

.cover-tile-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 28px 10px 8px;
    background: linear-gradient(180deg, transparent, rgba(11, 9, 24, 0.92) 55%);
}

.cover-tile-title {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}

.cover-tile-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 4px;
}

.cover-tile-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
}

.cover-tile-flag {
    position: absolute;
    top: 8px;
    right: 8px;
}

/* Großer Cover-Header (Detail, Profil, Events) */
.media-hero {
    position: relative;
    margin: calc(var(--space-3) * -1) calc(var(--space-3) * -1) var(--space-3);
    height: 240px;
    overflow: hidden;
    background-color: var(--color-surface);
}

.media-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 9, 24, 0.35) 0%, transparent 35%, rgba(11, 9, 24, 0.95) 100%);
    pointer-events: none;
}

.media-hero-actions {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    z-index: 2;
}

.media-hero-actions .icon-btn {
    background-color: rgba(11, 9, 24, 0.6);
    border-color: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(6px);
}

.media-hero-short { height: 150px; }

@media (min-width: 768px) {
    .media-hero {
        margin: 0 0 var(--space-3);
        border-radius: var(--radius-lg);
        height: 300px;
    }
    .media-hero-short { height: 180px; }
}

/* Ergebnis-Cover (Scan) */
.result-cover {
    display: block;
    width: 170px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    margin: 0 auto var(--space-3);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 40px rgba(var(--accent-rgb), 0.35), 0 8px 20px rgba(5, 3, 20, 0.6);
    background-color: var(--color-surface);
}

.status-list .group-row .bi-check-circle-fill { color: var(--color-success); }
.status-list .group-row .bi-heart-fill { color: var(--color-accent-pink); }

/* Schlüssel/Wert-Liste */
.kv-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 16px;
    font-size: 0.85rem;
    margin-bottom: var(--space-3);
}

.kv-list dt { color: var(--color-text-muted); font-weight: 500; }
.kv-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* Scan-Karte auf der Startseite */
.scan-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: 16px;
    margin-bottom: var(--space-4);
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(79, 107, 255, 0.28), transparent 60%),
        radial-gradient(120% 140% at 100% 100%, rgba(168, 85, 247, 0.3), transparent 60%),
        var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-lg);
    color: var(--color-text);
    text-align: left;
    cursor: pointer;
}

.scan-card .icon-tile {
    width: 64px;
    height: 56px;
    font-size: 2rem;
    background: rgba(11, 9, 24, 0.55);
    border: 1px dashed rgba(var(--accent-rgb), 0.7);
    color: var(--color-accent);
}

.scan-card-title { font-weight: 700; }
.scan-card-sub { font-size: 0.8rem; color: var(--color-text-muted); }

.search-row {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.search-row .search-field { flex: 1; margin: 0; }

/* Ranking-Liste */
.rank-num {
    width: 20px;
    flex-shrink: 0;
    font-weight: 700;
    color: var(--color-text-muted);
    text-align: center;
}

/* Fortschritt */
.progress-slim {
    height: 5px;
    border-radius: 999px;
    background-color: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-top: 6px;
}

.progress-slim > span {
    display: block;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 999px;
}

/* Medaillen (Achievements) */
.medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    font-size: 1.2rem;
    color: #fff;
    background: radial-gradient(circle at 35% 30%, #fcd34d, #d97706 70%);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.25), 0 6px 16px rgba(217, 119, 6, 0.35);
}

.medal.locked {
    background: radial-gradient(circle at 35% 30%, #4b4670, #25213f 70%);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
    color: var(--color-text-muted);
}

/* Avatar-Stapel */
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack > * { margin-left: -6px; box-shadow: 0 0 0 2px var(--color-surface); border-radius: 50%; }
.avatar-stack > *:first-child { margin-left: 0; }

/* Diagramm-Karte (Stats) */
.chart-card {
    padding: var(--space-3);
    margin-bottom: var(--space-4);
    background: var(--color-surface-gradient);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.chart-card-label { font-size: 0.8rem; color: var(--color-text-muted); }
.chart-card-value { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; }

.column-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 110px;
    margin-top: var(--space-3);
}

.column-chart > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    min-width: 0;
}

.column-chart .col-bar {
    width: 100%;
    max-width: 22px;
    min-height: 3px;
    border-radius: 4px 4px 2px 2px;
    background: linear-gradient(180deg, #a78bfa, #4f6bff);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.35);
}

.column-chart .col-label {
    font-size: 0.6rem;
    color: var(--color-text-muted);
    margin-top: 4px;
    white-space: nowrap;
}

.bar-track { background-color: rgba(255, 255, 255, 0.06); }
.bar-fill { background: var(--gradient-primary); }

/* Auth / Landing */
.auth-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-height: 300px;
    margin: calc(var(--space-3) * -1) calc(var(--space-3) * -1) var(--space-4);
    padding: var(--space-5) var(--space-3) var(--space-4);
    overflow: hidden;
    text-align: center;
    isolation: isolate;
    background:
        radial-gradient(90% 70% at 50% 25%, rgba(168, 85, 247, 0.45), transparent 70%),
        radial-gradient(60% 50% at 20% 80%, rgba(79, 107, 255, 0.35), transparent 70%),
        var(--color-bg);
}

.auth-hero .hero-cover-grid { opacity: 0.35; }

.auth-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, rgba(11, 9, 24, 0.2) 0%, rgba(11, 9, 24, 0.55) 55%, var(--color-bg) 100%);
}

.auth-hero > * { position: relative; z-index: 1; }

.auth-hero-logo {
    width: 88px;
    height: 88px;
    filter: drop-shadow(0 8px 30px rgba(var(--accent-rgb), 0.8));
    margin-bottom: var(--space-2);
}

.auth-hero-title {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
    text-align: center;
}

.auth-hero-tagline { color: var(--color-text-muted); margin: 0; }

.auth-panel {
    max-width: 400px;
    margin: 0 auto var(--space-4);
}

.auth-footer-link {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: var(--space-3);
}

@media (min-width: 768px) {
    .auth-hero {
        margin: 0 0 var(--space-4);
        border-radius: var(--radius-lg);
    }
}

/* Profil */
.profile-banner {
    position: relative;
    height: 150px;
    margin: calc(var(--space-3) * -1) calc(var(--space-3) * -1) 0;
    background:
        radial-gradient(80% 90% at 20% 20%, rgba(79, 107, 255, 0.5), transparent 70%),
        radial-gradient(80% 90% at 90% 70%, rgba(168, 85, 247, 0.55), transparent 70%),
        var(--color-surface);
    overflow: hidden;
}

.profile-banner .hero-cover-grid { opacity: 0.45; }
.profile-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, var(--color-bg) 100%);
}

.profile-identity {
    position: relative;
    margin-top: -40px;
    z-index: 1;
    margin-bottom: var(--space-3);
}

.profile-identity .avatar {
    box-shadow: 0 0 0 3px var(--color-bg), 0 0 0 5px rgba(var(--accent-rgb), 0.7);
}

.profile-name { font-size: 1.3rem; font-weight: 800; margin: var(--space-2) 0 0; }
.profile-handle { font-size: 0.85rem; color: var(--color-text-muted); }

.profile-stats {
    display: flex;
    gap: var(--space-4);
    margin: var(--space-3) 0;
}

.profile-stats > div { display: flex; flex-direction: column; }
.profile-stats strong { font-size: 1.15rem; font-weight: 800; }
.profile-stats span { font-size: 0.72rem; color: var(--color-text-muted); }

@media (min-width: 768px) {
    .profile-banner { margin: 0; border-radius: var(--radius-lg); }
    .profile-identity { padding: 0 var(--space-3); }
}

/* Mehr-Menü als Kartenliste */
.more-menu { gap: var(--space-2); }

.more-menu-item {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--color-surface-gradient);
    font-weight: 600;
}

.more-menu-item::after {
    content: "\F285";
    font-family: bootstrap-icons;
    margin-left: auto;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.more-menu-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(79, 107, 255, 0.3), rgba(139, 92, 246, 0.3));
    color: #fff;
}

@media (min-width: 768px) {
    .more-menu { flex-direction: column; }
}

.suggest-cta {
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    padding: 0.75rem 1.4rem;
}

.suggest-cta-secondary {
    background: var(--color-surface-raised);
    border: 1px solid var(--color-border-strong);
    box-shadow: none;
}

.discover-chip.active { background: var(--gradient-primary); border-color: transparent; }

.chat-bubble { background-color: var(--color-surface-raised); border: 1px solid var(--color-border); }
.chat-bubble-mine { background: var(--gradient-primary); border: none; }
.chat-footer { background-color: transparent; }

.nav-badge, .badge-pill {
    background: var(--gradient-primary);
    color: #fff;
}

.nav-badge { background: #ef4461; }

.status-accent { color: var(--color-accent); }

.status-box {
    background: var(--color-surface-gradient);
    border: 1px solid var(--color-border);
    border-left-width: 3px;
}

.modal-backdrop { background-color: rgba(6, 4, 18, 0.7); backdrop-filter: blur(4px); }
.modal-box { border-radius: var(--radius-lg); }

.text-accent { color: var(--color-accent) !important; }
.muted-small { font-size: 0.78rem; color: var(--color-text-muted); }

::selection { background: rgba(var(--accent-rgb), 0.45); }

* { scrollbar-color: rgba(var(--accent-rgb), 0.35) transparent; }

@media (max-width: 640px) {
    .section-head { flex-direction: row; align-items: baseline; }
    .section-head .section-see-all { margin-left: var(--space-2); }
}

.section-head .section-see-all { color: var(--color-accent); font-weight: 600; }
.section-head h2 { margin-top: 0 !important; }

.home-cta-row .btn { font-size: 0.85rem; white-space: nowrap; padding-left: 0.6rem; padding-right: 0.6rem; }

/* Wunschliste als Kartenliste (Drag-Reihenfolge bleibt) */
.wishlist-list { display: flex; flex-direction: column; gap: var(--space-2); }

.wishlist-card.poster-card {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 10px 12px;
    background: var(--color-surface-gradient);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.wishlist-card.poster-card:hover { border-color: var(--color-border-strong); }
.wishlist-card .thumb { width: 52px; height: 52px; }
.wishlist-card .info { flex: 1; min-width: 0; }
.wishlist-card-title { font-weight: 600; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wishlist-card .badge-soft { display: inline-flex; }

.wishlist-card .drag-handle-btn {
    position: static;
    background: none;
    border: none;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.wishlist-card-rank { font-size: 0.75rem; color: var(--color-text-muted); flex-shrink: 0; }
.wishlist-item-placeholder.poster-card { min-height: 60px; }

/* Spiel-Detail */
.game-title { font-size: 1.5rem; margin: 0 0 4px !important; }

.game-description {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    font-size: 0.88rem;
    line-height: 1.55;
}

.game-description.expanded { display: block; }
.tab-strip-scroll { overflow-x: auto; scrollbar-width: none; }
.tab-strip-scroll .tab-option { flex: 0 0 auto; }
.wishlist-card.poster-card { flex: none; }
.wishlist-card .meta { font-size: 0.78rem; color: var(--color-text-muted); }

.card .card-body > h2, .card .h5 { font-size: 1rem; font-weight: 700; }
.card .h6, .card h3 { font-size: 0.88rem; font-weight: 700; }
.card-body { padding: var(--space-3); }

.input-group-text {
    background-color: var(--color-surface-raised);
    border-color: var(--color-border-strong);
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.input-group > .form-control, .input-group > .btn, .input-group > .input-group-text { border-radius: 0; }
.input-group > :first-child { border-top-left-radius: var(--radius-md) !important; border-bottom-left-radius: var(--radius-md) !important; }
.input-group > :last-child { border-top-right-radius: var(--radius-md) !important; border-bottom-right-radius: var(--radius-md) !important; }

/* Datums-Kachel (Events) */
.date-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 52px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    background: linear-gradient(160deg, rgba(79, 107, 255, 0.35), rgba(139, 92, 246, 0.35));
    border: 1px solid var(--color-border-strong);
    line-height: 1.05;
}

.date-tile-day { font-size: 1.15rem; font-weight: 800; }
.date-tile-month { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--color-text-muted); }

.modal-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    margin: calc(var(--space-4) * -1) calc(var(--space-4) * -1) var(--space-3);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background:
        radial-gradient(80% 120% at 20% 20%, rgba(79, 107, 255, 0.55), transparent 70%),
        radial-gradient(80% 120% at 85% 80%, rgba(168, 85, 247, 0.6), transparent 70%),
        var(--color-surface-raised);
    font-size: 2.6rem;
    color: rgba(255, 255, 255, 0.9);
}

.list-row .meta .bi { font-size: 0.75rem; }
.event-hero {
    background:
        radial-gradient(80% 120% at 15% 20%, rgba(79, 107, 255, 0.55), transparent 70%),
        radial-gradient(80% 120% at 85% 80%, rgba(168, 85, 247, 0.6), transparent 70%),
        var(--color-surface-raised);
}
.event-hero img { opacity: 0.55; }

.chat-row .info { font-size: 0.92rem; }
.chat-row-avatar { position: relative; flex-shrink: 0; }
.chat-row-avatar .thumb { width: 44px; height: 44px; }
.chat-row-avatar-badge { position: absolute; right: -4px; bottom: -4px; border-radius: 50%; box-shadow: 0 0 0 2px var(--color-surface); }
.text-body { color: var(--color-text) !important; }
.list-row .info-link .info { font-weight: 600; }
.list-row .avatar-stack { display: flex; }

.achievement-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--color-success);
    color: #062a1e;
    font-weight: 700;
}

.wrapped-card {
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(79, 107, 255, 0.3), transparent 60%),
        radial-gradient(120% 140% at 100% 100%, rgba(168, 85, 247, 0.35), transparent 60%),
        var(--color-surface);
}

.auth-card {
    margin-top: 0;
    padding: var(--space-4) var(--space-3);
    border-radius: var(--radius-lg);
}

.auth-card-title { font-size: 1.15rem; text-align: center; margin-bottom: var(--space-3) !important; }

.auth-hero-compact { min-height: 190px; padding-top: var(--space-4); }
.auth-hero-compact .auth-hero-logo { width: 56px; height: 56px; }
.auth-hero-compact .auth-hero-title { font-size: 1.7rem; }

.auth-hero > .hero-cover-grid { position: absolute; z-index: 0; }
.auth-hero > .hero-cover-grid ~ * { z-index: 1; }
.tab-count { margin-left: 3px; }

/* ---- Barcode assignment (Schnellcheck) and admin barcode maintenance ---- */

.barcode-assign-panel {
    background: var(--color-surface-gradient);
    border: 1px solid rgba(251, 191, 36, 0.45);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
}

.barcode-assign-pair {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.barcode-assign-pair > .bi-arrow-right {
    font-size: 1.3rem;
    color: var(--color-text-muted);
}

.barcode-assign-game {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.barcode-code {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    overflow-wrap: anywhere;
}

.barcode-assign-check {
    display: flex;
    gap: var(--space-2);
    align-items: flex-start;
    cursor: pointer;
}

.barcode-assign-check .form-check-input {
    flex: 0 0 auto;
    margin-top: 3px;
}

.barcode-edit-row {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-2);
}

.barcode-edit-row .form-control {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    flex: 1;
    min-width: 10rem;
}
