/* Rate Your Teammates: light pages with a dark top bar and hero. */

:root {
  --ink: #15171c;
  --ink-2: #4a4f5a;
  --muted: #6d7380;
  --line: #e3e5ea;
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --bar: #111317;
  --red: #ff4655;
  --red-dark: #e23545;
  --navy: #0f1923;
  /* Score colours: good, middling, poor, and the toxicity box. */
  --good: #8fe7b6;
  --mid: #ffe07a;
  --poor: #ffa3aa;
  --tox: #e7e9ee;
  --t1: #ff8f98;
  --t2: #ffb37a;
  --t3: #ffe07a;
  --t4: #b9ef8d;
  --t5: #6fdca0;
  --radius: 10px;
  --wrap: 1120px;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .92em; background: rgba(255,255,255,.12); padding: 1px 6px; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.page { padding-top: 36px; padding-bottom: 64px; }
.narrow { max-width: 820px; }
.noscript { padding: 40px 20px; text-align: center; }
:focus-visible { outline: 3px solid #5b8cff; outline-offset: 2px; }

.icon { display: inline-flex; width: 18px; height: 18px; flex: none; }
.icon svg { width: 100%; height: 100%; }

/* ---------- Buttons ---------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid transparent; border-radius: 999px; padding: 9px 22px; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; background: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn-lg { padding: 12px 34px; font-size: 17px; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-disabled { background: var(--bg-soft); color: var(--muted); border-color: var(--line); cursor: default; }

/* ---------- Top bar ---------- */

.topbar { background: var(--bar); color: #fff; position: sticky; top: 0; z-index: 20; }
/* The top bar uses the whole width on big screens (up to 1680px): logo on
   the left, game tabs in the middle, search and account on the right. */
.topbar-inner { max-width: 1680px; margin: 0 auto; padding: 0 clamp(20px, 3vw, 40px); height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; }
.topbar-inner > .logo { justify-self: start; }
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 22px; min-width: 0; }
.logo { font-family: Rajdhani, sans-serif; font-weight: 700; font-size: 24px; letter-spacing: .5px; text-decoration: none; color: #fff; white-space: nowrap; }
.logo span { color: var(--red); }
.topbar-search { flex: 1; min-width: 0; max-width: 420px; }
/* Big screens: logo and game tabs on the left, search box and Steam
   buttons on the right. */
@media (min-width: 1100px) {
  .topbar-inner { display: flex; }
  .topbar-right { flex: none; margin-left: auto; }
  .topbar-search { flex: none; width: 340px; max-width: none; }
  /* Just wide enough for the game logo and "Search a Steam player". */
  body:is([data-game='deadlock'], [data-game='cs2'], [data-game='dota']) .topbar-search { width: 268px; }
}

/* Game tabs in the top bar */
.game-nav { display: flex; gap: 4px; }
.game-nav a { display: inline-flex; align-items: center; gap: 7px; color: rgba(255,255,255,.75); text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
/* Game logos: grey until hovered; the game you're on keeps its colour. */
.game-nav img { width: 18px; height: 18px; flex: none; }
.game-nav .logo-colour { display: none; }
.game-nav a:is(:hover, :focus-visible, [aria-current='page']) .logo-grey { display: none; }
.game-nav a:is(:hover, :focus-visible, [aria-current='page']) .logo-colour { display: block; }
.game-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.game-nav a[aria-current='page'] { color: #fff; background: rgba(255,255,255,.14); }
.is-home .topbar { position: absolute; left: 0; right: 0; background: transparent; }


/* Current game's logo beside the search box. On phones with Steam buttons
   it only grows in once you've scrolled down (see the small-screens section). */
.topbar-search:not([hidden]) { display: flex; align-items: center; }
.topbar-search .riot-search { flex: 1; min-width: 0; }
.topbar-game { display: inline-flex; width: 36px; margin-right: 10px; flex: none; align-items: center; justify-content: center; height: 36px; border-radius: 999px; background: rgba(255,255,255,.14); }
.topbar-game img { width: 18px; height: 18px; flex: none; }

/* Sign in with Steam (Deadlock and CS2 pages) */
.topbar-account { flex: none; }
.topbar-account[hidden] { display: none; }
.account-in { display: flex; align-items: center; gap: 8px; }
/* Signed-in menu: Recent games, Profile, Sign out. */
.account-menu { position: relative; }
.account-menu summary { list-style: none; cursor: pointer; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu .caret { font-size: 11px; margin-left: -2px; opacity: .8; transition: transform .15s ease; }
.account-menu[open] .caret { transform: rotate(180deg); }
.account-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 170px; padding: 6px; border-radius: 12px; background: #1a1e24; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 12px 30px rgba(0,0,0,.45); display: flex; flex-direction: column; }
.account-pop a { color: #e7e9ee; text-decoration: none; font-size: 14px; font-weight: 600; padding: 9px 12px; border-radius: 8px; white-space: nowrap; }
.account-pop a:hover, .account-pop a:focus-visible { background: rgba(255,255,255,.08); color: #fff; }
.account-pop a:last-child { color: #b9bfc8; border-top: 1px solid rgba(255,255,255,.08); margin-top: 4px; padding-top: 11px; border-radius: 0 0 8px 8px; }
/* The phone top bar clips the account area for its slide animation; let the menu out while it's open. */
.topbar-account:has(.account-menu[open]) { overflow: visible !important; }
/* The cog next to your own name on your player page. */
.profile-cog { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: 4px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; }
.profile-cog:hover { color: var(--ink); border-color: var(--ink-2); }
.profile-cog .icon { width: 22px; height: 22px; }
.has-banner .profile-cog { color: #e7e9ee; border-color: rgba(255,255,255,.3); }
.account-link { display: inline-flex; align-items: center; gap: 7px; color: #fff; font-weight: 600; font-size: 14px; text-decoration: none; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); white-space: nowrap; }
.account-link .wide-only { margin-left: -3px; } /* ~ one space after "Sign in" / "Recent" */
.account-link:hover { border-color: var(--red); color: var(--red); }
.account-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.account-name:hover { border-color: rgba(255,255,255,.3); color: #fff; }
.account-link .icon svg, .recent-cta .icon svg, .notice .btn .icon svg { width: 16px; height: 16px; }
/* Same size as the Recent button, but quieter (fainter text and border). */
.account-out { display: inline-flex; align-items: center; color: rgba(255,255,255,.7); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.15); }
.account-out:hover { color: #fff; border-color: rgba(255,255,255,.4); }
button.account-out { background: transparent; font-family: inherit; cursor: pointer; }
.recent-cta { margin: 22px 0 0; }
.recent-cta .btn { color: #fff; border-color: rgba(255,255,255,.55); background: rgba(0,0,0,.25); }
/* Hover fills with the game's accent (CS2 gold, Deadlock green); beats the themes' .btn-ghost:hover. */
body[data-game]:not([data-game='']) .recent-cta .btn:is(:hover, :focus-visible) { border-color: var(--red); background: var(--red); color: var(--on-accent); }
.btn-sm { padding: 6px 16px; font-size: 14px; }

/* Optional name on a rating */
.name-choice { margin: 4px 0 18px; padding: 16px 20px; border-radius: var(--radius); background: var(--bg-soft); box-shadow: 0 0 0 1px var(--line); }
.name-choice .check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-weight: 600; }
.name-choice .check input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--red); }
.name-choice .check small { display: block; font-weight: 400; margin-top: 2px; }
.name-choice p { margin: 0; }
.review-author { font-size: 13.5px; color: var(--muted); }
.review-author a { color: var(--ink); font-weight: 700; text-decoration: none; }
.review-author a:hover { text-decoration: underline; }

/* Your recent games */
.recent-head { margin-bottom: 20px; }
.recent-head h1 { margin: 0 0 6px; }
.recent-list { display: flex; flex-direction: column; gap: 10px; }
.recent-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.recent-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.recent-row:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.recent-result { flex: none; width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #121212; background: var(--tox); }
.recent-result.win { background: var(--good); }
.recent-result.loss { background: var(--poor); }
.recent-result.draw { background: var(--mid); }
.recent-pic { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--surface-2, #e6e8ed); }
.recent-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.recent-main strong { font-size: 16px; }
.recent-open { flex: none; font-size: 13px; font-weight: 700; color: var(--muted); }
.recent-open::after { content: ' ▾'; }
.recent-row[aria-expanded='true'] .recent-open::after { content: ' ▴'; }
.recent-mates { border-top: 1px solid var(--line); padding: 8px 18px 12px; }
.recent-mates[hidden] { display: none; }
.mate-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.mate-row + .mate-row { border-top: 1px solid var(--line); }
.mate-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface-2, #e6e8ed); }
.mate-main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.mate-main:hover .riot-name { text-decoration: underline; }
@media (max-width: 720px) {
  :is(.account-link, .account-out) { padding: 6px 10px; font-size: 13px; }
  .recent-open { display: none; }
}

/* ---------- Riot ID search ---------- */

.riot-search { position: relative; display: flex; align-items: center; background: #fff; border-radius: 999px; color: var(--ink); }
.riot-search-icon { position: absolute; left: 14px; color: var(--muted); display: flex; pointer-events: none; }
.riot-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 9px 16px 9px 42px; font-size: 15px; border-radius: 999px; }
.riot-search input::-webkit-search-cancel-button { display: none; }
.riot-search:focus-within { box-shadow: 0 0 0 3px rgba(255,70,85,.45); }
.riot-search.big { max-width: 640px; margin: 0 auto; padding: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.riot-search.big .riot-search-icon { left: 24px; }
.riot-search.big .riot-search-icon .icon { width: 24px; height: 24px; }
.riot-search.big input { font-size: 20px; padding: 14px 16px 14px 58px; }
.riot-search.big:focus-within { box-shadow: 0 12px 40px rgba(0,0,0,.35), 0 0 0 4px rgba(255,70,85,.55); }
.riot-search-go { padding: 12px 26px; font-size: 16px; }

.suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; list-style: none; margin: 0; padding: 6px; background: #fff; border-radius: 14px; box-shadow: 0 18px 40px rgba(10,12,18,.25); z-index: 30; text-align: left; }
.suggest li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.suggest li.active { background: var(--bg-soft); }
.suggest-main { display: flex; flex-direction: column; min-width: 0; }
.suggest-main small { color: var(--muted); font-size: 12.5px; }
.suggest-hint { color: var(--muted); font-size: 14px; cursor: default !important; }

.riot-id { font-weight: 700; overflow-wrap: anywhere; }
.riot-tag { color: var(--muted); font-weight: 500; }
.riot-id.big { font-size: 22px; }
/* Steam friend code: inline in lists, its own smaller line on big headings. */
.steam-label { display: none; }
.player-name .steam-code, .rate-hero .steam-code { display: block; font-size: 16px; font-weight: 600; letter-spacing: 0; margin-top: 6px; }
.player-name .steam-sep, .rate-hero .steam-sep { display: none; }
.player-name .steam-label, .rate-hero .steam-label { display: inline; }

.mini-score { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 34px; border-radius: 6px; font-weight: 800; font-size: 15px; }

/* Score colours, shared by every score box */
.good { background: var(--good); }
.mid { background: var(--mid); }
.poor { background: var(--poor); }
.none { background: var(--tox); color: var(--muted); }

/* ---------- Home ---------- */

.hero { position: relative; overflow: hidden; background: var(--navy) url('/img/hero-bg.svg') center top / cover no-repeat; color: #fff; padding: 150px 20px 120px; text-align: center; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,25,35,.35), rgba(15,25,35,.75)); }
.hero-inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.hero-brand { font-family: Rajdhani, sans-serif; font-weight: 700; font-size: clamp(34px, 6vw, 58px); letter-spacing: 1px; margin: 0 0 14px; line-height: 1; }
.hero-brand span { color: var(--red); }
.hero h1 { font-weight: 500; font-size: clamp(22px, 3.4vw, 32px); margin: 0 0 30px; }
.hero h1 strong { font-weight: 800; }
.hero-help { margin: 18px 0 0; color: rgba(255,255,255,.8); font-size: 14.5px; }
.hero-art { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-agent { position: absolute; bottom: -40px; height: 115%; width: auto; max-width: none; opacity: .28; filter: grayscale(.2); }
.hero-agent.a0 { left: -60px; }
.hero-agent.a1 { right: -40px; }
.hero-agent.a2 { right: 16%; height: 80%; opacity: .14; }

.section { padding: 64px 0; }
.section-title { font-size: 28px; font-weight: 800; margin-bottom: 28px; }
.section-title.center { text-align: center; }
.features { background: var(--bg); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature { text-align: center; padding: 10px 16px; }
.feature-icon { width: 76px; height: 76px; border-radius: 50%; background: #fff0f1; color: var(--red); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.feature-icon .icon { width: 36px; height: 36px; }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--ink-2); margin: 0; }

.latest { background: var(--bg-soft); }
.latest-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.latest-card { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; transition: box-shadow .15s; }
.latest-card:hover { box-shadow: 0 6px 20px rgba(10,12,18,.08); }
.latest-body { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.latest-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.latest-text { color: var(--ink-2); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Game colours: Valorant red, Deadlock green, CS2 orange, Dota 2 red-orange. */
[data-game='valorant'] { --game: #ff4655; }
[data-game='deadlock'] { --game: #3ddc84; }
[data-game='cs2'] { --game: #f39a1d; }
[data-game='dota'] { --game: #e0412e; }

.game-badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; color: var(--ink); background: color-mix(in srgb, var(--game) 22%, #fff); border: 1px solid color-mix(in srgb, var(--game) 55%, #fff); }

.hero[data-game='deadlock'] { background-color: #17140f; }
.hero[data-game='cs2'] { background-color: #121820; }
.hero[data-game='dota'] { background-color: #151212; }

.hero.hub { padding: 140px 20px 72px; }
/* Phones: the top bar is shorter, so the big logo can sit closer to it. */
@media (max-width: 640px) { .hero.hub { padding-top: 88px; } }
.hub .hero-inner { max-width: 760px; }
.hub .hero h1, .hero.hub h1 { margin-bottom: 12px; }
.hub-sub { margin: 0 auto; max-width: 560px; color: rgba(255,255,255,.72); font-size: 16.5px; }

/* The three game panels: each game's artwork, logo and a call to action. */
.game-panels { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: var(--wrap); margin: 44px auto 0; padding: 0 20px; text-align: left; }
.game-panel { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 340px; padding: 24px; border-radius: 16px; color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 18px 40px rgba(0,0,0,.45); transition: transform .2s, border-color .2s, box-shadow .2s; }
.game-panel::before { content: ''; position: absolute; inset: 0; z-index: -2; background: var(--panel-img) var(--panel-pos, center) / var(--panel-size, cover) no-repeat; transition: transform .4s; }
.game-panel::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,12,16,.15) 0%, rgba(10,12,16,.55) 45%, rgba(10,12,16,.94) 100%); }
/* Zoomed so the artwork's own title (bottom right) stays out of the panel. */
.game-panel[data-game='valorant'] { --panel-img: url('/img/themes/valorant-bg.jpg'); --panel-pos: 30% 8%; --panel-size: auto 128%; }
.game-panel[data-game='deadlock'] { --panel-img: url('/img/themes/deadlock-bg.jpg'); --panel-pos: center 30%; }
.game-panel[data-game='cs2'] { --panel-img: url('/img/themes/cs2-bg.jpg'); --panel-pos: 42% 30%; }
.game-panel[data-game='dota'] { --panel-img: url('/img/themes/dota-bg.jpg'); --panel-pos: 50% 40%; }
/* With Valorant unlocked there are four panels: two by two. */
.game-panels[data-count='4'] { grid-template-columns: repeat(2, 1fr); }
.game-panel:hover, .game-panel:focus-visible { transform: translateY(-4px); border-color: var(--game); box-shadow: 0 22px 50px rgba(0,0,0,.55), 0 0 0 1px var(--game), 0 0 32px color-mix(in srgb, var(--game) 35%, transparent); }
.game-panel:hover::before { transform: scale(1.05); }
.game-panel-top { display: flex; align-items: center; gap: 10px; }
.game-panel-top img { width: 28px; height: 28px; flex: none; }
.game-panel-name { font-family: Rajdhani, sans-serif; font-weight: 700; font-size: 28px; line-height: 1.1; }
.game-panel-sub { font-size: 14.5px; color: rgba(255,255,255,.8); }
.game-panel-go { align-self: flex-start; margin-top: 8px; padding: 8px 18px; border-radius: 999px; font-weight: 700; font-size: 14.5px; background: var(--game); color: #111317; transition: filter .15s; }
.game-panel[data-game='valorant'] .game-panel-go { color: #fff; }
.game-panel:hover .game-panel-go { filter: brightness(1.1); }

/* How it works */
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.how-step { position: relative; padding: 26px 24px 24px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); }
.how-num { position: absolute; top: 18px; right: 22px; font-family: Rajdhani, sans-serif; font-weight: 700; font-size: 40px; line-height: 1; color: color-mix(in srgb, var(--ink) 12%, transparent); }
.how-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; margin-bottom: 14px; color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); }
.how-icon .icon { width: 24px; height: 24px; }
.how-step h3 { font-size: 18px; margin: 0 0 6px; }
.how-step p { margin: 0; color: var(--ink-2); font-size: 15px; }
@media (max-width: 900px) {
  /* One card per row on phones, also when Valorant makes it 4 games. */
  .game-panels, .game-panels[data-count], .how-steps { grid-template-columns: 1fr; }
  .game-panels { padding: 0 16px; }
  .hero.hub { padding-left: 0; padding-right: 0; }
  .hub .hero-inner { padding: 0 16px; }
  .game-panel { min-height: 240px; }
}

/* ---------- Search results ---------- */

.results-title { font-size: 24px; font-weight: 500; margin-bottom: 24px; }
.results-subtitle { font-size: 16px; font-weight: 500; color: var(--muted, inherit); margin: 32px 0 12px; }
.result-card { display: flex; gap: 24px; align-items: center; background: var(--bg-soft); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 14px; text-decoration: none; border: 1px solid transparent; transition: border-color .15s; }
.result-card:hover { border-color: var(--line); background: #eef0f3; }
.result-new { background: #fff; border: 2px dashed var(--line); }
.result-score { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.result-score small { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--ink-2); }
.result-main p { margin: 4px 0 0; }
.result-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.result-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface-2, #e6e8ed); box-shadow: 0 0 0 1px var(--line); }
.result-stats { color: var(--ink-2); }
.results-hint { color: var(--muted); margin-top: 26px; }

.score-box { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 64px; border-radius: 6px; font-size: 30px; font-weight: 800; }

/* ---------- Player page ---------- */

.player-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.overall { display: flex; align-items: flex-start; gap: 6px; }
.overall-num { font-size: 92px; font-weight: 800; line-height: .95; letter-spacing: -2px; }
.overall-out { font-size: 26px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.overall-sub { margin: 10px 0 18px; font-size: 15px; }
.overall-sub a { font-weight: 700; }
.player-name { font-size: 44px; font-weight: 800; letter-spacing: -.5px; }
/* Steam players: their profile picture beside the name. */
.player-title { display: flex; align-items: center; gap: 18px; }
.player-title .player-name { min-width: 0; overflow-wrap: anywhere; }
.player-avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--surface-2, #e6e8ed); box-shadow: 0 0 0 2px var(--line); }
.player-name .riot-tag { font-weight: 600; }
.player-game { margin: 6px 0 20px; }
.game-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 20px; }
.game-switch-q { font-weight: 700; }
.game-switch .pills { gap: 8px; }
.game-switch a.pill { text-decoration: none; color: inherit; }
.game-switch small { flex-basis: 100%; }
/* The game you're on lights up in the section's colour (green for Deadlock). */
body[data-game]:not([data-game='']) .game-switch .pill[aria-current='page'] { background: var(--logo-hover); border-color: var(--logo-hover); color: #121212; }
body[data-game='valorant']:not([data-game='']) .game-switch .pill[aria-current='page'] { color: #fff; }
.out-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink-2); }
.out-link .icon { width: 14px; height: 14px; }
.player-stats { display: flex; gap: 0; margin-bottom: 26px; }
.player-stats > div { display: flex; flex-direction: column; padding: 0 28px; border-left: 1px solid var(--line); }
.player-stats > div:first-child { padding-left: 0; border-left: 0; }
.player-stats strong { font-size: 32px; font-weight: 800; }
.player-stats span { font-size: 14px; color: var(--ink-2); }
.player-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.label { font-weight: 700; margin: 0 0 10px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-block; background: var(--bg-soft); border: 1px solid transparent; border-radius: 999px; padding: 5px 14px; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--ink-2); }

.distribution { background: var(--bg-soft); border-radius: var(--radius); padding: 26px 28px; align-self: start; }
.distribution h2 { font-size: 18px; margin-bottom: 18px; }
/* Supporters can make the box see-through over their banner (--dist-clear, 0-90%). */
.distribution[data-clear] { background: color-mix(in srgb, var(--bg-soft) calc(100% - var(--dist-clear, 0%)), transparent); }
.distribution[data-clear] h2, .distribution[data-clear] .dist-label, .distribution[data-clear] .dist-count { text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.distribution[data-clear] .dist-bar { background: color-mix(in srgb, var(--dist-bar) calc(100% - var(--dist-clear, 0%) / 2), transparent); }
.dist-row { display: grid; grid-template-columns: 96px 1fr 32px; align-items: center; gap: 12px; margin-bottom: 14px; }
.dist-row:last-child { margin-bottom: 0; }
.dist-label { font-size: 15px; text-align: right; }
.dist-label b { margin-left: 4px; }
.dist-bar { --dist-bar: #e1e4ea; height: 30px; background: var(--dist-bar); border-radius: 2px; overflow: hidden; }
.dist-fill { display: block; height: 100%; background: var(--red); min-width: 0; transition: width .4s; }
.dist-count { font-weight: 700; }

.ratings { padding-top: 36px; }
.ratings-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ratings-head h2 { font-size: 22px; font-weight: 800; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters select, .rate-form select { border: 1px solid var(--line); border-radius: 8px; padding: 8px 32px 8px 12px; background: #fff; cursor: pointer; }
.ratings.empty { text-align: center; padding: 56px 0 20px; }
.ratings.empty h2 { margin-bottom: 8px; }
.ratings.empty .btn { margin-top: 16px; }
.empty-filter { padding: 20px 0; }

.review { display: flex; gap: 28px; background: var(--bg-soft); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; }
.review-scores { display: flex; flex-direction: column; gap: 14px; }
.review-scores > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.review-scores small { font-size: 11px; font-weight: 700; letter-spacing: .5px; }
.score-box.tox { background: var(--tox); }
.review-body { flex: 1; min-width: 0; }
.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.review-mode { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; }
.agent-dot { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--surface-2, #dfe2e8); }
.review-head time { margin-left: auto; font-weight: 700; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
.mine-badge { font-size: 12px; font-weight: 700; color: var(--red-dark); background: #fff0f1; padding: 2px 10px; border-radius: 999px; }
.review-meta { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0 0 12px; font-size: 14.5px; }
.review-text { margin: 0 0 16px; font-size: 16px; overflow-wrap: anywhere; }
.review-body .tags { margin-bottom: 18px; }

/* Named ratings from a recent game: both players' stats from it. */
/* Performance delta: a coloured number that opens to show the stats behind it. */
.perf-panel { margin: 0 0 12px; max-width: 520px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.perf-panel summary { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; list-style: none; }
.perf-panel summary::-webkit-details-marker { display: none; }
.perf-panel summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .15s ease; }
.perf-panel[open] summary::after { transform: rotate(180deg); }
.perf-score { flex: none; min-width: 64px; padding: 6px 8px; border-radius: 8px; text-align: center; font: 700 18px/1 Rajdhani, Inter, sans-serif; color: var(--ink); font-variant-numeric: tabular-nums; }
.perf-score.good { background: var(--good); }
.perf-score.mid { background: var(--mid); }
.perf-score.poor { background: var(--poor); }
.perf-label { font-size: 14px; }
.perf-flat .perf-summary { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.perf-writer { border-style: dashed; }
.perf-label small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.perf-rows { padding: 0 14px 4px; }
.perf-row { display: grid; grid-template-columns: 1fr 80px 80px; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; }
.perf-row > :not(:first-child) { text-align: right; }
.perf-row-head { font-size: 12px; color: var(--muted); font-weight: 600; }
.perf-source { margin: 0; padding: 4px 14px 10px; font-size: 12px; }
.match-panel { margin: 0 0 16px; max-width: 520px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 12px 14px; }
.match-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-size: 14px; }
.match-head small, .match-who small, .match-kda small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.match-result { flex: none; width: 28px; height: 28px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #121212; background: var(--tox); }
.match-result.win { background: var(--good); }
.match-result.loss { background: var(--poor); }
.match-result.draw { background: var(--mid); }
.match-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.match-pic { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
.match-who { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.match-who em { font-style: normal; font-weight: 500; color: var(--muted); }
.match-kda { text-align: right; white-space: nowrap; }

/* A rating's clip: a play button until pressed, then the video. */
.clip { margin: 0 0 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.clip.playing { display: block; position: relative; aspect-ratio: 16 / 9; max-width: 640px; border-radius: 10px; overflow: hidden; background: #000; }
.clip iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.clip-play { display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.clip-play:hover { border-color: var(--red); }
.clip-play b { display: block; font-size: 14.5px; }
.clip-play small { display: block; font-size: 12.5px; color: var(--muted); }
.clip-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 9px; background: var(--red); color: #fff; font-size: 14px; padding-left: 2px; }
.clip-play[data-site='youtube'] .clip-icon { background: #ff0033; }
.clip-play[data-site='medal'] .clip-icon { background: #f5b82e; color: #111; }
.clip-link { font-size: 13px; color: var(--muted); }
.clip-link:hover { color: var(--ink); }
.clip-note { margin: 0 0 10px; }
.clip-input { width: 100%; border: 1px solid #cfd3db; border-radius: 8px; padding: 11px 14px; font-size: 15px; background: var(--bg); }
.clip-input:focus { outline: none; border-color: var(--ink); }
.clip-input + .field-error { margin-top: 6px; }
.review-body .tag { background: #e6e8ed; }
.review-foot { display: flex; align-items: center; gap: 12px; }
.votes { display: flex; gap: 16px; }
.vote { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; padding: 4px; color: var(--ink-2); font-weight: 600; border-radius: 6px; }
.vote:hover:not(:disabled) { color: var(--ink); }
.vote.on { color: var(--red); }
.vote:disabled { cursor: default; opacity: .55; }
.report-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 13.5px; padding: 4px; }
.report-btn:hover { color: var(--ink); }
.report-btn.after-share { margin-left: 4px; }
.report-btn.mod-delete:hover { color: var(--poor); }
@media (max-width: 480px) { .mod-delete .mod-label { display: none; } }
/* A rating opened from a shared link (?review=). */
.review.review-shared { outline: 2px solid var(--red); outline-offset: 2px; }
/* The plain summary the server puts in for search engines (src/seo.js). */
.seo-summary ul { padding-left: 18px; }
.report-btn .icon { width: 15px; height: 15px; }

/* ---------- Rate form ---------- */

.rate-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 28px 0 30px; }
.rate-hero .wrap { max-width: 820px; }
.rate-hero h1 { font-size: 36px; font-weight: 500; }
.rate-hero h1 .riot-id { font-weight: 800; }
.rate-hero p { margin: 6px 0 0; }
.back { display: inline-block; margin-bottom: 14px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink-2); }
.back:hover { color: var(--ink); text-decoration: underline; }

.rate-form { display: flex; flex-direction: column; gap: 22px; }
.block { border: 0; margin: 0; padding: 26px 28px; background: #fff; border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line), 0 4px 16px rgba(10,12,18,.04); min-width: 0; }
.block legend { float: left; width: 100%; font-size: 19px; font-weight: 800; margin-bottom: 18px; padding: 0; }
.block legend + * { clear: both; }
.req { color: var(--red); margin-left: 4px; }

.scale-wrap { max-width: 560px; }
.scale-caption { font-weight: 800; font-size: 17px; min-height: 26px; margin: 0 0 10px; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.scale-box { height: 52px; border: 0; background: #e6e8ed; cursor: pointer; padding: 0; }
.scale-box:first-child { border-radius: 26px 0 0 26px; }
.scale-box:last-child { border-radius: 0 26px 26px 0; }
.scale-box.t1 { background: var(--t1); }
.scale-box.t2 { background: var(--t2); }
.scale-box.t3 { background: var(--t3); }
.scale-box.t4 { background: var(--t4); }
.scale-box.t5 { background: var(--t5); }
.scale-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 8px; font-weight: 600; }

.pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 26px; font-weight: 700; cursor: pointer; }
.pill:hover { border-color: var(--ink-2); }
.pill[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill-sm { padding: 7px 16px; font-size: 14px; }
.pill:disabled { cursor: default; }
.pill:disabled:not([aria-pressed='true']) { opacity: .4; }
.pill:disabled:hover:not([aria-pressed='true']) { border-color: var(--line); }

.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.agent-pick { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px solid transparent; background: var(--bg-soft); border-radius: 10px; padding: 8px 4px; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.agent-pick img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: top; background: #dfe2e8; }
.agent-pick .agent-none { width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: var(--muted); background: #dfe2e8; }
.agent-pick:hover { border-color: var(--line); }
.agent-pick[aria-pressed='true'] { border-color: var(--red); background: #fff0f1; }

.tag-grid { margin-bottom: 10px; }
.tag-pick { cursor: pointer; border-color: var(--bg-soft); }
.tag-pick:hover { border-color: var(--ink-2); }
.tag-pick[aria-pressed='true'] { background: var(--ink); color: #fff; border-color: var(--ink); }

.guidelines-box { background: var(--bg-soft); border-radius: 8px; padding: 14px 18px; margin-bottom: 14px; font-size: 14.5px; }
.guidelines-box p { margin: 0 0 6px; }
.guidelines-box ul { margin: 0 0 8px; padding-left: 20px; color: var(--ink-2); }
.guidelines-box a { font-weight: 700; font-size: 13.5px; }
textarea { width: 100%; border: 1px solid #cfd3db; border-radius: 8px; padding: 12px 14px; resize: vertical; font-size: 15.5px; }
textarea:focus { outline: none; border-color: var(--ink); }
.comment-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; }
.counter { font-size: 13px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.field-error, .form-error { color: #c11f30; font-weight: 600; font-size: 14px; margin: 0; }
.form-error:empty, .field-error:empty { display: none; }
.submit-row { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 10px 0; }
.submit-row .muted { max-width: 520px; margin: 0; }

/* ---------- Notices, dialog, toast, loading ---------- */

.notice { text-align: center; padding: 50px 20px; }
.notice h1 { font-size: 28px; margin-bottom: 10px; }
.notice p { color: var(--ink-2); margin: 0 0 20px; }

/* Review guidelines: the same look as Privacy, Terms and Credits (legal.css). */
body.is-guidelines {
  background:
    radial-gradient(50% 380px at 8% 0%, rgba(255,70,85,.16), transparent 70%),
    radial-gradient(40% 340px at 50% -80px, rgba(61,220,132,.10), transparent 70%),
    radial-gradient(50% 380px at 92% 0%, rgba(222,155,53,.14), transparent 70%),
    var(--bg) no-repeat;
}
.legal-page { width: 100%; max-width: 760px; margin: 0 auto; padding: 56px 20px 72px; line-height: 1.65; }
.legal-page h1 { font-family: Rajdhani, sans-serif; font-weight: 700; font-size: clamp(36px, 6vw, 48px); line-height: 1.05; letter-spacing: .3px; margin: 0 0 20px; }
.legal-page p, .legal-page li { color: var(--ink-2); }
.legal-page p { margin: 0 0 14px; }
.legal-page h2 { font-size: 21px; font-weight: 700; color: var(--ink); margin: 40px 0 14px; padding-top: 28px; border-top: 1px solid var(--line); position: relative; }
.legal-page h2::before { content: ''; position: absolute; top: -1px; left: 0; width: 44px; height: 2px; background: var(--red); }
.legal-page ul { margin: 0 0 16px; padding-left: 22px; }
.legal-page li { margin-bottom: 8px; padding-left: 4px; }
.legal-page ul li::marker { color: var(--red); }
.legal-page .callout { margin: 0 0 20px; padding: 14px 18px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); border-left: 3px solid var(--red); }
@media (max-width: 640px) { .legal-page { padding: 36px 16px 56px; } }

.prose h1 { font-size: 34px; margin-bottom: 14px; }
.prose h2 { font-size: 20px; margin: 28px 0 8px; }
.prose li { margin-bottom: 4px; }

.dialog { border: 0; border-radius: 14px; padding: 26px 28px; width: min(460px, calc(100vw - 32px)); box-shadow: 0 30px 70px rgba(0,0,0,.35); }
.dialog::backdrop { background: rgba(10,12,18,.55); }
.dialog h2 { font-size: 20px; margin-bottom: 6px; }
.dialog p { margin: 0 0 14px; font-size: 14px; }
.report-reasons { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; }
.radio { display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: 15px; }
.field-label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.dialog .form-error { margin-top: 8px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: #1d2026; color: #f2f3f5; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 10px 30px rgba(0, 0, 0, .45); padding: 12px 22px; border-radius: 999px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 90px 20px; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */

.footer { background: var(--bar); color: rgba(255,255,255,.72); font-size: 13px; }
/* Same width and side padding as the top bar, so the links line up under the logo. */
.footer-inner { max-width: 1680px; margin: 0 auto; padding: 34px clamp(20px, 3vw, 40px); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; margin: 0 0 14px; font-size: 14px; font-weight: 600; }
.footer-links a { color: #fff; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-legal { max-width: 760px; margin: 0 0 10px; }
.footer-copy { margin: 0; }

/* ---------- Small screens ---------- */

@media (max-width: 860px) {
  .player-top { grid-template-columns: 1fr; gap: 30px; }
  .feature-grid { grid-template-columns: 1fr; gap: 20px; }
  .latest-list { grid-template-columns: 1fr; }
}

/* When there isn't room for everything on one line, the search box gets its
   own row under the logo, games and account. */
@media (max-width: 1099px) {
  .topbar-inner { display: flex; }
  .topbar-right { display: contents; }
  .topbar-inner { flex-wrap: wrap; height: auto; min-height: 64px; padding-top: 10px; padding-bottom: 10px; row-gap: 10px; }
  .topbar-search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  /* Logo and game tabs on the left, Steam buttons on the right. */
  .topbar-account { margin-left: auto; }
}

@media (max-width: 640px) {
  .topbar-inner { gap: 12px; height: auto; min-height: 58px; padding: 10px 16px; flex-wrap: wrap; }
  /* Phones: game tabs show just their logos, except the game you're on. */
  /* Icons only, so the bar keeps the same shape whichever game you're on
     (a long name like "Deadlock" used to push the tabs onto a second row). */
  .game-nav a span { display: none; }
  /* No Sign in button on any home page on phones (the site's home and each
     game's home). Signing in happens from "Rate a teammate". */
  .is-home .topbar-account { display: none; }
  .recent-cta .btn { max-width: 100%; white-space: normal; text-align: center; }
  .game-nav a { gap: 6px; }
  .logo { font-size: 20px; }
  /* Second row: search box and Steam buttons side by side. The ::after is a
     line break so the search box can't squeeze onto the logo's row. */
  .topbar-inner { row-gap: 0; }
  .topbar-inner::after { content: ''; order: 2; flex-basis: 100%; }
  .topbar-search, .topbar-account { margin-top: 10px; }
  .wide-only { display: none; }
  .topbar-search { order: 3; flex: 1 1 0; min-width: 0; max-width: none; }
  .topbar-account { order: 4; margin-left: 0; }
  .topbar-search[hidden] + .topbar-account { margin-left: auto; }
  .topbar-search .riot-search input { font-size: 14px; padding: 8px 12px 8px 36px; }
  .topbar-search .riot-search-icon { left: 12px; }
  .account-in { gap: 6px; }
  .game-nav { margin-left: auto; }
  .game-nav a { padding: 5px 9px; font-size: 13px; }
  .topbar-search[hidden] { display: none; }
  /* Scrolling down: the logo row scrolls away with the page (the bar sticks
     with its top tucked above the screen, so nothing is animated and it's as
     smooth as normal scrolling) and only the search row stays. Once that
     happens (app.js adds .topbar-compact) the search box slides over the
     Steam buttons and the current game's logo grows in beside it. */
  .topbar:has(.topbar-search:not([hidden])) { top: calc(-1 * var(--topbar-tuck, 0px)); }
  .logo, .game-nav { transition: opacity .15s ease; }
  .topbar-account { max-width: 220px; overflow: hidden; transition: max-width .2s cubic-bezier(.2,.8,.2,1), opacity .12s ease, margin .2s cubic-bezier(.2,.8,.2,1), visibility 0s; }
  .topbar-game { display: inline-flex; width: 0; margin-right: 0; opacity: 0; visibility: hidden; overflow: hidden; transition: width .2s cubic-bezier(.2,.8,.2,1), margin .2s cubic-bezier(.2,.8,.2,1), opacity .12s ease, visibility 0s .2s; }
  body.topbar-compact .topbar-inner:has(.topbar-search:not([hidden])) :is(.logo, .game-nav) { opacity: 0; }
  body.topbar-compact .topbar-inner:has(.topbar-search:not([hidden])) .topbar-account { max-width: 0; margin-left: -12px; opacity: 0; visibility: hidden; transition: max-width .2s cubic-bezier(.2,.8,.2,1), opacity .1s ease, margin .2s cubic-bezier(.2,.8,.2,1), visibility 0s .2s; }
  body.topbar-compact .topbar-inner:has(.topbar-search:not([hidden])) .topbar-game { width: 36px; margin-right: 10px; opacity: 1; visibility: visible; transition: width .2s cubic-bezier(.2,.8,.2,1), margin .2s cubic-bezier(.2,.8,.2,1), opacity .15s ease .03s, visibility 0s; }
  /* Valorant (no Steam buttons): the logo sits beside the search box from the start. */
  .topbar-inner:has(.topbar-account[hidden]) .topbar-game { width: 36px; margin-right: 10px; opacity: 1; visibility: visible; }
  /* Only the sides: "padding: 0 16px" used to wipe out .page's top and
     bottom spacing, so headings sat right under the top bar on phones. */
  .wrap { padding-left: 16px; padding-right: 16px; }
  .footer-inner { padding-left: 16px; padding-right: 16px; }
  .hero { padding: 110px 16px 80px; }
  .hero-agent.a2 { display: none; }
  .riot-search.big input { font-size: 17px; padding: 12px 10px 12px 46px; }
  .riot-search.big .riot-search-icon { left: 18px; }
  .riot-search-go { padding: 10px 16px; font-size: 15px; }
  .overall-num { font-size: 72px; }
  .player-name { font-size: 32px; }
  .player-avatar { width: 56px; height: 56px; }
  .player-stats > div { padding: 0 18px; }
  .player-stats strong { font-size: 26px; }
  .distribution { padding: 20px; }
  .dist-row { grid-template-columns: 92px 1fr 26px; gap: 8px; }
  .dist-label { font-size: 14px; white-space: nowrap; }
  .review { flex-direction: column; gap: 16px; padding: 18px; }
  .review-scores { flex-direction: row; }
  .review-scores > div { flex-direction: row; gap: 10px; }
  .score-box { width: 56px; height: 48px; font-size: 22px; }
  .result-card { gap: 16px; padding: 16px; }
  .block { padding: 20px 18px; }
  .rate-hero h1 { font-size: 26px; }
}

/* ---------- Game themes: every page under /valorant, /deadlock and /cs2 ---------- */
/* app.js sets body[data-game]. The site hub (/) and the info pages keep the
   light look. Each game only sets colours below; the shared dark rules after
   them use those colours, so all three themes stay in step. */

/* Valorant: the game's navy, red and off-white, over Valorant's China launch art. */
body[data-game='valorant'] {
  --ink: #ece8e1;
  --ink-2: #c5c9cf;
  --muted: #8b97a3;
  --line: #2b3a48;
  --bg: #0f1923;
  --bg-soft: #172531;
  --surface-2: #213140;
  --edge-2: #3a4b5c;
  --band: #132029;
  --bar: #0b131b;
  --navy: #0f1923;
  --red: #ff4655;
  --red-dark: #ff5c69;
  --on-accent: #ffffff;
  --brand-dim: #ff4655;
  --placeholder: #6f7d8a;
  --focus: #ff4655;
  --bar-fill: #ff4655;
  --tox: #213140;
  --hero-img: url('/img/themes/valorant-bg.jpg');
  /* Top-anchored so the artwork's own title (bottom left) mostly falls below. */
  --hero-pos: center top;
  --hero-tint: linear-gradient(180deg, rgba(15,25,35,.6), rgba(15,25,35,.82) 55%, rgba(15,25,35,.97));
}

/* Deadlock: deadfrag.com's "Eraserhead" greys over Deadlock city art, with green accents. */
body[data-game='deadlock'] {
  --ink: #e6e6e6;
  --ink-2: #c8c8c8;
  --muted: #949494;
  --line: #353535;
  --bg: #121212;
  --bg-soft: #1c1c1c;
  --surface-2: #272727;
  --edge-2: #464646;
  --band: #161616;
  --bar: #0d0d0d;
  --navy: #121212;
  --red: #3ddc84;
  --red-dark: #5ee89c;
  --on-accent: #121212;
  --brand-dim: #3ddc84;
  --placeholder: #6e6e6e;
  --focus: #3ddc84;
  --bar-fill: #3ddc84;
  --tox: #272727;
  --hero-img: url('/img/themes/deadlock-bg.jpg');
  --hero-pos: center;
  --hero-tint: linear-gradient(180deg, rgba(18,18,18,.25), rgba(18,18,18,.88));
}

/* CS2: dark blue-grey with Counter-Strike's orange-gold, over the CS2 cover art. */
body[data-game='cs2'] {
  --ink: #e9e5dc;
  --ink-2: #c4c6c9;
  --muted: #8d949c;
  --line: #2c3540;
  --bg: #10151b;
  --bg-soft: #18202a;
  --surface-2: #222c37;
  --edge-2: #3a4653;
  --band: #141b23;
  --bar: #0b0f14;
  --navy: #10151b;
  --red: #de9b35;
  --red-dark: #f0b04e;
  --on-accent: #10151b;
  --brand-dim: #de9b35;
  --placeholder: #6c7681;
  --focus: #de9b35;
  --bar-fill: #de9b35;
  --tox: #222c37;
  --hero-img: url('/img/themes/cs2-bg.jpg');
  --hero-pos: center 30%;
  --hero-tint: linear-gradient(180deg, rgba(16,21,27,.62), rgba(16,21,27,.9));
}

/* The site's home: neutral dark, with a glow in each game's colour. */
body[data-game='hub'] {
  --ink: #ebedf0;
  --ink-2: #c3c8cf;
  --muted: #8b929c;
  --line: #262b33;
  --bg: #0d1014;
  --bg-soft: #151a20;
  --surface-2: #1e242c;
  --edge-2: #353d48;
  --band: #11151a;
  --bar: #0a0c10;
  --navy: #0d1014;
  --red: #ff4655;
  --red-dark: #ff5c69;
  --on-accent: #ffffff;
  --brand-dim: #ff4655;
  --placeholder: #6f7782;
  --focus: #ff4655;
  --bar-fill: #ff4655;
  --tox: #1e242c;
  --hero-img: none;
  --hero-pos: center;
  --hero-tint: linear-gradient(180deg, transparent 60%, #0d1014);
}
body[data-game='hub']:not([data-game='']) .hero {
  background:
    radial-gradient(55% 65% at 10% 15%, rgba(255,70,85,.24), transparent 70%),
    radial-gradient(45% 55% at 50% -5%, rgba(61,220,132,.15), transparent 70%),
    radial-gradient(55% 65% at 90% 15%, rgba(222,155,53,.22), transparent 70%),
    var(--bg);
}

/* Shared dark rules for all three. */
/* The three game homes have the same banner height, whether or not there's a
   Steam button under the search, so switching games doesn't move the page. */
body.is-home:is([data-game='valorant'], [data-game='deadlock'], [data-game='cs2'], [data-game='dota']) .hero { min-height: 640px; }
/* The Valorant password and demo sign-in. */
.gate-form { display: flex; flex-direction: column; gap: 8px; max-width: 320px; margin: 16px auto 0; text-align: center; }
.gate-input { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink); font: inherit; }
.demo-account { width: 100%; text-align: left; }
body[data-game]:not([data-game='']) .game-badge { color: var(--ink); background: color-mix(in srgb, var(--game) 22%, transparent); border-color: color-mix(in srgb, var(--game) 60%, transparent); }
body[data-game]:not([data-game='']) { color-scheme: dark; background: var(--bg); color: var(--ink); }
body[data-game]:not([data-game='']) .topbar { border-bottom: 1px solid var(--surface-2); }
body[data-game]:not([data-game='']).is-home .topbar { border-bottom-color: transparent; }
body[data-game]:not([data-game='']) .logo span,
body[data-game]:not([data-game='']) .hero-brand span { color: var(--brand-dim); }

body[data-game]:not([data-game='']) .hero { background: var(--bg) var(--hero-img) var(--hero-pos) / cover no-repeat; }
body[data-game]:not([data-game='']) .hero::after { background: var(--hero-tint); }

body[data-game]:not([data-game='']) .btn-primary { color: var(--on-accent); }
body[data-game]:not([data-game='']) .btn-primary:hover { background: var(--red-dark); }
body[data-game]:not([data-game='']) .btn-ghost:hover,
body[data-game]:not([data-game='']) .pill[aria-pressed='true'],
body[data-game]:not([data-game='']) .tag-pick[aria-pressed='true'] { color: var(--on-accent); }

body[data-game]:not([data-game='']) .riot-search { background: var(--bg-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--edge-2); }
body[data-game]:not([data-game='']) .riot-search input { color: var(--ink); }
body[data-game]:not([data-game='']) .riot-search input::placeholder { color: var(--placeholder); }
body[data-game]:not([data-game='']) .riot-search:focus-within { box-shadow: inset 0 0 0 1px var(--focus), 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
body[data-game]:not([data-game='']) .riot-search.big { box-shadow: inset 0 0 0 1px var(--edge-2), 0 12px 40px rgba(0,0,0,.6); }
body[data-game]:not([data-game='']) .riot-search.big:focus-within { box-shadow: inset 0 0 0 1px var(--focus), 0 12px 40px rgba(0,0,0,.6), 0 0 0 4px color-mix(in srgb, var(--focus) 24%, transparent); }
body[data-game]:not([data-game='']) .suggest { background: var(--bg-soft); box-shadow: 0 0 0 1px var(--line), 0 18px 40px rgba(0,0,0,.6); }
body[data-game]:not([data-game='']) .suggest li.active { background: var(--surface-2); }

body[data-game]:not([data-game='']) .feature-icon { background: var(--bg-soft); color: var(--brand-dim); box-shadow: inset 0 0 0 1px var(--line); }
body[data-game]:not([data-game='']) .latest-card { background: var(--bg-soft); border-color: var(--line); }
body[data-game]:not([data-game='']) .latest-card:hover { background: var(--surface-2); box-shadow: none; }
body[data-game]:not([data-game='']) .latest { background: var(--band); }
body[data-game]:not([data-game='']) .result-card:hover { background: var(--surface-2); }
body[data-game]:not([data-game='']) .result-new { background: var(--bg); }

body[data-game]:not([data-game='']) .good,
body[data-game]:not([data-game='']) .mid,
body[data-game]:not([data-game='']) .poor { color: #121212; }
body[data-game]:not([data-game='']) .dist-bar { --dist-bar: var(--surface-2); background: var(--dist-bar); }
body[data-game]:not([data-game='']) .dist-fill { background: var(--bar-fill); }

body[data-game]:not([data-game='']) .filters select,
body[data-game]:not([data-game='']) .rate-form select,
body[data-game]:not([data-game='']) .pill { background: var(--bg-soft); color: var(--ink); }
body[data-game]:not([data-game='']) .block { background: var(--bg-soft); box-shadow: 0 0 0 1px var(--line); }
body[data-game]:not([data-game='']) .rate-hero { background: var(--band); }
/* Only empty boxes: picked ones keep their colour (.t1-.t5). */
body[data-game]:not([data-game='']) .scale-box:not(.fill) { background: var(--surface-2); }
body[data-game]:not([data-game='']) .guidelines-box { background: var(--bg); }
body[data-game]:not([data-game='']) .review-body .tag { background: var(--surface-2); }
body[data-game]:not([data-game='']) .block .tag-pick { background: var(--bg); border-color: var(--line); }
/* The picked agent: a tint of the game's accent, not the light theme's pale pink. */
body[data-game]:not([data-game='']) .agent-pick { color: var(--ink); }
body[data-game]:not([data-game='']) .agent-pick[aria-pressed='true'] { background: color-mix(in srgb, var(--red) 22%, var(--bg-soft)); border-color: var(--red); }
body[data-game]:not([data-game='']) .agent-pick :is(img, .agent-none) { background: var(--surface-2); }
/* Picked buttons fill with the game's accent (after the rules above so they win). */
body[data-game]:not([data-game='']) .pill[aria-pressed='true'],
body[data-game]:not([data-game='']) .tag-pick[aria-pressed='true'] { background: var(--red); border-color: var(--red); color: var(--on-accent); }
body[data-game]:not([data-game='']) .mine-badge { background: var(--surface-2); color: var(--ink); }
body[data-game]:not([data-game='']) textarea { background: var(--bg); border-color: var(--edge-2); color: var(--ink); }
body[data-game]:not([data-game='']) textarea:focus { border-color: var(--focus); }
body[data-game]:not([data-game='']) .clip-input { background: var(--bg); border-color: var(--edge-2); color: var(--ink); }
body[data-game]:not([data-game='']) .clip-input:focus { border-color: var(--focus); }
body[data-game]:not([data-game='']) .field-error,
body[data-game]:not([data-game='']) .form-error { color: #ff8a8a; }
body[data-game]:not([data-game='']) .dialog { background: var(--bg-soft); color: var(--ink); }

/* ---------- Logo hover: the whole logo lights up in the section's colour ---------- */
:root { --logo-hover: #ff4655; }
body[data-game='deadlock'] { --logo-hover: #3ddc84; }
body[data-game='cs2'] { --logo-hover: #de9b35; }
body[data-game='dota'] {
  --ink: #ebe4dc;
  --ink-2: #c9c3bc;
  --muted: #968d86;
  --line: #3a2f2c;
  --bg: #141011;
  --bg-soft: #1d1718;
  --surface-2: #2a2122;
  --edge-2: #4a3b39;
  --band: #181314;
  --bar: #0e0b0b;
  --navy: #141011;
  --red: #e0412e;
  --red-dark: #f05a45;
  --on-accent: #ffffff;
  --brand-dim: #e0412e;
  --placeholder: #776c68;
  --focus: #e0412e;
  --bar-fill: #e0412e;
  --tox: #2a2122;
  --hero-img: url('/img/themes/dota-bg.jpg');
  --hero-pos: center 35%;
  --hero-tint: linear-gradient(180deg, rgba(20,16,17,.62), rgba(20,16,17,.9));
  --logo-hover: #e0412e;
}
.logo, .logo span { transition: color .15s; }
.logo:hover, .logo:hover span, .logo:focus-visible, .logo:focus-visible span { color: var(--logo-hover); }

/* ---------- Supporters and the profile page (src/profile.js) ---------- */
.supporter-badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; background: linear-gradient(90deg, #ffd166, #ff9f43); color: #1a1406; font-size: 12.5px; font-weight: 800; letter-spacing: .2px; white-space: nowrap; }
.supporter-badge.small { margin-left: 6px; padding: 1px 7px; font-size: 11px; vertical-align: 1px; }
.player-name .riot-name { color: var(--name-color, inherit); }
.player-bio { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }
/* Banner: the game's art behind the top of a supporter's player page. */
.has-banner { position: relative; isolation: isolate; border-radius: 14px; padding: 24px; background-size: cover; background-position: center 30%; }
.has-banner::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(100deg, rgba(10, 12, 16, .94), rgba(10, 12, 16, .78) 60%, rgba(10, 12, 16, .55)); }
/* Doubled class so these beat any box's own background (e.g. .profile-preview). */
.banner-deadlock.banner-deadlock { background-image: url(/img/themes/deadlock-bg.jpg); }
.banner-cs2.banner-cs2 { background-image: url(/img/themes/cs2-bg.jpg); }
.banner-dota.banner-dota { background-image: url(/img/themes/dota-bg.jpg); }
.player-top.has-banner { padding: 28px; margin-bottom: 8px; border-bottom: 0; color: #ebedf0; }
.player-top.has-banner .muted, .player-top.has-banner .overall-sub { color: #b9bfc8; }

.profile-page h1 { font-size: 34px; margin: 0 0 20px; }
.profile-preview { display: flex; align-items: center; gap: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-soft); margin-bottom: 24px; }
.profile-preview.has-banner { border-color: transparent; }
.profile-name { margin: 0; font-size: 28px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.profile-preview.has-banner .profile-name:not([style]) { color: #fff; }
.donate-card, .profile-form { padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-soft); }
.donate-card h2 { margin: 0 0 8px; font-size: 22px; }
.perks { margin: 12px 0 20px; padding-left: 20px; line-height: 1.7; color: var(--ink-2); }
.perks b { color: var(--ink); }
.donate-card .btn { width: 100%; max-width: 340px; justify-content: center; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface-2); color: var(--ink); font-weight: 800; cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 3px var(--bg-soft), 0 0 0 5px var(--ink); }
.banner-picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.banner-pick { position: relative; isolation: isolate; height: 64px; border-radius: 10px; border: 2px solid var(--line); background-color: var(--surface-2); background-size: cover; background-position: center 30%; color: #fff; font-weight: 700; cursor: pointer; }
.banner-pick:not(.banner-deadlock):not(.banner-cs2):not(.banner-dota) { color: var(--ink); }
.banner-pick[class*='banner-']:is(.banner-deadlock, .banner-cs2, .banner-dota)::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 8px; background: rgba(0, 0, 0, .45); }
.banner-pick.on { border-color: var(--ink); }
.profile-form input[type='text'] { width: 100%; border: 1px solid var(--edge-2, #cfd3db); border-radius: 8px; padding: 12px 14px; font-size: 15.5px; background: var(--bg); color: var(--ink); margin-bottom: 16px; }
.profile-form .btn { margin-top: 4px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 24px; }
.profile-links a { color: var(--ink-2); }
@media (max-width: 640px) {
  .banner-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .player-top.has-banner { padding: 18px; }
  .profile-page h1 { font-size: 28px; }
}

/* ---------- Fonts and Giphy pictures (profile page) ---------- */
.player-name .riot-name { font-family: var(--name-font, inherit); }
.font-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
.font-pick { padding: 10px 8px; border-radius: 10px; border: 2px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 16px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.font-pick.on, .pic-pick.on { border-color: var(--ink); }
.pic-picks { display: flex; gap: 10px; margin-bottom: 20px; }
.pic-pick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 96px; height: 96px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer; }
.pic-pick img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.banner-picks { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.banner-pick.banner-giphy { background-size: cover; background-position: center; }
.has-banner[style*='background-image'] { background-size: cover; background-position: center; }
.gif-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
.gif-dialog[open] { display: flex; flex-direction: column; gap: 10px; }
.gif-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gif-head h2 { margin: 0; font-size: 20px; }
.gif-dialog input { width: 100%; border: 1px solid var(--edge-2, #cfd3db); border-radius: 8px; padding: 10px 12px; font-size: 15px; background: var(--bg); color: var(--ink); }
.gif-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; overflow-y: auto; min-height: 120px; max-height: 50vh; }
.gif-cell { padding: 0; border: 2px solid transparent; border-radius: 8px; background: var(--surface-2); cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.gif-cell:hover, .gif-cell:focus-visible { border-color: var(--red); }
.gif-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gif-status:empty { display: none; }
.gif-status { margin: 0; }
.gif-link { display: flex; gap: 8px; }
.gif-link .btn { flex: none; }
.gif-credit { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: 1px; color: var(--muted); text-align: right; }
.gif-credit a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.gif-credit a:hover, .gif-credit a:focus-visible { color: var(--ink); text-decoration: underline; }
.gif-credit .icon { width: 11px; height: 11px; }
@media (max-width: 640px) {
  .font-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .banner-picks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gif-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* A supporter's GIF on a rating. */
.review-gif { display: block; max-width: min(100%, 280px); max-height: 220px; border-radius: 10px; margin: 0 0 12px; }
.review-gif-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.review-gif-pick .review-gif { margin: 0; max-height: 140px; }
/* The profile preview is small, so its banner gets a lighter wash than a player page's. */
.profile-preview.has-banner::before { background: linear-gradient(100deg, rgba(10, 12, 16, .8), rgba(10, 12, 16, .45) 70%, rgba(10, 12, 16, .25)); }
.profile-preview.has-banner { background-position: center 35%; }

/* The site's home: the logo takes on each game's colour in turn. */
.brand-cycle { display: flex; justify-content: center; align-items: center; height: 1.15em; transition: opacity .18s ease, transform .18s ease; }
.brand-cycle.swap { opacity: 0; transform: translateY(6px) scale(.98); }
.brand-cycle .brand-b { transition: color .2s ease; }
/* (body prefix: beats the themes' ".hero-brand span" colour.) */
body .hero-brand.brand-cycle span.brand-a { color: inherit; }
body .hero-brand.brand-cycle[data-look] span.brand-b { color: var(--red); }
body .hero-brand.brand-cycle[data-look='deadlock'] span.brand-b { color: #3ddc84; }
body .hero-brand.brand-cycle[data-look='cs2'] span.brand-b { color: #de9b35; }
body .hero-brand.brand-cycle[data-look='dota'] span.brand-b { color: #e0412e; }
@media (prefers-reduced-motion: reduce) { .brand-cycle { transition: none; } }

/* Supporters in search results: banner behind the card, coloured/fonted name. */
.result-id .riot-name { color: var(--name-color, inherit); font-family: var(--name-font, inherit); }
.result-card.has-banner { border-style: solid; border-color: transparent; color: #ebedf0; }
.result-card.has-banner .muted, .result-card.has-banner .riot-tag { color: #c3c8cf; }
.result-card.has-banner:hover { border-color: rgba(255, 255, 255, .35); }

/* The colour-wheel swatch: a rainbow ring, filled with the picked colour. */
.swatch-wheel { position: relative; background: conic-gradient(#ff4655, #ffd166, #3ddc84, #4cc9f0, #b388ff, #ff7eb6, #ff4655) !important; }
.swatch-wheel::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--picked, var(--surface-2)); box-shadow: 0 0 0 2px var(--bg-soft); }
.swatches { position: relative; }
.wheel-input { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }

/* ---------- Customise profile: live preview ---------- */
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.profile-preview-col { position: sticky; top: 84px; }
.pv-heading { margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.pv-label { margin: 16px 0 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.pv-page { position: relative; isolation: isolate; padding: 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-soft); }
.pv-page.has-banner { border-color: transparent; color: #ebedf0; }
.pv-page.has-banner::before, .pv-result.has-banner::before { background: linear-gradient(100deg, rgba(10, 12, 16, .85), rgba(10, 12, 16, .55) 70%, rgba(10, 12, 16, .35)); }
.pv-score { display: flex; align-items: baseline; gap: 6px; }
.pv-score b { font-size: 48px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.pv-score span { font-size: 18px; color: var(--muted); font-weight: 700; }
.pv-sub { margin: 4px 0 14px; font-size: 13px; color: var(--muted); }
.pv-page.has-banner .pv-sub, .pv-page.has-banner .pv-code, .pv-page.has-banner .pv-score span { color: #b9bfc8; }
.pv-title { display: flex; align-items: center; gap: 14px; }
.pv-title .player-avatar { width: 64px; height: 64px; }
.pv-name { margin: 0; font-size: 28px; font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.pv-code { margin: 4px 0 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.pv-result { margin: 0; padding: 14px 18px; gap: 18px; pointer-events: none; }
.pv-result-name { font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.pv-review { margin: 0; padding: 14px 18px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); display: block; }
.pv-review .review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pv-review .review-text { margin: 8px 0 0; }
@media (max-width: 900px) {
  .profile-layout { grid-template-columns: minmax(0, 1fr); }
  /* Phones: the preview first, so you see it as you scroll down the options. */
  .profile-preview-col { position: static; order: -1; }
}

/* Supporters' coloured ring around their picture and border around their
   banner card (--ring/--edge set inline). Their glows are canvases drawn by
   app.js just outside the edge (.glow-canvas). */
.player-avatar[data-ring] { box-shadow: 0 0 0 4px var(--ring); }
.result-avatar[data-ring] { box-shadow: 0 0 0 3px var(--ring); }
[data-edge] { box-shadow: 0 0 0 3px var(--edge); }
.result-card[data-edge], .pv-result[data-edge] { border-color: transparent; }
.glow-wrap { position: relative; flex: none; display: inline-flex; border-radius: 50%; }
.glow-wrap > img { position: relative; z-index: 1; }
[data-edge-glow] { position: relative; }
.glow-canvas { position: absolute; z-index: 0; pointer-events: none; }

.try-it { margin: 20px 0 12px; padding: 12px 16px; border-radius: 10px; border: 1px dashed var(--line); color: var(--ink-2); font-size: 15px; }

/* Profile form: the see-through slider, and the small distribution box in the preview. */
.profile-form .range { display: block; width: 100%; margin: 4px 0 6px; accent-color: var(--red); }
.profile-form .field-note { margin: 0 0 18px; }
/* The preview shows Deadlock numbers, so its bars use Deadlock's green like the real page. */
.pv-dist { --bar-fill: #3ddc84; margin-top: 16px; padding: 16px 18px; }
.pv-dist h2 { font-size: 15px; margin-bottom: 12px; }
.pv-dist .dist-row { grid-template-columns: 80px 1fr 24px; gap: 10px; margin-bottom: 8px; }
.pv-dist .dist-label { font-size: 13px; }
.pv-dist .dist-bar { height: 18px; }
