:root {
    --bg: #000;
    --panel: rgba(0, 3, 8, 0.95);
    --panel-deep: rgba(0, 2, 6, 0.98);
    --blue: #43a9ff;
    --cyan: #1de6ff;
    --gold: #f5ca55;
    --red: #ff4d78;
    --green: #67eda1;
    --white: #f2f8ff;
    --muted: #91a8c2;
    --border: rgba(74, 170, 255, 0.34);
    --border-soft: rgba(106, 188, 255, 0.17);
}

:where([data-admin-link][hidden]) {
    display: none !important;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body.final-dashboard-page {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 50% -10%, rgba(29, 230, 255, 0.035), transparent 34rem),
        linear-gradient(180deg, #000, #000);
    color: var(--white);
    font-family: Arial, Helvetica, sans-serif;
}

a,
button {
    font: inherit;
}

a {
    color: inherit;
}

.void-field {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.44;
}

.game-header,
.dashboard-frame {
    width: min(1880px, calc(100vw - 20px));
    margin: 10px auto 0;
}

.game-header {
    display: grid;
    gap: 8px;
}

.game-masthead,
.status-grid,
.nav-rail section,
.command-core,
.ops-module,
.top-ten,
.pulse-stack {
    position: relative;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(0, 6, 12, 0.96), rgba(0, 2, 7, 0.97));
    box-shadow: 0 0 34px rgba(35, 151, 255, 0.12), inset 0 0 32px rgba(29, 230, 255, 0.04);
}

.game-masthead::before,
.status-grid::before,
.nav-rail section::before,
.command-core::before,
.ops-module::before,
.top-ten::before,
.pulse-stack::before {
    content: "";
    position: absolute;
    inset: -1px;
    pointer-events: none;
    background:
        linear-gradient(90deg, var(--cyan), transparent 18%) top left / 100% 1px no-repeat,
        linear-gradient(180deg, var(--cyan), transparent 38%) top left / 1px 100% no-repeat,
        linear-gradient(270deg, rgba(245, 202, 85, 0.55), transparent 16%) bottom right / 100% 1px no-repeat;
    opacity: 0.62;
}

.game-masthead {
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 4px 16px;
    background: #000;
}

.game-logo {
    display: flex;
    align-items: center;
    width: 300px;
    height: 100px;
    overflow: hidden;
    background: #000;
    text-decoration: none;
}

.game-logo img {
    width: 300px;
    height: 200px;
    object-fit: cover;
    object-position: center;
}

.account-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.account-links span,
.status-grid span,
.nav-rail h2,
.nav-rail b,
.identity-stack > span,
.core-readouts span,
.command-alerts span,
.ops-module header span,
.signal-list span,
.ledger-grid span,
.top-ten header span,
.pulse-stack header span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.account-links a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border: 1px solid rgba(74, 170, 255, 0.42);
    background: rgba(5, 31, 58, 0.72);
    color: #dfeeff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.account-links a:hover,
.nav-rail a:hover,
.identity-badges a:hover,
.top-ten a:hover {
    transform: translateY(-2px);
    border-color: var(--cyan);
    color: #fff;
}

.status-grid {
    display: grid;
    grid-template-columns: 1.15fr repeat(7, minmax(112px, 1fr));
}

.status-grid article {
    min-width: 0;
    padding: 15px 16px;
    border-right: 1px solid var(--border-soft);
}

.status-grid strong {
    display: block;
    margin-top: 7px;
    color: #fff;
    font-size: clamp(14px, 0.86vw, 19px);
    line-height: 1.1;
    white-space: nowrap;
}

.dashboard-frame {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 320px;
    gap: 10px;
    padding-bottom: 12px;
}

.nav-rail {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-rail section {
    padding: 11px;
    overflow: hidden;
}

.nav-rail h2 {
    margin: 0 0 8px;
    color: var(--blue);
}

.nav-rail a {
    position: relative;
    min-height: 31px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    border: 1px solid rgba(74, 170, 255, 0.18);
    background: rgba(0, 3, 8, 0.72);
    color: #b7cde6;
    text-decoration: none;
    overflow: hidden;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.nav-rail a::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 -45%;
    width: 40%;
    background: linear-gradient(90deg, transparent, rgba(29, 230, 255, 0.24), transparent);
    transform: skewX(-21deg);
    transition: left 220ms ease;
}

.nav-rail a:hover::after,
.nav-rail a.active::after {
    left: 110%;
}

.nav-rail a.active {
    border-color: rgba(29, 230, 255, 0.72);
    background: rgba(9, 56, 98, 0.62);
    color: #fff;
}

.nav-rail b {
    min-width: 32px;
    color: var(--cyan);
}

.dashboard-main,
.right-stack {
    display: grid;
    gap: 10px;
    align-content: stretch;
}

/* The round pages use the central panel as the primary workspace. Keep the
   leaderboard available from Rankings itself, but do not consume a full rail
   on every other screen. */
.final-dashboard-page:not(.final-dashboard-home) .dashboard-frame {
    grid-template-columns: 240px minmax(0, 1fr);
}

.final-dashboard-page:not(.final-dashboard-home) .right-stack {
    display: none;
}

.final-dashboard-page:not(.final-dashboard-home) .operations-grid {
    grid-column: 2;
}

.command-core {
    min-height: 608px;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-rows: auto 1fr auto;
    gap: 18px;
    padding: 30px;
    overflow: hidden;
    isolation: isolate;
}

.planet-wash {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 67% 44%, rgba(245, 202, 85, 0.12), transparent 14rem),
        radial-gradient(circle at 42% 48%, rgba(29, 230, 255, 0.06), transparent 10rem),
        linear-gradient(90deg, rgba(0, 3, 8, 0.99) 0 33%, rgba(0, 3, 8, 0.64) 64%, rgba(0, 3, 8, 0.87)),
        url("/assets/images/backgrounds/profiles/venus-profile-bg.png");
    background-size: cover;
    background-position: center right;
    opacity: 0.42;
    transform: scale(1.03);
    z-index: -3;
}

.command-core::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(115deg, transparent 0 42%, rgba(29, 230, 255, 0.13) 42.1% 42.35%, transparent 42.45%),
        linear-gradient(90deg, rgba(29, 230, 255, 0.045) 1px, transparent 1px),
        linear-gradient(rgba(29, 230, 255, 0.04) 1px, transparent 1px);
    background-size: auto, 52px 52px, 52px 52px;
    mask-image: radial-gradient(circle at 42% 50%, #000 0 20rem, transparent 48rem);
    z-index: -1;
}

.core-grid {
    position: absolute;
    left: 21%;
    top: 20%;
    width: 56%;
    height: 57%;
    opacity: 0.92;
    pointer-events: none;
    z-index: -2;
}

.identity-stack {
    position: relative;
    z-index: 2;
    min-width: 0;
    display: grid;
    gap: 8px;
    align-self: start;
}

.identity-stack > span {
    color: var(--cyan);
}

.identity-stack h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(72px, 8vw, 138px);
    line-height: 0.86;
    letter-spacing: 0;
    text-shadow: 0 0 24px rgba(67, 169, 255, 0.36);
}

.identity-stack p {
    margin: 2px 0 0;
    color: var(--gold);
    font-size: 24px;
    font-style: italic;
    font-weight: 900;
}

.identity-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.identity-badges a,
.identity-badges strong {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    border: 1px solid rgba(74, 170, 255, 0.42);
    background: rgba(4, 29, 54, 0.76);
    color: #dceeff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
}

.dashboard-login-notice {
    display: grid;
    gap: 3px;
    width: min(100%, 360px);
    margin-top: 10px;
    padding: 10px 13px 11px;
    border: 1px solid rgba(29, 230, 255, 0.52);
    border-left: 3px solid var(--cyan);
    background: linear-gradient(105deg, rgba(0, 20, 35, 0.88), rgba(0, 6, 14, 0.68));
    box-shadow: 0 0 18px rgba(29, 230, 255, 0.1), inset 0 0 18px rgba(29, 230, 255, 0.04);
}

.dashboard-login-notice[hidden] {
    display: none !important;
}

.dashboard-login-notice > span {
    color: var(--cyan);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.dashboard-login-notice strong {
    color: #fff;
    font-size: 16px;
    line-height: 1.15;
}

.dashboard-login-notice p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.3;
}

.core-readouts {
    grid-column: 1 / 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-self: end;
}

.core-readouts article {
    min-width: 0;
    min-height: 150px;
    padding: 16px;
    border: 1px solid rgba(74, 170, 255, 0.3);
    background: rgba(1, 7, 14, 0.78);
    backdrop-filter: blur(12px);
    transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.core-readouts article:hover,
.ops-module:hover,
.top-ten:hover,
.pulse-stack:hover {
    transform: translateY(-4px);
    border-color: rgba(29, 230, 255, 0.72);
    background: linear-gradient(135deg, rgba(5, 30, 54, 0.94), rgba(0, 5, 11, 0.91));
}

.core-readouts strong {
    display: block;
    margin-top: 8px;
    color: #fff;
    font-size: clamp(20px, 1.25vw, 28px);
    line-height: 1.05;
    overflow-wrap: normal;
}

.mini-cut-form {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.mini-cut-form label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
}

.mini-cut-form div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
}

.mini-cut-form input {
    min-width: 0;
    height: 36px;
    border: 1px solid rgba(74, 170, 255, 0.45);
    background: rgba(0, 2, 7, 0.9);
    color: #fff;
    padding: 0 10px;
    font-weight: 900;
}

.mini-cut-form button {
    height: 36px;
    border: 1px solid rgba(29, 230, 255, 0.58);
    background: rgba(7, 49, 87, 0.78);
    color: #fff;
    padding: 0 13px;
    font-weight: 900;
    cursor: pointer;
}

.mini-cut-form p {
    min-height: 16px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.core-readouts em {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
    font-style: normal;
}

.final-dashboard-home .dashboard-main,
.final-dashboard-home .right-stack {
    align-self: start;
}

.final-dashboard-home .command-core,
.final-dashboard-home .top-ten {
    height: auto;
}

.final-dashboard-home .command-core {
    min-height: 820px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    align-content: start;
}

.final-dashboard-home .right-stack:empty {
    display: none;
}

.final-dashboard-home .identity-stack,
.final-dashboard-home .core-readouts,
.final-dashboard-home .operations-grid {
    grid-column: 1 / -1;
}

.final-dashboard-home .operations-grid {
    grid-row: 3;
    align-self: stretch;
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.final-dashboard-home .identity-stack h1 {
    font-size: clamp(52px, 5vw, 92px);
}

.final-dashboard-home .identity-stack {
    gap: 7px;
}

/* Keep the planet art visible behind the command surface. The live dashboard
   assigns --planet-background from the player's current planet. */
.final-dashboard-home .planet-wash {
    background:
        radial-gradient(circle at 67% 44%, rgba(245, 202, 85, 0.16), transparent 14rem),
        radial-gradient(circle at 42% 48%, rgba(29, 230, 255, 0.09), transparent 10rem),
        linear-gradient(90deg, rgba(0, 3, 8, 0.58) 0 25%, rgba(0, 3, 8, 0.20) 61%, rgba(0, 3, 8, 0.46)),
        var(--planet-background, url("/assets/images/backgrounds/profiles/earth-profile-bg.png"));
    background-size: cover;
    background-position: center;
    opacity: 0.86;
    filter: saturate(0.96) brightness(0.72);
}

.final-dashboard-home .command-core {
    background: linear-gradient(135deg, rgba(0, 6, 12, 0.34), rgba(0, 2, 7, 0.26));
}

.final-dashboard-home .core-readouts article,
.final-dashboard-home .operations-grid .ops-module {
    background: rgba(0, 8, 16, 0.30);
    backdrop-filter: blur(3px);
}

.final-dashboard-home .core-readouts article:hover,
.final-dashboard-home .operations-grid .ops-module:hover {
    background: rgba(2, 18, 31, 0.44);
}

.final-dashboard-home .core-readouts {
    margin-top: 48px;
    align-self: start;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.final-dashboard-home .command-alerts {
    align-content: end;
}

.final-dashboard-home .top-ten {
    overflow: hidden;
}

.final-dashboard-home .top-ten-live-list {
    max-height: calc(690px - 62px);
    overflow-y: auto;
    padding-right: 3px;
}

.final-messages-page .dashboard-main,
.final-messages-page .right-stack {
    align-self: start;
}

.final-messages-page .top-ten {
    height: 690px;
    overflow: hidden;
}

.final-messages-page .top-ten-live-list {
    max-height: calc(690px - 62px);
    overflow-y: auto;
    padding-right: 3px;
}

.messages-command {
    min-height: 820px;
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px;
    align-content: start;
}

.messages-command .planet-wash {
    opacity: 0.14;
    filter: saturate(0.7) brightness(0.55);
}

.messages-console-head {
    position: relative;
    z-index: 2;
    grid-column: 1 / -1;
    display: grid;
    gap: 5px;
}

.messages-console-head span,
.messages-console-panel > header span,
.panel-callout span,
.message-rail .panel-mini-title,
.mail-search-label,
.mail-compose label,
.chat-thread-meta,
.message-meta,
.item-tag {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.messages-console-head span {
    color: var(--cyan);
}

.messages-console-head h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(42px, 4vw, 62px);
    line-height: 0.94;
    text-shadow: 0 0 22px rgba(67, 169, 255, 0.34);
}

.messages-console-head p {
    margin: 0;
    color: var(--gold);
    font-size: 16px;
    font-style: italic;
    font-weight: 900;
}

.messages-console-panel,
.message-card,
.conversation-card,
.mail-compose,
.message-rail-panel,
.chat-bubble-list {
    position: relative;
    z-index: 2;
    border: 1px solid rgba(74, 170, 255, 0.3);
    background: rgba(0, 3, 8, 0.92);
    box-shadow: inset 0 0 0 1px rgba(29, 230, 255, 0.025);
}

.messages-summary-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
}

.messages-thread-panel {
    grid-column: 1 / -1;
    min-height: 640px;
    padding: 16px;
    overflow: hidden;
}

.messages-utility-panel {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    min-height: 0;
    padding: 16px;
    overflow: hidden;
}

.messages-console-panel > header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(74, 170, 255, 0.18);
}

.messages-console-panel > header strong,
.panel-callout strong {
    color: #fff;
    font-size: 18px;
}

.panel-callout {
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(74, 170, 255, 0.22);
    background: rgba(2, 10, 20, 0.86);
}

.mail-toolbar {
    display: grid;
    gap: 10px;
}

.mail-search {
    display: grid;
    gap: 7px;
}

.mail-search input,
.mail-compose input,
.mail-compose textarea,
.chat-reply-bar textarea {
    width: 100%;
    border: 1px solid rgba(74, 170, 255, 0.42);
    background: #000;
    color: #fff;
    font: inherit;
    font-weight: 800;
}

.mail-search input,
.mail-compose input {
    min-height: 38px;
    padding: 0 12px;
}

.mail-search input::placeholder,
.mail-compose textarea::placeholder,
.chat-reply-bar textarea::placeholder {
    color: rgba(145, 168, 194, 0.78);
}

.mail-filter-row,
.attack-log-tabs,
.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.filter-pill,
.mail-filter-pill,
.attack-log-tab,
.btn-secondary,
.chat-reply-bar button,
.mail-compose button {
    min-height: 38px;
    border: 1px solid rgba(74, 170, 255, 0.42);
    background: rgba(4, 30, 58, 0.88);
    color: #dfeeff;
    padding: 0 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.filter-pill.is-active,
.mail-filter-pill.is-active,
.attack-log-tab.is-active,
.chat-reply-bar button,
.mail-compose button:not(.btn-secondary) {
    border-color: rgba(29, 230, 255, 0.72);
    background: rgba(7, 59, 102, 0.92);
    color: #fff;
}

.filter-pill strong,
.mail-filter-pill strong,
.attack-log-tab strong {
    color: var(--cyan);
    margin-left: 6px;
}

.message-list,
.conversation-list,
.message-rail,
.message-rail-list,
.chat-thread {
    display: grid;
    gap: 10px;
}

.message-list {
    margin-top: 14px;
}

.messages-thread-panel .message-list {
    min-height: 540px;
    height: calc(100% - 48px);
    overflow: hidden;
}

.messages-thread-panel .message-list.system-message-list {
    display: flex;
    flex-direction: column;
    align-content: normal;
    overflow-y: auto;
}

.message-list.system-message-list .message-card {
    flex: 0 0 auto;
}

.message-console-grid {
    display: grid;
    grid-template-columns: minmax(240px, 0.38fr) minmax(0, 1fr);
    gap: 12px;
    height: 100%;
    min-height: 0;
}

.message-console-grid .conversation-list,
.message-console-grid .chat-thread {
    min-height: 0;
    overflow: hidden;
}

.message-console-grid .conversation-list {
    overflow-y: auto;
}

.message-console-grid .chat-thread {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.conversation-card,
.message-card {
    position: relative;
    overflow: hidden;
}

.message-card-alert {
    border-color: rgba(245, 202, 85, 0.48);
    background: linear-gradient(135deg, rgba(48, 36, 5, 0.72), rgba(7, 12, 23, 0.96));
}

.message-card-attack {
    border-color: rgba(255, 77, 120, 0.52);
    background: linear-gradient(135deg, rgba(58, 8, 27, 0.72), rgba(7, 12, 23, 0.96));
}

.message-card-auction {
    border-color: rgba(103, 237, 161, 0.46);
    background: linear-gradient(135deg, rgba(5, 51, 38, 0.7), rgba(7, 12, 23, 0.96));
}

.message-card-admin {
    border-color: rgba(191, 151, 255, 0.5);
    background: linear-gradient(135deg, rgba(43, 20, 75, 0.72), rgba(7, 12, 23, 0.96));
}

.conversation-card.is-unread,
.message-card.is-unread {
    border-color: rgba(29, 230, 255, 0.62);
    box-shadow: 0 0 18px rgba(29, 230, 255, 0.11), inset 0 0 0 1px rgba(29, 230, 255, 0.08);
}

.message-card-alert.is-unread { border-color: rgba(245, 202, 85, 0.78); box-shadow: 0 0 18px rgba(245, 202, 85, 0.12); }
.message-card-attack.is-unread { border-color: rgba(255, 77, 120, 0.82); box-shadow: 0 0 18px rgba(255, 77, 120, 0.12); }
.message-card-auction.is-unread { border-color: rgba(103, 237, 161, 0.76); box-shadow: 0 0 18px rgba(103, 237, 161, 0.12); }
.message-card-admin.is-unread { border-color: rgba(191, 151, 255, 0.8); box-shadow: 0 0 18px rgba(191, 151, 255, 0.12); }

.conversation-card-button,
.message-card-head,
.message-card-head-static {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.conversation-card-button {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
}

.conversation-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(29, 230, 255, 0.42);
    border-radius: 50%;
    background: rgba(4, 30, 58, 0.8);
    color: #fff;
    font-weight: 900;
}

.conversation-content {
    min-width: 0;
}

.conversation-top,
.message-top,
.mail-compose-head,
.chat-thread-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.conversation-card .conversation-top {
    display: grid;
    gap: 2px;
}

.conversation-name,
.message-from,
.chat-thread-title {
    min-width: 0;
    color: #fff;
    font-size: 17px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-time {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.conversation-preview,
.message-preview,
.message-body,
.message-empty,
.message-rail-note {
    color: #d8e6ff;
    line-height: 1.55;
}

.conversation-preview {
    margin-top: 5px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-unread {
    min-width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--cyan);
    color: #00111c;
    font-weight: 900;
}

.chat-thread-head {
    justify-content: flex-start;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(74, 170, 255, 0.18);
}

.chat-bubble-list {
    max-height: none;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    overflow-y: auto;
    background:
        linear-gradient(90deg, rgba(29, 230, 255, 0.035) 1px, transparent 1px),
        linear-gradient(rgba(29, 230, 255, 0.03) 1px, transparent 1px),
        rgba(0, 2, 7, 0.92);
    background-size: 32px 32px;
}

.chat-row {
    display: flex;
}

.chat-row.is-outgoing {
    justify-content: flex-end;
}

.chat-row.is-incoming {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: min(74%, 620px);
    padding: 11px 13px;
    border: 1px solid rgba(74, 170, 255, 0.28);
    line-height: 1.45;
}

.chat-row.is-outgoing .chat-bubble {
    border-color: rgba(29, 230, 255, 0.5);
    background: linear-gradient(135deg, rgba(7, 81, 140, 0.94), rgba(0, 28, 52, 0.96));
    color: #fff;
}

.chat-row.is-incoming .chat-bubble {
    background: rgba(2, 10, 20, 0.96);
    color: #dbe8ff;
}

.chat-bubble-meta {
    margin-top: 6px;
    color: rgba(223, 238, 255, 0.68);
    font-size: 11px;
    font-weight: 900;
    text-align: right;
    text-transform: uppercase;
}

.chat-bubble-meta > span {
    display: block;
}

.chat-reply-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.chat-reply-bar textarea,
.mail-compose textarea {
    min-height: 48px;
    padding: 11px 12px;
    resize: vertical;
}

.message-card-head,
.message-card-head-static {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
}

.message-card-header {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-bottom: 1px solid rgba(74, 170, 255, 0.16);
}

.message-card-header-button {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.message-card-header-button:hover,
.message-card-header-button:focus-visible {
    background: rgba(7, 45, 78, 0.52);
    outline: none;
}

.message-card-mark {
    min-height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(74, 170, 255, 0.26);
    background: rgba(4, 30, 58, 0.68);
    color: var(--cyan);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.4px;
}

.message-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.item-tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border: 1px solid rgba(74, 170, 255, 0.3);
    padding: 0 8px;
    color: #dfeeff;
}

.item-tag.good {
    border-color: rgba(103, 237, 161, 0.45);
    color: var(--green);
}

.item-tag.warn,
.type-alert {
    border-color: rgba(245, 202, 85, 0.48);
    color: var(--gold);
}

.type-attack {
    border-color: rgba(255, 77, 120, 0.48);
    color: var(--red);
}

.type-auction {
    border-color: rgba(103, 237, 161, 0.45);
    color: var(--green);
}

.type-admin {
    border-color: rgba(191, 151, 255, 0.45);
    color: #c9b0ff;
}

.message-meta,
.message-preview {
    margin-top: 6px;
}

.message-body {
    margin: 0 12px 12px;
    padding: 13px;
    border: 1px solid rgba(74, 170, 255, 0.2);
    background: rgba(0, 2, 7, 0.82);
    white-space: pre-line;
}

.message-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 7px;
    margin: 0 14px 14px;
}

.chat-bubble-meta .message-actions {
    justify-content: flex-end;
    margin: 8px 0 0;
}

.message-action-button {
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(74, 170, 255, 0.35);
    background: rgba(4, 30, 58, 0.72);
    color: #dfeeff;
    font: inherit;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.4px;
    cursor: pointer;
}

.message-action-button:hover,
.message-action-button:focus-visible {
    border-color: var(--cyan);
    background: rgba(7, 66, 103, 0.84);
    color: #fff;
}

.message-action-danger {
    border-color: rgba(255, 77, 120, 0.38);
    color: #ffabc8;
}

.message-action-danger:hover,
.message-action-danger:focus-visible {
    border-color: var(--red);
    background: rgba(83, 9, 35, 0.78);
}

.inbox-actions {
    margin: 0 12px 12px;
}

.message-empty,
.result-box {
    padding: 14px;
    border: 1px dashed rgba(74, 170, 255, 0.28);
    background: rgba(0, 2, 7, 0.7);
    color: var(--muted);
}

.error-text,
.hud-error {
    color: var(--red);
}

.message-rail-panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.message-rail-note {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.message-rail-list {
    margin-top: 12px;
}

.message-rail-item {
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid rgba(74, 170, 255, 0.24);
    background: rgba(0, 3, 8, 0.72);
    color: #dceeff;
    padding: 0 10px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.message-rail-item.is-active,
.message-rail-item:hover,
.conversation-card-button:hover,
.message-card-head:hover,
.btn-secondary:hover {
    border-color: rgba(29, 230, 255, 0.7);
    background: rgba(7, 45, 78, 0.78);
}

.message-rail-item .num {
    color: var(--cyan);
}

.mail-compose {
    margin-top: 14px;
    padding: 14px;
}

.mail-compose-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.mail-compose-field {
    display: grid;
    gap: 7px;
}

.command-alerts {
    grid-column: 2 / 3;
    grid-row: 1 / -1;
    display: grid;
    gap: 10px;
    align-content: end;
    perspective: 800px;
}

.command-alerts article {
    min-height: 128px;
    padding: 17px;
    border: 1px solid rgba(74, 170, 255, 0.25);
    background: rgba(0, 6, 13, 0.74);
    transform-origin: right center;
    transition: transform 170ms ease, border-color 170ms ease;
}

.command-alerts article:hover {
    transform: rotateY(-7deg) translateX(-7px);
    border-color: var(--cyan);
}

.command-alerts strong {
    display: block;
    margin-top: 11px;
    color: #fff;
    font-size: 21px;
    line-height: 1.12;
}

.hud-live-alert a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.hud-live-alert strong {
    color: var(--cyan);
}

.hud-message-unread {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    margin-left: auto;
    padding: 0 5px;
    border: 1px solid rgba(255, 70, 116, 0.72);
    border-radius: 999px;
    background: rgba(112, 0, 42, 0.78);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.4px;
    line-height: 1;
}

.hud-message-unread[hidden] {
    display: none !important;
}

.nav-rail a.has-unread {
    border-color: rgba(255, 70, 116, 0.62);
}

.nav-rail a.alert-tone-alert { border-color: rgba(245, 202, 85, 0.76); }
.nav-rail a.alert-tone-attack { border-color: rgba(255, 77, 120, 0.82); }
.nav-rail a.alert-tone-auction { border-color: rgba(103, 237, 161, 0.78); }
.nav-rail a.alert-tone-direct { border-color: rgba(29, 230, 255, 0.76); }
.nav-rail a.alert-tone-alert .hud-message-unread { border-color: rgba(245, 202, 85, 0.78); background: rgba(92, 66, 0, 0.82); color: #fff7cf; }
.nav-rail a.alert-tone-attack .hud-message-unread { border-color: rgba(255, 77, 120, 0.82); background: rgba(112, 0, 42, 0.84); color: #fff; }
.nav-rail a.alert-tone-auction .hud-message-unread { border-color: rgba(103, 237, 161, 0.78); background: rgba(0, 84, 57, 0.84); color: #e9fff3; }
.nav-rail a.alert-tone-direct .hud-message-unread { border-color: rgba(29, 230, 255, 0.78); background: rgba(0, 76, 103, 0.84); color: #e8fdff; }

.hud-alert-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 30;
    max-width: min(360px, calc(100vw - 40px));
    padding: 13px 16px;
    border: 1px solid rgba(29, 230, 255, 0.72);
    background: rgba(0, 10, 21, 0.96);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.44), 0 0 25px rgba(29, 230, 255, 0.18);
    color: #effaff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    text-decoration: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.hud-alert-toast.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.operations-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(260px, 1.16fr) minmax(250px, 0.82fr);
    gap: 10px;
}

.ops-module {
    min-height: 220px;
    padding: 16px 18px;
    transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.ops-module header,
.top-ten header,
.pulse-stack header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 13px;
    border-bottom: 1px solid rgba(74, 170, 255, 0.18);
}

.ops-module header span,
.top-ten h2,
.pulse-stack h2 {
    margin: 0;
    color: var(--blue);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ops-module header strong {
    color: #fff;
    font-size: 22px;
    white-space: nowrap;
}

.signal-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.system-grid span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.signal-list label {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.signal-list strong {
    color: #fff;
    white-space: nowrap;
}

.signal-list i {
    grid-column: 1 / -1;
    height: 6px;
    background: linear-gradient(90deg, var(--cyan) 0 var(--level), rgba(67, 169, 255, 0.12) var(--level) 100%);
    box-shadow: 0 0 16px rgba(29, 230, 255, 0.22);
}

.operations-info-list {
    display: grid;
    gap: 0;
    margin-top: 12px;
}

.operations-info-list > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 11px 0;
    border-bottom: 1px solid rgba(74, 170, 255, 0.16);
}

.operations-info-list > div:last-child {
    border-bottom: 0;
}

.operations-info-list span {
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.operations-info-list strong {
    color: #fff;
    font-size: 17px;
    line-height: 1.15;
    text-align: right;
    white-space: nowrap;
}

.ledger-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.ledger-grid div {
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid rgba(74, 170, 255, 0.2);
    background: rgba(0, 5, 11, 0.68);
}

.ledger-grid strong {
    display: block;
    margin-top: 6px;
    color: #fff;
    font-size: 16px;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.fleet-ledger .fleet-ledger-wide {
    grid-column: 1 / -1;
}

.fleet-ledger small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.25;
}

.system-grid {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.system-grid div {
    min-width: 0;
    padding: 13px;
    border: 1px solid rgba(74, 170, 255, 0.2);
    background: rgba(0, 5, 11, 0.68);
}

.system-grid strong {
    display: block;
    margin-top: 7px;
    color: #fff;
    font-size: 18px;
    line-height: 1.1;
}

.system-grid i {
    display: block;
    height: 7px;
    margin-top: 10px;
    background: linear-gradient(90deg, var(--cyan) 0 var(--level), rgba(67, 169, 255, 0.12) var(--level) 100%);
}

.right-stack {
    perspective: 900px;
    grid-template-rows: 1fr;
}

/* Game 1 uses the dedicated Rankings page for leaderboard detail. Keep the
   main shell focused on live controls and information on every other page. */
@media (min-width: 981px) {
    .final-dashboard-page .dashboard-frame > .right-stack > .top-ten:first-child {
        display: none;
    }

    .final-dashboard-page .dashboard-frame > .right-stack:empty,
    .final-dashboard-page .dashboard-frame > .right-stack:has(> .top-ten:first-child:only-child) {
        display: none;
    }

    .final-dashboard-page .dashboard-frame:has(> .right-stack:empty),
    .final-dashboard-page .dashboard-frame:has(> .right-stack > .top-ten:first-child:only-child) {
        grid-template-columns: 240px minmax(0, 1fr);
    }
}

.top-ten,
.pulse-stack {
    padding: 16px;
    transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.top-ten ol {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 9px;
}

.top-ten li {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(74, 170, 255, 0.17);
    background: rgba(0, 4, 10, 0.68);
}

.top-ten a {
    min-width: 0;
    color: var(--blue);
    font-size: 17px;
    font-weight: 900;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-ten strong {
    color: #fff;
    font-size: 15px;
    white-space: nowrap;
}

.pulse-stack {
    display: grid;
    gap: 11px;
    align-content: start;
}

.pulse-stack article {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid rgba(255, 77, 120, 0.28);
    background: rgba(32, 2, 14, 0.42);
}

.pulse-compose {
    display: grid;
    gap: 7px;
    padding: 10px;
    border: 1px solid rgba(74, 170, 255, 0.20);
    background: rgba(0, 5, 12, 0.24);
}

.pulse-compose label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.pulse-compose > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
}

.pulse-compose input {
    min-width: 0;
    height: 34px;
    border: 1px solid rgba(74, 170, 255, 0.38);
    background: rgba(0, 2, 7, 0.64);
    color: #fff;
    padding: 0 9px;
}

.pulse-compose button {
    height: 34px;
    border: 1px solid rgba(29, 230, 255, 0.58);
    background: rgba(7, 49, 87, 0.68);
    color: #fff;
    padding: 0 12px;
    font-weight: 900;
    cursor: pointer;
}

.pulse-compose button:hover {
    background: rgba(13, 83, 131, 0.82);
}

.pulse-compose p {
    min-height: 14px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.final-dashboard-home .pulse-stack {
    min-width: 0;
    grid-column: 1 / -1;
    min-height: 340px;
    max-height: none;
    overflow: visible;
}

.rankings-table .rankings-attack-row td {
    padding: 0;
    border-bottom-color: rgba(29, 230, 255, 0.34);
}

.rankings-attack-panel {
    display: grid;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid rgba(29, 230, 255, 0.28);
    background: rgba(2, 18, 31, 0.7);
}

.rankings-attack-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: #fff;
}

.rankings-attack-header span {
    color: var(--muted);
}

.rankings-inline-attack-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rankings-attack-option,
.rankings-attack-button {
    border: 1px solid rgba(29, 230, 255, 0.5);
    background: rgba(7, 49, 87, 0.82);
    color: #fff;
    padding: 8px 13px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.rankings-attack-option:hover,
.rankings-attack-button:hover {
    background: rgba(13, 83, 131, 0.94);
}

.rankings-crack-input {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rankings-crack-input input {
    width: 130px;
    border: 1px solid rgba(74, 170, 255, 0.38);
    background: rgba(0, 2, 7, 0.64);
    color: #fff;
    padding: 8px;
}

.rankings-inline-attack-status {
    margin: 0;
    color: var(--muted);
    line-height: 1.4;
}

.rankings-inline-attack-status.is-error {
    color: var(--red);
}

.rankings-attack-report {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(74, 170, 255, 0.24);
    background: rgba(0, 6, 15, 0.5);
}

.rankings-attack-report-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #fff;
}

.rankings-attack-report-heading span {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rankings-attack-report-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.rankings-attack-report-grid div {
    display: grid;
    gap: 3px;
    padding: 8px;
    border: 1px solid rgba(74, 170, 255, 0.16);
}

.rankings-attack-report-grid span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rankings-attack-report-grid strong {
    color: #fff;
    font-size: 12px;
}

@media (max-width: 760px) {
    .rankings-attack-report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.final-dashboard-home .pulse-stack .hud-pulse-entry strong {
    color: #fff;
}

.final-dashboard-home .pulse-stack .hud-pulse-entry span {
    color: var(--muted);
    font-size: 11px;
}

.final-dashboard-home .pulse-stack .hud-pulse-entry p {
    margin: 2px 0 0;
    color: #dceeff;
    line-height: 1.35;
}

.pulse-stack b {
    color: var(--red);
}

.pulse-stack span {
    color: #dde9f8;
}

.final-rewards-page .dashboard-main {
    align-self: start;
}

.final-rewards-page .command-core {
    min-height: 696px;
    height: auto;
    align-content: start;
}

.rewards-command {
    grid-template-columns: minmax(0, 1fr) 300px;
    grid-template-rows: auto 1fr;
}

.rewards-hero {
    position: relative;
    z-index: 2;
    min-width: 0;
    align-self: start;
}

.rewards-hero span,
.rewards-console header span,
.daily-reward-kicker,
.daily-reward-stats span,
.daily-reward-choice span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.rewards-hero span {
    color: var(--cyan);
}

.rewards-hero h1 {
    margin: 12px 0 12px;
    color: #fff;
    font-size: clamp(56px, 6vw, 104px);
    line-height: 0.9;
    letter-spacing: 0;
    text-shadow: 0 0 24px rgba(67, 169, 255, 0.34);
}

.rewards-hero p {
    max-width: 720px;
    margin: 0;
    color: #dbe8f8;
    font-size: 20px;
    line-height: 1.45;
}

.rewards-alerts {
    grid-column: 2 / 3;
    grid-row: 1 / span 2;
    align-content: start;
}

.rewards-console {
    position: relative;
    z-index: 2;
    grid-column: 1 / -1;
    padding: 18px;
    border: 1px solid rgba(74, 170, 255, 0.34);
    background: rgba(0, 3, 8, 0.95);
    box-shadow: inset 0 0 0 1px rgba(29, 230, 255, 0.025);
}

.rewards-console header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(74, 170, 255, 0.18);
}

.rewards-console header span {
    color: var(--blue);
}

.rewards-console header strong {
    color: #dfeaff;
    font-size: 15px;
    line-height: 1.35;
    text-align: right;
}

.reward-console-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.daily-reward-section-title {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.daily-reward-card {
    border: 1px solid rgba(74, 170, 255, 0.24);
    background: rgba(0, 4, 10, 0.82);
}

.daily-reward-card.is-unclaimed {
    border-color: rgba(245, 202, 85, 0.42);
}

.daily-reward-card.is-claimed {
    opacity: 0.78;
}

.daily-reward-main {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.daily-reward-kicker {
    color: var(--gold);
}

.daily-reward-card h2 {
    margin: 0;
    color: #fff;
    font-size: 26px;
    line-height: 1.08;
}

.daily-reward-stats,
.daily-reward-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.daily-reward-stats div {
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid rgba(74, 170, 255, 0.18);
    background: rgba(0, 2, 7, 0.76);
}

.daily-reward-stats strong {
    display: block;
    margin-top: 6px;
    color: #fff;
    font-size: 19px;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.daily-reward-choice {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid rgba(74, 170, 255, 0.3);
    background: rgba(4, 30, 58, 0.72);
    color: #dfeaff;
    text-align: left;
    cursor: pointer;
}

.daily-reward-choice:hover {
    border-color: rgba(29, 230, 255, 0.72);
    background: rgba(7, 45, 78, 0.88);
}

.daily-reward-choice strong {
    color: #fff;
    font-size: 18px;
}

.daily-reward-choice span {
    color: var(--muted);
    letter-spacing: 0;
    line-height: 1.35;
    text-transform: none;
}

.daily-reward-claimed {
    padding: 12px;
    border: 1px solid rgba(103, 237, 161, 0.28);
    background: rgba(3, 24, 15, 0.58);
    color: #dbe8f8;
    line-height: 1.4;
}

.daily-reward-claimed strong {
    color: #fff;
}

.final-rankings-page .dashboard-main {
    align-self: start;
}

.final-rankings-page .command-core {
    min-height: 696px;
    height: auto;
    align-content: start;
}

.rankings-command {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1fr;
}

.final-rankings-page .planet-wash {
    opacity: 0.72;
    background:
        radial-gradient(circle at 67% 44%, rgba(245, 202, 85, 0.16), transparent 14rem),
        radial-gradient(circle at 42% 48%, rgba(29, 230, 255, 0.09), transparent 10rem),
        linear-gradient(90deg, rgba(0, 3, 8, 0.86) 0 27%, rgba(0, 3, 8, 0.38) 62%, rgba(0, 3, 8, 0.58)),
        url("/assets/images/backgrounds/profiles/venus-profile-bg.png");
}

.rankings-console header span,
.rankings-table th,
.rankings-syndicate-tag {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.rankings-console {
    position: relative;
    z-index: 2;
    grid-column: 1 / -1;
    min-height: 430px;
    padding: 18px;
    border: 1px solid rgba(74, 170, 255, 0.34);
    background: rgba(0, 3, 8, 0.72);
    backdrop-filter: blur(4px);
    box-shadow: inset 0 0 0 1px rgba(29, 230, 255, 0.025);
    overflow: hidden;
}

.rankings-console header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(74, 170, 255, 0.18);
}

.rankings-console header span {
    color: var(--blue);
}

.rankings-console header strong {
    color: #fff;
    font-size: 15px;
    line-height: 1.35;
    text-align: right;
}

.rankings-table-wrap {
    margin-top: 12px;
    overflow: visible;
}

.rankings-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0 4px;
}

.rankings-table th,
.rankings-table td {
    padding: 8px 10px;
    text-align: left;
}

.rankings-table th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #000;
    color: var(--blue);
}

.rankings-table td {
    border-top: 1px solid rgba(74, 170, 255, 0.18);
    border-bottom: 1px solid rgba(74, 170, 255, 0.18);
    background: rgba(0, 4, 10, 0.64);
    color: #fff;
    font-weight: 800;
}

.rankings-table td:first-child {
    border-left: 1px solid rgba(74, 170, 255, 0.18);
}

.rankings-table td:last-child {
    border-right: 1px solid rgba(74, 170, 255, 0.18);
}

.rankings-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 14px;
    color: #dbe8f8;
    font-size: 13px;
    font-weight: 900;
}

.rankings-page-button {
    min-width: 82px;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid rgba(74, 170, 255, 0.42);
    border-radius: 7px;
    background: rgba(4, 30, 58, 0.82);
    color: #dfeeff;
    font: inherit;
    cursor: pointer;
}

.rankings-page-button:hover:not(:disabled) {
    border-color: rgba(29, 230, 255, 0.72);
    background: rgba(7, 59, 102, 0.92);
    color: #fff;
}

.rankings-page-button:disabled {
    cursor: default;
    opacity: 0.38;
}

.rankings-table tr:hover td,
.rankings-table tr.rank-top td {
    border-color: rgba(29, 230, 255, 0.48);
    background: rgba(5, 30, 54, 0.82);
}

.rankings-table tr.rank-1 td {
    border-color: rgba(245, 202, 85, 0.5);
}

.rankings-player-link {
    color: var(--blue);
    font-size: 17px;
    font-weight: 900;
    text-decoration: none;
}

.rankings-player-link:hover {
    color: #fff;
}

.rankings-syndicate-tag {
    margin-left: 6px;
    color: var(--gold);
    letter-spacing: 1px;
}

.rankings-planet-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border: 1px solid rgba(74, 170, 255, 0.28);
    background: rgba(0, 2, 7, 0.76);
    color: #dfeaff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.rankings-action-cell {
    width: 110px;
}

.rankings-attack-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    min-height: 42px;
    padding: 8px 16px;
    border-radius: 11px;
    background: #e4003b;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 0 18px rgba(228, 0, 59, 0.15);
}

.rankings-attack-button:hover {
    background: #ff164f;
    color: #fff;
    box-shadow: 0 0 22px rgba(228, 0, 59, 0.32);
}

.rankings-self-action {
    color: var(--muted);
    font-size: 16px;
    font-weight: 900;
}

.rankings-presence-cell {
    width: 54px;
    min-width: 54px;
    text-align: center !important;
    white-space: nowrap;
}

.rankings-online-indicator,
.rankings-custody-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 214, 102, 0.5);
    background: rgba(255, 214, 102, 0.12);
    color: #ffd666;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 0 12px rgba(255, 214, 102, 0.18);
}

.rankings-custody-indicator {
    margin-left: 6px;
    border-color: rgba(255, 76, 60, 0.72);
    background: rgba(0, 0, 0, 0.75);
    color: #f15443;
}

.rankings-error-row td {
    color: var(--gold);
}

.old-pimp-core {
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-template-rows: auto auto auto 1fr;
    gap: 18px;
    align-content: start;
}

.final-pimp-page .dashboard-main {
    align-self: start;
}

.final-pimp-page .old-pimp-core {
    min-height: auto;
    height: auto;
}

.final-pimp-page .planet-wash {
    opacity: 0.08;
    transform: none;
    background-position: center right;
    filter: saturate(0.75) brightness(0.62);
}

.final-pimp-page .command-core::after {
    background:
        linear-gradient(115deg, transparent 0 42%, rgba(29, 230, 255, 0.08) 42.1% 42.25%, transparent 42.35%),
        linear-gradient(90deg, rgba(29, 230, 255, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(29, 230, 255, 0.035) 1px, transparent 1px);
    background-size: auto, 44px 44px, 44px 44px;
    mask-image: none;
    opacity: 0.78;
}

.final-pimp-page .core-grid {
    display: none;
}

.pimp-action-panel,
.classic-lie-low-panel,
.classic-pimp-result,
.top-ten-live-list article {
    position: relative;
    z-index: 2;
    border: 1px solid rgba(74, 170, 255, 0.24);
    background: rgba(0, 3, 8, 0.82);
    backdrop-filter: blur(10px);
}

.final-pimp-page .pimp-action-panel,
.final-pimp-page .classic-lie-low-panel,
.final-pimp-page .classic-pimp-result,
.final-pimp-page .core-readouts article {
    border-color: rgba(74, 170, 255, 0.34);
    background: rgba(0, 3, 8, 0.95);
    backdrop-filter: none;
    box-shadow: inset 0 0 0 1px rgba(29, 230, 255, 0.025);
}

.pimp-action-panel {
    min-height: 214px;
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 18px;
}

.pimp-action-panel > span,
.classic-lie-low-panel span {
    color: var(--blue);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.pimp-action-panel h1 {
    margin: 0;
    color: #fff;
    font-size: 38px;
    line-height: 1;
}

.pimp-action-panel p {
    margin: 0;
    color: #dbe8f8;
    font-size: 16px;
    line-height: 1.35;
}

.classic-pimp-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.classic-pimp-form input,
.classic-pimp-form button {
    min-height: 54px;
    border: 1px solid rgba(74, 170, 255, 0.46);
    color: #fff;
    font-weight: 900;
}

.classic-pimp-form input {
    width: 190px;
    padding: 0 16px;
    background: #000;
    font-size: 18px;
}

.classic-pimp-form button {
    padding: 0 21px;
    border-radius: 8px;
    background: #d9003e;
    cursor: pointer;
}

.classic-pimp-form button.secondary {
    min-width: 102px;
    background: rgba(4, 30, 58, 0.88);
    color: var(--blue);
}

.classic-lie-low-panel {
    align-self: start;
    min-height: 214px;
    padding: 18px;
}

.classic-lie-low-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.classic-lie-low-panel header strong {
    padding: 10px 12px;
    border: 1px solid rgba(245, 202, 85, 0.56);
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.classic-lie-low-panel h2 {
    margin: 22px 0 14px;
    color: #fff;
    font-size: 28px;
    line-height: 1;
}

.classic-lie-low-panel p,
.classic-lie-low-panel em {
    display: block;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    font-style: normal;
    line-height: 1.35;
}

.classic-lie-low-panel em {
    margin-top: 18px;
    color: #dfeaff;
    font-size: 16px;
}

.classic-pimp-result {
    grid-column: 1 / -1;
    min-height: 78px;
    display: grid;
    align-content: center;
    padding: 18px;
    color: #dfeaff;
    font-size: 20px;
    line-height: 1.35;
}

.pimp-action-panel .classic-pimp-result {
    grid-column: auto;
    min-height: 0;
    margin-top: 2px;
    padding: 12px;
    font-size: 15px;
}

.pimp-action-panel .classic-pimp-result:empty {
    display: none;
}

.classic-pimp-result .hud-report-title {
    color: var(--blue);
    font-weight: 900;
}

.classic-pimp-result .hud-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.classic-pimp-result .hud-report-row {
    padding: 9px 10px;
    border: 1px solid rgba(74, 170, 255, 0.18);
    background: rgba(0, 4, 10, 0.74);
}

.classic-pimp-result .hud-report-row strong {
    color: #fff;
}

.classic-pimp-result .danger,
.classic-pimp-result .hud-error {
    color: var(--red);
}

.pimp-wrap-panels {
    grid-column: 1 / -1;
    align-self: start;
}

.pimp-wrap-panels article {
    min-height: 122px;
}

.pimp-morale-panels {
    align-self: start;
}

.pimp-history-wrap {
    grid-template-columns: 1fr;
}

.pimp-history-panel {
    grid-column: 1 / -1;
    min-height: 190px;
}

.pimp-history-list {
    display: grid;
    gap: 8px;
    max-height: 190px;
    margin-top: 12px;
    overflow-y: auto;
    padding-right: 4px;
}

.pimp-history-list .hud-empty,
.pimp-history-list .hud-error {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

.pimp-history-list .hud-error {
    color: var(--red);
}

.hud-history-card {
    border-bottom: 1px solid rgba(74, 170, 255, 0.18);
    background: transparent;
}

.hud-history-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 34px;
    padding: 7px 4px;
    cursor: pointer;
    color: #fff;
    list-style: none;
}

.hud-history-card summary::-webkit-details-marker {
    display: none;
}

.hud-history-card summary span {
    display: grid;
    gap: 3px;
}

.hud-history-card summary strong {
    margin: 0;
    color: #fff;
    font-size: 15px;
    line-height: 1.1;
}

.hud-history-card summary small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
}

.hud-history-report {
    padding: 0 4px 8px;
}

.pimp-history-list .hud-report-title {
    margin-bottom: 8px;
    color: var(--blue);
    font-weight: 900;
}

.pimp-history-list .hud-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
}

.pimp-history-list .hud-report-row {
    padding: 6px 8px;
    border: 1px solid rgba(74, 170, 255, 0.16);
    background: rgba(0, 2, 7, 0.76);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.pimp-history-list .hud-report-row strong {
    color: #fff;
}

.pimp-history-list .hud-report-row.danger {
    color: var(--red);
}

.top-ten-live-list {
    display: grid;
    gap: 5px;
    margin-top: 10px;
}

.top-ten-live-list article {
    min-width: 0;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 1px 9px;
    align-items: center;
    padding: 5px 10px;
}

.top-ten-live-list span {
    grid-row: 1 / span 2;
    color: #fff;
    font-weight: 900;
    line-height: 1.1;
}

.top-ten-live-list a {
    display: block;
    color: var(--blue);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.1;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-ten-live-list small {
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.console-empty {
    color: var(--muted);
}

.hud-footer {
    width: min(1880px, calc(100vw - 20px));
    margin: 0 auto 16px;
    padding: 12px 0 0;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.hud-footer div + div {
    margin-top: 4px;
}

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

@media (max-width: 1420px) {
    .dashboard-frame {
        grid-template-columns: 230px minmax(0, 1fr);
    }

    .right-stack {
        grid-column: 1 / -1;
        grid-template-columns: 1fr 1fr;
    }

    .status-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .final-dashboard-page:not(.final-dashboard-home) .dashboard-frame {
        grid-template-columns: 1fr;
    }

    .final-dashboard-page:not(.final-dashboard-home) .operations-grid {
        grid-column: auto;
    }

    .game-masthead {
        align-items: flex-start;
        flex-direction: column;
    }

    .status-grid,
    .dashboard-frame,
    .right-stack,
    .operations-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-main {
        order: 1;
    }

    .nav-rail {
        order: 2;
    }

    .right-stack {
        order: 3;
    }

    .command-core {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .command-alerts {
        grid-column: auto;
        grid-row: auto;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .messages-command,
    .messages-summary-panel,
    .message-console-grid,
    .mail-compose-grid {
        grid-template-columns: 1fr;
    }

    .messages-utility-panel,
    .messages-thread-panel,
    .messages-console-head,
    .messages-summary-panel {
        grid-column: auto;
        grid-row: auto;
    }

    .core-readouts {
        grid-column: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .game-header,
    .dashboard-frame {
        width: calc(100vw - 12px);
        margin-top: 6px;
    }

    .game-logo img {
        width: 205px;
    }

    .status-grid,
    .command-alerts,
    .core-readouts,
    .ledger-grid {
        grid-template-columns: 1fr;
    }

    .command-core,
    .ops-module,
    .top-ten,
    .pulse-stack {
        padding: 16px;
    }

    .identity-stack h1 {
        font-size: 58px;
    }

    .identity-stack p {
        font-size: 18px;
    }
}

@media (max-width: 980px) {
    .final-dashboard-home .command-core {
        min-height: auto;
    }

    .final-dashboard-home .core-readouts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 28px;
    }
}

@media (max-width: 640px) {
    .final-dashboard-home .core-readouts {
        grid-template-columns: 1fr;
    }

    .pulse-compose > div {
        grid-template-columns: 1fr;
    }
}

/* Dashboard composition: keep the command hierarchy intentional. The three
   operational summaries share one row, while Planetary Pulse is always the
   full-width lower band of the central dashboard panel. */
.final-dashboard-home .command-core {
    min-height: 0;
    height: auto;
    grid-template-rows: auto auto auto;
    gap: 14px;
    padding: 24px;
}

.final-dashboard-home .core-readouts {
    margin-top: 26px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
}

.final-dashboard-home .core-readouts article {
    min-height: 132px;
}

.final-dashboard-home .operations-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
        "workers gangsters empire"
        "pulse pulse pulse";
    grid-template-rows: auto auto;
    gap: 14px;
}

.final-dashboard-home .operations-grid > .workers { grid-area: workers; }
.final-dashboard-home .operations-grid > .gangsters { grid-area: gangsters; }
.final-dashboard-home .operations-grid > .empire { grid-area: empire; }
.final-dashboard-home .operations-grid > .pulse-stack {
    grid-area: pulse;
    width: 100%;
    min-height: 260px;
    max-height: none;
}

@media (max-width: 1200px) {
    .final-dashboard-home .core-readouts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .final-dashboard-home .operations-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "workers gangsters"
            "empire empire"
            "pulse pulse";
    }
}

@media (max-width: 980px) {
    .final-dashboard-home .command-core {
        padding: 20px;
    }

    .final-dashboard-home .core-readouts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .final-dashboard-home .operations-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "workers"
            "gangsters"
            "empire"
            "pulse";
    }
}

@media (max-width: 640px) {
    .final-dashboard-home .core-readouts {
        grid-template-columns: 1fr;
    }
}

/* Keep the planet-backed command surface focused, then give Planetary Pulse
   its own opaque lower panel so the live feed stays readable. */
.final-dashboard-home .dashboard-main {
    grid-template-columns: minmax(0, 1fr);
}

.final-dashboard-home .operations-grid {
    grid-template-areas:
        "workers gangsters empire";
    grid-template-rows: auto;
}

.final-dashboard-home .dashboard-pulse-panel {
    grid-column: 1;
    min-width: 0;
    min-height: 280px;
    max-height: none;
    padding: 24px;
    background: rgba(0, 3, 8, 0.98);
    backdrop-filter: none;
}

.final-dashboard-home .dashboard-pulse-panel .pulse-compose {
    background: rgba(0, 5, 12, 0.94);
}

@media (max-width: 1200px) {
    .final-dashboard-home .operations-grid {
        grid-template-areas:
            "workers gangsters"
            "empire empire";
        grid-template-rows: auto auto;
    }
}

@media (max-width: 980px) {
    .final-dashboard-home .operations-grid {
        grid-template-areas:
            "workers"
            "gangsters"
            "empire";
        grid-template-rows: auto auto auto;
    }

    .final-dashboard-home .dashboard-pulse-panel {
        padding: 20px;
    }
}
