/* ═══════════════════════════════════════════════════════════
   OVERLAY SYSTEM — shared base
═══════════════════════════════════════════════════════════ */
.overlay-panel {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity .35s;
}
.overlay-panel.open {
    opacity: 1;
    pointer-events: all;
}
.overlay-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,3,10,.82);
    backdrop-filter: blur(6px);
}

/* Side-panel variant (right-side drawer) */
.overlay-panel.side-panel {
    justify-content: flex-end;
}
.side-panel-shell {
    position: relative;
    width: 420px;
    height: 100%;
    background: rgba(2,7,18,.97);
    border-left: 1px solid rgba(0,80,130,.35);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.16,1,.3,1);
    overflow: hidden;
}
.overlay-panel.side-panel.open .side-panel-shell {
    transform: translateX(0);
}

/* Modal variant (center) */
.modal-shell {
    position: relative;
    background: rgba(2,7,18,.97);
    border: 1px solid rgba(0,80,130,.35);
    max-width: 860px;
    width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(24px) scale(.97);
    transition: transform .35s cubic-bezier(.16,1,.3,1);
}
.overlay-panel.open .modal-shell {
    transform: translateY(0) scale(1);
}
.modal-shell::-webkit-scrollbar { width: 3px; }
.modal-shell::-webkit-scrollbar-thumb { background: rgba(0,80,130,.4); }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(0,55,90,.4);
    flex-shrink: 0;
}
.modal-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #00cfff;
}
.modal-close {
    background: none;
    border: 1px solid rgba(0,60,100,.3);
    color: #1e3a52;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    padding: 3px 8px;
    cursor: pointer;
    transition: color .2s, border-color .2s;
}
.modal-close:hover { color: #00cfff; border-color: #00cfff; }

/* ═══════════════════════════════════════════════════════════
   POST MODE — full overlay composer
═══════════════════════════════════════════════════════════ */
.post-mode-shell {
    position: relative;
    width: 95vw;
    max-width: 1200px;
    height: 88vh;
    background: rgba(1,5,14,.98);
    border: 1px solid rgba(0,80,130,.4);
    display: flex;
    flex-direction: column;
    transform: translateY(32px) scale(.97);
    transition: transform .4s cubic-bezier(.16,1,.3,1);
    overflow: hidden;
}
.overlay-panel.open .post-mode-shell {
    transform: translateY(0) scale(1);
}
.post-mode-shell::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00cfff 30%, #39ff14 70%, transparent);
}

/* PM header */
.pm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(0,55,90,.4);
    flex-shrink: 0;
    background: rgba(0,5,14,.9);
}
.pm-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    letter-spacing: 4px;
    color: #00cfff;
}
.pm-header-right { display: flex; align-items: center; gap: 8px; }

.pm-ai-rewrite, .pm-save-draft, .pm-publish, .pm-close {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7.5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 5px 12px;
    border: 1px solid;
    cursor: pointer;
    background: none;
    transition: all .18s;
}
.pm-ai-rewrite  { border-color: rgba(192,132,252,.4); color: #c084fc; }
.pm-ai-rewrite:hover  { background: rgba(192,132,252,.08); }
.pm-save-draft  { border-color: rgba(0,80,130,.4);  color: #1e3a52; }
.pm-save-draft:hover  { border-color: #00cfff; color: #00cfff; }
.pm-publish     { border-color: #39ff14; color: #39ff14; }
.pm-publish:hover     { background: rgba(57,255,20,.08); }
.pm-close       { border-color: rgba(0,80,130,.3);  color: #1e3a52; }
.pm-close:hover       { border-color: #ff3c3c; color: #ff3c3c; }

/* Login gate */
.pm-login-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 16px;
    padding: 40px;
}
.pm-gate-icon { font-size: 32px; color: #00cfff; text-shadow: 0 0 20px rgba(0,207,255,.4); }
.pm-gate-title { font-family: 'Bebas Neue', sans-serif; font-size: 28px; letter-spacing: 4px; color: #ddeeff; }
.pm-gate-sub { font-family: 'IBM Plex Mono', monospace; font-size: 9px; color: #1e3a52; letter-spacing: 1px; text-align: center; max-width: 380px; }
.pm-gate-btns { display: flex; gap: 12px; }
.gate-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 8px 20px;
    border: 1px solid rgba(0,80,130,.5);
    color: #1e3a52;
    text-decoration: none;
    transition: all .2s;
}
.gate-btn.primary { border-color: #00cfff; color: #00cfff; }
.gate-btn:hover   { background: rgba(0,207,255,.08); border-color: #00cfff; color: #00cfff; }
.pm-gate-earn { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.earn-pill {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 1px;
    background: rgba(57,255,20,.1);
    border: 1px solid rgba(57,255,20,.3);
    color: #39ff14;
    padding: 2px 8px;
}

/* Two-panel body */
.pm-body {
    display: grid;
    grid-template-columns: 1fr 340px;
    flex: 1;
    overflow: hidden;
}
.pm-controls {
    padding: 16px 20px;
    overflow-y: auto;
    border-right: 1px solid rgba(0,55,90,.3);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.pm-controls::-webkit-scrollbar { width: 3px; }
.pm-controls::-webkit-scrollbar-thumb { background: rgba(0,80,130,.4); }

.pm-section { display: flex; flex-direction: column; gap: 6px; }
.pm-intel-banner {
    padding: 12px;
    border: 1px solid rgba(0, 160, 220, .24);
    background: linear-gradient(135deg, rgba(0, 18, 34, .92), rgba(10, 10, 32, .8));
}
.pm-intel-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #00cfff;
}
.pm-intel-copy {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    line-height: 1.7;
    color: #7fa0bd;
}
.pm-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #ffb84d;
}
.pm-label-sub { color: #1e3a52; letter-spacing: 1px; }

.pm-input, .pm-select, .pm-textarea {
    background: rgba(0,8,20,.9);
    border: 1px solid rgba(0,60,100,.4);
    color: #b8d4e8;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    padding: 8px 10px;
    outline: none;
    transition: border-color .2s;
    width: 100%;
    letter-spacing: .4px;
}
.pm-input:focus, .pm-select:focus, .pm-textarea:focus {
    border-color: #00cfff;
}
.pm-select option { background: #030a18; }
.pm-textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.pm-char-count { font-family: 'IBM Plex Mono', monospace; font-size: 6.5px; color: #1e3a52; text-align: right; letter-spacing: 1px; }

/* Card type buttons */
.pm-card-types, .pm-placement-btns, .pm-ad-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.card-type-btn, .placement-btn, .ad-btn, .submission-type-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 10px;
    border: 1px solid rgba(0,60,100,.35);
    color: #1e3a52;
    cursor: pointer;
    background: none;
    transition: all .18s;
}
.card-type-btn.active, .placement-btn.active, .ad-btn.active, .submission-type-btn.active {
    border-color: #00cfff;
    color: #00cfff;
    background: rgba(0,207,255,.06);
}
.card-type-btn:hover, .placement-btn:hover, .ad-btn:hover, .submission-type-btn:hover {
    border-color: rgba(0,160,200,.5);
    color: #b8d4e8;
}
.pm-ai-suggestions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}
.pm-ai-suggestion {
    padding: 8px 10px;
    border-left: 2px solid rgba(192,132,252,.5);
    background: rgba(192,132,252,.06);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    color: #ceb7ff;
    line-height: 1.6;
}

/* Image drop zone */
.pm-image-drop { display: flex; flex-direction: column; gap: 8px; }
.pm-drop-area {
    border: 1px dashed rgba(0,80,130,.5);
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    color: #1e3a52;
    letter-spacing: 1px;
}
.pm-drop-area:hover, .pm-drop-area.drag-over { border-color: #00cfff; color: #00cfff; }
.pm-image-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pm-img-thumb {
    aspect-ratio: 1;
    position: relative;
    border: 1px solid rgba(0,80,130,.3);
    overflow: hidden;
}
.pm-img-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.pm-img-remove {
    position: absolute;
    top: 2px; right: 2px;
    background: rgba(255,60,60,.85);
    color: #fff;
    border: none;
    font-size: 8px;
    width: 16px; height: 16px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity .18s;
}
.pm-img-thumb:hover .pm-img-remove { opacity: 1; }

/* AI versions */
.pm-ai-versions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
.ai-version-card {
    border: 1px solid rgba(192,132,252,.25);
    padding: 8px 10px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8.5px;
    color: #b8d4e8;
    line-height: 1.5;
    position: relative;
}
.ai-version-card:hover { border-color: #c084fc; background: rgba(192,132,252,.05); }
.ai-version-label {
    font-size: 6px;
    letter-spacing: 2px;
    color: #c084fc;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.ai-version-card.selected { border-color: #39ff14; }

/* ═══════════════════════════════════════════════════════════
   POST MODE PREVIEW PANEL
═══════════════════════════════════════════════════════════ */
.pm-preview-panel {
    padding: 14px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(0,4,12,.6);
}
.pm-preview-panel::-webkit-scrollbar { width: 3px; }
.pm-preview-panel::-webkit-scrollbar-thumb { background: rgba(0,80,130,.4); }

.pm-preview-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 6.5px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #1e3a52;
    margin-bottom: 8px;
}

/* Preview card */
.pm-preview-card {
    background: rgba(4,12,24,.94);
    border: 1px solid rgba(0,100,160,.3);
    padding: 12px 11px 10px;
    position: relative;
    overflow: hidden;
    transition: all .2s;
}
.pm-preview-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00cfff, transparent);
    opacity: .6;
}
.pm-prev-img {
    width: 100%;
    height: 80px;
    margin-bottom: 8px;
    background: rgba(0,14,30,.87);
    overflow: hidden;
    position: relative;
}
.pm-prev-img img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.pm-prev-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}
.pm-prev-cat {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 3px;
    color: #00cfff;
}
.pm-prev-time { font-family: 'IBM Plex Mono', monospace; font-size: 7px; color: #1e3a52; }
.pm-prev-headline {
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    font-weight: 600;
    color: #ddeeff;
    line-height: 1.3;
    margin-bottom: 5px;
}
.pm-prev-lede {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    color: #253f58;
    line-height: 1.6;
    margin-bottom: 8px;
}
.pm-prev-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px solid rgba(0,60,100,.28);
}
.pm-prev-tag { font-family: 'IBM Plex Mono', monospace; font-size: 6.5px; letter-spacing: 2px; color: #ffb84d; text-transform: uppercase; }
.pm-prev-read { font-family: 'IBM Plex Mono', monospace; font-size: 6.5px; color: rgba(0,207,255,.4); text-transform: uppercase; }

/* Card size thumbnails */
.pm-size-preview { display: flex; gap: 10px; flex-wrap: wrap; }
.size-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    opacity: .5;
    transition: opacity .2s;
}
.size-thumb.active { opacity: 1; }
.size-thumb span { font-family: 'IBM Plex Mono', monospace; font-size: 6px; color: #1e3a52; letter-spacing: 1px; text-transform: uppercase; }
.st-visual {
    border: 1px solid rgba(0,80,130,.5);
    background: rgba(0,15,35,.6);
}
.st-standard { width: 42px; height: 52px; }
.st-wide     { width: 66px; height: 40px; }
.st-tall     { width: 36px; height: 68px; }
.st-mini     { width: 36px; height: 36px; }
.size-thumb.active .st-visual { border-color: #00cfff; background: rgba(0,60,130,.2); }

/* Earn display */
.pm-earn-display { margin-top: 4px; }
.pm-earn-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(0,40,65,.25);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7.5px;
}
.earn-label { color: #1e3a52; }
.earn-val { font-weight: 700; }
.earn-val.c-green { color: #39ff14; }
.earn-val.c-amber { color: #ffb84d; }
.earn-val.c-glow  { color: #00cfff; }
.pm-earn-total { border-top: 1px solid rgba(0,80,130,.3); padding-top: 8px !important; }

/* Preview card type variants */
.pm-preview-card.type-wide   { padding: 10px 14px 9px; }
.pm-preview-card.type-wide .pm-prev-img   { height: 60px; }
.pm-preview-card.type-wide .pm-prev-headline { font-size: 16px; }
.pm-preview-card.type-tall   { }
.pm-preview-card.type-tall .pm-prev-img   { height: 120px; }
.pm-preview-card.type-mini   { padding: 8px 10px; }
.pm-preview-card.type-mini .pm-prev-img   { display: none; }
.pm-preview-card.type-mini .pm-prev-lede  { display: none; }

@media (max-width: 900px) {
    .side-panel-shell {
        width: min(100vw, 420px);
    }

    .post-mode-shell {
        width: calc(100vw - 16px);
        height: calc(100vh - 16px);
        border-radius: 18px;
    }

    .pm-header {
        padding: 12px 14px;
        align-items: flex-start;
        gap: 10px;
        flex-wrap: wrap;
    }

    .pm-title {
        font-size: 18px;
        letter-spacing: 3px;
    }

    .pm-header-right {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .pm-ai-rewrite, .pm-save-draft, .pm-publish, .pm-close {
        min-height: 42px;
        font-size: 9px;
        letter-spacing: 1px;
        padding: 8px 10px;
    }

    .pm-body {
        grid-template-columns: 1fr;
    }

    .pm-controls,
    .pm-preview-panel {
        padding: 14px;
    }

    .pm-controls {
        border-right: none;
        border-bottom: 1px solid rgba(0,55,90,.3);
    }

    .pm-image-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pm-size-preview,
    .pm-card-types,
    .pm-placement-btns,
    .pm-ad-btns,
    .pm-gate-btns {
        gap: 8px;
    }

    .card-type-btn, .placement-btn, .ad-btn, .submission-type-btn, .gate-btn {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .pm-login-gate {
        padding: 24px 18px;
    }
}

@media (max-width: 640px) {
    .modal-shell {
        width: calc(100vw - 12px);
        max-height: calc(100vh - 12px);
        border-radius: 16px;
    }

    .post-mode-shell {
        width: calc(100vw - 10px);
        height: calc(100vh - 10px);
        border-radius: 16px;
    }

    .pm-header-right {
        grid-template-columns: 1fr;
    }

    .pm-title {
        font-size: 16px;
    }

    .pm-gate-title {
        font-size: 22px;
        letter-spacing: 2px;
        text-align: center;
    }

    .pm-gate-btns {
        width: 100%;
        flex-direction: column;
    }

    .gate-btn {
        width: 100%;
    }

    .pm-input, .pm-select, .pm-textarea {
        font-size: 12px;
        padding: 10px 12px;
    }

    .pm-prev-headline {
        font-size: 18px;
    }

    .pm-prev-lede,
    .pm-prev-cat,
    .pm-prev-time,
    .pm-prev-tag,
    .pm-prev-read {
        font-size: 10px;
        line-height: 1.5;
    }
}

/* HUD action buttons */
#hud-actions {
    display: flex;
    align-items: flex-end;
    gap: 0;
    padding-bottom: 6px;
    border-right: 1px solid rgba(0,55,90,.4);
}
.hud-action-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 11px;
    border: 1px solid rgba(0,60,100,.3);
    border-radius: 0;
    cursor: pointer;
    background: none;
    transition: all .18s;
    white-space: nowrap;
}
.hud-action-btn.c-green  { color: rgba(57,255,20,.7);  border-color: rgba(57,255,20,.2); }
.hud-action-btn.c-green:hover  { background: rgba(57,255,20,.08); border-color: #39ff14; color: #39ff14; }
.hud-action-btn.c-glow   { color: rgba(0,207,255,.6);  border-color: rgba(0,160,200,.2); }
.hud-action-btn.c-glow:hover   { background: rgba(0,207,255,.07); border-color: #00cfff; color: #00cfff; }
.hud-action-btn.c-amber  { color: rgba(255,184,77,.7); border-color: rgba(255,184,77,.2); }
.hud-action-btn.c-amber:hover  { background: rgba(255,184,77,.07); border-color: #ffb84d; color: #ffb84d; }

/* Sys-bar action btn */
.sys-action-btn {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 4px 10px;
    border: 1px solid rgba(0,80,130,.25);
    color: #1e3a52;
    cursor: pointer;
    background: none;
    transition: all .2s;
}
.sys-action-btn:hover { border-color: #00cfff; color: #00cfff; background: rgba(0,207,255,.05); }

/* ═══════════════════════════════════════════════════════════
   WALLET MODAL
═══════════════════════════════════════════════════════════ */
.wallet-shell { padding: 0; }
.wallet-balance {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0,55,90,.3);
    background: rgba(0,6,18,.6);
    text-align: center;
}
.wallet-pts-label { font-family: 'IBM Plex Mono', monospace; font-size: 7px; letter-spacing: 3px; color: #1e3a52; text-transform: uppercase; margin-bottom: 6px; }
.wallet-pts-value { font-family: 'Bebas Neue', sans-serif; font-size: 42px; letter-spacing: 3px; color: #00cfff; line-height: 1; }
.pts-unit { font-family: 'IBM Plex Mono', monospace; font-size: 14px; color: #1e3a52; letter-spacing: 2px; }

.wallet-progress-track {
    height: 6px;
    background: rgba(0,40,80,.5);
    border: 1px solid rgba(0,60,100,.3);
    margin: 12px auto 6px;
    max-width: 480px;
    position: relative;
}
.wallet-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00cfff, #39ff14);
    transition: width 1.2s cubic-bezier(.16,1,.3,1);
}
.wallet-progress-goal {
    position: absolute;
    right: -1px; top: -14px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 6px;
    color: #1e3a52;
    letter-spacing: 1px;
}
.wallet-progress-label { font-family: 'IBM Plex Mono', monospace; font-size: 7.5px; color: #ffb84d; letter-spacing: 2px; margin-bottom: 6px; }
.wallet-payout-note { font-family: 'IBM Plex Mono', monospace; font-size: 7px; color: #1e3a52; letter-spacing: 1px; }

.wallet-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.wallet-col {
    padding: 18px 22px;
}
.wallet-col + .wallet-col { border-left: 1px solid rgba(0,55,90,.3); }
.wallet-section-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #ffb84d;
    margin-bottom: 12px;
}

.earn-table { display: flex; flex-direction: column; gap: 6px; }
.earn-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0,40,65,.2);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7.5px;
    color: #6a8ca0;
}
.earn-row.faded { opacity: .6; }
.ec { font-weight: 700; padding-left: 8px; flex-shrink: 0; }
.ec.green  { color: #39ff14; }
.ec.amber  { color: #ffb84d; }
.ec.glow   { color: #00cfff; }
.ec.red    { color: #ff3c3c; }

.rules-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7.5px;
    color: #6a8ca0;
    line-height: 1.55;
}
.rules-list li { padding: 3px 0; border-bottom: 1px solid rgba(0,40,65,.18); }
.rules-warning { color: #ffb84d !important; }

/* ═══════════════════════════════════════════════════════════
   LEADERBOARD PANEL
═══════════════════════════════════════════════════════════ */
.lb-tabs {
    display: flex;
    border-bottom: 1px solid rgba(0,55,90,.3);
    flex-shrink: 0;
}
.lb-tab {
    flex: 1;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 6.5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 8px 4px;
    border: none;
    background: none;
    color: #1e3a52;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color .2s;
}
.lb-tab.active { color: #00cfff; border-bottom-color: #00cfff; }
.lb-tab:hover:not(.active) { color: #b8d4e8; }

.lb-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}
.lb-list::-webkit-scrollbar { width: 2px; }
.lb-list::-webkit-scrollbar-thumb { background: rgba(0,80,130,.4); }

.lb-loading, .lb-empty { padding: 24px; font-family: 'IBM Plex Mono', monospace; font-size: 8px; color: #1e3a52; letter-spacing: 1px; text-align: center; }

.lb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(0,40,65,.18);
    transition: background .15s;
}
.lb-row:hover { background: rgba(0,40,80,.15); }
.lb-rank {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    color: #1e3a52;
    width: 26px;
    flex-shrink: 0;
}
.lb-row:nth-child(1) .lb-rank { color: #ffd700; }
.lb-row:nth-child(2) .lb-rank { color: #c0c0c0; }
.lb-row:nth-child(3) .lb-rank { color: #cd7f32; }
.lb-avatar {
    width: 28px; height: 28px;
    border: 1px solid rgba(0,80,130,.4);
    border-radius: 50%;
    background: rgba(0,20,40,.8);
    display: flex; align-items: center; justify-content: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    color: #00cfff;
    flex-shrink: 0;
}
.lb-info { flex: 1; }
.lb-name { font-family: 'IBM Plex Mono', monospace; font-size: 8.5px; color: #b8d4e8; letter-spacing: 1px; }
.lb-tier { font-family: 'IBM Plex Mono', monospace; font-size: 6px; color: #1e3a52; letter-spacing: 2px; text-transform: uppercase; }
.lb-score { font-family: 'Bebas Neue', sans-serif; font-size: 20px; color: #00cfff; letter-spacing: 1px; }

/* Badges */
.lb-badges-section { padding: 12px 14px; border-top: 1px solid rgba(0,55,90,.3); flex-shrink: 0; }
.badges-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.badge-chip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border: 1px solid rgba(0,80,130,.3);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 1px;
    color: #1e3a52;
    background: rgba(0,10,25,.5);
    transition: all .2s;
}
.badge-chip.earned { border-color: rgba(0,207,255,.4); color: #b8d4e8; }
.badge-chip.earned .badge-icon { filter: none; }
.badge-icon { font-size: 11px; filter: grayscale(1) opacity(.3); }
.badge-chip.earned .badge-icon { filter: none; }

/* Achievement toasts */
#achievement-toasts {
    position: fixed;
    top: 70px;
    right: 16px;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.achievement-toast {
    background: rgba(2,8,20,.97);
    border: 1px solid #ffb84d;
    border-left: 3px solid #ffb84d;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'IBM Plex Mono', monospace;
    animation: toastIn .4s cubic-bezier(.16,1,.3,1), toastOut .4s ease 3.6s forwards;
    box-shadow: 0 0 20px rgba(255,184,77,.1);
}
@keyframes toastIn  { from { transform: translateX(120%); opacity:0; } to { transform: translateX(0); opacity:1; } }
@keyframes toastOut { to   { transform: translateX(120%); opacity:0; } }
.toast-icon  { font-size: 16px; }
.toast-label { font-size: 7px; letter-spacing: 2px; text-transform: uppercase; color: #ffb84d; }
.toast-text  { font-size: 8.5px; color: #b8d4e8; margin-top: 2px; }

/* Sky condition badge */
#sky-condition-badge {
    position: fixed;
    top: 68px;
    right: 14px;
    z-index: 190;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 6.5px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #1e3a52;
    background: rgba(2,6,13,.8);
    border: 1px solid rgba(0,55,90,.3);
    padding: 3px 8px;
    pointer-events: none;
    transition: color .5s;
}

/* ═══════════════════════════════════════════════════════════
   DM / MESSAGES PANEL
═══════════════════════════════════════════════════════════ */
.dm-shell { }
.dm-body {
    display: grid;
    grid-template-columns: 140px 1fr;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}
.dm-sidebar {
    border-right: 1px solid rgba(0,55,90,.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dm-search { padding: 8px 10px; border-bottom: 1px solid rgba(0,55,90,.25); }
.dm-search-input {
    width: 100%;
    background: rgba(0,8,20,.8);
    border: 1px solid rgba(0,60,100,.3);
    color: #b8d4e8;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7.5px;
    padding: 5px 8px;
    outline: none;
}
.dm-conv-list { flex: 1; overflow-y: auto; }
.dm-conv-list::-webkit-scrollbar { width: 2px; }
.dm-conv-list::-webkit-scrollbar-thumb { background: rgba(0,80,130,.4); }
.dm-conv-item {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0,40,65,.2);
    cursor: pointer;
    transition: background .15s;
}
.dm-conv-item:hover, .dm-conv-item.active { background: rgba(0,40,80,.2); }
.dm-conv-name { font-family: 'IBM Plex Mono', monospace; font-size: 8px; color: #b8d4e8; letter-spacing: .5px; }
.dm-conv-preview { font-family: 'IBM Plex Mono', monospace; font-size: 6.5px; color: #1e3a52; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-conv-unread { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #00cfff; margin-left: 4px; vertical-align: middle; }
.dm-new-btn {
    padding: 8px 10px;
    border-top: 1px solid rgba(0,55,90,.3);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #39ff14;
    background: none;
    border-bottom: none; border-left: none; border-right: none;
    cursor: pointer;
    transition: background .2s;
    flex-shrink: 0;
    text-align: left;
}
.dm-new-btn:hover { background: rgba(57,255,20,.05); }

.dm-thread {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dm-thread-header {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(0,55,90,.3);
    flex-shrink: 0;
}
.dm-thread-name { font-family: 'IBM Plex Mono', monospace; font-size: 8px; color: #00cfff; letter-spacing: 2px; text-transform: uppercase; }
.dm-messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dm-messages-list::-webkit-scrollbar { width: 2px; }
.dm-messages-list::-webkit-scrollbar-thumb { background: rgba(0,80,130,.4); }
.dm-empty-state {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8px;
    color: #1e3a52;
    letter-spacing: 1px;
    text-align: center;
    margin-top: 40px;
}
.dm-msg {
    max-width: 80%;
    padding: 6px 10px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 8.5px;
    line-height: 1.55;
    border: 1px solid;
}
.dm-msg.sent {
    align-self: flex-end;
    border-color: rgba(0,100,160,.4);
    background: rgba(0,30,60,.4);
    color: #b8d4e8;
}
.dm-msg.received {
    align-self: flex-start;
    border-color: rgba(0,55,90,.3);
    background: rgba(0,10,25,.5);
    color: #8aacbe;
}
.dm-msg-time { font-size: 6px; color: #1e3a52; margin-top: 3px; letter-spacing: 1px; }
.dm-compose {
    padding: 8px 12px;
    border-top: 1px solid rgba(0,55,90,.3);
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.dm-input-field {
    flex: 1;
    background: rgba(0,8,20,.8);
    border: 1px solid rgba(0,60,100,.3);
    color: #b8d4e8;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    padding: 7px 10px;
    outline: none;
    resize: none;
    transition: border-color .2s;
}
.dm-input-field:focus { border-color: #00cfff; }
.dm-send-btn {
    padding: 6px 14px;
    border: 1px solid #39ff14;
    color: #39ff14;
    background: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7.5px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background .2s;
    align-self: flex-end;
}
.dm-send-btn:hover { background: rgba(57,255,20,.07); }
.dm-loading { padding: 16px; font-family: 'IBM Plex Mono', monospace; font-size: 7.5px; color: #1e3a52; letter-spacing: 1px; }
