/* ── Announcement banner ─────────────────────────────────────────── */
#announcement-banner {
    position: relative;
    z-index: calc(var(--z-header) + 1);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: #7a3d00;
    border-bottom: 1px solid #c06a10;
    font-size: 0.8rem;
    color: #f5d49a;
    font-family: var(--font-ui, sans-serif);
    letter-spacing: 0.01em;
}

.announcement-banner__icon {
    flex-shrink: 0;
    font-size: 0.85rem;
    opacity: 0.85;
}

.announcement-banner__text {
    flex: 1;
}

.announcement-banner__text strong {
    color: #ffd580;
}

.announcement-banner__close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #f5d49a;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.announcement-banner__close:hover {
    opacity: 1;
}

/* ── Header liveness bar ─────────────────────────────────────────── */
#header-live {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--section-gap);
    flex-wrap: wrap;
    padding: 0 20px;
    background: linear-gradient(180deg, rgb(7 8 13 / 90%) 0%, rgb(7 7 13 / 90%) 100%);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(8px);
    pointer-events: none;
    isolation: isolate;
    touch-action: none;
}

#header-live::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url(/assets/parchment-BIko6U1V.avif);
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    z-index: -1;
    pointer-events: none;
}
#header-live .rp-frame {
    margin-left: -30px;
    margin-right: -30px;
}

/* ── Header currency strip (center) ─────────────────────────────── */
.hdr-currency-strip {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    pointer-events: auto;
    user-select: text;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 2.8rem;
}
.hdr-cs-label {
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(197, 160, 89, 0.4);
}
.hdr-cs-icon {
    width: 1.3rem;
    height: 1.3rem;
    object-fit: contain;
    flex-shrink: 0;
    margin-right: 5px;
}
.hdr-cs-val {
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    color: var(--text-gold);
    letter-spacing: 0.03em;
    min-width: 2ch;
    cursor: text;
}
.hdr-cs-sep {
    color: rgba(197, 160, 89, 0.2);
    margin: 0 0.2rem;
}
.hdr-cs-btn {
    margin-left: 0.6rem;
    background: none;
    border: 1px solid rgba(197, 160, 89, 0.35);
    border-radius: 3px;
    color: rgba(197, 160, 89, 0.75);
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 3px 8px;
    cursor: pointer;
    transition:
        border-color 0.15s,
        color 0.15s;
}
.hdr-cs-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ── Header system icon nav (right side) ────────────────────────── */
.header-sys-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    pointer-events: auto;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 3px;
    min-width: 19rem;
}
.hsys-btn {
    width: auto;
    min-height: 2.6rem;
    height: 2.6rem;
    border-radius: 4px;
    background: rgba(197, 160, 89, 0.06);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(197, 160, 89, 0.15);
    color: var(--text-gold);
    font-size: var(--font-size-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition:
        background 0.15s,
        border-color 0.15s,
        color 0.15s;
    padding: 0 1rem;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
    pointer-events: auto;
    text-decoration: none;
}
.hsys-btn:hover {
    background: rgba(197, 160, 89, 0.15);
    border-color: var(--gold);
    color: var(--gold);
}
.hsys-btn.active,
.hsys-btn.hact-active {
    background: rgba(197, 160, 89, 0.18);
    border-color: var(--gold);
    color: var(--gold);
}
.hsys-icon {
    width: 1.1rem;
    height: 1.1rem;
    object-fit: contain;
    transition: opacity 0.15s;
    color: #cb9e4f;
}

.hdr-utc-clock {
    gap: 0.35rem;
    padding: 0 1rem;
    margin-left: 1rem;
    cursor: default;
    font-family: var(--font-body);
    box-sizing: border-box;
}
.hdr-utc-clock:hover {
    background: rgba(197, 160, 89, 0.06);
    border-color: rgba(197, 160, 89, 0.15);
    color: var(--text-gold);
}
.hdr-utc-clock .hsys-icon {
    width: 1rem;
    height: 1rem;
}
.hdr-utc-clock__time {
    display: block;
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    color: var(--text-gold-muted);
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: -1px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ── Account dropdown ────────────────────────────────────────────── */
.hdr-acct-dropdown {
    position: fixed;
    z-index: calc(var(--z-header) + 10);
    min-width: 10rem;
    background: #0f1117;
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    padding: 4px 0;
    display: flex;
    flex-direction: column;
}
.hdr-acct-dropdown[hidden] {
    display: none;
}
.hdr-acct-chevron {
    width: 0.9rem;
    height: 0.9rem;
    flex-shrink: 0;
    opacity: 0.6;
    transition: transform 0.15s;
}
#header-account-btn[aria-expanded='true'] .hdr-acct-chevron {
    transform: rotate(180deg);
    opacity: 1;
}
.hdr-acct-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 1rem;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    letter-spacing: 0.04em;
    color: rgba(197, 160, 89, 0.75);
    cursor: pointer;
    transition:
        background 0.12s,
        color 0.12s;
}
.hdr-acct-item:hover {
    background: rgba(197, 160, 89, 0.08);
    color: var(--gold);
}
.hdr-acct-item-icon {
    width: 0.9rem;
    height: 0.9rem;
    flex-shrink: 0;
    object-fit: contain;
    color: #cb9e4f;
    opacity: 0.7;
}
.hdr-acct-item-icon--danger {
    filter: brightness(0) saturate(100%) invert(60%) sepia(30%) saturate(800%) hue-rotate(320deg) brightness(90%)
        contrast(90%);
}
.hdr-acct-item--dev {
    display: none;
}
.hdr-acct-item--dev.is-visible {
    display: flex;
}
.hdr-acct-item--danger {
    color: rgba(200, 90, 90, 0.75);
}
.hdr-acct-item--danger:hover {
    background: rgba(200, 90, 90, 0.08);
    color: #e07070;
}
.hdr-acct-sep {
    height: 1px;
    background: rgba(197, 160, 89, 0.1);
    margin: 4px 0;
}

#header-account-btn,
#hdr-gold-btn {
    padding: 0 1rem 0 1rem;
}

#hdr-gold-btn {
    cursor: default;
    pointer-events: none;
}

.hsys-btn--discord {
    min-height: 2.4rem;
    height: 2.4rem;
}

@media (max-width: 767px) {
}

#header-account-name {
    padding-left: 0.6rem;
    font-family: var(--font-body);
    font-size: var(--font-size-md);
    letter-spacing: 0.04em;
    margin-bottom: -1px;
}

/* ── Header action bar (right) ───────────────────────────────────── */
#header-actions {
    position: absolute;
    top: 1.2rem;
    right: 2rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    pointer-events: auto;
}

.hact-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    border-bottom: 1px solid transparent;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(197, 160, 89, 0.55);
    transition:
        color 0.18s,
        border-color 0.18s;
    position: relative;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}
.hact-btn:hover {
    color: rgba(232, 210, 160, 0.9);
    background: none;
    border-bottom-color: rgba(197, 160, 89, 0.45);
}
.hact-btn.hact-active {
    color: var(--gold);
    background: none;
    border-bottom-color: var(--gold);
}

.hact-sep {
    display: inline-block;
    width: 1px;
    height: 1rem;
    background: rgba(197, 160, 89, 0.18);
    align-self: center;
    font-size: 0;
    pointer-events: none;
}

.hact-badge {
    display: none;
    position: absolute;
    top: 0;
    right: 0.2rem;
    min-width: 1.4rem;
    height: 1.4rem;
    background: #c0392b;
    color: #fff;
    font-size: var(--font-size-xs);
    font-weight: 700;
    border-radius: 0.7rem;
    align-items: center;
    justify-content: center;
    padding: 0 0.3rem;
    pointer-events: none;
}
.hlive-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    min-height: 1.8rem;
}
.hlive-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    letter-spacing: 0.08em;
    color: rgba(197, 160, 89, 0.55);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}
/* Shared line box - matches Players / Ships / verify copy */
#header-live .hlive-label,
#header-live .hlive-num {
    line-height: 1.25;
}
.hlive-dot {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.hlive-dot img {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
    opacity: 0.55;
    vertical-align: middle;
    margin-top: -3px;
}
#hlive-dot-sail img {
    width: 1.9rem;
    height: 1.9rem;
    margin-right: -2px;
}
.hlive-icon {
    font-size: var(--font-size-lg);
}
.hlive-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(197, 160, 89, 0.35);
    font-size: var(--font-size-xs);
}
.hlive-num {
    font-variant-numeric: tabular-nums;
    color: var(--text-gold);
    text-align: right;
    transition: color 0.6s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
    cursor: text;
}
.hlive-num.hlive-up {
    color: #4caf50;
    text-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
    animation: hlive-rise 0.8s ease-out forwards;
}
@keyframes hlive-rise {
    0% {
        transform: translateY(-3px);
        opacity: 0.7;
    }
    40% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
        color: rgba(232, 215, 175, 0.82);
    }
}
.hlive-sep {
    display: inline-block;
    width: 1px;
    height: 10px;
    background: rgba(197, 160, 89, 0.2);
    font-size: 0;
    flex-shrink: 0;
}

/* ── Activity pill action buttons (used inside #hdr-act-pill drawer) ──────── */
.hdr-act-dd-btn {
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(197, 160, 89, 0.15);
    background: rgba(197, 160, 89, 0.06);
    color: var(--text-gold);
    font-family: var(--font-body);
    font-size: var(--font-size-sm);
    text-align: left;
    cursor: pointer;
    transition:
        background 0.15s,
        border-color 0.15s;
}
.hdr-act-dd-btn:hover {
    background: rgba(197, 160, 89, 0.14);
    border-color: var(--gold);
}
.hdr-act-dd-btn--danger {
    border-color: rgba(180, 60, 60, 0.25);
    color: #c07070;
    background: rgba(180, 60, 60, 0.06);
}
.hdr-act-dd-btn--danger:hover {
    background: rgba(180, 60, 60, 0.14);
    border-color: #c05050;
}

/* ── Header event - same flex row model as .hlive-stat (Players / Ships) ─ */
.hlive-event {
    flex: 1 1 auto;
    min-width: 0;
}
#header-event-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-reddit-promo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}
.header-reddit-promo[hidden] {
    display: none !important;
}
.header-reddit-promo__text {
    margin: 0 0 0 5px;
    font-size: var(--font-size-base);
    letter-spacing: 0.08em;
    color: rgba(212, 190, 140, 0.88);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-reddit-promo__link {
    color: var(--accent-gold, #d4be8c);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.header-reddit-promo__link:hover {
    color: #fff;
}

.header-email-verify {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}
.header-email-verify[hidden] {
    display: none !important;
}
.header-ev-headline {
    flex: 1 1 8rem;
    min-width: 0;
    margin: 0 0 0 5px;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: var(--font-size-base);
    line-height: 1.25;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(212, 190, 140, 0.88);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.header-ev-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 4px 10px;
    margin-left: 10px;
    box-sizing: border-box;
    line-height: 1.25;
    background: rgba(30, 32, 24, 0.95);
    border: 1px solid rgba(197, 160, 89, 0.45);
    border-radius: 2px;
    color: rgb(234, 179, 8);
    font-family: var(--font-body);
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        border-color 0.15s,
        background 0.15s;
    animation: glenwich-pulse 2.2s ease-in-out infinite;
}
.header-ev-cta:hover:not(:disabled) {
    background: rgba(40, 44, 30, 0.98);
    border-color: rgba(197, 160, 89, 0.65);
}
.header-ev-cta:disabled {
    opacity: 0.5;
    cursor: wait;
    animation: none;
}
.header-ev-cta.header-ev-cta--done {
    animation: none;
    opacity: 0.65;
    pointer-events: none;
}
.header-ev-hint {
    flex-basis: 100%;
    font-size: var(--font-size-xs);
    line-height: 1.35;
    letter-spacing: 0.04em;
    text-transform: none;
    color: rgba(197, 160, 89, 0.55);
}
/* No text - don’t reserve a second flex row (was throwing off vertical alignment). */
.header-ev-hint:empty {
    display: none;
}
.header-ev-hint.header-ev-hint--err {
    color: #c0392b;
}
@keyframes glenwich-pulse {
    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.15);
    }
    50% {
        opacity: 0.88;
        box-shadow: 0 0 10px rgba(234, 179, 8, 0.35);
    }
}
@keyframes guest-secure-pulse {
    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 1px rgba(192, 57, 43, 0.2);
        border-color: rgba(192, 57, 43, 0.5);
    }
    50% {
        opacity: 0.88;
        box-shadow: 0 0 10px rgba(192, 57, 43, 0.45);
        border-color: rgba(192, 57, 43, 0.75);
    }
}
/* Guest-specific variant - red pulse */
.header-ev-cta--guest {
    color: #e74c3c;
    border-color: rgba(192, 57, 43, 0.5);
    animation: guest-secure-pulse 2.2s ease-in-out infinite;
}
.header-ev-cta--guest:hover:not(:disabled) {
    background: rgba(40, 16, 14, 0.98);
    border-color: rgba(192, 57, 43, 0.8);
}
@keyframes notif-alert-pulse {
    0%,
    100% {
        color: rgb(152 21 21);
        text-shadow: 0 0 6px rgba(152, 21, 21, 0.5);
    }
    50% {
        color: rgb(200 40 40);
        text-shadow: 0 0 14px rgba(152, 21, 21, 0.9);
    }
}
/* Applied to the Notifications button when there are unread items */
#hact-alerts-btn.hact-unread {
    animation: notif-alert-pulse 1.6s ease-in-out infinite;
    color: rgb(152 21 21) !important;
}
#hact-alerts-btn.hact-unread span {
    color: rgb(152 21 21);
}
