@font-face {
  font-family: "Clash";
  src: url("assets/fonts/clash-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Clash";
  src: url("assets/fonts/clash-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --u: calc(min(100vw, 480px) / 576);
  --page-top: #4f74ad;
  --page-bottom: #2f4c7c;
  --bg: #e8eef6;
  --surface: #f6f8fc;
  --fg: #26324a;
  --muted: #6b7891;
  --line: #c7d2e1;
  --ink: #1d2433;
  --accent: #2b86e0;
  --header-bg: #22335a;
  --header-fg: #ffffff;
  --header-muted: #d3d8e3;
  --tab: #a9bbd3;
  --card-top: #dbe5f2;
  --card-bottom: #c3d1e6;
  --stat-band: #1f8be0;
  --gold: #f4b532;
  --silver: #e4eaf1;
  --bronze: #e3863f;
  --series-1: #2a78d6;
  --reference: #52514e;
  --member-bg: #d9f2dc;
  --member-fg: #1c6b2d;
  --former-bg: #e3e7ee;
  --former-fg: #5b6170;
}

html {
  scrollbar-gutter: stable;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  background: #0f4a7b;
  color: var(--fg);
  font-family: "Clash", system-ui, sans-serif;
  line-height: 1.35;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("assets/backgrounds/diamonds-blur.jpg") 0 0 / calc(784 * var(--u)) auto repeat;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgb(2 22 42 / 0.5);
}

.window {
  width: calc(100% - calc(18 * var(--u)));
  max-width: 480px;
  margin: calc(12 * var(--u)) auto 40px;
  padding: 0 calc(10 * var(--u)) calc(10 * var(--u));
  border: calc(3 * var(--u)) solid #1f2329;
  border-radius: calc(16 * var(--u));
  background: #60697a;
  box-shadow: inset 0 0 0 1px #838995, 0 calc(6 * var(--u)) 0 rgb(0 0 0 / 0.35);
  overflow: hidden;
}

.window .wrap {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.window header {
  margin: 0 calc(-10 * var(--u));
  padding: calc(14 * var(--u)) calc(10 * var(--u)) 0;
  border-top: 0;
}

.window main.wrap {
  padding: calc(10 * var(--u)) calc(10 * var(--u)) calc(10 * var(--u));
  border-radius: 0 0 calc(10 * var(--u)) calc(10 * var(--u));
  box-shadow: 0 0 0 1px #6b768a;
}

.outlined,
h1,
.tab,
.rank,
.member .name,
.stat-value,
.score-pill span,
.stack span {
  color: #ffffff;
  font-weight: 700;
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 2px 0 var(--ink);
}

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 12px;
}

header {
  background: linear-gradient(#7a808f, #6f7688 35%, #636a7c 60%, #636a7c);
  color: var(--header-fg);
  padding-top: 16px;
  border-top: 2px solid #292d39;
  box-shadow: inset 0 1px 0 #d5d9e5;
}

h1 {
  margin: 0;
  overflow: hidden;
  font-size: calc(30 * var(--u));
  white-space: nowrap;
  -webkit-text-stroke-width: calc(4 * var(--u));
  text-shadow: 0 calc(3 * var(--u)) 0 var(--ink);
}

.tag {
  margin: calc(4 * var(--u)) 0 0;
  overflow: hidden;
  color: var(--header-muted);
  font-size: calc(14 * var(--u));
  text-overflow: ellipsis;
  white-space: nowrap;
}

.war-pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: calc(6 * var(--u));
  margin-left: auto;
  padding: calc(2 * var(--u)) calc(12 * var(--u)) calc(2 * var(--u)) calc(4 * var(--u));
  border: calc(2.5 * var(--u)) solid var(--ink);
  border-radius: calc(10 * var(--u));
  background: linear-gradient(#d9c9f5 0%, #c6b1ee 48%, #b39ae3 52%, #a68bd9 100%);
  box-shadow: inset 0 0 0 calc(2 * var(--u)) rgb(255 255 255 / 0.35), 0 calc(2 * var(--u)) 0 var(--ink);
  font-size: calc(20 * var(--u));
  -webkit-text-stroke-width: calc(3.5 * var(--u));
}

.war-pill img {
  width: calc(34 * var(--u));
  height: calc(34 * var(--u));
  object-fit: contain;
}

.tabs {
  display: flex;
  gap: calc(4 * var(--u));
}

.tab {
  flex: 1 1 auto;
  min-width: 0;
  padding: calc(12 * var(--u)) calc(4 * var(--u)) calc(10 * var(--u));
  border-radius: calc(8 * var(--u)) calc(8 * var(--u)) 0 0;
  background: linear-gradient(#687e95, #667e96 55%, #5a6e86 80%, #54667a);
  box-shadow: inset 0 1px 0 #7b91a8;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  font-size: calc(17 * var(--u));
  -webkit-text-stroke-width: calc(3.5 * var(--u));
  text-shadow: 0 calc(2 * var(--u)) 0 var(--ink);
}

.tab.active {
  background: linear-gradient(#f8fcff 0%, #f8fcff 50%, #ebf3fe 52%, #ebf3fe 100%);
  box-shadow: inset 0 1px 0 #ffffff;
}

main {
  margin-top: 0;
  padding-top: 12px;
  padding-bottom: 24px;
  background: #949fb5;
}

.hint,
.empty {
  color: var(--muted);
  font-size: 14px;
}

.details {
  color: var(--muted);
  font-size: 13px;
}


footer p {
  margin: 0 0 6px;
}

.profile-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.badge {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.in-clan {
  background: var(--member-bg);
  color: var(--member-fg);
}

.left-clan {
  background: var(--former-bg);
  color: var(--former-fg);
}

.back {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}

.profile,
.deck-block,
.chart {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.profile h2,
.profile h3,
.deck-block h3 {
  margin: 0;
}

.profile .details,
.deck-block .details {
  display: block;
  margin: 4px 0 12px;
}

.stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 0;
  font-size: 14px;
}

.stats dt {
  color: var(--muted);
}

.stats dd {
  margin: 0;
  font-weight: 600;
}

.deck {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.card {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.card img {
  width: 100%;
  max-width: 80px;
  aspect-ratio: 5 / 6;
  object-fit: contain;
}

.card.evolved img {
  filter: drop-shadow(0 0 4px #b05cff);
}

.card-name {
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.chart figcaption {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
}

.chart-title {
  font-weight: 600;
}

.chart-subtitle {
  color: var(--muted);
  font-size: 13px;
}

.chart-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

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

.swatch-bar {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--series-1);
}

.swatch-ref {
  width: 14px;
  height: 0;
  border-top: 2px solid var(--reference);
}

.chart-plot {
  position: relative;
}

.chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart .bar {
  fill: var(--series-1);
}

.chart .reference {
  stroke: var(--reference);
  stroke-width: 2;
  stroke-linecap: round;
}

.chart .grid {
  stroke: var(--line);
  stroke-width: 1;
}

.chart .baseline {
  stroke: var(--muted);
  stroke-width: 1;
}

.chart .axis {
  fill: var(--muted);
  font-size: 12px;
}

.chart .hit {
  fill: transparent;
}

.chart .hit:hover {
  fill: var(--line);
  fill-opacity: 0.35;
}

.chart-tip {
  position: absolute;
  z-index: 2;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.15);
  font-size: 13px;
  pointer-events: none;
  white-space: nowrap;
}

.tip-title {
  font-weight: 600;
}

.tip-row {
  color: var(--muted);
}

.chart details {
  margin-top: 8px;
  font-size: 13px;
}

.chart summary {
  color: var(--muted);
  cursor: pointer;
}

.chart table {
  width: 100%;
  margin-top: 6px;
  border-collapse: collapse;
}

.chart th,
.chart td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.brand {
  display: flex;
  align-items: center;
  gap: calc(12 * var(--u));
  margin-bottom: calc(16 * var(--u));
}

.brand .tag {
  margin: calc(4 * var(--u)) 0 0;
}

.logo {
  flex: none;
  width: calc(60 * var(--u));
  height: calc(60 * var(--u));
  object-fit: contain;
}

.clan-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clan-title .details {
  margin: 2px 0 0;
}

.clan-badge {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.clan-description {
  margin: 12px 0;
  font-size: 14px;
}

.profile .subheading {
  margin: 16px 0 8px;
  font-size: 15px;
}

.loader {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 48px 0;
  color: var(--muted);
}

.loader img {
  width: 96px;
  animation: bob 0.9s ease-in-out infinite alternate;
}

@keyframes bob {
  from {
    transform: translateY(0) rotate(-4deg);
  }
  to {
    transform: translateY(-10px) rotate(4deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader img {
    animation: none;
  }
}

.stat-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: calc(80 * var(--u));
  margin-bottom: calc(12 * var(--u));
  border-top: calc(2 * var(--u)) solid #2477ab;
  border-bottom: calc(2 * var(--u)) solid #26c0ff;
  border-radius: calc(8 * var(--u));
  background: linear-gradient(#0179c5, #03aefc);
  box-shadow: 0 calc(2 * var(--u)) 0 rgb(29 36 51 / 0.35);
  overflow: hidden;
}

.stat {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: calc(3 * var(--u));
  padding: calc(6 * var(--u)) calc(4 * var(--u));
  text-align: center;
}

.stat + .stat {
  border-left: calc(2 * var(--u)) solid #37a5f0;
  box-shadow: -1px 0 0 #0a80cc;
}

.stat-label {
  color: #caf6ff;
  font-size: calc(17 * var(--u));
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  -webkit-text-stroke: calc(3 * var(--u)) var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 calc(1.5 * var(--u)) 0 var(--ink);
}

.stat-value {
  font-size: calc(22 * var(--u));
  line-height: 1.1;
  -webkit-text-stroke-width: calc(3.5 * var(--u));
  text-shadow: 0 calc(2 * var(--u)) 0 var(--ink);
}

.roster {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: calc(8 * var(--u));
}

.member {
  display: grid;
  grid-template-columns: calc(57 * var(--u)) calc(59 * var(--u)) minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: calc(7 * var(--u));
  padding: calc(8.5 * var(--u)) calc(11 * var(--u));
  border: calc(2.5 * var(--u)) solid var(--ink);
  border-radius: calc(10 * var(--u));
  background: linear-gradient(#dee7f8 0%, #dee7f8 49%, #c8d7ed 51%, #c7d7ee 100%);
  box-shadow: inset 0 1px 0 #ced7e8, inset 0 -1px 0 #d2e2f9, 0 calc(2 * var(--u)) 0 var(--ink);
}

.avatar {
  position: relative;
  width: calc(59 * var(--u));
  height: calc(59 * var(--u));
  border-radius: 50%;
  background: #63748f;
  overflow: hidden;
}

.avatar::before,
.avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.avatar::before {
  top: calc(9.5 * var(--u));
  width: calc(16 * var(--u));
  height: calc(16 * var(--u));
  border-radius: 50%;
  background: linear-gradient(#fbffff, #d2e2f8);
}

.avatar::after {
  top: calc(25.5 * var(--u));
  width: calc(27 * var(--u));
  height: calc(20 * var(--u));
  border-radius: calc(13.5 * var(--u)) calc(13.5 * var(--u)) calc(4 * var(--u)) calc(4 * var(--u));
  background: linear-gradient(#f3f7fd 0%, #e9f2ff 86%, #b8c8dd 90%, #b6c6db 100%);
  box-shadow: 0 calc(2 * var(--u)) 0 #4b5c76;
}

.rank {
  display: grid;
  place-items: center;
  width: calc(57 * var(--u));
  height: calc(57 * var(--u));
  border: calc(3 * var(--u)) solid #707a82;
  border-radius: calc(10 * var(--u));
  background: linear-gradient(#b4c2d6, #c0cdde 60%, #dce9f9 78%, #dae7f8 90%, #cedbec);
  box-shadow: inset 0 0 0 calc(2.5 * var(--u)) #e3eefd, inset 0 calc(4 * var(--u)) 0 #a9b6c8, 0 0 0 calc(1.5 * var(--u)) #e6f1ff;
  font-size: calc(17.5 * var(--u));
  -webkit-text-stroke-width: calc(3 * var(--u));
  text-shadow: 0 calc(2 * var(--u)) 0 var(--ink);
}

.rank-1 {
  background: linear-gradient(#e0a92f, #e6b130 72%, #fbca41 82%, #f4c535);
  box-shadow: inset 0 0 0 calc(2.5 * var(--u)) #f6e08a, inset 0 calc(4 * var(--u)) 0 #c59316, 0 0 0 calc(1.5 * var(--u)) #e6f1ff;
}

.rank-2 {
  background: linear-gradient(#b4c2d6, #c0cdde 60%, #dce9f9 78%, #dae7f8 90%, #cedbec);
  box-shadow: inset 0 0 0 calc(2.5 * var(--u)) #e3eefd, inset 0 calc(4 * var(--u)) 0 #a9b6c8, 0 0 0 calc(1.5 * var(--u)) #e6f1ff;
}

.rank-3 {
  background: linear-gradient(#c37c42, #d1864c 55%, #eba162 78%, #e69553 92%, #d89453);
  box-shadow: inset 0 0 0 calc(2.5 * var(--u)) #efae78, inset 0 calc(4 * var(--u)) 0 #b07035, 0 0 0 calc(1.5 * var(--u)) #e6f1ff;
}

.member .who {
  display: grid;
  min-width: 0;
}

.member .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: calc(18.5 * var(--u));
  line-height: 1.2;
  font-weight: 400;
  text-decoration: none;
  -webkit-text-stroke-width: calc(3.5 * var(--u));
  text-shadow: 0 calc(2.5 * var(--u)) 0 var(--ink);
}

.member .role {
  overflow: hidden;
  color: #6c7e96;
  font-size: calc(15 * var(--u));
  font-weight: 700;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stack {
  display: grid;
  justify-items: center;
  font-size: calc(15.5 * var(--u));
}

.stack img {
  width: calc(29 * var(--u));
  height: calc(29 * var(--u));
  object-fit: contain;
}

.score-pill {
  display: flex;
  align-items: center;
  font-size: calc(18.5 * var(--u));
}

.score-pill img {
  position: relative;
  z-index: 1;
  width: calc(34 * var(--u));
  height: calc(38 * var(--u));
  object-fit: contain;
}

.score-pill span {
  margin-left: calc(-8 * var(--u));
  padding: calc(13 * var(--u)) calc(5 * var(--u)) calc(13 * var(--u)) calc(14 * var(--u));
  border-radius: calc(8 * var(--u));
  background: linear-gradient(#a0b2c8, #96a8c2 45%, #8b9eba 60%, #8b9fba);
  box-shadow: inset 0 1px 2px rgb(30 40 70 / 0.25);
  line-height: 1;
  -webkit-text-stroke-width: calc(3.5 * var(--u));
  text-shadow: 0 calc(2 * var(--u)) 0 var(--ink);
}

.glossy {
  position: relative;
}

.glossy::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  display: inherit;
  place-items: inherit;
  padding: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: linear-gradient(#ffffff 0%, #ffffff 54%, #dcdee2 60%, #cfd1d6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0;
  text-shadow: none;
  pointer-events: none;
}

.stack span {
  margin-top: calc(-3 * var(--u));
  -webkit-text-stroke-width: calc(3 * var(--u));
  text-shadow: 0 calc(1.5 * var(--u)) 0 var(--ink);
}

.panel-top {
  margin: calc(-10 * var(--u)) calc(-10 * var(--u)) calc(10 * var(--u));
  padding: calc(16 * var(--u)) calc(10 * var(--u)) calc(12 * var(--u));
  background: #ebf3fe;
  border-bottom: calc(2 * var(--u)) solid #b7c2d2;
}

.panel-top .stat-band {
  margin-bottom: 0;
}

.brand > div {
  min-width: 0;
}

.roster > li {
  list-style: none;
}

a.member {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transform-origin: center;
  transition: transform 480ms cubic-bezier(0.34, 1.6, 0.5, 1);
}

@media (hover: hover) {
  a.member:hover {
    transform: scale(0.98);
    transition: transform 210ms cubic-bezier(0.25, 0.8, 0.35, 1);
  }

}

a.member:active,
a.member.released {
  transform: scale(0.94);
  transition: transform 160ms cubic-bezier(0.3, 0, 0.5, 1);
}

a.member.released {
  animation: release 480ms cubic-bezier(0.34, 1.6, 0.5, 1) 160ms both;
}

@keyframes release {
  from {
    transform: scale(0.94);
  }
  to {
    transform: scale(1);
  }
}

.member .role {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
}

.inline-stat {
  display: inline-flex;
  align-items: center;
  gap: calc(3 * var(--u));
}

.inline-stat .icon {
  width: calc(20 * var(--u));
  height: calc(20 * var(--u));
  object-fit: contain;
}

.member .badge {
  padding: calc(1 * var(--u)) calc(8 * var(--u));
  font-size: calc(13 * var(--u));
  line-height: 1.3;
}

.tab:hover {
  filter: brightness(1.12);
}

.season {
  width: 100%;
  margin-bottom: calc(10 * var(--u));
  padding: calc(10 * var(--u)) calc(14 * var(--u));
  border: calc(2.5 * var(--u)) solid var(--ink);
  border-radius: calc(10 * var(--u));
  background: linear-gradient(#f8fcff 0%, #f8fcff 50%, #ebf3fe 52%, #ebf3fe 100%);
  box-shadow: 0 calc(2 * var(--u)) 0 var(--ink);
  color: var(--fg);
  font: 700 calc(18 * var(--u)) "Clash", system-ui, sans-serif;
  cursor: pointer;
}

.hint {
  margin: 0 0 calc(10 * var(--u));
  color: #26324a;
  font-size: calc(15 * var(--u));
}

.clan-stats {
  margin: 0 0 calc(10 * var(--u));
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.fold > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  list-style: none;
}

.fold > summary::-webkit-details-marker {
  display: none;
}

.fold > summary::before {
  content: "▸";
  font-size: 16px;
  line-height: 1;
  transition: transform 160ms ease;
}

.fold[open] > summary::before {
  transform: rotate(90deg);
}

.clan-more > summary {
  padding: 4px 0;
}

.clan-more[open] > summary {
  margin-bottom: 8px;
}

.clan-stats[open] {
  padding: 0 10px 2px;
}

.clan-stats[open] > summary {
  padding-left: 4px;
  padding-right: 4px;
}

.hall h2,
.section-title {
  margin: calc(18 * var(--u)) 0 calc(10 * var(--u));
  color: #ffffff;
  font-size: calc(22 * var(--u));
  -webkit-text-stroke: calc(3.5 * var(--u)) var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 calc(2 * var(--u)) 0 var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  a.member,
  a.member:active,
  a.member.released {
    transition: none;
    animation: none;
    transform: none;
  }
}

.member.mark-warn,
.swatch.mark-warn {
  background: linear-gradient(#f8e1e1 0%, #f8e1e1 49%, #efcaca 51%, #eecaca 100%);
  box-shadow: inset 0 1px 0 #f1d4d4, inset 0 -1px 0 #f6dcdc, 0 calc(2 * var(--u)) 0 var(--ink);
}

.member.mark-kick,
.swatch.mark-kick {
  background: linear-gradient(#f5a9a9 0%, #f5a9a9 49%, #e98787 51%, #e88686 100%);
  box-shadow: inset 0 1px 0 #f0b7b7, inset 0 -1px 0 #f2a0a0, 0 calc(2 * var(--u)) 0 var(--ink);
}

.member.mark-star,
.swatch.mark-star {
  background: linear-gradient(#d9f3d4 0%, #d9f3d4 49%, #bde5b6 51%, #bce5b5 100%);
  box-shadow: inset 0 1px 0 #cdeac7, inset 0 -1px 0 #d2f0cc, 0 calc(2 * var(--u)) 0 var(--ink);
}

.member.mark-elder,
.swatch.mark-elder {
  background: linear-gradient(#97e087 0%, #97e087 49%, #6fc95e 51%, #6ec85d 100%);
  box-shadow: inset 0 1px 0 #a9e79b, inset 0 -1px 0 #85d675, 0 calc(2 * var(--u)) 0 var(--ink);
}

.member .role .flag {
  flex: none;
}

.member .role .role-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.flag-warn {
  color: #b3433a;
}

.flag-kick {
  color: #7a0f0a;
}

.member.mark-kick .role {
  color: #6e3d3d;
}

.flag-star {
  color: #1c6b2d;
}

.flag-elder {
  color: #0d4418;
}

.member.mark-elder .role {
  color: #2f5a35;
}

.legend-below {
  margin-top: calc(12 * var(--u));
}

.about .legend {
  padding-left: 0;
  font-size: inherit;
}

.about .about-subtitle {
  margin-top: calc(20 * var(--u));
}

.legend {
  display: grid;
  gap: calc(4 * var(--u));
  margin: 0 0 calc(10 * var(--u));
  padding: 0;
  list-style: none;
  color: #26324a;
  font-size: calc(14 * var(--u));
}

.legend li {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
}

.swatch {
  flex: none;
  width: calc(22 * var(--u));
  height: calc(14 * var(--u));
  border: calc(2 * var(--u)) solid var(--ink);
  border-radius: calc(4 * var(--u));
}

.member .name-line {
  display: flex;
  align-items: center;
  gap: calc(6 * var(--u));
  min-width: 0;
}

.member .name-line .badge {
  flex: none;
}

.member .badge.left-clan {
  background: #b7c1d2;
  color: #47526a;
}

.score-pill .tint-white {
  filter: grayscale(1) brightness(1.75) contrast(1.15);
}

.site-footer {
  margin-top: auto;
  padding: 28px 24px 32px;
  background: #000000;
  color: #ffffff;
  font: 600 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-links a {
  color: #ffffff;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-logo {
  flex: none;
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.footer-disclaimer {
  max-width: 1200px;
  margin: 20px auto 0;
  color: #7d7d7d;
  font-size: 12px;
  font-weight: 400;
}

.about {
  padding: calc(18 * var(--u));
  border: calc(2.5 * var(--u)) solid var(--ink);
  border-radius: calc(10 * var(--u));
  background: #ebf3fe;
  box-shadow: 0 calc(2 * var(--u)) 0 var(--ink);
  color: #26324a;
  font-size: calc(17 * var(--u));
  line-height: 1.45;
}

.about-title {
  margin: 0 0 calc(12 * var(--u));
  color: #ffffff;
  font-size: calc(24 * var(--u));
  -webkit-text-stroke: calc(3.5 * var(--u)) var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 calc(2 * var(--u)) 0 var(--ink);
}

.about ul {
  display: grid;
  gap: calc(10 * var(--u));
  margin: 0;
  padding-left: calc(22 * var(--u));
}

.about-author {
  margin: calc(16 * var(--u)) 0 0;
  font-weight: 700;
}

.medal-list {
  display: flex;
  flex-wrap: wrap;
  gap: calc(14 * var(--u));
  margin: calc(10 * var(--u)) 0 0;
  padding: 0;
  list-style: none;
}

.medal {
  display: grid;
  justify-items: center;
  gap: calc(6 * var(--u));
}

.medal-season {
  color: var(--muted);
  font-size: calc(14 * var(--u));
  font-weight: 700;
}

.stage {
  position: relative;
}

.deck-rail {
  --rail: clamp(160px, calc((100vw - 480px) / 2 - 56px), 240px);
  position: absolute;
  top: 24px;
  bottom: 0;
  display: none;
  align-content: start;
  gap: 28px;
  width: var(--rail);
  overflow: hidden;
  pointer-events: none;
}

.deck-rail.left {
  right: calc(50% + 240px + 20px);
}

.deck-rail.right {
  left: calc(50% + 240px + 20px);
}

@media (min-width: 900px) {
  .deck-rail.visible {
    display: grid;
  }
}

.rail-slot {
  width: 74%;
}

.deck-rail.left .rail-slot:nth-child(odd),
.deck-rail.right .rail-slot:nth-child(even) {
  justify-self: start;
  rotate: -3deg;
}

.deck-rail.left .rail-slot:nth-child(even),
.deck-rail.right .rail-slot:nth-child(odd) {
  justify-self: end;
  rotate: 3deg;
}

.rail-card {
  display: block;
  width: 100%;
  filter: drop-shadow(0 10px 12px rgb(0 0 0 / 0.5));
  animation: rail-in 520ms cubic-bezier(0.34, 1.6, 0.5, 1) both;
}

.rail-card.icon {
  width: 70%;
  margin: 0 auto;
}

.rail-card.evolved {
  filter: drop-shadow(0 0 10px #b05cff) drop-shadow(0 8px 10px rgb(0 0 0 / 0.45));
}

@keyframes rail-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rail-card {
    animation: none;
  }
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-tile,
.rank-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #c9d6ea;
  border-radius: 10px;
  background: #e8eff9;
}

.info-tile .icon,
.rank-row .icon,
.ranking-head .icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.info-tile div,
.rank-row div {
  display: grid;
  min-width: 0;
}

.info-label {
  color: #5d6c84;
  font-size: 12px;
  line-height: 1.3;
}

.info-value {
  color: #1d2433;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.info-tile .info-label {
  order: -1;
}

.rank-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-row {
  grid-template-columns: 32px minmax(0, 1fr) auto auto;
  color: inherit;
  text-decoration: none;
  transition: background 160ms ease;
}

.rank-row:hover {
  background: #dce7f6;
}

.chevron {
  color: #7d8ba3;
  font-size: 22px;
  line-height: 1;
}

.trend {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.trend-up {
  background: #d4f0d0;
  color: #1c6b2d;
}

.trend-down {
  background: #f8dada;
  color: #a12a22;
}

.trend-flat {
  background: #e1e6ee;
  color: #5d6c84;
}

.ranking-chart {
  scroll-margin-top: 12px;
}

.ranking-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: calc(18 * var(--u)) 0 calc(10 * var(--u));
}

.ranking-head .section-title {
  margin: 0;
}

.ranking-head .trend {
  margin-left: auto;
}

.feed-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feed-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: calc(2.5 * var(--u)) solid var(--ink);
  border-radius: calc(10 * var(--u));
  background: linear-gradient(#f8fcff 0%, #f8fcff 50%, #ebf3fe 52%, #ebf3fe 100%);
  box-shadow: 0 calc(2 * var(--u)) 0 var(--ink);
}

.feed-item .icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.feed-text {
  display: grid;
  min-width: 0;
}

.feed-who {
  overflow: hidden;
  color: #1d2433;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.feed-who:hover,
.feed-player:hover {
  color: var(--accent);
}

.feed-player {
  color: #1d2433;
  font-weight: 700;
  text-decoration: none;
}

.feed-what {
  color: #4a5872;
  font-size: 13px;
  line-height: 1.35;
}

.feed-time {
  align-self: start;
  color: #7d8ba3;
  font-size: 12px;
}

.feed-war_week {
  background: linear-gradient(#fff6dc 0%, #fff6dc 50%, #fbecc0 52%, #fbecc0 100%);
}

.feed-left {
  background: linear-gradient(#eef0f4 0%, #eef0f4 50%, #e2e6ec 52%, #e2e6ec 100%);
}

.feed-more {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border: calc(2.5 * var(--u)) solid var(--ink);
  border-radius: calc(10 * var(--u));
  background: linear-gradient(#5fb2ff, #3a8fe6);
  box-shadow: 0 calc(2 * var(--u)) 0 var(--ink);
  color: #ffffff;
  font: 700 15px "Clash", system-ui, sans-serif;
  cursor: pointer;
}
