:root {
  color-scheme: dark;
  --bg: #0a0812;
  --bg-2: #120f1d;
  --panel: rgba(18, 15, 29, 0.76);
  --panel-strong: rgba(33, 27, 47, 0.92);
  --line: rgba(255, 255, 255, 0.11);
  --text: #f5f1ff;
  --muted: rgba(245, 241, 255, 0.72);
  --gold: #ffcf6b;
  --ps99-yellow: #ffd92f;
  --ps99-cyan: #75e7ff;
  --ps99-pink: #ff86cf;
  --pink: #ff7eb8;
  --violet: #b377ff;
  --aqua: #67e3ff;
  --green: #8ff0b1;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.45);
}

@font-face {
  font-family: "Fredoka One";
  src: url("assets/fonts/FredokaOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(179, 119, 255, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 126, 184, 0.16), transparent 22%),
    linear-gradient(180deg, #09070f 0%, #0c0916 40%, #120f1d 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  display: grid;
  gap: 2rem;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 34px;
  position: relative;
  z-index: 1;
}

.bg-orb {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(24px);
  opacity: 0.55;
  pointer-events: none;
}

.bg-orb-a {
  width: 240px;
  height: 240px;
  top: 8%;
  left: 4%;
  background: rgba(179, 119, 255, 0.18);
}

.bg-orb-b {
  width: 300px;
  height: 300px;
  right: 4%;
  top: 18%;
  background: rgba(255, 126, 184, 0.14);
}

.hero,
.section-heading,
.footer {
  animation: fadeUp 700ms ease both;
}

.button {
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  align-items: center;
}

.hero-copy,
.hero-panel,
.info-card,
.clan-card,
.panel-card,
.rules-card,
.bank-note,
.bank-sidebar,
.callout {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-copy {
  border-radius: 32px;
  padding: clamp(24px, 4vw, 42px);
}

.eyebrow,
.panel-label,
.card-kicker,
.clan-tag,
.mini-label {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--ps99-yellow);
  margin: 0 0 0.7rem;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fredoka One", "Fraunces", Georgia, serif;
  line-height: 0.94;
  -webkit-text-stroke: 2.5px #000;
  paint-order: stroke fill;
  text-shadow: none;
}

h1 {
  font-size: clamp(2.8rem, 5.6vw, 5.25rem);
  max-width: 15ch;
  letter-spacing: -0.01em;
}

.hero-title-accent {
  color: var(--ps99-pink);
  -webkit-text-stroke: 2.5px #000;
  paint-order: stroke fill;
}

.principles-title-accent {
  color: var(--ps99-cyan);
  -webkit-text-stroke: 4px #000;
  paint-order: stroke fill;
}

.section-title-blue {
  color: var(--ps99-cyan);
  -webkit-text-stroke: 4px #000;
  paint-order: stroke fill;
}

.section-title-green {
  color: var(--ps99-cyan);
  -webkit-text-stroke: 4px #000;
  paint-order: stroke fill;
}

.lede {
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.7;
  margin: 1.2rem 0 0;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.hero-actions .button {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.84rem;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 1.5rem;
  padding-top: 6.9rem;
  align-items: end;
}

.section-heading-copy {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.mascot-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.mascot-row-inline {
  margin-top: 0;
  justify-content: flex-start;
}

.mascot-row-right {
  justify-content: flex-end;
}

.mascot-ornament-lg {
  display: block;
  width: min(480px, 100%);
  max-width: 480px;
  height: auto;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.3));
}

.section-heading-ornament {
  align-self: end;
  justify-self: end;
  pointer-events: none;
  opacity: 0.96;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  width: 100%;
  padding: 0.82rem 0.95rem;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.95rem;
  gap: 0.45rem;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button-primary {
  color: #160d21;
  background: linear-gradient(135deg, var(--ps99-yellow), #fff1bb 50%, var(--ps99-cyan));
  box-shadow: 0 16px 30px rgba(255, 217, 47, 0.16);
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(117, 231, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(117, 231, 255, 0.12);
}

.button-discord {
  border-color: rgba(88, 101, 242, 0.35);
  background: linear-gradient(180deg, rgba(88, 101, 242, 0.22), rgba(88, 101, 242, 0.12));
  color: #e8edff;
}

.button-discord:hover,
.button-discord:focus-visible {
  border-color: rgba(88, 101, 242, 0.6);
  box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.16);
}

.button-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  fill: currentColor;
}

.hero-art {
  display: grid;
  align-content: center;
  justify-items: center;
  border-radius: 32px;
  padding: 1.3rem;
  background:
    radial-gradient(circle at top, rgba(255, 207, 107, 0.16), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    rgba(18, 15, 29, 0.72);
  min-height: 100%;
  overflow: hidden;
}

.hero-art img {
  width: min(100%, 420px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.45);
}

.panel-card {
  border-radius: 24px;
  padding: 1rem;
}

.spotlight {
  background:
    radial-gradient(circle at top right, rgba(255, 207, 107, 0.15), transparent 40%),
    rgba(24, 20, 37, 0.82);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.quick-links a {
  padding: 0.68rem 0.88rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.motto {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--muted);
}

.channel-map,
.principles-section,
.age-section,
.clan-ladder,
.battle-section,
.bank-section,
.rules-section {
  display: grid;
  gap: 1rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  max-width: 16ch;
}

.section-heading p:last-child {
  color: var(--muted);
  max-width: 70ch;
  line-height: 1.65;
}

.grid {
  display: grid;
  gap: 1rem;
}

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

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card,
.clan-card {
  border-radius: 26px;
  padding: 1.15rem;
}

.info-card h3,
.clan-card h3,
.battle-card h3,
.rules-card h3 {
  font-size: 1.5rem;
  line-height: 1.08;
  margin-bottom: 0.65rem;
}

.info-card p,
.clan-card p,
.battle-card p,
.rules-card p,
.bank-note p {
  color: var(--muted);
  line-height: 1.65;
}

.clan-cards h3 {
  margin-bottom: 0.25rem;
}

.owner {
  color: var(--gold) !important;
  font-weight: 600;
}

.competitive {
  background:
    linear-gradient(180deg, rgba(255, 207, 107, 0.1), transparent 40%),
    var(--panel-strong);
}

.relaxed {
  background:
    linear-gradient(180deg, rgba(103, 227, 255, 0.12), transparent 40%),
    var(--panel-strong);
}

.sleeper {
  background:
    linear-gradient(180deg, rgba(143, 240, 177, 0.12), transparent 40%),
    var(--panel-strong);
}

.comatose {
  background:
    linear-gradient(180deg, rgba(179, 119, 255, 0.12), transparent 40%),
    var(--panel-strong);
}

.clan-desc {
  margin-bottom: 0;
}

.principles-grid {
  gap: 1rem;
}

.principles-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 1.15rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 55%),
    var(--panel);
  box-shadow: var(--shadow);
}

.principles-card h3 {
  margin-bottom: 0.55rem;
  font-size: 1.55rem;
}

.principles-card p {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0;
}

.principles-index {
  margin: 0 0 0.75rem;
  color: var(--gold) !important;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  font-weight: 700;
}

.age-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1rem;
  align-items: stretch;
}

.age-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 1.15rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 55%),
    var(--panel);
  box-shadow: var(--shadow);
}

.age-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.55rem;
}

.age-card p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 0.9rem;
}

.age-card p:last-child {
  margin-bottom: 0;
}

.age-copy {
  display: grid;
  gap: 1rem;
}

.age-points {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.2rem;
}

.age-points div {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.age-points strong {
  color: var(--green);
  font-family: "Fredoka One", "Fraunces", Georgia, serif;
  font-size: 0.94rem;
  letter-spacing: 0.06em;
  -webkit-text-stroke: 2px #000;
  paint-order: stroke fill;
}

.age-points span {
  color: var(--muted);
  line-height: 1.55;
}

.age-chart {
  display: grid;
  gap: 0.75rem;
}

.age-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.age-chip {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 217, 47, 0.12);
  border: 1px solid rgba(255, 217, 47, 0.22);
  color: var(--ps99-yellow);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.histogram {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: end;
  height: 240px;
  min-height: 240px;
  padding: 0.35rem 0.25rem 0.1rem;
}

.histogram-column {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  min-height: 0;
  padding-top: 0;
}

.histogram-column::before {
  content: "";
  display: block;
  height: var(--h);
  min-height: 14px;
  width: 100%;
  border-radius: 18px 18px 8px 8px;
  background:
    linear-gradient(180deg, rgba(103, 227, 255, 0.95), rgba(179, 119, 255, 0.78)),
    rgba(103, 227, 255, 0.2);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 16px 28px rgba(0, 0, 0, 0.28);
}

.histogram-column span {
  position: static;
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  align-self: center;
}

.age-footnote {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.competitive-section {
  display: grid;
  gap: 1rem;
}

.competitive-panel {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(255, 207, 107, 0.09), transparent 38%),
    rgba(18, 15, 29, 0.82);
}

.competitive-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.competitive-intro h3 {
  font-size: 1.7rem;
  line-height: 1.02;
  max-width: 18ch;
}

.competitive-intro p {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.65;
}

.battle-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.battle-summary-chip {
  padding: 0.85rem 0.95rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 0.25rem;
}

.battle-summary-chip strong {
  font-size: 1.15rem;
  line-height: 1;
}

.battle-summary-chip:nth-child(1) strong,
.battle-summary-chip:nth-child(4) strong {
  color: var(--ps99-cyan);
}

.battle-summary-chip:nth-child(2) strong,
.battle-summary-chip:nth-child(5) strong {
  color: var(--ps99-yellow);
}

.battle-summary-chip:nth-child(3) strong {
  color: var(--ps99-pink);
}

.battle-summary-chip span {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.battle-summary-chip-empty strong {
  color: var(--ps99-yellow);
}

.battle-trend-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(9, 7, 15, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.battle-trend-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.battle-trend-head h3 {
  margin: 0.1rem 0 0;
  font-size: 1.18rem;
  line-height: 1.02;
}

.battle-trend-head p {
  margin: 0;
  color: var(--muted);
  max-width: 32ch;
  line-height: 1.5;
}

.battle-trend-plot {
  position: relative;
  overflow: visible;
  min-height: 260px;
}

.battle-trend-empty {
  min-height: 260px;
  display: grid;
  align-content: center;
  gap: 0.35rem;
  color: var(--muted);
  text-align: center;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  padding: 1.25rem;
}

.battle-trend-empty strong {
  color: var(--text);
  font-size: 1.05rem;
}

.battle-trend-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.battle-trend-grid {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
  stroke-dasharray: 4 8;
}

.battle-trend-axis {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

.battle-trend-area {
  fill: url(#battle-trend-fill-gradient);
  opacity: 0.8;
}

.battle-trend-line {
  fill: none;
  stroke: url(#battle-trend-line-gradient);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.battle-trend-point-shadow {
  fill: rgba(0, 0, 0, 0.34);
  opacity: 0.55;
}

.battle-trend-point {
  fill: var(--bg);
  stroke: var(--ps99-cyan);
  stroke-width: 2.5;
}

.battle-trend-point-hit {
  fill: rgba(255, 255, 255, 0);
  stroke: transparent;
  pointer-events: all;
}

.battle-trend-point-group.is-current .battle-trend-point {
  stroke: var(--gold);
  filter: drop-shadow(0 0 12px rgba(255, 207, 107, 0.36));
}

.battle-trend-point-group {
  cursor: pointer;
}

.battle-trend-label {
  fill: var(--muted);
  font-size: 14px;
  letter-spacing: 0.08em;
}

.battle-trend-label-year {
  fill: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-anchor: middle;
}

.battle-trend-label-year-start {
  text-anchor: start;
}

.battle-trend-label-year-end {
  text-anchor: end;
}

.battle-trend-tooltip {
  position: absolute;
  left: 0;
  top: 0;
  width: min(290px, calc(100vw - 32px));
  padding: 0.8rem 0.85rem 0.75rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at top right, rgba(255, 207, 107, 0.16), transparent 36%),
    rgba(19, 16, 30, 0.96);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translate(-50%, -100%) scale(0.98);
  transform-origin: bottom center;
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
  z-index: 4;
}

.battle-trend-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, -100%) scale(1);
}

.battle-trend-tooltip-kicker {
  margin: 0 0 0.35rem;
  color: var(--ps99-yellow);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.battle-trend-tooltip-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.battle-trend-tooltip-head h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 0.96;
  max-width: 12ch;
}

.battle-trend-tooltip-rank {
  flex: 0 0 auto;
  min-width: 0;
  padding: 0;
  margin-top: 0.05rem;
  color: var(--ps99-yellow);
  font-family: "Fredoka One", system-ui, sans-serif;
  font-size: 2.35rem;
  font-weight: 400;
  line-height: 1;
  text-align: right;
  letter-spacing: -0.06em;
  -webkit-text-stroke: 2.4px #000;
  paint-order: stroke fill;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.28),
    0 0 12px rgba(255, 217, 47, 0.2);
}

.battle-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.battle-result-card {
  display: grid;
  gap: 0.75rem;
  min-height: 190px;
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.battle-result-card.medal-gold {
  background:
    linear-gradient(180deg, rgba(255, 217, 47, 0.14), transparent 52%),
    rgba(24, 20, 37, 0.9);
}

.battle-result-card.medal-silver {
  background:
    linear-gradient(180deg, rgba(117, 231, 255, 0.13), transparent 52%),
    rgba(24, 20, 37, 0.9);
}

.battle-result-card.medal-bronze {
  background:
    linear-gradient(180deg, rgba(255, 134, 207, 0.13), transparent 52%),
    rgba(24, 20, 37, 0.9);
}

.battle-result-card.medal-none {
  background: rgba(255, 255, 255, 0.035);
}

.battle-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.battle-result-head h3 {
  font-size: 1.34rem;
  line-height: 1.02;
  max-width: 12ch;
}

.battle-result-kicker {
  margin: 0 0 0.3rem;
  color: var(--ps99-yellow);
  text-transform: uppercase;
}

.battle-rank-badge {
  min-width: 72px;
  padding: 0.75rem 0.8rem;
  border-radius: 20px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 217, 47, 0.16), rgba(117, 231, 255, 0.08)),
    rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.22);
}

.battle-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.battle-result-meta span {
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.battle-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.battle-reward {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transition: transform 180ms ease;
}

.battle-reward:hover,
.battle-reward:focus-visible {
  transform: translateY(-2px) scale(1.04);
  outline: none;
}

.battle-reward-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 0;
  background: transparent;
}

.battle-reward-visual,
.battle-reward-preview-visual {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.battle-reward-variant-rainbow .battle-reward-visual::after,
.battle-reward-preview-visual[data-variant="rainbow"]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      135deg,
      rgba(255, 77, 77, 0.45),
      rgba(255, 166, 0, 0.45),
      rgba(255, 235, 59, 0.45),
      rgba(76, 175, 80, 0.45),
      rgba(0, 188, 212, 0.45),
      rgba(63, 81, 181, 0.45),
      rgba(156, 39, 176, 0.45)
    );
  mix-blend-mode: screen;
  opacity: 0.92;
  animation: rainbowSweep 4s linear infinite;
}

.battle-result-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.battle-result-stats > div {
  display: grid;
  gap: 0.1rem;
  padding: 0.72rem 0.75rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.battle-result-stats strong {
  font-size: 1rem;
  line-height: 1.1;
}

.battle-result-stats span,
.battle-result-text {
  color: var(--muted);
}

.battle-result-text {
  margin: 0;
  line-height: 1.55;
  font-size: 0.93rem;
}

.battle-result-empty {
  grid-column: 1 / -1;
}

.battle-reward-preview {
  position: fixed;
  z-index: 60;
  display: none;
  align-items: center;
  gap: 0.75rem;
  min-width: 240px;
  max-width: 320px;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(13, 10, 20, 0.96);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  pointer-events: none;
}

.battle-reward-preview.is-visible {
  display: flex;
}

.battle-reward-preview-visual {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
}

.battle-reward-preview-icon {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}

.battle-reward-preview-copy {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.battle-reward-preview-copy strong {
  font-size: 0.98rem;
  line-height: 1.1;
  color: var(--text);
}

.battle-reward-preview-copy span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.2;
}

@keyframes rainbowSweep {
  0% {
    filter: hue-rotate(0deg);
    transform: translateX(-2%) translateY(-1%) rotate(0deg);
  }
  50% {
    filter: hue-rotate(180deg);
    transform: translateX(2%) translateY(1%) rotate(180deg);
  }
  100% {
    filter: hue-rotate(360deg);
    transform: translateX(-2%) translateY(-1%) rotate(360deg);
  }
}

.callout {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 207, 107, 0.12), rgba(255, 126, 184, 0.08)),
    rgba(18, 15, 29, 0.88);
}

.callout strong {
  color: var(--gold);
}

.live-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.roster-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.cache-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.roster-section {
  display: grid;
  gap: 1rem;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.live-clan-card {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 1.1rem;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  display: grid;
  gap: 0.9rem;
}

.live-clan-card.competitive {
  background:
    linear-gradient(180deg, rgba(255, 207, 107, 0.11), transparent 45%),
    rgba(24, 20, 37, 0.92);
}

.live-clan-card.relaxed {
  background:
    linear-gradient(180deg, rgba(103, 227, 255, 0.12), transparent 45%),
    rgba(24, 20, 37, 0.92);
}

.live-clan-card.sleeper {
  background:
    linear-gradient(180deg, rgba(143, 240, 177, 0.12), transparent 45%),
    rgba(24, 20, 37, 0.92);
}

.live-clan-card.comatose {
  background:
    linear-gradient(180deg, rgba(179, 119, 255, 0.12), transparent 45%),
    rgba(24, 20, 37, 0.92);
}

.live-clan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.live-clan-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.live-clan-brand .clan-icon-clan {
  width: 72px;
  height: 72px;
  border-radius: 22px;
}

.live-clan-brand h3 {
  font-size: 2.2rem;
  line-height: 0.94;
  -webkit-text-stroke: 3.5px #000;
  paint-order: stroke fill;
}

.live-clan-type {
  margin: 0 0 0.2rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.live-clan-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: right;
  align-items: flex-end;
  padding-top: 0;
  min-width: 0;
}

.live-clan-meta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.7rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.67rem;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: none;
}

.live-clan-meta-pill-level {
  border-color: rgba(117, 231, 255, 0.12);
  color: rgba(223, 249, 255, 0.86);
}

.live-clan-meta-pill-members {
  border-color: rgba(255, 217, 47, 0.12);
  color: rgba(255, 240, 184, 0.88);
}

.live-clan-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.live-clan-foot {
  display: flex;
  justify-content: flex-start;
}

.clan-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.clan-icon-placeholder,
.member-avatar-fallback {
  display: grid;
  place-items: center;
  color: #170f22;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), #fff0b4);
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 0.5rem;
  justify-items: center;
  max-height: 560px;
  overflow-y: auto;
  overflow-x: clip;
  padding-right: 0.2rem;
}

.member-grid-placeholder {
  max-height: none;
}

.member-placeholder {
  min-height: 88px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.member-card {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  position: relative;
  overflow: visible;
  outline: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.member-card,
.member-card:visited {
  color: inherit;
  text-decoration: none;
}

.member-card:hover,
.member-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(0, 0, 0, 0.26);
  z-index: 3;
}

.member-avatar {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  object-fit: cover;
  background: #171222;
}

.member-card-placeholder {
  position: relative;
  border-style: dashed;
  background: rgba(255, 255, 255, 0.03);
  opacity: 0.28;
  cursor: pointer;
}

.member-card-placeholder::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.24);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 500;
  line-height: 1;
  pointer-events: none;
}

.member-card-placeholder:hover,
.member-card-placeholder:focus-visible {
  transform: none;
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

.member-preview {
  position: fixed;
  z-index: 50;
  display: none;
  align-items: center;
  gap: 0.75rem;
  min-width: 220px;
  max-width: 280px;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(13, 10, 20, 0.95);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  pointer-events: none;
}

.member-preview.is-visible {
  display: flex;
}

.member-preview-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 999px;
  object-fit: cover;
  background: #171222;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.member-preview-copy {
  min-width: 0;
  display: grid;
  gap: 0.15rem;
}

.member-preview-copy strong {
  font-size: 0.96rem;
  line-height: 1.1;
  color: var(--text);
}

.member-preview-copy span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.2;
}

.error-card {
  grid-column: 1 / -1;
}

.battle-layout,
.bank-layout,
.rules-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.battle-card,
.bank-note,
.bank-sidebar,
.rules-card {
  border-radius: 28px;
  padding: 1.2rem;
}

.expectation-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.9rem;
  color: var(--text);
}

.expectation-list li::marker {
  color: var(--gold);
  font-weight: 700;
}

.accent {
  background:
    radial-gradient(circle at top right, rgba(103, 227, 255, 0.12), transparent 35%),
    rgba(24, 20, 37, 0.85);
}

.mini-grid {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.mini-grid > div {
  padding: 0.95rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mini-grid p {
  margin: 0.35rem 0 0;
}

.bank-layout,
.rules-columns {
  align-items: start;
}

.bank-sidebar {
  display: grid;
  gap: 0.8rem;
  background:
    radial-gradient(circle at top right, rgba(255, 207, 107, 0.13), transparent 35%),
    rgba(18, 15, 29, 0.82);
}

.bank-chip {
  padding: 0.95rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.bank-chip span {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 0.45rem;
}

.bank-chip strong {
  font-weight: 700;
  line-height: 1.5;
}

.rules-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03)),
    rgba(18, 15, 29, 0.84);
}

.rules-intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 207, 107, 0.12), transparent 38%),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.rules-cta-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 1rem;
}

.rules-note {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(18, 15, 29, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 0.4rem;
}

.rules-discord-button {
  width: auto;
  min-width: 190px;
}

.rules-note strong {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
}

.rules-note span {
  color: var(--text);
  line-height: 1.6;
}

.rules-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rules-card-block {
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.rules-card-head {
  margin-bottom: 0.9rem;
}

.rules-card-head h3 {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

.rules-card-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.rules-columns ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.7rem;
  color: var(--muted);
  line-height: 1.6;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.4rem;
  padding: 0.9rem 0.3rem 0;
  color: var(--muted);
}

.footer-top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  margin-left: auto;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.footer-top-link svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.footer-top-link:hover,
.footer-top-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(117, 231, 255, 0.28);
  background: rgba(117, 231, 255, 0.09);
  color: var(--ps99-blue);
}

.footer a {
  color: var(--gold);
}

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

@media (max-width: 1080px) {
  .hero,
  .battle-layout,
  .bank-layout,
  .roster-grid,
  .battle-summary,
  .age-layout,
  .rules-intro-panel,
  .rules-columns,
  .grid.four,
  .grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-art {
    order: -1;
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-grid,
  .hero,
  .battle-layout,
  .bank-layout,
  .roster-grid,
  .battle-summary,
  .age-layout,
  .rules-intro-panel,
  .rules-columns,
  .grid.four,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .hero-actions a:last-child {
    grid-column: 1 / -1;
  }

  .member-grid {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  }

  .battle-result-stats {
    grid-template-columns: 1fr;
  }

  .live-clan-meta {
    align-items: flex-start;
    text-align: left;
  }

  .section-heading h2 {
    max-width: none;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding-right: 0;
    padding-top: 4.1rem;
  }

  .section-heading-ornament {
    order: -1;
    justify-self: start;
    width: min(220px, 56vw);
    max-width: 220px;
    margin-bottom: 0.35rem;
  }

  h1 {
    font-size: clamp(2.5rem, 14vw, 4rem);
    line-height: 0.92;
  }

  .hero-art img {
    flex-direction: column;
  }

  .age-chart-head {
    flex-direction: row;
    align-items: flex-start;
  }

  .histogram {
    gap: 0.5rem;
    height: 180px;
    min-height: 180px;
  }

  .histogram-column {
    min-height: 164px;
  }
}
