#PlanetsDashboardContainer { background-size: cover; }
#GameTitle.sector-title { top: 4px; max-width: calc(100% - 330px); padding: 0; }
#GameTitle.sector-title h1 { height: auto; margin: 0 0 4px; line-height: 1.15; }
.sector-title h1, .sector-turn > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sector-turn { display: flex; gap: .35em; align-items: baseline; font-size: 14px; line-height: 1.35; }
.sector-turn > span:last-child { flex: none; white-space: nowrap; }

#PlanetsDashboard:not(:has(.turn-overview, #TurnSummary)) { background-color: #1a1a1a; }
#PlanetsDashboard:has(.turn-overview) { background: transparent; }
#PlanetsDashboard:has(.turn-overview) > #DashboardLeft {
    border-top-right-radius: inherit;
    border-bottom-right-radius: inherit;
}
#PlanetsDashboard:has(.sector-dashboard) { width: 100%; }
#PlanetsDashboard.inmessaging:has(.sector-dashboard) { width: calc(100% - min(340px, 100%)); }
#DashboardMenu .dashboard-link {
    border: 0; padding: 0; background: transparent; box-shadow: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
#DashboardMenu .dashboard-link i { display: none; }
#PlanetsDashboard.dashboard-modern #DashboardLeft {
    display: grid !important; grid-template-columns: clamp(48px, 5vw, 80px) minmax(0, 1fr);
    box-sizing: border-box; width: clamp(246px, 21vw, 310px);
    overflow: hidden; background: linear-gradient(to bottom, rgb(68 68 68 / 95%), rgb(29 29 29 / 96%) 48%, #101010);
    border-right: 1px solid #555;
}
.dashboard-modern #RaceStrip {
    width: auto; height: auto; background-position: center top; background-size: cover;
    box-shadow: inset -1px 0 rgb(255 255 255 / 15%);
}
.dashboard-modern #DashboardMenu {
    display: block !important; padding: 4px 8px 14px; min-height: 0;
    overflow-y: auto;
}
.dashboard-modern #DashboardMenu, #ShowAdvContent {
    scrollbar-width: thin; scrollbar-color: #666 #171717;
}
.dashboard-modern #DashboardMenu ul { padding: 6px 0; }
.dashboard-modern #DashboardMenu ul + ul:not(:empty) { border-top: 1px solid #444; }
.dashboard-modern #DashboardMenu .dashboard-link {
    box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 8px 10px; border-radius: 4px; font: 15px/1.2 "Segoe UI", sans-serif;
}
.dashboard-modern #DashboardMenu .dashboard-link i {
    display: inline-block; flex: 0 0 20px; text-align: center; color: #ccc;
}
.dashboard-modern .dashboard-link-count { order: 1; margin-left: auto; color: #ccc; font-variant-numeric: tabular-nums; }
.dashboard-modern .dashboard-link-arrow { display: none; }
.dashboard-modern #DashboardMenu .dashboard-link:is(:hover, :focus-visible),
.dashboard-modern:has(.turn-overview) #DashboardMenu .dashboard-link:has(.fa-house),
.dashboard-modern:has(.turn-report-list) #DashboardMenu .dashboard-link:has(.fa-file-lines) {
    background: linear-gradient(#555, #2a2a2a); box-shadow: inset 0 1px rgb(255 255 255 / 16%); color: #fff;
}
@media (max-width: 700px) {
    #PlanetsDashboard.dashboard-modern #DashboardLeft { width: 70px; grid-template-columns: 17px minmax(0, 1fr); }
    .dashboard-modern #DashboardMenu { padding-inline: 3px; }
    .dashboard-modern #DashboardMenu .dashboard-link { justify-content: center; min-height: 40px; }
    .dashboard-modern .dashboard-link-label, .dashboard-modern .dashboard-link-count { display: none; }
}
.dashboard-modern #DashboardContent { padding-inline-start: clamp(14px, 2vw, 28px); }
.dashboard-modern #DashboardContent:has(> .sector-dashboard) { padding-block: 0; overflow: auto; scrollbar-color: #999 #111; }
#PlanetsContainer .sector-dashboard, #PlanetsContainer .sector-dashboard * { box-sizing: border-box; }
.sector-dashboard {
    container-type: inline-size; max-width: 66rem; margin: 0; padding: 20px 0 32px;
    color: inherit; text-align: left; font: 15px/1.45 "Segoe UI", sans-serif;
    text-shadow: 0 1px 3px rgb(0 0 0 / 85%);
}
.sector-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 28px; margin: 0 0 18px; }
.sector-dashboard h2, #DashboardContent .sector-dashboard h3 { color: inherit; margin: 0; font-weight: 600; }
.sector-dashboard h2 { font-size: 19px; }
#DashboardMenu .modern-dash-tools { display: none; }
.dashboard-modern #DashboardMenu .modern-dash-tools { display: block; }
.report-heading > span { color: #ddd; font-size: 12px; font-weight: 600; letter-spacing: .055em; text-transform: uppercase; }
#DashboardContent .report-heading h1 { height: auto; margin: 2px 0 0; padding: 0; font-family: inherit; font-size: clamp(26px, 4cqi, 34px); font-weight: 600; line-height: 1.05; letter-spacing: -.04em; }
.sector-dashboard #TurnReadyContainer { position: static; width: auto; margin: 0; text-align: left; }
:is(.sector-dashboard, .turn-report-list) .sector-action {
    border: 0; box-shadow: none; background: transparent; border-radius: 0;
    color: #ddd; text-shadow: inherit; cursor: pointer; padding: 4px 0; min-height: 30px;
    font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.3;
}
:is(.sector-dashboard, .turn-report-list) .sector-action:is(:hover, :focus-visible) {
    color: #fff; text-decoration: underline; text-underline-offset: 4px;
}
.sector-dashboard button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.turn-report-list { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.dashboard-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 2px 2px 8px; }
.dashboard-filters button {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; min-height: 28px;
    border: 0; border-radius: 5px; color: inherit; background: transparent; font: inherit;
    white-space: nowrap; cursor: pointer;
}
.dashboard-filters button i { font-size: .85em; color: #ccc; }
.dashboard-filters button b { font-size: .85em; font-weight: normal; font-variant-numeric: tabular-nums; color: #ddd; }
.dashboard-filters button.unread-critical i { color: #ffda78; }
.dashboard-filters button:is(:hover, :focus-visible) { background: #ffffff1f; }
.dashboard-filters button:focus-visible { outline: 1px solid currentColor; }
.dashboard-filters button[aria-pressed=true] { background: linear-gradient(#5c5c5c, #414141); color: #fff; }
.turn-report-list .report-scroll { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #888 transparent; }
.turn-report-list table.CleanTable { width: 100%; table-layout: fixed; overflow-wrap: anywhere; }
.report-sender { padding: 0; margin: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: inherit; cursor: pointer; }
.vcr-list-pane { container-type: inline-size; overflow: auto; scrollbar-width: thin; scrollbar-color: #888 transparent; }
.diplomacy-intro { margin: 0 0 16px; }
.diplomacy-intro h2 { margin: 0 0 4px; font-size: 1.5rem; }
.diplomacy-intro p { margin: 0; max-width: 72ch; line-height: 1.45; color: #ccc; }
.diplomacy-limits {
    clear: both; margin: 0; padding: 16px 0 10px; line-height: 1.45;
    background: none; border-radius: 0; box-shadow: none; opacity: 1;
}
.diplomacy-limits h3 { margin: 0 0 4px; font-size: 1em; }
.diplomacy-limits ul { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.diplomacy-limits p { margin: 6px 0 0; color: #bbb; }
.diplomacy-error { margin: 5px 0; color: #ffc683; font-weight: bold; line-height: 1.4; }
.diplLevel .diplomacy-error { grid-column: 2; }
.turn-history-pane { container-type: inline-size; overflow: auto; scrollbar-width: thin; scrollbar-color: #888 transparent; }
#MoreScreen .turn-history-pane { height: calc(100% - 40px); max-height: calc(100dvh - 90px); }
.turn-history { width: 100%; max-width: 74rem; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.turn-history :is(th, td) { padding: 9px 12px; text-align: right; border-bottom: 1px solid #ffffff24; }
.turn-history th:first-child { text-align: left; }
.turn-history thead th { position: sticky; top: 0; z-index: 1; color: #ddd; background: #242424; }
.turn-history tbody tr { cursor: pointer; background-clip: border-box; }
.turn-history tbody tr:is(:hover, :focus-within) { background-color: #ffffff15; }
.turn-history button, .turn-history-status button { padding: 2px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.turn-history button:focus-visible { outline: 1px solid #ccc; outline-offset: 3px; }
.turn-history button { box-shadow: none; }
.turn-history button small { margin-left: 8px; font-weight: normal; color: #ccc; }
.turn-history td small { display: none; }
.turn-history td { white-space: nowrap; }
.turn-history td > span { display: inline; color: inherit; font-size: inherit; }
.turn-history .turn-delta { display: inline-block; width: var(--delta-width); margin-inline-start: 4px; text-align: left; font-size: .85em; }
.turn-history-status:not(:empty) { margin: 8px 0; color: #ccc; }
.turn-history-status button { text-decoration: underline; }
@container (max-width: 36rem) {
    .turn-history, .turn-history tbody { display: block; }
    .turn-history thead { position: absolute; clip-path: inset(50%); }
    .turn-history tbody tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: 4px 8px; padding: 8px; border-bottom: 1px solid #ffffff24; }
    .turn-history tbody :is(th, td) { border: 0; padding: 0; text-align: left; }
    .turn-history tbody th { grid-column: 1 / -1; }
    .turn-history td small { display: block; font-size: 11px; color: #ccc; }
    .turn-history td { white-space: normal; }
    .turn-history .turn-delta { width: auto; white-space: nowrap; }
}
.vcr-table { --vcr-location-width: 9rem; width: 100%; table-layout: fixed; color: inherit; text-align: left; }
#PlanetsContainer .vcr-table th, #PlanetsContainer .vcr-table .vcr-matchup { box-sizing: border-box; }
.vcr-table th { padding: 6px 16px 10px; }
.vcr-table th:first-child { width: calc(var(--vcr-location-width) + 16px); }
.vcr-table td { padding: 14px 16px; vertical-align: middle; }
.vcr-table td:has(> .vcr-matchup) { padding: 0; }
.vcr-table .vcr-matchup {
    width: 100%; display: grid;
    grid-template-columns: var(--vcr-location-width) minmax(0, 25rem) max-content minmax(0, 25rem);
    align-items: center; gap: 16px; padding: 16px; margin: 0; border: 0; background: transparent; box-shadow: none;
    color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.vcr-table .vcr-matchup:is(:hover, :focus-visible) { background: linear-gradient(rgb(255 255 255 / 14%), rgb(255 255 255 / 7%)); }
.vcr-matchup:focus-visible { outline: 1px solid #ddd; outline-offset: -2px; }
.vcr-side { display: flex; align-items: center; min-width: 0; gap: 12px; }
.vcr-art { flex: 0 0 68px; height: 56px; display: grid; place-items: center; color: #bbb; }
.vcr-art img { display: block; width: 100%; height: 100%; object-fit: contain; margin: 0; }
.vcr-art i { font-size: 22px; }
.vcr-table strong, .vcr-table small { display: block; }
.vcr-label { min-width: 0; overflow-wrap: anywhere; }
#PlanetsContainer .vcr-table .vcr-object-id { display: inline; font-size: .85em; font-weight: normal; color: #ccc; white-space: nowrap; }
.vcr-outcome { display: block; margin-top: 4px; font: 600 13px/1.3 "Segoe UI", sans-serif; }
.vcr-outcome.destroyed { color: #ffb4a5; }
.vcr-outcome.captured { color: #ffda78; }
.vcr-label strong i { margin-right: 5px; color: #ccc; }
.vcr-table small, .vcr-versus { color: #ccc; font-size: 12px; }
@container (max-width: 36rem) {
    .vcr-table thead { position: absolute; clip-path: inset(50%); }
    .vcr-table, .vcr-table tbody, .vcr-table tr, .vcr-table td { display: block; }
    .vcr-table .vcr-location { grid-column: 1 / -1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 4px; }
    .vcr-table .vcr-matchup { grid-template-columns: minmax(0, 1fr); padding: 14px 12px; gap: 5px 8px; }
    .vcr-side, .vcr-versus { grid-column: 1; }
    .vcr-versus { padding-left: 64px; line-height: 1; }
    .vcr-art { flex-basis: 52px; height: 44px; }
}
.sector-action { display: inline-flex; align-items: center; gap: 6px; text-align: left; }
@media (max-width: 800px), (max-height: 500px) {
    .dashboard-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #888 transparent; }
}
.sector-archive { max-width: 80ch; margin: 12px 0; }
.sector-dashboard.message-history { font-family: inherit; text-shadow: none; }
.archive-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; }
.archive-filter select { max-width: 100%; padding: 4px 8px; font: inherit; color: inherit; background: #262626; border: 1px solid #666; border-radius: 4px; }
.archive-entry { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 10px 0; overflow-wrap: anywhere; }
.archive-avatar { position: relative; display: grid; place-items: center; width: 32px; height: 32px; overflow: hidden; border-radius: 50%; background: #444; color: #eee; }
.archive-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.archive-entry header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; }
.archive-entry header :is(small, span) { color: #ddd; }
.archive-entry p { margin: 6px 0; white-space: pre-wrap; }
.archive-entry details { margin-top: 8px; padding-left: 16px; }
.archive-entry summary { cursor: pointer; color: inherit; }
.overview-assets {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; align-self: flex-start; max-width: 100%;
    gap: 12px clamp(12px, 2cqi, 32px); padding-block: 6px clamp(22px, 3cqi, 36px);
}
.overview-metric {
    border: 0; border-radius: 6px; color: inherit; text-align: left; cursor: pointer;
    background: linear-gradient(#171717, #0b0b0b); font: inherit;
}
.overview-metric { display: grid; align-content: start; gap: 3px; padding: 8px 12px; }
.metric-name { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.metric-name i { color: #ccc; }
.overview-metric strong { font-size: clamp(20px, 3cqi, 26px); line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric-change { font-size: 12px; color: #ddd; }
.metric-change.gain { color: #a5e3a2; }
.metric-change.loss { color: #ffb4a5; }
.turn-overview { display: flex; flex-direction: column; min-height: 100%; max-width: none; font-family: inherit; text-shadow: none; }
.classic-home-main { display: flex; flex-direction: column; height: 100%; overflow: auto; }
.classic-home-main #TurnSummary { flex: 1 0 auto; }
.dashboard-home-footer { padding: 16px 0 4px; }
.turn-overview .dashboard-home-footer { margin-top: auto; display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.report-replay { flex: none; align-self: flex-start; margin-top: 8px; }
.recording-poster { position: relative; width: min(100%, 19rem); aspect-ratio: 16 / 9; padding: 0; overflow: hidden; cursor: pointer;
    border: 0; border-radius: 8px; background: #111 url('/img/start/stars.jpg') center / cover; color: white; font-family: inherit; }
.recording-poster img { display: block; width: 100%; height: 100%; object-fit: contain; }
.recording-poster img[src*="/hulls3d/"] { transform: scale(1.55); }
.recording-poster .recording-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid;
    place-items: center; width: 46px; height: 46px; border: 1px solid #fffb; border-radius: 50%; background: #111b; font-size: 17px; }
.recording-poster:is(:hover, :focus-visible) .recording-play { background: #282828; border-color: white; }
.recording-caption { position: absolute; inset: auto 0 0; padding: 16px 12px 8px; background: linear-gradient(transparent,#000d);
    font-size: 16px; font-weight: 600; line-height: 1.3; text-align: left; }
.overview-metric:is(:hover, :focus-visible) { background: linear-gradient(#505050, #292929); }
.battle-summary, .battle-summary-groups section, #ShowAdvContent > section { margin: 0; background: none; border-radius: 0; box-shadow: none; opacity: 1; }
.battle-summary { margin: 0 0 18px; padding: 12px 16px; }
#DashboardContent .battle-summary :is(h2,h3) { margin: 0 0 8px; padding: 0; background: none; color: inherit; }
.battle-summary-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 12px 24px; }
.battle-summary-groups section { padding-block: 8px; min-width: 0; }
.battle-summary-groups :is(p,details) { margin: 6px 0 0; overflow-wrap: anywhere; }
.battle-summary-groups summary { cursor: pointer; padding: 5px 8px; }
.battle-summary-groups ul { margin: 4px 0 8px; padding-left: 32px; }
.battle-summary-groups li { padding: 3px 4px; }
.vcr-table tr.allied-vcr { background-color: rgb(129 154 195 / 12%); }
.vcr-table .vcr-affiliation { color: #c5d2e6; }
#DashboardContent > #ShowAdvContent {
    box-sizing: border-box; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
    align-content: start; align-items: start; gap: 18px 32px;
    padding-inline-end: clamp(14px, 2vw, 32px); padding-bottom: 16px;
    overflow: auto; scrollbar-gutter: stable;
}
#ShowAdvContent > section { min-width: 0; }
#ShowAdvContent h2 { margin: 18px 0 10px; padding: 0; font-size: 20px; color: inherit; background: none; }
#ShowAdvContent ul { padding: 0; margin: 0; list-style: none; }
#ShowAdvContent li { display: grid; grid-template-columns: clamp(38px, 5vw, 72px) minmax(0, 1fr) auto; align-items: start; column-gap: clamp(10px, 1.2vw, 18px); padding: 12px 0; }
#ShowAdvContent img { width: 100%; aspect-ratio: 1; object-fit: contain; }
#ShowAdvContent h3 { margin: 0 0 4px; padding: 0; font-size: 15px; }
.advantage-description { line-height: 1.45; overflow-wrap: anywhere; }
.advantage-points { min-width: 2ch; text-align: center; padding: 4px 8px; border-radius: 4px; background: #333; }
@media (max-width: 700px) {
    #PlanetsDashboard.inmessaging:has(.sector-dashboard, .vcr-list-pane) { width: 100%; }
    .sector-dashboard { padding-top: 14px; }
    #GameTitle.sector-title { top: 39px; max-width: calc(100% - 40px); }
    #GameTitle.sector-title h1 { font-size: 20px; }
    #PlanetsDashboardContainer:has(.sector-title) #PlanetsDashboard { top: 92px; max-height: calc(100% - 92px); }
    #PlanetsDashboardContainer:has(.sector-title) #DashboardContent { box-sizing: border-box; max-height: 100%; }
}
@container (max-width: 36rem) {
    .overview-assets { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 100%; }
    .overview-metric { padding: 6px 8px; }
}
