:root {
  color-scheme: dark;
  --bg: #080a10;
  --panel: #10131c;
  --panel-2: #141827;
  --line: #242938;
  --text: #eef4ff;
  --muted: #8790ad;
  --green: #00e2a2;
  --green-2: #12b886;
  --pink: #ff3c70;
  --yellow: #ffc400;
  --blue: #52a7ff;
  --purple: #9b6cff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  letter-spacing: 0;
}

button, input, select { font: inherit; }

body.auth-required .sidebar,
body.auth-required .app {
  display: none;
}

body.authenticated .auth-screen {
  display: none;
}

body:not(.is-admin) .admin-only {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 226, 162, .09), transparent 30%),
    radial-gradient(circle at 85% 25%, rgba(255, 196, 0, .08), transparent 32%),
    #050505;
}

.auth-card {
  width: min(440px, 100%);
  border: 1px solid #2c2c2c;
  border-radius: 12px;
  background: linear-gradient(180deg, #111, #070707);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .45);
  padding: 24px;
}

.auth-brand {
  margin-bottom: 22px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.auth-tab {
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  background: #0b0b0b;
  color: var(--text);
  padding: 10px;
  cursor: pointer;
}

.auth-tab.active {
  border-color: var(--yellow);
  box-shadow: inset 0 -2px 0 var(--yellow);
}

.auth-panel {
  display: none;
  gap: 12px;
}

.auth-panel.active,
.account-form {
  display: grid;
  gap: 12px;
}

.auth-panel label,
.account-form label {
  display: grid;
  gap: 7px;
  color: #b7bdc8;
  font-size: 13px;
}

.auth-panel input,
.account-form input,
.account-form select,
.access-table select {
  height: 42px;
  border: 1px solid #2f2f2f;
  border-radius: 8px;
  background: #050505;
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.auth-panel input:focus,
.account-form input:focus,
.account-form select:focus,
.access-table select:focus {
  border-color: var(--yellow);
}

.auth-message {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-message.success {
  color: var(--green);
}

.auth-message.error {
  color: var(--pink);
}

.current-user {
  align-self: center;
  color: #c8ceda;
  font-size: 13px;
  font-weight: 700;
}

.account-card {
  max-width: 460px;
}

.access-table td {
  vertical-align: middle;
}

.access-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  border: 1px solid #353535;
  background: #111;
  font-size: 12px;
  font-weight: 800;
}

.access-pending {
  color: var(--yellow);
  border-color: rgba(255, 196, 0, .45);
}

.access-approved {
  color: var(--green);
  border-color: rgba(0, 226, 162, .45);
}

.access-refused,
.access-blocked {
  color: var(--pink);
  border-color: rgba(255, 60, 112, .45);
}

.access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.access-actions button {
  padding: 7px 10px;
  min-height: 32px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  background: #0b0e15;
  border-right: 1px solid var(--line);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #03130e;
  background: var(--green);
  font-weight: 900;
}
.brand strong { display: block; }
.brand small, .muted, .sidebar-footer, .eyebrow { color: var(--muted); }

nav { display: grid; gap: 8px; }
.nav-btn, .tab, .bucket, .ghost-btn, .primary-btn, .danger-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  text-decoration: none;
}
.nav-btn { text-align: left; }
.nav-btn.active, .tab.active, .bucket.active {
  background: #202633;
  border-color: #3b4357;
  box-shadow: inset 0 -2px 0 var(--yellow);
}
.primary-btn {
  background: var(--green);
  border-color: var(--green);
  color: #05110d;
  font-weight: 800;
}
.danger-btn {
  background: rgba(255, 60, 112, .12);
  border-color: rgba(255, 60, 112, .55);
  color: #ff6a88;
  font-weight: 800;
}
.ghost-btn:hover, .nav-btn:hover, .tab:hover, .bucket:hover { border-color: #46506a; }
.danger-btn:hover { border-color: var(--pink); background: rgba(255, 60, 112, .2); }
.sidebar-footer { margin-top: auto; font-size: 12px; line-height: 1.4; }

.app {
  margin-left: 250px;
  padding: 26px;
  min-height: 100vh;
}

.topbar, .panel-head, .actions, .tabs, .segmented, .pager {
  display: flex;
  align-items: center;
}
.topbar { justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.topbar h1 { margin: 0; font-size: 30px; }
.eyebrow { margin: 0 0 6px; text-transform: uppercase; font-size: 11px; letter-spacing: .12em; }
.actions { gap: 10px; }

.filters {
  display: grid;
  grid-template-columns: repeat(8, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.wide-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  margin: 12px 0;
}
input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #111522;
  color: var(--text);
  border-radius: 8px;
  padding: 10px 11px;
  min-height: 40px;
}

.view { display: none; }
.view.active { display: block; }

.hero-card, .panel, .metric {
  background: linear-gradient(180deg, var(--panel), #0d1018);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.hero-card {
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.hero-card h2 { margin: 0 0 8px; }
.hero-card strong { color: var(--green); font-size: 22px; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.metric { padding: 18px; border-top: 3px solid #3c4253; }
.metric.good { border-top-color: var(--green); }
.metric.danger { border-top-color: var(--pink); }
.metric span { display: block; color: var(--muted); margin-bottom: 8px; font-size: 12px; text-transform: uppercase; }
.metric strong { font-size: 30px; }

.panel { padding: 18px; margin-bottom: 18px; }
.panel h3 { margin: 0 0 14px; font-size: 15px; }
.panel-head { justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.panel-head h3 { margin-bottom: 4px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 13px; }
.chart-panel canvas { width: 100%; }

.timeline-panel {
  position: relative;
}

.timeline-head {
  align-items: flex-start;
}

.timeline-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.timeline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 18px;
  height: 7px;
  border-radius: 999px;
  display: inline-block;
}

.legend-dot.kills {
  background: var(--green);
}

.legend-dot.deaths {
  background: var(--pink);
}

#timelineKd {
  color: var(--green);
  font-size: 13px;
}

.timeline-tooltip {
  position: fixed;
  z-index: 9999;
  min-width: 176px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(8, 8, 8, .96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .44);
  pointer-events: none;
}

.timeline-table-tooltip {
  width: min(520px, calc(100vw - 24px));
  max-height: 280px;
  overflow: auto;
}

.timeline-tooltip.hidden {
  display: none;
}

.timeline-tooltip strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-size: 13px;
}

.timeline-tooltip span {
  display: flex;
  gap: 10px;
  font-size: 12px;
}

.timeline-tooltip-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 12px;
}

.timeline-tooltip table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
}

.timeline-tooltip th,
.timeline-tooltip td {
  padding: 6px 7px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: #d8d8d8;
  font-size: 11px;
  white-space: nowrap;
}

.timeline-tooltip th {
  color: #8f8f8f;
  text-transform: uppercase;
}

.timeline-tooltip tr.kill-row td:nth-child(2) {
  color: var(--green);
  font-weight: 900;
}

.timeline-tooltip tr.death-row td:nth-child(2) {
  color: var(--pink);
  font-weight: 900;
}

.timeline-live-chart {
  position: relative;
  min-height: 260px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .035), transparent 36%),
    #050505;
}

.timeline-live-chart .muted {
  padding: 24px;
}

.timeline-svg {
  display: block;
  min-width: 100%;
  height: 260px;
}

.timeline-grid-row line {
  stroke: rgba(255, 255, 255, .08);
  stroke-dasharray: 4 6;
}

.timeline-grid-row text,
.timeline-axis-label {
  fill: #7f7f7f;
  font-size: 11px;
  font-family: Segoe UI, Arial, sans-serif;
}

.timeline-axis-label {
  text-anchor: middle;
}

.timeline-path {
  fill: none;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#timelineGlow);
  stroke-dasharray: 1800;
  stroke-dashoffset: 1800;
  animation: timeline-draw 1.1s ease-out forwards, timeline-breathe 2.8s ease-in-out infinite;
}

.timeline-path-kills {
  stroke: var(--green);
}

.timeline-path-deaths {
  stroke: var(--pink);
  animation-delay: .12s, 0s;
}

.timeline-cursor {
  stroke: rgba(255, 255, 255, .32);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.timeline-focus {
  stroke: #050505;
  stroke-width: 2;
  filter: url(#timelineGlow);
}

.timeline-focus-kills {
  fill: var(--green);
}

.timeline-focus-deaths {
  fill: var(--pink);
}

.timeline-live-chart:hover .timeline-path {
  stroke-width: 3.2;
}

@keyframes timeline-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes timeline-breathe {
  0%, 100% { opacity: .86; }
  50% { opacity: 1; }
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 70px; align-items: center; gap: 12px; font-size: 13px; }
.bar-track { height: 16px; background: #202431; border-radius: 8px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--green); border-radius: 8px; }
.bar-fill.pink { background: var(--pink); }

.tabs { gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tab-page { display: none; }
.tab-page.active { display: block; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 12px 14px; border-bottom: 1px solid #171b26; text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; cursor: pointer; }
td { color: #cdd6f6; }
.sort-head {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
}
.sort-head:hover { color: var(--yellow); }
.player-link {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}
.player-link:hover {
  color: var(--green);
  text-decoration: underline;
}
.table-panel { overflow-x: auto; }
.rank { color: var(--yellow); font-weight: 800; }
.good-text { color: var(--green); font-weight: 800; }
.bad-text { color: var(--pink); font-weight: 800; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #294235;
  color: var(--green);
  background: rgba(0, 226, 162, .08);
}
.tag.guild-own {
  border-color: #0f765b;
  color: var(--green);
  background: rgba(0, 226, 162, .12);
}
.tag.guild-enemy-a {
  border-color: #7d1d35;
  color: #ff5d7d;
  background: rgba(255, 60, 112, .12);
}
.tag.guild-enemy-b {
  border-color: #8b650f;
  color: #ffd34d;
  background: rgba(255, 196, 0, .12);
}
.tag.guild-enemy-c {
  border-color: #285b8f;
  color: #65b7ff;
  background: rgba(82, 167, 255, .12);
}
.tag.guild-enemy-d {
  border-color: #5b3f91;
  color: #bda2ff;
  background: rgba(155, 108, 255, .12);
}
.tag.guild-enemy-e {
  border-color: #1d6f75;
  color: #5ee7ef;
  background: rgba(94, 231, 239, .12);
}

.matrix-list { display: grid; gap: 12px; }
.matrix-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #0d1018;
}
.matrix-title { display: flex; justify-content: space-between; margin-bottom: 10px; font-weight: 800; }
.matrix-bar { display: grid; grid-template-columns: var(--left, 50%) 1fr; height: 22px; overflow: hidden; border-radius: 8px; }
.matrix-bar span:first-child { background: var(--green-2); }
.matrix-bar span:last-child { background: #ef0f57; }

.streak-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.streak-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: radial-gradient(circle at right, rgba(255, 60, 112, .18), transparent 32%), #0d1018;
}
.streak-card strong { color: var(--pink); font-size: 24px; float: right; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; color: var(--muted); font-size: 11px; background: #161a28; }

.map-panel { padding: 12px; }
.map-panel .panel-head p { max-width: 820px; }
.map {
  position: relative;
  height: calc(100vh - 230px);
  min-height: 620px;
  border: 1px solid #25314d;
  border-radius: 8px;
  overflow: auto;
  background: #05070b;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03), 0 22px 70px rgba(0,0,0,.32);
  cursor: grab;
  user-select: none;
  scrollbar-color: #46506c #101522;
}
.map.dragging { cursor: grabbing; }
.map-toolbar {
  position: sticky;
  left: 14px;
  top: 14px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin: 14px 0 -54px 14px;
  border: 1px solid rgba(159,176,212,.22);
  border-radius: 8px;
  background: rgba(13, 20, 37, .9);
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 36px rgba(0,0,0,.34);
}
.map-toolbar button,
.map-zoom-options button {
  border: 1px solid rgba(159,176,212,.22);
  background: #121a2d;
  color: var(--text);
  border-radius: 6px;
  min-width: 36px;
  height: 34px;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 800;
}
.map-toolbar button:hover,
.map-zoom-options button:hover { border-color: rgba(0,226,162,.55); }
.map-toolbar button.active,
.map-zoom-options button.active {
  border-color: rgba(0, 226, 162, .78);
  background: rgba(0, 226, 162, .17);
  color: var(--green);
}
.map-zoom-options { display: inline-flex; gap: 5px; }
.map-sidebar {
  position: sticky;
  left: calc(100% - 264px);
  top: 14px;
  z-index: 11;
  display: grid;
  gap: 8px;
  width: 250px;
  margin: 14px 14px -430px auto;
  pointer-events: auto;
}
.map-sidebar > strong {
  justify-self: end;
  color: #fff;
  font-size: 18px;
  text-shadow: 0 2px 12px rgba(0,0,0,.8);
}
.map-event {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(159,176,212,.18);
  border-radius: 8px;
  background: rgba(8, 13, 29, .92);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
.map-event:hover { border-color: rgba(0,226,162,.52); transform: translateX(-2px); }
.map-event span { font-size: 12px; font-weight: 800; }
.map-event small { color: var(--muted); font-weight: 700; }
.map-event strong { color: var(--pink); font-size: 12px; }
.map-event em { display: flex; gap: 8px; font-style: normal; font-size: 12px; }
.map-footer {
  position: sticky;
  left: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  margin: 0 0 -42px 0;
  border-top: 1px solid rgba(159,176,212,.18);
  background: rgba(13, 20, 37, .92);
  color: var(--muted);
  font-size: 12px;
  pointer-events: none;
}
.map-scale {
  position: relative;
  width: calc(2048px * var(--zoom));
  height: calc(2048px * var(--zoom));
}
.map-canvas {
  position: relative;
  width: 2048px;
  height: 2048px;
  transform: scale(var(--zoom));
  transform-origin: top left;
  background: #05070b;
}
.map-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 42%, transparent 0 34%, rgba(0,0,0,.22) 72%, rgba(0,0,0,.55));
  mix-blend-mode: multiply;
}
.map-tile {
  position: absolute;
  left: calc(var(--tile-x) * 256px);
  top: calc(var(--tile-y) * 256px);
  width: 256px;
  height: 256px;
  pointer-events: none;
  filter: grayscale(1) brightness(.55) contrast(1.16);
}
.heat-point {
  position: absolute;
  z-index: 3;
  width: var(--size);
  height: var(--size);
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(7, 9, 14, .92);
  border-radius: 50%;
  background: #27e4bd;
  color: #03110e;
  cursor: pointer;
  box-shadow: 0 0 0 6px rgba(0,226,162,.18), 0 0 22px rgba(0,226,162,.65);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}
.heat-point span { pointer-events: none; }
.heat-point::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,226,162,.35), rgba(0,226,162,0) 68%);
  z-index: -1;
}
.heat-point:hover { z-index: 5; transform: translate(-50%, -50%) scale(1.16); }
.heat-point.death {
  background: #ff5f81;
  color: #1e030b;
  box-shadow: 0 0 0 6px rgba(255,60,112,.18), 0 0 22px rgba(255,60,112,.65);
}
.heat-point.death::before { background: radial-gradient(circle, rgba(255,60,112,.36), rgba(255,60,112,0) 68%); }
.heat-point.positioned { border-color: rgba(5, 7, 11, .95); }
.pager { justify-content: center; gap: 14px; margin: 14px 0 30px; }

.modal.hidden { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .68);
}
.modal-card {
  position: relative;
  width: min(1120px, 96vw);
  max-height: 88vh;
  overflow: auto;
  background: #0f131d;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-head h2 { margin: 0; }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.modal-metrics {
  grid-template-columns: repeat(4, 1fr);
}
.breakdown-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
  margin-bottom: 12px;
}
.breakdown-column {
  border-top: 3px solid #3c4253;
  padding-top: 12px;
}
.breakdown-column.good { border-top-color: var(--green); }
.breakdown-column.danger { border-top-color: var(--pink); }
.breakdown-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.breakdown-column header strong {
  color: var(--text);
  font-size: 24px;
}
.breakdown-column ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.breakdown-column li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
}
.breakdown-column li strong { color: var(--text); }
.guild-filter {
  font: inherit;
  cursor: pointer;
}
.guild-filter.active {
  box-shadow: 0 0 0 2px rgba(255, 207, 0, .35);
}
.active-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--muted);
}
.clear-link {
  border: 0;
  background: transparent;
  color: var(--yellow);
  cursor: pointer;
  font-weight: 800;
}

.view-hero {
  position: relative;
  overflow: hidden;
  min-height: 118px;
  border-color: rgba(135, 144, 173, .18);
  background:
    radial-gradient(circle at 86% 35%, rgba(0, 226, 162, .16), transparent 30%),
    linear-gradient(180deg, rgba(18, 23, 36, .98), rgba(11, 14, 22, .98));
}

.view-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -120px;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: rgba(135, 144, 173, .07);
}

.view-hero h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 2vw, 34px);
}

.view-hero span {
  color: var(--muted);
}

.view-hero strong {
  position: relative;
  z-index: 1;
  color: var(--green);
  font-size: clamp(22px, 2vw, 32px);
}

#rankings .tab-page.panel,
#analytics .panel,
#imports .panel {
  border-top: 1px solid rgba(255, 196, 0, .12);
}

#rankings .metric-grid,
#analytics .metric-grid,
#imports .metric-grid {
  margin-bottom: 18px;
}

#rankings > .view-hero,
#rankingInsightCards {
  display: none;
}

#rankings table td:nth-child(5),
#rankings table td:nth-child(6),
#rankings table td:nth-child(7),
#analytics table td:nth-last-child(-n+3) {
  font-variant-numeric: tabular-nums;
}

#playersTab table th:first-child,
#playersTab table td:first-child,
#guildsTab table th:first-child,
#guildsTab table td:first-child,
#classesTab table th:first-child,
#classesTab table td:first-child,
#threatsTab table th:first-child,
#threatsTab table td:first-child {
  width: 54px;
}

#playersTab,
#guildsTab,
#classesTab,
#threatsTab {
  padding: 0;
  overflow: hidden;
}

.ranking-table-shell {
  overflow-x: auto;
  border: 1px solid rgba(135, 144, 173, .16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(15, 22, 34, .98), rgba(10, 15, 25, .98)),
    #0b0f18;
}

.ranking-table {
  min-width: 1060px;
  background: transparent;
}

.ranking-table-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(5, 5, 5, .72);
}

.ranking-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid #343434;
  border-radius: 8px;
  background: #0b0b0b;
  color: #d8d8d8;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.ranking-expand-btn span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 196, 0, .12);
  color: var(--yellow);
  font-weight: 900;
}

.ranking-expand-btn.active {
  border-color: rgba(255, 196, 0, .55);
  color: #fff;
}

.ranking-table--guilds,
.ranking-table--classes {
  min-width: 760px;
}

.ranking-table--threats {
  min-width: 680px;
}

.ranking-table thead {
  background: linear-gradient(180deg, rgba(18, 27, 42, .98), rgba(12, 18, 30, .98));
}

.ranking-table th,
.ranking-table td {
  height: 44px;
  padding: 8px 18px;
  border-bottom: 1px solid rgba(135, 144, 173, .1);
  vertical-align: middle;
}

.ranking-table th {
  color: #aab7d8;
  font-size: 11px;
  font-weight: 800;
  text-transform: none;
}

.ranking-table td {
  color: #dbe6ff;
  font-size: 13px;
}

.ranking-table tbody tr {
  background: rgba(10, 15, 25, .46);
}

.ranking-table tbody tr:nth-child(even) {
  background: rgba(15, 22, 34, .48);
}

.ranking-table tbody tr:hover {
  background: rgba(34, 45, 68, .52);
}

.ranking-table:not(.ranking-table--guilds):not(.ranking-table--classes):not(.ranking-table--threats) th:nth-child(8),
.ranking-table:not(.ranking-table--guilds):not(.ranking-table--classes):not(.ranking-table--threats) td:nth-child(8) {
  border-left: 1px solid rgba(135, 144, 173, .16);
}

.ranking-table .rank {
  min-width: 20px;
  height: auto;
  background: transparent;
  color: var(--yellow);
  font-weight: 900;
}

.ranking-table .player-link {
  font-size: 13px;
}

.ranking-player-name,
.ranking-number {
  color: #dbe6ff;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.ranking-table .tag {
  min-width: 76px;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 12px;
}

.class-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 132px;
}

.class-icon,
.class-fallback {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 999px;
  background: radial-gradient(circle, #d9c393, #79633a);
  box-shadow: 0 0 0 1px rgba(255, 224, 149, .32), 0 0 10px rgba(255, 196, 0, .12);
}

.class-fallback {
  display: inline-grid;
  place-items: center;
  color: #1b1307;
  font-size: 10px;
  font-weight: 900;
}

.sort-head {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sort-indicator {
  color: #c5d2ee;
  font-size: 10px;
  line-height: 1;
}

.sort-indicator.idle {
  color: #5d6986;
}

.guild-kill {
  display: inline-flex;
  min-width: 32px;
  justify-content: center;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.guild-kill.guild-own { color: var(--green); }
.guild-kill.guild-enemy-a { color: #ff5d7d; }
.guild-kill.guild-enemy-b { color: #ffd34d; }
.guild-kill.guild-enemy-c { color: #3ea5ff; }
.guild-kill.guild-enemy-d { color: #c084fc; }
.guild-kill.guild-enemy-e { color: #5ee7ef; }

.ranking-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  color: #aab7d8;
  font-size: 12px;
  background: rgba(7, 11, 18, .72);
}

.pager-buttons {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.pager-buttons button,
.page-size {
  min-width: 30px;
  height: 30px;
  border: 1px solid rgba(135, 144, 173, .16);
  border-radius: 7px;
  background: #101827;
  color: #cbd7f6;
  font-weight: 800;
}

.pager-buttons button:not(:disabled) {
  cursor: pointer;
}

.pager-buttons button.active {
  color: var(--yellow);
  border-color: rgba(255, 196, 0, .7);
  box-shadow: inset 0 -2px 0 var(--yellow);
}

.pager-buttons button:disabled {
  opacity: .45;
}

.page-size {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  padding: 0 10px;
  font-weight: 700;
}

#analyticsGuilds .two-col,
#analyticsClasses .two-col,
#analyticsMatchups .two-col,
#analyticsQuality .two-col {
  align-items: start;
}

#guildBalanceCards {
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

#classKillBars .bar-row strong,
#guildBars .bar-row strong,
#playerBars .bar-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#analyticsTimeline .chart-panel {
  padding-bottom: 12px;
}

#timelineTotal {
  color: var(--green);
}

#imports .view-hero {
  background:
    radial-gradient(circle at 86% 35%, rgba(255, 196, 0, .14), transparent 32%),
    linear-gradient(180deg, rgba(18, 23, 36, .98), rgba(11, 14, 22, .98));
}

#imports .view-hero strong {
  color: var(--yellow);
}

#imports .two-col > .panel {
  display: flex;
  flex-direction: column;
}

#imports .two-col > .panel .actions {
  margin-top: auto;
}

.table-panel > h3 + table {
  margin-top: 2px;
}

.table-panel table {
  background: rgba(8, 11, 18, .22);
  border-radius: 8px;
  overflow: hidden;
}

.good-text,
.bad-text {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1120px) {
  .sidebar { position: static; width: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .app { margin-left: 0; padding: 18px; }
  nav { grid-template-columns: repeat(3, 1fr); }
  .filters { grid-template-columns: repeat(2, 1fr); }
  .metric-grid, .two-col, .streak-grid, .breakdown-card { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 620px) {
  nav { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .hero-card, .actions, .upload-history-main { align-items: stretch; flex-direction: column; }
  .upload-history-actions { justify-content: stretch; }
  .metric strong { font-size: 24px; }
  .map { height: 430px; min-height: 430px; }
}

/* Layout polish inspired by the approved mockups */
body {
  background:
    linear-gradient(180deg, rgba(20, 24, 39, .72), rgba(8, 10, 16, 0) 260px),
    var(--bg);
}

.sidebar {
  background: linear-gradient(180deg, #0b0f18, #070a10);
  box-shadow: 18px 0 60px rgba(0, 0, 0, .28);
}

.brand {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(135, 144, 173, .14);
}

.brand-mark {
  box-shadow: 0 0 28px rgba(0, 226, 162, .22);
}

.brand strong {
  letter-spacing: .02em;
}

.brand small {
  display: block;
  margin-top: 3px;
}

.nav-btn {
  position: relative;
  min-height: 44px;
  background: rgba(16, 19, 28, .76);
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.nav-btn:hover {
  transform: translateX(2px);
}

.nav-btn.active {
  background: linear-gradient(135deg, rgba(32, 38, 51, .98), rgba(20, 24, 39, .9));
  border-color: rgba(255, 196, 0, .45);
  box-shadow: inset 0 -2px 0 var(--yellow), 0 14px 30px rgba(0, 0, 0, .2);
}

.app {
  max-width: 1880px;
}

.topbar {
  min-height: 72px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(135, 144, 173, .14);
}

.topbar h1 {
  font-size: clamp(28px, 2.2vw, 42px);
  line-height: 1;
}

.actions .ghost-btn,
.actions .primary-btn,
.actions .danger-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filters {
  position: sticky;
  top: 0;
  z-index: 8;
  padding: 14px;
  border: 1px solid rgba(135, 144, 173, .14);
  border-radius: 8px;
  background: rgba(11, 15, 24, .92);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .22);
}

input,
select {
  background: #121827;
  border-color: #293149;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(0, 226, 162, .7);
  box-shadow: 0 0 0 3px rgba(0, 226, 162, .09);
}

.tabs {
  width: fit-content;
  max-width: 100%;
  padding: 5px;
  border: 1px solid rgba(135, 144, 173, .16);
  border-radius: 8px;
  background: rgba(16, 19, 28, .78);
}

.tab,
.bucket {
  min-height: 36px;
  border-radius: 7px;
  background: transparent;
  border-color: transparent;
  color: #a9b4d2;
}

.tab.active,
.bucket.active {
  color: #fff;
  background: linear-gradient(180deg, #2b3244, #1a2030);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: inset 0 -2px 0 var(--yellow), 0 10px 24px rgba(0, 0, 0, .28);
}

.panel,
.metric,
.hero-card {
  border-color: rgba(135, 144, 173, .16);
  background:
    linear-gradient(180deg, rgba(20, 24, 39, .95), rgba(11, 14, 22, .96)),
    #10131c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 18px 48px rgba(0, 0, 0, .22);
}

.panel {
  padding: 20px;
}

.panel h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #eaf0ff;
  letter-spacing: .01em;
}

.panel h3::before {
  content: "";
  width: 3px;
  height: 15px;
  border-radius: 99px;
  background: var(--yellow);
  box-shadow: 0 0 14px rgba(255, 196, 0, .34);
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.metric {
  position: relative;
  overflow: hidden;
  min-height: 124px;
  border-top: 0;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: #3c4253;
}

.metric::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -54px;
  width: 132px;
  height: 132px;
  border-radius: 999px;
  background: rgba(135, 144, 173, .08);
}

.metric.good::before { background: var(--green); }
.metric.danger::before { background: var(--pink); }
.metric.good::after { background: rgba(0, 226, 162, .09); }
.metric.danger::after { background: rgba(255, 60, 112, .11); }

.metric span {
  letter-spacing: .08em;
}

.metric strong {
  position: relative;
  z-index: 1;
  display: block;
  color: #fff;
  line-height: 1.05;
}

.metric small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.analytics-tabs {
  margin-bottom: 18px;
}

#analytics .tab-page.active {
  animation: view-in .18s ease-out;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

table {
  border-spacing: 0;
}

thead {
  background: rgba(16, 22, 35, .72);
}

th {
  color: #96a4ca;
  border-bottom-color: rgba(135, 144, 173, .18);
}

td {
  border-bottom-color: rgba(135, 144, 173, .08);
}

tbody tr {
  transition: background .14s ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, .025);
}

.rank {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255, 196, 0, .1);
}

.tag {
  font-weight: 800;
  letter-spacing: .01em;
}

.bar-row {
  grid-template-columns: minmax(110px, 160px) minmax(160px, 1fr) 70px;
  padding: 2px 0;
}

.bar-track {
  height: 18px;
  background: #1f2535;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.bar-fill {
  background: linear-gradient(90deg, var(--green-2), var(--green));
}

.bar-fill.pink {
  background: linear-gradient(90deg, #d92655, var(--pink));
}

.matrix-card {
  background:
    linear-gradient(180deg, rgba(16, 19, 28, .88), rgba(11, 14, 22, .96));
  border-color: rgba(135, 144, 173, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

.matrix-title {
  align-items: center;
}

.matrix-bar {
  height: 24px;
  background: #1d2230;
}

.matrix-bar span:first-child {
  background: linear-gradient(90deg, #0aa878, var(--green));
}

.matrix-bar span:last-child {
  background: linear-gradient(90deg, #ef0f57, #ff5d7d);
}

.streak-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.streak-card {
  min-height: 116px;
  background:
    radial-gradient(circle at right, rgba(255, 60, 112, .17), transparent 36%),
    linear-gradient(180deg, rgba(16, 19, 28, .94), rgba(11, 14, 22, .96));
  border-color: rgba(135, 144, 173, .16);
}

.streak-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.streak-card strong {
  text-shadow: 0 0 22px rgba(255, 60, 112, .28);
}

.chip {
  background: #1a2030;
  border-color: rgba(135, 144, 173, .16);
}

.chart-panel {
  min-height: 340px;
}

.chart-panel canvas {
  display: block;
  min-height: 240px;
  padding: 8px;
  border: 1px solid rgba(135, 144, 173, .1);
  border-radius: 8px;
  background: #0b0f18;
}

#imports .panel:first-of-type,
#imports .panel:nth-of-type(2) {
  min-height: 206px;
}

#imports .actions {
  flex-wrap: wrap;
}

.upload-layout {
  align-items: start;
}

#nodewarUploads .upload-layout {
  grid-template-columns: minmax(0, 1fr);
}

#nodewarUploads .upload-panel {
  width: 100%;
}

.nodewar-clear-panel {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.nodewar-clear-controls {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto;
  align-items: end;
  gap: 12px;
}

.nodewar-clear-controls label {
  display: grid;
  gap: 8px;
}

@media (max-width: 720px) {
  .nodewar-clear-controls {
    grid-template-columns: 1fr;
  }
}

/* Direct head-to-head comparison */
[hidden] { display: none !important; }
.comparison-hero-actions,
.comparison-toolbar-actions,
.comparison-context,
.comparison-history-pager,
.comparison-radar-legend,
.comparison-bar-legend { display: flex; align-items: center; gap: 10px; }
.comparison-mode-btn.active { border-color: var(--yellow); color: var(--yellow); background: rgba(255,196,0,.09); }
.comparison-toolbar { padding: 18px; }
.comparison-player-selectors { display: grid; grid-template-columns: minmax(0, 1fr) 66px minmax(0, 1fr); align-items: end; gap: 14px; margin-top: 18px; }
.comparison-player-picker { position: relative; }
.comparison-player-picker label,
.comparison-filters label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; }
.comparison-player-picker input,
.comparison-filters input,
.comparison-filters select { width: 100%; min-height: 42px; }
.comparison-player-picker-a input { border-color: rgba(82,167,255,.65); box-shadow: inset 3px 0 #52a7ff; }
.comparison-player-picker-b input { border-color: rgba(177,108,255,.65); box-shadow: inset 3px 0 #b16cff; }
.comparison-vs { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid #384054; border-radius: 50%; color: #dbe2f3; font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.comparison-filters { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); gap: 10px; margin-top: 14px; }
.comparison-filters select:disabled { color: #667086; cursor: not-allowed; }
.comparison-suggestions { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 6px); display: grid; gap: 6px; max-height: 260px; overflow: auto; padding: 7px; border: 1px solid #30394e; border-radius: 10px; background: #0b101b; box-shadow: 0 16px 36px rgba(0,0,0,.5); }
.comparison-suggestion { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 11px; border: 1px solid transparent; border-radius: 7px; background: #121827; color: var(--text); text-align: left; cursor: pointer; }
.comparison-suggestion:hover { border-color: var(--yellow); background: #1a2030; }
.comparison-suggestion span { color: var(--muted); font-size: 12px; }
.comparison-suggestion-empty { padding: 8px; }
.comparison-loading { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.comparison-loading p { margin: 3px 0 0; }
.comparison-spinner { width: 22px; height: 22px; border: 3px solid #2d374b; border-top-color: var(--blue); border-radius: 50%; animation: comparison-spin .8s linear infinite; }
@keyframes comparison-spin { to { transform: rotate(360deg); } }
.comparison-message { min-height: 28px; margin: 12px 2px; }
.comparison-message:empty { display: none; }
.comparison-message:not(:empty) { padding: 12px 14px; border: 1px solid rgba(255,196,0,.28); border-radius: 9px; background: rgba(255,196,0,.06); color: #d9dfed; line-height: 1.5; }
.comparison-dashboard { display: grid; gap: 16px; }
.comparison-context { flex-wrap: wrap; justify-content: flex-start; padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 12px; background: rgba(16,19,28,.72); }
.comparison-context strong { color: var(--text); }
.comparison-duel-grid { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(320px, 1.35fr) minmax(240px, 1fr); gap: 14px; align-items: stretch; }
.comparison-player-card { overflow: hidden; padding: 17px; }
.comparison-card-a { border-top: 3px solid #52a7ff; }
.comparison-card-b { border-top: 3px solid #b16cff; }
.comparison-card-profile { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.comparison-card-profile h3 { margin: 4px 0; font-size: 22px; }
.comparison-card-profile p { margin: 0; color: var(--muted); font-size: 13px; }
.comparison-kicker { color: var(--comparison-accent, var(--blue)); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.comparison-profile-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; color: #b3bdd3; font-size: 12px; }
.comparison-profile-meta span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; }
.comparison-direct-metrics { display: grid; gap: 0; margin-top: 7px; }
.comparison-direct-metric { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.055); color: #aeb8ce; font-size: 12px; }
.comparison-direct-metric strong { color: #e9eef9; font-variant-numeric: tabular-nums; }
.comparison-direct-metric.comparison-best strong { color: var(--green); }
.comparison-radar-panel { min-width: 0; padding: 15px; }
.comparison-radar-panel canvas,
.comparison-visual-grid canvas { display: block; width: 100%; }
.comparison-radar-legend { justify-content: center; color: #b8c2d8; font-size: 12px; }
.comparison-radar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.comparison-radar-legend i,
.comparison-bar-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.comparison-radar-status { margin: 10px auto 0; max-width: 430px; color: var(--muted); font-size: 11px; line-height: 1.4; text-align: center; }
.comparison-player-data-status { margin: 10px 0 0 !important; padding: 7px 9px; border: 1px dashed rgba(255,196,0,.4); border-radius: 7px; color: #d8bd70 !important; font-size: 11px !important; }
.comparison-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.comparison-summary-panel { min-width: 0; padding: 15px; }
.comparison-side-by-side { display: grid; gap: 10px; }
.comparison-side-head,
.comparison-side-row { display: grid; grid-template-columns: minmax(58px, 1fr) minmax(105px, 1.45fr) minmax(58px, 1fr); align-items: center; gap: 8px; text-align: center; }
.comparison-side-head { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.comparison-side-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.comparison-side-head .comparison-side-a { color: #52a7ff; }
.comparison-side-head .comparison-side-b { color: #b16cff; }
.comparison-side-head em { color: var(--yellow); font-size: 10px; font-style: normal; font-weight: 900; letter-spacing: .1em; }
.comparison-side-row { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.055); }
.comparison-side-row > span { color: var(--muted); font-size: 11px; line-height: 1.2; }
.comparison-side-value { color: var(--text); font-size: 12px; font-variant-numeric: tabular-nums; }
.comparison-side-value.comparison-side-a { color: #cfe7ff; }
.comparison-side-value.comparison-side-b { color: #eadbff; }
.comparison-side-value.comparison-best { color: var(--green) !important; }
.comparison-direct-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; text-align: center; }
.comparison-duel-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.comparison-duel-score span { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.comparison-duel-score strong { color: var(--text); font-size: 24px; }
.comparison-duel-score em { color: var(--yellow); font-size: 11px; font-style: normal; font-weight: 900; }
.comparison-balance { margin: 13px 0 0; text-align: center; color: var(--muted); font-size: 12px; }
.comparison-balance strong { color: var(--text); }
.comparison-unavailable { display: grid; gap: 7px; padding: 12px; border: 1px dashed #3a4356; border-radius: 8px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.comparison-unavailable strong { color: #d0d8e9; }
.comparison-summary-lines { display: grid; gap: 10px; color: var(--muted); font-size: 12px; }
.comparison-summary-lines span { display: flex; justify-content: space-between; gap: 8px; }
.comparison-summary-lines b { color: var(--text); }
.comparison-timeline-panel,
.comparison-history-panel { padding: 15px; }
.comparison-timeline { display: grid; gap: 8px; max-height: 410px; overflow: auto; padding: 2px 4px; }
.comparison-timeline-item { display: grid; grid-template-columns: 150px 22px 1fr; align-items: center; gap: 10px; padding: 9px 11px; border-left: 3px solid #52a7ff; border-radius: 6px; background: rgba(82,167,255,.06); font-size: 12px; }
.comparison-timeline-item.timeline-b { border-left-color: #b16cff; background: rgba(177,108,255,.06); }
.comparison-timeline-item time { color: var(--muted); font-variant-numeric: tabular-nums; }
.comparison-timeline-arrow { color: var(--yellow); text-align: center; }
.comparison-history-pager { justify-content: flex-end; font-size: 12px; }
.comparison-history-scroll { overflow-x: auto; }
.comparison-history-table { width: 100%; min-width: 780px; }
.comparison-history-table th,
.comparison-history-table td { padding: 10px 11px; white-space: nowrap; }
.comparison-history-table .history-a { color: #52a7ff; }
.comparison-history-table .history-b { color: #b16cff; }
.comparison-visual-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, 1fr); gap: 14px; }
.comparison-visual-grid > .panel { min-width: 0; padding: 15px; }
.comparison-bars { display: grid; gap: 20px; padding: 20px 0 10px; }
.comparison-bar-row { display: grid; gap: 8px; }
.comparison-bar-row > div:first-child { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.comparison-bar-row b { color: var(--text); }
.comparison-bar-track { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; height: 10px; }
.comparison-bar-track i { display: block; min-width: 2px; border-radius: 4px; }
.comparison-bar-track .bar-a { justify-self: end; background: #52a7ff; }
.comparison-bar-track .bar-b { background: #b16cff; }
.bar-a { background: #52a7ff; }
.bar-b { background: #b16cff; }
.comparison-bar-legend { justify-content: center; margin-top: 14px; color: var(--muted); font-size: 12px; }
.comparison-bar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.comparison-heatmap { position: relative; min-height: 280px; overflow: hidden; border: 1px solid #2d374b; border-radius: 10px; background: radial-gradient(circle at 50% 50%, rgba(82,167,255,.08), transparent 50%), #0a0e18; }
.comparison-heat-point { position: absolute; width: 11px; height: 11px; border: 2px solid #08101e; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 5px rgba(82,167,255,.15), 0 0 16px rgba(82,167,255,.7); background: #52a7ff; }
.comparison-heat-point.heat-b { background: #b16cff; box-shadow: 0 0 0 5px rgba(177,108,255,.15), 0 0 16px rgba(177,108,255,.7); }
.comparison-data-note { padding: 12px 15px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.comparison-data-note strong { color: var(--text); }
@media (max-width: 1120px) {
  .comparison-duel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comparison-radar-panel { grid-column: 1 / -1; grid-row: 1; }
  .comparison-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .comparison-filters { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
}
@media (max-width: 680px) {
  .comparison-picker-head,
  .comparison-hero-actions { align-items: flex-start; flex-direction: column; }
  .comparison-toolbar-actions { width: 100%; }
  .comparison-toolbar-actions button { flex: 1; }
  .comparison-player-selectors { grid-template-columns: 1fr; align-items: stretch; }
  .comparison-vs { width: 42px; height: 34px; border-radius: 9px; justify-self: center; }
  .comparison-filters,
  .comparison-summary-grid,
  .comparison-duel-grid,
  .comparison-visual-grid { grid-template-columns: 1fr; }
  .comparison-radar-panel { grid-column: auto; grid-row: auto; }
  .comparison-timeline-item { grid-template-columns: 1fr 18px; }
  .comparison-timeline-item strong { grid-column: 1 / -1; }
}
@media print {
  .sidebar, .topbar, .comparison-toolbar, .comparison-hero-actions, .comparison-loading { display: none !important; }
  .content, .view, .comparison-dashboard { display: block !important; }
  .comparison-dashboard { color: #111; }
}

#playersTab,
#guildsTab,
#classesTab,
#threatsTab {
  overflow: visible;
}

#rankings .ranking-table-shell {
  max-width: 100%;
  overflow-x: auto;
}

#rankings .ranking-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

#rankings .ranking-table th,
#rankings .ranking-table td {
  white-space: nowrap;
}

.upload-form {
  display: grid;
  gap: 14px;
}

.file-drop {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, .02);
}

.file-drop input {
  margin-top: 10px;
}

.file-drop span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.upload-file-list {
  min-height: 22px;
}

.upload-file-list-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-file-list-inner span {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: #07090d;
  color: var(--text);
}

.upload-file-list-inner small {
  color: var(--muted);
}

.upload-status-list {
  display: grid;
  gap: 10px;
}

.upload-status-list span {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
}

.upload-history-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: #07090d;
  margin-bottom: 12px;
}

.upload-history-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.upload-history-main h3 {
  margin: 2px 0 4px;
  font-size: 18px;
}

.upload-history-main span {
  color: var(--muted);
  font-size: 13px;
}

.upload-history-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.danger-btn {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

.modal-card {
  background:
    linear-gradient(180deg, rgba(18, 23, 36, .98), rgba(11, 14, 22, .98));
  border-color: rgba(135, 144, 173, .2);
}

.breakdown-card {
  background: #0b0f18;
  border-color: rgba(135, 144, 173, .16);
}

/* Black/gray theme overrides */
:root {
  --bg: #050505;
  --panel: #101010;
  --panel-2: #161616;
  --line: #2a2a2a;
  --text: #f4f4f4;
  --muted: #9a9a9a;
  --blue: #a8a8a8;
  --purple: #b8b8b8;
}

body {
  background: #050505;
}

.sidebar {
  background: #080808;
}

.nav-btn,
.tab,
.bucket,
.ghost-btn,
.danger-btn,
input,
select {
  background: #121212;
  border-color: #2a2a2a;
}

.nav-btn.active,
.tab.active,
.bucket.active {
  background: #242424;
  border-color: #444;
}

.ghost-btn:hover,
.nav-btn:hover,
.tab:hover,
.bucket:hover {
  border-color: #5a5a5a;
}

input,
select {
  color: #f4f4f4;
}

.hero-card,
.panel,
.metric,
.matrix-card,
.streak-card {
  background: linear-gradient(180deg, #101010, #080808);
  border-color: #2a2a2a;
}

.view-hero,
#imports .view-hero,
.modal-card {
  background:
    radial-gradient(circle at 86% 35%, rgba(255, 255, 255, .07), transparent 30%),
    linear-gradient(180deg, rgba(18, 18, 18, .98), rgba(8, 8, 8, .98));
  border-color: rgba(255, 255, 255, .11);
}

table th,
.ranking-table th {
  color: #9a9a9a;
}

td,
.ranking-table td,
.ranking-player-name,
.ranking-number {
  color: #d8d8d8;
}

th,
td {
  border-bottom-color: #202020;
}

.ranking-table-shell {
  border-color: rgba(255, 255, 255, .11);
  background:
    linear-gradient(180deg, rgba(15, 15, 15, .98), rgba(8, 8, 8, .98)),
    #080808;
}

.ranking-table thead {
  background: linear-gradient(180deg, rgba(22, 22, 22, .98), rgba(12, 12, 12, .98));
}

.ranking-table th,
.ranking-table td {
  border-bottom-color: rgba(255, 255, 255, .08);
}

.ranking-table tbody tr {
  background: rgba(10, 10, 10, .78);
}

.ranking-table tbody tr:nth-child(even) {
  background: rgba(18, 18, 18, .78);
}

.ranking-table tbody tr:hover {
  background: rgba(34, 34, 34, .86);
}

.ranking-table:not(.ranking-table--guilds):not(.ranking-table--classes):not(.ranking-table--threats) th:nth-child(8),
.ranking-table:not(.ranking-table--guilds):not(.ranking-table--classes):not(.ranking-table--threats) td:nth-child(8) {
  border-left-color: rgba(255, 255, 255, .11);
}

.bar-track,
.chip,
.chart-panel canvas,
.breakdown-card {
  background: #121212;
  border-color: rgba(255, 255, 255, .1);
}

.sort-indicator {
  color: #bdbdbd;
}

.sort-indicator.idle {
  color: #686868;
}

.tag.guild-enemy-c {
  border-color: #575757;
  color: #d0d0d0;
  background: rgba(255, 255, 255, .08);
}

.tag.guild-enemy-d {
  border-color: #696969;
  color: #e0e0e0;
  background: rgba(255, 255, 255, .1);
}

.tag.guild-enemy-e {
  border-color: #4d4d4d;
  color: #c6c6c6;
  background: rgba(255, 255, 255, .07);
}

.guild-kill.guild-enemy-c,
.guild-kill.guild-enemy-d,
.guild-kill.guild-enemy-e {
  color: #d0d0d0;
}

.filters,
.topbar,
.panel-head,
.tabs,
.segmented {
  color: #d0d0d0;
}

.filters {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  background: rgba(5, 5, 5, .96);
  border-color: #2a2a2a;
}

.filters label,
.wide-label,
.brand small,
.muted,
.sidebar-footer,
.eyebrow {
  color: #8f8f8f;
}

input,
select,
.nav-btn,
.tab,
.bucket,
.ghost-btn,
.danger-btn,
.panel,
.metric,
.hero-card,
.ranking-table-shell,
.modal-card,
.breakdown-card {
  background-color: #080808;
}

input,
select {
  background: #080808;
  border-color: #333;
}

input:focus,
select:focus {
  outline: none;
  border-color: #6a6a6a;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .06);
}

.nav-btn,
.tab,
.bucket,
.ghost-btn {
  background: #0b0b0b;
}

.nav-btn.active,
.tab.active,
.bucket.active {
  background: #181818;
  border-color: #555;
}

#rankings .tabs,
.tabs {
  background: #050505;
  border-color: #2f2f2f;
}

#rankings .tab,
.tab {
  background: #080808;
  border-color: #2b2b2b;
  color: #d6d6d6;
}

#rankings .tab:hover,
.tab:hover {
  background: #101010;
  border-color: #4a4a4a;
  color: #fff;
}

#rankings .tab.active,
.tab.active {
  background: #111;
  border-color: #4a4a4a;
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--yellow);
}

.ranking-table-shell {
  background:
    linear-gradient(180deg, rgba(10, 10, 10, .98), rgba(3, 3, 3, .98)),
    #050505;
}

.ranking-table thead {
  background: linear-gradient(180deg, rgba(18, 18, 18, .98), rgba(7, 7, 7, .98));
}

.ranking-table tbody tr {
  background: #060606;
}

.ranking-table tbody tr:nth-child(even) {
  background: #0b0b0b;
}

.ranking-table tbody tr:hover {
  background: #181818;
}

#dashboard {
  max-width: 1124px;
  margin: 0 auto;
}

#dashboard > .two-col {
  display: none;
}

/* Final ranking table fit: keep every column reachable in one table. */
#playersTab,
#guildsTab,
#classesTab,
#threatsTab {
  min-width: 0;
  overflow: visible;
}

#rankings .ranking-table-shell {
  width: 100%;
  max-width: calc(100vw - 302px);
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-color: #555 #111;
}

#rankings .ranking-table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
}

#rankings .ranking-table th,
#rankings .ranking-table td {
  padding-left: 10px;
  padding-right: 10px;
  white-space: nowrap;
}

#rankings .ranking-table th {
  font-size: 10px;
}

#rankings .sort-head.compact-head {
  max-width: 86px;
  white-space: normal;
  line-height: 1.15;
  text-align: center;
}

#exclusiveRankings .exclusive-ranking-tabs {
  background: #050505;
  border-color: #2f2f2f;
}

#exclusiveRankings .tab-page.panel {
  padding: 0;
}

.exclusive-ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #242424;
  background: linear-gradient(180deg, rgba(18, 18, 18, .96), rgba(7, 7, 7, .96));
}

.exclusive-ranking-head h3 {
  margin: 0 0 6px;
  color: #fff;
}

.exclusive-ranking-head span {
  color: var(--muted);
  font-size: 13px;
}

.exclusive-ranking-head strong {
  color: var(--green);
  font-size: 18px;
  white-space: nowrap;
}

#exclusiveRankings .ranking-table-shell {
  width: 100%;
  max-width: calc(100vw - 302px);
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-color: #555 #111;
}

#exclusiveRankings .ranking-table {
  width: 100%;
  min-width: 760px;
  table-layout: auto;
}

#exclusiveRankings .ranking-table th,
#exclusiveRankings .ranking-table td {
  white-space: nowrap;
}

#exclusiveRankings .player-link {
  font-weight: 800;
}

#rankings .ranking-number {
  min-width: 54px;
  text-align: right;
}

#rankings .ranking-number-warning {
  color: var(--yellow);
  text-shadow: 0 0 12px rgba(255, 196, 0, .25);
}

#rankings .class-cell {
  min-width: 108px;
}

.guild-rank-layout {
  display: grid;
  gap: 14px;
}

.guild-rank-summary {
  color: #b7bdc8;
  font-size: 14px;
}

.guild-rank-sortbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guild-rank-sortbar .sort-head {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #303030;
  border-radius: 8px;
  background: #0b0b0b;
  color: var(--text);
}

.guild-rank-sortbar .sort-head:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.guild-rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
}

.guild-rank-card {
  border: 1px solid #4a4a4a;
  border-radius: 12px;
  background: #111;
  padding: 24px;
  min-height: 250px;
}

.guild-rank-card.guild-own {
  border-color: rgba(0, 226, 161, .75);
  background: linear-gradient(135deg, rgba(0, 226, 161, .08), #111 45%);
}

.guild-rank-card.guild-enemy-a {
  border-color: rgba(255, 48, 96, .9);
  background: linear-gradient(135deg, rgba(255, 48, 96, .14), #111 48%);
}

.guild-rank-card.guild-enemy-b,
.guild-rank-card.guild-enemy-c,
.guild-rank-card.guild-enemy-d,
.guild-rank-card.guild-enemy-e {
  border-color: rgba(255, 204, 0, .6);
}

.guild-rank-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 38px;
}

.guild-rank-card h3 {
  margin: 0;
  font-size: 18px;
}

.guild-rank-card header > span {
  border: 1px solid #616161;
  border-radius: 8px;
  background: #2b2b2b;
  color: #f3f3f3;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 12px;
  white-space: nowrap;
}

.guild-rank-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.guild-rank-stats div {
  display: grid;
  place-items: center;
  min-height: 62px;
  border: 1px solid #575757;
  border-radius: 3px;
  background: #3d3d3d;
}

.guild-rank-stats .wide {
  grid-column: 1 / -1;
}

.guild-rank-stats .kd-box {
  border-color: #696969;
  background: #2f2f2f;
}

.guild-rank-stats strong {
  font-size: 20px;
  line-height: 1;
}

.guild-rank-stats span {
  color: #b8bcc6;
  font-size: 12px;
}

@media (max-width: 900px) {
  #rankings .ranking-table-shell {
    max-width: calc(100vw - 32px);
  }

  .guild-rank-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-event-card {
  min-height: 106px;
  margin-bottom: 0;
  padding: 19px 20px;
  align-items: flex-start;
  background: #111217;
  border-color: #282a34;
}

.dashboard-config-row {
  display: grid;
  grid-template-columns: minmax(260px, .95fr) minmax(300px, 1.15fr) minmax(300px, 1.15fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 22px;
}

.dashboard-event-card .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  text-transform: none;
  letter-spacing: 0;
}

.dashboard-event-card .eyebrow em {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 60, 112, .18);
  color: var(--pink);
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
}

.dashboard-event-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #fff;
}

.battle-card {
  overflow: hidden;
  min-height: 172px;
  border: 1px solid;
  border-radius: 18px;
  background: #090b0d;
}

.dashboard-config-row .dashboard-event-card,
.dashboard-config-row .battle-card {
  height: 100%;
}

.alliance-card {
  border-color: rgba(0, 226, 162, .38);
  background:
    radial-gradient(circle at 92% 40%, rgba(0, 226, 162, .10), transparent 34%),
    linear-gradient(180deg, rgba(0, 226, 162, .06), rgba(0, 226, 162, .03)),
    #090d0d;
}

.enemies-card {
  border-color: rgba(255, 60, 112, .42);
  background:
    radial-gradient(circle at 92% 40%, rgba(255, 60, 112, .14), transparent 34%),
    linear-gradient(180deg, rgba(255, 60, 112, .08), rgba(255, 60, 112, .03)),
    #0d090b;
}

.battle-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 22px 12px;
}

.battle-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.alliance-card .battle-icon {
  background: var(--green);
}

.enemies-card .battle-icon {
  background: var(--pink);
}

.battle-title h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.alliance-card h3 {
  color: var(--green);
}

.enemies-card h3 {
  color: #ff5d7d;
}

.battle-title small {
  color: #929292;
}

.battle-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 0 22px 18px;
}

.battle-stats small {
  display: block;
  margin-bottom: 4px;
  color: #888;
  font-size: 11px;
  letter-spacing: .08em;
}

.battle-stats strong {
  color: #fff;
  font-size: 25px;
  line-height: 1;
}

.alliance-card .battle-stats span:nth-child(3) strong {
  color: var(--green);
}

.enemies-card .battle-stats span:nth-child(3) strong {
  color: var(--yellow);
}

.battle-card footer {
  padding: 11px 22px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #8d8d8d;
  font-size: 12px;
}

.battle-card footer b {
  color: inherit;
}

.alliance-card footer b {
  color: var(--green);
}

.enemies-card footer b {
  color: #ff5d7d;
}

#dashboard .chart-panel {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 16px;
  border-color: #282a34;
  background: #111217;
}

#dashboard .chart-panel::before {
  content: "";
  position: absolute;
  inset: 0 12px auto;
  height: 2px;
  background: linear-gradient(90deg, var(--green), rgba(255, 196, 0, .55), var(--pink));
}

#dashboard .panel h3::before {
  display: none;
}

#dashboard .timeline-head h3 {
  margin-bottom: 7px;
  color: #fff;
}

#dashboard .timeline-live-chart {
  min-height: 270px;
  border: 0;
  background:
    radial-gradient(circle at 25% 62%, rgba(255, 255, 255, .025), transparent 28%),
    #111217;
}

#dashboard .timeline-svg {
  height: 270px;
}

#dashboard .timeline-path {
  stroke-width: 3;
}

#dashboard .timeline-grid-row line {
  stroke: rgba(255, 255, 255, .055);
}

#dashboard .timeline-axis-label,
#dashboard .timeline-grid-row text {
  fill: #60636c;
}

@media (max-width: 900px) {
  .dashboard-config-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1400px) {
  .filters { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
}

@media (max-width: 1120px) {
  .tabs { width: 100%; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .metric-grid { grid-template-columns: 1fr; }
  .tabs { align-items: stretch; }
  .tab { flex: 1 1 auto; }
}

.comparison-picker-panel {
  padding: 16px;
}

.comparison-picker-head,
.comparison-context,
.comparison-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.comparison-picker-head h3,
.comparison-card-head h3 {
  margin-bottom: 5px;
}

.comparison-picker-head p,
.comparison-card-head p {
  margin: 0;
}

.comparison-picker-control {
  position: relative;
  margin-top: 16px;
}

.comparison-picker-control label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.comparison-suggestions {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
  padding: 7px;
  border: 1px solid #303030;
  border-radius: 10px;
  background: #0b0b0b;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .45);
}

.comparison-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #121212;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.comparison-suggestion:hover {
  border-color: var(--yellow);
  background: #181818;
}

.comparison-suggestion span {
  color: var(--muted);
  font-size: 12px;
}

.comparison-suggestion-empty {
  padding: 8px;
}

.comparison-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
  margin-top: 18px;
}

.comparison-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 8px 4px 11px;
  border: 1px solid #48515f;
  border-radius: 999px;
  background: #15191f;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.comparison-chip button,
.comparison-remove-btn {
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.comparison-chip button {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #bfc5ce;
  font-size: 16px;
}

.comparison-chip button:hover,
.comparison-remove-btn:hover {
  color: var(--yellow);
}

.comparison-chip-0,
.comparison-card-0 { --comparison-accent: #52a7ff; }
.comparison-chip-1,
.comparison-card-1 { --comparison-accent: #b16cff; }
.comparison-chip-2,
.comparison-card-2 { --comparison-accent: #00e2a2; }
.comparison-chip-3,
.comparison-card-3 { --comparison-accent: #ffc400; }
.comparison-chip-4,
.comparison-card-4 { --comparison-accent: #ff6a88; }
.comparison-chip-5,
.comparison-card-5 { --comparison-accent: #5ee7ef; }

.comparison-chip[class*="comparison-chip-"] {
  border-color: var(--comparison-accent);
}

.comparison-context {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid #202020;
  color: var(--muted);
  font-size: 12px;
}

.comparison-context strong {
  color: #fff;
}

.comparison-message {
  min-height: 24px;
  margin: 10px 2px;
}

.comparison-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.comparison-player-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid #2d333e;
  border-top: 3px solid var(--comparison-accent);
  border-radius: 12px;
  background: linear-gradient(180deg, #111, #080808);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

.comparison-card-head {
  align-items: flex-start;
  margin-bottom: 15px;
}

.comparison-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--comparison-accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}

.comparison-card-head h3 {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
  font-size: 20px;
}

.comparison-card-head p {
  color: #a4abb6;
  font-size: 12px;
}

.comparison-remove-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #30353d;
  border-radius: 8px;
  color: #9a9a9a;
  font-size: 20px;
}

.comparison-card-metrics {
  display: grid;
  gap: 9px;
}

.comparison-metric-row {
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.comparison-metric-row > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.comparison-metric-row span {
  color: #b5bac4;
  font-size: 12px;
}

.comparison-metric-row strong {
  color: #f2f3f5;
  font-size: 13px;
  white-space: nowrap;
}

.comparison-metric-row.comparison-best strong,
.comparison-table td.comparison-best {
  color: var(--comparison-accent, var(--green));
}

.comparison-meter {
  height: 5px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #23272d;
}

.comparison-meter i {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--comparison-accent);
}

.comparison-no-data-message {
  padding: 22px 8px;
  border: 1px dashed #3a3a3a;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.comparison-table-shell {
  overflow-x: auto;
}

.comparison-table {
  min-width: 760px;
}

.comparison-table th,
.comparison-table td {
  padding: 11px 13px;
}

.comparison-table thead th:not(:first-child) {
  color: #fff;
  text-transform: none;
}

.comparison-table tbody th {
  min-width: 200px;
  color: #b9bec8;
  font-weight: 600;
  text-transform: none;
}

.comparison-table td {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.comparison-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #aaa;
}

.comparison-dot-0 { background: #52a7ff; }
.comparison-dot-1 { background: #b16cff; }
.comparison-dot-2 { background: #00e2a2; }
.comparison-dot-3 { background: #ffc400; }
.comparison-dot-4 { background: #ff6a88; }
.comparison-dot-5 { background: #5ee7ef; }

@media (max-width: 720px) {
  .comparison-picker-head,
  .comparison-context {
    align-items: flex-start;
    flex-direction: column;
  }

  .comparison-picker-head .ghost-btn {
    width: 100%;
  }

  .comparison-player-card {
    padding: 14px;
  }
}
