@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700&family=Outfit:wght@400;500;600&display=swap");

:root {
    --bg: #070605;
    --panel: #12100c;
    --panel-alt: #1a160f;
    --text: #f0e8d8;
    --muted: #a89880;
    --accent: #d4a84b;
    --accent-dark: #8f6b1a;
    --border: #3a3020;
    --ok: #34d399;
    --font-display: "Cinzel", "Palatino Linotype", "Book Antiqua", serif;
    --font-body: "Outfit", "Segoe UI", sans-serif;
}

/* ==========================================================================
   Lineage 2 C6 / Interlude inspired Characters page (scoped to .l2-chars)
   ========================================================================== */
.l2-chars {
    --l2-gold: #d6b35a;
    --l2-gold-soft: #b9974a;
    --l2-bronze: #3a2f22;
    --l2-bronze-dark: #241d14;
    --l2-stone: #16130f;
    --l2-stone-2: #1f1a13;
    --l2-line: #4a3c26;
}

.l2-chars .l2-hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px;
    background:
        linear-gradient(180deg, rgba(58, 47, 34, 0.55), rgba(20, 16, 12, 0.9)),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 6px);
    border: 1px solid var(--l2-line);
    border-radius: 4px;
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.45);
}

.l2-chars .l2-hero::before,
.l2-chars .l2-hero::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--l2-gold-soft), transparent);
    opacity: 0.5;
}
.l2-chars .l2-hero::before { top: 6px; }
.l2-chars .l2-hero::after { bottom: 6px; }

.l2-chars .l2-hero-title {
    margin: 0 0 4px;
    font-size: 1.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--l2-gold);
    text-shadow: 0 1px 0 #000, 0 0 12px rgba(214, 179, 90, 0.25);
}

.l2-chars .l2-hero-sub {
    margin: 2px 0;
    color: var(--muted);
}
.l2-chars .l2-hero-sub strong { color: var(--text); }

.l2-chars .l2-hero-count {
    margin: 6px 0 0;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--l2-gold-soft);
}

/* Bronze/gold buttons */
.l2-chars .l2-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    font-size: 0.82rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #f2e8cf;
    text-decoration: none;
    cursor: pointer;
    background: linear-gradient(180deg, #4a3a22, #2a2013);
    border: 1px solid var(--l2-gold-soft);
    border-radius: 3px;
    box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.15), inset 0 -2px 6px rgba(0, 0, 0, 0.5);
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.l2-chars .l2-btn:hover {
    color: #fff8e6;
    background: linear-gradient(180deg, #5c4826, #33260f);
    box-shadow: inset 0 1px 0 rgba(255, 230, 170, 0.25), 0 0 10px rgba(214, 179, 90, 0.35);
}
.l2-chars .l2-btn:disabled,
.l2-chars .l2-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}
.l2-chars .l2-btn-sm { padding: 6px 11px; font-size: 0.72rem; }

/* Summary panel */
.l2-chars .l2-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 16px;
}
.l2-chars .l2-summary-item {
    padding: 14px 16px;
    text-align: center;
    background: linear-gradient(180deg, var(--l2-stone-2), var(--l2-stone));
    border: 1px solid var(--l2-line);
    border-radius: 4px;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.55);
}
.l2-chars .l2-summary-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
}
.l2-chars .l2-summary-value {
    display: block;
    margin-top: 6px;
    font-size: 1.3rem;
    color: var(--l2-gold);
    text-shadow: 0 1px 0 #000;
}

/* Decorative divider */
.l2-chars .l2-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 14px;
    color: var(--l2-gold);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.85rem;
}
.l2-chars .l2-divider::before,
.l2-chars .l2-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--l2-line), transparent);
}

/* Table panel */
.l2-chars .l2-table-wrap {
    width: 100%;
    background: linear-gradient(180deg, var(--l2-stone-2), var(--l2-stone));
    border: 1px solid var(--l2-line);
    border-radius: 4px;
    box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}
.l2-chars table.l2-table {
    width: 100%;
    border-collapse: collapse;
}
.l2-chars .l2-table thead th {
    padding: 12px 14px;
    text-align: left;
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--l2-gold);
    background: linear-gradient(180deg, #2c2417, #1a140d);
    border-bottom: 1px solid var(--l2-line);
    white-space: nowrap;
}
.l2-chars .l2-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(74, 60, 38, 0.4);
    color: var(--text);
    vertical-align: middle;
}
.l2-chars .l2-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.015);
}
.l2-chars .l2-table tbody tr:hover td {
    background: rgba(214, 179, 90, 0.06);
}
.l2-chars .l2-col-index { color: var(--l2-gold-soft); width: 48px; }
.l2-chars .l2-col-num { text-align: center; width: 64px; }

.l2-chars .l2-char-name {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.l2-chars .l2-char-name .name { color: #f2e8cf; font-weight: 600; }
.l2-chars .l2-char-name .title { font-size: 0.72rem; color: var(--muted); font-style: italic; }
.l2-chars .l2-muted { color: var(--muted); }
.l2-chars td form { margin: 0; }

/* Status badges */
.l2-chars .l2-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid var(--border);
}
.l2-chars .l2-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 6px currentColor;
}
.l2-chars .l2-badge.is-online { color: #7fe0a6; border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.08); }
.l2-chars .l2-badge.is-offline { color: #9a94a6; border-color: rgba(154, 148, 166, 0.3); background: rgba(154, 148, 166, 0.06); }

/* Empty state */
.l2-chars .l2-empty {
    padding: 46px 24px;
    text-align: center;
    background: linear-gradient(180deg, var(--l2-stone-2), var(--l2-stone));
    border: 1px dashed var(--l2-line);
    border-radius: 4px;
    box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.6);
}
.l2-chars .l2-empty h3 {
    margin: 0 0 8px;
    color: var(--l2-gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}
.l2-chars .l2-empty p { margin: 0; color: var(--muted); }

/* Mobile: stacked character cards */
@media (max-width: 720px) {
    .l2-chars .l2-summary { grid-template-columns: repeat(2, 1fr); }

    .l2-chars .l2-table-wrap { background: transparent; border: none; box-shadow: none; }
    .l2-chars .l2-table thead { display: none; }
    .l2-chars .l2-table, .l2-chars .l2-table tbody, .l2-chars .l2-table tr, .l2-chars .l2-table td { display: block; width: 100%; }
    .l2-chars .l2-table tbody tr {
        margin-bottom: 14px;
        background: linear-gradient(180deg, var(--l2-stone-2), var(--l2-stone));
        border: 1px solid var(--l2-line);
        border-radius: 4px;
        box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.55);
    }
    .l2-chars .l2-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        border-bottom: 1px solid rgba(74, 60, 38, 0.3);
    }
    .l2-chars .l2-table tbody td::before {
        content: attr(data-label);
        font-size: 0.68rem;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: var(--l2-gold-soft);
    }
    .l2-chars .l2-col-index { display: none; }
}

/* Dashboard styling in the same classic Interlude visual language. */
.l2-dashboard {
    --l2d-line: #4a3c26;
    --l2d-stone: #17120e;
    --l2d-stone-2: #211a12;
}

.l2-dashboard .l2d-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    margin-bottom: 14px;
    padding: 18px 20px;
    border: 1px solid var(--l2d-line);
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(63, 49, 31, 0.62), rgba(20, 15, 10, 0.92)),
        url("/images/cover_transparent.png") center/cover no-repeat;
    box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.55), 0 4px 14px rgba(0, 0, 0, 0.45);
}

.l2-dashboard .l2d-heading h1 {
    margin: 0;
    color: #d6b35a;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 1px 0 #000;
}

.l2-dashboard .l2d-heading .subtitle {
    margin: 5px 0 8px;
    color: #c7bda9;
}

.l2-dashboard .l2d-divider {
    width: min(420px, 100%);
    height: 1px;
    background: linear-gradient(90deg, #b9974a, transparent);
}

.l2-dashboard .l2d-session {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(185, 151, 74, 0.45);
    border-radius: 4px;
    background: rgba(9, 8, 6, 0.45);
}

.l2-dashboard .l2d-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid #b9974a;
    background: radial-gradient(circle at 35% 30%, #d9bf80, #6a5533 60%, #241d14);
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}

.l2-dashboard .l2d-session-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.l2-dashboard .l2d-session-label {
    font-size: 0.67rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #b9b0a0;
}

.l2-dashboard .l2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 15px;
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    color: #f2e8cf;
    cursor: pointer;
    background: linear-gradient(180deg, #4a3a22, #2a2013);
    border: 1px solid #b9974a;
    border-radius: 3px;
    box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.15), inset 0 -2px 6px rgba(0, 0, 0, 0.5);
}

.l2-dashboard .l2-btn:hover {
    color: #fff8e6;
    background: linear-gradient(180deg, #5c4826, #33260f);
    box-shadow: inset 0 1px 0 rgba(255, 230, 170, 0.25), 0 0 10px rgba(214, 179, 90, 0.35);
}

.l2-dashboard .l2-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.l2-dashboard .l2-btn-sm {
    padding: 6px 10px;
    font-size: 0.7rem;
}

.l2-dashboard .l2d-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
    gap: 14px;
    align-items: start;
}

.l2-dashboard .l2d-panel {
    background: linear-gradient(180deg, var(--l2d-stone-2), var(--l2d-stone));
    border: 1px solid var(--l2d-line);
    border-radius: 4px;
    padding: 14px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.l2-dashboard .l2d-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.l2-dashboard .l2d-panel-head h2 {
    margin: 0;
    color: #d6b35a;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 1rem;
}

.l2-dashboard .l2d-count {
    color: #d6b35a;
    font-weight: 700;
    letter-spacing: 1px;
}

.l2-dashboard .l2d-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.l2-dashboard .l2d-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.l2-dashboard .l2d-table th,
.l2-dashboard .l2d-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(74, 60, 38, 0.35);
    vertical-align: middle;
    white-space: nowrap;
}

.l2-dashboard .l2d-table th {
    color: #d6b35a;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.72rem;
    text-align: left;
    background: rgba(10, 8, 6, 0.35);
}

.l2-dashboard .l2d-col-index {
    width: 44px;
    text-align: center;
    color: #b9974a;
}

.l2-dashboard .l2d-col-login {
    font-weight: 600;
    color: #f2e8cf;
}

.l2-dashboard .l2d-reset summary {
    list-style: none;
}

.l2-dashboard .l2d-reset summary::-webkit-details-marker {
    display: none;
}

.l2-dashboard .l2d-reset-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, 1fr));
    gap: 6px;
    margin-top: 6px;
}

.l2-dashboard .l2d-reset-form input,
.l2-dashboard .l2d-create-form input {
    background: #0f0e0b;
    color: #ece9df;
    border: 1px solid #3e3220;
    border-radius: 3px;
    padding: 8px 9px;
}

.l2-dashboard .l2d-create-form textarea {
    background: #0f0e0b;
    color: #ece9df;
    border: 1px solid #3e3220;
    border-radius: 3px;
    padding: 8px 9px;
    resize: vertical;
    min-height: 90px;
}

.l2-dashboard .l2d-create-form select {
    background: #0f0e0b;
    color: #ece9df;
    border: 1px solid #3e3220;
    border-radius: 3px;
    padding: 8px 9px;
}

.l2-dashboard .l2d-inline-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #c7bda9;
    font-size: 0.9rem;
}

.l2-dashboard .l2d-panel-note {
    margin: 0 0 10px;
    color: #b9b0a0;
}

.l2-dashboard .l2d-create-form {
    display: grid;
    gap: 8px;
}

.l2-dashboard .l2d-create-form label {
    font-size: 0.85rem;
    color: #c7bda9;
}

.l2-dashboard .l2d-console-output {
    margin: 0;
    min-height: 240px;
    max-height: 360px;
    overflow: auto;
    padding: 10px;
    border: 1px solid #3e3220;
    border-radius: 3px;
    background: #0a0a0a;
    color: #b7f7be;
    font-size: 0.79rem;
    line-height: 1.35;
    font-family: Consolas, "Courier New", monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 1024px) {
    .l2-dashboard .l2d-main-grid {
        grid-template-columns: 1fr;
    }

    .l2-dashboard .l2d-reset-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .l2-dashboard .l2d-hero {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .l2-dashboard .l2d-session {
        width: 100%;
        justify-content: space-between;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background:
        radial-gradient(ellipse 90% 50% at 50% -10%, rgba(120, 80, 20, 0.22), transparent 55%),
        radial-gradient(circle at 100% 40%, rgba(40, 28, 12, 0.35), transparent 40%),
        linear-gradient(180deg, #0c0a08 0%, #070605 45%, #050403 100%);
    color: var(--text);
    min-height: 100vh;
}

body.page-home {
    background: #050403;
}

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(10px);
    background: rgba(7, 6, 5, 0.9);
    border-bottom: 1px solid rgba(58, 48, 32, 0.85);
}

.site-header--home {
    background: rgba(5, 4, 3, 0.55);
    border-bottom-color: transparent;
}

.header-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
}

.brand {
    color: var(--accent);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.06em;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    z-index: 2;
}

.brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.brand-text {
    line-height: 1;
}

.header-cover {
    height: 48px;
    border-top: 1px solid rgba(58, 48, 32, 0.55);
    background: linear-gradient(rgba(7, 6, 5, 0.72), rgba(7, 6, 5, 0.88)), url("/images/cover_transparent.png") center/cover no-repeat;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(26, 22, 15, 0.9);
    cursor: pointer;
    z-index: 2;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--accent);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

body.nav-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

body.nav-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.2rem;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: 0.2s ease;
    font-size: 0.92rem;
    font-weight: 500;
}

.nav-link:hover,
.nav-link:focus-visible {
    border-color: var(--accent-dark);
    color: var(--accent);
    background: rgba(212, 168, 75, 0.08);
}

.nav-link.active {
    border-color: var(--accent-dark);
    color: var(--accent);
    background: rgba(212, 168, 75, 0.14);
}

/* Legacy page hero (non-home) */
.hero {
    padding: 3rem 0 2rem;
}

.hero-panel {
    background: linear-gradient(160deg, rgba(212, 168, 75, 0.08), rgba(18, 16, 12, 0.85));
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}

.hero h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    letter-spacing: 0.04em;
}

.subtitle {
    color: var(--muted);
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 4px;
    padding: 0.8rem 1.35rem;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: linear-gradient(180deg, #e0b85a, #b8892e);
    color: #1a1206;
    border: 1px solid #f0d090;
    box-shadow: 0 8px 24px rgba(184, 137, 46, 0.28);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: linear-gradient(180deg, #efc86a, #c99738);
    transform: translateY(-1px);
}

.btn-outline {
    border: 1px solid rgba(212, 168, 75, 0.55);
    color: var(--accent);
    background: rgba(0, 0, 0, 0.25);
}

.btn-outline:hover,
.btn-outline:focus-visible {
    background: rgba(212, 168, 75, 0.12);
    transform: translateY(-1px);
}

.info {
    padding: 0.5rem 0 4rem;
}

.page-main {
    padding-bottom: 2.8rem;
}

.page-hero {
    padding: 3.2rem 0 1rem;
}

.page-hero h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    letter-spacing: 0.06em;
}

.page-section {
    padding: 0.7rem 0 1.3rem;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 0.9rem;
}

.content-card {
    background: linear-gradient(180deg, var(--panel-alt), var(--panel));
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.05rem;
}

.content-card h2 {
    margin-top: 0;
    margin-bottom: 0.6rem;
    color: var(--accent);
    font-size: 1.15rem;
}

.content-card p {
    color: var(--text);
    line-height: 1.45;
}

.cards-compact {
    grid-template-columns: repeat(3, minmax(170px, 1fr));
}

.styled-list {
    margin: 0;
    padding-left: 1.1rem;
}

.styled-list li {
    margin: 0.3rem 0;
}

.styled-list.ordered {
    list-style: decimal;
}

.rankings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 0.9rem;
}

.ranking-section {
    overflow: hidden;
}

.table-wrap {
    overflow-x: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 320px;
}

.ranking-table th,
.ranking-table td {
    border-bottom: 1px solid var(--border);
    padding: 0.55rem;
    text-align: left;
    font-size: 0.92rem;
}

.ranking-table th {
    color: var(--accent);
    font-weight: 600;
}

.boss-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 0.9rem;
}

.boss-card p {
    margin: 0.45rem 0;
}

.status-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.status-alive {
    color: #092916;
    background: #34d399;
}

.status-dead {
    color: #2b0909;
    background: #f87171;
}

.status-respawning {
    color: #332506;
    background: #fbbf24;
}

.download-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.download-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.download-item h3 {
    margin: 0;
}

.narrow-container {
    width: min(560px, 92%);
}

.form-card {
    padding: 1.2rem;
}

.form-grid {
    display: grid;
    gap: 0.65rem;
}

.form-grid label {
    color: var(--muted);
    font-size: 0.95rem;
}

.form-grid input[type="text"],
.form-grid input[type="password"],
.form-grid input[type="email"] {
    background: #0f0f16;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 0.66rem 0.72rem;
}

.form-grid input:focus-visible {
    outline: 1px solid var(--accent-dark);
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0.25rem 0 0.25rem;
}

.form-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.alert {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.8rem;
    font-size: 0.94rem;
}

.alert-success {
    border-color: #2a6b53;
    background: rgba(52, 211, 153, 0.12);
    color: #98f0ca;
}

.alert-info {
    border-color: #3a5a8b;
    background: rgba(96, 165, 250, 0.12);
    color: #bfdbfe;
}

.alert-error {
    border-color: #8b3a3a;
    background: rgba(248, 113, 113, 0.13);
    color: #fecaca;
}

.field-error {
    margin: -0.2rem 0 0.2rem;
    color: #fca5a5;
    font-size: 0.84rem;
}

.session-box {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.8rem;
    margin-bottom: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
}

.session-text {
    margin: 0;
}

.account-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.3rem;
}

.stat-label {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.stat-value {
    margin: 0 0 0.45rem;
    color: var(--accent);
    font-size: 1.16rem;
    font-weight: 700;
}

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

.text-link:hover,
.text-link:focus-visible {
    text-decoration: underline;
}

.section-title {
    font-family: var(--font-display);
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
    font-size: 1.35rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 0.9rem;
}

.card {
    background: linear-gradient(180deg, var(--panel-alt), var(--panel));
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
}

.card h3 {
    margin: 0;
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 600;
}

.value {
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.status-online {
    color: var(--ok);
}

.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(8, 8, 12, 0.8);
}

.footer-inner {
    padding: 1.35rem 0 1.6rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
}

.footer-inner p {
    margin: 0.2rem 0;
}

@media (max-width: 980px) {
    .cards {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .cards-compact {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .rankings-grid,
    .boss-grid,
    .stack-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .nav-toggle {
        display: inline-flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: calc(100% + 2px);
        left: 0;
        right: 0;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0.25rem;
        padding: 0.75rem;
        background: rgba(10, 8, 6, 0.97);
        border: 1px solid var(--border);
        border-radius: 10px;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
        max-height: min(70vh, 520px);
        overflow-y: auto;
    }

    body.nav-open .main-nav {
        display: flex;
    }

    .nav-link {
        padding: 0.75rem 0.9rem;
        font-size: 1rem;
    }

    .header-cover {
        height: 36px;
    }

    .hero {
        padding-top: 2rem;
    }

    .hero-panel {
        padding: 1.25rem;
    }

    .cards,
    .cards-compact,
    .rankings-grid,
    .boss-grid,
    .stack-grid {
        grid-template-columns: 1fr;
    }

    .download-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .session-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .staff-subnav {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .staff-responsive-table .l2d-table thead {
        display: none;
    }

    .staff-responsive-table .l2d-table tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid var(--border);
        padding: 10px;
    }

    .staff-responsive-table .l2d-table td {
        display: block;
        text-align: left;
        padding: 4px 0;
    }

    .staff-responsive-table .l2d-table td::before {
        content: attr(data-label) ": ";
        color: var(--muted);
        font-size: 0.75rem;
        text-transform: uppercase;
    }
}

.l2-empty {
    padding: 18px;
    border: 1px dashed var(--border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
}

.staff-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.status-offline {
    color: #f87171;
}

.l2-btn-sm {
    min-height: 36px;
}

.watchlist-hit {
    background: rgba(248, 113, 113, 0.08);
    outline: 1px solid rgba(248, 113, 113, 0.35);
}

/* ==========================================================================
   Public homepage
   ========================================================================== */
.home-hero {
    position: relative;
    min-height: clamp(560px, 88svh, 860px);
    display: flex;
    align-items: flex-end;
    background-color: #0a0806;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    animation: homeHeroIn 1.1s ease-out both;
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 45% at 18% 15%, rgba(212, 168, 75, 0.14), transparent 60%),
        linear-gradient(180deg, rgba(5, 4, 3, 0.15) 0%, rgba(5, 4, 3, 0.1) 35%, rgba(5, 4, 3, 0.55) 100%);
    pointer-events: none;
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 160px;
    background: linear-gradient(180deg, transparent, #050403);
    pointer-events: none;
}

.home-hero-inner {
    position: relative;
    z-index: 1;
    width: min(1120px, 92%);
    margin: 0 auto;
    padding: clamp(3rem, 10vh, 6rem) 0 clamp(3.5rem, 11vh, 6rem);
    animation: homeCopyIn 0.9s ease-out 0.15s both;
}

.home-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem 0.4rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(212, 168, 75, 0.35);
    background: rgba(10, 8, 6, 0.55);
    backdrop-filter: blur(6px);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: rgba(240, 232, 216, 0.85);
    margin-bottom: 1.1rem;
}

.home-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
    animation: homeStatusPulse 2.2s ease-in-out infinite;
}

.home-status-pill.is-offline .home-status-dot {
    background: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
    animation: none;
}

.home-status-pill.is-offline {
    color: rgba(240, 200, 200, 0.85);
}

.home-status-sep {
    color: rgba(240, 232, 216, 0.35);
}

.home-brand {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 7vw, 4.6rem);
    line-height: 1.05;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f4e6c4;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.65);
}

.home-lede {
    margin: 1rem 0 0;
    max-width: 28rem;
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    line-height: 1.45;
    color: rgba(240, 232, 216, 0.82);
}

.home-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.home-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 1.4rem;
    transform: translateX(-50%);
    z-index: 1;
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    border: 1px solid rgba(212, 168, 75, 0.35);
    background: rgba(10, 8, 6, 0.4);
    color: var(--accent);
    animation: homeScrollCue 2.4s ease-in-out infinite;
}

.home-scroll-cue:hover {
    border-color: rgba(212, 168, 75, 0.7);
}

.home-vitals {
    position: relative;
    z-index: 1;
    border-bottom: 1px solid rgba(58, 48, 32, 0.65);
    background: linear-gradient(180deg, #0e0c09, #090806);
    padding: 1.15rem 0;
}

.home-vitals-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.55rem 0.7rem;
}

.home-vitals-divider {
    width: 1px;
    height: 1.6rem;
    background: rgba(58, 48, 32, 0.85);
    flex-shrink: 0;
    display: block;
}

.home-vital {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(58, 48, 32, 0.65);
    background: rgba(212, 168, 75, 0.04);
    font-size: 0.82rem;
    white-space: nowrap;
    min-width: 0;
}

.home-vital-ico {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: rgba(212, 168, 75, 0.1);
    color: var(--accent);
    font-size: 0.72rem;
}

.home-vital-label {
    color: var(--muted);
    letter-spacing: 0.03em;
}

.home-vital-value {
    font-family: var(--font-display);
    color: var(--text);
    letter-spacing: 0.02em;
}

.home-vital-value.is-online {
    color: var(--ok);
}

.home-vital-value.is-offline {
    color: #f87171;
}

.home-vital--feature {
    background: transparent;
    border-color: rgba(58, 48, 32, 0.45);
}

.home-vital--premium {
    border-color: rgba(212, 168, 75, 0.5);
    background: rgba(212, 168, 75, 0.1);
}

.home-vital--premium .home-vital-value {
    color: var(--accent);
}

@media (max-width: 720px) {
    .home-vitals-divider {
        display: none;
    }

    .home-vitals-row {
        justify-content: flex-start;
    }
}

.home-kicker {
    display: block;
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}

.home-section-head--center {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto 2rem;
}

.home-section-head--center .home-section-title {
    margin-bottom: 0;
}

.home-stats {
    border-bottom: 1px solid rgba(58, 48, 32, 0.55);
    background: linear-gradient(180deg, #0a0806, #0c0a08);
}

.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.home-stat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.15rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(58, 48, 32, 0.6);
    background: linear-gradient(165deg, rgba(212, 168, 75, 0.06), rgba(10, 8, 6, 0.4));
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-stat-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(212, 168, 75, 0.65), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.home-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 168, 75, 0.4);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.home-stat-card:hover::before {
    opacity: 1;
}

.home-stat-value {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    letter-spacing: 0.03em;
    color: var(--accent);
}

.home-stat-value--text {
    font-size: 1rem;
    color: var(--text);
    letter-spacing: 0.01em;
}

.home-stat-label {
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.home-stat-card--wide {
    grid-column: span 2;
}

@media (max-width: 860px) {
    .home-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .home-stats-grid {
        grid-template-columns: 1fr;
    }

    .home-stat-card--wide {
        grid-column: span 1;
    }
}

.home-section--split {
    border-bottom: 1px solid rgba(58, 48, 32, 0.55);
}

.home-split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 3rem;
}

.home-leaderboard {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.home-leaderboard li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    background: rgba(212, 168, 75, 0.04);
    border: 1px solid rgba(58, 48, 32, 0.5);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.home-leaderboard li:hover {
    border-color: rgba(212, 168, 75, 0.35);
    background: rgba(212, 168, 75, 0.07);
}

.home-lb-rank {
    font-family: var(--font-display);
    color: var(--muted);
    width: 1.6rem;
    flex-shrink: 0;
    text-align: center;
}

.home-leaderboard li:nth-child(1) .home-lb-rank { color: #f0d090; }
.home-leaderboard li:nth-child(2) .home-lb-rank { color: #d9d9df; }
.home-leaderboard li:nth-child(3) .home-lb-rank { color: #d3a06a; }

.home-lb-avatar {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    background: rgba(212, 168, 75, 0.12);
    border: 1px solid rgba(212, 168, 75, 0.3);
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 0.78rem;
}

.home-lb-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
}

.home-lb-value {
    color: var(--muted);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.home-boss-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.home-boss-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    background: rgba(212, 168, 75, 0.04);
    border: 1px solid rgba(58, 48, 32, 0.5);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.home-boss-list li:hover {
    border-color: rgba(212, 168, 75, 0.35);
    background: rgba(212, 168, 75, 0.07);
}

.home-boss-name {
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.home-boss-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.home-boss-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.home-boss-status.is-alive {
    color: var(--ok);
}

.home-boss-status.is-dead {
    color: var(--muted);
}

@media (max-width: 860px) {
    .home-split-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
}

.home-section {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.home-section--news {
    padding-top: 0;
}

.home-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.home-section-title {
    margin: 0 0 1.25rem;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.home-section-head .home-section-title {
    margin-bottom: 0;
}

.home-section-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.92rem;
    white-space: nowrap;
}

.home-section-link:hover {
    color: var(--accent);
}

.home-feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.home-feature {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.35rem 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(58, 48, 32, 0.55);
    background: linear-gradient(165deg, rgba(212, 168, 75, 0.05), rgba(10, 8, 6, 0.35));
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-feature:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 168, 75, 0.4);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.home-feature-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid rgba(212, 168, 75, 0.3);
    background: rgba(212, 168, 75, 0.08);
    padding: 8px;
}

.home-feature h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: var(--text);
}

.home-feature p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 0.92rem;
}

@media (max-width: 960px) {
    .home-feature-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .home-feature-list {
        grid-template-columns: 1fr;
    }
}

.home-news-list--timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.1rem;
    display: grid;
    gap: 1.4rem;
    position: relative;
}

.home-news-list--timeline::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: linear-gradient(180deg, rgba(212, 168, 75, 0.5), rgba(58, 48, 32, 0.2));
}

.home-news-list--timeline li {
    position: relative;
    padding-left: 1.6rem;
}

.home-news-dot {
    position: absolute;
    left: -1.1rem;
    top: 0.35rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.12);
}

.home-news-link {
    display: block;
    text-decoration: none;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.home-news-link:hover {
    border-color: rgba(58, 48, 32, 0.65);
    background: rgba(212, 168, 75, 0.05);
    transform: translateX(2px);
}

.home-news-date {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.home-news-title {
    display: block;
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.03em;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.home-news-link:hover .home-news-title {
    color: var(--accent);
}

.home-news-summary {
    display: block;
    color: var(--muted);
    line-height: 1.45;
    font-size: 0.92rem;
}

@keyframes homeHeroIn {
    from { opacity: 0; transform: scale(1.04); }
    to { opacity: 1; transform: scale(1); }
}

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

@keyframes homeStatusPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.08); }
}

@keyframes homeScrollCue {
    0%, 100% { transform: translate(-50%, 0); opacity: 0.7; }
    50% { transform: translate(-50%, 6px); opacity: 1; }
}

@media (max-width: 860px) {
    .home-hero {
        min-height: calc(100svh - 64px);
        align-items: center;
        background-position: 65% center;
    }

    .home-hero-inner {
        padding: 5rem 0 4rem;
        text-align: left;
    }

    .home-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .home-cta .btn {
        width: 100%;
        text-align: center;
    }

    .home-scroll-cue {
        display: none;
    }

    .home-section-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

.home-final-cta {
    position: relative;
    padding: clamp(3rem, 8vw, 5rem) 0;
    text-align: center;
    background:
        radial-gradient(ellipse 60% 70% at 50% 0%, rgba(212, 168, 75, 0.12), transparent 65%),
        linear-gradient(180deg, #0a0806, #050403);
    border-top: 1px solid rgba(58, 48, 32, 0.55);
}

.home-final-cta-inner {
    max-width: 34rem;
    margin: 0 auto;
}

.home-final-cta h2 {
    margin: 0 0 0.6rem;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3.4vw, 2.1rem);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
}

.home-final-cta p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.home-final-cta .home-cta {
    justify-content: center;
    margin-top: 1.6rem;
}

@media (prefers-reduced-motion: reduce) {
    .home-status-dot,
    .home-scroll-cue {
        animation: none !important;
    }
}

.nav-account {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.35rem;
}

.nav-link--cta {
    border-color: rgba(212, 168, 75, 0.45) !important;
    color: var(--accent) !important;
    background: rgba(212, 168, 75, 0.1);
}

.nav-link--user {
    border-color: rgba(212, 168, 75, 0.35);
    color: var(--accent);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-hero--art-only .home-hero-inner {
    padding-top: clamp(2rem, 8vh, 4rem);
}

.home-hero--art-only {
    background-position: center top;
}

/* Account login / register */
.page-account .site-header--home,
.page-account .site-header {
    background: rgba(7, 6, 5, 0.92);
}

.account-shell {
    min-height: calc(100svh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 3rem;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(120, 80, 20, 0.18), transparent 60%),
        linear-gradient(180deg, #0a0806, #050403);
}

.account-panel {
    width: min(440px, 100%);
    padding: clamp(1.4rem, 4vw, 2rem);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(26, 22, 15, 0.95), rgba(12, 10, 8, 0.98));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.account-panel-head {
    margin-bottom: 1.4rem;
}

.account-kicker {
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.account-panel h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 2rem);
    letter-spacing: 0.04em;
}

.account-lede {
    margin: 0.55rem 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.account-form {
    display: grid;
    gap: 0.45rem;
}

.account-form label {
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.account-form input[type="text"],
.account-form input[type="password"],
.account-form input[type="email"] {
    width: 100%;
    background: #0c0a08;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 0.75rem 0.85rem;
    font: inherit;
}

.account-form input:focus-visible {
    outline: 1px solid var(--accent-dark);
}

.account-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.account-submit {
    margin-top: 1rem;
    width: 100%;
}

.account-footer-links {
    margin-top: 1.25rem;
    display: grid;
    gap: 0.55rem;
}

.account-session {
    display: grid;
    gap: 0.9rem;
}

.account-session-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

@media (max-width: 860px) {
    .nav-account {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.4rem;
        margin: 0.35rem 0 0;
        width: 100%;
    }

    .nav-account .nav-link {
        text-align: center;
        justify-content: center;
    }

    .account-form-row {
        grid-template-columns: 1fr;
    }
}
@media (prefers-reduced-motion: reduce) {
    .home-hero,
    .home-hero-inner,
    .btn {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   Logged-in dashboard
   ========================================================================== */
.page-dash .site-header {
    background: rgba(7, 6, 5, 0.94);
}

/* Dashboard / staff tools: use nearly full viewport width */
.page-dash .container {
    width: min(100%, 100vw);
    max-width: none;
    padding-left: clamp(1rem, 2.2vw, 2rem);
    padding-right: clamp(1rem, 2.2vw, 2rem);
    box-sizing: border-box;
}

.dash {
    padding: 1.25rem 0 3rem;
    min-height: calc(100svh - 120px);
}

.dash-wrap {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

/* Lounge: lock the whole page to the viewport — only the chat feed scrolls */
html.page-clan-lounge,
body.page-clan-lounge {
    height: 100%;
    overflow: hidden;
}

body.page-clan-lounge {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    max-height: 100svh;
}

body.page-clan-lounge .site-header {
    flex-shrink: 0;
}

body.page-clan-lounge .dash {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.55rem 0 0.65rem;
    display: flex;
    flex-direction: column;
}

body.page-clan-lounge .dash-wrap {
    flex: 1 1 auto;
    min-height: 0;
    gap: 0.45rem;
    height: 100%;
}

body.page-clan-lounge .dash-welcome--compact {
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(58, 48, 32, 0.45);
    flex-shrink: 0;
}

body.page-clan-lounge .dash-welcome--compact h1 {
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
}

body.page-clan-lounge .dash-staff-nav {
    margin-bottom: 0.35rem !important;
    flex-shrink: 0;
}

body.page-clan-lounge .cl-app,
body.page-clan-lounge .cl-shell {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
}

/* Live chat: same viewport lock as clan lounge */
html.page-live-chat,
body.page-live-chat {
    height: 100%;
    overflow: hidden;
}

body.page-live-chat {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    max-height: 100svh;
}

body.page-live-chat .site-header {
    flex-shrink: 0;
}

body.page-live-chat .dash {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.55rem 0 0.65rem;
    display: flex;
    flex-direction: column;
}

body.page-live-chat .dash-wrap {
    flex: 1 1 auto;
    min-height: 0;
    gap: 0.45rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

body.page-live-chat .dash-welcome--compact {
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(58, 48, 32, 0.45);
    flex-shrink: 0;
}

body.page-live-chat .dash-welcome--compact h1 {
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
}

body.page-live-chat .dash-staff-nav {
    margin-bottom: 0.35rem !important;
    flex-shrink: 0;
}

body.page-live-chat .alert {
    flex-shrink: 0;
    margin: 0;
    padding: 0.45rem 0.75rem;
}

body.page-live-chat .cl-app,
body.page-live-chat .cl-shell {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
}

.lc-empty {
    display: grid;
    place-content: center;
    gap: 0.85rem;
    flex: 1;
    min-height: 0;
    text-align: center;
    color: var(--muted);
    padding: 2rem 1rem;
}

.lc-empty.is-hidden,
.cl-feed.is-hidden,
.cl-composer.is-hidden {
    display: none !important;
}

.lc-open-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.lc-open-form input {
    min-width: 14rem;
    background: rgba(14, 12, 9, 0.9);
    border: 1px solid rgba(201, 168, 106, 0.3);
    color: var(--text);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
}

.lc-side-search {
    margin-bottom: 0.55rem;
}

.lc-side-search input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(14, 12, 9, 0.9);
    border: 1px solid rgba(201, 168, 106, 0.25);
    color: var(--text);
    border-radius: 8px;
    padding: 0.4rem 0.55rem;
    font-size: 0.82rem;
}

.lc-feed-hint {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.9rem;
}

.cl-presence-item.is-active {
    background: rgba(212, 168, 75, 0.14);
    outline: 1px solid rgba(212, 168, 75, 0.35);
}

.cl-presence-item a.cl-presence-copy {
    color: inherit;
    text-decoration: none;
}

.cl-presence-item a.cl-presence-copy:hover .cl-presence-name {
    color: var(--cl-gold, #d4a84b);
}

.lc-stop-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Live chat composer has no character-select column (single fixed target). */
.lc-app .cl-composer-row {
    grid-template-columns: minmax(0, 1fr) 2.6rem;
}

.dash-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(110px, 0.4fr) auto auto auto;
    gap: 0.75rem 1rem;
    align-items: end;
}

.dash-toolbar .dash-form-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.6rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.dash-toolbar .dash-form-check input {
    width: auto;
}

.dash-toolbar .btn {
    margin-top: 0;
    justify-self: start;
}

.dash-split {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
    gap: 1rem;
    align-items: start;
}

.dash-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.dash-meta strong {
    color: var(--text);
    font-weight: 600;
}

.page-dash .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 1100px) {
    .dash-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .dash-toolbar .btn {
        grid-column: 1 / -1;
    }

    .dash-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .dash-toolbar {
        grid-template-columns: 1fr;
    }
}

.dash-welcome {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid rgba(58, 48, 32, 0.65);
}

.dash-welcome h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 3.5vw, 2rem);
    letter-spacing: 0.04em;
    font-weight: 600;
}

.dash-welcome h1 span {
    color: var(--accent);
}

.dash-welcome-copy p {
    margin: 0.4rem 0 0;
    color: var(--muted);
}

.dash-welcome-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.dash-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.65rem;
    border: 1px solid rgba(212, 168, 75, 0.4);
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(212, 168, 75, 0.08);
}

.dash-link {
    background: none;
    border: 0;
    padding: 0;
    color: var(--muted);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.dash-link:hover {
    color: var(--accent);
}

.dash-link--danger:hover {
    color: #f87171;
}

.dash-inline-form {
    display: inline;
    margin: 0;
}

.dash-staff {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(58, 48, 32, 0.7);
    border-radius: 10px;
    background: rgba(14, 12, 9, 0.85);
}

.dash-staff-status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    font-size: 0.9rem;
}

.dash-staff-status em {
    font-style: normal;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-right: 0.35rem;
}

.dash-staff-status strong.ok { color: var(--ok); }
.dash-staff-status strong.bad { color: #f87171; }

.dash-staff-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
}

.dash-staff-nav a {
    flex: 0 0 auto;
    text-decoration: none;
    color: var(--text);
    font-size: 0.86rem;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.dash-staff-nav a:hover {
    color: var(--accent);
    border-color: rgba(212, 168, 75, 0.35);
    background: rgba(212, 168, 75, 0.08);
}

.dash-staff-nav a.is-active {
    color: var(--accent);
    border-color: rgba(212, 168, 75, 0.45);
    background: rgba(212, 168, 75, 0.12);
}

.dash-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(58, 48, 32, 0.7);
    border-radius: 10px;
    background: rgba(14, 12, 9, 0.85);
    font-size: 0.9rem;
}

.dash-status-row em {
    font-style: normal;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-right: 0.35rem;
}

.dash-status-row strong.ok { color: var(--ok); }
.dash-status-row strong.bad { color: #f87171; }

.dash-ip-groups {
    display: grid;
    gap: 0.75rem;
}

.dash-ip-group {
    padding: 0.85rem 0;
    border-top: 1px solid rgba(58, 48, 32, 0.45);
}

.dash-ip-group:first-child {
    border-top: 0;
    padding-top: 0.2rem;
}

.dash-ip-group header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.dash-ip-group h3 {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.dash-ip-group header span {
    color: var(--muted);
    font-size: 0.86rem;
}

.dash-ip-group ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--text);
}

.dash-ip-group li {
    margin: 0.15rem 0;
}

.dash-panel--wide {
    grid-column: 1 / -1;
}

.dash-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.85fr);
    gap: 1rem;
    align-items: start;
}

.dash-side {
    display: grid;
    gap: 1rem;
}

.dash-panel {
    border: 1px solid rgba(58, 48, 32, 0.75);
    border-radius: 12px;
    padding: 1.15rem 1.2rem;
    background: linear-gradient(165deg, rgba(24, 20, 14, 0.95), rgba(10, 8, 6, 0.98));
}

.dash-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.dash-panel-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    color: var(--accent);
}

.dash-panel-head span,
.muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.dash-empty {
    padding: 1.4rem 0.5rem;
    text-align: center;
    color: var(--text);
}

.dash-empty .muted {
    margin-top: 0.35rem;
}

.dash-accounts {
    display: grid;
    gap: 0;
}

.dash-account-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.95rem 0;
    border-top: 1px solid rgba(58, 48, 32, 0.45);
}

.dash-account-row:first-child {
    border-top: 0;
    padding-top: 0.2rem;
}

.dash-account-row h3 {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.dash-account-row p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.dash-account-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.dash-reset summary {
    list-style: none;
    cursor: pointer;
}

.dash-reset summary::-webkit-details-marker {
    display: none;
}

.dash-reset-form {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.55rem;
    min-width: min(240px, 70vw);
    padding: 0.7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
}

.dash-reset-form input {
    background: #0c0a08;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 6px;
    padding: 0.55rem 0.65rem;
}

.dash-form {
    display: grid;
    gap: 0.35rem;
}

.dash-form label {
    margin-top: 0.4rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.dash-form input,
.dash-form textarea,
.dash-form select {
    width: 100%;
    background: #0c0a08;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 0.68rem 0.78rem;
    font: inherit;
}

.dash-form button {
    margin-top: 0.7rem;
    justify-self: start;
}

.dash-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.dash-staff-blocks {
    display: grid;
    grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.3fr);
    gap: 1rem;
    margin-top: 0.25rem;
}

.dash-panel--grow {
    min-width: 0;
}

.dash-console {
    margin: 0;
    min-height: 180px;
    max-height: 320px;
    overflow: auto;
    padding: 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #080706;
    color: #e6d7b0;
    font-size: 0.8rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 0;
}

.dash-table th,
.dash-table td {
    text-align: left;
    padding: 0.65rem 0.55rem;
    border-bottom: 1px solid rgba(58, 48, 32, 0.45);
    font-size: 0.92rem;
    white-space: nowrap;
}

.dash-table th {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dash-table td:last-child,
.dash-table th:last-child {
    text-align: right;
}

@media (max-width: 920px) {
    .dash-layout,
    .dash-staff-blocks {
        grid-template-columns: 1fr;
    }

    .dash-form-row {
        grid-template-columns: 1fr;
    }

    .dash-welcome {
        align-items: flex-start;
    }

    .dash-account-row-actions {
        width: 100%;
    }

    .dash-account-row-actions .btn {
        flex: 1;
        justify-content: center;
    }
}

/* ==========================================================================
   Clan Lounge — Telegram / WhatsApp Web style (Lineage 2 black & gold)
   Components: ClanChatHeader, ChatMessageList, ChatMessageBubble,
   ReplyPreview, ChatComposer, OnlineMembersPanel, MessageActionsMenu
   ========================================================================== */

.cl-app {
    --cl-bg: #0c0a07;
    --cl-panel: #14110c;
    --cl-bubble-in: #1a1610;
    --cl-bubble-out: #2a2214;
    --cl-line: rgba(58, 48, 32, 0.85);
    --cl-gold: #d4a84b;
    --cl-gold-soft: rgba(212, 168, 75, 0.18);
    margin-top: 0;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.cl-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 0 !important;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(28, 22, 14, 0.55), rgba(10, 8, 6, 0.92)),
        repeating-linear-gradient(0deg, transparent, transparent 11px, rgba(0, 0, 0, 0.04) 11px, rgba(0, 0, 0, 0.04) 12px);
}

.cl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--cl-line);
    background: linear-gradient(180deg, rgba(32, 26, 16, 0.95), rgba(16, 13, 9, 0.98));
    flex-shrink: 0;
}

.cl-header-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.cl-crest {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cl-gold);
    background:
        radial-gradient(circle at 35% 30%, rgba(212, 168, 75, 0.35), transparent 55%),
        linear-gradient(160deg, #3a3020, #12100c);
    border: 2px solid rgba(212, 168, 75, 0.55);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.45);
    text-transform: uppercase;
    flex-shrink: 0;
}

.cl-header-copy {
    min-width: 0;
}

.cl-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0.05em;
    color: var(--text);
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: baseline;
}

.cl-title-sub {
    color: var(--cl-gold);
    font-size: 0.92rem;
}

.cl-subtitle {
    margin: 0.15rem 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.cl-header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.cl-online-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(52, 211, 153, 0.28);
    background: rgba(52, 211, 153, 0.08);
    color: var(--muted);
    font-size: 0.78rem;
    white-space: nowrap;
}

.cl-online-chip strong {
    color: var(--ok);
    font-variant-numeric: tabular-nums;
}

.cl-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16);
    flex-shrink: 0;
}

.cl-icon-btn {
    appearance: none;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
}

.cl-icon-btn:hover,
.cl-icon-btn:focus-visible {
    color: var(--cl-gold);
    border-color: rgba(212, 168, 75, 0.35);
    background: var(--cl-gold-soft);
    outline: none;
}

.cl-icon-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.cl-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 13.5rem;
    flex: 1;
    min-height: 0;
    position: relative;
}

.cl-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    border-right: 1px solid var(--cl-line);
}

.cl-feed-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.cl-search-bar,
.cl-pins-panel {
    flex-shrink: 0;
    border-bottom: 1px solid var(--cl-line);
    background: rgba(12, 10, 7, 0.92);
    padding: 0.55rem 0.75rem;
}

.cl-search-bar {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.cl-search-bar[hidden],
.cl-pins-panel[hidden] {
    display: none !important;
}

.cl-search-bar input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(8, 6, 4, 0.85);
    color: var(--text);
    font: inherit;
    padding: 0.45rem 0.85rem;
}

.cl-pins-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
    color: var(--cl-gold);
    font-size: 0.85rem;
}

.cl-pins-list {
    display: grid;
    gap: 0.35rem;
    max-height: 8rem;
    overflow-y: auto;
}

.cl-pin-item {
    appearance: none;
    text-align: left;
    border: 1px solid rgba(212, 168, 75, 0.25);
    background: rgba(212, 168, 75, 0.06);
    color: var(--text);
    border-radius: 8px;
    padding: 0.4rem 0.55rem;
    font: inherit;
    cursor: pointer;
    display: grid;
    gap: 0.1rem;
}

.cl-pin-item strong {
    color: var(--cl-gold);
    font-size: 0.8rem;
}

.cl-pin-item span {
    color: var(--muted);
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cl-feed {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.85rem 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    scroll-behavior: smooth;
}

.cl-day-sep {
    display: flex;
    justify-content: center;
    margin: 0.65rem 0 0.55rem;
}

.cl-day-sep span {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--muted);
    background: rgba(20, 16, 12, 0.92);
    border: 1px solid var(--cl-line);
    border-radius: 999px;
    padding: 0.28rem 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.cl-empty {
    margin: auto;
    text-align: center;
    display: grid;
    gap: 0.35rem;
    padding: 2rem 1rem;
    color: var(--muted);
    max-width: 18rem;
}

.cl-empty strong {
    color: var(--cl-gold);
    font-family: var(--font-display);
    letter-spacing: 0.04em;
}

.cl-msg {
    display: flex;
    align-items: flex-end;
    gap: 0.45rem;
    max-width: min(78%, 34rem);
    margin: 0.12rem 0;
    position: relative;
}

.cl-msg.is-theirs {
    align-self: flex-start;
}

.cl-msg.is-mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.cl-msg.is-grouped {
    margin-top: 0.05rem;
}

.cl-msg.is-flash .cl-bubble {
    box-shadow: 0 0 0 2px rgba(212, 168, 75, 0.55);
}

.cl-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cl-gold);
    background: linear-gradient(160deg, #3a3020, #15120c);
    border: 1px solid rgba(212, 168, 75, 0.4);
    text-transform: uppercase;
    flex-shrink: 0;
    user-select: none;
}

.cl-avatar.is-spacer {
    visibility: hidden;
}

.cl-bubble-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.cl-msg.is-mine .cl-bubble-col {
    align-items: flex-end;
}

.cl-msg-name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-left: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cl-gold);
}

.cl-role-badge {
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0c0a07;
    background: linear-gradient(180deg, #e0c06a, #b8892e);
    border-radius: 999px;
    padding: 0.1rem 0.4rem;
    font-weight: 700;
}

.cl-bubble-row {
    display: flex;
    align-items: flex-start;
    gap: 0.2rem;
    position: relative;
}

.cl-msg.is-mine .cl-bubble-row {
    flex-direction: row-reverse;
}

.cl-bubble {
    position: relative;
    min-width: 4.5rem;
    max-width: 100%;
    padding: 0.45rem 0.65rem 0.35rem;
    border-radius: 12px 12px 12px 4px;
    background: var(--cl-bubble-in);
    border: 1px solid rgba(58, 48, 32, 0.75);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.cl-msg.is-mine .cl-bubble {
    border-radius: 12px 12px 4px 12px;
    background: linear-gradient(165deg, #332814, #241c10);
    border-color: rgba(212, 168, 75, 0.35);
}

.cl-quote {
    margin: 0 0 0.35rem;
    padding: 0.3rem 0.45rem;
    border-left: 3px solid var(--cl-gold);
    background: rgba(0, 0, 0, 0.25);
    border-radius: 0 6px 6px 0;
    font-size: 0.78rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 16rem;
}

.cl-msg-body {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.4;
    font-size: 0.95rem;
    padding-right: 0.25rem;
}

.cl-msg.is-deleted .cl-msg-body {
    color: var(--muted);
    font-style: italic;
}

.cl-msg-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.15rem;
    min-height: 1rem;
}

.cl-msg-time {
    font-size: 0.68rem;
    color: rgba(168, 152, 128, 0.9);
    font-variant-numeric: tabular-nums;
}

.cl-ticks {
    font-size: 0.68rem;
    color: rgba(212, 168, 75, 0.75);
}

.cl-meta-flag {
    font-size: 0.65rem;
    color: var(--cl-gold);
    text-transform: lowercase;
}

/* MessageActionsMenu — hover/focus only */
.cl-msg-menu {
    position: relative;
    flex-shrink: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
    align-self: center;
}

.cl-msg:hover .cl-msg-menu,
.cl-msg:focus-within .cl-msg-menu,
.cl-msg-menu:focus-within {
    opacity: 1;
    pointer-events: auto;
}

.cl-msg-menu-btn {
    appearance: none;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    border: 1px solid var(--cl-line);
    background: rgba(12, 10, 7, 0.9);
    color: var(--muted);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}

.cl-msg-menu-btn:hover,
.cl-msg-menu-btn:focus-visible {
    color: var(--cl-gold);
    border-color: rgba(212, 168, 75, 0.5);
    outline: none;
}

.cl-msg-menu-pop {
    position: absolute;
    top: 100%;
    z-index: 5;
    min-width: 7.5rem;
    margin-top: 0.2rem;
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid var(--cl-line);
    background: #17130d;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    display: grid;
}

.cl-msg.is-theirs .cl-msg-menu-pop { left: 0; }
.cl-msg.is-mine .cl-msg-menu-pop { right: 0; }

.cl-msg-menu-pop[hidden] {
    display: none !important;
}

.cl-menu-item {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.84rem;
    text-align: left;
    padding: 0.4rem 0.55rem;
    border-radius: 6px;
    cursor: pointer;
}

.cl-menu-item:hover,
.cl-menu-item:focus-visible {
    background: var(--cl-gold-soft);
    color: var(--cl-gold);
    outline: none;
}

.cl-inline-edit {
    margin-top: 0.4rem;
    display: grid;
    gap: 0.4rem;
}

.cl-inline-edit[hidden] {
    display: none !important;
}

.cl-edit-input {
    width: 100%;
    min-height: 2.4rem;
    resize: vertical;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(8, 6, 4, 0.9);
    color: var(--text);
    font: inherit;
    padding: 0.45rem 0.55rem;
}

.cl-edit-actions {
    display: flex;
    gap: 0.35rem;
}

.btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.8rem;
    margin-top: 0;
}

.cl-jump {
    position: absolute;
    left: 50%;
    bottom: 0.7rem;
    transform: translateX(-50%);
    appearance: none;
    border: 1px solid rgba(212, 168, 75, 0.45);
    background: rgba(18, 14, 10, 0.96);
    color: var(--cl-gold);
    font: inherit;
    font-size: 0.8rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.cl-jump[hidden] {
    display: none !important;
}

.cl-composer {
    flex-shrink: 0;
    margin: 0;
    padding: 0.55rem 0.7rem 0.65rem;
    border-top: 1px solid var(--cl-line);
    background: linear-gradient(180deg, rgba(22, 18, 12, 0.96), rgba(12, 10, 7, 0.98));
}

.cl-composer--readonly {
    padding: 0.85rem 1rem;
}

.cl-composer--readonly p {
    margin: 0;
}

.cl-composer-reply {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    border-left: 3px solid var(--cl-gold);
    background: rgba(212, 168, 75, 0.08);
    font-size: 0.84rem;
}

.cl-composer-reply[hidden] {
    display: none !important;
}

.cl-composer-reply-label {
    color: var(--muted);
    margin-right: 0.3rem;
    font-size: 0.75rem;
}

.cl-composer-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 2.6rem;
    gap: 0.45rem;
    align-items: end;
}

.cl-char-select select {
    appearance: none;
    max-width: 10.5rem;
    height: 2.55rem;
    padding: 0 1.6rem 0 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 14px) / 5px 5px no-repeat,
        linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 9px) / 5px 5px no-repeat,
        rgba(8, 6, 4, 0.9);
    color: var(--text);
    font: inherit;
    font-size: 0.84rem;
}

.cl-input-wrap {
    min-width: 0;
}

.cl-input-wrap textarea {
    width: 100%;
    min-height: 2.55rem;
    max-height: 7.5rem;
    resize: none;
    border-radius: 1.25rem;
    border: 1px solid var(--border);
    background: rgba(8, 6, 4, 0.9);
    color: var(--text);
    font: inherit;
    padding: 0.6rem 0.95rem;
    line-height: 1.35;
}

.cl-input-wrap textarea:focus,
.cl-char-select select:focus,
.cl-search-bar input:focus,
.cl-edit-input:focus {
    outline: none;
    border-color: rgba(212, 168, 75, 0.65);
    box-shadow: 0 0 0 2px rgba(212, 168, 75, 0.12);
}

.cl-send {
    appearance: none;
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 50%;
    border: 1px solid rgba(212, 168, 75, 0.45);
    background: linear-gradient(165deg, #d4a84b, #8f6b1a);
    color: #120e08;
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.cl-send:hover,
.cl-send:focus-visible {
    filter: brightness(1.08);
    outline: none;
}

.cl-status {
    margin: 0.3rem 0.15rem 0;
    min-height: 1rem;
    font-size: 0.78rem;
}

.cl-side {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: rgba(10, 8, 6, 0.55);
    padding: 0.7rem 0.65rem;
}

.cl-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.55rem;
}

.cl-side-head h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    color: var(--cl-gold);
    text-transform: uppercase;
}

.cl-side-close {
    display: none;
}

.cl-presence {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-auto-rows: min-content;
    align-content: start;
    gap: 0.3rem;
    overflow-y: auto;
    flex: 1;
}

.cl-presence-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.4rem;
    align-items: center;
    padding: 0.4rem 0.35rem;
    border-radius: 8px;
}

.cl-presence-item:hover {
    background: rgba(212, 168, 75, 0.06);
}

.cl-presence-copy {
    display: grid;
    min-width: 0;
}

.cl-presence-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 500;
}

.cl-presence-empty {
    margin: 0.4rem 0 0;
    font-size: 0.82rem;
}

.cl-presence-empty.is-hidden {
    display: none;
}

.cl-side-backdrop {
    display: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 960px) {
    .cl-body {
        grid-template-columns: 1fr;
    }

    .cl-main {
        border-right: 0;
    }

    .cl-side {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(17rem, 86vw);
        z-index: 8;
        transform: translateX(105%);
        transition: transform 0.2s ease;
        border-left: 1px solid var(--cl-line);
        background: #12100c;
        box-shadow: -12px 0 28px rgba(0, 0, 0, 0.45);
    }

    .cl-app.is-side-open .cl-side {
        transform: translateX(0);
    }

    .cl-side-close {
        display: grid;
    }

    .cl-side-backdrop {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 7;
        background: rgba(0, 0, 0, 0.45);
    }

    .cl-side-backdrop[hidden] {
        display: none !important;
    }

    .cl-online-chip span:last-child {
        display: none;
    }
}

@media (max-width: 640px) {
    .cl-shell {
        height: 100%;
        min-height: 0;
    }

    .cl-composer-row {
        grid-template-columns: minmax(0, 1fr) 2.55rem;
    }

    .cl-char-select {
        grid-column: 1 / -1;
    }

    .cl-char-select select {
        max-width: none;
        width: 100%;
    }

    .cl-msg {
        max-width: 92%;
    }

    .cl-msg-menu {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (hover: none) {
    .cl-msg-menu {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Ability tree: lock page to viewport — no page scrollbar */
html.page-ability-tree,
body.page-ability-tree {
    height: 100%;
    overflow: hidden;
}

body.page-ability-tree {
    display: flex;
    flex-direction: column;
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
}

body.page-ability-tree .site-header {
    flex-shrink: 0;
}

body.page-ability-tree .dash {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.45rem 0 0.55rem;
    display: flex;
    flex-direction: column;
}

body.page-ability-tree .dash-wrap {
    flex: 1 1 auto;
    min-height: 0;
    gap: 0.4rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

body.page-ability-tree .dash-welcome--compact {
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(58, 48, 32, 0.45);
    flex-shrink: 0;
}

body.page-ability-tree .dash-welcome--compact h1 {
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
}

body.page-ability-tree .alert {
    flex-shrink: 0;
    margin: 0;
    padding: 0.45rem 0.75rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   Passive Ability Tree (PoE-style SVG graph)
   ══════════════════════════════════════════════════════════════════════════ */

.pt-shell {
    padding: 0 !important;
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    height: auto;
}

.pt-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    padding: 0.45rem 0.85rem;
    border-bottom: 1px solid rgba(201, 168, 106, 0.18);
    background: linear-gradient(180deg, rgba(30, 26, 20, 0.9), rgba(22, 19, 15, 0.9));
    flex-shrink: 0;
}

.pt-char-picker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.pt-char-picker select {
    background: rgba(14, 12, 9, 0.9);
    border: 1px solid rgba(201, 168, 106, 0.3);
    color: var(--text);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
}

.pt-points {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pt-points[hidden],
.pt-loading[hidden] {
    display: none;
}

.pt-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(201, 168, 106, 0.25);
    background: rgba(201, 168, 106, 0.08);
    font-size: 0.78rem;
    color: var(--muted);
}

.pt-chip b {
    color: var(--text);
    font-size: 0.9rem;
}

.pt-chip--avail {
    border-color: rgba(120, 220, 130, 0.45);
    background: rgba(60, 160, 80, 0.12);
}

.pt-chip--avail b {
    color: #7fe08d;
}

.pt-toolbar-actions {
    margin-left: auto;
}

.pt-btn {
    border: 1px solid rgba(201, 168, 106, 0.35);
    background: rgba(201, 168, 106, 0.1);
    color: var(--text);
    border-radius: 8px;
    padding: 0.4rem 0.9rem;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.pt-btn:hover {
    background: rgba(201, 168, 106, 0.2);
}

.pt-btn--danger {
    border-color: rgba(224, 106, 106, 0.4);
    background: rgba(160, 60, 60, 0.12);
}

.pt-btn--danger:hover {
    background: rgba(160, 60, 60, 0.25);
}

.pt-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    background:
        radial-gradient(ellipse at center, rgba(58, 48, 32, 0.55) 0%, rgba(20, 17, 13, 0.95) 62%, rgba(12, 10, 8, 1) 100%);
}

.pt-stage svg {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
    touch-action: none;
}

.pt-stage svg.is-panning {
    cursor: grabbing;
}

/* Edges */
.pt-edge {
    fill: none;
    stroke: rgba(140, 120, 90, 0.28);
    stroke-width: 3;
    transition: stroke 0.2s ease;
}

.pt-edge.is-frontier {
    stroke: rgba(201, 168, 106, 0.55);
}

.pt-edge.is-on {
    stroke: #e8c268;
    stroke-width: 4;
    filter: drop-shadow(0 0 4px rgba(232, 194, 104, 0.6));
}

/* Nodes */
.pt-node {
    cursor: pointer;
}

.pt-node .pt-ring {
    fill: none;
    stroke: rgba(120, 105, 80, 0.4);
    stroke-width: 2;
    transition: stroke 0.2s ease;
}

.pt-node .pt-core {
    fill: #191510;
    stroke: rgba(150, 130, 95, 0.5);
    stroke-width: 2;
    transition: stroke 0.2s ease, fill 0.2s ease;
}

.pt-node .pt-icon {
    opacity: 0.55;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.pt-node .pt-label {
    fill: rgba(214, 196, 168, 0.7);
    font-size: 13px;
    font-family: inherit;
    pointer-events: none;
    paint-order: stroke;
    stroke: rgba(10, 8, 6, 0.85);
    stroke-width: 3px;
}

/* Locked */
.pt-node.is-locked .pt-icon {
    opacity: 0.22;
    filter: grayscale(1);
}

.pt-node.is-locked .pt-label {
    fill: rgba(150, 135, 115, 0.45);
}

/* Reachable but unaffordable */
.pt-node.is-reachable .pt-ring {
    stroke: rgba(201, 168, 106, 0.5);
    stroke-dasharray: 5 4;
}

.pt-node.is-reachable .pt-icon {
    opacity: 0.6;
}

/* Learnable now */
.pt-node.is-available .pt-ring {
    stroke: var(--pt-color, #e8c268);
    stroke-width: 3;
    animation: ptPulse 1.8s ease-in-out infinite;
}

.pt-node.is-available .pt-core {
    stroke: var(--pt-color, #e8c268);
}

.pt-node.is-available .pt-icon {
    opacity: 0.95;
}

.pt-node.is-available:hover .pt-core {
    fill: #241d13;
}

/* Allocated */
.pt-node.is-allocated .pt-ring {
    stroke: var(--pt-color, #e8c268);
    stroke-width: 3.5;
    filter: url(#ptGlow);
}

.pt-node.is-allocated .pt-core {
    fill: #2a2114;
    stroke: var(--pt-color, #e8c268);
}

.pt-node.is-allocated .pt-icon {
    opacity: 1;
}

.pt-node.is-allocated .pt-label {
    fill: #efe0be;
}

@keyframes ptPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* Overlays */
.pt-zoom {
    position: absolute;
    right: 0.85rem;
    top: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    z-index: 5;
}

.pt-zoom button {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(201, 168, 106, 0.35);
    background: rgba(20, 17, 13, 0.85);
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
}

.pt-zoom button:hover {
    background: rgba(201, 168, 106, 0.2);
}

.pt-legend {
    position: absolute;
    left: 0.85rem;
    bottom: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.9rem;
    z-index: 5;
    font-size: 0.75rem;
    color: var(--muted);
    background: rgba(15, 13, 10, 0.75);
    border: 1px solid rgba(201, 168, 106, 0.18);
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
}

.pt-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.pt-legend-item i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.pt-tooltip {
    position: absolute;
    z-index: 10;
    max-width: 280px;
    pointer-events: none;
    background: rgba(16, 13, 10, 0.96);
    border: 1px solid rgba(201, 168, 106, 0.4);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    font-size: 0.8rem;
}

.pt-tt-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding-bottom: 0.35rem;
    margin-bottom: 0.4rem;
    border-bottom: 2px solid;
}

.pt-tt-head strong {
    color: var(--text);
    font-size: 0.88rem;
}

.pt-tt-head span {
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pt-tt-stats {
    color: #b9e2a1;
    line-height: 1.45;
}

.pt-tt-status {
    margin-top: 0.45rem;
    font-size: 0.75rem;
}

.pt-tt-ok { color: #7fe08d; }
.pt-tt-go { color: #e8c268; }
.pt-tt-bad { color: #e07d7d; }

.pt-toast {
    position: absolute;
    left: 50%;
    top: 0.9rem;
    transform: translateX(-50%);
    z-index: 12;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.82rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.pt-toast--ok {
    background: rgba(38, 82, 48, 0.95);
    border: 1px solid rgba(127, 224, 141, 0.5);
    color: #d2f5d8;
}

.pt-toast--err {
    background: rgba(96, 38, 38, 0.95);
    border: 1px solid rgba(224, 125, 125, 0.5);
    color: #f5d2d2;
}

.pt-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.9rem;
    z-index: 4;
    pointer-events: none;
}

@media (max-width: 720px) {
    .pt-toolbar-actions {
        margin-left: 0;
    }
}

/* ── Security monitor (read-only login server protection view) ─────────── */

.secmon-body {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.secmon-body--degraded {
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(0.8);
}

.secmon-banner {
    display: grid;
    gap: 0.25rem;
    margin-top: 1rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid rgba(248, 113, 113, 0.55);
    border-radius: 10px;
    background: rgba(96, 38, 38, 0.55);
    color: #f5d2d2;
}

/* display:grid above would defeat the hidden attribute set by security-monitor.js */
.secmon-banner[hidden] {
    display: none;
}

.secmon-banner strong {
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.secmon-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 0.75rem;
}

.secmon-card {
    display: grid;
    gap: 0.3rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(58, 48, 32, 0.75);
    border-radius: 10px;
    background: linear-gradient(165deg, rgba(24, 20, 14, 0.95), rgba(10, 8, 6, 0.98));
}

.secmon-card em {
    font-style: normal;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.secmon-card strong {
    font-size: 1.05rem;
    letter-spacing: 0.03em;
}

.secmon-card .muted {
    font-size: 0.78rem;
}

/* Profile colors reinforce the text label (never color alone). */
.secmon-profile--normal { color: #4ade80; }
.secmon-profile--launch { color: #60a5fa; }
.secmon-profile--restart { color: #c084fc; }
.secmon-profile--safe { color: #facc15; }
.secmon-profile--attack { color: #f87171; }

.secmon-ok { color: var(--ok, #4ade80); }
.secmon-warn { color: #facc15; }
.secmon-bad { color: #f87171; }

.secmon-badge {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border: 1px dashed rgba(148, 141, 128, 0.5);
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.secmon-indicator {
    display: inline-block;
    margin: 0.15rem 0.25rem 0.15rem 0;
    padding: 0.25rem 0.65rem;
    border: 1px solid rgba(248, 113, 113, 0.55);
    border-radius: 999px;
    font-size: 0.8rem;
    color: #f5d2d2;
    background: rgba(96, 38, 38, 0.45);
}