:root {
    --bg: #08080a;
    --bg-elevated: #101013;
    --bg-card: #131318;
    --border: #1f1f25;
    --text: #f5f5f7;
    --text-muted: #8a8a93;
    --accent: #ff3d57;
    --accent-soft: rgba(255, 61, 87, 0.15);
    --primary: #f5f5f7;
    --primary-text: #121212;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #ef4444;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

.hidden { display: none !important; }
.muted { color: var(--text-muted); font-size: 0.9rem; }
.accent { color: var(--accent); }
.error {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* === Topbar === */
.topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.5rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    flex-wrap: wrap;
}
.brand {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}
.nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    flex-wrap: wrap;
}
.nav-link {
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.nav-link:hover { background: var(--bg-card); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.user-chip {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.3rem 0.7rem 0.3rem 0.35rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.2s, border-color 0.2s, transform 0.08s;
    cursor: pointer;
}
.user-chip:hover { background: var(--bg-elevated); border-color: var(--accent); }
.user-chip:active { transform: scale(0.97); }
.user-chip.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* === Container === */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 4rem;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.75rem 1.4rem;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.08s ease, background 0.2s, opacity 0.2s;
    background: var(--bg-card);
    color: var(--text);
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.85rem; }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-card); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-google {
    background: #fff;
    color: #202124;
    width: 100%;
    padding: 0.95rem 1.4rem;
    font-size: 1rem;
}
.btn-google:hover { background: #f1f3f4; }
.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
}
.btn-icon:hover { background: var(--bg-card); color: var(--text); }

/* === Avatars === */
.avatar {
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-card);
}
.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 48px; height: 48px; }
.avatar-lg { width: 88px; height: 88px; border: 3px solid var(--accent-soft); }

/* === Login page === */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,61,87,0.18), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(80,80,200,0.15), transparent 40%),
        var(--bg);
    padding: 2rem 1rem;
}
.login-container {
    width: 100%;
    max-width: 420px;
    text-align: center;
}
.logo-block { margin-bottom: 2.5rem; }
.logo {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    margin: 0;
}
.tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.4rem;
}
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}
.login-card h2 { margin: 0 0 0.4rem; }
.login-card p { margin: 0 0 1.5rem; }
.footer { margin-top: 2rem; }

/* === Section header === */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.section-header h1 { margin: 0; font-size: 1.8rem; }

/* === Dashboard sections === */
.dashboard-cta {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.25rem;
}
.dashboard-section { margin-bottom: 1.1rem; }
.dashboard-section:last-child { margin-bottom: 0; }
.dashboard-section .stats-grid { margin: 0; }
.section-heading {
    margin: 0 0 0.55rem;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}
button.section-heading {
    width: 100%;
    background: transparent;
    border: none;
    color: inherit;
    padding: 0.2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
}
button.section-heading:hover .section-chevron { color: var(--text); }
.section-chevron {
    color: var(--text-muted);
    transition: transform 0.2s;
    font-size: 0.9rem;
    margin-left: 0.5rem;
    flex-shrink: 0;
}
.dashboard-section.collapsed .section-chevron { transform: rotate(-90deg); }
.dashboard-section.collapsed .section-body { display: none; }
.dashboard-section.collapsed button.section-heading { margin-bottom: 0; }

/* === Featured (active / upcoming) event === */
.featured-event {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}
.featured-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.5rem 1.3rem;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.15s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.featured-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 0% 0%, rgba(255,61,87,0.22), transparent 55%);
}
.featured-card.live { border-color: var(--accent); }
.featured-card.live::before {
    background:
        radial-gradient(circle at 0% 100%, rgba(255,61,87,0.32), transparent 55%),
        radial-gradient(circle at 100% 0%, rgba(80,80,200,0.15), transparent 55%);
    animation: featured-pulse 2.4s ease-in-out infinite;
}
@keyframes featured-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.7; }
}
.featured-card:hover { transform: translateY(-2px); }
.featured-card h3 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: -0.01em;
}
.featured-card .event-time { color: var(--text-muted); font-size: 0.88rem; }
.featured-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}
.featured-stats span {
    background: var(--bg);
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.featured-cta {
    align-self: flex-end;
    margin-top: 0.4rem;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* === Hero countdown / count-up timers === */
.time-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 0.7rem;
    margin-bottom: 0.9rem;
}
.timer-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1.1rem 0.95rem;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.15s, border-color 0.2s;
}
.timer-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 100% 0%, rgba(255,61,87,0.18), transparent 55%);
    pointer-events: none;
    z-index: -1;
}
.timer-card:hover { transform: translateY(-2px); }
.timer-next { border-color: var(--accent); }
.timer-next::before {
    background:
        radial-gradient(circle at 0% 100%, rgba(255,61,87,0.28), transparent 55%),
        radial-gradient(circle at 100% 0%, rgba(80,80,200,0.18), transparent 55%);
}
.timer-last::before {
    background: radial-gradient(circle at 50% 120%, rgba(154,154,163,0.15), transparent 60%);
}
.timer-card-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 800;
}
.timer-next .timer-card-head { color: var(--accent); }
.timer-icon { font-size: 1.05rem; }
.timer-title {
    margin: 0.25rem 0 0.55rem;
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.timer-digits {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0.25rem;
    font-variant-numeric: tabular-nums;
}
.digit-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 42px;
}
.digit {
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text);
    letter-spacing: -0.02em;
    transform-origin: center;
}
.timer-next .digit { color: var(--accent); text-shadow: 0 0 18px rgba(255,61,87,0.35); }
.digit-unit {
    font-size: 0.56rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.14em;
    margin-top: 0.25rem;
    font-weight: 700;
}
.digit-sep {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-muted);
    line-height: 1;
    padding-bottom: 0.75rem;
}
.timer-next .digit-sep { color: var(--accent); opacity: 0.6; }
.digit-sep.blinking { animation: blink 1.05s steps(1) infinite; }
@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.2; }
}
@keyframes digit-flip {
    0%   { transform: translateY(-30%); opacity: 0; }
    60%  { transform: translateY(4%);   opacity: 1; }
    100% { transform: translateY(0);    opacity: 1; }
}
.digit-flip { animation: digit-flip 0.32s ease-out; }

.live-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    animation: pulse 1s ease-in-out infinite;
    box-shadow: 0 0 18px rgba(255,61,87,0.5);
}
@keyframes pulse {
    0%, 100% { transform: scale(1);    box-shadow: 0 0 24px rgba(255,61,87,0.55); }
    50%      { transform: scale(1.04); box-shadow: 0 0 32px rgba(255,61,87,0.85); }
}

.timer-empty .timer-title {
    margin: 0.4rem 0 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: normal;
}
.timer-empty .timer-title strong { color: var(--text); }

@media (max-width: 540px) {
    .digit { font-size: 1.45rem; }
    .digit-sep { font-size: 1.1rem; padding-bottom: 0.65rem; }
    .digit-group { min-width: 36px; }
    .timer-card { padding: 0.75rem 0.9rem; }
}

/* === Tabs === */
.tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}
.tab {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 0.7rem 1rem;
    border-bottom: 2px solid transparent;
    font-weight: 600;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab:hover { color: var(--text); }

/* === Event list === */
.event-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.event-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: transform 0.15s, border-color 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.event-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.event-card h3 { margin: 0; font-size: 1.15rem; }
.event-card .event-time { color: var(--text-muted); font-size: 0.88rem; }
.event-card .event-stats { display: flex; gap: 0.75rem; font-size: 0.85rem; color: var(--text-muted); margin-top: 0.4rem; }
.event-card .badge { align-self: flex-start; }

.badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-elevated);
    color: var(--text-muted);
}
.badge.upcoming { background: rgba(96, 165, 250, 0.18); color: #93c5fd; }
.badge.active { background: rgba(74, 222, 128, 0.18); color: var(--success); }
.badge.ended { background: rgba(154, 154, 163, 0.15); color: var(--text-muted); }

/* === Modal === */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    z-index: 100;
    padding: 1rem;
}
.modal-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--border);
}
.modal-header h2 { margin: 0; font-size: 1.2rem; }
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1rem;
}

/* === Forms === */
.form, .form-inline {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.2rem 1.4rem 1.4rem;
}
.form-inline { flex-direction: row; padding: 0; flex-wrap: wrap; }
.form label, .form-inline label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.form input, .form-inline input {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 0.9rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}
.form input:focus, .form-inline input:focus { border-color: var(--accent); }
.form-inline input { flex: 1; min-width: 200px; }
.toggle-row {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    cursor: pointer;
    padding: 0.5rem 0;
}
.toggle-row input[type=checkbox] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
    cursor: pointer;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.checkbox-row {
    flex-direction: row !important;
    align-items: center;
    gap: 0.6rem !important;
    cursor: pointer;
    color: var(--text) !important;
}
.checkbox-row input[type=checkbox] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.inventory {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.9rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7rem;
}
.inventory legend { padding: 0 0.5rem; font-size: 0.85rem; color: var(--text-muted); }
.inventory.inventory-2 { grid-template-columns: repeat(2, 1fr); }

.inventory-shots {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem;
    margin: 0;
}
.inventory-shots legend { padding: 0 0.5rem; font-size: 0.85rem; color: var(--text-muted); }

.shot-picker-inline {
    padding: 0;
    max-height: 320px;
}
.inv-tile.has-count .inv-pick {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.inv-pick {
    padding-bottom: 0.5rem !important;
    min-height: 110px !important;
}
.inv-counter {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
}
.inv-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.inv-btn:hover { border-color: var(--accent); color: var(--accent); }
.inv-count {
    min-width: 22px;
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}
.inv-tile:not(.has-count) .inv-count { color: var(--text-muted); }

.final-by-drink {
    grid-column: 1 / -1;
    background: var(--bg-elevated);
    padding: 0.8rem;
    border-radius: var(--radius);
}
.final-by-drink ul {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.4rem;
}
.final-by-drink li {
    padding: 0.4rem 0.55rem;
    background: var(--bg);
    border-radius: var(--radius);
    font-size: 0.88rem;
}
.final-by-drink strong { color: var(--accent); }

/* === Event page === */
.event-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.event-hero h1 { margin: 0.5rem 0 0.3rem; }
.hero-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.live-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.stat-card.big { grid-column: span 2; background: linear-gradient(135deg, var(--accent-soft), transparent); border-color: var(--accent); }
.stat-label { color: var(--text-muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-card.big .stat-value { font-size: 2.6rem; color: var(--accent); }

.stat-card-expandable { padding: 0; overflow: hidden; }
.stat-card-head {
    width: 100%;
    background: transparent;
    border: none;
    color: inherit;
    text-align: left;
    padding: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
.stat-card-head > span:first-child {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.stat-chevron {
    font-size: 1.2rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.stat-card-expandable.open .stat-chevron { transform: rotate(180deg); }
.shots-breakdown {
    list-style: none;
    margin: 0;
    padding: 0 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 240px;
    overflow-y: auto;
}
.shots-breakdown li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.7rem;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    font-size: 0.9rem;
}
.shots-breakdown strong {
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 540px) {
    .stat-card.big { grid-column: span 2; }
    .live-stats { grid-template-columns: repeat(2, 1fr); }
}

/* === Action buttons === */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
    margin-bottom: 2rem;
}
.action-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    transition: transform 0.1s, border-color 0.2s, background 0.2s;
    min-height: 130px;
}
.action-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.action-btn:active { transform: scale(0.96); }
.action-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.action-icon { font-size: 2.4rem; line-height: 1; }
.action-label { font-weight: 600; font-size: 0.95rem; }
.action-count {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.action-btn.vomit:hover { border-color: var(--warning); }
.action-btn.vomit .action-count { color: var(--warning); }

/* === Panels === */
.panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}
.panel h2 { margin: 0 0 0.9rem; font-size: 1.1rem; }

.participants {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.participant {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.6rem;
    border-radius: var(--radius);
    background: var(--bg-elevated);
}
.participant .avatar-sm { flex-shrink: 0; margin-top: 0.1rem; }
.participant-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.participant-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 0.6rem;
}
.participant-name {
    font-weight: 600;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.arrival-tag {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.arrival-tag.pending { color: var(--text-muted); }
.participant.pending { opacity: 0.7; }
.participant-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.participant-stats span {
    background: var(--bg);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
}

.notes-form {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}
.notes-form input {
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    outline: none;
    flex: 1;
    min-width: 110px;
}
.notes-form input:focus { border-color: var(--accent); }

.notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 320px;
    overflow-y: auto;
}
.note {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.9rem;
}
.note.done { opacity: 0.55; }
.note.done .note-text { text-decoration: line-through; }
.note-main {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}
.note-main input[type=checkbox] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}
.note-text {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.note-meta {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.note-remove { color: var(--text-muted); }
.note-remove:hover { color: var(--danger); }

.vomit-list, .feed, .history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 320px;
    overflow-y: auto;
}
.vomit-list li, .feed li, .history-list li {
    background: var(--bg-elevated);
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}
.feed time, .history-list time { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }

.shot-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.55rem;
    padding: 1rem 1.4rem 1.4rem;
    max-height: 60vh;
    overflow-y: auto;
}
.shot-pick-wrap { position: relative; display: flex; }
.shot-pick {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.95rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: var(--text);
    transition: border-color 0.2s, background 0.2s, transform 0.08s;
    cursor: pointer;
    min-height: 92px;
}
.shot-pick:hover { border-color: var(--accent); }
.shot-pick:active { transform: scale(0.96); }
.shot-pick-icon { font-size: 1.8rem; line-height: 1; }
.shot-pick-label {
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.shot-pick-other { border-style: dashed; opacity: 0.85; }
.shot-pick-add {
    border-style: dashed;
    color: var(--accent);
    background: transparent;
}
.shot-pick-add .shot-pick-icon { color: var(--accent); }
.shot-pick-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.shot-pick-remove:hover { color: var(--danger); border-color: var(--danger); }
.add-drink-form {
    grid-column: 1 / -1;
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    padding: 0.6rem;
    background: var(--bg-elevated);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}
.add-drink-form input {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0.7rem;
    font-size: 0.9rem;
    outline: none;
}
.add-drink-form input#newDrinkIcon { width: 56px; text-align: center; }
.add-drink-form input#newDrinkLabel { flex: 1; min-width: 140px; }
.add-drink-form input:focus { border-color: var(--accent); }

.blackout-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 320px;
    overflow-y: auto;
    padding: 0;
}
.blackout-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.8rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.blackout-row:hover { border-color: var(--accent); }
.blackout-row input[type=checkbox] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}
.blackout-row input[type=checkbox]:checked ~ span { color: var(--accent); font-weight: 600; }
.blackout-row:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.blackout-entry strong { color: var(--accent); text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.05em; }

.memories-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}
.memories-panel .panel-header h2 { margin: 0; font-size: 1.1rem; }
.memories-panel label.btn { margin: 0; }
.memory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
    max-height: 480px;
    overflow-y: auto;
}
.memory-tile {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-elevated);
    cursor: zoom-in;
}
.memory-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}
.memory-tile:hover img { transform: scale(1.04); }
.memory-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
}
.memory-remove:hover { background: var(--danger); }
.memory-by {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75), transparent);
    color: #fff;
    padding: 0.6rem 0.5rem 0.3rem;
    font-size: 0.72rem;
    pointer-events: none;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.lightbox {
    background: rgba(0,0,0,0.94);
    z-index: 200;
    padding: 1rem;
}
.lightbox img {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.lightbox-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.4rem;
    z-index: 1;
}
.lightbox-action {
    background: rgba(0,0,0,0.5) !important;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 1.25rem;
    line-height: 1;
    display: grid !important;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
}
.lightbox-action:hover { background: rgba(0,0,0,0.75) !important; }
.lightbox-meta {
    position: absolute;
    bottom: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text);
    background: rgba(0,0,0,0.55);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    pointer-events: none;
}

.final-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}
.final-summary div {
    background: var(--bg-elevated);
    padding: 0.7rem;
    border-radius: var(--radius);
}
.final-summary strong { display: block; font-size: 1.3rem; color: var(--accent); }

/* === Leaderboards (stats page) === */
.leaderboards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}
.leaderboard {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    counter-reset: lb;
}
.leaderboard li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-elevated);
    border-radius: var(--radius);
    font-size: 0.9rem;
}
.lb-rank {
    min-width: 28px;
    text-align: center;
    color: var(--text-muted);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.lb-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}
.lb-value {
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.lb-icon { font-size: 1.2rem; flex-shrink: 0; }

/* === Profile === */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.profile-hero h1 { margin: 0; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
    margin: 1.25rem 0;
}

/* === Empty states === */
.empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

/* === Mobile tweaks === */
@media (max-width: 640px) {
    .topbar { padding: 0.75rem 1rem; gap: 0.5rem; }
    .topbar .nav-link { padding: 0.4rem 0.6rem; }
    .container { padding: 1rem 1rem 3rem; }
    .section-header h1 { font-size: 1.5rem; }
    .logo { font-size: 2.2rem; }
    .action-icon { font-size: 2rem; }
    .stat-value { font-size: 1.6rem; }
    .stat-card.big .stat-value { font-size: 2rem; }
    .user-chip span { display: none; }
}
