:root {
  --bg: #0B1220;
  --bg-header: #0E1626;
  --bg-banner: #0F1829;
  --panel: #121B2C;
  --panel-raised: #1A2540;
  --line: #1E2A40;
  --line-strong: #22304A;
  --line-dashed: #26344F;
  --field-line: #5E6E8A; /* form field borders: 3:1 against the panel so the fields are visible */
  --heart: #FF5C8A; /* guestbook hearts and birthday mode */
  --text: #E8EEF8;
  --text-strong: #FFFFFF;
  --text-soft: #C9D4E5;
  --muted: #9AA8BF;
  --accent: #F99E1A;
  --on-accent: #0B1220;
  --font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-brand: 'Chakra Petch', 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Barlow', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
}

a { color: var(--text-soft); }
a:hover { color: var(--text-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { display: block; }
[hidden] { display: none !important; }

.wrap { max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter); }
.accent { color: var(--accent); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 12px 16px; background: var(--accent); color: var(--on-accent);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg-header); }
.header-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 32px; padding-block: 10px;
}
/* Joke strip above the header */
.joke-strip {
  padding: 8px 16px; background: var(--accent); color: var(--on-accent);
  font-size: 14px; line-height: 1.4; text-align: center;
}
.joke-strip strong:first-of-type { font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.strip-baby { display: inline-block; width: 24px; height: 24px; margin: -4px 8px -2px 0; vertical-align: middle; }

/* Wordmark: letters scramble in on load (ui.js), then a sheen sweeps across now and then */
.brand { display: flex; align-items: center; gap: 4px; }
.wordmark {
  display: flex; align-items: baseline; padding: 6px 0; white-space: nowrap;
  color: var(--text-strong); text-decoration: none; text-transform: uppercase;
  font-family: var(--font-brand); font-style: italic; font-weight: 700; font-size: 30px; letter-spacing: 0.04em;
}
.wordmark small { margin-left: 2px; font-size: 16px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }
.wordmark-small { font-size: 22px; padding: 0; }
.wm-shine {
  display: inline-block;
  background: linear-gradient(100deg, currentColor 0%, currentColor 42%, #FFFFFF 50%, currentColor 58%, currentColor 100%);
  background-size: 250% 100%; background-position: 150% 0;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: wm-shine 6s ease-in-out 1.4s infinite;
}
@keyframes wm-shine { 0% { background-position: 150% 0; } 22%, 100% { background-position: -50% 0; } }
/* Hovering the wordmark just sends one light sweep across it */
.wordmark:hover .wm-shine, .wordmark:focus-visible .wm-shine { animation: wm-shine-hover 0.8s ease-out 1; }
@keyframes wm-shine-hover { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* The Salaam Cola can next to the wordmark */
.can-wrap { position: relative; display: inline-flex; }
.can-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  padding: 0; border: 0; background: none; cursor: pointer;
}
.can-btn img {
  display: block; width: auto; height: 38px; transform-origin: 50% 90%;
  transition: transform 0.2s ease; animation: can-idle 3.2s ease-in-out infinite;
}
@keyframes can-idle { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-2px) rotate(3deg); } }
.can-btn:hover img { animation: none; transform: rotate(-8deg) scale(1.06); }
.can-btn.is-active img { animation: can-wiggle 0.6s ease; }
@keyframes can-wiggle {
  0%, 100% { transform: rotate(0); } 20% { transform: rotate(-16deg); } 40% { transform: rotate(11deg); }
  60% { transform: rotate(-6deg); } 80% { transform: rotate(3deg); }
}
.can-bubble {
  position: absolute; left: 50%; top: calc(100% + 4px); z-index: 20; transform: translateX(-50%);
  padding: 6px 10px; background: #FFFFFF; color: var(--bg); font-weight: 700; font-size: 14px; white-space: nowrap;
  opacity: 0; pointer-events: none;
}
.can-bubble:empty { display: none; }
.can-bubble.is-active { animation: can-pop 1.8s ease forwards; }
@keyframes can-pop {
  0% { opacity: 0; transform: translate(-50%, 6px) scale(0.8); }
  12% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  80% { opacity: 1; } 100% { opacity: 0; }
}
.site-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.site-nav a {
  display: block; padding: 12px 14px; text-decoration: none; text-transform: uppercase;
  font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.08em;
}
.site-nav a[aria-current="page"], .site-nav a.is-current { color: var(--text-strong); box-shadow: inset 0 -3px 0 var(--accent); }
.site-nav a.nav-highlight { color: var(--accent); }
.header-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.brand-icon { flex: none; width: 18px; height: 18px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* Banner */
.banner {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line); background-color: var(--bg-banner);
}
/* Main-hero art behind the banner, darkened on the left where the text sits */
.banner.has-art {
  background-image:
    linear-gradient(90deg, rgba(11, 18, 32, 0.97) 0%, rgba(11, 18, 32, 0.9) 38%, rgba(11, 18, 32, 0.5) 72%, rgba(11, 18, 32, 0.3) 100%),
    var(--art-large);
  background-size: cover;
  background-position: center, 70% 22%;
}
@media (max-width: 720px) {
  .banner.has-art {
    background-image: linear-gradient(rgba(11, 18, 32, 0.8), rgba(11, 18, 32, 0.92)), var(--art-small);
    background-position: center, 60% 18%;
  }
}
.banner.has-art .banner-ghost { display: none; }
.banner-stripe {
  position: absolute; left: 0; top: 0; width: 42%; height: 6px; background: var(--accent);
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.banner-ghost {
  position: absolute; right: -48px; bottom: -52px; pointer-events: none; white-space: nowrap;
  font-family: var(--font-display); font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: clamp(120px, 18vw, 230px); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px #24324D;
}
.banner-row {
  position: relative; display: flex; flex-wrap: wrap; align-items: center;
  gap: 28px 36px; padding-block: 56px 52px;
}

.avatar-frame {
  position: relative; flex: none; width: 148px; height: 148px; padding: 4px;
  background: var(--accent);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
}
.avatar, .avatar-fallback {
  width: 140px; height: 140px; object-fit: cover; background: #16213A;
  clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}
.avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 56px; color: var(--text-strong);
}

.player { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.eyebrow {
  margin: 0; color: var(--accent); text-transform: uppercase;
  font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: 0.2em;
}
.name-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 22px; }
.player-name {
  margin: 0; color: var(--text-strong); text-transform: uppercase; overflow-wrap: anywhere;
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: clamp(52px, 7vw, 92px); line-height: 0.9; letter-spacing: 0.01em;
}
.aka {
  margin: 0 0 10px; max-width: 300px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  line-height: 1.3; letter-spacing: 0.03em; color: var(--muted);
}
.aka-label { color: var(--accent); font-weight: 800; letter-spacing: 0.14em; }
.player-meta {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; color: var(--muted);
}
.player-meta li { display: inline-flex; align-items: center; gap: 8px; }
.player-meta strong { color: var(--text); font-weight: 600; }
.endorsement-icon { width: 26px; height: 26px; }

/* Sections */
.main { display: flex; flex-direction: column; gap: 60px; padding-block: 44px 72px; }
.section { display: flex; flex-direction: column; gap: 20px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.section-title {
  margin: 0; display: flex; align-items: center; gap: 12px;
  color: var(--text-strong); text-transform: uppercase;
  font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 36px; line-height: 1;
}
.section-title::before {
  content: ''; flex: none; width: 14px; height: 24px; background: var(--accent);
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}
.section-sub {
  margin: 8px 0 0; color: var(--muted); text-transform: uppercase;
  font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: 0.14em;
}
.footnote { margin: 0; max-width: 760px; font-size: 14px; color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); }

.toggles { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.mode-toggle { display: flex; gap: 6px; }
.mode-btn, .platform-btn {
  min-height: 44px; padding: 12px 24px; border: none; cursor: pointer;
  background: var(--panel-raised); color: var(--text-soft); text-transform: uppercase;
  font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 18px; letter-spacing: 0.06em;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.mode-btn:hover, .platform-btn:hover { color: var(--text-strong); }
.mode-btn[aria-pressed="true"], .platform-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.mode-btn:focus-visible, .platform-btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--text-strong); }

.tile-label, .stat-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.num { font-variant-numeric: tabular-nums; }

/* At a glance */
.glance-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; }
.tile::before {
  content: ''; width: 36px; height: 4px; background: var(--accent);
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}
.tile .tile-label { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tile-value {
  color: var(--text-strong);
  font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: clamp(38px, 4.4vw, 46px); line-height: 1;
}
.tile-sub { font-size: 14px; color: var(--muted); min-height: 1.4em; }

/* Ranks */
.rank-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.rank-card { display: flex; flex-direction: column; gap: 22px; padding: 24px; }
.rank-head { display: flex; align-items: center; gap: 10px; }
.role-icon { flex: none; width: 24px; height: 24px; fill: var(--accent); }
.rank-head h3 {
  margin: 0; color: var(--text-strong); text-transform: uppercase;
  font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 26px; line-height: 1;
}
.rank-body { display: flex; align-items: center; gap: 14px; }
.emblem { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 64px; }
.emblem-rank { width: 64px; height: 64px; }
.emblem-division { width: 48px; height: 22px; }
.emblem-unranked { width: 56px; height: 63px; fill: #16213A; stroke: #3A4A68; stroke-width: 2; }
.rank-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rank-tier {
  color: var(--tier, var(--text-strong)); text-transform: uppercase;
  font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 29px; line-height: 1;
}
.rank-tier .division { color: var(--text-strong); }
.stat-row {
  margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  padding-top: 16px; border-top: 1px solid var(--line);
}
.stat-row div { display: flex; flex-direction: column; gap: 2px; }
.stat-row dd, .hero-stat .stat-value {
  margin: 0; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 21px;
}

/* Heroes + career */
.split { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 60px 32px; }
.heroes-col { flex: 3 1 560px; min-width: 0; }
.career-col { flex: 2 1 340px; min-width: 0; }

.hero-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; padding: 14px 20px; }
.hero-rank {
  flex: none; width: 34px; color: var(--accent);
  font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 28px; line-height: 1;
}
.hero-portrait {
  flex: none; width: 60px; height: 60px; object-fit: cover; background: var(--panel-raised);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}
.hero-main { flex: 1 1 170px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.hero-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.hero-name {
  color: var(--text-strong); text-transform: uppercase;
  font-family: var(--font-display); font-weight: 700; font-size: 23px; line-height: 1.1;
}
.hero-role {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.hero-role .role-icon { width: 14px; height: 14px; fill: var(--muted); }
.hero-bar { height: 6px; background: var(--panel-raised); }
.hero-bar span { display: block; height: 100%; width: var(--bar); background: var(--accent); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px 26px; }
.hero-stat { display: flex; flex-direction: column; gap: 2px; min-width: 58px; }
.empty-row { padding: 20px; color: var(--muted); }

.career-panel { display: flex; flex-direction: column; gap: 22px; padding: 22px 24px 14px; }
.career-group { display: flex; flex-direction: column; gap: 6px; }
.career-title {
  margin: 0; color: var(--accent); text-transform: uppercase;
  font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: 0.16em;
}
.career-list { margin: 0; }
.career-list div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 10px 0; border-bottom: 1px dashed var(--line-dashed);
}
.career-list dt { display: flex; align-items: center; gap: 10px; color: var(--text-soft); }
.career-list dd {
  margin: 0; color: var(--text-strong); font-family: var(--font-display); font-weight: 700; font-size: 20px;
}

a.hero-row { color: inherit; text-decoration: none; transition: border-color 0.15s; }
a.hero-row:hover { border-color: var(--accent); }
a.hero-row:hover .hero-name { color: var(--accent); }

/* Socials row in the banner */
.socials { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.social {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 12px;
  background: rgba(11, 18, 32, 0.78); border: 1px solid var(--line-strong); color: var(--text-soft);
  font: inherit; font-size: 14px; text-decoration: none; cursor: pointer;
}
.social:hover { border-color: var(--accent); color: var(--text-strong); }
.social-label { color: var(--muted); }
.social-value { color: var(--text); font-weight: 600; }
.social-hint {
  margin-left: 2px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}


/* Fun facts */
.ghost-btn {
  min-height: 44px; padding: 10px 20px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-strong); color: var(--text-soft); text-transform: uppercase;
  font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 17px; letter-spacing: 0.06em;
}
.ghost-btn:hover { border-color: var(--accent); color: var(--text-strong); }
.facts-grid {
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px;
}
.fact { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px; font-size: 18px; line-height: 1.45; color: var(--text); }
.fact-num { color: var(--accent); font-weight: 700; } /* the numbers in a fun fact */
.fact-icon {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center; background: var(--accent);
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}
.fact-icon .stat-icon { width: 20px; height: 20px; stroke: var(--on-accent); stroke-width: 2.2; }

/* Stat icons (assets/stat-icons.js) and ability icons */
.stat-icon {
  flex: none; width: 18px; height: 18px;
  fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.stat-icon.is-accent { stroke: var(--accent); }
.ability-mini { flex: none; width: 22px; height: 22px; object-fit: contain; }
.abilities-grid {
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px;
}
.ability { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.ability-head { display: flex; align-items: center; gap: 12px; }
.ability-icon {
  flex: none; width: 54px; height: 54px; display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--accent);
}
.ability-icon img { width: 38px; height: 38px; object-fit: contain; }
.ability h3 {
  margin: 0; color: var(--text-strong); text-transform: uppercase;
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
}
.ability p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-soft); }

/* History */
.rank-trend:empty { display: none; }
.trend-empty { margin: 0; font-size: 13px; color: var(--muted); }
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart-grid { stroke: var(--line-dashed); stroke-width: 1; }
.chart-axis { fill: var(--muted); font-family: var(--font-body); font-size: 12px; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-point { fill: var(--accent); stroke: var(--panel); stroke-width: 2; opacity: 0; }
.chart-point.is-rest, .chart-point.is-active { opacity: 1; }
.chart-crosshair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-tooltip {
  position: absolute; z-index: 2; transform: translate(-50%, calc(-100% - 12px)); pointer-events: none;
  padding: 6px 10px; background: var(--bg); border: 1px solid var(--line-strong);
  color: var(--text); font-size: 13px; white-space: nowrap;
}
.chart-empty { margin: 0; font-size: 14px; color: var(--muted); }
.history-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.chart-panel { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; }
.chart-slot { min-height: 40px; }
.milestones { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.milestone { display: flex; align-items: baseline; gap: 10px; color: var(--text); }
.milestone-date {
  flex: none; width: 56px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.milestone.is-up::before { content: '▲'; color: #3FD08F; font-size: 12px; }
.milestone.is-down::before { content: '▼'; color: #FF8A7A; font-size: 12px; }
.milestone.is-neutral::before { content: '●'; color: var(--muted); font-size: 10px; }
.history-table summary {
  display: flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--text-soft);
}
.history-table summary:hover { color: var(--text-strong); }
.table-scroll { overflow-x: auto; }
.history-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.history-table th, .history-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.history-table thead th { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* Hero pages */
.back-link {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  color: var(--accent); text-decoration: none; text-transform: uppercase;
  font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: 0.14em;
}
.back-link:hover { color: var(--text-strong); }
.role-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 6px 12px;
  background: rgba(11, 18, 32, 0.8); border: 1px solid var(--line-strong);
  font-size: 14px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft);
}
.role-chip .role-icon { width: 16px; height: 16px; }
.hero-description { margin: 0; max-width: 640px; line-height: 1.5; color: var(--text-soft); }
.notice { margin: 0; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line-strong); color: var(--text-soft); }
.stat-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 16px; align-items: start; }
.career-empty dt, .career-empty dd { color: var(--muted); }
.others-grid {
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 10px;
}
.other-hero { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; color: inherit; text-decoration: none; }
.other-hero:hover { border-color: var(--accent); }
.other-hero[aria-current="page"] { border-color: var(--accent); background: var(--panel-raised); }
.other-portrait {
  flex: none; width: 48px; height: 48px; object-fit: cover; background: var(--panel-raised);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}
.other-text { display: flex; flex-direction: column; min-width: 0; }
.other-name {
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--text-strong); text-transform: uppercase;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
}
.other-time { font-size: 13px; color: var(--muted); }

/* Patch notes */
.notes-list { display: flex; flex-direction: column; gap: 16px; }
.note { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.note-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.note-version {
  margin: 0; color: var(--text-strong);
  font-family: var(--font-brand); font-style: italic; font-weight: 700; font-size: 30px; line-height: 1;
}
.note-date { font-size: 14px; color: var(--muted); }
.note-group { display: flex; flex-direction: column; gap: 10px; }
.note-group h4 {
  margin: 0; color: var(--text-soft); text-transform: uppercase;
  font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: 0.16em;
}
.note-group ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.note-group li { display: flex; align-items: baseline; gap: 12px; line-height: 1.45; }
.note-tag {
  flex: none; min-width: 56px; padding: 2px 8px; text-align: center;
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--bg); background: var(--line-dashed);
}
.note-tag.is-buff { background: #3FD08F; }
.note-tag.is-nerf { background: #FF8A7A; }
.note-tag.is-new { background: var(--accent); }
.note-tag.is-fix { background: #8FB8FF; }
.note-tag.is-season { background: #C9A0FF; }
.note-tag.is-note { color: var(--text); }
.notes-more { align-self: flex-start; }

/* Leave a GG */
.gg-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 32px; }
.gg-form { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding: 22px 24px; }
.field {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.field input, .field textarea {
  min-height: 44px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--field-line); color: var(--text);
  font-family: var(--font-body); font-size: 16px; letter-spacing: 0; text-transform: none;
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field input:disabled, .field textarea:disabled { opacity: 0.6; }
.gg-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.gg-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.gg-hint { font-size: 13px; color: var(--muted); }
.gg-status { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--text-soft); }
.primary-btn {
  min-height: 44px; padding: 12px 24px; border: none; cursor: pointer;
  background: var(--accent); color: var(--on-accent); text-transform: uppercase;
  font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 18px; letter-spacing: 0.06em;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.primary-btn:disabled { opacity: 0.55; cursor: default; }
.gg-list { flex: 1 1 340px; min-width: 0; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.gg-item { display: flex; flex-direction: column; gap: 6px; padding: 14px 18px; }
.gg-item p { margin: 0; overflow-wrap: anywhere; }
.gg-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.gg-meta strong { color: var(--text-strong); }
.gg-meta time { font-size: 13px; color: var(--muted); }
.gg-empty { padding: 22px 24px; border: 1px dashed var(--line-strong); color: var(--muted); }
.gg-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.gg-heart {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 10px;
  border: 1px solid var(--line-strong); background: none; color: var(--text-soft); cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; touch-action: manipulation;
}
.gg-heart:hover { border-color: var(--heart); }
.gg-heart-icon { width: 18px; height: 18px; fill: none; stroke: var(--heart); stroke-width: 2; stroke-linejoin: round; }
.gg-heart.is-on .gg-heart-icon { fill: var(--heart); }
.gg-heart.is-bumped .gg-heart-icon { animation: gg-heart-pop 0.35s ease; }
@keyframes gg-heart-pop { 40% { transform: scale(1.35); } }
.gg-item.is-new { animation: gg-arrive 0.9s ease-out; }
@keyframes gg-arrive {
  from { opacity: 0; transform: translateY(-8px); border-color: var(--accent); }
  40% { opacity: 1; transform: none; border-color: var(--accent); }
}
/* "Live" badge: green and pulsing while new GGs arrive by themselves, grey while reconnecting */
.gg-live {
  margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line-strong);
  color: var(--text-soft); text-transform: uppercase;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.14em;
}
.gg-live-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.gg-live.is-live .gg-live-dot { background: #4ADE80; animation: gg-live 2s ease-out infinite; }
@keyframes gg-live {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
}

/* Birthday mode (2 May): strip text, banner button, confetti and Miku's party hat */
.birthday-pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 18px;
  border: 1px solid var(--heart); background: rgba(255, 92, 138, 0.14); color: var(--text-strong); cursor: pointer;
  text-transform: uppercase; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.08em;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.birthday-pill:hover { background: rgba(255, 92, 138, 0.24); }
.birthday-pill:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--text-strong); }
.strip-party { font-size: 18px; margin-right: 8px; vertical-align: -2px; }
.joke-strip a { color: inherit; font-weight: 700; }
.confetti { position: fixed; inset: 0; z-index: 60; overflow: hidden; pointer-events: none; }
.confetti-piece {
  position: absolute; top: -24px; width: 9px; height: 14px;
  animation: confetti-fall var(--dur) linear var(--delay) both;
}
.confetti-piece.is-round { width: 10px; height: 10px; border-radius: 50%; }
@keyframes confetti-fall {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(var(--drift), calc(100vh + 48px), 0) rotate(var(--spin)); }
}
/* The party-hat walk (miku-walk-party.webp) is the same walk with room above her head for the hat:
   feet stay where they were and the image reaches higher. */
.miku.is-party img { position: absolute; left: 0; bottom: 0; height: 127.5%; }
.miku.is-party .miku-bubble { bottom: calc(127% + 6px); } /* above the hat */

/* Walking Miku along the bottom of the window (moved by setupMiku in ui.js). Only she takes clicks;
   the rest of the strip lets them through, and it clips sideways so walking off screen never scrolls. */
.miku-lane { position: fixed; left: 0; right: 0; bottom: 0; height: 0; z-index: 40; pointer-events: none; overflow-x: clip; }
.miku {
  position: absolute; left: 0; bottom: 4px; width: 96px; height: 100px; padding: 0; border: 0; background: none;
  cursor: pointer; pointer-events: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transform: translateX(-100%); will-change: transform; /* out of sight until her first step */
}
.miku::after {
  content: ''; position: absolute; left: 24%; right: 24%; bottom: -3px; height: 6px;
  border-radius: 50%; background: rgba(0, 0, 0, 0.4);
}
.miku img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
/* Her speech bubble, centred over her head, which sits right of the middle of the image (left of it
   when she's flipped). --nudge (set in ui.js) slides it back on screen near an edge; the tail stays
   pointing at her. */
.miku-bubble {
  position: absolute; left: 57.3%; bottom: calc(100% + 12px); z-index: 2;
  width: max-content; max-width: 220px; padding: 6px 12px; border-radius: 14px;
  background: #FFFFFF; color: var(--on-accent); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  font-family: var(--font-body); font-size: 14px; font-weight: 600; line-height: 1.3; text-align: center;
  opacity: 0; transform: translateX(calc(-50% + var(--nudge, 0px)));
}
.miku-bubble.is-emoji { padding: 4px 10px; border-radius: 16px; font-size: 20px; line-height: 1.2; }
.miku.faces-left .miku-bubble { left: 42.7%; }
.miku-bubble:empty { display: none; }
.miku-bubble::after {
  content: ''; position: absolute; left: calc(50% - var(--nudge, 0px)); top: 100%; margin-left: -6px;
  border: 6px solid transparent; border-top-color: #FFFFFF;
}
.miku-bubble.is-active { animation: miku-love 2.5s ease-out forwards; } /* ui.js sets the length per line */
@keyframes miku-love {
  0% { opacity: 0; transform: translate(calc(-50% + var(--nudge, 0px)), 6px) scale(0.6); }
  12% { opacity: 1; transform: translate(calc(-50% + var(--nudge, 0px)), 0) scale(1.06); }
  20% { transform: translate(calc(-50% + var(--nudge, 0px)), 0) scale(1); }
  85% { opacity: 1; transform: translate(calc(-50% + var(--nudge, 0px)), -4px); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--nudge, 0px)), -10px); }
}
@media (max-width: 640px) {
  .miku { width: 69px; height: 72px; }
  .miku-bubble { max-width: 180px; font-size: 13px; padding: 5px 10px; }
  .miku-bubble.is-emoji { font-size: 17px; padding: 3px 8px; }
}

/* Season Wrapped */
.wrapped-main { display: flex; flex-direction: column; align-items: center; gap: 20px; padding-block: 40px 64px; }
.wrapped-main .eyebrow { color: var(--muted); }
.story {
  position: relative; width: 100%; max-width: 440px; height: min(700px, 78vh); min-height: 520px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line-strong); cursor: pointer;
  -webkit-user-select: none; user-select: none;
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}
/* On phones the card fills what's left of the screen, so Back and Next stay in view. */
@media (max-width: 640px) {
  .story { height: calc(100vh - 372px); height: calc(100svh - 372px); min-height: 380px; }
}
.story.has-art {
  background-image: linear-gradient(180deg, rgba(11, 18, 32, 0.35) 0%, rgba(11, 18, 32, 0.55) 45%, rgba(11, 18, 32, 0.96) 100%), var(--art-small);
  background-size: cover; background-position: center, 62% 20%;
}
.story-bars { position: absolute; left: 20px; right: 20px; top: 18px; z-index: 2; display: flex; gap: 4px; }
.story-bars span { flex: 1; height: 4px; background: #2A3A58; }
.story-bars span.is-done { background: var(--accent); }
.story-slide { position: absolute; inset: 0; }
.story-content {
  position: absolute; inset: 0; padding: 64px 30px 32px;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 10px;
  animation: story-rise 0.45s ease both;
}
.story.has-art .story-content { justify-content: flex-end; }
@keyframes story-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.story-avatar {
  width: 96px; height: 96px; border: 3px solid var(--accent);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.story-kicker {
  margin: 0; color: var(--accent); text-transform: uppercase;
  font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: 0.2em;
}
.story-title, .story-big {
  margin: 0; color: var(--text-strong); text-transform: uppercase; line-height: 0.9; overflow-wrap: anywhere;
  font-family: var(--font-brand); font-style: italic; font-weight: 700;
}
.story-title { font-size: clamp(56px, 17vw, 76px); }
.story-big { font-size: clamp(72px, 26vw, 120px); }
.story-big.is-name { font-size: clamp(48px, 16vw, 80px); line-height: 0.95; }
.story-label {
  margin: 0; color: var(--text-strong); text-transform: uppercase;
  font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 30px;
}
.story-line { margin: 0; font-size: 20px; color: var(--text-soft); }
.story .is-accent { color: var(--accent); }
.story .is-muted { color: var(--muted); }
.story-line.is-muted { font-size: 16px; }
.story .is-spaced { margin-top: 10px; }
.story-pair { display: flex; gap: 28px; }
.story-pair .story-big { font-size: clamp(64px, 22vw, 96px); }
.story-journey { width: 100%; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.story-journey li { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--bg-header); border: 1px solid var(--line-strong); }
.journey-ranks {
  color: var(--text-strong); text-transform: uppercase;
  font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: 24px;
}
.journey-arrow { color: var(--muted); }
.story-bests { width: 100%; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.story-bests div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px dashed var(--line-dashed); }
.story-bests dt { display: flex; align-items: center; gap: 10px; font-size: 18px; color: var(--text-soft); }
.story-bests .stat-icon { width: 20px; height: 20px; }
.story-bests dd { margin: 0; color: var(--text-strong); font-family: var(--font-brand); font-style: italic; font-weight: 700; font-size: 40px; line-height: 1; }
.story-summary-title {
  margin: 0; color: var(--text-strong); text-transform: uppercase;
  font-family: var(--font-brand); font-style: italic; font-weight: 700; font-size: 36px; line-height: 1;
}
.story-summary { width: 100%; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.story-summary div { display: flex; flex-direction: column; gap: 2px; padding: 12px; background: var(--bg-header); border: 1px solid var(--line-strong); }
.story-summary dt { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.story-summary dd { margin: 0; color: var(--text-strong); font-family: var(--font-display); font-weight: 700; font-size: 22px; overflow-wrap: anywhere; }
.story-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.story-controls { display: flex; align-items: center; justify-content: center; gap: 12px; max-width: 100%; }
@media (max-width: 360px) {
  .story-controls .story-btn { min-width: 0; flex: 1; }
}
.story-pos { min-width: 60px; text-align: center; font-size: 14px; color: var(--muted); }
.story-btn {
  min-width: 120px; min-height: 44px; padding: 10px 18px; cursor: pointer;
  background: var(--panel-raised); border: none; color: var(--text-soft); text-transform: uppercase;
  font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 18px; letter-spacing: 0.06em;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.story-btn.is-primary { background: var(--accent); color: var(--on-accent); }
.story-btn:disabled { opacity: 0.45; cursor: default; }
/* The slanted buttons clip the normal outline away, so their focus ring is drawn inside. */
.story-btn:focus-visible, .primary-btn:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--text-strong); }
.story-tip { text-align: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-header); }
.footer-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 32px; padding-block: 28px; font-size: 14px; line-height: 1.5; color: var(--muted);
}
.footer-row p { margin: 0; max-width: 700px; }

/* Phones: one sideways-scrolling row of nav links instead of three wrapped rows */
@media (max-width: 640px) {
  .header-actions { width: 100%; flex-wrap: nowrap; }
  .site-nav { flex: 1; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { flex: none; }
  .site-nav a:focus-visible { outline-offset: -3px; } /* the scrolling nav would clip it outside */
}

@media (max-width: 520px) {
  .banner-row { padding-block: 40px 36px; }
  .aka { margin-bottom: 0; }
  .toggles, .mode-toggle { width: 100%; }
  .mode-btn, .platform-btn { flex: 1; padding-inline: 10px; }
}
