@import url("https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg: #080a0b;
  --bg-2: #101719;
  --surface: rgba(10, 13, 14, 0.88);
  --surface-solid: #0b0e0f;
  --surface-raised: #151c1d;
  --panel: #111719;
  --line: rgba(218, 181, 130, 0.2);
  --line-strong: rgba(255, 75, 10, 0.7);
  --text: #f5eee3;
  --muted: #c9bca9;
  --subtle: rgba(201, 188, 169, 0.7);
  --gold: #ff5a14;
  --accent: #ff5a14;
  --orange: #ff5a14;
  --cyan: #22d9d3;
  --sand: #d2ac76;
  --steel: #68898a;
  --green: #22d9d3;
  --red: #ff5a14;
  --pink: #ff8555;
  --positive: #42ded5;
  --negative: #ff6430;
  --ink: #070809;
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.42), 0 2px 12px rgba(0, 0, 0, 0.34);
  --glow-orange: 0 0 28px rgba(255, 75, 10, 0.2);
  --glow-cyan: 0 0 24px rgba(34, 217, 211, 0.16);
  --radius: 6px;
  --mono: "Chakra Petch", "Manrope", sans-serif;
  --sans: "Manrope", "Chakra Petch", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--sans);
  background:
    linear-gradient(180deg, rgba(4, 6, 7, 0.5), rgba(4, 6, 7, 0.76)),
    radial-gradient(circle at 50% 18%, transparent 0 24%, rgba(4, 7, 8, 0.34) 66%, rgba(4, 6, 7, 0.7) 100%),
    url("/neon-grain-background.webp") center top / cover fixed no-repeat,
    #080a0b;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  z-index: 100;
  background:
    repeating-linear-gradient(180deg, transparent 0 2px, rgba(255, 255, 255, 0.024) 2px 3px),
    linear-gradient(90deg, rgba(255, 68, 8, 0.012), transparent 35%, rgba(28, 220, 211, 0.012));
  opacity: 0.24;
  animation: crtFlicker 7s steps(1, end) infinite;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.48) 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
input {
  color: inherit;
}

svg {
  width: 18px;
  height: 18px;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(1520px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 44px;
}

.command-bar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(360px, 1.35fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 74px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 23, 21, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: panelIn 520ms ease both;
}

.brand-mark {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.brand-mark:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.brand-mark:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 5px;
}

.brand-mark img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(219, 169, 94, 0.34));
}

.brand-mark strong,
.brand-mark span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark strong {
  font-family: var(--mono);
  font-size: clamp(1.15rem, 2vw, 1.8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.brand-mark span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.search-box {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 0 7px 0 14px;
  border: 1px solid rgba(219, 169, 94, 0.36);
  border-radius: var(--radius);
  background: rgba(24, 23, 21, 0.72);
}

.search-box:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(219, 169, 94, 0.16);
}

.search-box svg {
  color: var(--gold);
}

.search-box input,
.table-toolbar input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-box input::placeholder,
.table-toolbar input::placeholder {
  color: var(--subtle);
}

.search-box button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid rgba(219, 169, 94, 0.46);
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--ink);
  padding: 0 14px;
  font-weight: 700;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.search-box button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.server-badge,
.alliance-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(41, 51, 45, 0.24);
  color: var(--gold);
  font-family: var(--mono);
  font-weight: 700;
  white-space: nowrap;
}

.ops-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.68fr);
  gap: 18px;
  align-items: end;
  margin: 22px 0 14px;
  padding: 14px 4px 18px;
  border-bottom: 1px solid var(--line);
  animation: riseIn 640ms ease 80ms both;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ops-hero h1 {
  max-width: 860px;
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(2.3rem, 5vw, 5.8rem);
  font-weight: 700;
  line-height: 0.9;
  color: transparent;
  background: linear-gradient(100deg, #181715 0 40%, #f3ead7 40.5% 100%);
  background-clip: text;
  filter: drop-shadow(0 16px 28px rgba(10, 10, 8, 0.18));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.source-ledger {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.source-ledger span {
  display: block;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.source-ledger b {
  color: var(--text);
  font-family: var(--mono);
  text-transform: uppercase;
}

.status-line {
  min-height: 24px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-line[data-tone="error"] {
  color: var(--red);
}

.status-line:empty {
  display: none;
}

.home-board {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(24, 23, 21, 0.94), rgba(41, 51, 45, 0.26)),
    repeating-linear-gradient(135deg, rgba(243, 234, 215, 0.025) 0 1px, transparent 1px 12px);
  box-shadow: var(--shadow);
  animation: riseIn 640ms ease 120ms both;
}

.home-intro {
  display: grid;
  gap: 8px;
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--line);
}

.home-intro .section-kicker {
  margin: 0;
}

.home-intro h1 {
  max-width: 960px;
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(1.75rem, 3.4vw, 3.35rem);
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.surface-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.surface-title > div {
  min-width: 0;
}

.surface-title h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.08rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.surface-title span,
.list-row small,
.guild-card p,
.battle-hero p,
.battle-hero span {
  color: var(--muted);
}

.surface-title span {
  display: block;
  min-width: 0;
  margin-top: 4px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.top-guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.top-guild-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.top-guild-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 23, 21, 0.78);
}

.top-guild-panel .top-guild-grid {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.top-guild-panel-head {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: rgba(41, 51, 45, 0.24);
}

.top-guild-panel-head h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 1rem;
}

.top-guild-panel-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.top-guild-card,
.result-tile {
  border: 0;
  background: rgba(24, 23, 21, 0.88);
  color: var(--text);
  text-align: left;
  transition: background 160ms ease, transform 160ms ease, color 160ms ease;
}

.top-guild-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 66px;
  padding: 10px;
  text-decoration: none;
}

.top-guild-card:hover,
.result-tile:hover,
.list-row:hover {
  background: rgba(219, 169, 94, 0.12);
}

.top-guild-card strong,
.top-guild-card small,
.result-tile strong,
.result-tile small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-guild-card small,
.result-tile small {
  color: var(--muted);
}

.top-guild-card b,
.result-tile b {
  min-width: 0;
  max-width: 10ch;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-guild-card b {
  color: var(--positive);
}

.top-rank {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: rgba(219, 169, 94, 0.16);
  color: var(--gold);
  font-family: var(--mono);
  font-weight: 700;
}

.home-distribution {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.distribution-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.distribution-panel {
  min-width: 0;
  padding: 12px;
  background: rgba(24, 23, 21, 0.82);
}

.distribution-panel h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.mini-chart {
  height: 184px;
  min-width: 0;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.range-filter {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  background: rgba(24, 23, 21, 0.82);
}

.range-filter span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.range-filter b {
  color: var(--text);
  font-weight: 700;
  text-align: right;
  text-transform: none;
}

.dual-range {
  --range-left: 0%;
  --range-right: 100%;
  position: relative;
  height: 34px;
  min-width: 0;
}

.dual-range::before,
.dual-range::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 7px;
  border-radius: 999px;
  transform: translateY(-50%);
}

.dual-range::before {
  background: rgba(243, 234, 215, 0.28);
  box-shadow: inset 0 0 0 1px rgba(243, 234, 215, 0.22);
}

.dual-range::after {
  left: var(--range-left);
  right: calc(100% - var(--range-right));
  background: linear-gradient(90deg, var(--gold), var(--positive));
  box-shadow: 0 0 18px rgba(219, 169, 94, 0.2);
}

.dual-range input[type="range"] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 34px;
  margin: 0;
  appearance: none;
  background: transparent;
  pointer-events: none;
}

.dual-range input[type="range"]::-webkit-slider-runnable-track {
  height: 34px;
  background: transparent;
}

.dual-range input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: 8px;
  appearance: none;
  border: 2px solid var(--text);
  border-radius: 50%;
  background: var(--panel);
  box-shadow: 0 0 0 2px rgba(24, 23, 21, 0.82), 0 3px 10px rgba(0, 0, 0, 0.28);
  cursor: grab;
  pointer-events: auto;
}

.dual-range input[type="range"]::-moz-range-track {
  height: 34px;
  background: transparent;
  border: 0;
}

.dual-range input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid var(--text);
  border-radius: 50%;
  background: var(--panel);
  box-shadow: 0 0 0 2px rgba(24, 23, 21, 0.82), 0 3px 10px rgba(0, 0, 0, 0.28);
  cursor: grab;
  pointer-events: auto;
}

.dual-range input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.dual-range input[type="range"]:focus-visible::-moz-range-thumb {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.compact-title {
  margin-top: 4px;
}

.home-guild-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.home-guild-list.is-scrollable {
  max-height: var(--home-guild-list-height, 854px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 90, 20, 0.72) rgba(8, 11, 12, 0.92);
  scrollbar-gutter: stable;
}

.home-guild-list:focus-visible {
  outline: 2px solid rgba(255, 90, 20, 0.72);
  outline-offset: 3px;
}

.home-guild-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(80px, auto) minmax(92px, auto);
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 10px 12px;
  border: 0;
  background: rgba(24, 23, 21, 0.86);
  color: var(--text);
  text-align: left;
}

.home-guild-row:hover {
  background: rgba(219, 169, 94, 0.12);
}

.home-guild-row strong,
.home-guild-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-guild-row small {
  color: var(--muted);
}

.home-guild-row b,
.home-guild-row em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  animation: riseIn 520ms ease both;
}

.search-results:empty {
  display: none;
}

.search-result-group {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 23, 21, 0.82);
}

.search-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(41, 51, 45, 0.24);
}

.search-result-head h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 1rem;
}

.search-result-head span {
  color: var(--gold);
  font-family: var(--mono);
  font-weight: 700;
}

.search-result-list {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.result-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 12px;
}

.result-tile > span {
  min-width: 0;
}

.workspace {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  animation: riseIn 520ms ease both;
}

.guild-rail {
  position: sticky;
  top: 102px;
  display: grid;
  gap: 10px;
}

.guild-card,
.surface,
.battle-report-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.guild-card {
  padding: 16px;
}

.guild-card #guildName {
  margin: 6px 0 12px;
  font-family: var(--mono);
  font-size: clamp(1.85rem, 2.35vw, 2.5rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

.guild-card #guildName.guild-name-medium {
  font-size: clamp(1.65rem, 2vw, 2.15rem);
}

.guild-card #guildName.guild-name-long {
  font-size: clamp(1.4rem, 1.65vw, 1.8rem);
  overflow-wrap: anywhere;
}

.guild-card p {
  margin: 0;
  font-size: 0.9rem;
}

.guild-card .alliance-pill {
  justify-content: flex-start;
  width: 100%;
  min-height: 0;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid rgba(210, 172, 118, 0.16);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0.72;
  white-space: normal;
}

.tab-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.tab-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 0;
  background: rgba(24, 23, 21, 0.86);
  color: var(--muted);
  padding: 0 12px;
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
}

.tab-button.active {
  background: linear-gradient(100deg, #ead7b2, #d5b574);
  color: #1a1711;
  font-weight: 600;
  text-shadow: none;
}

.tab-button.active svg {
  color: #1a1711;
  stroke-width: 2.2;
}

.main-stage {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.dashboard-brief {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  min-width: 0;
  padding: 4px 2px 12px;
  border-bottom: 1px solid var(--line);
}

.dashboard-brief h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(1.7rem, 2.7vw, 3rem);
  line-height: 0.9;
  overflow-wrap: anywhere;
}

.dashboard-brief .section-kicker {
  display: block;
  margin-bottom: 6px;
}

.dashboard-brief .source-ledger {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
  max-width: 560px;
}

.dashboard-brief .source-ledger span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(24, 23, 21, 0.64);
  color: var(--muted);
  font-size: 0.76rem;
  white-space: normal;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  box-shadow: var(--shadow);
}

.metric-strip article,
.report-metrics article {
  position: relative;
  min-width: 0;
  min-height: 98px;
  padding: 14px;
  background: rgba(24, 23, 21, 0.86);
}

.metric-strip span,
.report-metrics span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.metric-strip small {
  display: block;
  margin-top: 8px;
  color: var(--subtle);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-strip small b {
  font-weight: 700;
}

.metric-strip strong,
.report-metrics strong {
  display: block;
  font-family: var(--mono);
  font-size: clamp(1.35rem, 1.8vw, 2.05rem);
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.metric-card::after {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  content: "";
  background: rgba(224, 211, 184, 0.16);
}

.metric-card.good-stat::after {
  background: rgba(143, 214, 148, 0.68);
}

.metric-card.bad-stat::after {
  background: rgba(255, 122, 98, 0.7);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: grid;
  gap: 14px;
  animation: panelIn 260ms ease both;
}

.stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 14px;
}

.charts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 14px;
  align-items: stretch;
}

.analytics-surface {
  min-width: 0;
  height: 100%;
}

.analytics-content {
  min-width: 0;
}

.heatmap-scroll {
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-color: var(--line-strong) transparent;
}

.activity-heatmap {
  display: grid;
  min-width: 690px;
  gap: 4px;
}

.heatmap-hours,
.heatmap-row {
  display: grid;
  grid-template-columns: 34px repeat(24, minmax(18px, 1fr));
  gap: 4px;
  align-items: center;
}

.heatmap-hour {
  color: var(--subtle);
  font-family: var(--mono);
  font-size: 0.66rem;
  text-align: center;
}

.heatmap-row > b {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
}

.heatmap-cell {
  height: 22px;
  border: 1px solid rgba(224, 211, 184, 0.08);
  border-radius: 3px;
  background: rgba(219, 169, 94, var(--heat-opacity));
  transition: border-color 140ms ease, filter 140ms ease, transform 140ms ease;
}

.heatmap-cell:hover {
  z-index: 1;
  border-color: var(--gold);
  filter: brightness(1.18);
  transform: scale(1.12);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.heatmap-scale {
  display: flex;
  align-items: center;
  gap: 3px;
}

.heatmap-scale i {
  width: 14px;
  height: 8px;
  border-radius: 2px;
  background: rgba(219, 169, 94, 0.12);
}

.heatmap-scale i:nth-child(2) { background: rgba(219, 169, 94, 0.3); }
.heatmap-scale i:nth-child(3) { background: rgba(219, 169, 94, 0.5); }
.heatmap-scale i:nth-child(4) { background: rgba(219, 169, 94, 0.7); }
.heatmap-scale i:nth-child(5) { background: rgba(219, 169, 94, 0.92); }

.heatmap-scale small {
  margin-left: 4px;
}

.weapon-stats-list {
  display: grid;
  max-height: 306px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  scrollbar-color: var(--line-strong) transparent;
}

.weapon-stat-row {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  overflow: hidden;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(224, 211, 184, 0.16);
}

.weapon-share-fill {
  position: absolute;
  inset: 3px auto 3px 0;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(219, 169, 94, 0.18), rgba(132, 197, 138, 0.06));
  transition: width 360ms ease;
}

.weapon-stat-row > img,
.weapon-stat-row > b,
.weapon-stat-copy {
  position: relative;
  z-index: 1;
}

.weapon-stat-row > img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.weapon-stat-copy {
  min-width: 0;
}

.weapon-stat-copy strong,
.weapon-stat-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weapon-stat-copy small {
  color: var(--muted);
  font-size: 0.76rem;
}

.weapon-stat-row > b {
  color: var(--gold);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.player-analytics-grid > section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 23, 21, 0.48);
}

.surface,
.battle-report-panel {
  padding: 16px;
}

.chart {
  height: 308px;
  min-width: 0;
}

.period-panel {
  display: grid;
  gap: 10px;
}

.period-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.period-stats article {
  min-width: 0;
  min-height: 88px;
  padding: 12px;
  background: rgba(24, 23, 21, 0.84);
}

.period-stats span,
.period-stats small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.period-stats span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.period-stats strong {
  display: block;
  margin: 8px 0 6px;
  font-family: var(--mono);
  font-size: clamp(1.3rem, 2vw, 2rem);
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.period-stats article.combat strong {
  font-size: clamp(1.2rem, 1.55vw, 1.65rem);
  letter-spacing: -0.04em;
  overflow-wrap: normal;
  white-space: nowrap;
}

.period-stats small {
  color: var(--subtle);
  font-size: 0.74rem;
}

.period-stats article.good-stat strong,
.period-stats .stat-good,
.metric-strip article.good-stat strong,
.metric-strip .stat-good,
.report-metrics article.good-stat strong,
.good {
  color: var(--positive);
}

.period-stats article.bad-stat strong,
.period-stats .stat-bad,
.metric-strip article.bad-stat strong,
.metric-strip .stat-bad,
.report-metrics article.bad-stat strong,
.bad {
  color: var(--negative);
}

.period-stats .stat-separator,
.metric-strip .stat-separator {
  color: var(--muted);
}

.period-placeholder {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(24, 23, 21, 0.62);
}

.period-placeholder svg {
  color: var(--gold);
  animation: spin 900ms linear infinite;
}

.stack-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.list-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border: 0;
  color: var(--text);
  text-align: left;
  background: rgba(24, 23, 21, 0.86);
  transition: background 160ms ease;
}

.list-row strong,
.list-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row > b {
  justify-self: end;
  max-width: 10ch;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: rgba(41, 51, 45, 0.24);
  color: var(--muted);
}

.good-row .row-icon {
  background: rgba(132, 197, 138, 0.16);
  color: var(--positive);
}

.top-battle-row .row-icon {
  border: 1px solid rgba(219, 169, 94, 0.42);
  background: linear-gradient(145deg, rgba(219, 169, 94, 0.22), rgba(219, 169, 94, 0.08));
  color: var(--gold);
  box-shadow:
    0 0 14px rgba(219, 169, 94, 0.2),
    inset 0 0 10px rgba(219, 169, 94, 0.08);
}

.top-battle-row .row-icon svg {
  filter: drop-shadow(0 0 3px rgba(241, 199, 118, 0.62));
}

.bad-row .row-icon {
  background: rgba(228, 111, 85, 0.16);
  color: var(--negative);
}

.good-row > b {
  color: var(--positive);
}

.bad-row > b {
  color: var(--negative);
}

.table-toolbar input {
  max-width: 330px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 23, 21, 0.68);
}

.table-toolbar input:focus {
  border-color: var(--gold);
}

.table-frame {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 23, 21, 0.54);
}

.compact-table {
  max-height: 620px;
}

.roster-surface {
  min-width: 0;
}

.roster-table-frame {
  max-height: min(72vh, 760px);
}

.data-table.roster-table {
  min-width: 1120px;
}

.table-sort {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: inherit;
  text-transform: inherit;
  background: transparent;
  cursor: pointer;
}

th.num .table-sort {
  justify-content: flex-end;
}

.table-sort span {
  min-width: 1em;
  color: var(--subtle);
  font-family: var(--mono);
}

.table-sort:hover,
.table-sort.active {
  color: var(--text);
}

.table-sort.active span {
  color: var(--gold);
}

.roster-table th:first-child,
.roster-table td:first-child {
  position: sticky;
  left: 0;
}

.roster-table th:first-child {
  z-index: 3;
}

.roster-table td:first-child {
  z-index: 1;
  background: #1c1b18;
}

.tall {
  max-height: 560px;
}

.data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(224, 211, 184, 0.18);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-solid);
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.data-table td {
  background: rgba(24, 23, 21, 0.48);
}

.data-table th:not(.num),
.data-table td:not(.num) {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-table .data-table {
  min-width: 760px;
}

.report-table {
  min-width: 860px;
}

.key-value-table {
  min-width: 0;
  table-layout: fixed;
}

.key-value-table td {
  white-space: normal;
}

.key-value-table td:first-child {
  width: 58%;
  max-width: none;
  color: var(--text);
}

.key-value-table td:last-child {
  width: 42%;
  color: var(--text);
  font-weight: 700;
}

.num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

.fame-cell {
  min-width: 150px;
}

.good {
  color: var(--positive);
}

.bad {
  color: var(--negative);
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: rgba(219, 169, 94, 0.12);
}

.kill-feed {
  display: grid;
  gap: 8px;
}

.text-link {
  display: inline-grid;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.text-link:hover strong {
  color: var(--gold);
}

.text-link strong,
.text-link small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-link small {
  color: var(--muted);
  font-size: 0.78rem;
}

.kill-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 23, 21, 0.82);
}

.kill-card-button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  width: 100%;
  padding: 10px;
  color: var(--text);
  text-align: left;
}

.kill-card[open] {
  border-color: var(--line-strong);
}

.kill-card summary {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 10px;
  list-style: none;
  cursor: pointer;
}

.kill-card summary::-webkit-details-marker {
  display: none;
}

.kill-title strong,
.kill-title small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kill-title small,
.kill-badges small,
.kill-meta-grid small {
  color: var(--muted);
}

.kill-badges {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: max-content;
  font-variant-numeric: tabular-nums;
}

.kill-details {
  display: grid;
  gap: 12px;
  padding: 0 10px 12px;
}

.kill-details h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.kill-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.kill-meta-grid span,
.combatant-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 23, 21, 0.72);
}

.kill-meta-grid small,
.kill-meta-grid b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combatant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.combatant-card.killer {
  border-color: rgba(132, 197, 138, 0.54);
}

.combatant-card.victim {
  border-color: rgba(228, 111, 85, 0.56);
}

.combatant-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.combatant-head img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.combatant-head strong,
.combatant-head small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combatant-head small {
  color: var(--muted);
}

.combatant-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.combatant-stats span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.82rem;
}

.combatant-stats b {
  color: var(--text);
}

.equipment-grid {
  display: grid;
  grid-template-areas:
    "bag head cape"
    "mainhand armor offhand"
    "potion shoes food"
    ". mount .";
  grid-template-columns: repeat(3, minmax(62px, 82px));
  grid-template-rows: repeat(4, 68px);
  gap: 8px;
  justify-content: center;
}

.gear-slot-mainhand { grid-area: mainhand; }
.gear-slot-offhand { grid-area: offhand; }
.gear-slot-head { grid-area: head; }
.gear-slot-armor { grid-area: armor; }
.gear-slot-shoes { grid-area: shoes; }
.gear-slot-cape { grid-area: cape; }
.gear-slot-bag { grid-area: bag; }
.gear-slot-mount { grid-area: mount; }
.gear-slot-potion { grid-area: potion; }
.gear-slot-food { grid-area: food; }

.gear-slot-twohand-mirror {
  grid-area: offhand;
}

.has-two-handed .gear-slot-twohand-primary,
.has-two-handed .gear-slot-twohand-mirror {
  border-color: rgba(210, 172, 118, 0.32);
  box-shadow: inset 0 0 18px rgba(210, 172, 118, 0.035);
}

.gear-slot {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 68px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 23, 21, 0.78);
}

.gear-slot img {
  width: 51px;
  height: 51px;
  object-fit: contain;
}

.gear-slot small {
  max-width: 100%;
  color: var(--muted);
  font-size: 0.66rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-empty {
  padding: 10px;
  text-align: left;
}

.weapon-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.weapon-cell.tight {
  min-width: 0;
}

.weapon-cell img {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(243, 234, 215, 0.05);
}

.weapon-cell.tight img {
  width: 34px;
  height: 34px;
}

.weapon-cell strong,
.weapon-cell small {
  display: block;
}

.weapon-cell > span {
  min-width: 0;
  overflow: hidden;
}

.weapon-cell strong,
.weapon-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table .weapon-cell {
  min-width: 220px;
}

.data-table .weapon-cell.tight {
  min-width: 190px;
}

.weapon-cell small {
  color: var(--muted);
  font-size: 0.78rem;
}

.battle-report-panel {
  display: grid;
  gap: 14px;
}

.detail-shell {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, min(1040px, 82vw));
  align-items: stretch;
}

.detail-shell[data-detail-mode="battle"] {
  grid-template-columns: minmax(18px, 1fr) minmax(960px, min(1880px, 98vw));
}

.detail-shell.standalone-detail {
  grid-template-columns: 1fr;
  background:
    linear-gradient(110deg, rgba(238, 233, 223, 0.86) 0 18%, rgba(24, 23, 21, 0.92) 18% 100%),
    repeating-linear-gradient(135deg, rgba(243, 234, 215, 0.035) 0 1px, transparent 1px 18px);
}

.detail-shell.standalone-detail .detail-backdrop {
  display: none;
}

.detail-shell.standalone-detail .detail-panel {
  min-height: 100vh;
  max-height: 100vh;
  border-left: 0;
  box-shadow: none;
}

.detail-shell.standalone-detail[data-detail-mode="battle"] .detail-head,
.detail-shell.standalone-detail[data-detail-mode="battle"] .detail-pinned-metrics,
.detail-shell.standalone-detail[data-detail-mode="battle"] .detail-content {
  padding-left: clamp(18px, 2.4vw, 42px);
  padding-right: clamp(18px, 2.4vw, 42px);
}

.detail-backdrop {
  min-width: 0;
  background: rgba(24, 23, 21, 0.52);
  backdrop-filter: blur(4px);
}

.detail-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  max-height: 100vh;
  border-left: 1px solid var(--line-strong);
  background:
    linear-gradient(180deg, rgba(24, 23, 21, 0.98), rgba(24, 23, 21, 0.94)),
    repeating-linear-gradient(90deg, rgba(243, 234, 215, 0.024) 0 1px, transparent 1px 80px);
  box-shadow: -30px 0 90px rgba(10, 10, 8, 0.38);
  animation: drawerIn 240ms ease both;
}

.detail-head {
  margin: 0;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

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

.detail-pinned-metrics {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(24, 23, 21, 0.96);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-content: start;
  min-width: 0;
  overflow: auto;
  overflow-anchor: none;
  padding: 16px;
}

.detail-shell[data-detail-mode="battle"] .detail-content {
  padding-inline: 18px;
}

.detail-shell[data-detail-mode="battle"] .report-grid {
  grid-template-columns: 1fr;
}

.detail-shell.standalone-detail[data-detail-mode="battle"] .report-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.detail-shell[data-detail-mode="battle"] .report-grid .table-frame {
  max-height: 460px;
}

.detail-shell[data-detail-mode="battle"] .report-table {
  min-width: 1240px;
}

.detail-shell.standalone-detail[data-detail-mode="battle"] .report-table {
  min-width: 0;
}

.detail-shell[data-detail-mode="battle"] #battlePlayersTable {
  min-width: 0;
}

.detail-shell[data-detail-mode="battle"] .report-section .report-table {
  min-width: 1440px;
}

.detail-shell.standalone-detail[data-detail-mode="battle"] .report-section .report-table {
  min-width: 1320px;
}

.detail-shell[data-detail-mode="battle"] .report-table th.num,
.detail-shell[data-detail-mode="battle"] .report-table td.num {
  min-width: 96px;
}

.detail-shell[data-detail-mode="battle"] .report-table th:last-child,
.detail-shell[data-detail-mode="battle"] .report-table td:last-child {
  min-width: 160px;
}

.detail-note {
  padding: 12px 14px;
  border: 1px solid rgba(219, 169, 94, 0.36);
  border-radius: var(--radius);
  background: rgba(219, 169, 94, 0.12);
  color: var(--muted);
}

.ghost-button {
  border-color: var(--line);
  background: rgba(24, 23, 21, 0.82);
  color: var(--text);
}

.inline-id-link {
  display: block;
  width: fit-content;
  margin-bottom: 3px;
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 800;
  text-decoration: none;
}

.inline-id-link:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.battle-time-link {
  margin-bottom: 0;
  color: inherit;
  font-family: inherit;
  font-weight: inherit;
}

.battle-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(24, 23, 21, 0.98), rgba(41, 51, 45, 0.26)),
    repeating-linear-gradient(120deg, rgba(243, 234, 215, 0.03) 0 1px, transparent 1px 14px);
}

.battle-hero h2 {
  margin: 6px 0;
  font-family: var(--mono);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
}

.battle-hero a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}

.kill-battle-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.battle-hero .battle-link-button {
  gap: 8px;
  min-height: 40px;
  border-color: rgba(255, 90, 20, 0.64);
  background: linear-gradient(135deg, rgba(255, 106, 38, 0.96), rgba(255, 67, 7, 0.96));
  color: #090909;
  box-shadow: inset 0 1px 0 rgba(255, 235, 220, 0.34), 0 8px 22px rgba(255, 67, 7, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.battle-hero .battle-link-button:hover {
  border-color: #ff9a6b;
  color: #090909;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 242, 229, 0.42), 0 10px 28px rgba(255, 67, 7, 0.3);
}

.battle-hero .battle-link-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.3;
}

.report-toolbar {
  align-items: end;
  margin-top: 6px;
}

.segmented-control {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 23, 21, 0.68);
}

.segmented-control button {
  min-height: 38px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 0 10px;
  font-weight: 700;
}

.segmented-control button:first-child {
  border-left: 0;
}

.segmented-control button.active,
.segmented-control button:hover {
  background: rgba(219, 169, 94, 0.16);
  color: var(--text);
}

.battle-kill-list {
  display: grid;
  gap: 8px;
}

.battle-kill-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 34px minmax(0, 1fr) minmax(86px, auto);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 23, 21, 0.82);
  color: var(--text);
  transition: background 160ms ease, border-color 160ms ease;
}

.battle-kill-card:hover {
  border-color: var(--line-strong);
  background: rgba(219, 169, 94, 0.12);
}

.battle-kill-time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.kill-arrow {
  display: grid;
  place-items: center;
  color: var(--gold);
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.report-metrics small {
  display: block;
  margin-top: 6px;
  color: var(--subtle);
  font-size: 0.72rem;
}

.player-official-metrics {
  box-shadow: 0 14px 28px rgba(10, 10, 8, 0.22);
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 14px;
}

.player-event-grid {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}

.player-event-grid > section {
  min-width: 0;
}

.player-period-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 23, 21, 0.48);
}

.player-period-panel .surface-title {
  margin-bottom: 10px;
}

.player-period-panel h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 1rem;
}

.player-period-panel .section-hint {
  margin: 5px 0 0;
}

.player-info-groups {
  display: grid;
  gap: 14px;
}

.player-info-group {
  min-width: 0;
}

.player-info-group h4 {
  margin: 0 0 7px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.86rem;
}

.player-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.player-info-grid article {
  min-width: 0;
  padding: 12px 14px;
  background: rgba(24, 23, 21, 0.84);
}

.player-info-grid span,
.player-info-grid strong {
  display: block;
  overflow-wrap: anywhere;
}

.player-info-grid span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.player-info-grid strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
}

.player-info-grid .good-stat strong {
  color: var(--positive);
}

.player-info-grid .bad-stat strong {
  color: var(--negative);
}

.player-event-table {
  max-height: 520px;
}

.player-event-table .report-table {
  min-width: 760px;
}

.guild-event-table .report-table {
  min-width: 880px;
}

.report-grid h3,
.report-section h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.section-hint {
  margin: -2px 0 8px;
  color: var(--subtle);
  font-size: 0.82rem;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(219, 169, 94, 0.13);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
}

.empty-state,
.table-empty {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes drawerIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 1180px) {
  .command-bar,
  .ops-hero,
  .top-guild-board,
  .distribution-grid,
  .filter-grid,
  .workspace,
  .stage-grid,
  .charts-grid,
  .analytics-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .guild-rail {
    position: static;
  }

  .metric-strip,
  .period-stats,
  .report-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tab-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at 86% 12%, rgba(132, 197, 138, 0.16), transparent 34%),
      radial-gradient(circle at 8% 88%, rgba(219, 169, 94, 0.16), transparent 38%),
      repeating-linear-gradient(90deg, rgba(243, 234, 215, 0.02) 0 1px, transparent 1px 72px),
      linear-gradient(145deg, #24231f, #181715 46%, #202a24);
    background-attachment: fixed;
  }

  .player-info-grid {
    grid-template-columns: 1fr;
  }

  .weapon-stats-list {
    max-height: none;
  }

  .app-shell {
    width: min(100% - 18px, 1520px);
    padding-top: 10px;
  }

  .command-bar {
    top: 8px;
    gap: 10px;
  }

  .brand-mark {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .brand-mark img {
    width: 44px;
    height: 44px;
  }

  .ops-hero h1 {
    font-size: clamp(2rem, 13vw, 3.7rem);
  }

  .search-box {
    grid-template-columns: 20px minmax(0, 1fr);
    padding-right: 10px;
  }

  .search-box button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .metric-strip,
  .period-stats,
  .report-metrics,
  .kill-meta-grid,
  .combatant-grid {
    grid-template-columns: 1fr 1fr;
  }

  .surface-title,
  .dashboard-brief,
  .battle-hero,
  .report-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-brief .source-ledger {
    justify-content: start;
  }

  .search-results {
    grid-template-columns: 1fr;
  }

  .table-toolbar input {
    max-width: none;
  }

  .tab-list {
    grid-template-columns: 1fr 1fr;
  }

  .kill-card summary {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .kill-card-button {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .kill-badges {
    grid-column: 2;
    justify-items: start;
  }

  .combatant-grid,
  .kill-meta-grid {
    grid-template-columns: 1fr;
  }

  .equipment-grid {
    grid-template-columns: repeat(3, minmax(62px, 82px));
  }

  .detail-shell {
    grid-template-columns: 1fr;
  }

  .detail-shell[data-detail-mode="battle"] {
    grid-template-columns: 1fr;
  }

  .detail-backdrop {
    display: none;
  }

  .detail-panel {
    border-left: 0;
  }

  .battle-kill-card {
    grid-template-columns: 1fr;
  }

  .battle-kill-time,
  .kill-arrow,
  .battle-kill-card .kill-badges {
    justify-self: start;
  }
}

.site-disclaimer {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-top: clamp(42px, 7vw, 88px);
  padding: 22px 0 4px;
  border-top: 1px solid rgba(204, 213, 218, 0.16);
}

.site-disclaimer p {
  max-width: 900px;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

.footer-feedback-button,
.feedback-submit,
.feedback-secondary,
.feedback-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  border-radius: var(--radius);
  font-weight: 700;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.footer-feedback-button {
  flex: 0 0 auto;
  padding: 0 16px;
  border: 1px solid rgba(255, 191, 101, 0.34);
  background: rgba(255, 191, 101, 0.08);
  color: var(--text);
}

.footer-feedback-button:hover {
  transform: translateY(-2px);
  border-color: var(--orange);
  background: rgba(255, 191, 101, 0.14);
}

.feedback-dialog {
  width: min(620px, calc(100% - 28px));
  max-height: min(820px, calc(100svh - 28px));
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(255, 191, 101, 0.32);
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(145deg, rgba(253, 137, 115, 0.06), transparent 34%, rgba(0, 58, 108, 0.18)),
    #13181b;
  color: var(--text);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.7), 0 0 36px rgba(255, 191, 101, 0.08);
}

.feedback-dialog[open] {
  animation: feedbackDialogIn 220ms ease-out both;
}

.feedback-dialog::backdrop {
  background: rgba(4, 9, 13, 0.78);
  backdrop-filter: blur(8px);
  animation: feedbackBackdropIn 180ms ease-out both;
}

.feedback-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.feedback-dialog-head .section-kicker {
  margin: 0 0 7px;
}

.feedback-dialog-head h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(1.7rem, 5vw, 2.45rem);
  line-height: 1;
}

.feedback-close {
  width: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(204, 213, 218, 0.05);
  color: var(--muted);
}

.feedback-close:hover {
  border-color: var(--orange);
  color: var(--text);
  transform: rotate(4deg);
}

.feedback-form {
  padding: 24px 28px 28px;
}

.feedback-fields,
.feedback-fields label {
  display: grid;
  gap: 9px;
}

.feedback-fields {
  gap: 19px;
}

.feedback-fields label > span {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.feedback-fields label em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 500;
}

.feedback-fields select,
.feedback-fields textarea,
.feedback-fields input {
  width: 100%;
  border: 1px solid rgba(204, 213, 218, 0.2);
  border-radius: var(--radius);
  outline: 0;
  background: rgba(12, 19, 24, 0.78);
  color: var(--text);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.feedback-fields select,
.feedback-fields input {
  min-height: 46px;
  padding: 0 13px;
}

.feedback-fields textarea {
  min-height: 132px;
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.55;
}

.feedback-fields select:focus,
.feedback-fields textarea:focus,
.feedback-fields input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 191, 101, 0.12);
}

.feedback-fields textarea::placeholder,
.feedback-fields input::placeholder {
  color: var(--subtle);
}

.feedback-fields small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.feedback-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.feedback-status {
  min-height: 20px;
  margin: -3px 0 0;
  color: var(--negative);
  font-size: 0.84rem;
}

.feedback-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.feedback-submit,
.feedback-secondary {
  padding: 0 18px;
}

.feedback-submit {
  border: 1px solid #ffbf65;
  background: linear-gradient(135deg, #ffd08c, #ffbf65 68%, #fd8973);
  color: #13181b;
}

.feedback-submit:hover:not(:disabled),
.feedback-secondary:hover {
  transform: translateY(-1px);
}

.feedback-submit:disabled {
  cursor: wait;
  opacity: 0.62;
}

.feedback-secondary {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.feedback-success {
  padding: 18px 0 4px;
  text-align: center;
  animation: riseIn 260ms ease-out both;
}

.feedback-success > svg {
  width: 52px;
  height: 52px;
  padding: 13px;
  border: 1px solid rgba(101, 214, 163, 0.36);
  border-radius: 50%;
  background: rgba(101, 214, 163, 0.1);
  color: var(--positive);
}

.feedback-success h3 {
  margin: 17px 0 7px;
  font-family: var(--mono);
  font-size: 1.45rem;
}

.feedback-success p {
  margin: 0 auto 22px;
  color: var(--muted);
}

@keyframes feedbackDialogIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes feedbackBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 760px) {
  .site-disclaimer {
    align-items: stretch;
    flex-direction: column;
    margin-top: 48px;
    padding-inline: 8px;
  }

  .footer-feedback-button {
    width: 100%;
  }

  .feedback-dialog-head,
  .feedback-form {
    padding-left: 20px;
    padding-right: 20px;
  }

  .feedback-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* Editorial SEO sections */
.seo-story {
  position: relative;
  display: grid;
  grid-template-columns: minmax(64px, 0.18fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 76px);
  margin: clamp(72px, 9vw, 136px) clamp(4px, 4vw, 54px) 0;
  padding: clamp(34px, 6vw, 82px) 0 0;
  border-top: 1px solid rgba(255, 191, 101, 0.24);
}

.seo-story-index {
  color: rgba(255, 191, 101, 0.42);
  font-family: var(--mono);
  font-size: clamp(2rem, 5vw, 4.7rem);
  line-height: 0.85;
}

.seo-story-copy {
  max-width: 1120px;
  opacity: 1;
}

.seo-story h2 {
  max-width: 930px;
  margin: 12px 0 22px;
  font-family: var(--mono);
  font-size: clamp(2rem, 4.4vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
  scroll-margin-top: 120px;
}

#guildQuery {
  scroll-margin-top: 120px;
}

.seo-lead {
  max-width: 820px;
  margin: 0 0 30px;
  color: var(--text);
  font-size: clamp(1.05rem, 1.8vw, 1.38rem);
  line-height: 1.55;
}

.seo-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 5vw, 68px);
}

.seo-columns p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.78;
}

.seo-action {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin-top: 32px;
  color: #ffbf65;
  font-family: var(--mono);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.seo-action span {
  transition: transform 180ms ease;
}

.seo-action:hover span,
.seo-action:focus-visible span {
  transform: translateX(7px);
}

.seo-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(28px, 6vw, 84px);
  margin-top: 38px;
  border-top: 1px solid rgba(204, 213, 218, 0.12);
}

.seo-benefits div {
  display: grid;
  gap: 8px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(204, 213, 218, 0.12);
}

.seo-benefits strong {
  color: #ffbf65;
  font-family: var(--mono);
  font-size: 1.06rem;
}

.seo-benefits span {
  color: var(--muted);
  line-height: 1.65;
}

@supports (animation-timeline: view()) {
  .seo-story-copy {
    animation: seoStoryReveal both ease-out;
    animation-range: entry 5% cover 34%;
    animation-timeline: view();
  }
}

@keyframes seoStoryReveal {
  from { transform: translateY(34px); }
  to { transform: translateY(0); }
}

@media (max-width: 760px) {
  .seo-story {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 66px;
    padding-top: 32px;
  }

  .seo-story-index {
    font-size: 2.25rem;
  }

  .seo-story h2 {
    font-size: clamp(1.9rem, 10vw, 3rem);
    scroll-margin-top: 220px;
  }

  #guildQuery {
    scroll-margin-top: 220px;
  }

  .seo-columns,
  .seo-benefits {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .seo-story-copy {
    animation: none !important;
  }

  .seo-action span {
    transition: none;
  }
}

@media (max-width: 520px) {
  .metric-strip,
  .period-stats,
  .report-metrics {
    grid-template-columns: 1fr;
  }

  .list-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .list-row > b {
    grid-column: 2;
    justify-self: start;
  }

  .top-guild-grid,
  .search-results,
  .home-guild-row {
    grid-template-columns: 1fr;
  }

  .home-guild-row b,
  .home-guild-row em {
    justify-self: start;
  }

  .dashboard-brief .source-ledger span {
    width: 100%;
    white-space: normal;
  }
}

/* Black Neon visual refresh */
.app-shell {
  position: relative;
  isolation: isolate;
}

.command-bar,
.home-board,
.guild-card,
.surface,
.battle-report-panel,
.detail-panel {
  border-color: rgba(210, 172, 118, 0.22);
  background:
    linear-gradient(120deg, rgba(255, 90, 20, 0.025), transparent 28%, rgba(34, 217, 211, 0.018)),
    rgba(8, 11, 12, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(115%);
}

.command-bar {
  border-top-color: rgba(255, 90, 20, 0.54);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.brand-mark img {
  filter:
    drop-shadow(4px 0 10px rgba(255, 75, 10, 0.34))
    drop-shadow(-3px 0 8px rgba(34, 217, 211, 0.18));
}

.brand-mark strong {
  letter-spacing: 0.045em;
  text-shadow: 1px 0 rgba(255, 75, 10, 0.26), -1px 0 rgba(34, 217, 211, 0.18);
}

.search-box {
  border-color: rgba(255, 90, 20, 0.42);
  background: rgba(5, 8, 9, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.search-box:focus-within,
.table-toolbar input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(255, 90, 20, 0.15), var(--glow-orange);
}

.search-box button,
.ghost-button {
  border-color: #ff6a26;
  background: linear-gradient(135deg, #ff6a26, #ff4307 72%);
  color: #090909;
  box-shadow: inset 0 1px 0 rgba(255, 232, 210, 0.34), 0 8px 20px rgba(255, 67, 7, 0.16);
}

.search-box button:hover,
.ghost-button:hover {
  border-color: #ff8a52;
  background: linear-gradient(135deg, #ff7a39, #ff4a08 72%);
  box-shadow: inset 0 1px 0 rgba(255, 238, 220, 0.38), 0 10px 28px rgba(255, 67, 7, 0.28);
}

.server-badge,
.alliance-pill {
  border-radius: var(--radius);
  border-color: rgba(34, 217, 211, 0.3);
  background: rgba(8, 24, 25, 0.64);
  color: var(--cyan);
  box-shadow: inset 0 0 18px rgba(34, 217, 211, 0.035);
}

.ops-hero {
  position: relative;
  min-height: 178px;
  padding-block: 26px 28px;
  border-bottom-color: rgba(255, 90, 20, 0.34);
  overflow: hidden;
}

.ops-hero::after {
  position: absolute;
  right: 2%;
  bottom: 0;
  width: min(42vw, 520px);
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--cyan) 28%, var(--orange) 72%, transparent);
  box-shadow: 0 0 18px rgba(255, 75, 10, 0.44);
  transform-origin: right;
  animation: signalSweep 4.8s ease-in-out infinite alternate;
}

.section-kicker {
  color: var(--orange);
  letter-spacing: 0.13em;
}

.ops-hero h1 {
  max-width: 940px;
  font-size: clamp(2.25rem, 4.7vw, 5.35rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
  background: linear-gradient(96deg, #fff8ee 0 52%, #d2ac76 72%, #ff5a14 100%);
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.48));
}

.home-board {
  background:
    linear-gradient(145deg, rgba(255, 75, 10, 0.045), transparent 20%, rgba(34, 217, 211, 0.025) 72%, transparent),
    rgba(8, 11, 12, 0.92);
}

.top-guild-panel,
.search-result-group,
.distribution-panel,
.range-filter,
.metric-strip article,
.report-metrics article,
.top-guild-card,
.result-tile,
.home-guild-row,
.tab-button,
.list-row,
.kill-card,
.battle-kill-card,
.player-info-grid article {
  background: rgba(10, 14, 15, 0.86);
}

.top-guild-panel-head,
.search-result-head {
  background: linear-gradient(90deg, rgba(255, 75, 10, 0.09), rgba(34, 217, 211, 0.035));
}

.top-guild-card:hover,
.result-tile:hover,
.list-row:hover,
.home-guild-row:hover,
.battle-kill-card:hover {
  background: linear-gradient(90deg, rgba(255, 75, 10, 0.15), rgba(34, 217, 211, 0.055));
  box-shadow: inset 3px 0 0 var(--orange);
}

.top-rank {
  border: 1px solid rgba(255, 90, 20, 0.25);
  background: rgba(255, 75, 10, 0.1);
  color: #ff8350;
}

.dual-range::before {
  background: rgba(210, 172, 118, 0.15);
  box-shadow: inset 0 0 0 1px rgba(210, 172, 118, 0.16);
}

.dual-range::after {
  background: linear-gradient(90deg, var(--orange), var(--sand) 48%, var(--cyan));
  box-shadow: 0 0 18px rgba(255, 75, 10, 0.24);
}

.dual-range input[type="range"]::-webkit-slider-thumb,
.dual-range input[type="range"]::-moz-range-thumb {
  border-color: #fff3e4;
  background: #111719;
}

.tab-button {
  position: relative;
}

.tab-button.active {
  background: linear-gradient(100deg, #ff6825, #ff4708 66%, #e33b04);
  color: #090909;
  box-shadow: inset 0 1px 0 rgba(255, 235, 220, 0.38), var(--glow-orange);
}

.tab-button.active svg {
  color: #090909;
}

.metric-strip,
.period-stats,
.report-metrics,
.filter-grid,
.distribution-grid,
.top-guild-grid,
.home-guild-list,
.tab-list,
.player-info-grid {
  border-color: rgba(210, 172, 118, 0.19);
  background: rgba(210, 172, 118, 0.17);
}

.metric-card::after {
  height: 3px;
  background: linear-gradient(90deg, var(--sand), transparent);
}

.metric-card.good-stat::after {
  background: linear-gradient(90deg, var(--cyan), transparent);
  box-shadow: var(--glow-cyan);
}

.metric-card.bad-stat::after {
  background: linear-gradient(90deg, var(--orange), transparent);
  box-shadow: var(--glow-orange);
}

.table-frame {
  scrollbar-color: rgba(255, 90, 20, 0.7) rgba(9, 13, 14, 0.82);
}

.data-table th {
  background: rgba(9, 13, 14, 0.96);
  color: var(--sand);
  letter-spacing: 0.055em;
}

.data-table tbody tr {
  background: rgba(9, 13, 14, 0.46);
}

.data-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(255, 75, 10, 0.12), rgba(34, 217, 211, 0.035));
}

.data-table th,
.data-table td {
  border-bottom-color: rgba(210, 172, 118, 0.13);
}

.detail-backdrop {
  background: rgba(3, 5, 6, 0.76);
  backdrop-filter: blur(8px);
}

.detail-panel {
  border-left-color: rgba(255, 90, 20, 0.38);
  box-shadow: -28px 0 80px rgba(0, 0, 0, 0.58), -1px 0 24px rgba(255, 75, 10, 0.08);
}

.battle-hero {
  border-color: rgba(255, 90, 20, 0.28);
  background:
    linear-gradient(110deg, rgba(255, 75, 10, 0.1), transparent 34%, rgba(34, 217, 211, 0.055)),
    rgba(8, 11, 12, 0.92);
}

.role-pill,
.segmented-control button.active,
.segmented-control button:hover {
  background: rgba(255, 75, 10, 0.14);
}

@keyframes signalSweep {
  from { opacity: 0.42; transform: scaleX(0.62); }
  to { opacity: 0.9; transform: scaleX(1); }
}

@keyframes crtFlicker {
  0%, 97%, 100% { opacity: 0.24; }
  98% { opacity: 0.16; }
  99% { opacity: 0.29; }
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(180deg, rgba(4, 6, 7, 0.56), rgba(4, 6, 7, 0.8)),
      url("/neon-grain-background.webp") 56% top / auto 100svh fixed no-repeat,
      #080a0b;
  }

  .command-bar {
    position: relative;
    top: auto;
    background: rgba(8, 11, 12, 0.94);
  }

  .ops-hero {
    min-height: 156px;
  }
}

/* Forest paper palette */
:root {
  color-scheme: light;
  --bg: #fbf5f0;
  --bg-2: #f2e3d8;
  --surface: rgba(251, 245, 240, 0.86);
  --surface-solid: #fbf5f0;
  --surface-raised: #f2e3d8;
  --panel: #f8eee7;
  --line: rgba(20, 45, 37, 0.16);
  --line-strong: rgba(2, 74, 67, 0.58);
  --text: #142d25;
  --muted: #52645d;
  --subtle: rgba(20, 45, 37, 0.62);
  --gold: #db783e;
  --accent: #db783e;
  --orange: #db783e;
  --cyan: #024a43;
  --sand: #db783e;
  --steel: #64756f;
  --green: #024a43;
  --red: #aa423a;
  --pink: #aa423a;
  --positive: #024a43;
  --negative: #aa423a;
  --ink: #142d25;
  --shadow: 0 22px 56px rgba(20, 45, 37, 0.11), 0 2px 10px rgba(20, 45, 37, 0.07);
  --glow-orange: 0 10px 28px rgba(219, 120, 62, 0.18);
  --glow-cyan: 0 10px 26px rgba(2, 74, 67, 0.14);
}

html {
  background: var(--bg);
}

body {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 8%, rgba(242, 227, 216, 0.18), transparent 30%),
    linear-gradient(118deg, rgba(251, 245, 240, 0.9) 0 32%, rgba(242, 227, 216, 0.82) 58%, rgba(251, 245, 240, 0.9) 100%),
    url("/neon-grain-background.webp") center top / cover fixed no-repeat,
    var(--bg);
  background-blend-mode: normal, normal, soft-light, normal;
}

body::before {
  z-index: -1;
  background:
    radial-gradient(ellipse at 86% 10%, rgba(2, 74, 67, 0.13), transparent 28%),
    radial-gradient(ellipse at 10% 62%, rgba(219, 120, 62, 0.14), transparent 26%),
    radial-gradient(ellipse at 76% 86%, rgba(170, 66, 58, 0.08), transparent 24%);
  opacity: 1;
  animation: paletteDrift 18s ease-in-out infinite alternate;
}

body::after {
  z-index: -1;
  background: linear-gradient(180deg, rgba(251, 245, 240, 0.02), rgba(251, 245, 240, 0.28));
}

.command-bar,
.home-board,
.guild-card,
.surface,
.battle-report-panel,
.detail-panel {
  border-color: var(--line);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.3), transparent 36%, rgba(242, 227, 216, 0.24)),
    rgba(251, 245, 240, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(112%);
}

.command-bar {
  border-top-color: rgba(219, 120, 62, 0.46);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.brand-mark img {
  filter: drop-shadow(3px 7px 14px rgba(20, 45, 37, 0.18));
}

.brand-mark strong {
  color: var(--text);
  text-shadow: none;
}

.search-box {
  border-color: rgba(20, 45, 37, 0.22);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.search-box:focus-within,
.table-toolbar input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(2, 74, 67, 0.12);
}

.search-box button,
.ghost-button {
  border-color: #c96834;
  background: linear-gradient(135deg, #e08a58, #db783e 72%);
  color: #142d25;
  box-shadow: inset 0 1px 0 rgba(255, 245, 236, 0.58), 0 8px 20px rgba(219, 120, 62, 0.18);
}

.search-box button:hover,
.ghost-button:hover {
  border-color: #aa423a;
  background: linear-gradient(135deg, #e3986d, #db783e 68%, #c65c35);
  box-shadow: inset 0 1px 0 rgba(255, 248, 241, 0.68), 0 12px 28px rgba(170, 66, 58, 0.2);
}

.server-badge,
.alliance-pill {
  border-color: rgba(2, 74, 67, 0.25);
  background: rgba(2, 74, 67, 0.08);
  color: var(--cyan);
  box-shadow: inset 0 0 18px rgba(2, 74, 67, 0.025);
}

.ops-hero {
  border-bottom-color: rgba(20, 45, 37, 0.18);
}

.ops-hero::after {
  background: linear-gradient(90deg, transparent, var(--cyan) 25%, var(--orange) 72%, transparent);
  box-shadow: 0 0 18px rgba(219, 120, 62, 0.2);
}

.section-kicker {
  color: var(--orange);
}

.ops-hero h1 {
  background: linear-gradient(96deg, #142d25 0 58%, #024a43 76%, #aa423a 100%);
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 12px 24px rgba(20, 45, 37, 0.1));
}

.home-board {
  background:
    linear-gradient(145deg, rgba(219, 120, 62, 0.065), transparent 24%, rgba(2, 74, 67, 0.045) 76%, transparent),
    rgba(251, 245, 240, 0.9);
}

.top-guild-panel,
.search-result-group,
.distribution-panel,
.range-filter,
.metric-strip article,
.report-metrics article,
.top-guild-card,
.result-tile,
.home-guild-row,
.tab-button,
.list-row,
.kill-card,
.battle-kill-card,
.player-info-grid article,
.period-stats article,
.weapon-summary,
.segmented-control,
.combatant-column,
.kill-meta-grid article,
.detail-pinned-metrics article {
  background: rgba(251, 245, 240, 0.82);
}

.top-guild-panel-head,
.search-result-head {
  background: linear-gradient(90deg, rgba(219, 120, 62, 0.1), rgba(2, 74, 67, 0.045));
}

.top-guild-card:hover,
.result-tile:hover,
.list-row:hover,
.home-guild-row:hover,
.battle-kill-card:hover,
.data-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(219, 120, 62, 0.13), rgba(2, 74, 67, 0.045));
  box-shadow: inset 3px 0 0 var(--orange);
}

.top-rank {
  border: 1px solid rgba(219, 120, 62, 0.26);
  background: rgba(219, 120, 62, 0.11);
  color: #a84f2d;
}

.dual-range::before {
  background: rgba(20, 45, 37, 0.12);
  box-shadow: inset 0 0 0 1px rgba(20, 45, 37, 0.12);
}

.dual-range::after {
  background: linear-gradient(90deg, var(--orange), #aa423a 48%, var(--cyan));
  box-shadow: 0 0 16px rgba(219, 120, 62, 0.14);
}

.dual-range input[type="range"]::-webkit-slider-thumb,
.dual-range input[type="range"]::-moz-range-thumb {
  border-color: var(--bg);
  background: var(--cyan);
  box-shadow: 0 0 0 2px rgba(2, 74, 67, 0.22), 0 3px 10px rgba(20, 45, 37, 0.14);
}

.tab-button.active {
  background: linear-gradient(100deg, #142d25, #024a43);
  color: #fbf5f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), var(--glow-cyan);
}

.tab-button.active svg {
  color: #fbf5f0;
}

.metric-strip,
.period-stats,
.report-metrics,
.filter-grid,
.distribution-grid,
.top-guild-grid,
.home-guild-list,
.tab-list,
.player-info-grid {
  border-color: var(--line);
  background: var(--line);
}

.metric-card::after {
  background: linear-gradient(90deg, var(--orange), transparent);
}

.metric-card.good-stat::after {
  background: linear-gradient(90deg, var(--cyan), transparent);
  box-shadow: var(--glow-cyan);
}

.metric-card.bad-stat::after {
  background: linear-gradient(90deg, var(--red), transparent);
  box-shadow: 0 10px 24px rgba(170, 66, 58, 0.14);
}

.table-frame {
  background: rgba(251, 245, 240, 0.66);
  scrollbar-color: rgba(2, 74, 67, 0.48) rgba(242, 227, 216, 0.72);
}

.data-table th {
  background: rgba(242, 227, 216, 0.96);
  color: var(--text);
}

.data-table tbody tr {
  background: rgba(251, 245, 240, 0.64);
}

.data-table td,
.roster-table td:first-child {
  background: rgba(251, 245, 240, 0.78);
}

.data-table th,
.data-table td {
  border-bottom-color: rgba(20, 45, 37, 0.11);
}

.table-toolbar input,
.segmented-control,
.equipment-slot,
.kill-card,
.battle-kill-card {
  border-color: var(--line);
}

.table-toolbar input,
.player-analytics-grid > section,
.player-period-panel,
.period-placeholder {
  background: rgba(251, 245, 240, 0.72);
}

.row-icon {
  background: rgba(2, 74, 67, 0.08);
}

.good-row .row-icon {
  background: rgba(2, 74, 67, 0.11);
}

.bad-row .row-icon {
  background: rgba(170, 66, 58, 0.11);
}

.top-battle-row .row-icon {
  border-color: rgba(219, 120, 62, 0.3);
  background: linear-gradient(145deg, rgba(219, 120, 62, 0.16), rgba(219, 120, 62, 0.07));
  box-shadow: 0 8px 18px rgba(219, 120, 62, 0.11);
}

.detail-backdrop {
  background: rgba(20, 45, 37, 0.34);
  backdrop-filter: blur(8px);
}

.detail-panel {
  border-left-color: rgba(2, 74, 67, 0.32);
  box-shadow: -28px 0 80px rgba(20, 45, 37, 0.2), -1px 0 24px rgba(2, 74, 67, 0.06);
}

.detail-shell.standalone-detail {
  background:
    linear-gradient(110deg, rgba(242, 227, 216, 0.88), rgba(251, 245, 240, 0.96)),
    repeating-linear-gradient(135deg, rgba(20, 45, 37, 0.025) 0 1px, transparent 1px 18px);
}

.detail-pinned-metrics {
  background: rgba(242, 227, 216, 0.72);
}

.battle-hero {
  border-color: rgba(2, 74, 67, 0.2);
  background:
    linear-gradient(110deg, rgba(219, 120, 62, 0.1), transparent 34%, rgba(2, 74, 67, 0.07)),
    rgba(251, 245, 240, 0.9);
}

.battle-hero .battle-link-button {
  border-color: #c96834;
  background: linear-gradient(135deg, #e08a58, #db783e 72%);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 245, 236, 0.58), 0 8px 20px rgba(219, 120, 62, 0.18);
}

.battle-hero .battle-link-button:hover {
  border-color: var(--red);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 248, 241, 0.68), 0 12px 28px rgba(170, 66, 58, 0.2);
}

.role-pill,
.segmented-control button.active,
.segmented-control button:hover {
  background: rgba(219, 120, 62, 0.13);
}

.loading-line::before {
  background: linear-gradient(90deg, var(--orange), var(--cyan));
}

@keyframes paletteDrift {
  from { transform: translate3d(-1.2%, -0.6%, 0) scale(1); }
  to { transform: translate3d(1.2%, 0.8%, 0) scale(1.035); }
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(180deg, rgba(251, 245, 240, 0.88), rgba(242, 227, 216, 0.86)),
      url("/neon-grain-background.webp") 56% top / auto 100svh fixed no-repeat,
      var(--bg);
    background-blend-mode: normal, soft-light, normal;
  }

  .command-bar {
    background: rgba(251, 245, 240, 0.94);
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
}

/* Midnight coral palette */
:root {
  color-scheme: dark;
  --bg: #13181b;
  --bg-2: #003a6c;
  --surface: rgba(19, 24, 27, 0.88);
  --surface-solid: #13181b;
  --surface-raised: #1a252d;
  --panel: #172027;
  --line: rgba(204, 213, 218, 0.18);
  --line-strong: rgba(255, 191, 101, 0.66);
  --text: #f0eeeb;
  --muted: #ccd5da;
  --subtle: rgba(204, 213, 218, 0.68);
  --gold: #ffbf65;
  --accent: #ffbf65;
  --orange: #ffbf65;
  --cyan: #72a5cb;
  --sand: #ffbf65;
  --steel: #84949e;
  --green: #65d6a3;
  --red: #fd8973;
  --pink: #fd8973;
  --positive: #65d6a3;
  --negative: #fd8973;
  --ink: #13181b;
  --shadow: 0 26px 68px rgba(0, 0, 0, 0.42), 0 2px 14px rgba(0, 0, 0, 0.3);
  --glow-orange: 0 0 30px rgba(255, 191, 101, 0.18);
  --glow-cyan: 0 0 26px rgba(0, 58, 108, 0.32);
}

html {
  background: var(--bg);
}

body {
  background:
    linear-gradient(180deg, rgba(19, 24, 27, 0.34), rgba(19, 24, 27, 0.78)),
    radial-gradient(ellipse at 48% 94%, rgba(255, 191, 101, 0.48), transparent 38%),
    radial-gradient(ellipse at 78% 14%, rgba(0, 58, 108, 0.76), transparent 42%),
    url("/neon-grain-background.webp") center top / cover fixed no-repeat,
    #13181b;
  background-blend-mode: normal, screen, screen, luminosity, normal;
}

body::before {
  z-index: -1;
  background:
    radial-gradient(ellipse at 14% 22%, rgba(253, 137, 115, 0.23), transparent 28%),
    radial-gradient(ellipse at 62% 68%, rgba(255, 191, 101, 0.2), transparent 30%),
    radial-gradient(ellipse at 88% 42%, rgba(0, 58, 108, 0.46), transparent 34%);
  opacity: 1;
  animation: paletteDrift 18s ease-in-out infinite alternate;
}

body::after {
  z-index: -1;
  background: radial-gradient(ellipse at center, transparent 46%, rgba(7, 11, 14, 0.46) 100%);
}

.command-bar,
.home-board,
.guild-card,
.surface,
.battle-report-panel,
.detail-panel {
  border-color: var(--line);
  background:
    linear-gradient(120deg, rgba(255, 191, 101, 0.035), transparent 34%, rgba(0, 58, 108, 0.12)),
    rgba(19, 24, 27, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(118%);
}

.command-bar {
  border-top-color: rgba(255, 191, 101, 0.58);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(240, 238, 235, 0.06);
}

.brand-mark img {
  filter:
    drop-shadow(4px 0 12px rgba(253, 137, 115, 0.28))
    drop-shadow(-3px 6px 12px rgba(0, 58, 108, 0.4));
}

.brand-mark strong {
  color: var(--text);
  text-shadow: 1px 0 rgba(253, 137, 115, 0.18), -1px 0 rgba(114, 165, 203, 0.13);
}

.search-box {
  border-color: rgba(255, 191, 101, 0.34);
  background: rgba(9, 16, 21, 0.7);
  box-shadow: inset 0 1px 0 rgba(240, 238, 235, 0.045);
}

.search-box:focus-within,
.table-toolbar input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 191, 101, 0.13), var(--glow-orange);
}

.search-box button,
.ghost-button,
.battle-hero .battle-link-button {
  border-color: #ffbf65;
  background: linear-gradient(135deg, #ffd08c, #ffbf65 68%, #fd8973);
  color: #13181b;
  box-shadow: inset 0 1px 0 rgba(255, 248, 236, 0.5), 0 10px 24px rgba(255, 191, 101, 0.18);
}

.search-box button:hover,
.ghost-button:hover,
.battle-hero .battle-link-button:hover {
  border-color: #fd8973;
  background: linear-gradient(135deg, #ffd79e, #ffbf65 52%, #fd8973);
  color: #13181b;
  box-shadow: inset 0 1px 0 rgba(255, 250, 242, 0.58), 0 12px 30px rgba(253, 137, 115, 0.22);
}

.surface-title .ghost-button span,
.detail-actions .ghost-button span,
.detail-actions .ghost-button svg {
  color: inherit;
}

.server-badge,
.alliance-pill {
  border-color: rgba(114, 165, 203, 0.3);
  background: rgba(0, 58, 108, 0.42);
  color: #ccd5da;
  box-shadow: inset 0 0 18px rgba(0, 58, 108, 0.2);
}

.ops-hero {
  border-bottom-color: rgba(255, 191, 101, 0.3);
}

.ops-hero::after {
  background: linear-gradient(90deg, transparent, #003a6c 20%, #fd8973 58%, #ffbf65 82%, transparent);
  box-shadow: 0 0 22px rgba(255, 191, 101, 0.34);
}

.section-kicker {
  color: var(--orange);
}

.ops-hero h1 {
  max-width: none;
  width: max-content;
  white-space: nowrap;
  font-size: clamp(0.88rem, 4.7vw, 5.35rem);
  background: linear-gradient(96deg, #f0eeeb 0 50%, #ccd5da 67%, #ffbf65 84%, #fd8973 100%);
  background-clip: text;
  -webkit-background-clip: text;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.42));
}

.home-board {
  background:
    linear-gradient(145deg, rgba(253, 137, 115, 0.07), transparent 26%, rgba(0, 58, 108, 0.15) 76%, transparent),
    rgba(19, 24, 27, 0.9);
}

.top-guild-panel,
.search-result-group,
.distribution-panel,
.range-filter,
.metric-strip article,
.report-metrics article,
.top-guild-card,
.result-tile,
.home-guild-row,
.tab-button,
.list-row,
.kill-card,
.battle-kill-card,
.player-info-grid article,
.period-stats article,
.weapon-summary,
.segmented-control,
.combatant-column,
.kill-meta-grid article,
.detail-pinned-metrics article,
.player-analytics-grid > section,
.player-period-panel,
.period-placeholder,
.table-toolbar input {
  background: rgba(17, 25, 30, 0.84);
}

.top-guild-panel-head,
.search-result-head {
  background: linear-gradient(90deg, rgba(255, 191, 101, 0.1), rgba(0, 58, 108, 0.2));
}

.top-guild-card:hover,
.result-tile:hover,
.list-row:hover,
.home-guild-row:hover,
.battle-kill-card:hover,
.data-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(253, 137, 115, 0.12), rgba(0, 58, 108, 0.2));
  box-shadow: inset 3px 0 0 var(--orange);
}

.top-rank {
  border-color: rgba(255, 191, 101, 0.3);
  background: rgba(255, 191, 101, 0.11);
  color: #ffbf65;
}

.dual-range::before {
  background: rgba(204, 213, 218, 0.14);
  box-shadow: inset 0 0 0 1px rgba(204, 213, 218, 0.1);
}

.dual-range::after {
  background: linear-gradient(90deg, #003a6c, #fd8973 52%, #ffbf65);
  box-shadow: 0 0 18px rgba(255, 191, 101, 0.2);
}

.dual-range input[type="range"]::-webkit-slider-thumb,
.dual-range input[type="range"]::-moz-range-thumb {
  border-color: #f0eeeb;
  background: #003a6c;
  box-shadow: 0 0 0 2px rgba(255, 191, 101, 0.22), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tab-button.active {
  background: linear-gradient(100deg, #ffbf65, #fd8973);
  color: #13181b;
  box-shadow: inset 0 1px 0 rgba(255, 248, 236, 0.36), var(--glow-orange);
}

.tab-button.active svg {
  color: #13181b;
}

.metric-strip,
.period-stats,
.report-metrics,
.filter-grid,
.distribution-grid,
.top-guild-grid,
.home-guild-list,
.tab-list,
.player-info-grid {
  border-color: var(--line);
  background: var(--line);
}

.metric-card::after {
  background: linear-gradient(90deg, #ffbf65, transparent);
}

.metric-card.good-stat::after {
  background: linear-gradient(90deg, #65d6a3, transparent);
  box-shadow: 0 0 24px rgba(101, 214, 163, 0.18);
}

.metric-card.bad-stat::after {
  background: linear-gradient(90deg, #fd8973, transparent);
  box-shadow: 0 0 24px rgba(253, 137, 115, 0.18);
}

.table-frame {
  background: rgba(12, 19, 24, 0.72);
  scrollbar-color: rgba(255, 191, 101, 0.58) rgba(19, 24, 27, 0.82);
}

.data-table th {
  background: rgba(19, 24, 27, 0.98);
  color: #ffbf65;
}

.data-table tbody tr,
.data-table td,
.roster-table td:first-child {
  background: rgba(16, 23, 28, 0.76);
}

.data-table th,
.data-table td {
  border-bottom-color: rgba(204, 213, 218, 0.12);
}

.row-icon {
  background: rgba(0, 58, 108, 0.38);
}

.good-row .row-icon,
.top-battle-row .row-icon {
  border-color: rgba(101, 214, 163, 0.32);
  background: rgba(101, 214, 163, 0.12);
  box-shadow: 0 0 18px rgba(101, 214, 163, 0.1);
}

.bad-row .row-icon {
  background: rgba(253, 137, 115, 0.13);
}

.detail-backdrop {
  background: rgba(4, 9, 13, 0.76);
  backdrop-filter: blur(9px);
}

.detail-panel {
  border-left-color: rgba(255, 191, 101, 0.32);
  box-shadow: -30px 0 84px rgba(0, 0, 0, 0.58), -1px 0 26px rgba(255, 191, 101, 0.06);
}

.detail-shell.standalone-detail {
  background:
    linear-gradient(110deg, rgba(0, 58, 108, 0.22), rgba(19, 24, 27, 0.96)),
    repeating-linear-gradient(135deg, rgba(204, 213, 218, 0.025) 0 1px, transparent 1px 18px);
}

.detail-pinned-metrics {
  background: rgba(19, 24, 27, 0.94);
}

.battle-hero {
  border-color: rgba(255, 191, 101, 0.22);
  background:
    linear-gradient(110deg, rgba(253, 137, 115, 0.1), transparent 34%, rgba(0, 58, 108, 0.24)),
    rgba(19, 24, 27, 0.92);
}

.role-pill,
.segmented-control button.active,
.segmented-control button:hover {
  background: rgba(255, 191, 101, 0.13);
}

.loading-line::before {
  background: linear-gradient(90deg, #003a6c, #fd8973, #ffbf65);
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(180deg, rgba(19, 24, 27, 0.38), rgba(19, 24, 27, 0.82)),
      radial-gradient(ellipse at 50% 92%, rgba(255, 191, 101, 0.42), transparent 44%),
      url("/neon-grain-background.webp") 56% top / auto 100svh fixed no-repeat,
      #13181b;
    background-blend-mode: normal, screen, luminosity, normal;
  }

  .command-bar {
    background: rgba(19, 24, 27, 0.94);
  }
}

/* Local rankings */
.command-bar {
  grid-template-columns: minmax(250px, 0.88fr) minmax(320px, 1.35fr) auto auto;
}

.top-menu {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.top-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 104px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 191, 101, 0.34);
  border-radius: var(--radius);
  background: rgba(255, 191, 101, 0.08);
  color: var(--text);
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.top-menu-trigger > svg:first-child {
  color: var(--gold);
}

.top-menu-chevron {
  width: 15px;
  transition: transform 180ms ease;
}

.top-menu:hover .top-menu-trigger,
.top-menu:focus-within .top-menu-trigger,
.top-menu.open .top-menu-trigger {
  border-color: var(--orange);
  background: rgba(255, 191, 101, 0.14);
  transform: translateY(-1px);
}

.top-menu:hover .top-menu-chevron,
.top-menu:focus-within .top-menu-chevron,
.top-menu.open .top-menu-chevron {
  transform: rotate(180deg);
}

.top-menu-panel {
  position: absolute;
  top: calc(100% - 2px);
  right: 0;
  z-index: 35;
  width: 292px;
  padding: 8px;
  border: 1px solid rgba(255, 191, 101, 0.28);
  border-radius: var(--radius);
  background: rgba(11, 17, 21, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58), 0 0 24px rgba(255, 191, 101, 0.06);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 150ms ease, transform 180ms ease;
}

.top-menu:hover .top-menu-panel,
.top-menu:focus-within .top-menu-panel,
.top-menu.open .top-menu-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.top-menu-panel a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px 10px;
  border-left: 2px solid transparent;
  color: var(--text);
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease;
}

.top-menu-panel a:hover,
.top-menu-panel a:focus-visible,
.top-menu-panel a.active {
  border-left-color: var(--orange);
  background: linear-gradient(90deg, rgba(253, 137, 115, 0.12), rgba(0, 58, 108, 0.18));
  outline: 0;
}

.top-menu-panel a > svg {
  color: var(--gold);
}

.top-menu-panel a span,
.top-menu-panel a b,
.top-menu-panel a small {
  display: block;
  min-width: 0;
}

.top-menu-panel a b {
  font-family: var(--mono);
  font-size: 0.92rem;
}

.top-menu-panel a small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.rankings-page {
  margin-top: 22px;
  border-top: 1px solid rgba(255, 191, 101, 0.36);
  background:
    linear-gradient(120deg, rgba(255, 191, 101, 0.045), transparent 34%, rgba(0, 58, 108, 0.14)),
    rgba(19, 24, 27, 0.9);
  box-shadow: var(--shadow);
  animation: rankingPageIn 300ms ease-out both;
}

.rankings-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 34px;
  padding: clamp(26px, 4vw, 52px) clamp(20px, 4vw, 54px) 28px;
  border-bottom: 1px solid var(--line);
}

.rankings-head h1 {
  margin: 5px 0 12px;
  font-family: var(--mono);
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.92;
}

.rankings-head > div:first-child > p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.rankings-freshness {
  flex: 0 0 auto;
  max-width: 380px;
  padding: 3px 0 3px 16px;
  border-left: 2px solid var(--gold);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: right;
}

.rankings-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px clamp(14px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
  background: rgba(9, 16, 21, 0.52);
}

.rankings-toolbar label {
  display: grid;
  grid-template-columns: 20px minmax(180px, 360px);
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid rgba(204, 213, 218, 0.2);
  border-radius: var(--radius);
  background: rgba(12, 19, 24, 0.78);
}

.rankings-toolbar label:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 191, 101, 0.1);
}

.rankings-toolbar label svg {
  color: var(--gold);
}

.rankings-toolbar input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.rankings-toolbar button,
.rankings-pagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(255, 191, 101, 0.34);
  border-radius: var(--radius);
  background: rgba(255, 191, 101, 0.1);
  color: var(--text);
  font-weight: 700;
}

.rankings-content {
  min-height: 420px;
  padding: 0 clamp(14px, 3vw, 32px) 28px;
}

.ranking-table-frame {
  max-height: none;
  border-width: 0 1px 1px;
  border-radius: 0;
}

.ranking-table {
  min-width: 1180px;
}

.ranking-table th,
.ranking-table td {
  padding-top: 13px;
  padding-bottom: 13px;
  vertical-align: middle;
}

.ranking-table tbody tr {
  animation: rankingRowIn 220ms ease-out both;
}

.ranking-position {
  width: 62px;
  color: var(--gold);
  font-family: var(--mono);
  font-weight: 700;
  text-align: center;
}

.ranking-sort {
  display: inline-flex;
  align-items: center;
  justify-content: inherit;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: inherit;
  white-space: nowrap;
}

.ranking-sort svg {
  width: 14px;
  opacity: 0.46;
}

.ranking-sort:hover svg,
.ranking-sort.active svg {
  color: var(--orange);
  opacity: 1;
}

.ranking-entity {
  display: block;
  color: var(--text);
  text-decoration: none;
}

.ranking-entity strong,
.ranking-entity small {
  display: block;
}

.ranking-entity strong {
  font-family: var(--mono);
  font-size: 0.94rem;
}

.ranking-entity small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.ranking-entity:hover strong,
.ranking-inline-link:hover {
  color: var(--gold);
}

.ranking-inline-link {
  color: var(--text);
  text-decoration: none;
}

.ranking-section {
  padding-top: 28px;
}

.ranking-section + .ranking-section {
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.ranking-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 0 4px 15px;
}

.ranking-section-title span {
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ranking-section-title h2 {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: clamp(1.35rem, 3vw, 2.15rem);
}

.ranking-section-title > b {
  color: var(--muted);
  font-size: 0.8rem;
}

.ranking-build {
  display: grid;
  grid-template-columns: repeat(4, minmax(158px, 1fr));
  gap: 8px;
  min-width: 720px;
}

.ranking-build-item,
.ranking-weapon {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.ranking-build-item img,
.ranking-weapon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.ranking-build-item small,
.ranking-build-item b {
  display: block;
}

.ranking-build-item small {
  color: var(--subtle);
  font-size: 0.64rem;
  text-transform: uppercase;
}

.ranking-build-item b {
  margin-top: 2px;
  overflow: hidden;
  color: var(--text);
  font-size: 0.74rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-weapon strong {
  font-size: 0.86rem;
}

.ranking-loading,
.ranking-empty {
  display: flex;
  min-height: 420px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}

.ranking-loading svg {
  color: var(--gold);
  animation: rankingSpin 900ms linear infinite;
}

.ranking-empty {
  flex-direction: column;
  text-align: center;
}

.ranking-empty svg {
  width: 34px;
  height: 34px;
  color: var(--orange);
}

.ranking-empty strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 1.25rem;
}

.rankings-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 20px;
  border-top: 1px solid var(--line);
}

.rankings-pagination > span {
  min-width: 180px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.rankings-pagination button:disabled {
  opacity: 0.35;
  cursor: default;
}

@keyframes rankingPageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes rankingRowIn {
  from { opacity: 0; transform: translateX(-5px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes rankingSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1180px) {
  .command-bar {
    grid-template-columns: minmax(250px, 1fr) auto auto;
  }

  .search-box {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 760px) {
  .command-bar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .brand-mark span {
    display: none;
  }

  .top-menu-trigger {
    min-width: 72px;
    padding: 0 10px;
  }

  .top-menu-chevron {
    display: none;
  }

  .top-menu-panel {
    position: fixed;
    top: 78px;
    right: 10px;
    width: min(320px, calc(100vw - 20px));
  }

  .server-badge {
    min-width: 44px;
    padding: 0 10px;
  }

  .server-badge span {
    display: none;
  }

  .rankings-head {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }

  .rankings-freshness {
    max-width: none;
    text-align: left;
  }

  .rankings-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .rankings-toolbar label {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .ranking-table-frame {
    margin-right: -14px;
    margin-left: -14px;
  }

  .rankings-pagination {
    gap: 8px;
  }

  .rankings-pagination > span {
    min-width: 0;
  }

  .rankings-pagination button span {
    display: none;
  }
}
