/* ==========================================================================
   Decked Out — "Booth" design system
   Flat dark surfaces, hairline borders, expanded display type, mono set
   times, and one accent reserved for open slots and primary actions.
   No backdrop-filter / blur: everything here is cheap to paint.
   ========================================================================== */

/* ── Fonts (self-hosted, OFL) ─────────────────────────────────────────── */
@font-face {
    font-family: 'Geist';
    src: url('../fonts/geist-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist Mono';
    src: url('../fonts/geist-mono-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Archivo';
    src: url('../fonts/archivo-display-var.woff2') format('woff2');
    font-weight: 600 900;
    font-stretch: 100% 125%;
    font-style: normal;
    font-display: swap;
}

/* ── Tokens: default theme ("Dark Graphite" = Booth) ───────────────────── */
:root,
html[data-theme='dark-graphite'] {
    color-scheme: dark;
    --bg: #0a0a0b;
    --bg-2: #0e0e10;
    --card: #131315;
    --surface-sub: #19191c;
    --surface-hover: #1f1f23;
    --input-bg: #0e0e10;
    --sidebar-bg: #0c0c0e;
    --sidebar-options-bg: #131315;
    --text: #f2f1ec;
    --muted: #8f8d87;
    --faint: #5f5d59;
    --line: #232327;
    --line-strong: #34343a;
    --accent: #d4ff3a;
    --accent-ink: #0b0b0c;
    --accent-2: #f2f1ec;
    --danger: #ff5a47;
    --danger-ink: #0b0b0c;
    --good: #d4ff3a;
    --warn: #ffb547;
    --logo-ink: #0b0b0c;
}

html[data-theme='dark-emerald'] {
    color-scheme: dark;
    --bg: #070c0a;
    --bg-2: #0a110e;
    --card: #0f1814;
    --surface-sub: #14201b;
    --surface-hover: #1a2822;
    --input-bg: #0a110e;
    --sidebar-bg: #08100c;
    --sidebar-options-bg: #0f1814;
    --text: #e8f5ee;
    --muted: #84a395;
    --faint: #557064;
    --line: #1c2a24;
    --line-strong: #293c33;
    --accent: #3dffa0;
    --accent-ink: #04120b;
    --accent-2: #e8f5ee;
    --danger: #ff6b5e;
    --good: #3dffa0;
    --logo-ink: #04120b;
}

/* "Laser Room": deep violet-black, cyan action, magenta bookings */
html[data-theme='dark-indigo'] {
    color-scheme: dark;
    --bg: #07060b;
    --bg-2: #0b0912;
    --card: #100e18;
    --surface-sub: #161322;
    --surface-hover: #1d1a2c;
    --input-bg: #0b0912;
    --sidebar-bg: #09080f;
    --sidebar-options-bg: #100e18;
    --text: #edebff;
    --muted: #9893bf;
    --faint: #625d85;
    --line: #221e36;
    --line-strong: #322c4f;
    --accent: #2ee6ff;
    --accent-ink: #050611;
    --accent-2: #ff5ca8;
    --danger: #ff4d7d;
    --good: #2ee6ff;
    --logo-ink: #050611;
}

html[data-theme='dark-crimson'] {
    color-scheme: dark;
    --bg: #0c0809;
    --bg-2: #120c0d;
    --card: #171012;
    --surface-sub: #1f1518;
    --surface-hover: #281b1f;
    --input-bg: #120c0d;
    --sidebar-bg: #0e090a;
    --sidebar-options-bg: #171012;
    --text: #fbecee;
    --muted: #b0939a;
    --faint: #745d62;
    --line: #2a1d21;
    --line-strong: #3d2a30;
    --accent: #ff3d5a;
    --accent-ink: #120507;
    --accent-2: #fbecee;
    --danger: #ff7a5c;
    --good: #ff8fa1;
    --logo-ink: #120507;
}

/* "Flyer": paper + ink + orange */
html[data-theme='light-sand'] {
    color-scheme: light;
    --bg: #ede8dd;
    --bg-2: #e6e0d3;
    --card: #f6f2ea;
    --surface-sub: #ebe5d9;
    --surface-hover: #e2dbcd;
    --input-bg: #fbf9f4;
    --sidebar-bg: #e8e2d6;
    --sidebar-options-bg: #f6f2ea;
    --text: #141210;
    --muted: #645e55;
    --faint: #958d80;
    --line: #d6cebf;
    --line-strong: #c2b8a6;
    --accent: #ff5a1f;
    --accent-ink: #141210;
    --accent-2: #141210;
    --danger: #c8321e;
    --danger-ink: #ffffff;
    --good: #1f7a3a;
    --warn: #a86200;
    --logo-ink: #141210;
}

html[data-theme='light-sea'] {
    color-scheme: light;
    --bg: #eef2f4;
    --bg-2: #e6ecef;
    --card: #f8fafb;
    --surface-sub: #e9eff2;
    --surface-hover: #dfe7eb;
    --input-bg: #ffffff;
    --sidebar-bg: #e7edf0;
    --sidebar-options-bg: #f8fafb;
    --text: #0f1a20;
    --muted: #536570;
    --faint: #8b9ba4;
    --line: #d2dde2;
    --line-strong: #b9c8cf;
    --accent: #1a4bff;
    --accent-ink: #ffffff;
    --accent-2: #0f1a20;
    --danger: #c42b3c;
    --danger-ink: #ffffff;
    --good: #0f7a55;
    --warn: #9a6200;
    --logo-ink: #ffffff;
}

/* Shared, theme-derived tokens */
:root {
    --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
    --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
    --danger-soft: color-mix(in srgb, var(--danger) 14%, transparent);
    --danger-line: color-mix(in srgb, var(--danger) 45%, transparent);
    --good-soft: color-mix(in srgb, var(--good) 14%, transparent);
    --warn-soft: color-mix(in srgb, var(--warn, #ffb547) 16%, transparent);
    /* Flat: depth comes from borders, not shadows. Only modals lift off the page. */
    --shadow: none;
    --shadow-pop: 0 16px 48px rgba(0, 0, 0, 0.35);
    --radius: 12px;
    --radius-sm: 7px;
    --radius-lg: 16px;
    --font-ui: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
    --font-display: 'Archivo', 'Geist', ui-sans-serif, system-ui, 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
    --ease: cubic-bezier(.16, 1, .3, 1);
}

/* Legacy slot tokens (kept for any markup still referencing them) */
html {
    --slot-count-bg: var(--surface-sub);
    --slot-count-border: var(--line);
    --slot-open-bg: var(--accent-soft);
    --slot-open-bg-hover: color-mix(in srgb, var(--accent) 22%, transparent);
    --slot-open-border: var(--accent-line);
    --slot-open-border-hover: var(--accent);
    --slot-open-shadow: none;
    --slot-booked-bg: var(--surface-sub);
    --slot-booked-bg-hover: var(--surface-hover);
    --slot-booked-border: var(--line-strong);
    --slot-booked-border-hover: var(--muted);
    --slot-booked-shadow: none;
    --slot-locked-bg: var(--surface-sub);
    --slot-locked-bg-hover: var(--surface-hover);
    --slot-locked-border: var(--line);
    --slot-locked-border-hover: var(--line-strong);
}

/* ── Base ─────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.5;
    font-feature-settings: 'ss01', 'cv11';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--accent);
    color: var(--accent-ink);
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 800;
    font-stretch: 112%;
    margin-top: 0;
    line-height: 1.08;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 1.15rem;
    font-weight: 750;
    font-stretch: 108%;
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
}

h3 {
    font-size: 1.02rem;
    font-weight: 750;
    font-stretch: 104%;
}

a {
    color: var(--accent);
    text-underline-offset: 3px;
}

p {
    margin-top: 0;
}

code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: .88em;
}

.icon {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
    vertical-align: -0.18em;
}

.icon-xs {
    width: .95em;
    height: .95em;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.muted {
    color: var(--muted);
    margin-bottom: 0.2rem;
}

.hint {
    color: var(--muted);
    font-size: .88rem;
    margin: .15rem 0 0;
    line-height: 1.55;
}

.hint a,
.muted a {
    color: var(--text);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
    margin: 0 0 .7rem;
}

.eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.sub {
    color: var(--muted);
    max-width: 60ch;
    line-height: 1.6;
    margin: 0;
}

/* ── Form controls ────────────────────────────────────────────────────── */
label {
    display: grid;
    gap: 0.4rem;
    font-weight: 600;
    font-size: .86rem;
}

input, textarea, select, button {
    font: inherit;
}

input, textarea, select {
    width: 100%;
    border: 1px solid var(--line-strong);
    background: var(--input-bg);
    border-radius: var(--radius-sm);
    padding: 0.62rem 0.75rem;
    color: var(--text);
    font-weight: 450;
    font-size: .92rem;
    transition: border-color .12s ease, box-shadow .12s ease, background-color .12s ease;
}

input::placeholder,
textarea::placeholder {
    color: var(--faint);
}

input:hover, textarea:hover, select:hover {
    border-color: var(--muted);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

input[readonly] {
    cursor: pointer;
}

input[type='checkbox'],
input[type='radio'] {
    width: auto;
    accent-color: var(--accent);
}

textarea {
    min-height: 6rem;
    line-height: 1.5;
    resize: vertical;
}

select {
    cursor: pointer;
}

button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 650;
    font-size: .9rem;
    letter-spacing: .005em;
    padding: 0.62rem 1rem;
    cursor: pointer;
    transition: transform .12s var(--ease), background-color .12s ease, border-color .12s ease, color .12s ease, filter .12s ease;
}

button:hover {
    filter: brightness(1.08);
}

button:active {
    transform: scale(.97);
}

button[disabled] {
    opacity: .45;
    cursor: not-allowed;
    filter: none;
    transform: none;
}

button.danger {
    background: var(--danger);
    color: var(--danger-ink, #0b0b0c);
}

.btn-sm {
    padding: .42rem .75rem !important;
    font-size: .82rem !important;
}

.btn-cancel {
    background: transparent !important;
    color: var(--muted) !important;
    border: 1px solid var(--line-strong) !important;
}

.btn-cancel:hover {
    color: var(--text) !important;
    background: var(--surface-sub) !important;
    filter: none;
}

/* ── Landing ──────────────────────────────────────────────────────────── */
.landing {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.landing-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 850;
    font-stretch: 118%;
    text-transform: uppercase;
    letter-spacing: .02em;
    font-size: .95rem;
    white-space: nowrap;
}

.landing-brand .brand-logo {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.landing-locale {
    width: min(180px, 46vw);
    margin: 0;
}

.landing-locale label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.landing-locale select {
    padding: .45rem .6rem;
    font-size: .82rem;
}

.landing-hero {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: clamp(1.5rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 3rem) 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.landing-wordmark {
    font-family: var(--font-display);
    font-weight: 900;
    font-stretch: 125%;
    text-transform: uppercase;
    font-size: clamp(2.7rem, 7.6vw, 6.4rem);
    line-height: .86;
    letter-spacing: -0.02em;
    margin: 0 0 1.4rem;
}

:lang(ja) .landing-wordmark {
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 1.05;
}

.landing-wordmark span {
    display: block;
}

.landing-wordmark .outline {
    color: var(--muted);
}

.landing-wordmark .lit {
    color: var(--accent);
}

.landing-intro {
    display: grid;
    gap: 1rem;
    align-content: center;
}

.landing-intro .sub {
    font-size: 1.05rem;
    max-width: 52ch;
}

.landing-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .9rem 1.2rem;
    margin-top: .6rem;
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1.35rem;
    background: var(--accent);
    color: var(--accent-ink);
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: filter .12s ease, transform .12s var(--ease);
}

.btn-discord .icon {
    width: 1.25em;
    height: 1.25em;
}

.btn-discord:hover {
    filter: brightness(1.08);
}

.btn-discord:active {
    transform: scale(.98);
}

.landing-cta .hint {
    margin: 0;
    max-width: 34ch;
}

.landing-points {
    list-style: none;
    padding: 0;
    margin: 1.2rem 0 0;
    display: grid;
    gap: 0;
    border-top: 1px solid var(--line);
}

.landing-point {
    display: grid;
    grid-template-columns: 2.4rem 1fr;
    gap: .75rem;
    align-items: baseline;
    padding: .8rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-weight: 500;
}

.landing-point-num {
    font-family: var(--font-mono);
    font-size: .74rem;
    color: var(--accent);
    letter-spacing: .08em;
}

/* Lineup "product shot" card */
.lineup-card {
    background: var(--card);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.lineup-card-head {
    padding: 1.1rem 1.25rem 1rem;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: .35rem;
}

.lineup-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

.lineup-card-meta .live {
    color: var(--accent);
}

.lineup-card-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 900;
    font-stretch: 125%;
    text-transform: uppercase;
    font-size: 1.7rem;
    line-height: .95;
}

.lineup-rows {
    list-style: none;
    margin: 0;
    padding: .35rem 0;
}

.lineup-row {
    display: grid;
    grid-template-columns: 4.6rem 1fr auto;
    align-items: center;
    gap: .9rem;
    padding: .62rem 1.25rem;
    border-bottom: 1px dashed var(--line);
}

.lineup-row:last-child {
    border-bottom: 0;
}

.lineup-time {
    font-family: var(--font-mono);
    font-size: .8rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.lineup-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-stretch: 112%;
    text-transform: uppercase;
    font-size: 1.02rem;
    letter-spacing: .01em;
}

.lineup-tag {
    font-family: var(--font-mono);
    font-size: .66rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: .15rem .5rem;
}

.lineup-row.is-open .lineup-name {
    color: var(--accent);
}

.lineup-row.is-open .lineup-tag {
    color: var(--accent);
    border-color: var(--accent-line);
    border-style: dashed;
}

.lineup-row.is-locked {
    background: var(--surface-sub);
}

.lineup-row.is-locked .lineup-name {
    color: var(--faint);
}

.landing-ticker {
    border-block: 1px solid var(--line);
    overflow: hidden;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: .76rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: auto;
}

.landing-ticker-track {
    display: inline-flex;
    padding: .85rem 0;
    animation: ticker 48s linear infinite;
    will-change: transform;
}

.landing-ticker-track span {
    padding-right: 2.2rem;
}

.landing-ticker-track span::after {
    content: '///';
    margin-left: 2.2rem;
    color: var(--accent);
}

@keyframes ticker {
    to { transform: translateX(-50%); }
}

.landing-lower {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 2.5rem clamp(1.25rem, 4vw, 3rem) 3rem;
    display: grid;
    gap: 1.5rem;
}

.landing-footer {
    width: min(1180px, 100%);
    margin: 0 auto;
    padding: 1.25rem clamp(1.25rem, 4vw, 3rem) 2rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--faint);
}

.landing-footer a {
    color: var(--muted);
}

/* Legacy landing wrappers (privacy page uses hero-card) */
.hero-card {
    position: relative;
    z-index: 1;
    width: min(1040px, 96%);
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: clamp(1.4rem, 3.4vw, 2.6rem);
}

.landing-layout {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: clamp(1rem, 2.8vw, 2rem);
}

.landing-login {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-sub);
    padding: 1.25rem;
    display: grid;
    gap: .75rem;
}

.landing-login-copy {
    color: var(--muted);
    margin: 0;
}

.login-form {
    margin-top: 1.4rem;
    display: grid;
    gap: 0.7rem;
}

/* Supporter credits wall */
.credits-wall {
    display: grid;
    gap: 1.1rem;
}

.credits-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.credits-head h2 {
    margin: 0;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    font-weight: 900;
    font-stretch: 122%;
    text-transform: uppercase;
}

.credits-head .eyebrow {
    margin-bottom: .45rem;
}

.credits-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.credit-item {
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: .42rem .9rem;
    background: var(--card);
    display: inline-flex;
    gap: .4rem;
    align-items: center;
}

.credit-item strong {
    font-size: .9rem;
    font-weight: 600;
}

.credit-item span {
    font-size: .8rem;
    color: var(--muted);
}

/* ── Locale selector ──────────────────────────────────────────────────── */
.locale-form {
    display: grid;
    gap: .35rem;
}

.locale-form label {
    color: var(--muted);
    font-size: .74rem;
    font-weight: 600;
}

.locale-control {
    display: block;
}

.locale-control select {
    min-width: 0;
    width: 100%;
}

.sidebar-locale {
    margin-top: .6rem;
}

/* ── App shell ────────────────────────────────────────────────────────── */
.shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    border-right: 1px solid var(--line);
    background: var(--sidebar-bg);
    padding: 1.1rem .9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .9rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .15rem .35rem .35rem;
    color: inherit;
    text-decoration: none;
}

.brand-icon {
    display: inline-flex;
    line-height: 1;
}

.brand-logo {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.brand-text,
.brand {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 900;
    font-stretch: 122%;
    text-transform: uppercase;
    letter-spacing: .01em;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: .65rem;
    color: var(--muted);
    text-decoration: none;
    font-weight: 550;
    font-size: .9rem;
    padding: 0.52rem 0.65rem;
    border-radius: var(--radius-sm);
    transition: background-color .12s ease, color .12s ease;
}

.nav-link:hover {
    background: var(--surface-sub);
    color: var(--text);
}

.nav-link.active {
    background: var(--surface-sub);
    color: var(--text);
    font-weight: 650;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: -0.9rem;
    top: 22%;
    bottom: 22%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
}

.nav-link.active .nav-icon {
    color: var(--accent);
}

.nav-icon {
    display: inline-flex;
    width: 1.2rem;
    justify-content: center;
    font-size: 1rem;
}

.nav-icon .icon {
    width: 18px;
    height: 18px;
}

.nav-link-invite {
    color: var(--accent-ink);
    background: var(--accent);
    font-weight: 700;
    margin-bottom: .45rem;
}

.nav-link-invite:hover {
    background: var(--accent);
    color: var(--accent-ink);
    filter: brightness(1.08);
}

.logout {
    margin-top: auto;
    color: var(--danger);
    text-decoration: none;
    font-weight: 700;
}

.guild-pill {
    background: var(--surface-sub);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    width: fit-content;
}

/* Server switcher */
.server-switch-form {
    margin: 0;
    display: grid;
    gap: .4rem;
    width: 100%;
    min-width: 0;
}

.sidebar-guild {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-width: 0;
}

.server-switcher {
    display: block;
    width: 100%;
    min-width: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: .45rem .5rem;
    transition: border-color .12s ease;
}

.server-switcher:hover,
.server-switcher[open] {
    border-color: var(--line-strong);
}

.server-switcher-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .45rem;
    min-width: 0;
}

.server-switcher-summary::-webkit-details-marker {
    display: none;
}

.server-switcher-summary::after {
    content: '';
    width: 7px;
    height: 7px;
    margin-right: .25rem;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    transform: translateY(-2px) rotate(45deg);
    transition: transform .15s var(--ease);
    flex-shrink: 0;
}

.server-switcher[open] .server-switcher-summary::after {
    transform: translateY(2px) rotate(-135deg);
}

.server-switcher-summary-main {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
}

.guild-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.guild-icon-fallback,
.server-option-icon-fallback {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-sub);
    color: var(--muted);
    flex-shrink: 0;
}

.server-option-icon-fallback {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

.guild-name-text {
    font-weight: 650;
    font-size: .88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.server-switcher-list {
    margin-top: .5rem;
    width: 100%;
    min-width: 0;
    border-top: 1px solid var(--line);
    padding-top: .35rem;
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

.server-switcher-option {
    width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    font-size: .84rem;
    font-weight: 550;
    padding: .42rem .45rem;
}

.server-switcher-option:hover {
    background: var(--surface-sub);
    filter: none;
}

.server-switcher-option.is-current {
    background: var(--surface-sub);
    font-weight: 650;
}

.server-option-main {
    display: flex;
    flex: 1;
    align-items: center;
    gap: .5rem;
    min-width: 0;
    overflow: hidden;
}

.server-option-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.server-option-name {
    display: block;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.server-option-current {
    font-family: var(--font-mono);
    font-size: .64rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
    flex-shrink: 0;
}

.server-switch-empty {
    font-size: .86rem;
    color: var(--muted);
    padding: .45rem .5rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

/* Sidebar footer */
.sidebar-options {
    margin-top: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: .7rem;
    background: var(--sidebar-options-bg);
    display: grid;
    gap: .35rem;
}

.sidebar-options-title {
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--faint);
    margin-bottom: .15rem;
}

.sidebar-options-label {
    font-size: .74rem;
    color: var(--muted);
    font-weight: 600;
}

.sidebar-options-select,
.sidebar-options select {
    width: 100%;
    font-size: .82rem;
    font-weight: 550;
    padding: .4rem .5rem;
}

.sidebar-support-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: .52rem .65rem;
    color: var(--muted);
    font-weight: 600;
    font-size: .88rem;
    text-decoration: none;
    transition: color .12s ease, border-color .12s ease, background-color .12s ease;
}

.sidebar-support-link:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: var(--surface-sub);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem .35rem 0;
    border-top: 1px solid var(--line);
}

.sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar-avatar-fallback {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-sub);
    color: var(--muted);
    flex-shrink: 0;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
}

.sidebar-username {
    font-weight: 650;
    font-size: .88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout-form {
    margin: 0;
}

.sidebar-logout {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    justify-content: flex-start;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 550;
}

.sidebar-logout:hover {
    color: var(--danger);
    filter: none;
}

/* ── Main column ──────────────────────────────────────────────────────── */
.main {
    padding: clamp(1.1rem, 2.4vw, 2.2rem) clamp(1rem, 2.8vw, 2.6rem) 3rem;
    display: grid;
    gap: 1.1rem;
    align-content: start;
    grid-auto-rows: max-content;
    min-width: 0;
}

.main > * {
    min-width: 0;
}

.page-header {
    padding: .3rem 0 .4rem;
}

.page-header h1 {
    margin-bottom: .45rem;
    font-size: clamp(1.8rem, 3.4vw, 2.7rem);
    font-weight: 900;
    font-stretch: 125%;
    text-transform: uppercase;
    letter-spacing: -0.015em;
}

.page-header .muted {
    margin: 0;
    max-width: 70ch;
}

.header-card,
.card {
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: clamp(1rem, 1.8vw, 1.4rem);
}

.card > h2:first-child {
    margin-bottom: 1rem;
}

.header-card {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    padding: clamp(1.2rem, 2.6vw, 2rem);
    background: var(--card);
}

.header-card h1 {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 3.2rem);
    font-weight: 900;
    font-stretch: 125%;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(92px, 1fr));
    gap: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.stat {
    padding: .75rem 1rem;
    text-align: left;
    background: var(--bg-2);
    border-right: 1px solid var(--line);
}

.stat:last-child {
    border-right: 0;
}

.stat span {
    display: block;
    font-family: var(--font-display);
    font-weight: 900;
    font-stretch: 112%;
    font-size: 1.85rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat small {
    display: block;
    margin-top: .35rem;
    font-family: var(--font-mono);
    font-size: .66rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}

a.stat {
    text-decoration: none;
    color: inherit;
    transition: background-color .12s ease;
}

a.stat:hover {
    background: var(--surface-sub);
}

a.stat:hover span {
    color: var(--accent);
}

/* Overview */
.overview-split {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr);
    gap: 1.1rem;
    align-items: start;
}

.overview-left {
    min-width: 0;
    display: grid;
    gap: 1.1rem;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.quick-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: .2rem;
    background: var(--card);
    padding: 1rem 1.05rem 1.1rem;
    text-decoration: none;
    color: inherit;
    min-height: 118px;
    box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line);
    transition: background-color .14s ease;
}

.quick-card::after {
    content: '';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 8px;
    height: 8px;
    border-top: 1.5px solid var(--faint);
    border-right: 1.5px solid var(--faint);
    transition: transform .18s var(--ease), border-color .14s ease;
}

.quick-card:hover {
    background: var(--surface-sub);
}

.quick-card:hover::after {
    border-color: var(--accent);
    transform: translate(2px, -2px);
}

.quick-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--surface-sub);
    color: var(--accent);
    margin-bottom: .55rem;
    font-size: 1.1rem;
}

.quick-icon .icon {
    width: 18px;
    height: 18px;
}

.quick-card strong {
    font-weight: 650;
}

.quick-card .muted {
    font-size: .8rem;
    line-height: 1.4;
    margin: 0;
}

.clubs-showcase-card,
.my-sets-card {
    margin-top: 0;
}

.my-sets-card-right {
    align-self: start;
}

.my-sets-head,
.clubs-showcase-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .6rem;
}

.my-sets-head h2,
.clubs-showcase-head h2 {
    margin: 0;
}

.my-sets-list {
    display: grid;
    gap: 0;
    margin-top: .3rem;
    border-top: 1px solid var(--line);
}

.my-sets-item {
    display: grid;
    gap: .3rem;
    text-decoration: none;
    color: inherit;
    padding: .8rem .2rem;
    border-bottom: 1px solid var(--line);
    transition: background-color .12s ease, padding .18s var(--ease);
}

.my-sets-item:hover {
    background: var(--surface-sub);
    padding-left: .6rem;
}

.my-sets-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .55rem;
}

.my-sets-item-top strong {
    font-family: var(--font-display);
    font-weight: 800;
    font-stretch: 112%;
    text-transform: uppercase;
    font-size: 1rem;
    line-height: 1.2;
}

.my-sets-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .9rem;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .02em;
}

.my-sets-meta span:last-child {
    color: var(--accent);
}

.my-sets-more {
    margin: .7rem 0 0;
}

.showcase-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .55rem;
    margin-bottom: .55rem;
}

.clubs-showcase-list {
    margin-top: .5rem;
    display: grid;
    gap: .7rem;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.clubs-showcase-item {
    display: grid;
    gap: .6rem;
    justify-items: start;
    text-decoration: none;
    color: inherit;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: .9rem;
    transition: border-color .14s ease, transform .18s var(--ease);
}

.clubs-showcase-item:hover {
    border-color: var(--accent-line);
    transform: translateY(-2px);
}

.clubs-guild-icon-wrap {
    width: 52px;
    height: 52px;
}

.clubs-guild-icon,
.clubs-guild-icon-fallback {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
}

.clubs-guild-icon-fallback {
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: var(--surface-sub);
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: 900;
    font-stretch: 125%;
    font-size: 1.5rem;
}

.clubs-showcase-clubname {
    display: block;
    font-family: var(--font-display);
    font-size: .98rem;
    font-weight: 800;
    font-stretch: 108%;
    text-transform: uppercase;
    line-height: 1.15;
}

.clubs-showcase-cta {
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
}

.clubs-showcase-cta::after {
    content: ' ↗';
}

/* Bubble embed (legacy) */
.bubble-embed-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin-bottom: .7rem;
    flex-wrap: wrap;
}

.bubble-embed-head h2 { margin: 0; }
.bubble-embed-head a { font-size: .86rem; font-weight: 600; text-decoration: none; }
.bubble-embed-card { margin-top: 0; align-self: start; }
.bubble-toggle-btn { margin-top: .15rem; }
.bubble-embed-panel { margin-top: .75rem; }

.bubble-embed-frame-wrap {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-sub);
    overflow: hidden;
    min-height: 260px;
    max-height: 520px;
}

.bubble-embed-frame-wrap iframe {
    width: 100%;
    min-height: 260px;
    height: 420px;
    border: 0;
    display: block;
}

/* ── Generic layout helpers ───────────────────────────────────────────── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
}

.form-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.form-grid button {
    align-self: end;
}

.grid.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 0.9rem;
}

.mini-card {
    background: var(--surface-sub);
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    padding: 0.9rem;
}

.mini-card ul {
    margin: 0;
    padding-left: 1rem;
    color: var(--muted);
}

.sync-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem;
}

.code-pill {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    letter-spacing: 0.12em;
    margin: 0;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 0.8rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

th, td {
    border-bottom: 1px solid var(--line);
    padding: 0.6rem;
    text-align: left;
    vertical-align: top;
}

th {
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

.inline-form {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
}

.inline-form-stacked {
    display: grid;
    gap: 0.4rem;
}

/* Flash messages & notices */
.flash,
.alert {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.9rem;
    margin-bottom: 0.4rem;
    border: 1px solid var(--line-strong);
    background: var(--card);
    font-size: .9rem;
}

.flash::before,
.alert::before {
    content: '';
    width: 8px;
    height: 8px;
    margin-top: .42em;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--muted);
}

.flash.success {
    border-color: var(--line-strong);
    border-left: 3px solid var(--good);
}

.flash.success::before {
    background: var(--good);
}

.flash.error,
.alert-error {
    border-color: var(--line-strong);
    border-left: 3px solid var(--danger);
}

.flash.error::before,
.alert-error::before {
    background: var(--danger);
}

.notice-warn {
    padding: .55rem .75rem;
    border-radius: var(--radius-sm);
    border: 1px solid color-mix(in srgb, var(--warn, #ffb547) 45%, transparent);
    background: var(--warn-soft);
    color: var(--text);
    font-size: .85rem;
}

.empty-state {
    text-align: center;
    padding: 2.2rem 1rem;
    color: var(--muted);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
}

.empty-state > span:first-child {
    display: inline-block;
    filter: grayscale(1);
    opacity: .55;
}

.empty-state p {
    margin: .5rem 0 0;
}

/* ── Forms ────────────────────────────────────────────────────────────── */
.event-form,
.setup-form {
    display: grid;
    gap: .1rem;
}

.form-section {
    margin-bottom: 1.4rem;
}

.form-section:last-of-type {
    margin-bottom: 0;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-family: var(--font-mono);
    font-size: .7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--muted);
    margin: 0 0 .8rem;
}

.form-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: .8rem;
    margin-bottom: .75rem;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.field-hint {
    display: block;
    font-weight: 400;
    font-size: .76rem;
    color: var(--muted);
    margin-bottom: .1rem;
}

.genre-field-wrap {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.genre-field-wrap input {
    flex: 1;
}

.genre-picker-open {
    white-space: nowrap;
}

/* ── Tags & badges ────────────────────────────────────────────────────── */
.tag,
.event-card-genre,
.count-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
    border-radius: 999px;
    padding: .2rem .55rem;
    border: 1px solid var(--line-strong);
    color: var(--muted);
    background: transparent;
    vertical-align: middle;
}

.tag-type {
    color: var(--accent);
    border-color: var(--accent-line);
}

.tag-green {
    color: var(--good);
    border-color: color-mix(in srgb, var(--good) 45%, transparent);
}

.count-badge {
    color: var(--text);
    background: var(--surface-sub);
    border-color: var(--line);
    font-variant-numeric: tabular-nums;
    margin-left: .1rem;
}

.status-badge {
    font-size: .7rem;
}

.status-pending {
    color: var(--warn, #ffb547);
    border-color: color-mix(in srgb, var(--warn, #ffb547) 45%, transparent);
    background: var(--warn-soft);
}

.status-approved {
    color: var(--good);
    border-color: color-mix(in srgb, var(--good) 45%, transparent);
    background: var(--good-soft);
}

.status-denied {
    color: var(--danger);
    border-color: var(--danger-line);
    background: var(--danger-soft);
}

/* ── Events ───────────────────────────────────────────────────────────── */
.event-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.event-backups {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
    margin: 0;
}

.event-backups-label {
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-right: .3rem;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.6rem;
    font-weight: 500;
}

.event-list-divider {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin: .6rem 0 0;
    font-family: var(--font-mono);
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}

.event-list-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

.event-card {
    position: relative;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.15rem 1.2rem 1.2rem;
    display: grid;
    gap: 1rem;
    width: 100%;
    transition: border-color .14s ease;
    content-visibility: auto;
    contain-intrinsic-size: auto 280px;
}

.event-card:hover {
    border-color: var(--line-strong);
}

.event-card-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        'title actions'
        'meta  meta';
    gap: .7rem 1rem;
    align-items: start;
}

.event-card-title {
    grid-area: title;
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    min-width: 0;
}

.event-card-title h3 {
    margin: 0;
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    font-weight: 900;
    font-stretch: 122%;
    text-transform: uppercase;
    letter-spacing: -0.005em;
    min-width: 0;
    word-break: break-word;
}

.event-card-genre {
    color: var(--accent);
    border-color: var(--accent-line);
}

.event-card-meta {
    grid-area: meta;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .3rem 0;
    font-family: var(--font-mono);
    font-size: .76rem;
    color: var(--muted);
}

.meta-item {
    white-space: nowrap;
    color: var(--muted);
}

.event-card-meta .meta-item + .meta-item::before {
    content: '/';
    margin: 0 .6rem;
    color: var(--faint);
}

.meta-highlight {
    color: var(--accent);
}

.event-card-actions {
    grid-area: actions;
    display: flex;
    gap: .4rem;
    flex-shrink: 0;
}

.event-card-header > .notice-warn {
    grid-area: actions;
}

.btn-icon-small {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: .95rem;
}

.btn-icon-small .icon {
    width: 16px;
    height: 16px;
}

.btn-icon-small:hover {
    color: var(--text);
    background: var(--surface-sub);
    border-color: var(--muted);
    filter: none;
}

.btn-delete:hover {
    color: var(--danger);
    border-color: var(--danger-line);
    background: var(--danger-soft);
}

.event-copy-actions {
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
    margin: 0;
}

.copy-links-btn {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line-strong);
}

.copy-links-btn:hover:not([disabled]) {
    background: var(--surface-sub);
    border-color: var(--muted);
    filter: none;
}

.quest-copy-btn {
    color: var(--text) !important;
}

/* Running order */
.event-slots-buttons {
    display: grid;
    gap: .6rem;
}

.slots-label {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--font-mono);
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}

.slots-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

.slots-count {
    order: 2;
    font-family: var(--font-mono);
    color: var(--text);
    background: var(--slot-count-bg);
    border: 1px solid var(--slot-count-border);
    padding: .1rem .45rem;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .04em;
}

.slots-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .45rem;
    width: 100%;
}

.slot-button-wrapper {
    position: relative;
    min-width: 0;
}

.slot-button {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        'num time'
        'status status';
    align-items: center;
    justify-content: stretch;
    gap: .35rem .55rem;
    text-align: left;
    padding: .6rem .7rem .65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: var(--card);
    color: var(--text);
    font-weight: 600;
    min-height: 66px;
}

.slot-button:hover {
    filter: none;
}

.slot-btn-number {
    grid-area: num;
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: .06em;
}

.slot-btn-number::before {
    content: '#';
    opacity: .6;
}

.slot-btn-time {
    grid-area: time;
    justify-self: end;
    font-family: var(--font-mono);
    font-size: .7rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.slot-btn-status {
    grid-area: status;
    font-family: var(--font-display);
    font-weight: 800;
    font-stretch: 106%;
    text-transform: uppercase;
    font-size: .92rem;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.slot-button.slot-open {
    background: transparent;
    border-style: dashed;
    border-color: var(--slot-open-border);
}

.slot-button.slot-open .slot-btn-status {
    color: var(--accent);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: .72rem;
    letter-spacing: .14em;
}

.slot-button.slot-open .slot-btn-status::before {
    content: '+ ';
}

.slot-button.slot-open:hover {
    background: var(--slot-open-bg);
    border-color: var(--slot-open-border-hover);
}

.slot-button.slot-booked {
    background: var(--slot-booked-bg);
    border-color: var(--slot-booked-border);
    color: var(--accent-2);
}

.slot-button.slot-booked:hover {
    background: var(--slot-booked-bg-hover);
    border-color: var(--slot-booked-border-hover);
}

.slot-button.slot-locked {
    background: var(--slot-locked-bg);
    border-color: var(--slot-locked-border);
    color: var(--faint);
}

.slot-button.slot-locked .slot-btn-status {
    color: var(--faint);
}

.slot-button.slot-locked:hover {
    border-color: var(--slot-locked-border-hover);
    color: var(--muted);
}

/* ── Modals ───────────────────────────────────────────────────────────── */
.slot-modal-backdrop {
    position: fixed;
    inset: 0;
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    display: grid;
    place-items: center;
    z-index: 1000;
    padding: 1rem;
}

.slot-modal {
    width: min(560px, 100%);
    background: var(--card);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-pop);
    animation: modalIn .22s var(--ease);
    overflow: hidden;
}

.event-edit-modal {
    width: min(860px, 100%);
    max-height: min(92vh, 920px);
    display: flex;
    flex-direction: column;
}

.event-edit-modal .slot-modal-body,
.genre-picker-modal .slot-modal-body {
    overflow-y: auto;
}

.genre-picker-modal {
    width: min(760px, 100%);
    max-height: min(92vh, 860px);
    display: flex;
    flex-direction: column;
}

.slot-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--line);
}

.slot-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 900;
    font-stretch: 118%;
    text-transform: uppercase;
}

.slot-modal-body {
    display: grid;
    gap: 0.85rem;
    padding: 1.1rem 1.15rem 1.2rem;
}

.slot-modal-info {
    color: var(--text);
    font-size: .86rem;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
}

.slot-state-pill {
    display: inline-flex;
    margin-left: 0.5rem;
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--line-strong);
}

.slot-state-open {
    color: var(--accent);
    border-color: var(--accent-line);
}

.slot-state-booked {
    color: var(--accent-2);
}

.slot-state-locked {
    color: var(--danger);
    border-color: var(--danger-line);
}

.slot-modal-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.slot-modal-form {
    display: grid;
    gap: 0.5rem;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(8px) scale(.985); }
    to { opacity: 1; transform: none; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-content {
    display: grid;
    gap: 0;
    padding: 0.6rem;
}

.dropdown-form {
    display: contents;
}

.dropdown-btn {
    justify-content: flex-start;
    text-align: left;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    background: var(--bg-2);
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid var(--line-strong);
}

.dropdown-btn:hover {
    background: var(--surface-sub);
    border-color: var(--muted);
    filter: none;
}

.slot-action-btn {
    justify-content: center;
    text-align: center;
}

.slot-primary-btn {
    width: 100%;
    justify-content: center;
    background: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
    font-weight: 700;
}

.slot-primary-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    filter: brightness(1.08);
}

.dropdown-form:last-child .dropdown-btn {
    margin-top: 0.4rem;
}

.dropdown-danger {
    color: var(--danger);
}

.dropdown-danger:hover {
    color: var(--danger);
    border-color: var(--danger-line);
    background: var(--danger-soft);
}

.dropdown-btn.dropdown-danger[disabled] {
    color: var(--faint);
    background: var(--bg-2);
    border-color: var(--line);
    opacity: 1;
}

.dropdown-btn input {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    display: block;
}

/* DJ / VJ picker */
.dj-picker {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.7rem;
}

.dj-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dj-picker-title {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
}

.dj-search-wrap {
    position: relative;
    display: block;
}

.dj-search-icon {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    width: 11px;
    height: 11px;
    border: 1.5px solid var(--muted);
    border-radius: 50%;
    transform: translateY(-60%);
    pointer-events: none;
}

.dj-search-icon::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 1.5px;
    background: var(--muted);
    right: -5px;
    bottom: -2px;
    transform: rotate(45deg);
}

.dj-search,
.dj-select {
    width: 100%;
    font-size: 0.85rem;
}

.dj-search {
    padding-left: 2rem;
    font-weight: 500;
}

.dj-search.is-searching {
    opacity: 0.7;
    cursor: progress;
}

.dj-select {
    padding: 0.35rem;
    min-height: 210px;
    background: var(--input-bg);
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

.dj-select option {
    padding: 0.45rem 0.5rem;
    border-radius: 5px;
}

.dj-select option:checked {
    background: var(--accent-soft);
    color: var(--text);
    font-weight: 650;
}

.dj-picker .dj-manual-id {
    margin-top: 0.1rem;
    padding-left: 0.75rem;
    width: 100%;
}

.dj-picker-hint {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.4;
}

/* Genre picker */
.genre-core-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.genre-core-btn {
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text);
    border-radius: 999px;
    padding: 0.42rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.genre-core-btn:hover {
    border-color: var(--muted);
    background: var(--surface-sub);
    filter: none;
}

.genre-core-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}

.genre-subtitle {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 0.2rem;
}

.genre-subgenre-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.4rem;
}

.genre-sub-btn {
    justify-content: flex-start;
    border: 1px solid var(--line);
    background: var(--bg-2);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.65rem;
    font-size: 0.82rem;
    font-weight: 550;
    text-align: left;
}

.genre-sub-btn:hover {
    border-color: var(--line-strong);
    background: var(--surface-sub);
    filter: none;
}

.genre-sub-btn.active {
    border-color: var(--accent-line);
    background: var(--accent-soft);
    color: var(--accent);
}

.genre-category {
    margin-bottom: 1.1rem;
}

.genre-category:last-child {
    margin-bottom: 0;
}

.genre-category-title {
    font-family: var(--font-mono);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--muted);
    margin: 0 0 .45rem;
    font-weight: 500;
}

.genre-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.genre-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: .26rem .7rem;
    font-size: .82rem;
    font-weight: 550;
}

.genre-chip-custom {
    color: var(--accent);
    border-color: var(--accent-line);
}

.chip-delete {
    display: contents;
}

.chip-delete-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: .75rem;
    padding: 0;
    line-height: 1;
}

.chip-delete-btn:hover {
    color: var(--danger);
    filter: none;
}

/* ── Profiles ─────────────────────────────────────────────────────────── */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: .75rem;
    margin-top: .6rem;
}

.profile-searchbar {
    margin-top: .75rem;
    margin-bottom: .25rem;
}

.profile-search-input {
    width: 100%;
    max-width: 420px;
}

.profile-directory-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 1rem;
    margin-top: .5rem;
    align-items: start;
}

.profile-directory-list {
    display: grid;
    gap: .5rem;
}

.profile-directory-label {
    font-family: var(--font-mono);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}

.profile-directory-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
}

.profile-directory-select {
    width: 100%;
    min-height: 300px;
    padding: .35rem;
    font-size: .9rem;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

.profile-directory-select option {
    padding: .4rem .5rem;
    border-radius: 5px;
}

.profile-directory-select option:checked {
    background: var(--accent-soft);
    color: var(--text);
}

.profile-directory-empty {
    margin: .3rem 0 0;
}

.profile-directory-detail-wrap {
    display: grid;
    gap: .6rem;
}

.profile-directory-detail {
    min-height: 190px;
}

.profile-directory-actions {
    margin-top: 0;
}

.profile-card {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.profile-card h3,
.profile-card strong:first-child {
    font-family: var(--font-display);
    font-weight: 850;
    font-stretch: 114%;
    text-transform: uppercase;
}

.profile-userline {
    display: flex;
    flex-direction: column;
    gap: .1rem;
}

.profile-card-id {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .3rem;
}

.profile-genres,
.profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
}

.profile-links a {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: .22rem .65rem;
    transition: border-color .12s ease, color .12s ease;
}

.profile-links a:hover {
    color: var(--accent);
    border-color: var(--accent-line);
}

.profile-card-actions {
    display: flex;
    gap: .4rem;
    align-items: center;
    margin-top: .2rem;
    flex-wrap: wrap;
}

/* ── Mail, applications, misc lists ───────────────────────────────────── */
.subscriber-list {
    display: grid;
    gap: 0;
    margin-top: .5rem;
    border-top: 1px solid var(--line);
}

.subscriber-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--line);
    padding: .7rem .2rem;
    flex-wrap: wrap;
}

.info-list .subscriber-row {
    display: grid;
    grid-template-columns: minmax(180px, 300px) minmax(0, 1fr);
    justify-content: start;
    align-items: baseline;
}

@media (max-width: 640px) {
    .info-list .subscriber-row {
        grid-template-columns: 1fr;
        gap: .25rem;
    }
}

.dj-mail-toggle-form {
    margin: 0;
}

.app-list {
    display: grid;
    gap: .75rem;
}

.app-card {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    display: grid;
    gap: .7rem;
}

.app-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: .5rem;
}

.app-card-header strong,
.app-card-header h3 {
    font-family: var(--font-display);
    font-weight: 850;
    font-stretch: 114%;
    text-transform: uppercase;
}

.app-notes {
    margin: 0;
    font-size: .88rem;
    padding: .55rem .75rem;
    background: var(--surface-sub);
    border-left: 2px solid var(--line-strong);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.app-review-form {
    margin-top: .1rem;
}

.privacy-page {
    max-width: 820px;
    margin: 2rem auto;
    text-align: left;
    line-height: 1.65;
}

.privacy-page h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    font-stretch: 125%;
    text-transform: uppercase;
}

.privacy-page h2 {
    margin-top: 1.8rem;
    font-size: 1.1rem;
}

.privacy-page ul {
    padding-left: 1.2rem;
}

/* ── Motion ───────────────────────────────────────────────────────────── */
/* No fill-mode and no delays: if the animation never runs (background tab, old browser),
   content is simply shown instead of being stuck at opacity 0. */
.reveal {
    animation: rise .45s var(--ease);
}

.delay-1 { animation-duration: .55s; }
.delay-2 { animation-duration: .65s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* Cross-page fades between dashboard routes (Chromium/Safari; others just navigate). */
@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: .18s;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .landing-ticker-track {
        animation: none;
    }

    .lineup-card {
        transform: none;
    }
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .overview-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: .9rem 1rem;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: .7rem;
    }

    .sidebar-brand { grid-column: 1; }
    .server-switch-form { grid-column: 1 / -1; }
    .sidebar > form:not(.server-switch-form) { grid-column: 1 / -1; }

    .nav {
        grid-column: 1 / -1;
        flex-direction: row;
        overflow-x: auto;
        gap: .3rem;
        margin: 0 -1rem;
        padding: 0 1rem .2rem;
        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        flex-shrink: 0;
        border: 1px solid var(--line);
        white-space: nowrap;
    }

    .nav-link.active {
        border-color: var(--accent-line);
    }

    .nav-link.active::before {
        display: none;
    }

    .nav-link-invite {
        margin-bottom: 0;
    }

    .sidebar-options {
        grid-column: 1 / -1;
        margin-top: 0;
        grid-template-columns: 1fr 1fr;
        align-items: end;
        gap: .4rem .7rem;
    }

    .sidebar-options-title {
        grid-column: 1 / -1;
    }

    .sidebar-options-label,
    .sidebar-options-select {
        grid-column: 1;
    }

    .sidebar-options .locale-form {
        grid-column: 2;
        grid-row: 2 / span 2;
        margin: 0;
    }

    .sidebar-support-link {
        grid-column: 1;
    }

    .sidebar-user {
        grid-column: 2;
        border-top: 0;
        padding: 0;
    }

    .main {
        padding: 1.1rem 1rem 3rem;
    }

    .header-card {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .quick-actions { grid-template-columns: repeat(2, 1fr); }
    .profile-directory-layout { grid-template-columns: 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .grid.two { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .landing-hero {
        grid-template-columns: 1fr;
    }

    .landing-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body { font-size: 14.5px; }

    .slot-modal-actions-row {
        grid-template-columns: 1fr;
    }

    .slot-modal {
        width: 100%;
    }

    .dj-select {
        min-height: 170px;
    }

    .slots-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stat {
        padding: .65rem .75rem;
    }

    .stat span {
        font-size: 1.5rem;
    }

    .event-card-header {
        grid-template-columns: 1fr;
        grid-template-areas: 'title' 'meta' 'actions';
    }

    .lineup-row {
        grid-template-columns: 4rem 1fr auto;
        padding-inline: 1rem;
    }
}
