@font-face {
  font-family: Rajdhani;
  src: url("rajdhani-medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Rajdhani;
  src: url("rajdhani-semibold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Rajdhani;
  src: url("rajdhani-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b1014;
  --bg-raised: #11181e;
  --surface: #151e25;
  --surface-2: #1b252d;
  --surface-3: #202d36;
  --line: #34434d;
  --text: #e8edf0;
  --muted: #aab6bd;
  --subtle: #778891;
  --accent: #00d9ef;
  --accent-dim: rgba(0, 217, 239, .13);
  --accent-glow: rgba(0, 217, 239, .2);
  --green: #254d48;
  --green-text: #a8ccc6;
  --green-border: #517872;
  --gold: #e8b923;
  --red: #ef454f;
  --blue: #4fa3ff;
  --radius: 13px;
  --font: Rajdhani, "Arial Narrow", "Segoe UI", sans-serif;
  font-family: var(--font);
  font-synthesis: none;
}

html[data-theme="gdi"] {
  --accent: #e8b923;
  --accent-dim: rgba(232, 185, 35, .14);
  --accent-glow: rgba(232, 185, 35, .2);
}
html[data-theme="nod"] {
  --accent: #ef3b36;
  --accent-dim: rgba(239, 59, 54, .14);
  --accent-glow: rgba(239, 59, 54, .2);
}
html[data-theme="soviet"] {
  --accent: #ff5a36;
  --accent-dim: rgba(255, 90, 54, .14);
  --accent-glow: rgba(255, 90, 54, .2);
}
html[data-theme="allies"] {
  --accent: #4fa3ff;
  --accent-dim: rgba(79, 163, 255, .15);
  --accent-glow: rgba(79, 163, 255, .22);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: min(320px, 100%);
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(ellipse at 13% 16%, var(--accent-dim), transparent 33rem),
    linear-gradient(145deg, #0b1014 15%, #10151b 58%, #11131a);
  font-size: 16px;
  line-height: 1.35;
}
button, input, select { font: inherit; }
button, select { color: var(--text); }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.site-shell { width: min(1680px, calc(100% - 72px)); margin: 0 auto; }

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  gap: 46px;
  border-bottom: 1px solid rgba(117, 144, 158, .2);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--accent);
  border-radius: 9px 4px;
  color: var(--accent);
  font-size: 27px;
  line-height: 1;
  font-weight: 800;
  box-shadow: 0 0 20px var(--accent-dim);
}
.brand strong { display: block; font-size: 19px; line-height: 1; letter-spacing: 1.3px; font-weight: 800; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1; font-weight: 700; letter-spacing: 1.7px; }
.main-nav { height: 100%; display: flex; align-items: center; gap: 8px; flex: 1; }
.nav-link {
  height: 100%;
  padding: 2px 15px 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .65px;
}
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-link.active { border-bottom-color: var(--accent); }
.main-nav .nav-discord {
  height: auto;
  padding: 6px 13px;
  border: 1px solid rgba(88, 101, 242, .75);
  border-radius: 6px;
  background: rgba(88, 101, 242, .18);
  color: #aab2ff;
  box-shadow: 0 0 12px rgba(88, 101, 242, .35);
  text-decoration: none;
}
.main-nav .nav-discord:hover, .main-nav .nav-discord:focus-visible {
  border-color: #7983ff;
  background: rgba(88, 101, 242, .32);
  color: #fff;
  text-decoration: none;
}
.top-actions { display: flex; align-items: center; gap: 12px; }
.stream-menu { position: relative; z-index: 40; flex: 0 0 auto; }
.stream-menu > summary {
  min-height: 38px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
  white-space: nowrap;
}
.stream-menu > summary::-webkit-details-marker { display: none; }
.stream-menu > summary:hover, .stream-menu[open] > summary { border-color: var(--accent); background: var(--accent-dim); }
.stream-chevron { font-size: 9px; transition: transform .15s; }
.stream-menu[open] .stream-chevron { transform: rotate(180deg); }
.stream-dropdown {
  width: max-content;
  min-width: 210px;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  padding: 5px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .55);
}
.stream-dropdown a { padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--text); font-size: 13px; font-weight: 600; }
.stream-dropdown a:hover { background: var(--accent-dim); color: var(--accent); text-decoration: none; }
.stream-live-badge {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid #ff5264;
  border-radius: 3px;
  background: rgba(255, 53, 76, .16);
  color: #ff6877;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.2;
}
.stream-live-badge[hidden] { display: none; }
.stream-live-badge:not([hidden]) {
  color: #ff5264;
  animation: stream-live-flash 1.2s steps(1, end) infinite;
}
/* Flashes even with prefers-reduced-motion; the Settings page has a switch to turn it off. */
@keyframes stream-live-flash {
  0%, 100% { background: #ff2d44; border-color: #ff8a96; color: #fff; box-shadow: 0 0 10px rgba(255, 45, 68, .85); }
  50% { background: rgba(255, 53, 76, .12); border-color: #ff5264; color: #ff5264; box-shadow: none; }
}
html.fx-no-live-flash .stream-live-badge { animation: none; }
.connection-pill { display: inline-flex; align-items: center; gap: 9px; }
.connection-pill {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .7px;
  white-space: nowrap;
}
.status-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: var(--subtle); box-shadow: 0 0 9px currentColor; }
.status-dot.online { color: var(--green); background: var(--green); border: 1px solid var(--green-border); box-shadow: 0 0 4px var(--green); }
.status-dot.warning { color: var(--gold); background: var(--gold); }
.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--accent);
  font-size: 25px;
  line-height: 1;
}
.icon-button:hover, .small-action:hover, .outline-button:hover { border-color: var(--accent); background: var(--accent-dim); }
.icon-button.spinning { animation: spin .8s linear infinite; }

.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 1.55px; }
h1, h2, h3, p { margin-top: 0; }
.live-error {
  margin: 0 0 16px;
  padding: 12px 15px;
  border: 1px solid rgba(239, 69, 79, .45);
  border-radius: 8px;
  background: rgba(104, 25, 35, .23);
  color: #ffb4b8;
  font-size: 14px;
}

.section-heading { min-height: 66px; display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 18px; }
.section-heading .eyebrow { margin-bottom: 3px; }
.section-heading h2 { margin: 0; font-size: 29px; line-height: 1.05; font-weight: 800; }
.section-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.server-tools { display: flex; align-items: center; gap: 9px; }
.searchbox {
  min-width: 235px;
  height: 43px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #3b4852;
  border-radius: 9px;
  background: rgba(26, 34, 41, .85);
  color: var(--muted);
}
.searchbox > span { color: #98a7ae; font-size: 24px; line-height: 1; }
.searchbox input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 14px; }
.searchbox input::placeholder { color: #85959d; }
select, .inline-form input {
  min-height: 41px;
  padding: 8px 30px 8px 12px;
  border: 1px solid #3b4852;
  border-radius: 8px;
  background-color: #19232b;
  color: var(--text);
  font-size: 14px;
}
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 13px 0 12px; }
.filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip {
  min-height: 31px;
  padding: 5px 14px;
  border: 1px solid #414b54;
  border-radius: 18px;
  background: #1c242b;
  color: #b1bbc1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .25px;
}
.chip:hover { border-color: var(--accent); }
.chip.selected { border-color: transparent; background: var(--accent); color: #0b1114; }
.toolbar-right { display: flex; align-items: center; gap: 8px; }
.sort-control { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.sort-control select { min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
.small-action, .outline-button, .danger-button {
  min-height: 35px;
  padding: 6px 12px;
  border: 1px solid #40505a;
  border-radius: 8px;
  background: #19252d;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}
.small-action span { color: var(--muted); }
.network-note { display: flex; justify-content: space-between; margin: 9px 2px; color: var(--muted); font-size: 12px; }
.network-note b { color: var(--text); font-weight: 700; }
.battlefield-quickview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 12px; margin: 14px 0; padding: 12px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 82%, transparent); }
.battlefield-quickview:has(.favorite-quickview[hidden]) { grid-template-columns: minmax(0, 1fr); }
.favorite-quickview { min-width: 0; margin: 0; padding: 10px; border: 1px solid rgba(232, 185, 35, .35); background: rgba(232, 185, 35, .045); }
.favorite-quickview[hidden] { display: none; }
.fav-quick-head { margin-bottom: 8px; display: flex; justify-content: space-between; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .7px; }
.fav-quick-head span:last-child { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0; }
.fav-quick-list { display: flex; gap: 7px; overflow-x: auto; }
.fav-quick-card { min-width: min(100%, 210px); padding: 7px 9px; display: grid; align-content: center; gap: 2px; border: 1px solid #4b4838; background: #1d2529; text-align: left; }
.fav-quick-card:hover { border-color: var(--gold); }
.fav-quick-card strong { overflow: hidden; color: var(--text); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.fav-quick-card span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.fav-quick-card small { overflow: hidden; color: var(--accent); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.fav-quick-card.watch-offline { cursor: not-allowed; opacity: .65; }
.fav-quick-card.watch-offline span { color: var(--red); }
.server-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 16px; }
.group-heading { grid-column: 1 / -1; margin: 13px 0 -7px; padding-bottom: 7px; border-bottom: 1px solid #35434d; color: var(--accent); font-size: 17px; font-weight: 800; }
.group-heading small { margin-left: 7px; color: var(--muted); font-size: 12px; font-weight: 600; }

.server-card {
  min-width: 0;
  position: relative;
  padding: 15px 16px 14px;
  border: 1px solid #41464e;
  border-radius: 13px 4px;
  background: linear-gradient(145deg, #1a2229, #1e2029 77%);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .19);
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.server-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent), #44515b 40%); }
.server-card.favorite-card { border-color: var(--accent); box-shadow: 0 0 18px var(--accent-dim), 0 10px 28px rgba(0, 0, 0, .19); }
.server-card.has-live-change { border-color: var(--accent); box-shadow: 0 0 22px var(--accent-glow), 0 0 0 1px var(--accent-dim); }
.server-change-badge { margin: 3px 0 6px; padding: 3px 7px; display: inline-block; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent-dim); color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .45px; }
.server-card.favorite-card::before { content: ""; position: absolute; inset: -1px auto auto 0; width: 100%; height: 3px; border-radius: 4px 4px 0 0; background: var(--accent); }
.card-heading { min-height: 58px; display: grid; grid-template-columns: 23px minmax(0, 1fr) auto; align-items: start; gap: 6px; }
.favorite-button, .bell-button, .menu-button { padding: 0; border: 0; background: transparent; color: #929da4; }
.favorite-button { padding-top: 1px; color: #9ca3a6; font-size: 22px; line-height: 1; }
.favorite-button.is-favorite { color: var(--gold); }
.card-name { min-width: 0; margin: 0; overflow: hidden; color: var(--accent); font-size: 20px; line-height: 1.03; font-weight: 800; text-overflow: ellipsis; }
.card-subtitle { margin: 4px 0 0; color: #92a1a8; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.card-actions { display: flex; gap: 9px; align-items: center; }
.bell-button { font-size: 19px; filter: grayscale(.35); }
.menu-button { width: 35px; height: 36px; display: grid; place-items: center; border: 1px solid #116d7a; border-radius: 8px 3px; color: var(--accent); font-size: 20px; line-height: 1; }
.card-divider { height: 1px; margin: 6px 0 13px; background: #3a4149; }
.card-badges { min-height: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0 0 11px; }
.badge { min-height: 26px; padding: 4px 10px; display: inline-flex; align-items: center; gap: 6px; border-radius: 17px; color: #f5f4f5; font-size: 12px; font-weight: 800; white-space: nowrap; }
.badge-live { background: #641b26; }
.badge-live i { width: 7px; height: 7px; border-radius: 50%; background: #ff5968; box-shadow: 0 0 8px #ff5968; }
.badge-green { background: var(--green); color: #f4f7f5; }
.badge-warn { background: #574117; color: #ffdf89; }
.compare-check { width: 16px; height: 16px; accent-color: var(--accent); }
.compare-label { color: var(--accent); font-size: 14px; font-weight: 800; }
.card-map-row { display: grid; grid-template-columns: 1.1fr .9fr; gap: 10px; }
.data-label { display: block; margin-bottom: 4px; color: #a5acb0; font-size: 11px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
.data-value { overflow: hidden; color: var(--text); font-size: 16px; line-height: 1.05; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.data-value.next-map { color: var(--green-text); }
.round-line { min-height: 20px; margin: 10px 0 12px; color: var(--muted); font-size: 12px; font-weight: 700; }
.round-line strong { color: var(--green-text); }
.round-line .remaining { color: #ffbd32; }
.population-box { padding: 10px 11px 9px; border: 1px solid #42444f; border-radius: 9px; background: #242630; }
.population-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; color: #b8bdc2; font-size: 15px; font-weight: 800; }
.population-head strong { color: var(--accent); font-size: 18px; }
.progress-track { height: 7px; margin: 9px 0 4px; overflow: hidden; border-radius: 6px; background: #41444e; }
.progress-track > i { height: 100%; display: block; min-width: 5px; border-radius: inherit; background: var(--green); box-shadow: inset 0 0 0 1px var(--green-border); }
.progress-label { display: block; text-align: right; color: #c2c4ca; font-size: 11px; font-weight: 700; }
.mode-line { margin: 10px 0 8px; color: #bdc1c5; text-align: center; font-size: 14px; font-weight: 800; }
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.team-mini { min-width: 0; padding: 7px 8px; border: 1px solid #61552a; border-radius: 8px 3px; background: rgba(232, 185, 35, .08); }
.team-mini.nod { border-color: #64323b; background: rgba(211, 47, 47, .09); }
.team-mini.allies { border-color: #355876; background: rgba(79, 163, 255, .08); }
.team-mini.other { border-color: var(--green-border); background: color-mix(in srgb, var(--green) 20%, transparent); }
.team-name { overflow: hidden; color: var(--gold); font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.team-mini.nod .team-name { color: #ff5968; }
.team-mini.allies .team-name { color: #69b7ff; }
.team-mini.other .team-name { color: var(--green-text); }
.team-stats { margin-top: 2px; color: #f0f3f5; font-size: 13px; font-weight: 600; line-height: 14px; text-shadow: 0 1px 1px rgba(0, 0, 0, .65); }
.team-stats strong { color: #fff; font-weight: 800; }
.server-card-footer { margin-top: 11px; display: flex; align-items: center; justify-content: space-between; gap: 7px; color: #92a0a7; font-size: 10px; font-weight: 700; }
.server-card-footer button { border: 0; background: transparent; color: var(--accent); font-size: 10px; font-weight: 800; white-space: nowrap; }
.compact-grid .server-card { padding: 12px; }
.compact-grid .server-card-footer { margin-top: 10px; }
.card-player-stats { margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: rgba(7, 13, 18, .24); }
.card-player-stats[hidden] { display: none; }
.card-player-stats-heading { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 5px; color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .5px; }
.card-player-stats-heading span { color: var(--muted); font-size: 9px; text-align: right; }
.card-player-row { display: grid; grid-template-columns: minmax(70px, 1.2fr) minmax(55px, .8fr) repeat(3, minmax(70px, 1fr)); gap: 6px; padding: 5px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.card-player-row > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-player-row strong { color: var(--text); }
.card-player-row .team-identity { gap: 3px; font-size: 9px; }
.card-player-row .team-emblem { width: 12px; height: 12px; flex-basis: 12px; }
.card-player-row > span:nth-child(4) { white-space: normal; overflow: visible; }
.card-player-note, .card-player-unavailable { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.server-card-join { min-height: 52px; margin-top: 10px; padding: 7px 14px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid color-mix(in srgb, var(--join-primary, var(--accent)), white 25%); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); background: linear-gradient(105deg, color-mix(in srgb, var(--join-primary, var(--accent)), #10171c 20%), color-mix(in srgb, var(--join-secondary, var(--join-primary, var(--accent))), #10171c 20%)); box-shadow: inset 0 1px rgba(255, 255, 255, .18), 0 3px 12px color-mix(in srgb, var(--join-primary, var(--accent)), transparent 72%); color: #fff; font-size: 14px; font-weight: 900; letter-spacing: .3px; text-decoration: none; text-shadow: 0 1px 2px rgba(0, 0, 0, .65); transition: filter .15s, box-shadow .15s, transform .15s; }
.server-card-join:hover, .server-card-join:focus-visible { filter: brightness(1.2); box-shadow: 0 0 17px color-mix(in srgb, var(--join-primary, var(--accent)), transparent 55%); color: #fff; text-decoration: none; }
.server-card-join:active { transform: translateY(1px); }
.server-card-join:disabled { border-color: var(--line); background: var(--surface-2); box-shadow: none; color: var(--muted); }
.join-activity-low { --join-primary: var(--green); --join-secondary: var(--green); }
.join-activity-medium { --join-primary: #f3cc43; --join-secondary: #f3cc43; }
.join-activity-high { --join-primary: #ff5264; --join-secondary: #ff5264; }
.join-activity-unknown { --join-primary: #63717c; --join-secondary: #63717c; }
.server-card-join:is(.join-activity-low, .join-activity-medium, .join-activity-high) { color: #10171c; text-shadow: none; }
.server-card-join.join-activity-low { background: var(--green); border-color: var(--green-border); color: #f4f7f5; box-shadow: inset 0 1px rgba(255, 255, 255, .1); }
.server-card-join.join-activity-low:hover, .server-card-join.join-activity-low:focus-visible { filter: brightness(1.08); box-shadow: inset 0 0 0 1px var(--green-border); }
.join-game-icon { font-size: 20px; line-height: 1; }
.join-copy { display: grid; justify-items: start; line-height: 1.05; }
.join-copy strong { font-size: 16px; letter-spacing: .8px; }
.join-copy small { margin-top: 3px; color: rgba(255, 255, 255, .82); font-size: 11px; font-weight: 700; letter-spacing: .25px; }
.join-arrow { margin-left: auto; font-size: 28px; font-weight: 600; line-height: .8; }
.server-card-actions { display: flex; gap: 0; margin-top: 8px; border: 1px solid #4a5a64; }
.server-card-actions button { min-width: 0; flex: 1 1 0; padding: 8px 4px; border: 0; border-right: 1px solid #4a5a64; border-radius: 0; background: linear-gradient(#24313a, #18222a); color: #e8edf0; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.server-card-actions button:last-child { border-right: 0; }
.server-action-icon { display: block; margin: 0 auto 3px; width: 18px; height: 18px; color: var(--accent); }
.server-card-actions button:hover, .server-card-actions button[aria-expanded="true"] { background: linear-gradient(var(--accent-dim), #18222a); box-shadow: inset 0 -2px 0 var(--accent); }
.server-card-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.loading-card, .empty-panel { grid-column: 1 / -1; min-height: 130px; display: grid; place-content: center; justify-items: center; gap: 8px; border: 1px dashed #46535c; border-radius: 12px; background: rgba(20, 30, 37, .75); color: var(--muted); text-align: center; }
.loading-card strong { color: var(--text); font-size: 17px; }
.loading-card small { font-size: 13px; }
.spinner { width: 22px; height: 22px; border: 2px solid #45555e; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pagination-row { min-height: 58px; padding: 16px; display: flex; justify-content: center; }
.data-note, .setting-hint { margin: 13px 0 0; color: var(--subtle); font-size: 12px; }

.tab-panel { padding: 4px 0 34px; animation: appear .16s ease-out; }
.tab-panel[hidden] { display: none; }
@keyframes appear { from { opacity: .65; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.subpanel { min-width: 0; padding: 19px; border: 1px solid #39454d; border-radius: 12px 4px; background: linear-gradient(145deg, #171f26, #1b1e26); }
.subpanel h3 { margin: 0; font-size: 20px; font-weight: 800; }
.subpanel > p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.subpanel-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 15px; }
.subpanel-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.inline-form, .inline-controls { display: flex; align-items: center; gap: 8px; }
.inline-form input { min-width: 130px; background: #131d24; }
.friend-list { display: flex; flex-wrap: wrap; gap: 8px; }
.friend-chip { padding: 7px 10px; border: 1px solid #44515b; border-radius: 20px; background: #202a32; color: var(--text); font-size: 13px; }
.friend-chip.online { border-color: var(--green-border); background: var(--green); color: #f4f7f5; }
.friend-chip button { margin-left: 7px; border: 0; background: none; color: var(--muted); }
.player-table-wrap { overflow-x: auto; border: 1px solid #39454d; border-radius: 10px; background: #151d24; }
.map-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.map-controls .searchbox { min-width: min(260px, 100%); }
.map-browser-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.map-card { min-width: 0; padding: 15px; border: 1px solid #39454d; border-radius: 11px 4px; background: linear-gradient(145deg, #171f26, #1b1e26); }
.map-card-heading { min-width: 0; display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.map-card-heading .eyebrow { margin-bottom: 3px; font-size: 9px; }
.map-card-heading h2 { margin: 0; overflow-wrap: anywhere; color: var(--text); font-size: 21px; line-height: 1.1; }
.map-game-tags { display: flex; flex: 0 0 auto; gap: 5px; }
.game-icon.map-game-icon { width: 32px; height: 32px; }
.map-game-icon img { z-index: 1; }
.map-game-icon.is-fallback img { display: none; }
.map-card-stats { display: flex; gap: 18px; margin: 12px 0; padding: 9px 0; border-block: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.map-card-stats strong { color: var(--accent); font-size: 18px; }
.map-server-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.map-server-list li { min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.map-server-list a { min-width: 0; overflow: hidden; color: var(--text); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.map-server-list a:hover { color: var(--accent); }
.map-server-list span { flex: 0 0 auto; color: var(--muted); font-size: 10px; text-align: right; }
.map-more-servers { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.map-browse-link { width: 100%; min-height: 35px; margin-top: 12px; padding: 7px 9px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); background: var(--surface-2); color: var(--accent); font-size: 12px; font-weight: 800; }
.map-browse-link:hover { border-color: var(--accent); background: var(--accent-dim); text-decoration: none; }
.map-filter-banner { margin: 0 0 13px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.map-filter-banner[hidden] { display: none; }
.map-filter-banner strong { color: var(--accent); }
.map-filter-banner .chip { min-height: 30px; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 11px 12px; border-bottom: 1px solid #3a454d; color: #9eacb3; font-size: 11px; letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid rgba(58, 69, 77, .55); color: #e0e6e8; font-size: 13px; white-space: nowrap; }
.data-table tbody tr:hover { background: var(--accent-dim); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.empty-cell { padding: 22px !important; color: var(--muted) !important; text-align: center; white-space: normal !important; }
.table-player { padding: 0; border: 0; background: none; color: #e8edf0; font-size: 16px; font-weight: 700; }
.table-player.nod { color: #ff8088; }
.table-player.gdi { color: #f3cd55; }
.table-player.allies { color: #80bfff; }
.table-player.other { color: var(--green-text); }
.table-player:hover { text-decoration: underline; text-underline-offset: 3px; }
.table-player:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.player-team-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.player-team-icon .team-emblem { width: 24px; height: 24px; flex-basis: 24px; }
.scoreboard-table th, .scoreboard-table td { white-space: nowrap; }
.friend-mark { color: var(--gold); }
.team-text.nod { color: #ff6470; }.team-text.gdi { color: var(--gold); }.team-text.allies { color: #65b3ff; }
.tiny-button { padding: 4px 7px; border: 1px solid #45545e; border-radius: 6px; background: #1e2931; color: var(--accent); font-size: 11px; }
.subpanel + .toolbar { margin-top: 19px; }
.stats-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(350px, .75fr); align-items: start; gap: 15px; }
.leaderboard-list { display: grid; gap: 5px; }
.leader-row { min-height: 43px; padding: 7px 9px; display: grid; grid-template-columns: 31px minmax(80px, 1fr) minmax(100px, 1.3fr) 72px; align-items: center; gap: 9px; border-bottom: 1px solid rgba(65, 75, 84, .56); }
.leader-row:last-child { border-bottom: 0; }
.leader-rank { color: var(--gold); font-size: 16px; font-weight: 800; }
.leader-name { overflow: hidden; color: var(--text); font-size: 15px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.leader-game { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.leader-value { color: var(--accent); text-align: right; font-size: 15px; font-weight: 800; }
.personal-stats { margin-bottom: 14px; }
.personal-badge { padding: 6px 10px; border: 1px solid var(--green-border); border-radius: 16px; background: var(--green); color: #f4f7f5; font-size: 11px; font-weight: 800; }
.personal-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.personal-metrics > span { padding: 9px; border: 1px solid #36444d; border-radius: 8px; color: var(--muted); font-size: 11px; text-transform: uppercase; }
.personal-metrics strong { display: block; margin-top: 3px; color: var(--accent); font-size: 20px; text-transform: none; }
.shared-stats { margin-bottom: 24px; }
.shared-stats-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.shared-stats-controls label { display: grid; gap: 5px; min-width: 130px; color: var(--muted); font-size: 12px; }
.shared-stats-controls label:nth-child(3) { flex: 1; min-width: 180px; }
.shared-stats-controls select { width: 100%; max-width: 100%; }
.shared-stats-grid { margin-top: 15px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.shared-stats-grid[hidden] { display: none; }
.shared-stats-wide { grid-column: 1 / -1; }
.shared-stats-grid .subpanel-head { flex-wrap: wrap; }
.shared-stat-row { display: grid; grid-template-columns: 25px 27px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(65, 75, 84, .56); }
.shared-stat-row:last-child { border-bottom: 0; }
.shared-stat-row strong, .shared-stat-row a { display: block; overflow-wrap: anywhere; font-size: 14px; }
.shared-stat-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.shared-stat-value { text-align: right; color: var(--accent); font-weight: 800; white-space: nowrap; }
.shared-hours { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.shared-hour { border: 1px solid #36444d; border-radius: 8px; padding: 10px; }
.shared-hour strong { display: block; color: var(--accent); font-size: 18px; }
.shared-hour small { display: block; color: var(--muted); font-size: 12px; }
.shared-stats-warning { color: var(--gold); }
.stats-disclosure { min-width: 0; align-self: start; padding: 10px 14px; border-radius: 5px; }
.stats-disclosure > summary { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.stats-disclosure > summary::-webkit-details-marker { display: none; }
.stats-disclosure > summary h2 { margin: 0; font-size: 17px; line-height: 1.3; }
.stats-disclosure > summary::after { content: ""; width: 7px; height: 7px; flex: 0 0 auto; margin-right: 3px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); }
.stats-disclosure[open] > summary { margin-bottom: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.stats-disclosure[open] > summary::after { transform: rotate(225deg); }
.stats-disclosure > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
body[data-page="stats"] .shared-stats-grid, body[data-page="stats"] .stats-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; }
body[data-page="stats"] .shared-stats-grid { margin-top: 8px; }
body[data-page="stats"] .shared-stats { margin-bottom: 8px; }
body[data-page="stats"] .personal-stats { margin-bottom: 8px; }
body[data-page="stats"] .prediction-section { margin-top: 8px; }
body[data-page="stats"] .shared-stat-row { padding: 7px 0; }
body[data-page="stats"] .personal-metrics > span { padding: 6px 9px; border-radius: 4px; }
body[data-page="stats"] .personal-metrics strong { font-size: 18px; }
body[data-page="stats"] .leader-row { grid-template-columns: 28px minmax(60px, 1fr) minmax(28px, auto) 72px; }
body[data-page="stats"] .leader-game { display: flex; gap: 5px; flex-wrap: wrap; }
.stats-game-icon img { z-index: 1; }
.stats-game-icon b { visibility: hidden; }
.stats-game-icon.is-fallback img { display: none; }
.stats-game-icon.is-fallback b { visibility: visible; }
.heatmap-controls label:nth-child(2) { flex: 1; min-width: 180px; }
.heatmap-controls label:nth-child(3) { flex: 0 1 auto; min-width: 130px; }
.stats-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.stats-pagination[hidden] { display: none; }
.stats-pagination .outline-button { padding: 7px 10px; }
.you-mark { margin-left: 3px; color: var(--accent); font-size: 9px; font-weight: 800; }
.heatmap { margin-top: 16px; display: grid; grid-template-columns: 46px repeat(24, minmax(7px, 1fr)); gap: 3px; align-items: center; }
.heatmap > .empty-panel { grid-column: 1 / -1; }
.heat-label { color: var(--muted); font-size: 10px; }
.heat-cell { display: block; width: 100%; min-width: 0; height: 12px; padding: 0; border: 0; border-radius: 2px; background: #26343d; cursor: pointer; }
.heat-cell:hover, .heat-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.heat-inspection { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font-size: 13px; overflow-wrap: anywhere; }
.heat-inspection[hidden] { display: none; }
.heat-inspection p { margin: 0; white-space: pre-line; color: var(--text); }
.heat-observations { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); max-height: 140px; overflow-y: auto; white-space: pre-line; color: var(--muted); font-size: 12px; }
.heat-legend { margin-top: 11px; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.heat-legend i { width: 13px; height: 9px; border-radius: 2px; background: rgba(0, 217, 239, .17); }
.heat-legend i:nth-of-type(2) { background: rgba(0, 217, 239, .36); }.heat-legend i:nth-of-type(3) { background: rgba(0, 217, 239, .61); }.heat-legend i:nth-of-type(4) { background: var(--accent); }
.heat-legend span:first-child { margin-right: 4px; }.heat-legend span:last-child { margin-left: 4px; }
.prediction-section { margin-top: 15px; }
.prediction-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.prediction-card { padding: 12px; border: 1px solid #3d4a52; border-radius: 9px; background: #131c23; }
.prediction-card h4 { margin: 0 0 7px; overflow: hidden; color: var(--accent); font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.prediction-card p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.prediction-team { display: flex; justify-content: space-between; gap: 8px; color: var(--text); font-size: 13px; font-weight: 700; }
.news-categories { margin: 8px 0 18px; }
.news-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .8fr); gap: 15px; align-items: start; }
.list-heading { margin: 0 0 10px; font-size: 19px; }
.news-list, .event-column { display: grid; gap: 12px; }
.news-card { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 14px; padding: 12px; border: 1px solid #3a454d; border-radius: 11px; background: #171f26; color: var(--text); }
.news-card:hover { border-color: var(--accent); text-decoration: none; }
.news-image { width: 130px; height: 88px; object-fit: cover; border-radius: 7px; background: #29343a; }
.news-card h3 { margin: 3px 0 5px; color: var(--accent); font-size: 19px; line-height: 1.1; }
.news-card p { margin: 0; color: var(--muted); font-size: 13px; }
.news-meta { margin-top: 7px; color: var(--subtle); font-size: 11px; }
.event-list { display: grid; gap: 7px; }
.event-item { padding: 8px 0; border-bottom: 1px solid #35414a; }
.event-item:last-child { border-bottom: 0; }
.event-item strong { display: block; color: var(--text); font-size: 15px; }
.event-item small { color: var(--muted); font-size: 12px; }
.event-date { display: inline-block; margin-right: 8px; color: var(--accent); font-weight: 800; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.settings-grid .subpanel { min-height: 150px; }
.settings-grid .subpanel h3 { margin-bottom: 5px; }
.settings-grid select { display: block; min-width: 190px; margin-top: 7px; }
.settings-grid input[type="text"], .settings-grid input:not([type]) { min-width: 160px; }
.settings-grid input[type="number"] { width: 96px; min-height: 38px; margin-top: 6px; padding: 6px 9px; border: 1px solid #3b4852; border-radius: 8px; background: #19232b; color: var(--text); }
.field-label { display: block; margin-top: 13px; color: var(--muted); font-size: 13px; font-weight: 700; }
.check-row { margin-top: 9px; display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.check-row input { accent-color: var(--accent); }
.danger-button { margin-top: 14px; border-color: rgba(239, 69, 79, .48); color: #ff8790; }
.danger-button:hover { background: rgba(239, 69, 79, .13); }
.wide-panel { grid-column: 1 / -1; min-height: auto !important; }
.wide-panel .eyebrow { color: var(--accent); }
.wide-panel p:last-child { max-width: 950px; margin-bottom: 0; }
.muted { color: var(--muted); }

.site-footer { min-height: 60px; display: flex; align-items: center; gap: 24px; border-top: 1px solid rgba(117, 144, 158, .2); color: var(--subtle); font-size: 11px; }
.site-footer strong { color: var(--muted); letter-spacing: .8px; }
.site-footer a { color: var(--muted); }
.site-footer #analytics-counter { color: var(--muted); font-size: 10px; }
.site-footer #analytics-counter b { color: var(--accent); }
.footer-right { margin-left: auto; }
.mobile-nav { display: none; }
.detail-dialog {
  width: min(920px, calc(100vw - 34px));
  max-height: min(88vh, 920px);
  padding: 22px;
  overflow-y: auto;
  border: 1px solid var(--accent);
  border-radius: 15px 4px;
  background: #11181f;
  color: var(--text);
  box-shadow: 0 20px 85px rgba(0, 0, 0, .65), 0 0 30px var(--accent-dim);
}
.detail-dialog::backdrop { background: rgba(2, 5, 8, .76); backdrop-filter: blur(5px); }
.dialog-top { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.dialog-top h2 { margin: 0; color: var(--accent); font-size: 28px; line-height: 1.05; }
.dialog-top .eyebrow { margin-bottom: 3px; }
.dialog-close { flex: 0 0 auto; font-size: 25px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.shortcuts-dialog { width: min(430px, calc(100vw - 34px)); }
.shortcut-row { min-height: 40px; display: flex; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); color: var(--text); }
.shortcut-row kbd { min-width: 42px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); color: var(--accent); text-align: center; font: 700 13px var(--font); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-block { padding: 13px; border: 1px solid #39464f; border-radius: 10px; background: #171f26; }
.detail-block h3 { margin: 0 0 10px; font-size: 17px; }
.detail-kv { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; border-bottom: 1px solid rgba(55, 67, 76, .55); color: var(--muted); font-size: 13px; }
.detail-kv:last-child { border-bottom: 0; }.detail-kv strong { color: var(--text); text-align: right; }
.population-history { display: grid; gap: 6px; margin-top: 9px; }
.population-history-row { display: grid; grid-template-columns: 120px 70px minmax(50px, 1fr); align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.population-history-row > span:nth-child(2) { color: var(--text); text-align: right; font-weight: 700; }
.population-history-row > i { height: 5px; overflow: hidden; border-radius: 5px; background: #36434b; }
.population-history-row > i > b { height: 100%; display: block; border-radius: inherit; background: var(--accent); }
.availability-chart { height: 42px; margin: 13px 0 8px; display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); align-items: end; gap: 3px; }
.availability-hour { min-height: 4px; border-radius: 2px 2px 0 0; background: linear-gradient(to top, var(--accent) var(--availability), var(--surface-3) var(--availability)); }
.availability-hour.offline { background: var(--red); }
.availability-hour.unknown { height: 4px; background: var(--line); }
.scoreboard-table { width: 100%; margin-top: 13px; border-collapse: collapse; }
.scoreboard-table th, .scoreboard-table td { padding: 8px; border-bottom: 1px solid #34414a; text-align: left; font-size: 13px; }
.scoreboard-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.scoreboard-table tr:last-child td { border-bottom: 0; }
.profile-dialog { width: min(700px, calc(100vw - 34px)); }
.compare-dialog { width: min(1050px, calc(100vw - 34px)); }
.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.compare-server { padding: 13px; border: 1px solid #39464f; border-radius: 9px; background: #171f26; }
.compare-server h3 { margin: 0 0 8px; color: var(--accent); font-size: 17px; }
.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; max-width: min(400px, calc(100vw - 36px)); padding: 12px 16px; border: 1px solid var(--accent); border-radius: 9px; background: #15212a; color: var(--text); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }

:root {
  --bg: #090c08;
  --bg-raised: #10150f;
  --surface: #141b13;
  --surface-2: #1b2419;
  --surface-3: #242e21;
  --line: #323d2c;
  --text: #e6e9df;
  --muted: #b4bda9;
  --subtle: #84907c;
  --accent: #e8b923;
  --accent-dim: rgba(232, 185, 35, .14);
  --accent-glow: rgba(232, 185, 35, .2);
}
body {
  background:
    linear-gradient(rgba(157, 179, 143, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 179, 143, .025) 1px, transparent 1px),
    radial-gradient(ellipse at 13% 16%, var(--accent-dim), transparent 33rem),
    linear-gradient(145deg, var(--bg) 15%, var(--bg-raised) 58%, var(--surface));
  background-size: 32px 32px, 32px 32px, auto, auto;
}
.site-shell { width: min(1680px, calc(100% - 48px)); }
.topbar { gap: clamp(12px, 1.4vw, 20px); }
.app-heading { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand-copy strong { display: block; color: var(--text); font-size: 18px; line-height: 1; letter-spacing: 1px; font-weight: 700; }
.brand-copy small { display: block; max-width: 230px; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.main-nav { justify-content: center; }
.nav-link { letter-spacing: .45px; }
.connection-pill, .icon-button, .searchbox, select, .outline-button, .small-action, .danger-button {
  border-radius: 0;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}
.icon-button { border-color: var(--line); background: var(--surface); }
.section-heading { margin: 22px 0 14px; }
.section-heading h2 { color: var(--text); font-size: 27px; letter-spacing: .6px; }
.section-subtitle { font-size: 14px; }
.section-subtitle time { color: var(--subtle); font-size: 11px; white-space: nowrap; }
.uplink {
  min-height: 38px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: rgba(16, 21, 15, .82);
  color: var(--muted);
  font-size: 13px;
}
.uplink .status-dot { flex: 0 0 auto; }
.uplink > strong { color: var(--accent); font-size: 11px; letter-spacing: .8px; }
.uplink .searchbox { width: 100%; max-width: none; background: var(--surface); }
.toolbar { margin: 9px 0; }
.server-filter-panel {
  margin: 7px 0 12px;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) auto;
  align-items: center;
  gap: 6px 12px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}
.server-filter-panel[hidden] { display: none; }
.server-tools #toggle-filter-panel { font-size: 20px; }
.server-tools #toggle-search-panel, .server-tools #toggle-quickview-panel { display: grid; place-items: center; }
.server-tools .icon-button { transition: border-color .14s, color .14s, background-color .14s, box-shadow .14s; }
.server-tools .icon-button:hover, .server-tools .icon-button:focus-visible, .server-tools .icon-button:active,
.server-tools #toggle-controls-toolbar.is-active, .server-tools #toggle-server-heatmap.is-active,
.server-tools #toggle-search-panel.is-active, .server-tools #toggle-quickview-panel.is-active,
.server-tools #toggle-filter-panel.is-active, .server-tools #compare-button.is-active,
.server-tools #arrange-button.is-active, .server-tools #refresh-button-page.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
  box-shadow: inset 0 0 0 1px var(--accent-dim), 0 0 10px var(--accent-dim);
}
.server-tools .tool-icon-search { display: block; color: inherit; font-size: 28px; font-weight: 700; line-height: .8; }
.server-tools #server-search-panel[hidden], .uplink[hidden], #battlefield-quickview[hidden] { display: none; }
.filter-group { min-width: 0; display: flex; align-items: center; gap: 7px; }
.filter-group-label { flex: 0 0 auto; color: var(--subtle); font-size: 9px; font-weight: 800; letter-spacing: .7px; }
.filter-group .filter-chips { min-width: 0; flex-wrap: nowrap; gap: 5px; overflow-x: auto; scrollbar-width: thin; }
.chip {
  border-color: var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--muted);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.chip.selected, .chip:hover { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.server-filter-panel .chip { min-height: 29px; padding: 5px 9px; font-size: 12px; white-space: nowrap; }
.filter-preset-controls { grid-column: 1 / -1; display: flex; align-items: end; flex-wrap: wrap; gap: 7px; padding-top: 8px; border-top: 1px solid var(--line); }
.filter-preset-controls > label { display: grid; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 700; }
.filter-preset-controls select, .filter-preset-controls input { min-height: 32px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text); }
.filter-preset-controls .inline-form { width: auto; flex-wrap: nowrap; }
.filter-preset-controls .inline-form > label { align-self: center; color: var(--muted); font-size: 11px; }
.filter-preset-controls .inline-form input { width: 150px; }
.filter-preset-controls .chip { min-height: 32px; }
.filter-preset-controls .chip:disabled { cursor: not-allowed; opacity: .5; }
.clear-filters[hidden] { display: none; }
.network-note { padding: 7px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.network-note > span:last-child { color: var(--accent); font-weight: 700; }
.battlefield-quickview { border-color: var(--line); background: var(--surface); }
.favorite-quickview { border-radius: 0; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); background: rgba(20, 27, 19, .9); }
.fav-quick-card { border-radius: 0; background: var(--surface); }
.server-grid { gap: 12px; }
.empty-server-grid[hidden] { display: none; }
.server-card {
  padding: 10px 12px 11px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: color-mix(in srgb, var(--surface) var(--card-opacity), transparent);
  box-shadow: none;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.server-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 0 14px var(--accent-dim); }
.server-card.favorite-card { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-dim); }
.server-card.favorite-card::before { display: none; }
.server-card-head { min-height: 35px; display: grid; grid-template-columns: 30px minmax(0, 1fr) 32px; align-items: center; gap: 8px; }
.game-icon { width: 30px; height: 30px; position: relative; display: grid; place-items: center; overflow: hidden; border: 1px solid color-mix(in srgb, var(--game-color), transparent 35%); background: color-mix(in srgb, var(--game-color), transparent 85%); color: var(--game-color); font-size: 10px; font-weight: 700; }
.game-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--surface); }
.game-icon.small { width: 27px; height: 27px; }
.server-game-meta { min-width: 0; display: grid; }
.server-game-meta strong { overflow: hidden; color: var(--game-color); font-size: 13px; line-height: 1.1; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.server-game-meta span { overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.favorite-button { width: 32px; height: 32px; display: grid; place-items: center; font-size: 22px; color: var(--muted); }
.favorite-button.is-favorite { color: var(--gold); }
.server-card-info { margin: 7px 0 0 38px; }
.card-name { margin: 0 0 6px; color: var(--text); font-size: 18px; line-height: 1.05; font-weight: 600; }
.page-panel { padding: 4px 0 34px; animation: appear .16s ease-out; }
.section-heading h1 { margin: 0; color: var(--text); font-size: 27px; letter-spacing: .6px; }
.server-card-info { margin-left: 0; }
.round-line { min-height: 18px; margin: 8px 0 10px; }
.population-box { margin-bottom: 9px; }
.team-grid { margin-top: 8px; }
.team-mini { padding: 6px 8px; border-radius: 0; }
.team-name { display: flex; align-items: center; gap: 6px; }
.team-name > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-emblem { width: 18px; height: 18px; flex: 0 0 18px; object-fit: contain; }
.team-identity { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.team-identity .team-emblem { width: 15px; height: 15px; flex-basis: 15px; }
.team-emblem-fallback { display: inline-grid; place-items: center; border: 1px solid currentColor; font-size: 12px; }
.team-kd { margin-top: 1px; color: #f0f3f5; font-size: 13px; font-weight: 600; line-height: 14px; text-shadow: 0 1px 1px rgba(0, 0, 0, .65); }
.team-kd strong { color: #fff; font-weight: 800; }
.team-kd span, .team-stats > span { color: #c5cdd2; }
.card-api-warning { margin: 7px 0 0; padding: 5px 7px; display: flex; align-items: baseline; gap: 6px; border-left: 2px solid #e8b923; background: rgba(232, 185, 35, .08); color: #e3d7b2; font-size: 11px; line-height: 1.2; }
.card-api-warning strong { flex: 0 0 auto; color: #ffd45a; font-size: 10px; letter-spacing: .35px; }
.team-unavailable { margin-top: 8px; padding: 8px; border: 1px dashed var(--line); color: var(--muted); font-size: 12px; }
.server-card-footer { margin-top: 9px; padding-top: 7px; border-top: 1px solid var(--line); }
.server-card-footer > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-card-footer button { flex: 0 0 auto; padding: 4px 6px; border: 1px solid var(--line); }
.server-card-actions button { border-radius: 0; }
.base-status { margin-top: 9px; border: 1px solid var(--line); background: var(--bg-raised); }
.base-status summary { min-height: 40px; padding: 9px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; list-style: none; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .4px; cursor: pointer; }
.base-status summary::-webkit-details-marker { display: none; }
.base-status summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.base-caption { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.base-count { color: var(--green-text); font-size: 11px; letter-spacing: 0; text-align: right; }
.base-count.unavailable { color: var(--muted); }
.base-arrow { display: inline-block; transition: transform .15s; color: var(--accent); }
.base-status[open] .base-arrow { transform: rotate(90deg); }
.base-content { padding: 0 9px 9px; }
.base-control { margin-bottom: 8px; }
.base-control-heading { margin-bottom: 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.base-control-heading strong { color: var(--text); font-size: 12px; letter-spacing: .4px; }
.base-control-heading span { color: var(--muted); font-size: 11px; }
.base-scores { margin-bottom: 9px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.base-score { min-width: 0; padding: 8px; border: 1px solid color-mix(in srgb, var(--gold), transparent 55%); background: color-mix(in srgb, var(--gold), transparent 93%); }
.base-score.nod { border-color: color-mix(in srgb, #ff5968, transparent 55%); background: color-mix(in srgb, #ff5968, transparent 94%); }
.base-score strong { display: block; color: var(--gold); font-size: 21px; line-height: 1.1; }
.base-score.nod strong { color: #ff737d; }
.base-score span { color: var(--muted); font-size: 10px; }
.base-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.base-group { min-width: 0; border-top: 1px solid #61552a; padding-top: 6px; }
.base-group.nod { border-color: #64323b; }
.base-heading { color: var(--gold); font-size: 12px; font-weight: 700; }
.base-group.nod .base-heading { color: #ff5968; }
.building-row { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; padding: 4px 0; color: var(--text); font-size: 12px; line-height: 1.2; }
.base-compact-row { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; padding: 6px 0; border-bottom: 1px solid color-mix(in srgb, var(--text), transparent 94%); color: var(--text); font-size: 11px; line-height: 1.2; }
.base-compact-row:last-child { border-bottom: 0; }
.base-compact-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.building-state { white-space: nowrap; }
.building-state.alive { color: var(--green-text); }
.building-state.destroyed { color: #ff5968; }
.base-updated { color: var(--muted); font-size: 11px; margin: 8px 0 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .base-columns { grid-template-columns: 1fr; } }
@media (max-width: 360px) { .base-scores { grid-template-columns: 1fr; } }
@media (pointer: coarse) { .base-status summary { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .base-arrow { transition: none; } }
.mode-line { margin: 0 0 8px; color: var(--muted); }
.brand-mark { text-decoration: none; }
.brand-mark:hover { text-decoration: none; }
.server-map-line { min-width: 0; display: flex; justify-content: space-between; gap: 9px; color: var(--muted); font-size: 13px; }
.server-map-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-map-line span:first-child { flex: 1 1 auto; }
.server-map-line span:last-child { flex: 0 0 auto; color: var(--accent); text-align: right; }
.team-score-line { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 5px; font-size: 12px; font-weight: 700; }
.team-score-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-score-line .nod { color: #e53935; }
.team-score-line .gdi { color: var(--gold); }
.team-score-line .allies { color: var(--blue); }
.team-score-line i { color: var(--subtle); font-size: 10px; font-style: normal; }
.player-bar { display: flex; align-items: center; gap: 9px; margin-top: 8px; color: var(--text); font-size: 13px; font-weight: 700; }
.player-bar-track { height: 6px; flex: 1 1 auto; overflow: hidden; background: var(--surface-3); }
.player-bar-track i { height: 100%; min-width: 2px; display: block; background: var(--accent); }
.server-no-status { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.compact-grid .server-card { padding: 7px 9px; }
.compact-grid .server-card-info { margin-top: 3px; }
.compact-grid .card-map-row { gap: 6px; }
.compact-grid .round-line { margin: 5px 0 7px; }
.compact-grid .population-box { padding: 7px; }
.compact-grid .team-mini { padding: 3px 5px; }
.compact-grid .card-player-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.group-heading { margin: 16px 0 -4px; border-color: var(--line); color: var(--accent); }
.loading-card, .empty-panel { border-radius: 0; border-color: var(--line); background: var(--surface); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.subpanel, .detail-block, .prediction-card, .news-card, .compare-server, .detail-dialog {
  border-radius: 0;
  background-color: var(--surface);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.subpanel { border-color: var(--line); }
.detail-dialog { border-color: var(--accent); background-color: var(--bg-raised); clip-path: none; }
.detail-block { border-color: var(--line); }
.detail-game-banner {
  min-height: 112px;
  margin: 0 0 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--game-color), transparent 90%), rgba(9, 12, 8, .72)),
    var(--game-art) center 42% / cover no-repeat,
    var(--surface-2);
}
.detail-game-banner img { width: min(48%, 300px); max-height: 85px; object-fit: contain; filter: drop-shadow(0 2px 8px #000); }
.scoreboard-table th[data-score-sort] { cursor: pointer; }
.scoreboard-table th[data-score-sort]:hover { color: var(--accent); }
.scoreboard-team-heading th { padding-top: 11px; color: var(--accent); background: var(--surface-2); }
.activity-filters { margin: 10px 0; }
.settings-grid select, .settings-grid input, .inline-form input { border-radius: 0; background-color: var(--bg-raised); }
.player-list { display: grid; gap: 7px; }
.player-row { min-width: 0; padding: 9px 11px; display: grid; grid-template-columns: 30px minmax(140px, 1fr) minmax(240px, 1.5fr); align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface); }
.player-identity { min-width: 0; }
.player-identity > small { display: block; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.player-server-link { padding: 0; border: 0; background: none; color: var(--muted); font-size: inherit; }
.player-server-link:hover { color: var(--accent); }
.player-numbers { display: flex; justify-content: space-between; gap: 8px; }
.player-numbers > span { display: grid; text-align: right; }
.player-numbers small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.player-numbers b { color: var(--text); font-size: 13px; }
.player-controls { display: flex; align-items: center; gap: 8px; }
.player-controls .chip { min-height: 34px; }
.stats-controls { display: grid; justify-items: end; gap: 8px; }
.segmented-control { display: flex; flex-wrap: wrap; gap: 5px; }
.segmented-control button {
  min-height: 31px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.segmented-control button.selected { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
.scoreboard-table th, .scoreboard-table td { border-color: var(--line); }
.news-card { border-color: var(--line); }
.site-footer { border-color: var(--line); }
.arrange-dialog .detail-block { clip-path: none; }
.arrange-dialog .segmented-control { display: flex; gap: 7px; margin: 10px 0 16px; }
.arrange-dialog .segmented-control button { min-height: 34px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 0; background: var(--surface-2); color: var(--muted); }
.arrange-dialog .segmented-control button.selected { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }
html[data-theme="nod"] {
  --bg: #0b0707; --bg-raised: #140e0e; --surface: #1a1212; --surface-2: #231818;
  --surface-3: #2d2020; --line: #3f2f2e; --text: #efe6e5; --muted: #c7b6b4; --subtle: #94817e;
}
html[data-theme="soviet"] {
  --bg: #0a0a0b; --bg-raised: #121213; --surface: #181718; --surface-2: #211f1f;
  --surface-3: #2a2828; --line: #3b3533; --text: #ece7e4; --muted: #c4bab5; --subtle: #908784;
}
html[data-theme="allies"] {
  --bg: #070a0f; --bg-raised: #0d121a; --surface: #111822; --surface-2: #18212d;
  --surface-3: #212b38; --line: #2d3949; --text: #e3e8ef; --muted: #b2bdcb; --subtle: #8291a4;
}

@media (min-width: 901px) {
  .server-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .site-shell { width: calc(100% - 30px); }
  .player-row { grid-template-columns: 30px minmax(120px, 1fr); }
  .player-numbers { grid-column: 2; }
  .map-browser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 840px) {
  .site-shell { width: calc(100% - 30px); }
  .topbar { gap: 10px; }
  .main-nav { display: none; }
  .app-heading { margin-right: auto; }
  .section-heading { flex-direction: row; align-items: center; }
  .server-tools { width: auto; }
  .server-tools .icon-button { width: 37px; height: 37px; }
}
@media (max-width: 590px) {
  .site-shell { width: calc(100% - 20px); }
  .brand-copy strong { font-size: 15px; }
  .brand-copy small { max-width: 155px; font-size: 10px; }
  .connection-pill { padding: 7px; }
  .top-actions .icon-button { width: 34px; height: 34px; }
  .section-heading { align-items: start; }
  .section-heading h2 { font-size: 22px; }
  .server-tools { gap: 5px; }
  .server-tools .icon-button { width: 34px; height: 34px; font-size: 21px; }
  .server-tools .utility-icon-button { font-size: 18px; }
  .server-tools .utility-icon-button.is-active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
  .server-tools .utility-icon-button span { display: block; line-height: 1; }
  .player-row { grid-template-columns: 27px minmax(0, 1fr); padding: 8px; }
  .player-numbers { flex-wrap: wrap; justify-content: flex-start; gap: 6px 15px; }
  .player-numbers > span { min-width: 54px; text-align: left; }
  .player-controls { width: 100%; flex-wrap: wrap; }
  .uplink { align-items: flex-start; }
  .stats-controls { justify-items: start; }
}

@media (max-width: 1250px) {
  .site-shell { width: min(100% - 42px, 1150px); }
  .topbar { gap: 23px; }
  .nav-link { padding-inline: 10px; font-size: 14px; }
  .server-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .server-tools { flex-wrap: wrap; justify-content: end; }
  .server-tools .searchbox { min-width: 220px; }
}
@media (max-width: 840px) {
  .site-shell { width: calc(100% - 30px); }
  .topbar { height: 70px; justify-content: space-between; gap: 12px; }
  .main-nav { position: fixed; z-index: 30; inset: auto 0 0; height: 66px; justify-content: space-around; gap: 0; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid #35424b; background: rgba(13, 19, 24, .97); backdrop-filter: blur(16px); }
  .main-nav .nav-link { display: none; }
  .mobile-nav { position: fixed; z-index: 31; inset: auto 0 0; display: flex; justify-content: space-around; height: calc(62px + env(safe-area-inset-bottom)); padding: 4px 5px env(safe-area-inset-bottom); border-top: 1px solid #35424b; background: rgba(13, 19, 24, .97); backdrop-filter: blur(16px); }
  .mobile-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; color: var(--muted); font-size: 11px; font-weight: 700; text-decoration: none; }
  .mobile-nav a span { color: currentColor; font-size: 20px; line-height: 1.1; }
  .mobile-nav a.active { color: var(--accent); }
  .mobile-nav a.mobile-discord { margin: 3px 0; border-radius: 6px; background: rgba(88, 101, 242, .18); box-shadow: inset 0 0 0 1px rgba(88, 101, 242, .65); color: #aab2ff; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .server-tools { width: 100%; justify-content: start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; }
  .server-tools .searchbox { flex: 1; }
  .toolbar { align-items: start; flex-direction: column; }
  .server-filter-panel { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 6px 8px; }
  .filter-group { min-height: 31px; }
  .toolbar-right { width: 100%; justify-content: flex-end; }
  .stats-layout, .news-layout { grid-template-columns: 1fr; }
  .shared-stats-grid { grid-template-columns: 1fr; }
  .shared-hours { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .map-controls { width: 100%; justify-content: flex-start; }
  .map-controls .searchbox { flex: 1 1 100%; }
  .personal-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prediction-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer { min-height: 58px; flex-wrap: wrap; gap: 3px 15px; padding: 10px 0; }
  .footer-right { margin-left: 0; }
}
@media (max-width: 590px) {
  .site-shell { width: calc(100% - 22px); }
  .topbar { height: 62px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand strong { font-size: 16px; }
  .brand small { font-size: 8px; }
  .top-actions { gap: 7px; }
  .connection-pill { padding: 7px 8px; font-size: 10px; }
  .top-actions .icon-button { width: 36px; height: 36px; }
  .top-actions { gap: 6px; }
  .stream-menu > summary { width: 50px; min-height: 36px; padding: 0 5px; justify-content: center; gap: 3px; }
  .stream-label { display: none; }
  .stream-chevron { display: none; }
  .stream-icon { font-size: 16px; }
  .stream-menu > summary::after { content: "YT"; font-size: 10px; font-weight: 800; }
  .stream-menu > summary.has-live-channel { width: auto; }
  .stream-menu > summary.has-live-channel::after { content: none; }
  .section-heading h2 { font-size: 26px; }
  .map-browser-grid { grid-template-columns: 1fr; }
  .map-card { padding: 12px; }
  .map-filter-banner { align-items: flex-start; flex-direction: column; }
  .server-tools { display: flex; width: 100%; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; gap: 5px; padding-bottom: 3px; scrollbar-width: thin; }
  .server-tools .icon-button { flex: 0 0 34px; }
  .server-tools .searchbox { grid-column: 1 / -1; width: 100%; }
  .server-tools select { width: 100%; }
  .server-grid { grid-template-columns: 1fr; gap: 11px; }
  .server-card { padding: 14px; }
  .card-name { font-size: 21px; }
  .server-card-footer { font-size: 9px; }
  .toolbar-right { justify-content: space-between; flex-wrap: wrap; }
  .network-note { font-size: 11px; }
  .subpanel { padding: 14px; }
  .subpanel-head { align-items: start; flex-direction: column; }
  .inline-form { width: 100%; }
  .inline-form input { flex: 1; min-width: 0; }
  .inline-controls { width: 100%; }
  .inline-controls select { flex: 1; min-width: 0; padding-right: 18px; font-size: 12px; }
  .fav-quick-list { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .wide-panel { grid-column: auto; }
  .prediction-grid { grid-template-columns: 1fr; }
  .heatmap { grid-template-columns: 37px repeat(24, minmax(5px, 1fr)); gap: 2px; }
  .heat-cell { height: 9px; }
  .news-card { grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
  .news-image { width: 88px; height: 76px; }
  .news-card h3 { font-size: 16px; }
  .news-card p { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12px; }
  .leader-row { grid-template-columns: 24px minmax(60px, 1fr) 74px; gap: 6px; }
  .leader-game { display: none; }
  .detail-dialog { width: calc(100vw - 16px); max-height: 91vh; padding: 16px; }
  .detail-grid { grid-template-columns: 1fr; }
  .scoreboard-table th, .scoreboard-table td { padding: 6px 4px; font-size: 11px; }
  .site-footer { padding-bottom: 4px; }
}

.server-tools {
  position: relative;
  flex-wrap: wrap;
  gap: 6px;
  overflow: visible;
}
.server-tools .server-tool-action {
  width: auto;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 3px;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}
.server-tools #toggle-search-panel.server-tool-action {
  display: inline-flex;
  align-items: center;
}
.server-tools .server-tool-action:hover,
.server-tools .server-tool-action:focus-visible,
.server-tools .server-tool-action.is-active,
.server-tools #toggle-more-server-tools[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.server-tool-icon {
  display: inline-block;
  color: var(--accent);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
}
.server-tools .server-tool-action .tool-icon-search {
  font-size: 23px;
}
.server-tool-label { font-size: 13px; font-weight: 700; }
.server-tools-more { position: relative; }
.server-tools .server-tool-chevron { color: var(--muted); font-size: 10px; }
.server-tools .server-tool-refresh { padding: 0 9px; }
.server-tools .server-tool-refresh .server-tool-icon { font-size: 22px; }
.server-tools-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 7px);
  right: 0;
  width: min(330px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid var(--green-border);
  background: var(--bg-raised);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .55);
}
.server-tools-menu[hidden] { display: none; }
.server-heading-copy { min-width: 0; }
.server-summary-line {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.server-summary-counts { flex: 0 0 auto; }
.server-live-status { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; }
.server-live-status strong { color: #ff4545; font-size: 12px; letter-spacing: .5px; }
.server-summary-line #updated-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--subtle); font-size: 11px; }
@media (max-width: 840px) {
  .server-heading-copy { width: 100%; }
}
.server-summary-line #updated-text:empty { display: none; }
.server-tools-menu-heading {
  margin: 6px 8px 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.1px;
}
.server-tools-menu-item {
  width: 100%;
  min-height: 48px;
  padding: 7px 8px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
}
.server-tools-menu-item:hover,
.server-tools-menu-item:focus-visible,
.server-tools-menu-item.is-active {
  border-color: var(--green-border);
  background: var(--surface-2);
  color: var(--accent);
  text-decoration: none;
}
.server-tools-menu-item .server-tool-icon { width: 26px; text-align: center; }
.server-tools-menu-copy { min-width: 0; display: grid; gap: 2px; }
.server-tools-menu-copy strong { font-size: 13px; line-height: 1.2; }
.server-tools-menu-copy small { color: var(--muted); font-size: 11px; line-height: 1.25; }
.server-tool-link { color: var(--muted); font-size: 12px; }
@media (max-width: 590px) {
  .server-tools { flex-wrap: wrap; overflow: visible; }
  .server-tools .server-tool-action { flex: 0 0 auto; }
  .server-tools-more { position: static; }
  .server-tools-menu { right: 0; }
}
@media (min-width: 591px) and (max-width: 840px) {
  #tab-servers .section-heading { align-items: center; flex-direction: row; gap: 10px; }
  #tab-servers .server-tools { width: auto; flex: 0 1 auto; }
}
@media (max-width: 590px) {
  #tab-servers .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  #tab-servers .server-tools { width: 100%; }
}
@media (max-width: 430px) {
  .connection-pill #connection-label { display: none; }
  .connection-pill { padding: 8px; }
}
@media (max-width: 370px) {
  .brand-copy small, .connection-pill { display: none; }
  .top-actions { gap: 5px; }
  .settings-grid .inline-form { flex-wrap: wrap; }
  .settings-grid .inline-form input { flex: 1 1 100%; }
}

.android-app-banner {
  position: relative;
  margin: 12px 0;
  padding: 12px 48px 12px 14px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--accent);
  background: linear-gradient(100deg, var(--accent-dim), var(--surface));
}
.android-app-mark { width: 38px; height: 38px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--accent); color: var(--accent); font-size: 24px; font-weight: 700; }
.android-app-banner strong { color: var(--accent); font-size: 13px; letter-spacing: .7px; }
.android-app-banner p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.app-download-button { min-height: 36px; padding: 7px 12px; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; border: 1px solid var(--accent); background: var(--accent-dim); color: var(--text); font-size: 13px; font-weight: 700; }
.app-download-button:hover { background: var(--accent); color: var(--bg); text-decoration: none; }
.banner-dismiss { position: absolute; top: 7px; right: 8px; width: 30px; height: 30px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0; }
.banner-dismiss:hover, .banner-dismiss:focus-visible { border-color: var(--accent); color: var(--accent); }
.android-app-banner[hidden], .app-promo-reopen[hidden] { display: none; }
.app-promo-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin: 12px 0; }
.app-promo-pills { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.app-promo-wrap .android-app-banner { width: 100%; margin: 0; }
.app-promo-reopen { width: auto; min-height: 38px; padding: 7px 13px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 22px; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--text); font-size: 13px; font-weight: 700; text-align: left; }
.app-promo-reopen svg, .app-promo-chevron { flex: 0 0 auto; color: var(--accent); }
.app-promo-chevron { font-size: 19px; line-height: 1; transition: transform .15s; }
.app-promo-reopen[aria-expanded="true"] .app-promo-chevron { transform: rotate(90deg); }
.app-promo-reopen:hover, .app-promo-reopen:focus-visible { border-color: var(--accent); color: var(--accent); }
.privacy-notice { position: fixed; z-index: 60; inset: auto 18px 16px; width: min(900px, calc(100% - 36px)); margin-inline: auto; padding: 14px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--accent); background: rgba(12, 17, 21, .98); box-shadow: 0 8px 36px rgba(0, 0, 0, .48); }
.privacy-notice[hidden] { display: none; }
.privacy-notice p { flex: 1; margin: 0; color: var(--muted); font-size: 13px; }
.privacy-notice p strong { color: var(--text); }
.privacy-notice a { flex: 0 0 auto; font-size: 13px; }
.privacy-notice button { flex: 0 0 auto; }
.privacy-notice .outline-button { min-height: 36px; padding: 6px 11px; }
.privacy-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.privacy-controls span { color: var(--muted); font-size: 13px; }
.server-utility-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; color: var(--muted); font-size: 12px; }
.server-utility-bar > div { display: flex; gap: 8px; }
.small-action { padding: 5px 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12px; }
.quick-settings-toolbar { margin: 0 0 14px; padding: 13px; display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); align-items: end; gap: 11px; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.quick-settings-toolbar[hidden] { display: none; }
.quick-settings-toolbar > label { min-width: 0; display: grid; gap: 5px; color: var(--accent); font-size: 12px; font-weight: 700; }
.quick-settings-toolbar select, .quick-settings-toolbar input[type="range"] { width: 100%; min-width: 0; min-height: 34px; }
.quick-settings-toolbar select { border: 1px solid var(--line); background: var(--bg-raised); color: var(--text); }
.quick-settings-toolbar output { color: var(--muted); }
.quick-settings-toolbar .quick-check { min-height: 34px; display: flex; align-items: center; gap: 7px; color: var(--text); }
.quick-settings-toolbar .quick-check input { accent-color: var(--accent); }
.quick-zoom-actions { display: flex; gap: 4px; }
.quick-zoom-actions button { min-width: 36px; min-height: 34px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.quick-zoom-actions button:hover { border-color: var(--accent); color: var(--accent); }
.now-playing-panel { min-width: 0; padding: 10px; border: 1px solid var(--line); background: var(--bg-raised); }
.now-playing-panel .subpanel-head { margin-bottom: 8px; }
.now-playing-panel .subpanel-head h2 { margin: 0; color: var(--text); font-size: 19px; letter-spacing: .4px; }
.now-playing-panel .subpanel-head p { margin-top: 1px; font-size: 11px; }
.server-heatmap-panel, .empty-servers-section { margin: 14px 0; padding: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 82%, transparent); }
.now-playing-list { display: flex; gap: 7px; overflow-x: auto; }
.now-playing-item { min-width: min(100%, 210px); max-width: 270px; padding: 7px 9px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; }
.now-playing-item:hover { border-color: var(--accent); }
.now-playing-rank { color: var(--accent); font-weight: 700; }
.now-playing-name { min-width: 0; flex: 1; display: grid; }
.now-playing-name strong, .now-playing-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-playing-name small, .now-playing-item > b small { color: var(--muted); font-size: 10px; }
.now-playing-item > b { color: var(--accent); text-align: right; }
.empty-servers-toggle { width: 100%; min-height: 38px; padding: 7px 10px; display: flex; justify-content: space-between; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font-weight: 700; }
.empty-servers-toggle strong { color: var(--accent); }
.empty-server-grid { margin-top: 10px; }
.page-scroll-nav { --scroll-nav-bottom: 18px; position: fixed; z-index: 20; right: 14px; bottom: max(var(--scroll-nav-bottom), var(--scroll-footer-offset, 0px)); display: grid; gap: 6px; }
.page-scroll-nav button { width: 38px; height: 38px; border: 1px solid var(--line); background: var(--surface); color: var(--accent); font-size: 19px; }
.horizontal-grid .server-card { display: grid; grid-template-columns: minmax(150px, .65fr) minmax(0, 1.5fr); gap: 12px; }
.horizontal-grid .server-card-info { margin: 0; }
html[data-card-style="glass"] .server-card { background: color-mix(in srgb, var(--surface-2) var(--card-opacity), transparent); backdrop-filter: blur(12px); }
html[data-card-style="solid"] .server-card { background: var(--bg-raised); }
html[data-card-style="accent"] .server-card { background: color-mix(in srgb, var(--accent) calc(100% - var(--card-opacity)), var(--surface)); }
html.high-contrast { --text: #fff; --muted: #e4edf2; --subtle: #c4d0d7; --line: #92a4ae; }
html.high-contrast .server-card, html.high-contrast .subpanel { border-width: 2px; }

@media (max-width: 840px) {
  .privacy-notice { bottom: calc(76px + env(safe-area-inset-bottom)); width: calc(100% - 20px); inset-inline: 10px; flex-wrap: wrap; gap: 9px; padding: 12px; }
  .privacy-notice p { flex-basis: 100%; }
  .android-app-banner { flex-wrap: wrap; }
  .android-app-banner > div { flex: 1 1 calc(100% - 65px); }
  .server-utility-bar { align-items: flex-start; flex-direction: column; }
  .server-utility-bar > div { flex-wrap: wrap; }
  .quick-settings-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .horizontal-grid .server-card { grid-template-columns: 1fr; }
  .page-scroll-nav { right: 8px; --scroll-nav-bottom: calc(82px + env(safe-area-inset-bottom)); }
}

@media (max-width: 520px) {
  .card-player-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-player-stats-heading { flex-direction: column; gap: 2px; }
  .card-player-stats-heading span { text-align: left; }
}
@media (max-width: 590px) {
  .app-download-button { font-size: 12px; }
  .privacy-notice { justify-content: flex-start; }
  .privacy-notice p { font-size: 12px; }
  .privacy-notice a { margin-right: auto; }
  .battlefield-quickview { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 8px; }
  .server-heatmap-panel, .empty-servers-section { padding: 10px; }
}

.topbar { min-height: 96px; height: auto; }
.brand-mark { width: 72px; height: 72px; border-width: 2px; border-radius: 17px 7px; font-size: 47px; }
.app-heading { gap: 14px; }
.brand-copy strong { font-size: 28px; letter-spacing: 1.7px; }
.brand-copy small { max-width: none; margin-top: 7px; font-size: 17px; line-height: 1.05; letter-spacing: .2px; }
.header-uplink { min-width: 0; max-width: 365px; padding: 11px 15px; gap: 12px; background: rgba(18, 12, 12, .86); }
.header-uplink .status-dot { width: 12px; height: 12px; }
.header-uplink > strong { flex: 0 0 auto; color: #ff4545; font-size: 14px; letter-spacing: 1px; }
.header-uplink > span { min-width: 0; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1100px) and (min-width: 841px) {
  .topbar { min-height: 0; padding: 8px 0; flex-wrap: wrap; gap: 0 12px; }
  .main-nav { height: 38px; flex: 1 1 100%; order: 3; }
  .top-actions { min-width: 0; flex: 0 1 auto; }
}
@media (max-width: 1400px) and (min-width: 841px) {
  .topbar { min-height: 0; padding: 8px 0; flex-wrap: wrap; gap: 0 12px; }
  .main-nav { height: 38px; flex: 1 1 100%; order: 3; }
  .top-actions { min-width: 0; flex: 0 1 auto; }
}
@media (max-width: 1250px) {
  .brand-mark { width: 62px; height: 62px; font-size: 41px; }
  .brand-copy strong { font-size: 24px; }
  .brand-copy small { font-size: 15px; }
  .header-uplink { max-width: 310px; padding: 9px 11px; gap: 8px; }
  .header-uplink > span { font-size: 14px; }
}
@media (max-width: 840px) {
  .topbar { min-height: 0; padding: 10px 0; flex-wrap: wrap; }
  .app-heading { flex: 1 1 100%; }
  .top-actions { width: 100%; justify-content: flex-end; }
  .header-uplink { max-width: none; flex: 1 1 auto; }
}
@media (max-width: 590px) {
  .topbar { gap: 9px; }
  .brand-mark { width: 52px; height: 52px; font-size: 35px; }
  .app-heading { gap: 10px; }
  .brand-copy strong { font-size: clamp(18px, 5vw, 23px); letter-spacing: 1px; }
  .brand-copy small { margin-top: 5px; font-size: 14px; }
  .top-actions { justify-content: space-between; }
  .header-uplink { padding: 8px 9px; }
  .header-uplink > span { font-size: 13px; }
}
@media (max-width: 370px) {
  .brand-copy small { display: block; max-width: none; }
  .header-uplink > span { font-size: 12px; }
}

/* Header style 6 — minimal split: text menu on top, slim live strip below. */
.brand-mark { border: 0; background: var(--accent); color: #111; box-shadow: none; border-radius: 12px; }
@media (min-width: 841px) {
  .topbar { min-height: 0; height: auto; padding: 18px 0 14px; flex-wrap: wrap; align-items: center; gap: 14px 40px; border-bottom: 0; }
  .app-heading { order: 1; flex: 0 0 auto; gap: 14px; }
  .brand-mark { width: 52px; height: 52px; font-size: 32px; }
  .brand-copy strong { font-size: 26px; letter-spacing: 1.6px; }
  .brand-copy small { display: none; }
  .main-nav { order: 2; height: auto; flex: 0 1 auto; justify-content: flex-start; gap: clamp(20px, 2.3vw, 34px); }
  .nav-link { position: relative; height: auto; padding: 6px 0; border-bottom: 0; color: var(--muted); font-size: 18px; letter-spacing: .3px; text-transform: none; }
  .nav-link:hover { color: var(--text); text-decoration: none; }
  .nav-link.active { color: var(--text); }
  .nav-link.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -5px; height: 3px; border-radius: 3px; background: var(--accent); }
  .main-nav .nav-discord { height: auto; padding: 6px 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: #8f9aff; }
  .main-nav .nav-discord:hover, .main-nav .nav-discord:focus-visible { background: none; color: #c3c9ff; }
  .top-actions { display: contents; }
  .stream-menu { order: 3; margin-left: auto; }
  .stream-menu > summary { min-height: 38px; padding: 7px 14px; border: 1px solid rgba(239, 59, 54, .6); border-radius: 8px; background: transparent; color: #ffb5b2; font-size: 15px; }
  .stream-menu > summary:hover, .stream-menu[open] > summary { border-color: #ef3b36; background: rgba(239, 59, 54, .12); }
  .header-uplink { order: 5; flex: 1 1 100%; max-width: none; min-height: 36px; padding: 7px 14px; gap: 10px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .04); }
  .header-uplink > strong { font-size: 14px; }
  .header-uplink > span { color: var(--muted); font-size: 15px; }
}
@media (min-width: 841px) and (max-width: 1220px) {
  .main-nav { order: 4; flex: 1 1 100%; }
  .header-uplink { order: 5; }
}

/* Animated header logo — "target lock": a tank rolls in from the left edge and shells the faction emblem. 3 s per shot, 12 s faction loop. */
.rl-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.brand-mark.rl-mark { --rl-s: .72; position: relative; display: block; flex: none; width: calc(330px * var(--rl-s)); height: calc(128px * var(--rl-s)); padding: 0; overflow: hidden;
  border: 0; border-radius: 8px; background: #20160f; color: inherit; font-size: 0; box-shadow: 0 0 0 1px #6b5330, 0 6px 18px rgba(0, 0, 0, .45); }
.brand-mark.rl-mark:hover, .brand-mark.rl-mark:focus-visible { box-shadow: 0 0 0 1px #ff3b30, 0 0 16px rgba(255, 59, 48, .35); }
.rl-stage { position: absolute; left: 0; top: 0; width: 330px; height: 128px; overflow: hidden; transform: scale(var(--rl-s)); transform-origin: 0 0;
  background: linear-gradient(#20160f, #4a2e19 62%, #6e4626 88%); }
.rl-stage::before { content: ""; position: absolute; inset: auto 0 14px; height: 34px; background: #2a1d12; clip-path: polygon(0 100%, 0 60%, 12% 30%, 24% 55%, 40% 10%, 55% 50%, 70% 25%, 86% 60%, 100% 35%, 100% 100%); }
.rl-stage > span, .rl-stage i { display: block; }
.rl-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
  background: repeating-linear-gradient(90deg, transparent 0 52px, rgba(0,0,0,.5) 52px 53px), linear-gradient(#5a5953, #3a3934 40%, #1f1e1b); box-shadow: 0 -1px 0 rgba(255,255,255,.12); }
.rl-target { position: absolute; left: 222px; top: 10px; width: 96px; height: 96px; animation: rl-hit 3s linear infinite; }
.rl-target .rl-ly { position: absolute; inset: 6px; opacity: 0; animation: rl-fac 12s linear infinite; animation-delay: calc(-10.65s + var(--i) * 3s); }
.rl-em { width: 100%; height: 100%; display: block; object-fit: contain; filter: drop-shadow(0 0 7px var(--a)) drop-shadow(0 2px 0 #000); }
@keyframes rl-fac { 0%, 24.9% { opacity: 1; } 25%, 100% { opacity: 0; } }
@keyframes rl-hit { 0%, 43% { transform: none; filter: none; } 44% { transform: translate(5px, 2px) rotate(3deg); filter: brightness(2.6); } 46% { transform: translate(-4px, -2px) rotate(-2deg); filter: brightness(1.6); } 49% { transform: translate(2px, 1px); filter: none; } 53%, 100% { transform: none; } }
.rl-ret { position: absolute; inset: -4px; border-radius: 50%; border: 2px dashed #ff3b30; animation: rl-spin 6s linear infinite; filter: drop-shadow(0 0 4px #ff3b30); }
.rl-ret::before, .rl-ret::after { content: ""; position: absolute; background: #ff3b30; }
.rl-ret::before { left: 50%; top: -8px; bottom: -8px; width: 2px; margin-left: -1px; clip-path: polygon(0 0, 100% 0, 100% 14%, 0 14%, 0 86%, 100% 86%, 100% 100%, 0 100%); }
.rl-ret::after { top: 50%; left: -8px; right: -8px; height: 2px; margin-top: -1px; clip-path: polygon(0 0, 14% 0, 14% 100%, 0 100%, 86% 0, 100% 0, 100% 100%, 86% 100%); }
@keyframes rl-spin { to { transform: rotate(360deg); } }
.rl-hp { position: absolute; left: 228px; top: 2px; width: 84px; height: 6px; background: #000; box-shadow: 0 0 0 1px #000, 0 0 0 2px #777; }
.rl-hp i { height: 100%; animation: rl-hp 3s infinite; }
@keyframes rl-hp { 0%, 43% { width: 100%; background: var(--green); } 44%, 47% { width: 18%; background: #ff3b30; } 48% { width: 0; } 66%, 100% { width: 100%; background: var(--green); } }

.rl-tankw { position: absolute; left: 4px; top: 48px; width: 160px; height: 70px; animation: rl-drive 3s infinite; will-change: transform; isolation: isolate; }
@keyframes rl-drive { 0% { transform: translateX(-210px); } 26% { transform: translateX(3px); } 29%, 34.4% { transform: translateX(0); } 36% { transform: translateX(-6px); } 42%, 72% { transform: translateX(0); } 100% { transform: translateX(-210px); } }
.rl-tk { position: absolute; inset: 0; opacity: 0; animation: rl-fac 12s linear infinite; animation-delay: calc(-12s + var(--i) * 3s); }
.rl-tank { position: relative; width: 160px; height: 70px; display: block; overflow: visible; filter: drop-shadow(0 2px 1.5px rgba(0,0,0,.55)); }
.rl-tank .hull { transform-box: fill-box; transform-origin: 50% 100%; animation: rl-rock 3s infinite; }
@keyframes rl-rock { 0% { transform: none; } 6% { transform: translateY(-.7px); } 12% { transform: none; } 18% { transform: translateY(-.7px); } 26% { transform: rotate(1.4deg); } 30%, 34.4% { transform: none; } 36% { transform: rotate(-2deg) translateX(-1px); } 44%, 72% { transform: none; } 80% { transform: translateY(-.7px); } 88% { transform: none; } 94% { transform: translateY(-.7px); } 100% { transform: none; } }
.rl-tank .barrel { animation: rl-recoil 3s infinite; }
@keyframes rl-recoil { 0%, 34.4% { transform: none; } 35.3% { transform: translateX(-7px); } 46%, 100% { transform: none; } }
.rl-tank .tread { animation: rl-tread 3s infinite; }
@keyframes rl-tread { 0% { stroke-dashoffset: 0; } 26% { stroke-dashoffset: -60; } 29%, 72% { stroke-dashoffset: -62; } 100% { stroke-dashoffset: -2; } }
.rl-tank .wh { transform-box: fill-box; transform-origin: center; animation: rl-wheel 3s infinite; }
@keyframes rl-wheel { 0% { transform: rotate(0); } 26% { transform: rotate(620deg); } 29%, 72% { transform: rotate(640deg); } 100% { transform: rotate(40deg); } }
.rl-tank .ant { transform-box: fill-box; transform-origin: 100% 100%; animation: rl-ant 3s infinite; }
@keyframes rl-ant { 0%, 22% { transform: rotate(-6deg); } 27% { transform: rotate(12deg); } 31% { transform: rotate(-5deg); } 34.4% { transform: none; } 37% { transform: rotate(-12deg); } 42% { transform: rotate(5deg); } 48%, 72% { transform: none; } 76%, 100% { transform: rotate(6deg); } }
.rl-tank.stealth { animation: rl-cloak 3s infinite; }
@keyframes rl-cloak { 0%, 16% { opacity: .18; filter: blur(.8px) hue-rotate(70deg) brightness(1.6); } 28%, 72% { opacity: 1; filter: drop-shadow(0 2px 1.5px rgba(0,0,0,.55)); } 88%, 100% { opacity: .18; filter: blur(.8px) hue-rotate(70deg) brightness(1.6); } }

.rl-tdust { position: absolute; left: -14px; top: 38px; width: 70px; height: 34px; animation: rl-dust-on 3s infinite; }
.rl-tdust i, .rl-fdust i { position: absolute; left: 26px; top: 8px; width: 34px; height: 24px; border-radius: 50%; background: radial-gradient(rgba(206,196,170,.95), rgba(160,150,126,.5) 45%, transparent 70%);
  animation: rl-puff .6s linear infinite; animation-delay: calc(var(--k) * -.2s); }
@keyframes rl-puff { 0% { opacity: .95; transform: translate(0, 2px) scale(.35); } 100% { opacity: 0; transform: translate(-34px, -12px) scale(2.1); } }
@keyframes rl-dust-on { 0%, 25% { opacity: 1; } 31%, 71% { opacity: 0; } 75%, 100% { opacity: 1; } }
.rl-fdust { position: absolute; left: 112px; top: 42px; width: 70px; height: 34px; opacity: 0; animation: rl-skid 3s infinite; }
.rl-fdust i { animation-name: rl-puff-front; }
@keyframes rl-puff-front { 0% { opacity: .95; transform: translate(0, 2px) scale(.4); } 100% { opacity: 0; transform: translate(30px, -12px) scale(2.2); } }
@keyframes rl-skid { 0%, 22% { opacity: 0; } 26%, 30% { opacity: 1; } 38%, 100% { opacity: 0; } }
.rl-exh { position: absolute; left: 8px; top: 26px; width: 16px; height: 16px; }
.rl-exh i { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(rgba(40,40,38,.85), transparent 70%); animation: rl-exh 1s linear infinite; animation-delay: calc(var(--k) * -.5s); }
@keyframes rl-exh { 0% { opacity: .8; transform: scale(.4); } 100% { opacity: 0; transform: translate(-16px, -18px) scale(2.2); } }

.rl-flash { position: absolute; left: 160px; top: 58px; width: 36px; height: 28px; opacity: 0; animation: rl-flash 3s infinite;
  background: radial-gradient(ellipse at 38% 50%, #fff 0 14%, #ffe066 30%, #ff8a1f 55%, transparent 72%);
  clip-path: polygon(0 50%, 25% 25%, 28% 0, 50% 25%, 75% 5%, 72% 35%, 100% 50%, 72% 65%, 75% 95%, 50% 75%, 28% 100%, 25% 75%); }
@keyframes rl-flash { 0%, 34.3% { opacity: 0; transform: scale(.3); } 34.8% { opacity: 1; transform: scale(1.3); } 36.5% { opacity: .8; transform: scale(1); } 38.5%, 100% { opacity: 0; transform: scale(.6); } }
.rl-msmoke { position: absolute; left: 152px; top: 52px; width: 44px; height: 36px; border-radius: 50%; background: radial-gradient(rgba(160,158,150,.75), transparent 68%); opacity: 0; animation: rl-msmoke 3s infinite; }
@keyframes rl-msmoke { 0%, 35% { opacity: 0; transform: scale(.4); } 38% { opacity: .9; transform: scale(1); } 62%, 100% { opacity: 0; transform: translate(8px, -20px) scale(2.1); } }
.rl-bdust { position: absolute; left: 110px; top: 96px; width: 110px; height: 30px; border-radius: 50%; background: radial-gradient(rgba(190,180,155,.75), transparent 68%); opacity: 0; animation: rl-bdust 3s infinite; }
@keyframes rl-bdust { 0%, 34.5% { opacity: 0; transform: scale(.3, .5); } 37% { opacity: .9; transform: scale(1); } 60%, 100% { opacity: 0; transform: translateY(-8px) scale(1.6, 1.3); } }
.rl-shell { position: absolute; left: 162px; top: 70px; width: 22px; height: 4px; border-radius: 2px; opacity: 0; animation: rl-shell 3s linear infinite;
  background: linear-gradient(270deg, #fff, #ffd34d 35%, rgba(255,140,30,0)); box-shadow: 0 0 8px #ffb02e; }
@keyframes rl-shell { 0%, 34.5% { opacity: 0; transform: translate(0, 0) rotate(-7deg); } 35% { opacity: 1; transform: translate(0, 0) rotate(-7deg); } 43% { opacity: 1; transform: translate(70px, -9px) rotate(-7deg); } 43.4%, 100% { opacity: 0; transform: translate(70px, -9px); } }
.rl-boom { position: absolute; left: 210px; top: -2px; width: 120px; height: 120px; border-radius: 50%; opacity: 0; animation: rl-boom 3s infinite;
  background: radial-gradient(circle, #fff 0 8%, #ffe27a 18%, #ff9a2a 34%, rgba(220,50,10,.75) 48%, rgba(80,20,10,0) 64%); }
.rl-boom::before { content: ""; position: absolute; inset: 22%; border-radius: 50%; border: 3px solid #ffd27a; animation: rl-ring 3s infinite; }
@keyframes rl-boom { 0%, 43% { opacity: 0; transform: scale(.15); } 44.5% { opacity: 1; transform: scale(.9); } 48% { opacity: .9; transform: scale(1.1); } 56%, 100% { opacity: 0; transform: scale(1.3); } }
@keyframes rl-ring { 0%, 44% { transform: scale(.4); opacity: 1; } 52%, 100% { transform: scale(1.8); opacity: 0; } }
.rl-sparks { position: absolute; left: 268px; top: 56px; width: 4px; height: 4px; border-radius: 50%; opacity: 0; animation: rl-sparks 3s infinite;
  box-shadow: 20px -14px #ffd34d, -18px -20px #ffb02e, 26px 10px #fff3b0, -24px 12px #ff8a1f, 6px -28px #ffd34d, -6px 26px #ffb02e, 30px -2px #ff8a1f, -30px -4px #fff3b0; }
@keyframes rl-sparks { 0%, 43.5% { opacity: 0; transform: scale(.2); } 45% { opacity: 1; transform: scale(1); } 53%, 100% { opacity: 0; transform: scale(2.3); } }
.rl-smoke { position: absolute; left: 230px; top: 18px; width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(rgba(60,58,52,.85), transparent 68%); opacity: 0; animation: rl-smoke 3s infinite; }
@keyframes rl-smoke { 0%, 45% { opacity: 0; transform: scale(.5); } 50% { opacity: .9; transform: scale(1); } 78%, 100% { opacity: 0; transform: translateY(-34px) scale(1.7); } }

.rl-lock { display: none; margin-top: 6px; color: #ff3b30; font-size: 16px; font-weight: 700; line-height: 1; letter-spacing: 1.6px; white-space: nowrap; text-shadow: 0 0 8px rgba(255, 59, 48, .6); }
.rl-fname { position: relative; display: inline-block; width: 80px; height: 1em; vertical-align: top; }
.rl-fname em { position: absolute; left: 0; top: 0; font-style: normal; color: var(--a); opacity: 0; text-shadow: 0 0 8px var(--a); animation: rl-fac 12s linear infinite; animation-delay: calc(-10.65s + var(--i) * 3s); }
@media (min-width: 841px) {
  .rl-lock { display: block; }
}
@media (min-width: 841px) and (max-width: 1220px) {
  .brand-mark.rl-mark { --rl-s: .62; }
}
@media (min-width: 1221px) and (max-width: 1440px) {
  .brand-mark.rl-mark { --rl-s: .5; }
  .rl-lock { font-size: 14px; }
}
@media (min-width: 1221px) and (max-width: 1300px) {
  .brand-mark.rl-mark { --rl-s: .4; }
  .app-heading { gap: 10px; }
  .main-nav { gap: 18px; }
}
@media (max-width: 840px) {
  .brand-mark.rl-mark { --rl-s: .5; }
}
/* Phones: just the emblem with its reticle and explosion. */
@media (max-width: 590px) {
  .brand-mark.rl-mark { --rl-s: .5; width: 54px; height: 54px; border-radius: 10px; }
  .rl-stage { transform: scale(var(--rl-s)) translate(-212px, -6px); }
  .rl-stage::before, .rl-ground, .rl-tankw, .rl-hp, .rl-bdust, .rl-msmoke, .rl-flash, .rl-shell { display: none !important; }
}
/* The logo animates even with prefers-reduced-motion (owner's choice). Settings can switch it to this still frame. */
html.fx-no-logo-anim .rl-mark *, html.fx-no-logo-anim .rl-lock * { animation: none !important; }
html.fx-no-logo-anim .rl-tankw { transform: none; }
html.fx-no-logo-anim .rl-hp i { width: 100%; background: var(--green); }
html.fx-no-logo-anim .rl-tk[style^="--i:0"], html.fx-no-logo-anim .rl-ly[style^="--i:0"], html.fx-no-logo-anim .rl-fname em[style^="--i:0"] { opacity: 1; }
html.fx-no-logo-anim .rl-bdust, html.fx-no-logo-anim .rl-exh, html.fx-no-logo-anim .rl-tdust, html.fx-no-logo-anim .rl-fdust, html.fx-no-logo-anim .rl-msmoke,
html.fx-no-logo-anim .rl-flash, html.fx-no-logo-anim .rl-shell, html.fx-no-logo-anim .rl-smoke, html.fx-no-logo-anim .rl-boom, html.fx-no-logo-anim .rl-sparks { display: none !important; }

.site-footer { flex-wrap: wrap; }
.footer-legal { flex: 1 1 100%; padding-bottom: 12px; color: var(--subtle); font-size: 10px; opacity: .8; }

.app-heading.battlefield-heading { width: 360px; max-width: 100%; min-width: 0; flex: 0 1 360px; flex-direction: column; align-items: flex-start; gap: 0; }
.brand-mark.battlefield-logo { position: relative; display: block; width: 100%; height: auto; aspect-ratio: 720 / 260; padding: 0; overflow: hidden; border: 1px solid #5c6659; border-radius: 6px; background: #273739; box-shadow: none; }
.battlefield-logo iframe { display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
.battlefield-logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.top-actions.header-download-actions { display: flex; order: 3; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 6px; margin-left: auto; width: auto; }
.header-download-actions .stream-menu { order: 0; margin-left: 0; }
.header-download-actions .app-promo-pills { flex-direction: column; gap: 4px; }
.header-download-actions .app-promo-reopen { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.header-download-actions .app-promo-reopen svg { width: 16px; height: 18px; }
.app-promo-wrap:not(:has(.android-app-banner:not([hidden]))) { display: none; }
@media (max-width: 840px) {
  .app-heading.battlefield-heading { width: 320px; flex: 0 1 320px; }
}
/* feat2: player name suggestions, achievements */
.suggest-list { position: fixed; z-index: 1000; min-width: 220px; max-height: 300px; overflow: auto; padding: 4px; border: 1px solid #3b4852; border-radius: 9px; background: #141c22; box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
.suggest-item { width: 100%; display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font-size: 14px; text-align: left; cursor: pointer; }
.suggest-item small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.suggest-item:hover, .suggest-item.active { background: rgba(255, 255, 255, .06); color: var(--accent); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.achv { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid #2c363e; border-radius: 9px; background: rgba(26, 34, 41, .6); opacity: .55; }
.achv.earned { opacity: 1; border-color: var(--accent); }
.achv-icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: #1c242b; color: var(--muted); font-size: 15px; }
.achv.earned .achv-icon { background: var(--accent); color: #0b1114; }
.achv strong { display: block; font-size: 13px; }
.achv small { display: block; color: var(--muted); font-size: 11px; }
.achv-bar { display: block; height: 3px; margin-top: 5px; border-radius: 2px; background: #2c363e; overflow: hidden; }
.achv-bar b { display: block; height: 100%; background: var(--accent); }

/* ---- Player profile page (player.html) ---- */
.profile-metrics { margin: 4px 0 14px; }
.profile-metrics small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; text-transform: none; }
.profile-grid { margin-bottom: 12px; }
.profile-grid .subpanel h2, .profile-history h2 { margin: 0; font-size: 18px; font-weight: 800; }
.profile-history .table-scroll { overflow-x: auto; }
.profile-result { display: inline-block; min-width: 42px; padding: 2px 7px; border: 1px solid var(--line, #39454d); border-radius: 4px; color: var(--muted); font-size: 11px; font-weight: 800; text-align: center; text-transform: uppercase; }
.profile-result.win { border-color: #2e6b45; background: rgba(76, 175, 80, .12); color: #7fe39a; }
.profile-result.loss { border-color: #64323b; background: rgba(211, 47, 47, .1); color: #ff8088; }
.profile-result.live { border-color: var(--accent); color: var(--accent); }
.profile-full-link { display: inline-flex; align-items: center; text-decoration: none; }
@media (max-width: 720px) { .profile-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .profile-grid { grid-template-columns: 1fr; } }

/* ---- Head-to-head page (compare.html) ---- */
.compare-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.compare-form .searchbox { flex: 1 1 220px; }
.compare-vs { color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: 1.5px; }
.compare-h2h { margin-bottom: 12px; }
.compare-h2h h2, .compare-sub { margin: 0; font-size: 18px; font-weight: 800; }
.compare-h2h .compare-sub { margin: 18px 0 8px; font-size: 15px; }
.compare-h2h .table-scroll { overflow-x: auto; }
.compare-rows { display: grid; gap: 8px; }
.compare-row { display: grid; grid-template-columns: 70px 1fr 70px; align-items: center; gap: 12px; font-size: 13px; }
.compare-row > strong { color: var(--text); font-size: 16px; text-align: center; }
.compare-row > span { color: var(--muted); text-align: center; }
.compare-bar { height: 6px; margin-top: 5px; border-radius: 3px; background: #ff5968; overflow: hidden; }
.compare-bar b { display: block; height: 100%; background: var(--accent); }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }

/* ---- Leaderboards page (leaderboard.html) ---- */
.board-toolbar { flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.board-toolbar .player-controls { flex-wrap: wrap; }
.board-toolbar select { max-width: 220px; }
.board-panel .table-scroll { overflow-x: auto; }
.board-table td.board-rank { color: var(--muted); font-weight: 800; }
.board-table td.board-metric { color: var(--accent); font-weight: 800; }
.board-table a.table-player { text-decoration: none; }
.board-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ---- Map pages (map.html) ---- */
.map-faction { padding: 4px 0 8px; }
.map-faction .detail-kv { border-bottom: 0; }
.map-faction-bar { background: #2a343b; }
.map-faction-bar.nod b { background: #ff5968; }
.map-faction-bar.gdi b { background: var(--gold, #f3cd55); }
.map-faction-bar.allies b { background: #65b3ff; }
.map-stats-link { display: inline-block; margin-top: 6px; }
.board-panel .subpanel-head h2 { margin: 0; font-size: 18px; font-weight: 800; }

/* ---- Site-wide search (header + search.html) ---- */
.site-search { position: relative; z-index: 45; }
.site-search-form { display: flex; align-items: center; gap: 7px; width: clamp(170px, 18vw, 240px); height: 38px; padding: 0 10px; border: 1px solid var(--line, #39454d); border-radius: 8px; background: rgba(15, 22, 27, .85); }
.site-search-form:focus-within { border-color: var(--accent); }
.site-search-form > span { color: #98a7ae; font-size: 18px; line-height: 1; }
.site-search-form input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.site-search-form input::-webkit-search-cancel-button { display: none; }
.site-search-form kbd { padding: 0 5px; border: 1px solid #46535c; border-radius: 4px; color: var(--muted); font: 11px/16px inherit; }
.site-search-form:focus-within kbd { display: none; }
.site-search-list { position: absolute; top: calc(100% + 6px); right: 0; width: min(340px, 90vw); max-height: 60vh; overflow: auto; padding: 6px; border: 1px solid var(--line, #39454d); border-radius: 10px; background: #141c22; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
.site-search-group { padding: 6px 8px 3px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.site-search-list a[role=option] { display: flex; justify-content: space-between; gap: 10px; padding: 7px 8px; border-radius: 6px; color: var(--text); font-size: 13px; text-decoration: none; }
.site-search-list a[role=option] small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.site-search-list a[aria-selected=true] { background: var(--accent-dim); color: var(--accent); }
.site-search-empty { margin: 6px 8px; color: var(--muted); font-size: 13px; }
.site-search-all { display: block; margin-top: 4px; padding: 7px 8px; border-top: 1px solid var(--line, #39454d); color: var(--accent); font-size: 12px; font-weight: 700; text-decoration: none; }
@media (max-width: 720px) { .site-search-form { width: 150px; } .site-search-form kbd { display: none; } }
@media (max-width: 840px) { .site-search-list { right: auto; left: 0; } }
@media (min-width: 841px) {
  /* compact magnifier in the header row; expands over the row while in use */
  .site-search { order: 3; margin-left: auto; width: 38px; height: 38px; }
  .site-search:not([hidden]) + .stream-menu { margin-left: 0; }
  .site-search-form { position: absolute; top: 0; right: 0; width: 38px; padding: 0 0 0 10px; cursor: text; transition: width .15s ease; }
  .site-search-form kbd { display: none; }
  .site-search-form:focus-within, .site-search.open .site-search-form { width: 260px; padding-right: 10px; background: #141c22; }
  .site-search-form:focus-within kbd { display: none; }
  .site-search:not(.open) .site-search-form:not(:focus-within) input { color: transparent; }
  .site-search:not(.open) .site-search-form:not(:focus-within) input::placeholder { color: transparent; }
}

/* ---- Charts over time (assets/charts.js) ---- */
.chart-grid-wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin: 12px 0; }
.chart-card h2 { margin: 0; font-size: 18px; font-weight: 800; }
.chart-box { width: 100%; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: rgba(117, 144, 158, .18); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-axis { fill: var(--muted); font-size: 12px; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.chart-dot { fill: var(--accent); }
.chart-dot:hover { r: 5; }
.chart-bar { fill: var(--accent); opacity: .8; }
.chart-bar:hover { opacity: 1; }
.chart-empty { margin: 50px 0; text-align: center; }

/* ---- Live server view (live1) ---- */
.live-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.live-status { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.live-grid { display: grid; gap: 14px; }
.live-card { padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel, rgba(12, 18, 22, .8)); }
.live-head { display: flex; justify-content: space-between; gap: 14px; }
.live-head h2 { margin: 2px 0 4px; font-size: 20px; overflow-wrap: anywhere; }
.live-head .eyebrow { margin: 0; }
.live-map { margin: 0; font-weight: 700; }
.live-map span { color: var(--muted); font-weight: 400; }
.live-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.live-meta strong { font-size: 22px; line-height: 1; }
.live-meta span { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.live-join { margin-top: 4px; white-space: nowrap; }
.live-clock { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0; color: var(--muted); font-size: 14px; }
.live-score { display: inline-flex; gap: 8px; color: var(--text, #e6edf0); }
.live-score b { color: var(--accent); }
.live-score i { color: var(--muted); font-style: normal; }
.live-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.live-team { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.live-team.leading { border-color: var(--accent); }
.live-team header { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; background: var(--accent-dim); }
.live-team header span { color: var(--muted); font-size: 13px; }
.live-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.live-table th, .live-table td { padding: 5px 10px; text-align: right; border-top: 1px solid var(--line); }
.live-table th:first-child, .live-table td:first-child { text-align: left; overflow-wrap: anywhere; }
.live-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.live-none { color: var(--muted); text-align: center !important; margin: 6px 0; }
@media (max-width: 560px) {
  .live-head { flex-direction: column; }
  .live-meta { flex-direction: row; align-items: center; text-align: left; }
  .live-table th:nth-child(4), .live-table td:nth-child(4) { display: none; }
}

/* ---- Match detail (round1) ---- */
.round-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 12px; margin-top: 12px; }
.round-team.winner { border-color: var(--accent); }
.round-team h2 .profile-result { margin-left: 6px; vertical-align: middle; }
.round-score { font-size: 18px !important; }
.round-chart { margin-top: 12px; max-width: 640px; }
.round-link { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
@media (max-width: 560px) { .round-teams { grid-template-columns: 1fr; } }

/* ---- Faction balance (balance1) ---- */
.bal-table td { vertical-align: middle; }
.bal-cell { min-width: 220px; }
.bal-bar { position: relative; height: 12px; margin: 2px 0 4px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bal-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); opacity: .75; }
.bal-fill.nod { background: #e53935; } .bal-fill.gdi { background: #e8b923; } .bal-fill.allies { background: #42a5f5; }
.bal-ci { position: absolute; top: 4px; height: 4px; background: rgba(255, 255, 255, .85); border-radius: 2px; }
.bal-mid { position: absolute; top: -2px; bottom: -2px; left: 50%; width: 2px; background: rgba(255, 255, 255, .55); }
.bal-cell small { font-size: 12px; }
.bal-flag { display: inline-block; padding: 2px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 12px; font-weight: 800; white-space: nowrap; }
.bal-flag.bad { border-color: #e53935; color: #ff8a80; }
.bal-flag.lean { border-color: #e8b923; color: #ffd54f; }
.bal-flag.ok { border-color: #43a047; color: #a5d6a7; }
.bal-mapnote { margin: 0 0 10px; }

/* ---- Server card extras (cardx1) ---- */
.cx-badges { margin: 6px 0 2px; flex-wrap: wrap; gap: 6px; }
.cx-badges .cx-badge { padding: 3px 7px; border: 1px solid #42444f; border-radius: 5px; background: #1d1f27; color: #d7dadc; font-size: 10.5px; letter-spacing: 0; }
.cx-badge.cx-peak { border-color: #6a5a26; color: #ffd54f; }
.cx-badge.cx-up { border-color: #2f5d36; color: #a5d6a7; }
.cx-badge.cx-up.low { border-color: #6a5a26; color: #ffbd32; }
.cx-badge.cx-busy { color: #b0bec5; }
.cx-badge.cx-friend { border-color: var(--accent); color: var(--accent); }
.cx-mapstats { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0 0; color: var(--muted); font-size: 11.5px; }
.cx-mapstats b, .cx-mapstats a { color: #e6edf0; }
.cx-mapstats a { text-decoration: none; }
.cx-mapstats i { font-style: normal; opacity: .7; }
.cx-mapstats > span:last-child { white-space: nowrap; }
.cx-last { margin: -4px 0 12px; color: var(--muted); font-size: 12px; }
.cx-last .data-label { display: inline; margin-right: 6px; }
.cx-last a { color: #e6edf0; font-weight: 800; text-decoration: none; }
.cx-last a:hover, .cx-mapstats a:hover { text-decoration: underline; }
.cx-dim { color: var(--muted); font-size: 11px; }
.cx-dim b { color: #e6edf0; }
.cx-busy-row { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; padding-top: 7px; border-top: 1px solid #3a3c47; color: var(--muted); font-size: 11px; }
.cx-busy-row b { color: #e6edf0; }
.cx-spark { margin: 10px 0 0; padding: 8px 11px 6px; border: 1px solid #42444f; border-radius: 9px; background: #1d1f27; }
.cx-spark svg { display: block; width: 100%; height: 36px; margin: 4px 0 2px; }
.cx-area { fill: var(--accent-dim); }
.cx-line { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.cx-dot { fill: var(--accent); }
.cx-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cx-axis span { color: var(--muted); font-size: 9.5px; }
.cx-lead { margin: 10px 0 8px; }
.cx-vs { color: var(--muted); font-size: 12px; font-weight: 700; }
.cx-vs b { font-size: 14px; }
.cx-warn { padding: 1px 6px; border: 1px solid #6a5a26; border-radius: 4px; color: #ffbd32; font-size: 10.5px; font-weight: 800; }
.cx-leadbar { display: flex; height: 7px; margin: 5px 0 4px; border-radius: 4px; overflow: hidden; background: #2a2c36; }
.cx-leadbar i { display: block; height: 100%; }
.cx-leadbar i:last-child { flex: 1; }
.compact-grid .cx-spark, .compact-grid .cx-busy-row, .compact-grid .cx-mapstats, .compact-grid .cx-last { display: none; }
.compact-grid .cx-lead { margin: 6px 0; }
@media (max-width: 560px) { .cx-mapstats { flex-direction: column; gap: 2px; } }

/* Feature 15: merged player box (Server card extras > "Merged player box"). */
.pm-box { container-type: inline-size; padding: 9px 10px 8px; }
.pm-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.pm-box.pm-one .pm-cols { grid-template-columns: minmax(0, 1fr); }
.pm-stats { min-width: 0; }
.pm-stats .cx-busy-row { margin-top: 6px; padding-top: 6px; gap: 2px 9px; font-size: 10.5px; }
.pm-spark { min-width: 0; padding-left: 10px; border-left: 1px solid #3a3c47; }
.pm-spark .cx-spark { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.pm-spark .cx-spark svg { height: 34px; }
.pm-box .cx-lead { margin: 8px 0 0; padding-top: 7px; border-top: 1px solid #3a3c47; }
.pm-teams .team-grid { margin-top: 7px; gap: 5px; }
.pm-teams .team-mini { padding: 4px 7px; }
.pm-teams .team-unavailable { margin-top: 7px; }
.compact-grid .pm-box { padding: 6px 7px; }
.compact-grid .pm-cols { grid-template-columns: minmax(0, 1fr); }
.compact-grid .pm-spark { display: none; }
.compact-grid .pm-box .cx-lead { margin-top: 5px; padding-top: 5px; }
.compact-grid .pm-teams .team-mini { padding: 3px 5px; }
@container (max-width: 300px) {
  .pm-cols { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .pm-spark { padding: 7px 0 0; border-left: 0; border-top: 1px solid #3a3c47; }
}
@media (max-width: 600px) {
  .pm-cols { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .pm-spark { padding: 7px 0 0; border-left: 0; border-top: 1px solid #3a3c47; }
}

/* fix16: dialog header (title + X) stays pinned while the dialog scrolls; solid background, shrinks once scrolled. */
.detail-dialog { --dlg-pad: 22px; overscroll-behavior: contain; }
.detail-dialog > .dialog-top { position: sticky; top: calc(-1 * var(--dlg-pad)); z-index: 30; margin: calc(-1 * var(--dlg-pad)) calc(-1 * var(--dlg-pad)) 13px; padding: var(--dlg-pad) var(--dlg-pad) 10px; background: var(--bg-raised, #11181e); border-bottom: 1px solid transparent; transition: padding .15s ease, border-color .15s ease, box-shadow .15s ease; }
.detail-dialog > .dialog-top h2 { transition: font-size .15s ease; }
.detail-dialog > .dialog-top.is-stuck { padding-top: calc(var(--dlg-pad) * .55); padding-bottom: 8px; border-bottom-color: var(--line, #2a3440); box-shadow: 0 8px 14px -10px rgba(0, 0, 0, .7); }
.detail-dialog > .dialog-top.is-stuck h2 { font-size: 20px; }
.detail-dialog > .dialog-top.is-stuck .eyebrow { margin-bottom: 1px; }
@media (max-width: 760px) {
  .detail-dialog { --dlg-pad: 16px; }
  .detail-dialog > .dialog-top { gap: 12px; }
  .detail-dialog > .dialog-top h2 { font-size: 22px; overflow-wrap: anywhere; }
  .detail-dialog > .dialog-top.is-stuck h2 { font-size: 16px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .detail-dialog > .dialog-top.is-stuck .eyebrow { display: none; }
  .detail-dialog > .dialog-top > div { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { .detail-dialog > .dialog-top, .detail-dialog > .dialog-top h2 { transition: none; } }

/* ---- F17 installable app: install banner, header button, standalone tab bar ---- */
.nav-install { border: 1px solid var(--accent); background: var(--accent-dim); color: var(--accent); cursor: pointer; font: inherit; }
.nav-install[hidden] { display: none; }
.pwa-install { position: fixed; z-index: 40; left: 10px; right: 10px; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; max-width: 520px; margin: 0 auto; padding: 12px 14px; border: 1px solid var(--accent); border-radius: 14px; background: var(--surface); box-shadow: 0 -6px 30px rgba(0, 0, 0, .6), 0 0 18px var(--accent-glow); }
.pwa-install[hidden] { display: none; }
.pwa-install img { width: 48px; height: 48px; border-radius: 11px; flex: none; }
.pwa-install-text { flex: 1 1 200px; min-width: 0; }
.pwa-install-text strong { display: block; color: var(--text); font-size: 17px; }
.pwa-install-text p { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.3; }
.pwa-install-actions { display: flex; gap: 8px; margin-left: auto; }
.pwa-install-go { padding: 8px 14px; border: 0; border-radius: 8px; background: var(--accent); color: #0b0d07; font: inherit; font-weight: 800; letter-spacing: .4px; cursor: pointer; }
.pwa-install-go:focus-visible, .pwa-install .outline-button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
@media (max-width: 840px) { .pwa-install { bottom: calc(72px + env(safe-area-inset-bottom)); } }
.app-tabbar { display: none; }
@media (display-mode: standalone), (display-mode: fullscreen) {
  .app-tabbar { display: flex; }
}
html.is-standalone .app-tabbar { display: flex; }
.app-tabbar { position: fixed; z-index: 32; inset: auto 0 0; justify-content: space-around; height: calc(62px + env(safe-area-inset-bottom)); padding: 4px 5px env(safe-area-inset-bottom); border-top: 1px solid #35424b; background: rgba(13, 19, 24, .97); backdrop-filter: blur(16px); }
.app-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; font-weight: 700; text-decoration: none; max-width: 120px; }
.app-tabbar a span { font-size: 20px; line-height: 1.1; }
.app-tabbar a.active { color: var(--accent); }
html.is-standalone .mobile-nav, html.is-standalone .main-nav { display: none !important; }
html.is-standalone body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
@media (display-mode: standalone), (display-mode: fullscreen) {
  .mobile-nav, .main-nav { display: none !important; }
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
/* F17b: "Install" item in the phone bottom menu (pwa.js adds it; same look as the other items) */
.mobile-install { display: none; }
@media (max-width: 840px) {
  .mobile-nav .mobile-install { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
  .mobile-nav .mobile-install span { font-size: 20px; line-height: 1.1; }
  .mobile-nav .mobile-install[hidden] { display: none; }
}
/* F17c: "Show me how" guide — arrow toward the browser menu / Share button with the short steps */
.pwa-guide { position: fixed; z-index: 70; inset: 0; background: rgba(0, 0, 0, .62); }
.pwa-guide[hidden] { display: none; }
.pwa-guide-card { position: absolute; left: 12px; right: 12px; max-width: 420px; margin: 0 auto; padding: 14px 16px; border: 1px solid var(--accent); border-radius: 14px; background: var(--surface); box-shadow: 0 0 22px var(--accent-glow); color: var(--text); }
.pwa-guide-card strong { display: block; font-size: 18px; }
.pwa-guide-card ol { margin: 8px 0 12px; padding-left: 22px; color: var(--muted); font-size: 15px; line-height: 1.4; }
.pwa-guide-card li + li { margin-top: 4px; }
.pwa-guide-card li::marker { color: var(--accent); font-weight: 800; }
.pwa-guide-arrow { position: absolute; width: 0; height: 0; border-left: 18px solid transparent; border-right: 18px solid transparent; filter: drop-shadow(0 0 8px var(--accent)); }
.pwa-guide-arrow::after { content: ""; position: absolute; left: -5px; width: 10px; height: 46px; background: var(--accent); border-radius: 3px; }
.pwa-guide[data-pos^="top"] .pwa-guide-arrow { top: 10px; border-bottom: 26px solid var(--accent); animation: pwa-nudge-up 1.1s ease-in-out infinite; }
.pwa-guide[data-pos^="top"] .pwa-guide-arrow::after { top: 24px; }
.pwa-guide[data-pos^="top"] .pwa-guide-card { top: 100px; }
.pwa-guide[data-pos^="bottom"] .pwa-guide-arrow { bottom: calc(10px + env(safe-area-inset-bottom)); border-top: 26px solid var(--accent); animation: pwa-nudge-down 1.1s ease-in-out infinite; }
.pwa-guide[data-pos^="bottom"] .pwa-guide-arrow::after { bottom: 24px; }
.pwa-guide[data-pos^="bottom"] .pwa-guide-card { bottom: calc(100px + env(safe-area-inset-bottom)); }
.pwa-guide[data-pos$="right"] .pwa-guide-arrow { right: 10px; }
.pwa-guide[data-pos$="center"] .pwa-guide-arrow { left: calc(50% - 18px); }
@keyframes pwa-nudge-up { 50% { transform: translateY(-8px); } }
@keyframes pwa-nudge-down { 50% { transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .pwa-guide-arrow { animation: none !important; } }
/* fix10: faction emblems next to team/faction labels (assets/faction-emblems.js) */
.fx-lab{white-space:nowrap;display:inline-flex;align-items:center;gap:.25em;vertical-align:baseline;max-width:100%}
.fx-em{width:1.2em;height:1.2em;object-fit:contain;flex:none;display:inline-block;vertical-align:-.22em}
.fx-em-lg{width:24px;height:24px}
/* fix10: CMS pages in the site menu */
.nav-more { position: relative; }
.nav-more > summary { list-style: none; cursor: pointer; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after { content: " ▾"; font-size: .8em; }
.nav-more-list { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 200px; max-width: min(320px, 90vw); padding: 6px; border: 1px solid #35424b; border-radius: 10px; background: rgba(13, 19, 24, .98); box-shadow: 0 12px 30px #0008; }
.nav-more-link { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--text, #e8eef2); text-decoration: none; font-weight: 700; overflow-wrap: anywhere; }
.nav-more-link:hover, .nav-more-link:focus-visible, .nav-more-link.active { background: rgba(255, 255, 255, .07); color: var(--accent); }
.pages-sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; background: rgba(0, 0, 0, .55); }
.pages-sheet[hidden] { display: none; }
.pages-sheet-in { width: 100%; max-height: 75vh; overflow: auto; padding: 10px 12px calc(76px + env(safe-area-inset-bottom)); border-top: 1px solid #35424b; border-radius: 16px 16px 0 0; background: #0d1318; }
.pages-sheet-head { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.pages-sheet-close { min-width: 44px; min-height: 44px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .06); color: inherit; font-size: 18px; }
.pages-sheet-link { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-bottom: 1px solid #222e36; color: var(--text, #e8eef2); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.pages-sheet-link.active { color: var(--accent); }
