@font-face {
  font-family: "Blanka";
  src: url("/fonts/Blanka-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --void: #06030d;
  --void-2: #0b0618;
  --pink: #ff46c8;
  --pink-soft: #ff9ee7;
  --cyan: #35e6ff;
  --cyan-soft: #a8fbff;
  --violet: #7b4dff;
  --gold: #e6b04f;
  --gold-light: #fff0b8;
  --white: #fff8ff;
  --text: #f8f0ff;
  --muted: rgba(248, 240, 255, 0.74);
  --muted-2: rgba(248, 240, 255, 0.52);
  --panel: rgba(10, 6, 22, 0.78);
  --panel-strong: rgba(7, 4, 17, 0.90);
  --bad: #ff5a7a;
  --good: #a8fbff;
  --line: rgba(248, 240, 255, 0.10);
  --cyan-line: rgba(53, 230, 255, 0.34);
  --pink-line: rgba(255, 70, 200, 0.34);
  --gold-line: rgba(230, 176, 79, 0.30);
  --shell-width: min(1460px, 100%);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 70, 200, 0.18), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(53, 230, 255, 0.16), transparent 26%),
    radial-gradient(circle at 50% 88%, rgba(123, 77, 255, 0.16), transparent 34%),
    linear-gradient(rgba(5, 2, 12, 0.70), rgba(5, 2, 12, 0.78)),
    url("/poster.png") center center / cover fixed no-repeat,
    linear-gradient(135deg, var(--void), var(--void-2) 46%, #05020a);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.42;
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(255, 70, 200, 0.08) 19%, transparent 27%),
    linear-gradient(245deg, transparent 0 22%, rgba(53, 230, 255, 0.09) 23%, transparent 31%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 82px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 68px);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.08;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.7) 0px,
    rgba(255,255,255,0.7) 1px,
    transparent 1px,
    transparent 5px
  );
  mix-blend-mode: screen;
}


.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 20px clamp(18px, 4vw, 44px) 14px;
  background: linear-gradient(rgba(5, 2, 12, 0.94), rgba(5, 2, 12, 0.12));
  text-transform: uppercase;
  letter-spacing: 2.2px;
  font-size: 12px;
  font-weight: 900;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--pink-soft);
  text-decoration: none;
  text-shadow: 0 0 14px rgba(255, 70, 200, 0.55);
  white-space: nowrap;
  flex: 0 0 auto;
  min-width: 0;
}

.brand-mark {
  color: var(--pink);
  font-size: 22px;
  filter: drop-shadow(0 0 10px rgba(255, 70, 200, 0.9));
}

.topbar .main-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  flex-wrap: nowrap;
  min-width: 0;
}

.topbar .main-nav a {
  color: rgba(248, 240, 255, 0.76);
  text-decoration: none;
  padding-bottom: 8px;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease, text-shadow 160ms ease;
}

.topbar .main-nav a:hover,
.topbar .main-nav a.active {
  color: var(--white);
  border-color: var(--pink);
  text-shadow: 0 0 12px rgba(255, 70, 200, 0.65);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(53, 230, 255, 0.30);
  background: rgba(5, 3, 12, 0.72);
  color: var(--white);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(53, 230, 255, 0.10), inset 0 0 14px rgba(255,255,255,0.04);
  clip-path: polygon(0 9px, 9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px));
}

.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] {
  border-color: rgba(255, 70, 200, 0.62);
  color: var(--pink-soft);
  text-shadow: 0 0 12px rgba(255, 70, 200, 0.55);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.page {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  padding: 98px clamp(14px, 3vw, 34px) 34px;
}

.header-panel {
  width: var(--shell-width);
  margin: 0 auto 18px;
  padding: clamp(20px, 2.6vw, 30px);
  border: 1px solid rgba(255, 70, 200, 0.45);
  border-right-color: rgba(53, 230, 255, 0.38);
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 38%, rgba(255, 70, 200, 0.14), transparent 34%),
    radial-gradient(circle at 78% 34%, rgba(53, 230, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(14, 7, 30, 0.88), rgba(5, 3, 12, 0.86));
  box-shadow:
    0 0 0 1px rgba(53, 230, 255, 0.18) inset,
    0 0 34px rgba(255, 70, 200, 0.20),
    0 24px 72px rgba(0, 0, 0, 0.62);
  text-align: center;
}

.panel-kicker {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(53, 230, 255, 0.52);
  margin-bottom: 12px;
}

.ledger-hero h1 {
  margin: 0;
  font-family: "Blanka", "Arial Black", Impact, sans-serif;
  font-size: clamp(38px, 6.4vw, 82px);
  line-height: 0.9;
  letter-spacing: clamp(4px, 0.8vw, 11px);
  text-transform: uppercase;
  background: linear-gradient(90deg, #ffffff 0%, #fff4ff 22%, var(--pink-soft) 42%, var(--cyan-soft) 64%, #ffffff 100%);
  background-size: 230% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.42),
    0 0 24px rgba(255, 70, 200, 0.50),
    0 0 40px rgba(53, 230, 255, 0.34);
  animation: logoSweep 5.8s ease-in-out infinite;
}

.subtitle {
  margin: 16px auto 0;
  color: var(--gold);
  font-size: clamp(12px, 1.45vw, 17px);
  font-weight: 900;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(230, 176, 79, 0.42);
}

.provided {
  margin-top: 11px;
  color: rgba(248, 240, 255, 0.72);
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  font-weight: 900;
}

.provided strong {
  color: var(--cyan-soft);
  text-shadow: 0 0 10px rgba(53, 230, 255, 0.35);
}

.ledger-shell {
  width: var(--shell-width);
  margin: 0 auto;
}

.ledger-tabs,
.statline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ledger-tabs {
  margin: 0 0 14px;
}

.ledger-tabs a,
.history-toggle a,
.filters button,
.filters .reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 10px 14px;
  border: 1px solid rgba(248, 240, 255, 0.16);
  background: rgba(5, 3, 12, 0.68);
  color: var(--muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1.35px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(6px);
  clip-path: polygon(0 9px, 9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px));
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.ledger-tabs a:hover,
.history-toggle a:hover,
.filters button:hover,
.filters .reset:hover {
  color: var(--white);
  border-color: rgba(53, 230, 255, 0.45);
  box-shadow: 0 0 14px rgba(53, 230, 255, 0.14);
}

.ledger-tabs a.active {
  color: #05020a;
  border-color: rgba(168, 251, 255, 0.88);
  background: linear-gradient(135deg, rgba(53, 230, 255, 0.95), rgba(255, 70, 200, 0.92));
  box-shadow: 0 0 18px rgba(255, 70, 200, 0.30), inset 0 0 18px rgba(255,255,255,0.10);
}

.statline {
  margin: 0 0 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(53, 230, 255, 0.28);
  border-left-color: rgba(255, 70, 200, 0.26);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  background: rgba(5, 3, 12, 0.58);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.15px;
  white-space: nowrap;
  box-shadow: inset 0 0 12px rgba(255, 70, 200, 0.035);
}

.board-note {
  max-width: 1060px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.history-toggle {
  margin: 14px 0 20px;
}

.history-toggle a {
  color: var(--cyan);
  background: rgba(53, 230, 255, 0.06);
  border-color: rgba(53, 230, 255, 0.35);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(53, 230, 255, 0.22);
  border-left-color: rgba(255, 70, 200, 0.26);
  border-radius: 10px;
  background:
    radial-gradient(circle at top left, rgba(255, 70, 200, 0.09), transparent 34%),
    rgba(6, 3, 16, 0.62);
  box-shadow: inset 0 0 20px rgba(255,255,255,0.02);
}

.filters label {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-weight: 900;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filters input {
  width: clamp(170px, 18vw, 240px);
  background: rgba(5, 3, 12, 0.78);
  color: var(--text);
  border: 1px solid rgba(53, 230, 255, 0.34);
  border-radius: 0;
  padding: 10px;
  font: inherit;
}

.filters button,
.filters .reset {
  border-color: rgba(255, 70, 200, 0.45);
  background: rgba(255, 70, 200, 0.16);
}

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

.grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 18px;
}

.card {
  min-width: 0;
  border: 1px solid rgba(53, 230, 255, 0.34);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(10, 6, 22, 0.82), rgba(5, 3, 12, 0.88));
  box-shadow:
    0 0 24px rgba(53, 230, 255, 0.10),
    0 0 28px rgba(255, 70, 200, 0.08),
    inset 0 0 22px rgba(255,255,255,0.025);
  padding: 16px;
  overflow: hidden;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.62;
  background:
    radial-gradient(circle at 0 0, rgba(53, 230, 255, 0.08), transparent 30%),
    radial-gradient(circle at 100% 0, rgba(255, 70, 200, 0.07), transparent 34%);
}

.card > * {
  position: relative;
  z-index: 1;
}

.card h2 {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(53, 230, 255, 0.52);
  line-height: 1.3;
}

.box-key {
  color: rgba(248, 240, 255, 0.58);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 9px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.3px;
}

td { font-weight: 800; }
.num { text-align: right; }

.rank {
  color: var(--gold);
  width: 30px;
  flex: 0 0 30px;
  font-size: 20px;
  font-weight: 1000;
  text-align: center;
  text-shadow: 0 0 10px rgba(230, 176, 79, 0.30);
}

.pilot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pilot-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 9px;
  border: 1px solid rgba(248, 240, 255, 0.10);
  background:
    linear-gradient(90deg, rgba(248, 240, 255, 0.045), rgba(248, 240, 255, 0.015));
  clip-path: polygon(0 10px, 10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px));
}

.portrait {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  border: 1px solid rgba(53, 230, 255, 0.35);
  object-fit: cover;
  background: #05020a;
  flex: 0 0 46px;
  box-shadow: 0 0 10px rgba(53, 230, 255, 0.10);
}

.pilot-info {
  min-width: 0;
  flex: 1;
}

.pilot-name {
  display: block;
  color: var(--white);
  font-weight: 1000;
  font-size: 13px;
  letter-spacing: 0.25px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 10px rgba(255,255,255,0.11);
}

.entity-link {
  color: var(--white);
  text-decoration: none;
}

.entity-link:hover {
  color: var(--cyan);
  text-decoration: none;
  text-shadow: 0 0 10px rgba(53,230,255,0.4);
}

.pilot-detail {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.4px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-count {
  text-align: right;
  min-width: 78px;
  color: var(--gold-light);
  font-weight: 1000;
  text-shadow: 0 0 12px rgba(230, 176, 79, 0.22);
}

.metric-count span {
  display: block;
  font-size: clamp(20px, 1.55vw, 28px);
  line-height: 1;
}

.metric-count small {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 1px;
}

.lp-count {
  color: var(--pink-soft);
  text-shadow: 0 0 12px rgba(255, 70, 200, 0.36);
}

.empty {
  color: var(--muted);
  padding: 14px 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.section-spacer { height: 16px; }

.recent-card {
  max-width: 920px;
}

.event {
  padding: 11px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.event:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.event strong {
  color: var(--cyan);
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
  text-shadow: 0 0 10px rgba(53,230,255,0.28);
}

.mini {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.mini a {
  color: var(--cyan);
  text-decoration: none;
}

.mini a:hover {
  text-decoration: underline;
}

.capture { color: var(--gold-light); text-shadow: 0 0 10px rgba(230,176,79,0.30); }
.defense { color: var(--good); text-shadow: 0 0 10px rgba(53,230,255,0.30); }
.lp { color: var(--pink); }
.kill { color: var(--bad); text-shadow: 0 0 10px rgba(255,90,122,0.28); }
.supply,
.site { color: var(--white); }

.footer {
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

@keyframes logoSweep {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

@media (min-width: 1700px) {
  :root { --shell-width: min(1640px, 100%); }
  .recent-card { max-width: 980px; }
}

@media (max-width: 1180px) {
  .kill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: 1fr; }
  .recent-card { max-width: none; }
}


@media (max-width: 1500px) {
  .topbar { gap: 16px; }

  .topbar .main-nav {
    position: fixed;
    top: 76px;
    right: clamp(14px, 3vw, 34px);
    z-index: 10;
    width: min(360px, calc(100vw - 28px));
    display: grid;
    gap: 0;
    padding: 12px;
    border: 1px solid rgba(53, 230, 255, 0.34);
    border-left-color: rgba(255, 70, 200, 0.42);
    background:
      radial-gradient(circle at 22% 18%, rgba(255, 70, 200, 0.16), transparent 38%),
      linear-gradient(180deg, rgba(10, 6, 22, 0.96), rgba(5, 3, 12, 0.98));
    box-shadow:
      0 0 30px rgba(53, 230, 255, 0.12),
      0 24px 72px rgba(0, 0, 0, 0.70),
      inset 0 0 22px rgba(255,255,255,0.025);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 140ms ease, transform 140ms ease;
  }

  body.nav-open .topbar .main-nav {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .topbar .main-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(248, 240, 255, 0.10);
    white-space: nowrap;
  }

  .topbar .main-nav a:last-child { border-bottom: 0; }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }
}

@media (max-width: 880px) {
  .brand { white-space: normal; }
  .topbar { padding-top: 16px; }
  .topbar .main-nav { top: 68px; }
  .page { padding-top: 86px; }
  .header-panel { text-align: left; }
  .ledger-hero h1 { font-size: clamp(34px, 10vw, 58px); }
  .subtitle { letter-spacing: 2px; }
}

@media (max-width: 760px) {
  .page { padding-inline: 14px; }
  .kill-grid { grid-template-columns: 1fr; }
  .ledger-tabs a { flex: 1 1 auto; }
  .pilot-row { gap: 9px; }
  .rank { width: 24px; flex-basis: 24px; font-size: 18px; }
  .portrait { width: 42px; height: 42px; flex-basis: 42px; }
  .metric-count { min-width: 66px; }
  .metric-count span { font-size: 21px; }
  .filters input { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
  }
}

/* Ledger refinement pass: clearer controls, cleaner status row, right-side LP activity drawer. */
.header-panel.ledger-hero {
  overflow: visible;
  padding-block: clamp(26px, 3vw, 46px);
  background:
    radial-gradient(circle at 18% 38%, rgba(255, 70, 200, 0.13), transparent 34%),
    radial-gradient(circle at 78% 34%, rgba(53, 230, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(14, 7, 30, 0.94), rgba(5, 3, 12, 0.94));
}

.ledger-hero h1 {
  line-height: 1.06;
  padding: 0.06em 0 0.10em;
  overflow: visible;
  filter: drop-shadow(0 0 14px rgba(255, 158, 231, 0.38));
}

.ledger-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 14px;
  width: 100%;
}

.leaderboard-tab-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ledger-tabs a,
.history-toggle a,
.filters button,
.filters .reset {
  min-height: 44px;
  padding: 12px 18px;
  border-width: 1px;
  color: rgba(248, 240, 255, 0.84);
  background:
    linear-gradient(180deg, rgba(20, 13, 38, 0.86), rgba(5, 3, 12, 0.78));
  box-shadow:
    0 0 0 1px rgba(255, 70, 200, 0.08) inset,
    0 0 18px rgba(53, 230, 255, 0.06);
}

.ledger-tabs a:hover,
.history-toggle a:hover,
.filters button:hover,
.filters .reset:hover {
  transform: translateY(-1px);
  color: var(--white);
  border-color: rgba(53, 230, 255, 0.56);
  background:
    linear-gradient(180deg, rgba(53, 230, 255, 0.13), rgba(5, 3, 12, 0.78));
  box-shadow:
    0 0 0 1px rgba(53, 230, 255, 0.16) inset,
    0 0 20px rgba(53, 230, 255, 0.18);
}

.ledger-tabs a.active {
  color: #05020a;
  border-color: rgba(168, 251, 255, 0.95);
  background:
    linear-gradient(135deg, rgba(53, 230, 255, 0.98), rgba(255, 70, 200, 0.94));
  text-shadow: none;
  box-shadow:
    0 0 22px rgba(53, 230, 255, 0.18),
    0 0 24px rgba(255, 70, 200, 0.18),
    inset 0 0 18px rgba(255,255,255,0.16);
}

.add-character-button {
  margin-left: auto;
  border-color: rgba(230, 176, 79, 0.46) !important;
  color: var(--gold-light) !important;
  background:
    linear-gradient(180deg, rgba(230, 176, 79, 0.15), rgba(5, 3, 12, 0.78)) !important;
  box-shadow:
    0 0 0 1px rgba(230, 176, 79, 0.10) inset,
    0 0 18px rgba(230, 176, 79, 0.08) !important;
}

.add-character-button:hover {
  border-color: rgba(255, 240, 184, 0.72) !important;
  box-shadow:
    0 0 0 1px rgba(255, 240, 184, 0.12) inset,
    0 0 20px rgba(230, 176, 79, 0.18) !important;
}

.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 14px;
  width: 100%;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid rgba(53, 230, 255, 0.28);
  border-left-color: rgba(255, 70, 200, 0.26);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(5, 3, 12, 0.58);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.15px;
  white-space: nowrap;
  box-shadow: inset 0 0 12px rgba(255, 70, 200, 0.035);
}

.status-pill-right {
  margin-left: auto;
  text-align: right;
}

.history-toggle {
  margin: 8px 0 20px;
}

.activity-fab {
  position: fixed;
  top: 50%;
  right: 0;
  z-index: 18;
  transform: translateY(-50%);
  min-height: 50px;
  padding: 13px 16px 13px 18px;
  border: 1px solid rgba(53, 230, 255, 0.46);
  border-right: 0;
  border-radius: 14px 0 0 14px;
  color: var(--cyan);
  background:
    linear-gradient(135deg, rgba(53, 230, 255, 0.16), rgba(255, 70, 200, 0.12)),
    rgba(5, 3, 12, 0.88);
  box-shadow:
    0 0 24px rgba(53, 230, 255, 0.16),
    inset 0 0 18px rgba(255,255,255,0.035);
  font: inherit;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: 1.45px;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.activity-fab:hover {
  color: var(--white);
  transform: translateY(-50%) translateX(-2px);
  box-shadow:
    0 0 28px rgba(53, 230, 255, 0.22),
    0 0 26px rgba(255, 70, 200, 0.12),
    inset 0 0 18px rgba(255,255,255,0.05);
}

.activity-fab span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  margin-left: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #05020a;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(53, 230, 255, 0.38);
}

.activity-open .activity-fab {
  opacity: 0;
  pointer-events: none;
}

.activity-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(5, 3, 12, 0.36);
  backdrop-filter: blur(1px);
}

.activity-backdrop[hidden] {
  display: none !important;
}

.activity-drawer {
  position: fixed;
  top: 84px;
  right: 0;
  bottom: 22px;
  z-index: 20;
  width: min(450px, calc(100vw - 32px));
  border: 1px solid rgba(53, 230, 255, 0.38);
  border-left-color: rgba(255, 70, 200, 0.34);
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(255, 70, 200, 0.12), transparent 34%),
    radial-gradient(circle at top right, rgba(53, 230, 255, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(10, 6, 22, 0.96), rgba(5, 3, 12, 0.96));
  box-shadow:
    0 0 32px rgba(53, 230, 255, 0.18),
    0 0 34px rgba(255, 70, 200, 0.10),
    0 26px 76px rgba(0, 0, 0, 0.68),
    inset 0 0 24px rgba(255,255,255,0.025);
  transform: translateX(calc(100% + 36px));
  transition: transform 180ms ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.activity-drawer.open {
  transform: translateX(0);
}

.activity-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(248, 240, 255, 0.10);
  background: rgba(5, 3, 12, 0.32);
}

.activity-kicker {
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(230, 176, 79, 0.34);
  margin-bottom: 7px;
}

.activity-drawer h2 {
  margin: 0;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 1000;
  letter-spacing: 2.4px;
  line-height: 1.2;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(53, 230, 255, 0.52);
}

.activity-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(248, 240, 255, 0.16);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(5, 3, 12, 0.72);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.activity-close:hover {
  color: var(--white);
  border-color: rgba(255, 70, 200, 0.46);
  box-shadow: 0 0 14px rgba(255, 70, 200, 0.18);
}

.activity-drawer-body {
  min-height: 0;
  overflow-y: auto;
  padding: 6px 18px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(53, 230, 255, 0.35) rgba(5, 3, 12, 0.45);
}

.activity-event {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.activity-event:last-child {
  border-bottom: 0;
}

.activity-event strong {
  display: block;
  margin-bottom: 5px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 1000;
  text-shadow: 0 0 10px rgba(53,230,255,0.28);
}

.activity-event-label {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 900;
  margin-bottom: 4px;
}

@media (max-width: 880px) {
  .ledger-tabs {
    align-items: stretch;
    flex-direction: column;
  }

  .leaderboard-tab-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .ledger-tabs a,
  .add-character-button {
    width: 100%;
  }

  .add-character-button {
    margin-left: 0;
  }

  .status-strip {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .status-pill,
  .status-pill-right {
    width: 100%;
    margin-left: 0;
    justify-content: center;
    text-align: center;
  }

  .activity-fab {
    top: auto;
    right: 12px;
    bottom: 14px;
    transform: none;
    border: 1px solid rgba(53, 230, 255, 0.46);
    border-radius: 999px;
  }

  .activity-fab:hover {
    transform: translateY(-1px);
  }

  .activity-drawer {
    top: 72px;
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

/* Pilot affiliation row treatment */
.pilot-row-affiliated {
  min-height: 76px;
  gap: 0;
  padding: 9px 10px;
  background:
    radial-gradient(circle at 22% 50%, rgba(53, 230, 255, 0.08), transparent 34%),
    linear-gradient(90deg, rgba(248, 240, 255, 0.052), rgba(248, 240, 255, 0.015));
}

.pilot-row-affiliated .rank {
  margin-right: 9px;
}

.pilot-row-affiliated .portrait {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  border-radius: 5px;
  border-color: rgba(53, 230, 255, 0.44);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.65),
    0 0 14px rgba(53, 230, 255, 0.14);
  position: relative;
  z-index: 2;
}

.pilot-affiliation-icons {
  width: 31px;
  flex: 0 0 31px;
  display: grid;
  align-content: center;
  gap: 3px;
  margin-left: -7px;
  margin-right: -1px;
  position: relative;
  z-index: 3;
}

.pilot-affiliation-icons img {
  width: 29px;
  height: 29px;
  border-radius: 4px;
  object-fit: cover;
  background: rgba(5, 3, 12, 0.95);
  border: 1px solid rgba(53, 230, 255, 0.28);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.68),
    0 0 10px rgba(53, 230, 255, 0.11);
}

.pilot-info-affiliated {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  max-width: min(270px, 54%);
  padding: 7px 13px 7px 14px;
  background: transparent;
  border-left: 0;
  box-shadow: none;
}

.pilot-info-affiliated .pilot-name {
  color: var(--cyan);
  font-size: 12px;
  line-height: 1.18;
  text-shadow: 0 0 11px rgba(53, 230, 255, 0.28);
}

.pilot-affiliation-line {
  margin-top: 2px;
  color: var(--cyan-soft);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0.15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 9px rgba(53, 230, 255, 0.22);
}

.pilot-affiliation-line.alliance-line {
  color: rgba(168, 251, 255, 0.90);
}

.pilot-row-affiliated .pilot-detail {
  display: none;
}

.pilot-row-affiliated .metric-count {
  margin-left: auto;
}

@media (max-width: 760px) {
  .pilot-row-affiliated .portrait {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .pilot-affiliation-icons {
    width: 26px;
    flex-basis: 26px;
  }

  .pilot-affiliation-icons img {
    width: 24px;
    height: 24px;
  }

  .pilot-info-affiliated {
    max-width: none;
    padding-inline: 10px;
  }

  .pilot-affiliation-line {
    font-size: 10px;
  }
}

/* Current-only layout pass: hide historical controls, move meta to bottom, and use a vertical LP activity rail. */
:root {
  --activity-drawer-width: min(450px, calc(100vw - 32px));
}

.history-toggle,
.filters {
  display: none !important;
}

.bottom-status-strip {
  margin: 18px 0 0;
}

.current-rank-card {
  margin: 0 0 14px;
  padding: 14px;
}

.current-rank-characters {
  display: grid;
  gap: 14px;
}

.current-rank-character + .current-rank-character {
  padding-top: 14px;
  border-top: 1px solid rgba(248, 240, 255, 0.10);
}

.current-rank-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.current-rank-head .portrait {
  width: 54px;
  height: 54px;
  flex-basis: 54px;
  border-radius: 6px;
}

.current-rank-title {
  min-width: 0;
}

.current-rank-title h2 {
  margin-bottom: 0;
  font-size: 15px;
  color: var(--white);
  text-shadow: 0 0 10px rgba(255,255,255,0.12);
}

.current-rank-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.current-rank-row {
  min-width: 0;
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(248, 240, 255, 0.10);
  background:
    linear-gradient(90deg, rgba(248, 240, 255, 0.05), rgba(248, 240, 255, 0.018));
  clip-path: polygon(0 10px, 10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px));
}

.current-rank-row strong,
.current-rank-row span,
.current-rank-value small {
  display: block;
}

.current-rank-row strong {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.current-rank-row span,
.current-rank-value small,
.current-rank-note {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.current-rank-position {
  color: var(--gold-light);
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 0 12px rgba(230, 176, 79, 0.30);
}

.current-rank-value {
  min-width: 88px;
  text-align: right;
  color: var(--pink-soft);
  font-size: clamp(18px, 1.5vw, 25px);
  font-weight: 1000;
  line-height: 1.05;
  text-shadow: 0 0 12px rgba(255, 70, 200, 0.30);
}

.current-rank-empty {
  grid-column: span 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 1.1px;
  text-align: right;
  text-transform: uppercase;
}

.current-rank-note {
  margin-top: 10px;
}

.footer {
  margin-top: 12px;
  text-align: right;
}

.discord-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 21;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(168, 251, 255, 0.34);
  border-radius: 14px;
  background: rgba(5, 3, 12, 0.68);
  box-shadow:
    0 0 0 1px rgba(255, 70, 200, 0.08) inset,
    0 0 20px rgba(53, 230, 255, 0.16),
    0 18px 40px rgba(0, 0, 0, 0.44);
  opacity: 0.92;
  transform: translateY(0);
  transition:
    opacity 170ms ease,
    transform 170ms ease,
    border-color 170ms ease,
    box-shadow 170ms ease;
}

.discord-float img {
  width: 46px;
  height: 46px;
  display: block;
  object-fit: contain;
}

.discord-float:hover,
.discord-float:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
  border-color: rgba(255, 158, 231, 0.58);
  box-shadow:
    0 0 0 1px rgba(255, 70, 200, 0.14) inset,
    0 0 24px rgba(255, 70, 200, 0.20),
    0 18px 44px rgba(0, 0, 0, 0.50);
}

.discord-float:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.discord-float-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

/* Recent LP rail is fixed to the viewport edge; do not pad/narrow the LP shell. */

.activity-drawer {
  width: var(--activity-drawer-width) !important;
}

.activity-backdrop {
  z-index: 18;
}

.activity-fab {
  position: fixed;
  top: 50% !important;
  right: 0 !important;
  bottom: auto !important;
  z-index: 22;
  width: 48px;
  min-width: 48px;
  min-height: 162px;
  padding: 13px 8px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-right: 0;
  border-radius: 14px 0 0 14px;
  transform: translateY(-50%) !important;
  writing-mode: initial;
  transition:
    right 180ms ease,
    opacity 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.activity-fab:hover {
  transform: translateY(-50%) translateX(-2px) !important;
}

.activity-fab .activity-rail-label {
  display: block;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 0;
  color: var(--cyan);
  background: transparent;
  box-shadow: none;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  line-height: 1;
  letter-spacing: 1.8px;
  white-space: nowrap;
}

.activity-fab .activity-rail-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 26px;
  margin: 0;
  padding: 3px 7px;
  border-radius: 999px;
  color: #05020a;
  background: var(--cyan);
  box-shadow: 0 0 14px rgba(53, 230, 255, 0.38);
  writing-mode: horizontal-tb;
  transform: none;
}

.activity-open .activity-fab {
  opacity: 1 !important;
  pointer-events: auto !important;
  right: var(--activity-drawer-width) !important;
  transform: translateY(-50%) !important;
}

.activity-open .activity-fab:hover {
  transform: translateY(-50%) translateX(-2px) !important;
}

@media (max-width: 880px) {

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

  .current-rank-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .current-rank-value,
  .current-rank-empty {
    grid-column: 2;
  }

  .activity-fab {
    top: auto !important;
    right: 12px !important;
    bottom: 14px !important;
    width: auto;
    min-width: 0;
    min-height: 50px;
    padding: 12px 14px;
    flex-direction: row;
    border: 1px solid rgba(53, 230, 255, 0.46);
    border-radius: 999px;
    transform: none !important;
  }

  .activity-fab:hover {
    transform: translateY(-1px) !important;
  }

  .activity-fab .activity-rail-label {
    writing-mode: initial;
    transform: none;
  }

  .activity-open .activity-fab {
    opacity: 0 !important;
    pointer-events: none !important;
    right: 12px !important;
    transform: none !important;
  }

  .discord-float {
    right: 12px;
    bottom: 76px;
    width: 52px;
    height: 52px;
  }

  .discord-float img {
    width: 41px;
    height: 41px;
  }
}


/* LP alignment fix: keep LP and Kills shells identical.
   The Recent LP rail is viewport-fixed, so it should not change the page/grid width. */
.ledger-tab-lp .ledger-shell {
  padding-right: 0 !important;
}

.activity-fab {
  right: 0 !important;
}

.activity-open .activity-fab {
  right: var(--activity-drawer-width) !important;
}

/* Ledger neutral mode toggle + shared theme state with dashboard */
.ledger-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  flex: 0 0 auto;
}

.ledger-action-timer {
  min-height: 44px;
  border-color: rgba(53, 230, 255, 0.36);
  color: var(--cyan-soft);
  background:
    linear-gradient(180deg, rgba(53, 230, 255, 0.10), rgba(5, 3, 12, 0.76));
  box-shadow:
    0 0 0 1px rgba(53, 230, 255, 0.10) inset,
    0 0 18px rgba(53, 230, 255, 0.08);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid rgba(248, 240, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(20, 13, 38, 0.86), rgba(5, 3, 12, 0.78));
  color: rgba(248, 240, 255, 0.84);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.35px;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(6px);
  clip-path: polygon(0 9px, 9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px));
  box-shadow:
    0 0 0 1px rgba(255, 70, 200, 0.08) inset,
    0 0 18px rgba(53, 230, 255, 0.06);
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.theme-toggle:hover,
.theme-toggle[aria-pressed="true"] {
  transform: translateY(-1px);
  color: var(--white);
  border-color: rgba(53, 230, 255, 0.56);
  background:
    linear-gradient(180deg, rgba(53, 230, 255, 0.13), rgba(5, 3, 12, 0.78));
  box-shadow:
    0 0 0 1px rgba(53, 230, 255, 0.16) inset,
    0 0 20px rgba(53, 230, 255, 0.18);
}

body.theme-neutral {
  --void: #070b10;
  --void-2: #0d1218;
  --pink: #d58b2a;
  --pink-soft: #f0b35a;
  --cyan: #5da9e9;
  --cyan-soft: #a9d6ff;
  --violet: #8aa0b4;
  --gold: #d8b45f;
  --gold-light: #ffe0a3;
  --white: #f4f7fb;
  --text: #eef3f8;
  --muted: rgba(238, 243, 248, 0.72);
  --muted-2: rgba(238, 243, 248, 0.54);
  --panel: rgba(10, 14, 19, 0.82);
  --panel-strong: rgba(6, 9, 13, 0.92);
  --bad: #f0b35a;
  --good: #a9d6ff;
  --line: rgba(238, 243, 248, 0.10);
  --cyan-line: rgba(93, 169, 233, 0.30);
  --pink-line: rgba(216, 180, 95, 0.30);
  --gold-line: rgba(216, 180, 95, 0.30);
  background:
    radial-gradient(circle at 18% 18%, rgba(93, 169, 233, 0.13), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(216, 180, 95, 0.12), transparent 26%),
    radial-gradient(circle at 50% 88%, rgba(138, 160, 180, 0.10), transparent 34%),
    linear-gradient(rgba(5, 8, 12, 0.82), rgba(5, 8, 12, 0.88)),
    url("/poster.png") center center / cover fixed no-repeat,
    linear-gradient(135deg, #070b10, #0d1218 46%, #04070a);
}

body.theme-neutral::before {
  opacity: 0.34;
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(93, 169, 233, 0.06) 19%, transparent 27%),
    linear-gradient(245deg, transparent 0 22%, rgba(216, 180, 95, 0.06) 23%, transparent 31%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 82px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 68px);
}

body.theme-neutral::after {
  opacity: 0.055;
}

body.theme-neutral .brand,
body.theme-neutral .brand-mark,
body.theme-neutral .topbar .main-nav a:hover,
body.theme-neutral .topbar .main-nav a.active {
  color: #a9d6ff;
  border-color: #5da9e9;
  text-shadow: 0 0 12px rgba(93, 169, 233, 0.46);
}

body.theme-neutral .nav-toggle,
body.theme-neutral .theme-toggle {
  color: rgba(238, 243, 248, 0.88);
  border-color: rgba(93, 169, 233, 0.30);
  background:
    linear-gradient(180deg, rgba(13, 18, 24, 0.88), rgba(5, 8, 12, 0.80));
  box-shadow:
    0 0 0 1px rgba(93, 169, 233, 0.08) inset,
    0 0 16px rgba(93, 169, 233, 0.08);
}

body.theme-neutral .theme-toggle[aria-pressed="true"],
body.theme-neutral .theme-toggle:hover,
body.theme-neutral .nav-toggle:hover {
  color: #fff;
  border-color: rgba(216, 180, 95, 0.46);
  background:
    linear-gradient(180deg, rgba(216, 180, 95, 0.14), rgba(5, 8, 12, 0.80));
  box-shadow:
    0 0 0 1px rgba(216, 180, 95, 0.12) inset,
    0 0 18px rgba(216, 180, 95, 0.14);
}

body.theme-neutral .header-panel,
body.theme-neutral .header-panel.ledger-hero,
body.theme-neutral .card,
body.theme-neutral .activity-drawer {
  border-color: rgba(93, 169, 233, 0.30);
  background:
    radial-gradient(circle at 18% 38%, rgba(93, 169, 233, 0.08), transparent 34%),
    radial-gradient(circle at 78% 34%, rgba(216, 180, 95, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(11, 16, 22, 0.90), rgba(5, 8, 12, 0.90));
  box-shadow:
    0 0 0 1px rgba(93, 169, 233, 0.12) inset,
    0 0 28px rgba(93, 169, 233, 0.10),
    0 24px 72px rgba(0, 0, 0, 0.62);
}

body.theme-neutral h1,
body.theme-neutral .ledger-hero h1 {
  background: linear-gradient(90deg, #f4f7fb 0%, #dbe7f2 28%, #a9d6ff 48%, #ffe0a3 70%, #f4f7fb 100%);
  background-size: 230% auto;
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow:
    0 0 10px rgba(244, 247, 251, 0.24),
    0 0 22px rgba(93, 169, 233, 0.22),
    0 0 34px rgba(216, 180, 95, 0.18);
  filter: drop-shadow(0 0 14px rgba(169, 214, 255, 0.22));
}

body.theme-neutral .panel-kicker,
body.theme-neutral .card h2,
body.theme-neutral .activity-kicker,
body.theme-neutral .activity-drawer h2,
body.theme-neutral .pilot-info-affiliated .pilot-name,
body.theme-neutral .entity-link:hover {
  color: #7cc4ff;
  text-shadow: 0 0 10px rgba(93, 169, 233, 0.38);
}

body.theme-neutral .subtitle,
body.theme-neutral .rank,
body.theme-neutral .metric-count,
body.theme-neutral .kills-count,
body.theme-neutral .metric-count:not(.lp-count) {
  color: #ffe0a3;
  text-shadow: 0 0 10px rgba(216, 180, 95, 0.28);
}

body.theme-neutral .lp-count,
body.theme-neutral .activity-event-label.kill {
  color: #a9d6ff;
  text-shadow: 0 0 10px rgba(93, 169, 233, 0.28);
}

body.theme-neutral .ledger-tabs a,
body.theme-neutral .history-toggle a,
body.theme-neutral .filters button,
body.theme-neutral .filters .reset {
  color: rgba(238, 243, 248, 0.84);
  border-color: rgba(238, 243, 248, 0.14);
  background:
    linear-gradient(180deg, rgba(13, 18, 24, 0.88), rgba(5, 8, 12, 0.80));
  box-shadow:
    0 0 0 1px rgba(93, 169, 233, 0.08) inset,
    0 0 16px rgba(93, 169, 233, 0.06);
}

body.theme-neutral .ledger-tabs a:hover,
body.theme-neutral .history-toggle a:hover,
body.theme-neutral .filters button:hover,
body.theme-neutral .filters .reset:hover {
  border-color: rgba(93, 169, 233, 0.48);
  background:
    linear-gradient(180deg, rgba(93, 169, 233, 0.12), rgba(5, 8, 12, 0.80));
  box-shadow:
    0 0 0 1px rgba(93, 169, 233, 0.12) inset,
    0 0 18px rgba(93, 169, 233, 0.12);
}

body.theme-neutral .ledger-tabs a.active {
  color: #06101a;
  border-color: rgba(169, 214, 255, 0.90);
  background: linear-gradient(135deg, rgba(93, 169, 233, 0.95), rgba(216, 180, 95, 0.86));
  box-shadow:
    0 0 18px rgba(93, 169, 233, 0.16),
    0 0 18px rgba(216, 180, 95, 0.12),
    inset 0 0 16px rgba(255,255,255,0.12);
}

body.theme-neutral .add-character-button {
  color: #ffe0a3 !important;
  border-color: rgba(216, 180, 95, 0.46) !important;
  background:
    linear-gradient(180deg, rgba(216, 180, 95, 0.14), rgba(5, 8, 12, 0.80)) !important;
  box-shadow:
    0 0 0 1px rgba(216, 180, 95, 0.10) inset,
    0 0 18px rgba(216, 180, 95, 0.08) !important;
}

body.theme-neutral .add-character-button:hover {
  border-color: rgba(255, 224, 163, 0.70) !important;
  box-shadow:
    0 0 0 1px rgba(255, 224, 163, 0.12) inset,
    0 0 20px rgba(216, 180, 95, 0.16) !important;
}

body.theme-neutral .pilot-row,
body.theme-neutral .pilot-row-affiliated,
body.theme-neutral .activity-event {
  border-color: rgba(238, 243, 248, 0.10);
  background:
    radial-gradient(circle at 22% 50%, rgba(93, 169, 233, 0.07), transparent 34%),
    linear-gradient(90deg, rgba(238, 243, 248, 0.045), rgba(238, 243, 248, 0.015));
}

body.theme-neutral .portrait,
body.theme-neutral .pilot-affiliation-icons img {
  border-color: rgba(93, 169, 233, 0.34);
  background: #05080c;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.68),
    0 0 10px rgba(93, 169, 233, 0.10);
}

body.theme-neutral .pilot-affiliation-line,
body.theme-neutral .pilot-affiliation-line.alliance-line {
  color: rgba(169, 214, 255, 0.92);
  text-shadow: 0 0 9px rgba(93, 169, 233, 0.18);
}

body.theme-neutral .activity-fab {
  border-color: rgba(93, 169, 233, 0.42);
  background:
    linear-gradient(180deg, rgba(93, 169, 233, 0.20), rgba(5, 8, 12, 0.88));
  box-shadow:
    0 0 0 1px rgba(93, 169, 233, 0.12) inset,
    0 0 20px rgba(93, 169, 233, 0.16);
}

body.theme-neutral .activity-rail-label,
body.theme-neutral .activity-rail-count,
body.theme-neutral .activity-close {
  color: #a9d6ff;
  text-shadow: 0 0 10px rgba(93, 169, 233, 0.34);
}

@media (max-width: 880px) {
  .ledger-actions {
    width: 100%;
    margin-left: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .theme-toggle,
  .add-character-button {
    width: 100%;
  }

  .ledger-action-timer {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }
}


/* LP event display refinement: keep named sites, generic 516 payouts, and style advantage objectives. */
.activity-event.advantage-offensive,
.activity-event.advantage-defensive,
.activity-event.advantage-objective,
.activity-event.lp-generic {
  margin-inline: -8px;
  padding-inline: 8px;
  border-radius: 8px;
}

.activity-event.advantage-offensive {
  background:
    linear-gradient(90deg, rgba(230, 176, 79, 0.12), rgba(230, 176, 79, 0.035));
}

.activity-event.advantage-defensive {
  background:
    linear-gradient(90deg, rgba(53, 230, 255, 0.10), rgba(53, 230, 255, 0.030));
}

.activity-event.advantage-objective,
.activity-event.lp-generic {
  background:
    linear-gradient(90deg, rgba(248, 240, 255, 0.055), rgba(248, 240, 255, 0.018));
}

.activity-event-label.advantage-offensive,
.advantage-offensive {
  color: var(--gold-light);
  text-shadow: 0 0 10px rgba(230, 176, 79, 0.34);
}

.activity-event-label.advantage-defensive,
.advantage-defensive {
  color: var(--cyan-soft);
  text-shadow: 0 0 10px rgba(53, 230, 255, 0.32);
}

.activity-event-label.advantage-objective,
.advantage-objective {
  color: var(--white);
  text-shadow: 0 0 10px rgba(248, 240, 255, 0.16);
}

.activity-event-label.lp-generic,
.lp-generic {
  color: var(--muted);
  text-shadow: 0 0 9px rgba(248, 240, 255, 0.12);
}

body.theme-neutral .activity-event.advantage-offensive {
  background:
    linear-gradient(90deg, rgba(216, 180, 95, 0.12), rgba(216, 180, 95, 0.035));
}

body.theme-neutral .activity-event.advantage-defensive {
  background:
    linear-gradient(90deg, rgba(93, 169, 233, 0.10), rgba(93, 169, 233, 0.030));
}

body.theme-neutral .activity-event-label.advantage-offensive,
body.theme-neutral .advantage-offensive {
  color: #ffe0a3;
  text-shadow: 0 0 10px rgba(216, 180, 95, 0.30);
}

body.theme-neutral .activity-event-label.advantage-defensive,
body.theme-neutral .advantage-defensive {
  color: #a9d6ff;
  text-shadow: 0 0 10px rgba(93, 169, 233, 0.30);
}

body.theme-neutral .activity-event-label.lp-generic,
body.theme-neutral .lp-generic,
body.theme-neutral .activity-event-label.advantage-objective,
body.theme-neutral .advantage-objective {
  color: rgba(238, 243, 248, 0.78);
  text-shadow: 0 0 9px rgba(238, 243, 248, 0.10);
}


/* Ledger performance stabilization: Firefox/Brave were spiking CPU from constant
   repaint/compositing work on animated gradient text, full-screen blend overlays,
   fixed background attachment, and backdrop filters. Keep the look mostly intact,
   but make the page static when idle. */
.ledger-hero h1 {
  animation: none !important;
  background-position: 50% center !important;
  filter: none !important;
}

body::after {
  mix-blend-mode: normal !important;
  opacity: 0.035 !important;
}

body::before {
  opacity: 0.22 !important;
}

html,
body,
body.theme-neutral {
  background-attachment: scroll !important;
}

.ledger-tabs a,
.history-toggle a,
.filters button,
.filters .reset,
.theme-toggle,
.nav-toggle,
.activity-fab,
.activity-backdrop {
  backdrop-filter: none !important;
}

.activity-drawer {
  backdrop-filter: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .activity-drawer,
  .activity-fab,
  .topbar .main-nav,
  .ledger-tabs a,
  .history-toggle a,
  .filters button,
  .filters .reset,
  .theme-toggle {
    transition: none !important;
  }
}
