#ranking-page {
  isolation: isolate;
  --ranking-panel-tint: #0b1426bc;
  --ranking-table-tint: #0a13258c;
  --ranking-panel-line: #98afd749;
}
#ranking-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, #050b18a8, #060d1b3d 56%, #060d1b26),
    url('assets/ranking-dust-nebula.jpg') center / cover no-repeat,
    #070e20;
}
#ranking-page :is(.ranking-board, .ranking-score, .ranking-rules, .ranking-unplaced, .rounds-details) {
  border-color: var(--ranking-panel-line);
}
#ranking-page :is(.ranking-score, .ranking-rules, .ranking-unplaced, .round-current, .rounds-details) {
  background: var(--ranking-panel-tint);
}
#ranking-page .ranking-board { background: var(--ranking-table-tint); }
#ranking-page .ranking-table thead { color: #cbd9ed; background: #101b31ad; }
#ranking-page .ranking-table :is(th, td) { border-block-start-color: #9fb6da32; }
#ranking-page .ranking-table tbody tr:nth-child(even) { background: #a7bcff10; }
#ranking-page .ranking-table tbody tr.ranking-self { background: #21506696; }
#ranking-page .ranking-self td:first-child { box-shadow: inset 2px 0 #8ad9eead; }
#ranking-page .ranking-point-range { color: #cfdef2; }

.ranking-content { display: grid; gap: 10px; min-inline-size: 0; }
.ranking-pane { display: grid; gap: 9px; min-inline-size: 0; }
.ranking-context { display: grid; gap: 3px; padding-inline: 3px; }
.ranking-context-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 3px 14px; }
.ranking-context h2 { margin: 0; color: #e4effa; font: 650 1.04rem/1.3 var(--heading); }
.ranking-context p, .ranking-rank-note { margin: 0; color: #afc2d7; font-size: .79rem; }
.ranking-context time { color: #d3efff; font-variant-numeric: tabular-nums; }
.ranking-tabs { display: flex; flex-wrap: wrap; justify-self: start; gap: 5px; }
.ranking-tabs button { min-block-size: 44px; min-inline-size: clamp(95px, 16vw, 145px); }
.ranking-tabs button[aria-selected='true'] { color: #c6f3ff; border-color: #69a6bf; background: #193449; box-shadow: inset 0 -2px #90dff4; }
.ranking-victory, .ranking-score, .ranking-unplaced { margin: 0; padding: 11px clamp(10px, 2vw, 19px); }
.ranking-victory {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  border-inline-start: 3px solid var(--ranking-species); background: linear-gradient(110deg, #1c2638, #172234 65%, #182436);
}
.ranking-victory h2, .ranking-victory h3, .ranking-score h2 { margin: 0; font: 650 1.01rem var(--heading); }
.ranking-victory h2 { color: var(--ranking-species); }
.ranking-victory p { margin: 4px 0 0; color: #c7d4e7; font-size: .84rem; }
.ranking-winners p { overflow-wrap: anywhere; }
.ranking-winners span { color: var(--amber); }
.ranking-score { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 22px; }
.ranking-score-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 11px; }
.ranking-score-main p { margin: 0; color: #c5d1e3; font-size: .84rem; white-space: nowrap; }
.ranking-score-main strong { color: var(--amber); font: 650 1.42rem var(--heading); font-variant-numeric: tabular-nums; }
.ranking-score dl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 17px; margin: 0; }
.ranking-score dl div { display: flex; align-items: baseline; gap: 3px 7px; }
.ranking-score dt { color: var(--muted); font-size: .8rem; }
.ranking-score dd { margin: 0; font-size: .87rem; font-weight: 650; white-space: nowrap; }
.ranking-alliance-card {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 18px; min-inline-size: 0;
  padding: 11px clamp(11px, 2vw, 18px); border-inline-start: 3px solid var(--ranking-species);
  background: linear-gradient(110deg, #1d3348, #182334 62%);
}
#ranking-page .ranking-alliance-card { background: linear-gradient(110deg, #1d3348e0, var(--ranking-panel-tint) 62%); }
.ranking-alliance-identity { display: flex; align-items: center; gap: 10px; min-inline-size: 0; }
.ranking-alliance-identity > div { min-inline-size: 0; overflow-wrap: anywhere; }
.ranking-alliance-identity .alliance-crest { --crest-size: 50px; }
.ranking-alliance-identity small { color: #acd0e6; font-size: .75rem; }
.ranking-alliance-identity h2 { margin: 0; color: #eaf5ff; font: 700 1.12rem/1.3 var(--heading); }
.ranking-alliance-identity p { margin: 2px 0 0; color: #b7cde0; font-size: .8rem; }
.ranking-alliance-card dl { display: flex; flex-wrap: wrap; align-items: start; gap: 5px 16px; margin: 0; }
.ranking-alliance-card dt { color: #afc4db; font-size: .77rem; }
.ranking-alliance-card dd { margin: 2px 0 0; color: #e4f2ff; font-size: .9rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.ranking-alliance-card dl > div:first-child dd { color: #f6d79e; }
.ranking-emblem { display: grid; place-items: center; flex: none; inline-size: 30px; aspect-ratio: 1; border: 1px solid #456785; border-radius: 6px; color: #a9d8ed; background: #142a40; }
.ranking-alliance-identity .ranking-emblem { inline-size: 50px; }
.ranking-unplaced { color: #c7d4e7; font-size: .87rem; }
.ranking-rules summary { min-block-size: 44px; align-content: center; cursor: pointer; padding-inline: 13px; color: var(--cyan); font-size: .88rem; font-weight: 600; }
.ranking-rules summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; border-radius: 5px; }
.ranking-rule-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 243px), 1fr)); gap: 5px 18px; padding: 0 13px 11px; }
.ranking-rule-content dl { margin: 0; min-inline-size: 0; }
.ranking-rule-content dl div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px 8px; padding-block: 5px; border-block-start: 1px solid var(--line); }
.ranking-rule-content dt, .ranking-rule-content dd { font-size: .82rem; }
.ranking-rule-content dd { margin: 0; color: #e2eafa; font-variant-numeric: tabular-nums; }
.ranking-rule-content p { grid-column: 1 / -1; margin: 3px 0 0; color: var(--muted); font-size: .8rem; }
.ranking-breakdown small { display: block; margin-block-start: 2px; color: var(--muted); }
.ranking-board { min-inline-size: 0; }
.ranking-filters { display: flex; flex-wrap: wrap; gap: 5px 7px; padding: 8px; }
.ranking-filters button { min-block-size: 44px; }
.ranking-filters button[aria-pressed='true'] { color: var(--cyan); border-color: #5da2bb; background: #1a3045; }
.ranking-table { table-layout: fixed; border-collapse: collapse; inline-size: 100%; text-align: start; font-size: .87rem; }
.ranking-table :is(th, td) { padding: 9px clamp(6px, 1.2vw, 16px); border-block-start: 1px solid var(--line); overflow-wrap: anywhere; text-align: start; }
.ranking-table thead { color: var(--muted); font-size: .77rem; }
.ranking-table thead th:first-child { inline-size: clamp(46px, 12%, 91px); }
.ranking-table thead th:nth-child(3) { inline-size: 32%; }
.ranking-table :is(th, td):last-child { inline-size: clamp(62px, 18%, 147px); text-align: end; font-variant-numeric: tabular-nums; }
.ranking-galactic-table :is(th, td):last-child { inline-size: clamp(90px, 24%, 173px); }
.ranking-table td:first-child { font-variant-numeric: tabular-nums; }
.ranking-table tbody tr:nth-child(even) { background: #142031; }
.ranking-table tbody tr.ranking-self { background: #173043; }
.ranking-table [data-ranking-winner] td:is(:first-child, :last-child) { color: var(--amber); font-weight: 700; }
.ranking-row-note { display: inline-block; margin-inline-start: .45em; color: var(--cyan); font-size: .75rem; font-weight: 500; }
.ranking-row-note-muted { color: #b6c8dc; }
.ranking-point-range { color: #b9d1e8; }
.ranking-alliance-row { display: flex; align-items: center; gap: 6px; min-inline-size: 0; }
.ranking-alliance-row > span { min-inline-size: 0; overflow-wrap: anywhere; }
.ranking-alliance-row .alliance-crest { --crest-size: 28px; }
.ranking-alliance-row small { margin-inline-start: .4em; color: #b6c8dc; font-size: .75rem; }
.ranking-species { display: inline-flex; align-items: baseline; gap: 5px; color: #c0cee1; }
.ranking-species::before { content: ''; align-self: center; flex: 0 0 6px; block-size: 6px; border-radius: 50%; background: var(--ranking-species); }
.ranking-empty { margin: 0; padding: 11px 13px; border-block-start: 1px solid var(--line); color: var(--muted); font-size: .86rem; }

@media (orientation: landscape) and (max-height: 600px) {
  #ranking-page .page-heading { margin-block-end: 8px; }
  #ranking-page h1 { font-size: clamp(1.4rem, 3.2vw, 2rem); }
}

@media (prefers-contrast: more) {
  #ranking-page {
    --ranking-panel-tint: #0b1426f5;
    --ranking-table-tint: #0a1325f2;
    --ranking-panel-line: #a8bbdc8c;
  }
}
