:root {
    --bg: #08182a;
    --surface: #0e2238;
    --surface-alt: #13304d;
    --surface-hover: #183a5c;
    --border: #24456a;
    --text: #f3eadb;
    --muted: #9fb3c8;
    --gold: #d9b77e;
    --gold-hover: #e8cb97;
    --teal: #2bb6d6;
    --teal-hover: #5fd0ea;
    --bronze: #8a5a2b;
    --fg: var(--text);
    --accent: var(--teal);
    --danger: #e53e3e;
    --success: #22c55e;
    --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-hover); text-decoration: underline; }

h1, h2, h3 { margin-top: 0; line-height: 1.2; }

/* ── Shared layout shell ── */
.site-shell {
    width: min(100% - 48px, 1440px);
    margin-inline: auto;
}

/* ── Layout ── */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--bronze);
    position: sticky;
    top: 0;
    z-index: 10;
}

header nav {
    width: min(100% - 48px, 1440px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
    align-items: center;
    height: 64px;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1;
    color: var(--gold) !important;
    text-decoration: none !important;
}
.nav-brand picture { display: block; flex-shrink: 0; }
.nav-logo { display: block; width: 40px; height: 40px; }
.nav-emblem { display: block; height: 40px; width: auto; flex-shrink: 0; margin-left: 0.25rem; }
.nav-brand span { line-height: 1; transform: translateY(-1px); }

.nav-muted {
    color: var(--muted) !important;
    font-size: 0.9rem;
}

main {
    width: min(100% - 48px, 1440px);
    margin-inline: auto;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    margin-top: 4rem;
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    margin-top: 0.75rem;
}
.footer-social-link {
    color: var(--muted);
    display: flex;
    align-items: center;
    text-decoration: none !important;
    transition: color 0.15s;
}
.footer-social-link:hover { color: var(--gold); }
.footer-social-link svg { display: block; }

/* ── Sign-in button (logged-out state) ── */
.btn-signin {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.875rem;
    text-decoration: none !important;
    background: var(--surface-alt);
    transition: border-color 0.15s, background 0.15s;
    white-space: nowrap;
}
.btn-signin:hover { border-color: var(--gold); color: var(--text); background: var(--surface-hover); }

/* ── User account dropdown ── */
.user-menu { position: relative; }

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.25rem 0.45rem;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.875rem;
    transition: background 0.15s;
}
.user-menu-toggle:hover { background: var(--surface-alt); }

.user-menu-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-chevron {
    color: var(--muted);
    transition: transform 0.15s;
    flex-shrink: 0;
}
.user-menu-toggle[aria-expanded="true"] .user-menu-chevron { transform: rotate(180deg); }

.user-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 190px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
    z-index: 200;
    overflow: hidden;
}
.user-menu-dropdown.open { display: block; }

.user-menu-header {
    padding: 0.6rem 0.85rem 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.user-menu-display { font-weight: 600; font-size: 0.88rem; }
.user-menu-handle  { color: var(--muted); font-size: 0.78rem; }

.user-menu-divider { height: 1px; background: var(--border); }

.user-menu-item {
    display: block;
    padding: 0.45rem 0.85rem;
    color: var(--muted);
    font-size: 0.875rem;
    text-decoration: none !important;
    cursor: pointer;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-family: inherit;
    transition: background 0.1s, color 0.1s;
}
.user-menu-item:hover { background: var(--surface-alt); color: var(--text); }
.user-menu-signout-form { margin: 0; }
.user-signout-form { margin: 0; }

/* ── Cards ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 1rem;
    font-size: 0.8rem;
}

/* ── Alerts ── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}
.alert-error  { background: #2d0a0a; border: 1px solid var(--danger); color: #fc8181; }
.alert-info   { background: #0a2238; border: 1px solid #3b82f6; color: #93c5fd; }
.alert-success { background: #0a2d12; border: 1px solid var(--success); color: #86efac; }
.alert-warn   { background: #2d1e0a; border: 1px solid #f59e0b; color: #fcd34d; }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }

label {
    display: block;
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
    font-weight: 500;
}

input[type="text"],
input[type="url"],
textarea,
select {
    width: 100%;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 0.55rem 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.15s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 2px rgba(43,182,214,0.25);
}
a:focus-visible, button:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

textarea { resize: vertical; min-height: 90px; }
select option { background: var(--surface); }

.hint {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.25rem;
}
/* ── Raid-Helper event ID hint (publish page) ── */
.rh-id-hint {
    margin-top: 0.5rem;
}
.rh-id-hint > summary {
    font-size: 0.8rem;
    color: var(--gold);
    cursor: pointer;
    user-select: none;
    width: fit-content;
}
.rh-id-hint > summary:hover { opacity: 0.8; }
.rh-id-hint-body {
    margin-top: 0.6rem;
    font-size: 0.82rem;
    color: var(--muted);
}
.rh-id-hint-body p { margin: 0 0 0.5rem; }
.rh-mock-embed {
    background: #1e1f22;
    border-left: 4px solid #5865f2;
    border-radius: 0 4px 4px 0;
    padding: 0.7rem 1rem;
    margin: 0.35rem 0;
    max-width: 380px;
    font-size: 0.8rem;
}
.rh-mock-header {
    color: #5865f2;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.rh-mock-fields {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.18rem 0.55rem;
    color: #c8ccd0;
}
.rh-mock-label { color: #8a8f98; font-weight: 600; }
.rh-mock-mention { color: #5865f2; }
.rh-mock-id-val {
    color: #e3e5e8;
    font-weight: 700;
    font-family: var(--font-mono, monospace);
    letter-spacing: 0.01em;
}
.field-hint {
    font-size: 0.78rem;
    margin: 0.3rem 0 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.field-hint::before { font-size: 0.85em; }
.field-hint-ok   { color: var(--success); }
.field-hint-ok::before   { content: "✓"; }
.field-hint-warn { color: var(--muted); }
.field-hint-warn::before { content: "—"; }
.raid-check-suggested { border-color: rgba(217,183,126,0.45); }
.suggested-tag {
    font-size: 0.68rem;
    color: var(--gold);
    border: 1px solid rgba(217,183,126,0.4);
    border-radius: 3px;
    padding: 0 0.3rem;
    margin-left: 0.25rem;
    line-height: 1.6;
    vertical-align: middle;
}

/* ── Checkbox row ── */
.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}
.checkbox-row input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
    flex-shrink: 0;
    accent-color: var(--gold);
}
.checkbox-row label { color: var(--text); font-size: 0.95rem; margin: 0; font-weight: 400; }

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: 0.6rem 1.3rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.15s;
    line-height: 1.5;
}
.btn:hover { opacity: 0.85; text-decoration: none; }
.btn-primary  { background: var(--gold); color: var(--bg); font-weight: 700; }
.btn-secondary { background: var(--surface-alt); color: var(--text); border: 1px solid var(--border); }
.btn-danger   { background: var(--danger); color: #fff; }

.btn-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* ── Grid ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ── RH preview ── */
.rh-preview {
    border-left: 3px solid var(--gold);
    padding: 0.75rem 1rem;
    background: var(--surface-alt);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 1.5rem;
}
.rh-preview h2 { margin: 0 0 0.25rem; font-size: 1.25rem; }
.rh-preview .meta { color: var(--muted); font-size: 0.875rem; margin: 0; }

/* ── Section divider ── */
.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.4rem;
    margin: 1.75rem 0 1.25rem;
}

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    color: var(--muted);
    white-space: nowrap;
}
.badge-hardcore { color: var(--danger); border-color: var(--danger); }
.badge-alliance { color: #60a5fa; border-color: #1d4ed8; }
.badge-horde    { color: #f87171; border-color: #991b1b; }
.badge-green    { color: #86efac; border-color: #166534; }
.badge-amber    { color: #fcd34d; border-color: #92400e; }
.badge-red      { color: #f87171; border-color: #991b1b; }
.badge-row { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.6rem; }

/* ── Raid cards (directory) ── */
.raid-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: block;
    text-decoration: none !important;
    color: inherit;
    transition: border-color 0.15s, background 0.15s;
}
.raid-card:hover { border-color: var(--gold); background: var(--surface-alt); }
.raid-card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; color: var(--text); }
.raid-card .raid-meta { color: var(--muted); font-size: 0.875rem; margin-top: 0.35rem; }

/* ── Filters bar ── */
.filters {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    align-items: flex-end;
}
.filters .form-group { margin: 0; }
.filters input, .filters select { padding: 0.45rem 0.65rem; font-size: 0.9rem; }
.filters .btn { padding: 0.45rem 0.9rem; font-size: 0.9rem; }

/* ── Detail page ── */
.detail-start {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gold);
    margin: 0.25rem 0 1rem;
}
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 2rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 600px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-label { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.detail-value { font-size: 0.95rem; }

.cta-box {
    background: var(--surface);
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}
.cta-box p { margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--muted); }
.cal-link { font-size: 0.8rem; color: var(--muted); margin-left: 0.75rem; white-space: nowrap; }
.cal-link:hover { color: var(--gold); }

/* ── Home page ── */
.hero { padding: 2rem 0 1rem; }
.hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 520px; margin-bottom: 1.5rem; }

/* ── Nav tabs ── */
.nav-center {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: center;
}

.nav-link {
    color: var(--muted);
    font-size: 0.9rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 0.65rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}
.nav-link:hover { color: var(--text); border-bottom-color: rgba(217,183,126,0.35); text-decoration: none; }
.nav-link.active { color: var(--text); font-weight: 600; border-bottom-color: var(--gold); text-decoration: none; }

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--bg);
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}
.nav-avatar-img {
    object-fit: cover;
    background: var(--surface-alt);
    border: 1px solid var(--border);
}

/* ── Hero (Browse Raids, full-width) ── */
.hero-raid {
    position: relative;
    min-height: 340px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--bg); /* fallback while video loads */
}
.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(8,24,42,0.9) 0%, rgba(8,24,42,0.64) 50%, rgba(8,24,42,0.08) 100%),
        radial-gradient(ellipse at 76% 50%, rgba(43,182,214,0.16) 0%, transparent 58%);
    z-index: 1;
    pointer-events: none;
}
.hero-raid-inner {
    position: relative;
    z-index: 2;
    width: min(100% - 48px, 1440px);
    margin-inline: auto;
    padding: 3.5rem 0;
}
.hero-credit {
    position: absolute;
    bottom: 0.55rem;
    right: 0.8rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.67rem;
    color: rgba(255,255,255,0.38);
    text-decoration: none;
    transition: color 0.2s;
    letter-spacing: 0.01em;
}
.hero-credit:hover { color: rgba(255,255,255,0.8); }
.hero-credit-yt {
    width: 13px;
    height: 13px;
    fill: currentColor;
    flex-shrink: 0;
}
.hero-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--gold);
    text-transform: uppercase;
    margin: 0 0 0.85rem;
}
.hero-headline {
    font-size: clamp(1.85rem, 4.2vw, 2.9rem);
    font-weight: 800;
    line-height: 1.08;
    margin: 0 0 0.85rem;
    max-width: 520px;
    color: var(--text);
}
.hero-sub {
    color: rgba(243,234,219,0.68);
    max-width: 390px;
    margin: 0 0 1.75rem;
    font-size: 0.95rem;
    line-height: 1.65;
}
.hero-cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-outline {
    background: transparent;
    border: 1px solid rgba(243,234,219,0.28);
    color: var(--text);
    transition: border-color 0.15s, color 0.15s, opacity 0.15s;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); opacity: 1; text-decoration: none; }

/* ── Chips ── */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.28rem 0.7rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 0.81rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.chip:hover { border-color: var(--gold); color: var(--text); text-decoration: none; }
.chip.chip-active { background: var(--gold); border-color: var(--gold); color: var(--bg); font-weight: 700; }
.chip.chip-active:hover { color: var(--bg); opacity: 0.9; }
.chip-count { font-size: 0.78em; opacity: 0.68; }
.chip.chip-active .chip-count { opacity: 0.78; }

/* ── Raids layout ── */
.raids-layout { display: block; }

/* ── Horizontal raid card ── */
.raid-card-h {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: 144px minmax(0, 1fr) auto;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    transition: border-color 0.15s;
    margin-bottom: 0.65rem;
}
.raid-card-h:hover { border-color: var(--gold); }

.raid-card-h-img {
    position: relative;
    min-height: 118px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(145deg, var(--surface) 0%, #0f5f7a 100%);
}

.raid-card-h-img-badge {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
}
.raid-card-h-img-glyph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    opacity: 0.14;
    user-select: none;
}

.raid-card-h-body {
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    min-width: 0;
}
.raid-card-h-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.raid-card-h-org { font-size: 0.78rem; color: var(--muted); }
.raid-card-h-meta {
    display: flex;
    gap: 0.9rem;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 0.25rem;
}
.raid-card-h-meta-item { display: flex; align-items: center; gap: 0.2rem; }
.raid-card-h-loot { font-size: 0.76rem; color: var(--muted); margin-top: auto; padding-top: 0.25rem; }

.raid-card-h-action {
    padding: 0.85rem 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    border-left: 1px solid var(--border);
    min-width: 160px;
    flex-shrink: 0;
    align-items: stretch;
}
.raid-signup-count { text-align: center; line-height: 1.2; }
.raid-signup-count .count-num { font-size: 1.2rem; font-weight: 700; color: var(--text); display: block; }
.raid-signup-count .count-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Sidebar ── */
.raids-sidebar { display: flex; flex-direction: column; gap: 1rem; }

.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.95rem 1.1rem;
}
.sidebar-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--muted);
    margin: 0 0 0.7rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}

.community-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px solid var(--border); }
.community-row:last-child { border-bottom: none; padding-bottom: 0; }
.community-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gold);
    flex-shrink: 0;
    text-transform: uppercase;
}
.community-name { font-size: 0.84rem; font-weight: 600; color: var(--text); }
.community-meta { font-size: 0.73rem; color: var(--muted); }

.stat-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.1rem; }
.stat-box { background: var(--surface-alt); border-radius: var(--radius); padding: 0.55rem 0.6rem; text-align: center; }
.stat-box-num { font-size: 1.1rem; font-weight: 700; color: var(--text); display: block; }
.stat-box-label { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.discord-promo {
    background: linear-gradient(135deg, #1a2a5e 0%, #0c1a3a 100%);
    border: 1px solid #30368a;
    border-radius: var(--radius);
    padding: 0.95rem 1.1rem;
}
.discord-promo-header { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.45rem; }
.discord-bubble {
    width: 26px;
    height: 26px;
    background: #5865f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.discord-promo-title { font-size: 0.84rem; font-weight: 700; color: var(--text); margin: 0; }
.discord-promo p { font-size: 0.78rem; color: rgba(243,234,219,0.6); margin: 0 0 0.7rem; line-height: 1.5; }

/* ── Raids empty state ── */
.raids-empty {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.25rem;
    text-align: center;
    color: var(--muted);
}

/* ── Empty launch state ── */
.empty-launch {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    margin-bottom: 1rem;
}
.empty-launch-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--fg);
    margin: 0 0 0.6rem;
}
.empty-launch-sub {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 1.25rem;
}
.empty-launch-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

/* ── Raid leader callout ── */
.leader-callout {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}
.leader-callout-icon { font-size: 1.4rem; flex-shrink: 0; }
.leader-callout-body { flex: 1; }
.leader-callout-body strong { font-size: 0.9rem; color: var(--fg); display: block; margin-bottom: 0.2rem; }
.leader-callout-body p { font-size: 0.82rem; color: var(--muted); margin: 0; line-height: 1.5; }
.leader-callout-btn { white-space: nowrap; flex-shrink: 0; }

/* ── How it works strip ── */
.how-steps {
    display: flex;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.how-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
    padding: 0.9rem 1.1rem;
    border-right: 1px solid var(--border);
}
.how-step:last-of-type { border-right: none; }
.how-step-num {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.05rem;
}
.how-step-body strong { font-size: 0.85rem; color: var(--fg); display: block; margin-bottom: 0.15rem; }
.how-step-body p { font-size: 0.78rem; color: var(--muted); margin: 0; line-height: 1.45; }
.how-steps-link {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    font-size: 0.78rem;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    border-left: 1px solid var(--border);
}
.how-steps-link:hover { text-decoration: underline; }
@media (max-width: 700px) {
    .how-steps { flex-direction: column; }
    .how-step { border-right: none; border-bottom: 1px solid var(--border); }
    .how-step:last-of-type { border-bottom: none; }
    .how-steps-link { border-left: none; border-top: 1px solid var(--border); padding: 0.7rem 1.1rem; }

    /* Header: stack brand + nav on mobile */
    header nav {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        height: auto;
        padding: 0.5rem 0;
        gap: 0.25rem 0;
    }
    .nav-brand { grid-column: 1; }
    .nav-user  { grid-column: 2; grid-row: 1; }
    .nav-center {
        grid-column: 1 / -1;
        justify-content: flex-start;
        gap: 0;
        border-top: 1px solid var(--border);
        padding-top: 0.1rem;
    }
    .nav-link { height: 40px; padding: 0 0.5rem; font-size: 0.85rem; }
}

/* ── Filter row (inside main, under chip bar) ── */
.filter-row {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.1rem;
}
.filter-row .form-group { margin: 0; }
.filter-row input, .filter-row select { padding: 0.33rem 0.6rem; font-size: 0.84rem; width: auto; }
.filter-row .btn { padding: 0.33rem 0.7rem; font-size: 0.84rem; }

/* ── Scroll anchor offset for sticky header ── */
#raids { scroll-margin-top: 68px; }

@media (max-width: 600px) {
    .raid-card-h { grid-template-columns: 1fr; }
    .raid-card-h-img { min-height: 72px; }
    .raid-card-h-action {
        border-left: none;
        border-top: 1px solid var(--border);
        flex-direction: row;
        justify-content: space-between;
        min-width: unset;
    }
}

/* ── Nav logo icon ── */
/* ── Home search card ── */
.home-search-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem 0.85rem;
    margin-bottom: 1.25rem;
}
.home-search-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto auto;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.7rem;
}
.home-search-input-wrap { position: relative; }
.home-search-icon {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.9rem;
    pointer-events: none;
}
.home-search-input { padding-left: 2.1rem !important; font-size: 1rem !important; padding-top: 0.55rem !important; padding-bottom: 0.55rem !important; }
.home-search-row select { font-size: 0.85rem; padding: 0.45rem 0.55rem; width: auto; }
.home-search-btn { padding: 0.55rem 1.35rem; font-size: 0.95rem; white-space: nowrap; }

.home-date-chips {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
}

/* ── Home 2-col layout ── */
.home-layout {
    display: grid;
    grid-template-columns: 1fr 285px;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 860px) {
    .home-layout { grid-template-columns: 1fr; }
    .home-sidebar { display: none; }
    .home-search-row { grid-template-columns: 1fr; }
}

.home-count {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0 0 0.65rem;
}

/* ── Home featured raid card ── */
.home-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 170px 90px minmax(215px, auto);
    overflow: hidden;
    margin-bottom: 0.65rem;
    transition: border-color 0.15s;
}
.home-card:hover { border-color: var(--gold); }

.home-card-img {
    position: relative;
    min-height: 115px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(145deg, var(--surface) 0%, #0f5f7a 100%);
}
.home-card-img-glyph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    opacity: 0.14;
    user-select: none;
}

.home-card-name {
    padding: 0.85rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}
.home-card-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.home-card-community { font-size: 0.77rem; color: var(--muted); }
.home-card-tags { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-top: 0.15rem; }

.home-card-time {
    padding: 0.85rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-left: 1px solid var(--border);
    justify-content: center;
}
.home-card-dt { font-size: 0.82rem; color: var(--text); font-weight: 600; }
.home-card-rel { font-size: 0.76rem; color: var(--gold); }
.home-card-loot { font-size: 0.74rem; color: var(--muted); margin-top: 0.2rem; }

.home-card-spots {
    padding: 0.85rem 0.75rem;
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    text-align: center;
}
.home-card-spots-num { font-size: 1.3rem; font-weight: 700; color: var(--text); line-height: 1; }
.home-card-spots-label { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.home-card-actions {
    padding: 0.85rem 0.85rem;
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
    align-items: stretch;
}
.home-card-btn {
    font-size: 0.79rem;
    padding: 0.42rem 0.6rem;
    text-align: center;
    width: 100%;
}

/* ── Home sidebar ── */
.home-sidebar { display: flex; flex-direction: column; gap: 1rem; }

/* ── Benefit list ── */
.benefit-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.84rem;
    color: var(--text);
    line-height: 1.4;
}
.benefit-item::before {
    content: '✓';
    color: var(--gold);
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

@media (max-width: 700px) {
    .home-card { grid-template-columns: 90px 1fr; }
    .home-card-img { grid-row: span 2; }
    .home-card-time, .home-card-spots { display: none; }
    .home-card-actions {
        grid-column: 2;
        border-left: none;
        border-top: 1px solid var(--border);
        padding: 0.5rem 0.75rem;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem;
        justify-content: flex-start;
    }
    .home-card-btn { font-size: 0.75rem; padding: 0.3rem 0.55rem; }
}

/* ── How It Works page ── */
.hiw-page {
    max-width: 680px;
    margin: 2.5rem auto 3rem;
}
.hiw-header { margin-bottom: 2.5rem; }
.hiw-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--gold);
    margin: 0 0 0.5rem;
}
.hiw-lead {
    font-size: 1.05rem;
    color: var(--muted);
    margin: 0;
}
.hiw-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2.5rem;
}
.hiw-step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}
.hiw-step-num {
    flex-shrink: 0;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: var(--gold);
    color: var(--bg);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.1rem;
}
.hiw-step-body { flex: 1; }
.hiw-step-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.5rem;
}
.hiw-list {
    margin: 0.6rem 0 0.8rem 1.25rem;
    padding: 0;
}
.hiw-list li {
    margin-bottom: 0.45rem;
    color: var(--muted);
    line-height: 1.55;
}
.hiw-step-body p {
    margin: 0 0 0.6rem;
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.6;
}
.hiw-step-body p:last-child { margin-bottom: 0; }
.hiw-note {
    background: var(--surface);
    border-left: 3px solid var(--gold);
    padding: 0.6rem 0.85rem;
    border-radius: 0 4px 4px 0;
    font-size: 0.85rem !important;
    color: var(--text) !important;
}
.hiw-cta-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ── Raid card image fill ── */
.raid-card-h-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0.72;
}
.raid-card-h-raids {
    font-size: 0.78rem;
    color: var(--gold);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Home card image fill ── */
.home-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0.68;
}
.home-card-raids {
    font-size: 0.77rem;
    color: var(--gold);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Detail page: hero banner ── */
.detail-hero-img {
    width: 100%;
    height: 220px;
    border-radius: var(--radius);
    background-color: var(--surface);
    background-size: cover;
    background-position: center top;
    margin-bottom: 1.25rem;
}
@media (max-width: 600px) { .detail-hero-img { height: 140px; } }

/* ── Detail page: raid chip row ── */
.detail-raids {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.5rem 0 0.75rem;
}
.detail-raid-chip {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.18rem 0.55rem;
    font-size: 0.8rem;
    color: var(--gold);
}

/* ── Publish form: raid checkbox grid ── */
.raid-checkbox-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.raid-check-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.2rem 0.55rem;
    font-size: 0.82rem;
    cursor: pointer;
    transition: border-color 0.12s;
}
.raid-check-item:hover { border-color: var(--gold); }
.raid-check-item input[type="checkbox"] { accent-color: var(--gold); }

/* ── Role signup chips ── */
.role-chips {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-top: 0.2rem;
}
.role-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--muted);
    line-height: 1;
}
.role-chip svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    flex-shrink: 0;
}
.role-tank   svg { fill: currentColor; stroke: none; }
.role-chip span { line-height: 1; }

/* Larger variant for detail page */
.role-chips-lg { gap: 1.1rem; }
.role-chip-lg {
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text);
    min-width: 48px;
}
.role-chip-lg .role-icon svg { width: 22px; height: 22px; stroke-width: 1.8; }
.role-tank .role-icon   svg { fill: currentColor; stroke: none; }
.role-chip-lg .role-count { font-size: 1.3rem; font-weight: 700; }
.role-chip-lg .role-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.footer-disclaimer {
    max-width: 640px;
    margin: 1rem auto 0;
    font-size: 0.75rem;
    opacity: 0.8;
}
