/* Modern, Clean & Accessible CSS for Event Chat & Connect (100% Local, DSGVO-compliant) */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --success: #16a34a;
    --success-light: #f0fdf4;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* App Header */
.app-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-weight: bold;
    font-size: 1.1rem;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.user-status-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    border: 1px solid #bfdbfe;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.avatar-mini {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-main);
    font-size: 0.8rem;
}

.stat-pill {
    background: #f1f5f9;
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Navigation Tabs */
.nav-tabs {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.nav-tabs-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.badge-count {
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    padding: 2px 7px;
    border-radius: 9999px;
    font-weight: bold;
}

/* Main Container */
.main-container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 20px;
}

.view-section {
    display: none;
}

.view-section.active {
    display: block;
}

/* Cards & Layout */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Chat Layout */
.chat-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.chat-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    height: 520px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #fbfcfe;
}

.message-item {
    display: flex;
    gap: 12px;
    max-width: 85%;
}

.message-item.own {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-bubble {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.message-item.own .message-bubble {
    background: var(--primary-light);
    border-color: #bfdbfe;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 0.8rem;
}

.message-author {
    font-weight: 700;
    color: var(--text-main);
}

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

.message-status-tag {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 600;
}

.tag-pending {
    background: var(--warning-light);
    color: var(--warning);
    border: 1px solid #fde68a;
}

.tag-approved {
    background: var(--success-light);
    color: var(--success);
    border: 1px solid #bbf7d0;
}

.tag-ai {
    background: #f3e8ff;
    color: #7e22ce;
    border: 1px solid #e9d5ff;
}

.tag-rejected {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid #fecaca;
}

.message-content {
    font-size: 0.95rem;
    word-break: break-word;
}

.rejection-reason {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--danger);
    font-style: italic;
    background: #fff1f2;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.chat-input-bar {
    padding: 16px;
    background: #ffffff;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input-bar textarea {
    flex: 1;
    resize: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    height: 48px;
    line-height: 1.4;
    transition: border-color 0.2s;
}

.chat-input-bar textarea:focus {
    border-color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #15803d;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text-main);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--primary);
}

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

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
}

.checkbox-group input {
    margin-top: 4px;
    accent-color: var(--primary);
}

/* Networking & Voting Grid */
.networking-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

.attendee-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #ffffff;
    margin-bottom: 10px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.attendee-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.attendee-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.attendee-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.attendee-code {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
}

.mutual-badge {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 3px 8px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Leaderboard Table */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th {
    text-align: left;
    padding: 10px 14px;
    background: #f8fafc;
    border-bottom: 2px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.leaderboard-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
}

.rank-1 { background: #fef08a; color: #854d0e; }
.rank-2 { background: #e2e8f0; color: #475569; }
.rank-3 { background: #fed7aa; color: #9a3412; }
.rank-default { background: #f1f5f9; color: var(--text-muted); }

/* Moderator Queue Items */
.queue-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 14px;
    background: #ffffff;
}

.queue-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.queue-content {
    font-size: 1rem;
    background: #f8fafc;
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
}

.queue-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.avatar-queue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.avatar-queue-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
    background: #ffffff;
}

.avatar-preview-img {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    object-fit: cover;
    margin: 0 auto 10px;
    border: 2px solid var(--border);
}

/* Modals & Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-info {
    background: var(--primary-light);
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.alert-success {
    background: var(--success-light);
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.alert-warning {
    background: var(--warning-light);
    border: 1px solid #fde68a;
    color: #b45309;
}

.timer-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

/* ====================================================
   QR-Code System: Large 30s Chat-Cover & Always-Visible Small Widget
   ==================================================== */

/* Chat box needs relative positioning for the cover overlay */
.chat-box {
    position: relative;
}

/* 1. Large 30s Overlay (Covering the Chat) */
.qr-large-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    padding: 24px;
    border-radius: inherit;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.qr-large-card {
    background: #ffffff;
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.5);
    display: inline-block;
    margin: 14px 0;
    cursor: pointer;
    transition: transform 0.2s;
}

.qr-large-card:hover {
    transform: scale(1.02);
}

.qr-large-img {
    width: 240px;
    height: 240px;
    display: block;
    border-radius: var(--radius-md);
}

.qr-overlay-badge {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid #ef4444;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.qr-progress-bar-container {
    width: 260px;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 10px;
}

.qr-progress-bar {
    height: 100%;
    background: #38bdf8;
    width: 100%;
    transition: width 1s linear;
}

/* 2. Small QR Widget (Visible ONLY when viewing chat and large overlay is off) */
.qr-small-widget {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 80;
    background: #ffffff;
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px 10px;
    display: none; /* Strictly hidden by default - only shown in Chat view cycle */
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.qr-small-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.15);
}

.qr-small-img {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-sm);
    display: block;
    background: #ffffff;
}

.qr-small-text {
    font-size: 0.8rem;
    line-height: 1.3;
}

.qr-small-title {
    font-weight: 700;
    color: var(--text-main);
}

.qr-small-timer {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

/* QR Lock Banner in Registration */
.qr-lock-banner {
    background: #fffbeb;
    border: 2px solid #f59e0b;
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.qr-unlocked-banner {
    background: #f0fdf4;
    border: 2px solid #22c55e;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ====================================================
   Real Camera Scanner Modal
   ==================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.modal-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--text-main);
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0 4px;
}

.modal-close-btn:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 18px;
}

.camera-viewport-container {
    position: relative;
    width: 100%;
    height: 260px;
    background: #0f172a;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#camera-video-stream {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-scanner-guide {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-reticle {
    width: 170px;
    height: 170px;
    border: 2px dashed rgba(255, 255, 255, 0.85);
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4);
}

.scanner-laser-line {
    position: absolute;
    width: 170px;
    height: 2px;
    background: #38bdf8;
    box-shadow: 0 0 10px #38bdf8;
    animation: scanLaser 2s infinite ease-in-out;
}

@keyframes scanLaser {
    0%, 100% {
        transform: translateY(-75px);
    }
    50% {
        transform: translateY(75px);
    }
}

.camera-status-text {
    margin-top: 12px;
    text-align: center;
    font-size: 0.85rem;
    min-height: 22px;
    color: var(--text-muted);
    font-weight: 500;
}

.modal-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8fafc;
}

/* ==========================================================================
   THE CONNECTION UNIVERSE (DAS AFTERWORK × THE ART OF LIFE)
   Luxury Dark Bordeaux & Champagne Gold Theme
   ========================================================================== */

:root {
    --univ-bg-gradient: radial-gradient(ellipse at 50% 40%, #342126 0%, #18121a 55%, #090a0f 100%);
    --univ-gold: #c5a270;
    --univ-gold-light: #e4c18d;
    --univ-gold-bright: #ffd899;
    --univ-gold-glow: rgba(228, 193, 141, 0.45);
    --univ-card-bg: rgba(26, 20, 27, 0.85);
    --univ-border: rgba(197, 162, 112, 0.35);
    --univ-text: #f7efe4;
    --univ-text-muted: #c4b5a2;
}

.universe-container {
    background: var(--univ-bg-gradient);
    border: 1px solid var(--univ-border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    color: var(--univ-text);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), inset 0 0 80px rgba(52, 33, 38, 0.5);
    margin-bottom: 25px;
}

.universe-hud {
    position: absolute;
    top: 14px;
    left: 18px;
    right: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(18, 14, 20, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid var(--univ-border);
    border-radius: var(--radius-md);
    padding: 10px 18px;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.universe-title-tag {
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--univ-gold-light);
    font-weight: 700;
}

.universe-stat-quote {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--univ-text);
    letter-spacing: 0.5px;
}

.universe-stat-quote strong {
    color: var(--univ-gold-bright);
    text-shadow: 0 0 10px var(--univ-gold-glow);
}

.universe-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 540px;
    cursor: grab;
}

/* Visible Board Floating Badges & Dock */
.universe-title-badge {
    position: absolute;
    top: 18px;
    left: 20px;
    z-index: 10;
    pointer-events: none;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--univ-gold-light);
}

.universe-sub-badge {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-top: 2px;
}

.universe-live-pill {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 10;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.74rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(6px);
}

.universe-live-pill .live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.universe-stats-dock {
    position: absolute;
    bottom: 18px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    z-index: 10;
    pointer-events: none;
}

.univ-stat-card {
    background: rgba(15, 18, 26, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 10px 18px;
    flex: 1;
    max-width: 140px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
}

.univ-stat-card:last-child {
    margin-left: auto;
}

.univ-stat-label {
    font-size: 0.65rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 3px;
}

.univ-stat-num {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.universe-action-bar {
    display: flex;
    gap: 12px;
    padding: 14px 18px 6px 18px;
    background: rgba(22, 16, 22, 0.95);
    flex-wrap: wrap;
}

.btn-universe-control {
    background: #2b1f24;
    color: #e2e8f0;
    border: 1px solid rgba(197, 162, 112, 0.35);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-universe-control:hover {
    background: #3c2932;
    border-color: var(--univ-gold);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-universe-control.highlight {
    background: #38242b;
    border-color: var(--univ-gold);
    color: var(--univ-gold-light);
    box-shadow: 0 0 12px rgba(197, 162, 112, 0.25);
}

.btn-universe-control.highlight:hover {
    background: #4a2f38;
    box-shadow: 0 0 18px rgba(197, 162, 112, 0.45);
}

.universe-caption-text {
    font-size: 0.82rem;
    color: #94a3b8;
    padding: 0 18px 12px 18px;
    background: rgba(22, 16, 22, 0.95);
}

.universe-tv-qr {
    position: absolute;
    top: 76px;
    right: 16px;
    background: rgba(26, 18, 25, 0.88);
    border: 1px solid var(--univ-border);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    z-index: 10;
    backdrop-filter: blur(8px);
}

.universe-tv-qr img {
    display: block;
    margin: 0 auto;
}

.universe-canvas-wrapper:active {
    cursor: grabbing;
}

.universe-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.universe-bottom-bar {
    background: rgba(18, 14, 20, 0.88);
    border-top: 1px solid var(--univ-border);
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    position: relative;
    z-index: 10;
}

.mission-bar-container {
    flex: 1;
    min-width: 250px;
}

.mission-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--univ-gold-light);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mission-bar-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.mission-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #b89b6a, #e4c18d, #ffd899);
    border-radius: 999px;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 12px rgba(228, 193, 141, 0.8);
}

.btn-universe-action {
    background: linear-gradient(135deg, #c5a270 0%, #8c6d41 100%);
    color: #1a1219;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    box-shadow: 0 2px 10px rgba(197, 162, 112, 0.3);
    transition: all 0.2s ease;
}

.btn-universe-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(228, 193, 141, 0.5);
    background: linear-gradient(135deg, #e4c18d 0%, #a3814f 100%);
}

/* Secret Match Cards */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 15px;
}

.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #c5a270, #b89b6a);
}

.match-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #c5a270;
}

.match-score-badge {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.match-reasons-list {
    margin: 12px 0;
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.match-reasons-list li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 6px;
    line-height: 1.4;
}

.match-reasons-list li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: #c5a270;
    font-size: 0.8rem;
}

/* Profiling Wizard Pills */
.pill-selector-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 14px;
}

.choice-pill {
    background: #f1f5f9;
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.choice-pill:hover {
    background: #e2e8f0;
}

.choice-pill.active {
    background: #c5a270;
    border-color: #a3814f;
    color: #1a1219;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(197, 162, 112, 0.35);
}

/* Golden Reveal Cinematic Modal */
.golden-reveal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 8, 14, 0.94);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.4s ease-out;
}

.golden-reveal-card {
    background: radial-gradient(ellipse at center, #3d242c 0%, #17111a 70%, #0d0b10 100%);
    border: 2px solid #e4c18d;
    border-radius: 24px;
    max-width: 680px;
    width: 90%;
    padding: 36px 28px;
    text-align: center;
    color: #f7efe4;
    box-shadow: 0 0 60px rgba(228, 193, 141, 0.4), inset 0 0 40px rgba(197, 162, 112, 0.2);
    animation: scaleUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleUp {
    0% { transform: scale(0.85); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.golden-reveal-title {
    font-size: 0.85rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #e4c18d;
    font-weight: 700;
    margin-bottom: 8px;
}

.golden-reveal-headline {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #f7efe4 50%, #e4c18d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 24px;
    line-height: 1.2;
}

.golden-reveal-pair {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 24px 0;
}

.golden-reveal-user {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(228, 193, 141, 0.4);
    border-radius: 16px;
    padding: 18px;
    min-width: 180px;
    flex: 1;
}

.golden-reveal-user-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffd899;
    margin-top: 6px;
}

.golden-reveal-user-role {
    font-size: 0.82rem;
    color: #c4b5a2;
}

.golden-reveal-connector {
    font-size: 2rem;
    color: #e4c18d;
    text-shadow: 0 0 15px rgba(228, 193, 141, 0.8);
    animation: pulseGlow 1.5s infinite alternate;
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1.15); opacity: 1; text-shadow: 0 0 25px rgba(255, 216, 153, 1); }
}

.golden-reveal-quote {
    font-style: italic;
    font-size: 0.95rem;
    color: #e4c18d;
    margin-top: 18px;
    letter-spacing: 0.5px;
}


/* =====================================================================
   THE CONNECTION UNIVERSE · Futuristic Cosmic Luxury UI (Mobile-First)
   DAS AFTERWORK × THE ART OF LIFE
   Deep Obsidian · Velvet Bordeaux · Liquid Champagne Gold · Electric Cyan
   Self-hosted fonts (100% DSGVO-konform).
   ===================================================================== */

/* ---------- Self-hosted typefaces (SIL Open Font License, see /fonts/LICENSE) ---------- */
@font-face { font-family: "Brand Serif"; src: url("/fonts/NotoSerifDisplay-Light.woff") format("woff"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Brand Serif"; src: url("/fonts/NotoSerifDisplay-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Brand Serif"; src: url("/fonts/NotoSerifDisplay-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Brand Serif"; src: url("/fonts/NotoSerifDisplay-LightItalic.woff") format("woff"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Brand Sans"; src: url("/fonts/NotoSans-Light.woff") format("woff"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Brand Sans"; src: url("/fonts/NotoSans-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Brand Sans"; src: url("/fonts/NotoSans-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Brand Sans"; src: url("/fonts/NotoSans-Bold.woff") format("woff"); font-weight: 600 700; font-display: swap; }

/* ---------- Futuristic Cosmic & Velvet Lounge Tokens (Das Afterwork × The Art of Life) ---------- */
:root {
    --cosmos-bg: #070306;
    --cosmos-deep: #0f050b;
    --glass-card: rgba(20, 9, 15, 0.82);
    --glass-card-elevated: rgba(28, 12, 21, 0.92);
    --glass-subtle: rgba(255, 255, 255, 0.04);
    --ink: #fcf8f2;
    --ink-soft: #cbbba8;
    --ivory: #090306;
    --paper: rgba(22, 10, 16, 0.88);
    --line: rgba(228, 193, 141, 0.20);
    --line-strong: rgba(243, 213, 155, 0.38);
    --bordeaux: #9e1b2f;
    --bordeaux-deep: #4d0a14;
    --bordeaux-glow: rgba(175, 24, 46, 0.35);
    --bordeaux-tint: rgba(158, 27, 47, 0.22);
    --gold: #d4af72;
    --gold-light: #f3d59b;
    --gold-bright: #ffe6bd;
    --gold-tint: rgba(212, 175, 114, 0.16);
    --gold-glow: rgba(243, 213, 155, 0.45);
    --cyan-neon: #38bdf8;

    /* Map legacy tokens onto the futuristic dark-glass system */
    --primary: var(--gold);
    --primary-hover: var(--gold-light);
    --primary-light: rgba(212, 175, 114, 0.16);
    --success: #34d399;
    --success-light: rgba(52, 211, 153, 0.14);
    --warning: #fbbf24;
    --warning-light: rgba(251, 191, 36, 0.14);
    --danger: #f87171;
    --danger-light: rgba(248, 113, 113, 0.16);
    --bg-page: var(--cosmos-bg);
    --bg-card: var(--glass-card);
    --bg-card-subtle: rgba(255, 255, 255, 0.05);
    --border: var(--line);
    --text-main: var(--ink);
    --text-muted: var(--ink-soft);

    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 16px 40px -12px rgba(0, 0, 0, 0.72), 0 0 1px 1px rgba(168, 27, 48, 0.12);
    --shadow-lg: 0 28px 68px -16px rgba(0, 0, 0, 0.88), 0 0 32px -8px rgba(168, 27, 48, 0.24);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --font-family: "Brand Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: "Brand Serif", Didot, "Bodoni MT", Georgia, serif;
    --font-script: "Brand Serif", "Brush Script MT", "Apple Chancery", cursive;
    --font-editorial: "Brand Serif", Georgia, serif;

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --header-h: 64px;
    --bottom-nav-h: 72px;
}

/* ---------- Base (Mobile First: 320px+) ---------- */
* { box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    color-scheme: dark;
}
body {
    font-family: var(--font-family);
    font-weight: 400;
    font-size: 16px;
    letter-spacing: 0.01em;
    background-color: #070306;
    background-image:
        radial-gradient(1100px 600px at 15% -5%, rgba(168, 24, 42, 0.24) 0%, transparent 65%),
        radial-gradient(900px 550px at 90% 12%, rgba(135, 15, 30, 0.20) 0%, transparent 60%),
        radial-gradient(800px 520px at 50% 98%, rgba(150, 18, 35, 0.16) 0%, transparent 65%),
        radial-gradient(600px 400px at 85% 65%, rgba(212, 175, 114, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, #090407 0%, #11060d 48%, #060205 100%);
    background-attachment: fixed;
    color: var(--ink);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 22px);
    text-rendering: optimizeLegibility;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}
::selection { background: #8c1628; color: #ffe6bd; }
a { color: var(--gold-light); text-decoration-color: rgba(243, 213, 155, 0.35); text-underline-offset: 3px; }
a:hover { color: #fff; text-shadow: 0 0 10px rgba(243, 213, 155, 0.4); }

h1, h2, h3, .card-title, .brand-title, .display {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--ink);
}

.gold-accent { color: var(--gold-light); font-weight: 600; text-shadow: 0 0 8px rgba(243, 213, 155, 0.25); }

/* Cursive / Calligraphy Flourishes (The Social Affair · Das Afterwork Style) */
.brand-script, .script-accent, .landing-script {
    font-family: var(--font-script);
    font-size: 1.35rem;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    color: #fcefd6;
    text-shadow: 0 0 14px rgba(243, 213, 155, 0.4);
    line-height: 1;
}

.brand-sep {
    color: rgba(228, 193, 141, 0.4);
    font-size: 0.75rem;
    vertical-align: middle;
}

.brand-pillars {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.16em;
    font-family: var(--font-display);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--gold-light);
}

.brand-pillar-icon {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 11px;
    vertical-align: middle;
}
.brand-pillar-icon span {
    display: block;
    width: 2.2px;
    background: linear-gradient(180deg, #ffe6bd 0%, #d4af72 100%);
    border-radius: 1px;
    box-shadow: 0 0 4px rgba(243, 213, 155, 0.4);
}
.brand-pillar-icon span:nth-child(1) { height: 7px; }
.brand-pillar-icon span:nth-child(2) { height: 11px; }
.brand-pillar-icon span:nth-child(3) { height: 7px; }

.script-tag {
    font-family: var(--font-script);
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    color: #ffe6bd;
    margin-right: 2px;
    vertical-align: baseline;
}

:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 2px;
    border-radius: 10px;
}

/* ---------- Futuristic Glass Header ---------- */
.app-header {
    background: rgba(13, 10, 20, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 32px -12px rgba(0, 0, 0, 0.6);
    position: sticky;
    top: 0;
    z-index: 60;
}
.header-inner {
    max-width: 1280px;
    min-height: var(--header-h);
    padding: 10px 14px;
    gap: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
    min-width: 0;
}
.brand-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: radial-gradient(circle at 30% 30%, rgba(243, 213, 155, 0.25), rgba(20, 14, 28, 0.9));
    border: 1.5px solid var(--gold);
    border-radius: 50%;
    color: var(--gold-light);
    box-shadow: 0 0 18px rgba(212, 175, 114, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}
.brand-icon svg { width: 20px; height: 20px; }
.brand-title {
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #fcefd6 50%, #d4af72 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand-subtitle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-light);
    font-weight: 600;
    margin-top: 2px;
}

.user-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.user-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line-strong);
    padding: 5px 12px 5px 6px;
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--ink);
    max-width: 165px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.2s var(--ease), transform 0.15s var(--ease);
}
.user-badge:hover { border-color: var(--gold-light); transform: scale(1.02); }
.attendee-code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.78rem;
    color: var(--gold-light);
    background: rgba(212, 175, 114, 0.15);
    border: 1px solid rgba(212, 175, 114, 0.3);
    padding: 3px 9px;
    border-radius: 999px;
}
#header-user-code { display: none; }
.stat-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    color: var(--gold-light);
    font-size: 0.84rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ---------- Navigation (Mobile-First Tactile Neon Dock) ---------- */
.nav-tabs {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 900;
    background: rgba(12, 9, 19, 0.96);
    backdrop-filter: saturate(190%) blur(20px);
    -webkit-backdrop-filter: saturate(190%) blur(20px);
    border-top: 1px solid rgba(228, 193, 141, 0.24);
    border-bottom: none;
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 6px);
    box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.85);
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    will-change: transform;
}
.nav-tabs-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4px 6px;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    gap: 3px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.tab-btn {
    flex: 1 1 0;
    min-width: 0;
    font-family: var(--font-family);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--ink-soft);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 6px 2px 5px;
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    white-space: nowrap;
    position: relative;
    transition: all 0.2s var(--ease);
    touch-action: manipulation;
}
.tab-btn .tab-icon { width: 22px; height: 22px; flex: none; opacity: 0.75; transition: transform 0.2s var(--ease); }
.tab-btn .tab-label-long { display: none; }
.tab-btn .tab-label-short { display: inline; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tab-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.tab-btn.active {
    color: #ffe6bd;
    background: linear-gradient(180deg, rgba(168, 27, 48, 0.38) 0%, rgba(85, 10, 22, 0.25) 100%);
    border: 1px solid rgba(243, 213, 155, 0.42);
    box-shadow: 0 0 18px rgba(168, 27, 48, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.tab-btn.active .tab-icon {
    opacity: 1;
    transform: scale(1.08);
    stroke: #ffe6bd;
    filter: drop-shadow(0 0 6px rgba(243, 213, 155, 0.5));
}
.badge-count {
    background: #ef4444;
    color: #fff;
    position: absolute;
    top: 4px;
    right: 10%;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 800;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.7);
}

/* ---------- Main Layout (Mobile First) ---------- */
.main-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 12px 36px;
    flex: 1;
    width: 100%;
}

.view-section.active { animation: viewEnter 0.35s var(--ease) both; }
@keyframes viewEnter {
    from { opacity: 0; transform: translateY(10px) scale(0.99); }
    to { opacity: 1; transform: none; }
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold-light);
}
.eyebrow::before { content: "✦"; font-size: 0.8rem; color: var(--gold-light); }

/* ---------- Glass Cards (Futuristic & Oversized) ---------- */
.card {
    background: var(--glass-card);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 20px 18px;
    margin-bottom: 18px;
    color: var(--ink);
    transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card-header {
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.card-title { font-size: 1.32rem; font-weight: 500; color: #fff; letter-spacing: 0.02em; }

/* ---------- Oversized Tactile Buttons ("Klick-Modus") ---------- */
.btn {
    font-family: var(--font-family);
    font-weight: 700;
    font-size: 0.94rem;
    letter-spacing: 0.04em;
    border-radius: 16px;
    padding: 13px 22px;
    min-height: 50px;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s var(--ease);
    position: relative;
    touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; min-height: 40px; border-radius: 12px; }
.btn-xl {
    min-height: 60px;
    padding: 16px 28px;
    font-size: 1.06rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 18px;
}
.btn-primary {
    background: linear-gradient(135deg, #a81c32 0%, #580a17 100%);
    color: #fff6e8;
    border: 1px solid rgba(243, 213, 155, 0.35);
    box-shadow: 0 8px 24px -6px rgba(168, 28, 50, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #be223b 0%, #6e0d1d 100%);
    border-color: rgba(243, 213, 155, 0.6);
    box-shadow: 0 12px 28px -6px rgba(190, 34, 59, 0.65), 0 0 16px rgba(243, 213, 155, 0.25);
}
.btn-gold {
    background: linear-gradient(135deg, #fcefd6 0%, #e4c18d 45%, #ba9558 100%);
    color: #160509;
    border: 1px solid rgba(255, 248, 230, 0.6);
    font-weight: 800;
    box-shadow: 0 8px 26px -6px rgba(228, 193, 141, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-gold:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f3d59b 45%, #ca9f5e 100%);
    box-shadow: 0 12px 32px -6px rgba(243, 213, 155, 0.55), inset 0 1px 0 #ffffff;
    transform: translateY(-1px);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
    border-color: var(--line-strong);
}
.btn-secondary:hover {
    background: rgba(212, 175, 114, 0.16);
    border-color: var(--gold-light);
    color: #fff;
}
.btn-success {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    color: #061812;
    font-weight: 800;
    box-shadow: 0 8px 22px -8px rgba(52, 211, 153, 0.6);
}
.btn-danger {
    background: rgba(248, 113, 113, 0.12);
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.4);
}
.btn-danger:hover { background: #ef4444; color: #fff; border-color: #ef4444; }
.btn[disabled], .btn.is-loading { opacity: 0.7; pointer-events: none; }

/* Loading spinner */
.btn.is-loading { color: transparent !important; }
.btn.is-loading::after {
    content: "";
    position: absolute; inset: 0; margin: auto;
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Oversized Futuristic Inputs ---------- */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-light);
}
.form-control, textarea, select {
    width: 100%;
    font-family: var(--font-family);
    background: rgba(12, 9, 19, 0.78);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 16px;
    min-height: 52px;
    color: #fff;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.form-control-xl {
    min-height: 58px;
    font-size: 1.08rem;
    font-weight: 600;
    padding: 15px 18px;
    border-radius: 18px;
}
.form-control:focus, textarea:focus, select:focus {
    outline: none;
    background: rgba(18, 13, 28, 0.95);
    border-color: var(--gold-light);
    box-shadow: 0 0 0 4px rgba(212, 175, 114, 0.22);
}
.form-control::placeholder, textarea::placeholder { color: rgba(185, 168, 155, 0.55); }
input[type="checkbox"] { accent-color: var(--gold); width: 22px; height: 22px; flex-shrink: 0; cursor: pointer; }

/* Tactile Consent Tile */
.consent-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.84rem;
    color: var(--ink-soft);
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
    user-select: none;
}
.consent-tile:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 114, 0.08);
    color: var(--ink);
}

/* Interactive Avatar Orb Trigger on Check-in */
.avatar-tap-zone {
    display: flex;
    justify-content: center;
    margin: 8px 0 18px;
}
.avatar-orb-trigger {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(243, 213, 155, 0.22), rgba(138, 40, 66, 0.28) 60%, rgba(14, 10, 22, 0.95));
    border: 2px dashed var(--gold-light);
    box-shadow: 0 0 30px rgba(212, 175, 114, 0.28), inset 0 0 20px rgba(212, 175, 114, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.avatar-orb-trigger:hover, .avatar-orb-trigger:active {
    transform: scale(1.05);
    border-style: solid;
    border-color: #ffe4b5;
    box-shadow: 0 0 38px rgba(243, 213, 155, 0.5);
}
.avatar-orb-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}
.orb-cam-icon { font-size: 1.85rem; line-height: 1; }
.orb-cam-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gold-light);
}
#avatar-preview-box {
    position: absolute;
    inset: 0;
    z-index: 2;
}
#avatar-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ---------- Responsive Utility Grids ---------- */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 12px;
}
.quick-connect-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.quick-connect-form .btn { width: 100%; }

.subtab-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
    background: rgba(20, 15, 28, 0.75);
    padding: 6px;
    border-radius: 18px;
    border: 1px solid var(--line);
}
.subtab-bar .tab-btn {
    flex-direction: row;
    min-height: 50px;
    padding: 10px 14px;
    font-size: 0.86rem;
    border-radius: 14px;
    justify-content: center;
    white-space: normal;
    text-align: center;
}
.attendees-search-input { width: 100%; max-width: none; }

/* ---------- Alerts & QR Banners ---------- */
.alert {
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
    font-size: 0.88rem;
    padding: 12px 16px;
    margin-bottom: 14px;
}
.alert-info { background: rgba(212, 175, 114, 0.12); border-color: rgba(212, 175, 114, 0.35); }
.qr-lock-banner {
    background: rgba(251, 191, 36, 0.12);
    border: 1.5px solid rgba(251, 191, 36, 0.45);
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.qr-banner-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #fde68a;
}
.qr-unlocked-banner {
    background: rgba(52, 211, 153, 0.14);
    border: 1.5px solid rgba(52, 211, 153, 0.45);
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #6ee7b7;
    font-size: 0.9rem;
}

/* ---------- Interactive Click-Mode Wizard (9 Questions) ---------- */
.wizard-deck-card {
    padding: 22px 18px;
    border: 1px solid rgba(228, 193, 141, 0.3);
}
.wizard-hud {
    margin-bottom: 20px;
}
.wizard-hud-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.wizard-step-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin-top: 2px;
}
.wizard-power-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 14px;
}
.wizard-power-fill {
    height: 100%;
    background: linear-gradient(90deg, #8a2842, #e4c18d, #38bdf8);
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(228, 193, 141, 0.6);
    transition: width 0.35s var(--ease);
}
.wizard-dots {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 6px;
}
.wiz-dot {
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    touch-action: manipulation;
}
.wiz-dot.answered {
    border-color: rgba(52, 211, 153, 0.55);
    color: #6ee7b7;
    background: rgba(52, 211, 153, 0.12);
}
.wiz-dot.active {
    background: linear-gradient(135deg, #f3d59b, #c69a55);
    color: #130d18;
    border-color: #ffe8be;
    transform: scale(1.06);
    box-shadow: 0 0 16px rgba(228, 193, 141, 0.45);
}

.wizard-step {
    display: none;
    animation: viewEnter 0.28s var(--ease) both;
}
.wizard-step.active,
#profiling-form.show-all-steps .wizard-step {
    display: block;
    margin-bottom: 22px;
}

.wiz-question-head {
    margin-bottom: 16px;
}
.wiz-q-num {
    display: inline-block;
    font-family: ui-monospace, monospace;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--gold-light);
    background: rgba(212, 175, 114, 0.16);
    border: 1px solid rgba(212, 175, 114, 0.35);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 6px;
}
.wiz-question-head h3 {
    font-size: clamp(1.35rem, 4.5vw, 1.75rem);
    font-weight: 500;
    color: #fff;
    margin: 4px 0;
}
.wiz-q-hint {
    font-size: 0.8rem;
    color: var(--ink-soft);
}

/* Big Futuristic Tap-Tiles for Profiling Questions */
.pill-selector-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 12px;
}
.choice-pill {
    border: 1.5px solid rgba(228, 193, 141, 0.25);
    background: rgba(255, 255, 255, 0.05);
    color: var(--ink);
    padding: 14px 14px;
    min-height: 58px;
    border-radius: 16px;
    font-size: 0.94rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    transition: all 0.2s var(--ease);
    touch-action: manipulation;
    box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5);
}
.choice-pill:hover {
    border-color: var(--gold-light);
    background: rgba(212, 175, 114, 0.12);
    transform: translateY(-2px);
}
.choice-pill:active { transform: scale(0.96); }
.choice-pill.selected, .choice-pill.active {
    background: linear-gradient(135deg, #f3d59b 0%, #c69a55 100%);
    border-color: #ffe8be;
    color: #130d18;
    font-weight: 800;
    box-shadow: 0 0 24px rgba(228, 193, 141, 0.55);
    transform: translateY(-2px);
}

.optin-tiles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 14px;
}

.wizard-nav-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.wizard-nav-footer .btn { min-width: 130px; }

/* ---------- Secret Match Cards ---------- */
.matches-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 12px;
}
.match-card {
    background: var(--glass-card-elevated);
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.match-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 5px; height: 100%;
    background: linear-gradient(180deg, #ffe4b5, #c69a55, #38bdf8);
}
.match-card:hover { transform: translateY(-3px); border-color: var(--gold-light); }
.match-card-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; margin: 0; color: #fff; }
.match-card-meta { font-size: 0.85rem; color: var(--gold-light); margin-top: 4px; font-weight: 500; }
.match-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}
.match-synergy-box {
    background: rgba(212, 175, 114, 0.1);
    border-left: 3px solid var(--gold-light);
    border-radius: 0 12px 12px 0;
    padding: 12px 14px;
    margin: 14px 0;
    font-size: 0.9rem;
    color: var(--ink);
    line-height: 1.5;
}

/* ---------- The Connection Universe (Futuristic Stage) ---------- */
:root {
    --univ-bg-gradient: radial-gradient(ellipse 90% 70% at 50% 35%, #2a0e18 0%, #150912 55%, #070306 100%);
    --univ-gold: #d4af72;
    --univ-gold-light: #f3d59b;
    --univ-gold-bright: #ffe4b5;
    --univ-border: rgba(228, 193, 141, 0.35);
}

.universe-container {
    background: radial-gradient(ellipse 90% 70% at 50% 35%, #220b13 0%, #12070e 55%, #070306 100%);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(228, 193, 141, 0.28);
    border-top: 1.5px solid rgba(243, 213, 155, 0.45);
    border-radius: 24px;
    padding: 14px;
    position: relative;
    overflow: hidden;
    color: var(--ink);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.75), 0 0 35px rgba(158, 27, 47, 0.22);
    margin-bottom: 16px;
}

.universe-hud {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 0 2px 12px 2px;
    z-index: 2;
}
.universe-title-tag {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    font-weight: 500;
}
.universe-stat-quote {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-soft);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.universe-stat-quote strong { color: var(--gold-light); font-weight: 800; }

.universe-hud-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.universe-live-pill {
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #6ee7b7;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.universe-live-pill .live-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 10px #34d399;
    animation: pulse-dot 1.8s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.universe-canvas-wrapper {
    position: relative;
    width: 100%;
    height: clamp(360px, 56dvh, 480px);
    background: var(--univ-bg-gradient);
    border-radius: 18px;
    border: 1px solid rgba(243, 213, 155, 0.3);
    overflow: hidden;
    cursor: grab;
    touch-action: manipulation;
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.65), 0 18px 40px -16px rgba(0, 0, 0, 0.8);
}
.universe-canvas-wrapper:active { cursor: grabbing; }
.universe-canvas { width: 100%; height: 100%; display: block; }

/* Brand Watermarks: Hosted by Das Afterwork (top-left) & Sponsored by The Art of Life (top-right) */
.universe-brand-badge {
    position: absolute;
    top: 12px;
    z-index: 12;
    pointer-events: none;
    user-select: none;
    display: flex;
    align-items: center;
    opacity: 0.92;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.universe-brand-badge.brand-left {
    left: 14px;
}

.universe-brand-badge.brand-right {
    right: 14px;
}

.universe-brand-img {
    display: block;
    height: auto;
    max-height: 38px;
    width: auto;
    max-width: 96px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 10px rgba(228, 193, 141, 0.22));
}

@media (min-width: 480px) {
    .universe-brand-badge {
        top: 16px;
    }
    .universe-brand-badge.brand-left {
        left: 18px;
    }
    .universe-brand-badge.brand-right {
        right: 18px;
    }
    .universe-brand-img {
        max-height: 48px;
        max-width: 125px;
    }
}

@media (min-width: 768px) {
    .universe-brand-badge {
        top: 20px;
    }
    .universe-brand-badge.brand-left {
        left: 24px;
    }
    .universe-brand-badge.brand-right {
        right: 24px;
    }
    .universe-brand-img {
        max-height: 56px;
        max-width: 145px;
    }
}

/* In Fullscreen mode (TV / Presentation / Beamer) */
#view-universe:fullscreen .universe-brand-badge,
#view-universe:-webkit-full-screen .universe-brand-badge,
.universe-container:fullscreen .universe-brand-badge,
.universe-container:-webkit-full-screen .universe-brand-badge {
    top: 24px;
    opacity: 0.96;
}

#view-universe:fullscreen .universe-brand-badge.brand-left,
#view-universe:-webkit-full-screen .universe-brand-badge.brand-left,
.universe-container:fullscreen .universe-brand-badge.brand-left,
.universe-container:-webkit-full-screen .universe-brand-badge.brand-left {
    left: 28px;
}

#view-universe:fullscreen .universe-brand-badge.brand-right,
#view-universe:-webkit-full-screen .universe-brand-badge.brand-right,
.universe-container:fullscreen .universe-brand-badge.brand-right,
.universe-container:-webkit-full-screen .universe-brand-badge.brand-right {
    right: 28px;
}

#view-universe:fullscreen .universe-brand-img,
#view-universe:-webkit-full-screen .universe-brand-img,
.universe-container:fullscreen .universe-brand-img,
.universe-container:-webkit-full-screen .universe-brand-img {
    max-height: 72px;
    max-width: 180px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 16px rgba(228, 193, 141, 0.35));
}

/* Universe Stage Row: Standard view */
.universe-stage-row {
    position: relative;
    width: 100%;
}

/* Fullscreen Ranking: Strictly hidden in non-fullscreen views */
.universe-fullscreen-ranking {
    display: none !important;
}

/* Fullscreen Ranking Styles (used when active in fullscreen) */
.uf-ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(243, 213, 155, 0.22);
    flex-shrink: 0;
}

.uf-ranking-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.uf-ranking-icon {
    font-size: 1.25rem;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}

.uf-ranking-title {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #fff 0%, var(--univ-gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.15;
}

.uf-ranking-subtitle {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.uf-ranking-live-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 230, 118, 0.12);
    border: 1px solid rgba(0, 230, 118, 0.35);
    color: #00e676;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 999px;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.live-dot-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 8px #00e676;
    animation: liveGlow 1.5s infinite;
}

.uf-ranking-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding-right: 2px;
    min-height: 0;
}

.uf-ranking-scroll::-webkit-scrollbar {
    width: 4px;
}
.uf-ranking-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
}
.uf-ranking-scroll::-webkit-scrollbar-thumb {
    background: rgba(228, 193, 141, 0.35);
    border-radius: 4px;
}

.uf-ranking-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    box-sizing: border-box;
    transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.uf-ranking-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(228, 193, 141, 0.28);
}

.uf-ranking-card.is-me {
    background: rgba(228, 193, 141, 0.13);
    border-color: rgba(228, 193, 141, 0.55);
    box-shadow: 0 0 14px rgba(228, 193, 141, 0.18);
}

.uf-ranking-rank {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
}

.uf-ranking-rank.rank-gold {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #1a0f00;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.uf-ranking-rank.rank-silver {
    background: linear-gradient(135deg, #e6e6e6, #9e9e9e);
    color: #111;
    box-shadow: 0 0 8px rgba(200, 200, 200, 0.4);
}

.uf-ranking-rank.rank-bronze {
    background: linear-gradient(135deg, #d48a37, #8c4a16);
    color: #fff;
    box-shadow: 0 0 8px rgba(212, 138, 55, 0.4);
}

.uf-ranking-rank.rank-other {
    background: rgba(255, 255, 255, 0.07);
    color: var(--univ-gold-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.uf-ranking-avatar-wrap {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uf-ranking-avatar-wrap .chat-avatar,
.uf-ranking-avatar-wrap .avatar-initials {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.7rem !important;
    border-radius: 50%;
}

.uf-ranking-info {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.uf-ranking-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.uf-me-badge {
    font-size: 0.68rem;
    color: var(--gold);
    font-weight: 700;
}

.uf-ranking-code {
    font-size: 0.66rem;
    color: rgba(243, 213, 155, 0.7);
    font-family: monospace;
    letter-spacing: 0.04em;
}

.uf-ranking-score {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 6px;
    background: rgba(228, 193, 141, 0.12);
    border: 1px solid rgba(228, 193, 141, 0.25);
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--univ-gold-light);
    flex-shrink: 0;
    white-space: nowrap;
}

.uf-ranking-empty {
    text-align: center;
    padding: 24px 10px;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Floating Star Click-Mode Action Dock inside Universe Stage */
.star-floating-dock {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 25;
    background: rgba(16, 12, 24, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1.5px solid var(--gold-light);
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), 0 0 24px rgba(228, 193, 141, 0.3);
    animation: viewEnter 0.25s var(--ease) both;
}
.star-dock-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}
.star-dock-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}
.star-dock-meta {
    font-size: 0.82rem;
    color: var(--gold-light);
    margin-top: 2px;
}
.star-dock-quote {
    font-size: 0.84rem;
    color: var(--ink-soft);
    font-style: italic;
    margin: 6px 0 0;
}
.star-dock-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.star-detail-actions {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.star-detail-actions .btn { width: 100%; min-height: 44px; padding: 10px 12px; font-size: 0.85rem; }

/* 3 Docked Futuristic Counters */
.universe-stats-dock {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    z-index: 10;
    pointer-events: none;
}
.univ-stat-card {
    background: rgba(22, 9, 16, 0.85);
    border: 1px solid rgba(228, 193, 141, 0.22);
    border-top: 1px solid rgba(243, 213, 155, 0.38);
    border-radius: 14px;
    padding: 9px 12px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    pointer-events: auto;
    transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.univ-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(243, 213, 155, 0.5);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.75), 0 0 18px rgba(168, 27, 48, 0.3);
}
.univ-stat-label {
    font-size: 0.64rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #cbbba8;
    font-weight: 700;
    margin-bottom: 2px;
}
.univ-stat-num {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffe6bd;
    text-shadow: 0 0 12px rgba(228, 193, 141, 0.4);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

/* True 100vw × 100vh Fullscreen layout */
#view-universe:fullscreen,
#view-universe:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    padding: 0;
    background: var(--cosmos-bg);
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
}
#view-universe:fullscreen .universe-container,
#view-universe:-webkit-full-screen .universe-container,
.universe-container:fullscreen,
.universe-container:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0;
    border-radius: 0;
    border: none;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background: var(--cosmos-bg);
}
/* Stage Row in Fullscreen: Side-by-side layout (5/6 Canvas + 1/6 Ranking Sidebar) */
#view-universe:fullscreen .universe-stage-row,
#view-universe:-webkit-full-screen .universe-stage-row,
#view-universe.is-fullscreen .universe-stage-row,
.universe-container:fullscreen .universe-stage-row,
.universe-container:-webkit-full-screen .universe-stage-row {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    gap: 16px !important;
    align-items: stretch !important;
}

#view-universe:fullscreen .universe-canvas-wrapper,
#view-universe:-webkit-full-screen .universe-canvas-wrapper,
#view-universe.is-fullscreen .universe-canvas-wrapper,
.universe-container:fullscreen .universe-canvas-wrapper,
.universe-container:-webkit-full-screen .universe-canvas-wrapper {
    flex: 5 1 0 !important;
    width: calc(100% * 5 / 6) !important;
    min-width: 0 !important;
    height: 100% !important;
}

#view-universe:fullscreen .universe-fullscreen-ranking,
#view-universe:-webkit-full-screen .universe-fullscreen-ranking,
#view-universe.is-fullscreen .universe-fullscreen-ranking,
.universe-container:fullscreen .universe-fullscreen-ranking,
.universe-container:-webkit-full-screen .universe-fullscreen-ranking {
    display: flex !important;
    flex: 0 0 calc(100% / 6) !important;
    width: calc(100% / 6) !important;
    min-width: 220px !important;
    max-width: 340px !important;
    height: 100% !important;
    background: rgba(14, 10, 20, 0.90) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(243, 213, 155, 0.3) !important;
    border-radius: 18px !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8), inset 0 0 30px rgba(0, 0, 0, 0.5) !important;
    padding: 14px 12px !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    animation: fadeIn 0.35s ease both !important;
}

/* In Fullscreen mode: Hide action buttons and collective energy mission bottom bar */
#view-universe:fullscreen .universe-action-bar,
#view-universe:-webkit-full-screen .universe-action-bar,
#view-universe.is-fullscreen .universe-action-bar,
.universe-container:fullscreen .universe-action-bar,
.universe-container:-webkit-full-screen .universe-action-bar,
:fullscreen .universe-action-bar,
:-webkit-full-screen .universe-action-bar,
#view-universe:fullscreen #universe-mod-controls,
#view-universe:-webkit-full-screen #universe-mod-controls,
#view-universe.is-fullscreen #universe-mod-controls,
:fullscreen #universe-mod-controls,
:-webkit-full-screen #universe-mod-controls,
#view-universe:fullscreen .universe-caption-text,
#view-universe:-webkit-full-screen .universe-caption-text,
#view-universe.is-fullscreen .universe-caption-text,
:fullscreen .universe-caption-text,
:-webkit-full-screen .universe-caption-text,
#view-universe:fullscreen .universe-bottom-bar,
#view-universe:-webkit-full-screen .universe-bottom-bar,
#view-universe.is-fullscreen .universe-bottom-bar,
.universe-container:fullscreen .universe-bottom-bar,
.universe-container:-webkit-full-screen .universe-bottom-bar,
:fullscreen .universe-bottom-bar,
:-webkit-full-screen .universe-bottom-bar {
    display: none !important;
}

/* Center Stats Dock in Fullscreen */
#view-universe:fullscreen .universe-stats-dock,
#view-universe:-webkit-full-screen .universe-stats-dock,
#view-universe.is-fullscreen .universe-stats-dock,
.universe-container:fullscreen .universe-stats-dock,
.universe-container:-webkit-full-screen .universe-stats-dock {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    display: flex !important;
    justify-content: center !important;
    gap: 16px !important;
    bottom: 20px !important;
    z-index: 15 !important;
}

/* ==========================================================================
   Universe Fullscreen Bottom-Left Dock: Live-Chat & QR Presentation
   STRICT RULE: Only in Fullscreen AND Only for Admin/Moderator/Presentation
   ========================================================================== */
.universe-fs-bottom-left-dock {
    display: none !important;
}

/* Shown strictly only when body has moderator/admin permission AND view is fullscreen */
body.is-admin-mod #view-universe:fullscreen .universe-fs-bottom-left-dock,
body.is-admin-mod #view-universe:-webkit-full-screen .universe-fs-bottom-left-dock,
body.is-admin-mod #view-universe.is-fullscreen .universe-fs-bottom-left-dock,
body.is-admin #view-universe:fullscreen .universe-fs-bottom-left-dock,
body.is-admin #view-universe:-webkit-full-screen .universe-fs-bottom-left-dock,
body.is-admin #view-universe.is-fullscreen .universe-fs-bottom-left-dock,
body.is-moderator #view-universe:fullscreen .universe-fs-bottom-left-dock,
body.is-moderator #view-universe:-webkit-full-screen .universe-fs-bottom-left-dock,
body.is-moderator #view-universe.is-fullscreen .universe-fs-bottom-left-dock,
body.is-presentation #view-universe:fullscreen .universe-fs-bottom-left-dock,
body.is-presentation #view-universe:-webkit-full-screen .universe-fs-bottom-left-dock,
body.is-presentation #view-universe.is-fullscreen .universe-fs-bottom-left-dock {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    bottom: 20px;
    left: 24px;
    z-index: 25;
    width: 380px;
    max-width: calc(100% - 440px);
    pointer-events: auto;
    animation: ufFadeSlideIn 0.35s ease both;
}

/* ==========================================================================
   Universe Fullscreen Large Presentation QR-Overlay (Center Stage)
   STRICT RULE: Only in Fullscreen AND Only for Admin/Moderator/Presentation
   Active during the first 20 seconds of every minute (0s-19s)
   ========================================================================== */
.universe-fs-large-qr-overlay {
    display: none !important;
}

body.is-admin-mod #view-universe:fullscreen .universe-fs-large-qr-overlay.is-active,
body.is-admin-mod #view-universe:-webkit-full-screen .universe-fs-large-qr-overlay.is-active,
body.is-admin-mod #view-universe.is-fullscreen .universe-fs-large-qr-overlay.is-active,
body.is-admin #view-universe:fullscreen .universe-fs-large-qr-overlay.is-active,
body.is-admin #view-universe:-webkit-full-screen .universe-fs-large-qr-overlay.is-active,
body.is-admin #view-universe.is-fullscreen .universe-fs-large-qr-overlay.is-active,
body.is-moderator #view-universe:fullscreen .universe-fs-large-qr-overlay.is-active,
body.is-moderator #view-universe:-webkit-full-screen .universe-fs-large-qr-overlay.is-active,
body.is-moderator #view-universe.is-fullscreen .universe-fs-large-qr-overlay.is-active,
body.is-presentation #view-universe:fullscreen .universe-fs-large-qr-overlay.is-active,
body.is-presentation #view-universe:-webkit-full-screen .universe-fs-large-qr-overlay.is-active,
body.is-presentation #view-universe.is-fullscreen .universe-fs-large-qr-overlay.is-active {
    display: flex !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 45;
    pointer-events: auto;
    animation: ufZoomIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.uf-lqr-card,
.universe-fs-qr-card {
    background: linear-gradient(145deg, rgba(34, 10, 24, 0.96), rgba(14, 7, 18, 0.98));
    border: 2px solid rgba(243, 213, 155, 0.65);
    border-radius: 28px;
    padding: 24px 32px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.95), 0 0 50px rgba(243, 213, 155, 0.3);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 460px;
    width: 90vw;
    gap: 10px;
}

.uf-lqr-header,
.universe-fs-qr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(243, 213, 155, 0.25);
}

.uf-lqr-badge,
.universe-fs-qr-badge {
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #ffe6bd;
    display: flex;
    align-items: center;
    gap: 8px;
}

.uf-lqr-timer,
.universe-fs-qr-timer {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffd899;
    background: rgba(243, 213, 155, 0.22);
    border: 1px solid rgba(243, 213, 155, 0.5);
    border-radius: 12px;
    padding: 3px 12px;
    font-variant-numeric: tabular-nums;
}

.uf-lqr-title {
    font-family: var(--font-display);
    font-size: 1.16rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.06em;
    margin-top: 4px;
}

.uf-lqr-img-box,
.universe-fs-qr-img-wrapper {
    background: #ffffff;
    padding: 14px;
    border-radius: 20px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.7), 0 0 25px rgba(243, 213, 155, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.uf-lqr-img,
.universe-fs-qr-img-large {
    width: 290px;
    height: 290px;
    display: block;
    border-radius: 10px;
}

.uf-lqr-hint,
.universe-fs-qr-sub-large {
    font-size: 0.92rem;
    color: #e8d8c8;
    line-height: 1.4;
    font-weight: 600;
}

@keyframes ufZoomIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Fullscreen Live-Chat Stream Card (Compact Luxury Display) */
.universe-fs-chat-card {
    background: rgba(16, 11, 22, 0.94);
    border: 1.5px solid rgba(243, 213, 155, 0.35);
    border-radius: 20px;
    padding: 14px 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.82), 0 0 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    max-height: 310px;
}

.universe-fs-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(243, 213, 155, 0.18);
    margin-bottom: 10px;
    flex-shrink: 0;
}

.universe-fs-chat-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.universe-fs-chat-icon {
    font-size: 1.1rem;
}

.universe-fs-chat-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #ffe6bd;
}

.universe-fs-chat-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #10b981;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 12px;
    padding: 3px 9px;
}

.universe-fs-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: 230px;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(243, 213, 155, 0.35) transparent;
}

.universe-fs-chat-messages::-webkit-scrollbar {
    width: 6px;
}
.universe-fs-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(243, 213, 155, 0.35);
    border-radius: 6px;
}

.uf-chat-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 10px 14px;
    flex-shrink: 0;
    animation: ufFadeSlideIn 0.25s ease both;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.uf-chat-item:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(243, 213, 155, 0.3);
}

.uf-chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1.5px solid rgba(243, 213, 155, 0.4);
}

.uf-chat-avatar .avatar-img,
.uf-chat-avatar .avatar-mini {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

.uf-chat-avatar .avatar-circle {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
    border-radius: 50%;
}

.uf-chat-bubble {
    flex: 1;
    min-width: 0;
}

.uf-chat-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.uf-chat-author {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffe6bd;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uf-chat-time {
    font-size: 0.78rem;
    color: #cbbba8;
    margin-left: 8px;
    flex-shrink: 0;
}

.uf-chat-content {
    font-size: 0.98rem;
    color: #ffffff;
    line-height: 1.45;
    word-break: break-word;
}

.uf-chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
    color: #cbbba8;
    font-size: 0.92rem;
    text-align: center;
    gap: 8px;
}

.uf-chat-empty-icon {
    font-size: 1.6rem;
    opacity: 0.6;
}

/* Height-adaptive constraints for smaller presentation screens */
@media (max-height: 860px) {
    .universe-fs-bottom-left-dock {
        width: 340px;
        bottom: 12px;
        left: 16px;
        gap: 6px;
    }
    .uf-lqr-card,
    .universe-fs-qr-card {
        padding: 16px 20px;
        gap: 8px;
    }
    .uf-lqr-img,
    .universe-fs-qr-img-large {
        width: 220px;
        height: 220px;
    }
    .universe-fs-chat-card {
        max-height: 250px;
        padding: 10px 12px;
    }
    .universe-fs-chat-messages {
        max-height: 170px;
    }
}

@keyframes ufFadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 4 Big Click-Mode Action Tiles below Universe Stage */
.universe-action-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 0 10px 0;
}
.universe-action-bar[hidden] { display: none !important; }
.universe-action-left {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}
.universe-action-left .btn-universe-control:nth-child(3) { grid-column: 1 / -1; }

.btn-universe-control {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: 1px solid var(--line-strong);
    padding: 13px 16px;
    min-height: 50px;
    border-radius: 14px;
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s var(--ease);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    touch-action: manipulation;
}
.btn-universe-control:hover {
    background: rgba(212, 175, 114, 0.16);
    border-color: var(--gold-light);
    transform: translateY(-2px);
}
.btn-universe-control.highlight {
    background: linear-gradient(135deg, rgba(138, 40, 66, 0.65), rgba(64, 18, 34, 0.85));
    border-color: var(--gold);
}
.btn-universe-control.highlight span { color: var(--gold-light); }

.btn-universe-action {
    background: linear-gradient(135deg, #f3d59b 0%, #c69a55 100%);
    color: #130d18;
    font-weight: 800;
    border: 1px solid #ffe8be;
    border-radius: 14px;
    padding: 14px 18px;
    min-height: 52px;
    width: 100%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.94rem;
    box-shadow: 0 10px 26px -8px rgba(212, 175, 114, 0.6);
    transition: all 0.2s var(--ease);
    touch-action: manipulation;
}
.btn-universe-action:hover { transform: translateY(-2px); filter: brightness(1.06); }

.universe-bottom-bar {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 14px;
}
.mission-bar-container { width: 100%; }
.mission-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--gold-light);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.mission-bar-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}
.mission-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #8a2842, #f3d59b, #38bdf8);
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(243, 213, 155, 0.6);
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Moderator Team Management in Regie */
.team-list-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}
.team-member-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(243, 213, 155, 0.2);
    border-radius: 12px;
    padding: 10px 14px;
    gap: 12px;
}
.team-member-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.team-member-name {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.badge-moderator {
    background: rgba(14, 165, 233, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-admin {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.4);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* ---------- Landing / Check-in (Futuristic Minimal Text) ---------- */
.landing {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 4px;
}
.landing-form { order: 1; }
.landing-hero { order: 2; }

.landing-mobile-intro {
    display: block;
    text-align: center;
    margin-bottom: 14px;
}
.landing-mobile-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2.1rem, 8vw, 2.8rem);
    line-height: 1.04;
    margin-top: 6px;
    color: #fff;
}
.landing-mobile-title em { font-style: italic; color: var(--gold-light); }

.landing-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2.4rem, 5.5vw, 4.4rem);
    line-height: 1.02;
    color: #fff;
    margin: 12px 0 14px;
}
.landing-title em { font-style: italic; color: var(--gold-light); }
.landing-lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 480px; line-height: 1.5; margin-bottom: 22px; }

.hero-pills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.hero-pill-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: 18px;
}
.hero-pill-icon {
    font-size: 1.6rem;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(212, 175, 114, 0.14);
    border: 1px solid rgba(212, 175, 114, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hero-pill-tile strong { display: block; font-size: 1rem; color: #fff; }
.hero-pill-tile span { font-size: 0.84rem; color: var(--ink-soft); }

.checkin-glass-card {
    padding: 24px 20px;
    border: 1.5px solid rgba(243, 213, 155, 0.32);
    box-shadow: var(--shadow-lg);
}

.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 5px;
    border-radius: 18px;
    background: rgba(10, 8, 16, 0.8);
    border: 1px solid var(--line);
    gap: 6px;
}
.segmented .btn {
    min-height: 46px;
    border-radius: 14px;
    box-shadow: none;
    font-size: 0.9rem;
}
.segmented .btn-secondary { border-color: transparent; background: transparent; }

/* ---------- Chat (Clean & Futuristic) ---------- */
.chat-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    font-size: 0.8rem;
    color: var(--ink-soft);
    margin-bottom: 10px;
}
.chat-box {
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    background: var(--glass-card);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    height: clamp(380px, calc(100dvh - 230px), 560px);
}
.chat-messages {
    background: transparent;
    padding: 16px;
    gap: 12px;
}
.message-item { max-width: 90%; }
.message-bubble {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px 16px;
    color: #fff;
}
.message-item.own .message-bubble {
    background: linear-gradient(135deg, rgba(138, 40, 66, 0.75), rgba(92, 24, 43, 0.85));
    border-color: rgba(243, 213, 155, 0.4);
}
.message-author { color: var(--gold-light); font-weight: 700; }
.chat-input-bar {
    border-top: 1px solid var(--line);
    background: rgba(14, 10, 22, 0.92);
    padding: 12px;
    gap: 10px;
}
.chat-input-bar textarea {
    border-radius: 16px;
    font-size: 16px;
    height: 50px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: 1px solid var(--line-strong);
}
.chat-input-bar .btn { min-width: 56px; min-height: 50px; border-radius: 16px; font-size: 1.2rem; }

/* ---------- Connect View Mobile-First Subtabs & Panels ---------- */
.voting-subtab-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px;
    border-radius: 16px;
    border: 1px solid var(--line);
}
.voting-subtab-bar .tab-btn {
    flex: 1 1 0;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    flex-direction: row;
    color: var(--ink-soft);
    background: transparent;
}
.voting-subtab-bar .tab-btn.active {
    color: #ffe6bd;
    background: linear-gradient(180deg, rgba(168, 27, 48, 0.42) 0%, rgba(85, 10, 22, 0.3) 100%);
    border: 1px solid rgba(243, 213, 155, 0.42);
    box-shadow: 0 0 14px rgba(168, 27, 48, 0.35);
}

@media (max-width: 959px) {
    .voting-subtab-bar { display: flex; }
    .voting-subtab-panel { display: none; }
    .voting-subtab-panel.active { display: block; }
}

@media (min-width: 960px) {
    .voting-subtab-bar { display: none; }
    .voting-subtab-panel { display: block !important; }
}

/* ---------- Networking & Leaderboard (1-Click Connect Cards) ---------- */
.networking-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 100%;
}
.attendees-scroll-box {
    max-height: calc(100vh - 290px);
    max-height: calc(100dvh - 290px);
    min-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 2px;
    -webkit-overflow-scrolling: touch;
}
.attendee-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    margin-bottom: 0;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    transition: transform 0.18s var(--ease), border-color 0.18s var(--ease);
}
.attendee-card:hover { transform: translateY(-1px); border-color: var(--gold-light); }
.attendee-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.attendee-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: #fff;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.mutual-badge {
    background: rgba(52, 211, 153, 0.16);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.45);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}

.leaderboard-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}
.leaderboard-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}
.leaderboard-table th {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-light);
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--line);
    padding: 8px 6px;
}
.leaderboard-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 8px 6px;
    font-size: 0.9rem;
    color: var(--ink);
    vertical-align: middle;
}
.leaderboard-table th:nth-child(1), .leaderboard-table td:nth-child(1) {
    width: 34px;
    text-align: center;
    padding-left: 2px;
}
.leaderboard-table th:nth-child(2), .leaderboard-table td:nth-child(2) {
    width: auto;
    min-width: 0;
}
.leaderboard-table th:nth-child(3), .leaderboard-table td:nth-child(3) {
    width: 76px;
    text-align: center;
    white-space: nowrap;
}
.leaderboard-table th:nth-child(4), .leaderboard-table td:nth-child(4) {
    width: 66px;
    text-align: right;
    white-space: nowrap;
    padding-right: 4px;
}
.leaderboard-table tbody tr:hover { background: rgba(255, 255, 255, 0.04); }

/* ---------- Event Pass View (#view-profile) ---------- */
.pass-card {
    background: radial-gradient(circle at 100% 0%, rgba(212, 175, 114, 0.18), rgba(24, 18, 32, 0.92) 65%);
    border: 1.5px solid var(--line-strong);
}
.pass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}
.pass-code-pill {
    font-family: ui-monospace, monospace;
    font-size: 1.25rem;
    font-weight: 800;
    color: #130d18;
    background: linear-gradient(135deg, #f3d59b, #c69a55);
    padding: 8px 16px;
    border-radius: 14px;
    letter-spacing: 0.08em;
}
.pass-actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

/* ---------- Moderator Console ---------- */
.timer-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}
.mod-tabs-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.queue-item, .avatar-queue-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    color: var(--ink);
}
.queue-content {
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    border-left-color: var(--gold);
}

/* ---------- Modals & Bottom Sheets ---------- */
.modal-backdrop, .modal-overlay, .info-dialog {
    position: fixed;
    inset: 0;
    z-index: 8500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(6, 4, 10, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.info-dialog { display: none; z-index: 9000; }
.info-dialog.open { display: flex; }

.modal-card, .info-dialog-card {
    background: #161120;
    border: 1.5px solid var(--line-strong);
    border-radius: 24px 24px 0 0;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.28s var(--ease) both;
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    overflow-y: auto;
    color: var(--ink);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.info-dialog-card { padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px)); }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { color: #fff; }
.modal-body { padding: 20px; }
.modal-footer { background: rgba(0, 0, 0, 0.25); border-top: 1px solid var(--line); }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Golden Reveal Modal */
.golden-reveal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 5, 14, 0.94);
    backdrop-filter: blur(16px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.golden-reveal-card {
    background: radial-gradient(ellipse at center, #3d242c 0%, #17111a 70%, #0d0b10 100%);
    border: 2px solid #f3d59b;
    border-radius: 26px;
    max-width: 680px;
    width: 100%;
    padding: 28px 20px;
    text-align: center;
    color: #f7efe4;
    box-shadow: 0 0 70px rgba(243, 213, 155, 0.45);
}
.golden-reveal-title { font-size: 0.78rem; letter-spacing: 0.22em; color: #f3d59b; font-weight: 700; margin-bottom: 8px; }
.golden-reveal-headline { font-family: var(--font-display); font-size: clamp(1.6rem, 5vw, 2.2rem); color: #fff; margin-bottom: 20px; }
.golden-reveal-pair { display: flex; flex-direction: column; gap: 14px; margin: 18px 0; }
.golden-reveal-user { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(243, 213, 155, 0.4); border-radius: 18px; padding: 16px; flex: 1; }
.golden-reveal-user-name { font-size: 1.15rem; font-weight: 800; color: #ffe4b5; margin-top: 8px; }
.golden-reveal-user-role { font-size: 0.85rem; color: #c4b5a2; }
.golden-reveal-connector { font-size: 1.6rem; color: #f3d59b; }
.golden-reveal-quote { font-family: var(--font-display); font-style: italic; font-size: 1.02rem; color: #f3d59b; margin-top: 14px; }

/* ---------- Footer & Toasts ---------- */
.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(10, 8, 16, 0.6);
    margin-top: auto;
}
.site-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.76rem;
    color: var(--ink-soft);
}
.site-footer .footer-brand { font-family: var(--font-display); letter-spacing: 0.14em; color: var(--gold-light); font-size: 0.82rem; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer button.link {
    background: none; border: none; padding: 4px 0; cursor: pointer;
    font: inherit; color: var(--ink-soft); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.7rem;
}
.site-footer button.link:hover { color: var(--gold-light); }

.toast-stack {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    display: grid;
    grid-template-columns: 5px 1fr auto;
    gap: 12px;
    align-items: center;
    background: rgba(20, 15, 29, 0.96);
    border: 1px solid var(--line-strong);
    color: #fff;
    border-radius: 16px;
    padding: 14px 14px 14px 0;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.85);
    font-size: 0.9rem;
    animation: toastIn 0.3s var(--ease) both;
    overflow: hidden;
}
.toast::before { content: ""; align-self: stretch; background: var(--gold-light); }
.toast.toast-success::before { background: #34d399; }
.toast.toast-warning::before { background: #fbbf24; }
.toast.toast-danger::before { background: #f87171; }
.toast-close { background: none; border: none; color: var(--ink-soft); cursor: pointer; font-size: 1.1rem; padding: 4px 8px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* =====================================================================
   TABLET & DESKTOP ENHANCEMENTS (min-width: 640px / 768px / 960px)
   ===================================================================== */
@media (min-width: 640px) {
    .main-container { padding: 24px 20px 44px; }
    .card { padding: 26px; }
    .pill-selector-group { grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 12px; }
    .optin-tiles-grid { grid-template-columns: 1fr 1fr; }
    .form-grid-2 { grid-template-columns: 1fr 1fr; }
    .quick-connect-form { flex-direction: row; }
    .quick-connect-form .btn { width: auto; }
    .attendees-search-input { max-width: 220px; }
    .pass-actions-grid { grid-template-columns: 1fr 1fr; }

    .matches-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }

    .universe-hud { flex-direction: row; justify-content: space-between; align-items: center; }
    .universe-hud-right { width: auto; gap: 12px; }
    .star-floating-dock { left: auto; right: 18px; top: 18px; width: 360px; }

    .universe-stats-dock {
        bottom: 18px; left: 20px; right: 20px;
        display: flex; justify-content: space-between; align-items: flex-end;
    }
    .univ-stat-card { min-width: 140px; padding: 12px 20px; }
    .univ-stat-num { font-size: 1.75rem; }

    .golden-reveal-pair { flex-direction: row; align-items: center; }
    .modal-backdrop, .modal-overlay, .info-dialog { align-items: center; padding: 20px; }
    .modal-card { border-radius: 24px; max-width: 460px; }
    .info-dialog-card { border-radius: 24px; max-width: 680px; padding: 32px; }
}

@media (min-width: 768px) {
    :root { --header-h: 74px; }
    body { padding-bottom: 0; background-attachment: fixed; }

    .header-inner { padding: 12px 28px; }
    .brand-icon { width: 44px; height: 44px; }
    .brand-title { font-size: 1.15rem; }
    .brand-subtitle { display: block; }
    #header-user-code { display: inline-flex; }

    /* Top Dock Navigation on Desktop */
    .nav-tabs {
        position: sticky;
        top: var(--header-h);
        bottom: auto;
        z-index: 50;
        border-top: none;
        border-bottom: 1px solid var(--line);
        padding: 6px 0;
        box-shadow: none;
    }
    .nav-tabs-inner {
        display: flex;
        justify-content: center;
        padding: 0 24px;
        gap: 10px;
    }
    .tab-btn {
        flex-direction: row;
        min-height: 46px;
        padding: 10px 18px;
        font-size: 0.82rem;
        gap: 8px;
    }
    .tab-btn .tab-label-long { display: inline; }
    .tab-btn .tab-label-short { display: none; }
    .badge-count { position: static; }

    .universe-container { padding: 22px 26px; border-radius: 28px; }
    .universe-canvas-wrapper { height: 540px; border-radius: 22px; }
    .universe-action-bar { flex-direction: row; justify-content: space-between; align-items: center; }
    .universe-action-left { display: flex; width: auto; gap: 10px; }
    .btn-universe-action { width: auto; padding: 13px 22px; }

    .timer-box { flex-direction: row; justify-content: space-between; align-items: center; }
    .toast-stack { left: auto; right: 24px; bottom: 24px; max-width: 420px; }
}

@media (min-width: 960px) {
    .landing {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.95fr);
        gap: 56px;
        align-items: center;
        padding-top: 16px;
    }
    .landing-hero { order: 1; }
    .landing-form { order: 2; }
    .landing-mobile-intro { display: none; }
    .checkin-glass-card { padding: 34px 30px; }
    .networking-grid { grid-template-columns: 1.05fr 0.95fr; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}


.view-section { display: none; }
.view-section.active { display: block; animation: viewEnter 0.35s var(--ease) both; }
.avatar-mini, #header-avatar-container img, #header-avatar-container .avatar-mini {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* =====================================================================
   HEADER & UNIVERSE HUD OVERLAP FIX (MOBILE + DESKTOP + FULLSCREEN)
   ===================================================================== */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
    min-width: 0;
    overflow: hidden;
    flex: 1 1 auto;
}
.brand > div:not(.brand-icon) {
    min-width: 0;
    overflow: hidden;
    flex: 1 1 auto;
}
.brand-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

@media (max-width: 680px) {
    .header-inner {
        padding: 8px 12px;
        gap: 8px;
    }
    body.has-user-session .brand > div:not(.brand-icon),
    .header-inner:has(#user-header-status[style*="flex"]) .brand > div:not(.brand-icon) {
        display: none !important;
    }
    body.has-user-session .brand,
    .header-inner:has(#user-header-status[style*="flex"]) .brand {
        flex: 0 0 auto;
    }
    .user-status-bar {
        gap: 6px;
        max-width: calc(100% - 48px);
        justify-content: flex-end;
    }
    .user-badge {
        max-width: 138px;
        padding: 4px 10px 4px 5px;
    }
    #header-user-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 82px;
        display: inline-block;
    }
}

.universe-hud {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 2px 4px 14px 4px !important;
    margin: 0 !important;
    z-index: 5;
}
.universe-hud-left {
    min-width: 0;
}
.universe-stat-quote {
    line-height: 1.45;
    word-break: break-word;
}
.universe-hud-right {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.universe-live-pill {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    flex-shrink: 0;
    margin: 0 !important;
}

@media (max-width: 639px) {
    .univ-stat-card,
    .univ-stat-card:last-child {
        max-width: none !important;
        margin-left: 0 !important;
        width: 100%;
    }
}

@media (min-width: 640px) {
    .universe-hud {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    .universe-hud-right {
        width: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }
}


/* ==========================================================================
   1:1 PRIVATE CHAT & BLOCK FUNCTION LUXURY STYLES (v23)
   ========================================================================== */

.btn-danger-soft {
    background: rgba(239, 68, 68, 0.14) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
    font-weight: 600;
    transition: all 0.2s ease;
}
.btn-danger-soft:hover {
    background: rgba(239, 68, 68, 0.28) !important;
    border-color: rgba(239, 68, 68, 0.6) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
    color: #ffffff !important;
    border: 1px solid rgba(239, 68, 68, 0.8) !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
    transition: all 0.2s ease;
}
.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
    transform: translateY(-1px);
}

/* Modal Overlay & Container */
.private-chat-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.private-chat-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 5, 12, 0.78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeIn 0.22s ease-out;
}

.private-chat-dialog {
    position: relative;
    width: 100%;
    max-width: 540px;
    height: 85vh;
    max-height: 720px;
    background: linear-gradient(180deg, rgba(24, 18, 30, 0.96) 0%, rgba(14, 10, 18, 0.98) 100%);
    border: 1.5px solid rgba(243, 213, 155, 0.35);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75), 0 0 40px rgba(228, 193, 141, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Chat Header */
.private-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(243, 213, 155, 0.15);
    flex-shrink: 0;
}

.private-chat-header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.private-chat-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.private-chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #f3d59b;
    box-shadow: 0 0 10px rgba(243, 213, 155, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: #140e18;
    background: radial-gradient(circle at 30% 30%, #fff7eb, #e4c18d 70%, #6e4f2a);
}

.private-chat-user-info {
    min-width: 0;
    flex: 1;
}

.private-chat-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
    display: inline-block;
    flex-shrink: 0;
}

.private-chat-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.private-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.private-chat-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.private-chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

/* Privacy Security Banner */
.private-chat-security-banner {
    padding: 8px 16px;
    font-size: 0.74rem;
    color: var(--univ-gold-light);
    background: rgba(228, 193, 141, 0.07);
    border-bottom: 1px solid rgba(243, 213, 155, 0.12);
    text-align: center;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* Messages Scroll Container */
.private-chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: radial-gradient(circle at 50% 30%, rgba(228, 193, 141, 0.03) 0%, transparent 70%);
}

.private-chat-empty-state {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-muted);
}
.private-chat-empty-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
    color: var(--gold-light);
}

/* Chat Bubbles */
.private-chat-bubble-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 82%;
    animation: fadeIn 0.2s ease-out;
}
.private-chat-bubble-wrapper.is-mine {
    align-self: flex-end;
    align-items: flex-end;
}
.private-chat-bubble-wrapper.is-theirs {
    align-self: flex-start;
    align-items: flex-start;
}

.private-chat-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.45;
    word-break: break-word;
    position: relative;
}

.bubble-mine {
    background: linear-gradient(135deg, #8a1526 0%, #520914 100%);
    border: 1px solid rgba(243, 213, 155, 0.35);
    color: #fffaf0;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 14px rgba(138, 21, 38, 0.3);
}

.bubble-theirs {
    background: rgba(28, 13, 21, 0.85);
    border: 1px solid rgba(228, 193, 141, 0.18);
    color: #f7efe4;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.private-chat-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 4px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Chat Input Bar */
.private-chat-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(18, 13, 22, 0.96);
    border-top: 1px solid rgba(243, 213, 155, 0.18);
    flex-shrink: 0;
}

.private-chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(243, 213, 155, 0.24);
    border-radius: 12px;
    padding: 11px 14px;
    color: #ffffff;
    font-size: 0.92rem;
    outline: none;
    transition: all 0.2s ease;
}
.private-chat-input:focus {
    border-color: var(--gold-light);
    box-shadow: 0 0 12px rgba(243, 213, 155, 0.2);
    background: rgba(255, 255, 255, 0.09);
}

.btn-send {
    padding: 10px 16px !important;
    border-radius: 12px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Block Confirmation Dialog */
.block-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.block-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(14px);
}
.block-confirm-dialog {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: linear-gradient(180deg, #1c141d 0%, #120b14 100%);
    border: 1.5px solid rgba(239, 68, 68, 0.4);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(239, 68, 68, 0.2);
    text-align: center;
    animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.block-confirm-icon {
    font-size: 2.8rem;
    margin-bottom: 12px;
    display: inline-block;
}
.block-confirm-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px 0;
}
.block-confirm-text {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 22px;
}
.block-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Active Connections Card Deck in Matches Tab */
.active-connections-section {
    margin-bottom: 28px;
    padding: 16px;
    background: rgba(228, 193, 141, 0.04);
    border: 1px solid rgba(243, 213, 155, 0.22);
    border-radius: 16px;
}
.active-connections-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.active-connections-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gold-light);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.active-connections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.connected-partner-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(243, 213, 155, 0.28);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.2s ease;
}
.connected-partner-card:hover {
    border-color: rgba(243, 213, 155, 0.55);
    background: rgba(255, 255, 255, 0.06);
}
.connected-partner-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.connected-partner-unread-badge {
    background: #ef4444;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    margin-left: auto;
}

/* =====================================================================
   Tutorial Walkthrough Modal (Schritt-für-Schritt & Überspringbar)
   ===================================================================== */
.tutorial-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100010;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.tutorial-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 3, 7, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.tutorial-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: linear-gradient(165deg, rgba(32, 13, 23, 0.96) 0%, rgba(17, 7, 13, 0.98) 100%);
    border: 1.5px solid rgba(243, 213, 155, 0.35);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.9), 0 0 40px rgba(168, 27, 48, 0.25);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.tutorial-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tutorial-step-tag {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-light);
    background: rgba(228, 193, 141, 0.12);
    border: 1px solid rgba(243, 213, 155, 0.25);
    padding: 4px 10px;
    border-radius: 999px;
}
.tutorial-skip-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color 0.2s ease;
}
.tutorial-skip-btn:hover {
    color: #ffffff;
}
.tutorial-slide {
    text-align: center;
    padding: 12px 6px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.tutorial-icon-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(243, 213, 155, 0.25) 0%, rgba(158, 27, 47, 0.35) 70%, transparent 100%);
    border: 1.5px solid rgba(243, 213, 155, 0.4);
    box-shadow: 0 0 24px rgba(243, 213, 155, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 16px;
}
.tutorial-slide-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 8px;
}
.tutorial-slide-desc {
    font-size: 0.92rem;
    color: var(--ink-soft);
    line-height: 1.55;
    max-width: 380px;
    margin: 0 auto;
}
.tutorial-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(243, 213, 155, 0.16);
}
.tutorial-dots {
    display: flex;
    gap: 8px;
}
.tutorial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}
.tutorial-dot.active {
    background: var(--gold-light);
    width: 20px;
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(243, 213, 155, 0.6);
}
.tutorial-buttons {
    display: flex;
    gap: 8px;
}

/* =====================================================================
   Incoming Connection Requests Section (Eingehende Vernetzungsanfragen)
   ===================================================================== */
.incoming-requests-section {
    margin-bottom: 24px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(158, 27, 47, 0.22) 0%, rgba(32, 13, 23, 0.65) 100%);
    border: 1.5px solid rgba(243, 213, 155, 0.4);
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 20px rgba(168, 27, 48, 0.2);
    animation: fadeIn 0.3s ease;
}
.incoming-requests-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.incoming-requests-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--gold-bright);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.incoming-requests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.incoming-request-card {
    background: rgba(24, 10, 18, 0.88);
    border: 1px solid rgba(243, 213, 155, 0.32);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.incoming-request-card:hover {
    border-color: var(--gold-light);
    transform: translateY(-2px);
}
.incoming-request-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.incoming-request-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 4px;
}

/* =====================================================================
   Connection Request Toast Banner (Echtzeit-Push bei Anfrage)
   ===================================================================== */
.connection-request-toast {
    position: fixed;
    top: 76px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100005;
    width: 92%;
    max-width: 440px;
    animation: slideDownToast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideDownToast {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}
.conn-toast-inner {
    background: linear-gradient(135deg, rgba(38, 14, 26, 0.98) 0%, rgba(19, 8, 15, 0.98) 100%);
    border: 1.5px solid var(--gold-light);
    border-radius: 18px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(243, 213, 155, 0.35);
}
.conn-toast-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--gold-light);
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(243, 213, 155, 0.15);
    font-weight: 800;
    color: var(--gold-light);
}
.conn-toast-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.conn-toast-body {
    flex: 1;
    min-width: 0;
}
.conn-toast-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}
.conn-toast-text {
    font-size: 0.78rem;
    color: var(--ink-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}
.conn-toast-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Hard guarantee: Registrieren / Anmelden (#view-auth) is 100% hidden when user is logged in */
body.has-user-session #view-auth {
    display: none !important;
}

/* PIN Gate: Locked tabs and prominent required PIN card */
body.pin-locked #app-nav .tab-btn:not(#tab-nav-profile) {
    opacity: 0.45;
    cursor: not-allowed;
    position: relative;
}

#prof-pin-card.pin-required {
    border: 1.5px solid var(--gold) !important;
    box-shadow: 0 0 25px rgba(228, 193, 141, 0.25) !important;
    animation: pinCardPulse 2.5s infinite ease-in-out;
}

@keyframes pinCardPulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(228, 193, 141, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(228, 193, 141, 0.45);
        border-color: #ffd88a !important;
    }
}

body.pin-locked #app-nav .tab-btn:not(#tab-nav-profile)::after {
    content: " 🔒";
    font-size: 0.72rem;
    margin-left: 3px;
    opacity: 0.85;
}

/* Quick-Connect View Subtabs & Panels (KI-Matches, Gäste & Vernetzen, Live-Ranking) */
.voting-subtab-bar {
    display: flex !important;
    gap: 8px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px;
    border-radius: 16px;
    border: 1px solid var(--line);
    overflow-x: auto;
}
.voting-subtab-bar .tab-btn {
    flex: 1 1 0;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    flex-direction: row;
    color: var(--ink-soft);
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.voting-subtab-bar .tab-btn.active {
    color: #ffe6bd;
    background: linear-gradient(180deg, rgba(168, 27, 48, 0.42) 0%, rgba(85, 10, 22, 0.3) 100%);
    border: 1px solid rgba(243, 213, 155, 0.42);
    box-shadow: 0 0 14px rgba(168, 27, 48, 0.35);
}
.voting-subtab-panel {
    display: none;
}
.voting-subtab-panel.active {
    display: block !important;
}

/* Mobile Viewport & Active Chat Styles */
:root {
    --vvh: 100vh;
}
body.view-active-chat #view-chat {
    height: calc(var(--vvh, 100vh) - 120px);
}
body.view-active-chat.keyboard-open .app-header {
    display: none;
}
