:root {
  --bg: #0b0e16;
  --bg-grid: rgba(66, 92, 138, 0.14);
  --panel: #121725;
  --panel-2: #182034;
  --chrome: #1e2842;
  --border: #334366;
  --border-hi: #556b99;
  --shadow: #04060a;
  --text: #eaf1ff;
  --muted: #8f9fbe;
  --amber: #ffb000;
  --holy: #00e5ff;
  --nature: #39ff7a;
  --dps: #ff477e;
  --win: #39ff7a;
  --loss: #ff4f64;
  --warn: #ff9f43;
  --font-sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
  --font-pixel: "Silkscreen", "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }

html,
body,
.modal-body {
  scrollbar-width: thin;
  scrollbar-color: var(--amber) var(--panel);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
  background: repeating-linear-gradient(
    180deg,
    #070a11 0 3px,
    var(--panel) 3px 6px
  );
  border-left: 2px solid var(--border-hi);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
  background-image: repeating-linear-gradient(
    180deg,
    rgba(7, 10, 17, 0.42) 0 2px,
    transparent 2px 5px
  );
  background-color: var(--amber);
  border: 2px solid #05070c;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.16),
    0 0 8px rgba(255, 176, 0, 0.3);
  border-radius: 0;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
  background-image: repeating-linear-gradient(
    180deg,
    rgba(7, 10, 17, 0.3) 0 2px,
    transparent 2px 5px
  );
  background-color: #ffd166;
}

html::-webkit-scrollbar-thumb:active,
body::-webkit-scrollbar-thumb:active,
.modal-body::-webkit-scrollbar-thumb:active {
  background: #fff2b0;
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
.modal-body::-webkit-scrollbar-corner {
  background: var(--panel);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--text);
  line-height: 1.45;
}

html.crt-on body::before {
  content: "";
  position: fixed;
  inset: -25% 0;
  pointer-events: none;
  z-index: 998;
  background: linear-gradient(
    to bottom,
    transparent 46%,
    rgba(0, 229, 255, 0.035) 49%,
    rgba(255, 255, 255, 0.055) 50%,
    transparent 54%
  );
  animation: crt-sweep 7s linear infinite;
}

html.crt-on body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0px,
    rgba(255, 255, 255, 0) 2px,
    rgba(0, 0, 0, 0.14) 3px,
    rgba(0, 0, 0, 0.14) 4px
  );
  animation: crt-scan 9s linear infinite, crt-flicker 4s steps(1) infinite;
}

@keyframes crt-scan {
  from { background-position: 0 0; }
  to { background-position: 0 120px; }
}
@keyframes crt-sweep {
  from { transform: translateY(-55%); }
  to { transform: translateY(55%); }
}
@keyframes crt-flicker {
  0%, 96%, 100% { opacity: 1; }
  96.5% { opacity: 0.82; }
  97.5% { opacity: 0.96; }
}

code {
  font-family: var(--font-mono);
  background: #0b0f1a;
  border: 1px solid #2b3856;
  padding: 1px 5px;
  font-size: 0.84em;
  color: var(--amber);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 14, 22, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--border-hi);
  box-shadow: 0 4px 0 var(--shadow);
}

.win-chrome-bar {
  background: linear-gradient(90deg, #1b2440 0%, #263459 55%, #192138 100%);
  border-bottom: 2px solid var(--border);
  padding: 4px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #c8d6f0;
}
.win-chrome-left, .win-chrome-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.led-dot {
  width: 8px;
  height: 8px;
  background: var(--nature);
  box-shadow: 0 0 8px var(--nature);
  display: inline-block;
  animation: blinkLed 1.8s steps(2, start) infinite;
}
@keyframes blinkLed {
  0%, 70% { opacity: 1; }
  71%, 100% { opacity: 0.35; }
}
.chrome-sep { color: #5b6e94; }
.chrome-author {
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.tiny-chrome-btn {
  background: #111728;
  border: 1px solid var(--border-hi);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  cursor: pointer;
}

.topbar-inner, .subbar, .container {
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 18px;
  padding-right: 18px;
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  font-family: var(--font-pixel);
  font-size: 0.92rem;
  padding: 8px 10px;
  background: var(--amber);
  color: #0b0e16;
  border: 2px solid #fff2cc;
  box-shadow: 3px 3px 0 #000;
  letter-spacing: -0.02em;
}
.brand h1 {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
}
.subtitle {
  margin: 2px 0 0 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pill-group {
  display: inline-flex;
  background: #0d111d;
  border: 2px solid var(--border);
  box-shadow: 3px 3px 0 var(--shadow);
  padding: 2px;
  gap: 2px;
}

.pill {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 5px 10px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  transition: transform 0.06s ease;
}
.pill:hover { color: #fff; background: #1a2338; }
.pill.active {
  background: var(--chrome);
  color: var(--amber);
  border-color: var(--border-hi);
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.12);
}

.search-box, .checker-form {
  display: flex;
  gap: 6px;
  align-items: center;
}

input[type="text"], select {
  background: #0b0f19;
  border: 2px solid var(--border);
  box-shadow: inset 2px 2px 0 #05070c;
  color: var(--text);
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
input[type="text"]:focus, select:focus {
  outline: none;
  border-color: var(--amber);
}

.btn-accent {
  border: 2px solid #ffe49c;
  background: var(--amber);
  color: #0b0e16;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.78rem;
  box-shadow: 3px 3px 0 #000;
}
.btn-accent:hover { filter: brightness(1.07); }
.btn-accent:active, .btn-ghost:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000;
}

.btn-ghost {
  border: 2px solid var(--border-hi);
  background: var(--panel-2);
  color: var(--text);
  padding: 6px 11px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--shadow);
}
.btn-ghost:hover { background: var(--chrome); color: #fff; }
.btn-ghost:disabled { opacity: 0.6; cursor: wait; }

.subbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #222c44;
  padding-top: 6px;
  padding-bottom: 6px;
  gap: 10px;
}

.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab {
  display: inline-block;
  border: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 12px;
  text-decoration: none;
  cursor: pointer;
}
.tab:hover { color: #fff; }
.tab.active {
  background: var(--panel-2);
  border-color: var(--border-hi);
  color: var(--amber);
  box-shadow: 2px 2px 0 var(--shadow);
}

.telemetry {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--holy);
}

.ticker-wrap {
  display: flex;
  align-items: center;
  background: #080b12;
  border-top: 1px solid #202a42;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  overflow: hidden;
}
.ticker-tag {
  background: var(--dps);
  color: #fff;
  font-weight: 700;
  padding: 4px 10px;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.ticker-track {
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  padding: 4px 12px;
}
.ticker-content {
  display: inline-block;
  color: #cbd8f5;
  animation: marquee 36s linear infinite;
}
.ticker-wrap:hover .ticker-content { animation-play-state: paused; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.container { flex: 1 0 auto; padding-top: 16px; padding-bottom: 52px; }

.seo-lede {
  margin: 0 0 14px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
}
.seo-lede h2 {
  margin: 0 0 3px;
  font-family: var(--font-pixel);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--amber);
}
.seo-lede p {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.site-footer {
  flex: 0 0 auto;
  width: 100%;
  max-width: 1440px;
  margin: auto auto 0;
  padding: 18px 20px 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
.site-footer-copy strong { color: var(--text); font-family: var(--font-mono); font-size: 0.8rem; }
.site-footer-copy p { max-width: 900px; margin: 6px 0 0; font-size: 0.78rem; line-height: 1.5; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.footer-links a { color: var(--amber); font-family: var(--font-mono); font-size: 0.74rem; text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.site-footer a { color: var(--amber); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

.footer-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; }
.footer-contact-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.copy-user {
  padding: 0;
  border: 0;
  background: none;
  color: var(--amber);
  font: inherit;
  cursor: pointer;
}
.copy-user:hover { color: var(--text); text-decoration: underline; }
.footer-bmc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1;
  text-decoration: none !important;
}
.footer-bmc svg { width: 14px; height: 14px; fill: #ffdd00; }
.footer-bmc:hover { border-color: var(--amber); color: var(--text); }

.legal-page .lb-info { max-width: 900px; }
.legal-page h1 {
  margin: 0 0 14px;
  font-family: var(--font-pixel);
  font-size: 1.5rem;
  color: var(--amber);
}
.legal-page p { margin: 0 0 12px; line-height: 1.65; }
.legal-page h2 { margin: 22px 0 8px; font-family: var(--font-pixel); font-size: 0.95rem; color: var(--amber); }
.credit-callout {
  margin: 16px 0;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--amber);
  border-left: 4px solid var(--amber);
}
.credit-callout strong { color: var(--amber); font-family: var(--font-mono); font-size: 0.82rem; }
.credit-callout p { margin: 8px 0 0; }
.credit-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.credit-links a { color: var(--amber); font-family: var(--font-mono); font-size: 0.76rem; }
.credit-links a:hover { text-decoration: underline; }
.credit-list { margin: 0 0 14px; padding-left: 20px; line-height: 1.7; }
.credit-list li { margin-bottom: 6px; }
.profit-note a { color: var(--amber); text-decoration: underline; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.fights-grid { display: flex; flex-direction: column; gap: 16px; }

.match-card {
  background: var(--panel);
  border: 2px solid var(--border-hi);
  box-shadow: 5px 5px 0 var(--shadow);
  height: 326px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fight-clickable { cursor: pointer; }
.fight-clickable:hover { border-color: var(--amber); box-shadow: 5px 5px 0 rgba(255, 176, 0, 0.28); }
.fight-clickable:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.fight-detail-hint {
  padding-left: 8px;
  color: var(--amber);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}

.fight-detail { display: grid; gap: 12px; }
.detail-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.74rem;
}
.detail-team {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 10px;
  min-width: 0;
}
.detail-team-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
}
.detail-player { padding-top: 10px; }
.detail-player + .detail-player {
  border-top: 1px dashed var(--border);
  margin-top: 10px;
}
.detail-player-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.detail-player-stats {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
.detail-player .gear-strip {
  height: auto;
  flex-basis: auto;
  flex-wrap: wrap;
  margin-top: 6px;
}

.match-head {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  height: 34px;
  flex: 0 0 34px;
  padding: 0 12px;
  background: linear-gradient(90deg, #1b243c, #161d30);
  border-bottom: 2px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
}

.match-tags { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
.match-id, .match-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-meta { flex-shrink: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid;
}
.badge-2v2 { background: rgba(0, 229, 255, 0.14); color: var(--holy); border-color: rgba(0, 229, 255, 0.55); }
.badge-5v5 { background: rgba(255, 71, 126, 0.14); color: #ff85a9; border-color: rgba(255, 71, 126, 0.55); }
.badge-srv { background: #1e2840; color: #dbe6ff; border-color: #425582; }
.badge-holy { background: rgba(0, 229, 255, 0.14); color: var(--holy); border-color: rgba(0, 229, 255, 0.55); }
.badge-nature { background: rgba(57, 255, 122, 0.14); color: var(--nature); border-color: rgba(57, 255, 122, 0.55); }
.badge-dps { background: rgba(255, 71, 126, 0.14); color: #ff85a9; border-color: rgba(255, 71, 126, 0.55); }
.badge-verified { background: rgba(57, 255, 122, 0.16); color: var(--nature); border-color: rgba(57, 255, 122, 0.6); }
.badge-flex { background: rgba(255, 176, 0, 0.16); color: var(--amber); border-color: rgba(255, 176, 0, 0.6); }
.badge-offrole { background: rgba(255, 159, 67, 0.22); color: #ffc078; border-color: rgba(255, 159, 67, 0.75); }
.supporter-badge { background: rgba(255, 221, 0, 0.1); color: #ffdd66; border-color: rgba(255, 221, 0, 0.45); }

.match-teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border);
  flex: 1 1 auto;
  min-height: 0;
}
@media (max-width: 980px) {
  .match-teams { grid-template-columns: 1fr; }
}

.team-side {
  background: var(--panel);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.team-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 16px;
  flex: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
}
.team-win { color: var(--win); }
.team-loss { color: var(--loss); }

.player-row {
  background: var(--panel-2);
  border: 1px solid #2e3d5e;
  padding: 6px 8px;
  height: 116px;
  flex: 0 0 116px;
  overflow: hidden;
}

.player-top {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  height: 26px;
  flex: 0 0 26px;
  overflow: hidden;
}
.player-identity {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.player-guild {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-row .mini-20-strip { display: none; }


.player-name-btn {
  background: none;
  border: 0;
  padding: 0;
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  text-align: left;
  max-width: 118px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
}
.player-name-btn:hover { color: var(--amber); text-decoration: underline; }

.player-stats {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
}
.heal-stat { color: var(--nature); }


.mini-20-strip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  background: #0b0f19;
  border: 1px solid #2b3856;
}
.mini-pip {
  width: 6px;
  height: 10px;
  display: inline-block;
}
.pip-H { background: var(--holy); }
.pip-N { background: var(--nature); }
.pip-D { background: var(--dps); }

.gear-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  height: 50px;
  flex: 0 0 50px;
  margin-top: 6px;
  overflow: hidden;
}

.player-gear-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  height: 14px;
  line-height: 14px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  white-space: nowrap;
  overflow: hidden;
}
.gear-value {
  color: var(--amber);
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.item-chip {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  background: #090d16;
  border: 1px solid #344468;
  display: grid;
  place-items: center;
}
.item-chip img { width: 44px; height: 44px; object-fit: contain; }
.item-tier {
  position: absolute;
  bottom: 0;
  right: 0;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  background: #090d16;
  color: var(--amber);
  padding: 0 3px;
  border-top: 1px solid #344468;
  border-left: 1px solid #344468;
}

.kill-log {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: center;
  height: 24px;
  flex: 0 0 24px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #b9c8e6;
}
.kill-log-entry { overflow: hidden; text-overflow: ellipsis; }
.kill-log-entry strong { color: var(--win); font-weight: 700; }

.weapon-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #0c111d;
  border: 1px solid #304064;
  padding: 2px 6px 2px 3px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #d6e2fa;
}
.weapon-summary-pill img { width: 22px; height: 22px; }
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.page-info { letter-spacing: 0.04em; }

@media (max-width: 980px) {
  .match-card { height: auto; }
  .player-row { height: auto; flex-basis: auto; }
  .player-top { height: auto; flex-basis: auto; flex-wrap: wrap; }
  .gear-strip { height: auto; flex-basis: auto; flex-wrap: wrap; }
  .kill-log { height: auto; flex-basis: auto; flex-wrap: wrap; white-space: normal; }
}

.split-categories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 980px) {
  .split-categories { grid-template-columns: 1fr; }
}

.win-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  background: var(--chrome);
  border-bottom: 2px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #d7e2f8;
}
.win-glyphs { letter-spacing: 2px; color: var(--amber); }

.category-col, .checker-hero {
  background: var(--panel);
  border: 2px solid var(--border-hi);
  box-shadow: 5px 5px 0 var(--shadow);
}
.healer-col .win-strip { border-bottom-color: var(--nature); }
.dps-col .win-strip { border-bottom-color: var(--dps); }

.category-body, .checker-inner { padding: 14px; }

.category-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.category-header h2, .checker-inner h2 {
  margin: 0 0 3px 0;
  font-family: var(--font-pixel);
  font-size: 0.94rem;
}
.muted { color: var(--muted); font-size: 0.8rem; margin: 0; }
.section-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: var(--amber);
  margin: 14px 0 8px 0;
}

.comps-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.comp-card {
  background: var(--panel);
  border: 2px solid var(--border);
  box-shadow: 3px 3px 0 var(--shadow);
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.meta-list { display: flex; flex-direction: column; gap: 7px; }
.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid #2e3d5e;
  padding: 7px 10px;
  font-size: 0.82rem;
}
.meta-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.meta-left img { width: 40px; height: 40px; background: #090d16; border: 1px solid #304064; }
.meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.checker-hero { margin-bottom: 16px; }
.checker-form { margin-top: 12px; flex-wrap: wrap; }
.checker-form input { min-width: 260px; flex: 1; max-width: 420px; }

.verdict-card {
  background: var(--panel);
  border: 2px solid var(--border-hi);
  box-shadow: 5px 5px 0 var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.verdict-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.role-bar {
  height: 14px;
  background: #0b0f19;
  border: 2px solid var(--border);
  overflow: hidden;
  display: flex;
  margin: 12px 0;
}
.bar-holy { background: var(--holy); }
.bar-nature { background: var(--nature); }
.bar-dps { background: var(--dps); }

.builds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.build-tile {
  background: var(--panel-2);
  border: 2px solid #2e3d5e;
  box-shadow: 3px 3px 0 var(--shadow);
  padding: 10px;
  height: 120px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.build-tile-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  height: 22px;
  flex: 0 0 22px;
  min-width: 0;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
}
.tile-badges {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
}
.build-tile-head > .muted {
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}
.build-tile .gear-strip { margin-top: 1px; }

.modal {
  width: min(1000px, 94vw);
  max-height: 88vh;
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--border-hi);
  box-shadow: 8px 8px 0 #000;
  padding: 0;
}
.modal::backdrop { background: rgba(4, 6, 12, 0.8); }
.modal-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--chrome);
  border-bottom: 2px solid var(--border-hi);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.modal-head h3 {
  margin: 0 0 2px 0;
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--amber);
}
.modal-body { padding: 16px; overflow-y: auto; }

.empty-state {
  background: var(--panel);
  border: 2px dashed var(--border);
  padding: 28px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--muted);
}


/* Leaderboard tab */

.lb-header {
  margin-bottom: 18px;
}
.lb-header .win-strip {
  margin-bottom: 0;
}
.lb-info {
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: none;
  padding: 16px 20px;
}
.lb-info h2 {
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  color: var(--amber);
  margin: 0 0 4px;
  letter-spacing: 1px;
}
.lb-stats-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  margin-top: 8px;
}
.lb-role-select {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.lb-triple {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
}

.lb-col {
  background: var(--panel);
  border: 2px solid var(--border);
  overflow: visible;
}
.lb-col-all   { border-top: 3px solid var(--amber); }
.lb-col-holy  { border-top: 3px solid var(--holy); }
.lb-col-nature { border-top: 3px solid var(--nature); }
.lb-col-dps   { border-top: 3px solid var(--dps); }

.lb-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-pixel);
  font-size: 0.82rem;
  letter-spacing: 0.5px;
}
.lb-col-title { color: var(--muted); }

.lb-table-wrap {
  overflow: visible;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  table-layout: fixed;
}
.lb-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}
.lb-table th {
  background: var(--chrome);
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid var(--border-hi);
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.lb-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

.lb-row:hover {
  background: rgba(66, 92, 138, 0.18);
}

.lb-rank {
  width: 52px;
  text-align: center;
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rank-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 24px;
  border: 1px solid var(--border-hi);
  background: var(--panel-2);
  box-shadow: 2px 2px 0 var(--shadow);
  font-family: var(--font-pixel);
  font-size: 0.68rem;
  line-height: 1;
}
.rank-1 { color: #ffd700; border-color: rgba(255, 215, 0, 0.75); background: rgba(255, 215, 0, 0.12); }
.rank-2 { color: #d7e0ee; border-color: rgba(215, 224, 238, 0.7); background: rgba(215, 224, 238, 0.1); }
.rank-3 { color: #cd7f32; border-color: rgba(205, 127, 50, 0.75); background: rgba(205, 127, 50, 0.12); }

.lb-table th.lb-player, .lb-table td.lb-player { width: 30%; }
.lb-player-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.lb-player-inner > div { min-width: 0; }
.lb-player .player-name-btn {
  display: inline-block;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.lb-wep-icon {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  border: 1px solid var(--border);
  background: var(--panel-2);
  flex-shrink: 0;
}
.lb-guild {
  font-size: 0.72rem;
  display: block;
  margin-top: 1px;
}

.lb-table th.lb-weapon, .lb-table td.lb-weapon { width: 17%; }
.lb-weapon {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.74rem;
}
.lb-table th.lb-points, .lb-table td.lb-points { width: 90px; text-align: right; }
.lb-points {
  color: var(--amber);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.lb-table th.lb-wl, .lb-table td.lb-wl { width: 100px; }
.lb-wl { font-size: 0.8rem; }
.lb-table th.lb-wr, .lb-table td.lb-wr { width: 80px; text-align: right; }
.lb-table th.lb-ip, .lb-table td.lb-ip { width: 90px; text-align: right; }
.lb-wr {
  font-weight: 700;
  font-size: 0.84rem;
}
.lb-ip {
  color: var(--amber);
  font-weight: 600;
}

.lb-unqualified {
  opacity: 0.55;
}
.lb-unqualified:hover {
  opacity: 0.85;
}

/* Weapon winrate table (tab 03) */
.wr-table th.wr-weapon, .wr-table td.wr-weapon { width: 34%; }
.wr-weapon-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.wr-weapon-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.wr-table .lb-wep-icon { width: 36px; height: 36px; }
.wr-table th.wr-role, .wr-table td.wr-role { width: 110px; }
.wr-table th.wr-games, .wr-table td.wr-games { width: 90px; text-align: right; }
.wr-table td { height: 44px; }
.wr-role .badge { white-space: nowrap; }
.wr-build-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wr-build-icons {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.wr-build-icons img {
  width: 30px;
  height: 30px;
  image-rendering: pixelated;
  border: 1px solid var(--border);
  background: var(--panel-2);
}
@media (max-width: 900px) {
  .wr-table th.wr-role, .wr-table td.wr-role { display: none; }
}

/* Live player tracker (tab 04) */
.live-table th.live-player, .live-table td.live-player { width: 20%; }
.live-table th.live-build, .live-table td.live-build { width: 32%; }
.live-table th.gear-est, .live-table td.gear-est { width: 120px; text-align: right; }
.live-table .wr-build-icons { gap: 4px; }
.live-table .wr-build-icons img { width: 36px; height: 36px; }
.live-table th.live-seen, .live-table td.live-seen { width: 110px; text-align: right; }
.lb-table th.sortable { padding: 0; }
.sort-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.sort-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.sort-arrow { color: var(--amber); font-size: 0.72rem; }
.live-table th.live-fights, .live-table td.live-fights { width: 80px; text-align: right; }
.live-table td { height: 46px; }
.live-table .player-name-btn { max-width: 180px; }

@media (max-width: 900px) {
  .lb-table th.lb-weapon, .lb-table td.lb-weapon { display: none; }
  .lb-table th.lb-player, .lb-table td.lb-player { width: auto; }
  .lb-player .player-name-btn { max-width: 150px; }
}

/* Player global rank */
.standing-card {
  background: var(--panel);
  border: 1px solid var(--amber);
  padding: 14px 18px;
  margin-bottom: 18px;
}
.standing-head {
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--amber);
  margin-bottom: 10px;
}
.standing-row + .standing-row { border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 10px; }
.standing-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.standing-rank { font-family: var(--font-pixel); font-size: 1.15rem; color: var(--amber); }
.standing-bucket { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; }
.standing-provisional {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 1px 5px;
}
.standing-detail { font-family: var(--font-mono); font-size: 0.72rem; margin-top: 3px; }
.standing-empty { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }

/* Player profit summary */
.profit-card {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 18px;
}
.profit-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.profit-net {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 16px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.profit-net span { font-size: 0.72rem; letter-spacing: 0.06em; }
.profit-net strong { font-size: 1.7rem; font-family: var(--font-pixel); }
.profit-net small { font-size: 0.8rem; }
.profit-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.profit-rows > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 9px 11px;
  background: var(--panel-2);
  border: 1px solid var(--border);
}
.profit-rows span { font-size: 0.68rem; color: var(--muted); }
.profit-rows b { font-size: 0.9rem; white-space: nowrap; }
.profit-note { margin: 14px 0 0; font-size: 0.74rem; line-height: 1.6; }

/* 24h fight log */
.fight-log-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 10px;
}
.fight-log-head h3 {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  color: var(--amber);
}
.fight-log { display: grid; gap: 12px; margin-bottom: 18px; }
.log-card { background: var(--panel); border: 1px solid var(--border); padding: 16px; }
.log-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.log-pagination { margin-top: 12px; }
.log-summary {
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--panel-2);
  border-left: 2px solid var(--amber);
  font-size: 0.78rem;
  font-weight: 700;
}
.log-section { padding-top: 12px; }
.log-label {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.log-opponents { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.log-player {
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 10px;
  min-width: 0;
}
.log-player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  min-width: 0;
}
.log-player-head .muted { text-align: right; }
.log-events { display: grid; gap: 4px; }
.log-event {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 9px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-size: 0.76rem;
}
.log-event.mine { border-color: rgba(255, 159, 67, 0.6); }
.inventory-grid { display: flex; flex-wrap: wrap; gap: 4px; }
.inv-details { margin-top: 6px; font-size: 0.7rem; }
.inv-details summary { cursor: pointer; color: var(--muted); letter-spacing: 0.04em; }
.inv-details .inventory-grid { margin-top: 8px; }

@media (max-width: 900px) {
  .profit-rows, .log-opponents { grid-template-columns: 1fr; }
}

/* Retro power-on + BIOS boot sequence */
.power-flash {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(to bottom,
      transparent 0%,
      rgba(255, 255, 255, 0.92) 49%,
      rgba(0, 229, 255, 0.65) 50%,
      transparent 51%),
    rgba(0, 0, 0, 0.72);
  transform: scaleY(0.02);
}
.boot-active .power-flash { animation: powerOn 0.72s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes powerOn {
  0% { opacity: 1; transform: scaleY(0.02); }
  18% { opacity: 1; transform: scaleY(0.02); }
  32% { opacity: 0.85; transform: scaleY(1); }
  48% { opacity: 0.18; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); visibility: hidden; }
}

.boot-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(5, 8, 14, 0.94);
  color: #d6e3ff;
  font-family: var(--font-mono);
}
.boot-active .boot-screen { display: flex; animation: bootFadeOut 0.35s ease 1.25s forwards; }
.boot-box {
  width: min(440px, calc(100vw - 40px));
  padding: 18px;
  background: #080c14;
  border: 2px solid var(--amber);
  box-shadow: 8px 8px 0 #000;
}
.boot-title {
  margin-bottom: 14px;
  font-family: var(--font-pixel);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--amber);
}
.boot-line {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  font-size: 0.72rem;
  line-height: 1.85;
}
.boot-line b { color: var(--nature); }
.boot-active .boot-line:nth-child(2) { animation: bootType 0.28s steps(24) 0.12s forwards; }
.boot-active .boot-line:nth-child(3) { animation: bootType 0.28s steps(24) 0.42s forwards; }
.boot-active .boot-line:nth-child(4) { animation: bootType 0.28s steps(24) 0.72s forwards; }
.boot-bar {
  height: 14px;
  margin-top: 14px;
  padding: 2px;
  border: 1px solid var(--amber);
  background: #050810;
}
.boot-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--amber) 0 8px, #ffdd66 8px 10px);
}
.boot-active .boot-bar span { animation: bootBar 1s steps(10) 0.25s forwards; }
.boot-foot {
  margin-top: 8px;
  font-size: 0.68rem;
  color: var(--muted);
}
.boot-dots { color: var(--amber); animation: caretBlink 0.8s steps(1) infinite; }
@keyframes bootType {
  from { opacity: 1; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}
@keyframes bootBar {
  from { width: 0; }
  to { width: 100%; }
}
@keyframes bootFadeOut {
  0%, 82% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}

/* Occasional CRT-style glitch on the brand chip */
.brand-mark { animation: brandGlitch 9s steps(1) infinite; }
@keyframes brandGlitch {
  0%, 91%, 100% { transform: none; text-shadow: none; filter: none; }
  92% { transform: translate(-2px, 1px); text-shadow: 2px 0 #00e5ff, -2px 0 #ff476e; }
  93% { transform: translate(2px, -1px); text-shadow: -2px 0 #00e5ff, 2px 0 #ff476e; }
  94% { transform: translate(-1px, 0); filter: brightness(1.25); }
  95% { transform: none; text-shadow: none; filter: none; }
}

/* Blinking block caret on live status text */
.chrome-clock::after,
.telemetry::after {
  content: "█";
  margin-left: 5px;
  color: var(--amber);
  animation: caretBlink 1s steps(1) infinite;
}
@keyframes caretBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Animated stripes while SYNC is running */
#refreshBtn.syncing {
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 176, 0, 0.35) 0 6px,
    transparent 6px 12px
  );
  background-size: 24px 24px;
  animation: syncStripes 0.6s linear infinite;
}
@keyframes syncStripes {
  to { background-position: 24px 0; }
}

/* Compact phone layout */
@media (max-width: 700px) {
  html, body { overflow-x: hidden; }

  .topbar { position: static; }
  .win-chrome-bar { padding: 3px 10px; font-size: 0.62rem; }
  .chrome-author, .chrome-sep { display: none; }
  .chrome-clock { font-size: 0.62rem; }
  .tiny-chrome-btn { font-size: 0.6rem; padding: 1px 5px; }

  .topbar-inner, .subbar, .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  .topbar-inner {
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .brand { width: 100%; gap: 8px; }
  .brand-mark {
    font-size: 0.76rem;
    padding: 6px 8px;
    box-shadow: 2px 2px 0 #000;
  }
  .brand h1 { font-size: 0.82rem; }
  .subtitle { font-size: 0.58rem; line-height: 1.25; }

  .controls-row {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }
  #serverPills { flex: 1; }
  #serverPills .pill {
    flex: 1;
    padding: 6px 3px;
    font-size: 0.66rem;
  }
  #refreshBtn {
    padding: 6px 9px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .subbar {
    position: sticky;
    top: 0;
    z-index: 40;
    padding-top: 4px;
    padding-bottom: 4px;
    gap: 3px;
    background: rgba(11, 14, 22, 0.97);
    backdrop-filter: blur(6px);
  }
  .tabs {
    width: 100%;
    flex-wrap: nowrap;
    gap: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 2px;
    font-size: 0;
    text-align: center;
  }
  .tab::after {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
  }
  .tab[data-tab="fights"]::after { content: "FIGHTS"; }
  .tab[data-tab="leaderboard"]::after { content: "RANKS"; }
  .tab[data-tab="roles"]::after { content: "META"; }
  .tab[data-tab="live"]::after { content: "LIVE"; }
  .tab[data-tab="checker"]::after { content: "SEARCH"; }
  .telemetry {
    width: 100%;
    font-size: 0.58rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .ticker-wrap { font-size: 0.6rem; }
  .ticker-tag { padding: 3px 6px; }
  .ticker-track { padding: 3px 8px; }

  .container {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-top: 10px;
    padding-bottom: 28px;
  }
  .seo-lede {
    margin-bottom: 10px;
    padding: 8px;
  }
  .seo-lede h2 { font-size: 0.72rem; }
  .seo-lede p { font-size: 0.64rem; }
  .match-card, .team-side, .player-row, .kill-log-entry {
    min-width: 0;
    max-width: 100%;
  }
  .panel-toolbar { margin-bottom: 10px; }
  #fightFilterPills {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #fightFilterPills .pill {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 2px;
    font-size: 0;
  }
  #fightFilterPills .pill::after {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1;
  }
  #fightFilterPills .pill:nth-child(1)::after { content: "ALL"; }
  #fightFilterPills .pill:nth-child(2)::after { content: "HEAL"; }
  #fightFilterPills .pill:nth-child(3)::after { content: "HOLY"; }
  #fightFilterPills .pill:nth-child(4)::after { content: "NATURE"; }
  #fightFilterPills .pill:nth-child(5)::after { content: "2DPS"; }

  .fights-grid { gap: 10px; }
  .match-card {
    border-width: 1px;
    box-shadow: 3px 3px 0 var(--shadow);
  }
  .match-head {
    height: auto;
    flex-basis: auto;
    min-height: 28px;
    padding: 5px 8px;
    gap: 5px;
    font-size: 0.62rem;
  }
  .match-meta, .fight-detail-hint { display: none; }
  .match-id { flex: 1; }
  .team-side { padding: 6px 7px; gap: 4px; }
  .team-title {
    height: auto;
    flex-basis: auto;
    font-size: 0.66rem;
  }
  .player-row {
    height: auto;
    flex-basis: auto;
    padding: 5px 6px;
  }
  .player-top {
    height: auto;
    flex-basis: auto;
    flex-wrap: wrap;
    gap: 3px;
  }
  .player-name-btn {
    max-width: 120px;
    font-size: 0.76rem;
  }
  .player-guild { max-width: 60px; }
  .player-stats { gap: 5px; font-size: 0.62rem; }
  .gear-strip {
    height: auto;
    flex-basis: auto;
    flex-wrap: nowrap;
    gap: 2px;
    margin-top: 4px;
    overflow: hidden;
  }
  .item-chip {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
  .item-chip img { width: 31px; height: 31px; }
  .player-gear-value {
    height: auto;
    line-height: 1.3;
    margin-top: 3px;
    font-size: 0.6rem;
  }
  .kill-log {
    height: auto;
    flex-basis: auto;
    padding: 3px 7px;
    gap: 6px;
    font-size: 0.56rem;
    white-space: nowrap;
  }
  .kill-log-entry {
    display: inline-block;
    max-width: 48%;
    vertical-align: middle;
  }
  .kill-log-entry > .muted:last-child { display: none; }
  .weapon-summary-pill {
    padding: 1px 4px 1px 2px;
    font-size: 0.6rem;
  }
  .weapon-summary-pill img { width: 16px; height: 16px; }
  .pagination {
    gap: 8px;
    margin-top: 12px;
    font-size: 0.62rem;
  }
  .pagination .btn-ghost {
    padding: 5px 8px;
    font-size: 0.62rem;
  }

  .win-strip {
    padding: 5px 8px;
    font-size: 0.6rem;
  }
  .win-glyphs { display: none; }
  .lb-header { margin-bottom: 10px; }
  .lb-info { padding: 10px; }
  .lb-info h2 { font-size: 0.82rem; }
  .lb-info p { font-size: 0.68rem; line-height: 1.4; }
  .lb-stats-bar {
    gap: 4px 6px;
    font-size: 0.62rem;
  }
  .lb-role-select {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.62rem;
  }
  .lb-role-select > span.muted:not(#weaponMinLabel) { display: none; }
  #weaponMinLabel {
    display: block;
    font-size: 0.58rem;
  }
  .lb-role-select .pill-group {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .lb-role-select .pill {
    flex: 1 1 0;
    min-width: 0;
    padding: 5px 4px;
    font-size: 0.62rem;
  }
  .lb-triple { gap: 10px; }
  .lb-col { border-width: 1px; }
  .lb-col-head {
    padding: 6px 8px;
    font-size: 0.68rem;
  }
  .lb-col-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .lb-table-wrap,
  #weaponRatesTable,
  #livePlayersTable {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }
  .lb-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 0.62rem;
    line-height: 1.25;
  }
  .lb-table th {
    padding: 5px 4px;
    font-size: 0.56rem;
    letter-spacing: 0;
  }
  .lb-table td {
    padding: 5px 4px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sort-btn {
    gap: 2px;
    padding: 5px 3px;
    font-size: 0.56rem;
  }
  .lb-rank { width: 34px; font-size: 0.68rem; }
  .rank-chip {
    width: 24px;
    height: 20px;
    box-shadow: 1px 1px 0 var(--shadow);
    font-size: 0.56rem;
  }
  .lb-player-inner { gap: 5px; }
  .lb-player .player-name-btn {
    max-width: 100%;
    font-size: 0.66rem;
  }
  .lb-guild { font-size: 0.58rem; }
  .lb-wep-icon { width: 26px; height: 26px; }
  .lb-table th.lb-points, .lb-table td.lb-points { width: 58px; }
  .lb-points { font-size: 0.62rem; }
  .lb-table th.lb-wr, .lb-table td.lb-wr { width: 44px; }
  .lb-wr { font-size: 0.64rem; }
  .lb-table-wrap .lb-wl,
  .lb-table-wrap .lb-ip { display: none; }

  .wr-table th.wr-weapon, .wr-table td.wr-weapon { width: 42%; }
  .wr-weapon-inner { gap: 5px; }
  .wr-table .lb-wep-icon { width: 26px; height: 26px; }
  .wr-weapon-name { font-size: 0.62rem; }
  .wr-table th.wr-games, .wr-table td.wr-games { width: 48px; }
  .wr-table td { height: 34px; }
  .wr-build-icons { gap: 1px; overflow: hidden; }
  .wr-build-icons img,
  .wr-table .wr-build-icons img {
    width: 22px;
    height: 22px;
  }
  .wr-table .lb-wl, .wr-table .lb-ip { display: none; }

  .live-table th.live-player, .live-table td.live-player { width: 30%; }
  .live-table th.live-build, .live-table td.live-build { width: 24%; }
  .live-table th.lb-ip, .live-table td.lb-ip {
    width: 52px;
    text-align: right;
  }
  .live-table th.live-seen, .live-table td.live-seen {
    width: 62px;
    text-align: right;
    font-size: 0.58rem;
  }
  .live-table th.gear-est, .live-table td.gear-est,
  .live-table th.wr-role, .live-table td.wr-role,
  .live-table th.live-fights, .live-table td.live-fights { display: none; }
  .live-table td { height: 34px; }
  .live-table .player-name-btn {
    max-width: 100%;
    font-size: 0.64rem;
  }
  .live-table .wr-build-icons img {
    width: 20px;
    height: 20px;
  }

  .category-body, .checker-inner { padding: 10px; }
  .category-header h2, .checker-inner h2 { font-size: 0.82rem; }
  .checker-inner .muted { font-size: 0.68rem; }
  .checker-form {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-top: 8px;
  }
  .checker-form input,
  .checker-form select,
  .checker-form .btn-accent {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 8px;
    font-size: 0.72rem;
  }

  .standing-card, .profit-card, .log-card { padding: 10px; }
  .standing-rank { font-size: 0.9rem; }
  .standing-detail { font-size: 0.64rem; }
  .profit-net strong { font-size: 1.2rem; }
  .profit-net small { font-size: 0.68rem; }
  .profit-rows { gap: 6px; }
  .profit-rows > div { padding: 6px 8px; }
  .profit-rows span { font-size: 0.62rem; }
  .profit-rows b { font-size: 0.78rem; }
  .profit-note { font-size: 0.66rem; }
  .fight-log-head h3 { font-size: 0.78rem; }
  .log-card-head { gap: 6px; font-size: 0.68rem; }
  .log-summary, .log-event { font-size: 0.66rem; }
  .log-event { padding: 5px 7px; }
  .log-player { padding: 7px; }
  .log-player-head { font-size: 0.66rem; }

  .builds-grid { grid-template-columns: 1fr; }
  .build-tile {
    height: auto;
    min-height: 100px;
    padding: 8px;
  }
  .build-tile .gear-strip { flex-wrap: wrap; }
  .empty-state { padding: 16px; font-size: 0.72rem; }
  .modal { width: 96vw; max-height: 92vh; }
  .modal-head { padding: 8px 10px; }
  .modal-body { padding: 10px; }
  .detail-summary, .detail-team-head, .detail-player-stats { font-size: 0.64rem; }
  .detail-team { padding: 7px; }

  .legal-page h1 { font-size: 1.05rem; }
  .legal-page h2 { font-size: 0.82rem; }
  .legal-page p, .credit-list { font-size: 0.68rem; }
  .credit-callout { padding: 10px; }

  .site-footer {
    padding: 12px 10px 24px;
    font-size: 0.68rem;
  }
  .site-footer-copy p { font-size: 0.68rem; }
  .footer-contact { gap: 6px 10px; }
  .footer-contact-item { font-size: 0.62rem; }
  .footer-bmc { font-size: 0.6rem; }

  .boot-box {
    width: calc(100vw - 24px);
    padding: 12px;
    box-shadow: 4px 4px 0 #000;
  }
  .boot-title {
    margin-bottom: 8px;
    font-size: 0.78rem;
  }
  .boot-line {
    font-size: 0.62rem;
    line-height: 1.6;
    white-space: normal;
  }
  .boot-bar {
    height: 10px;
    margin-top: 8px;
  }
  .boot-foot { font-size: 0.58rem; }
}

/* CRT off also stops the other looping motion effects */
html.fx-off .led-dot,
html.fx-off .ticker-content,
html.fx-off .brand-mark,
html.fx-off .chrome-clock::after,
html.fx-off .telemetry::after,
html.fx-off .boot-dots,
html.fx-off #refreshBtn.syncing {
  animation: none !important;
}
html.fx-off .ticker-content { transform: none; }
