:root {
  --bg: #07080e;
  --bg-2: #0d0f1a;
  --surface: #12152299;
  --surface-solid: #131624;
  --row: #10131f;
  --row-hover: #191d2e;
  --line: #ffffff12;
  --text: #eef0ff;
  --dim: #9aa0bd;
  --faint: #5d6380;
  --accent: #8b7bff;
  --accent-2: #4fd6e8;
  --gold: #f2c14e;
  --silver: #c9d1e3;
  --bronze: #d99566;
  --success: #4ad391;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 600px at 15% -10%, #2a1f6655, transparent 60%),
    radial-gradient(900px 500px at 100% 0%, #10405555, transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 28px;
  padding: 14px max(16px, calc((100vw - 1100px) / 2));
  background: #07080ecc;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.32em; font-size: 15px; }
.brand img { width: 30px; height: 30px; display: block; }
.nav nav { display: flex; gap: 6px; }
.nav nav a { padding: 7px 14px; border-radius: 10px; color: var(--dim); font-weight: 600; font-size: 14px; }
.nav nav a:hover { color: var(--text); background: #ffffff0a; }
.nav nav a.active { color: var(--text); background: #8b7bff33; }
.updated { margin-left: auto; color: var(--faint); font-size: 12px; }

main { width: 100%; max-width: 1100px; margin: 0 auto; padding: 28px 16px 40px; flex: 1; }

/* ---------------------------------------------------------------- rankings */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 22px; }
.hero h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.01em; }
.sub { margin: 6px 0 0; color: var(--dim); font-size: 15px; }
.hero-side { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; align-items: flex-end; }
.stat-label { color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.stat-value { font-size: 24px; font-weight: 800; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface-solid); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; height: 42px; min-width: 220px; }
.search:focus-within { border-color: #8b7bff99; }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--faint); stroke-width: 2; flex-shrink: 0; }
.search input { background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 14px; width: 100%; }

.notice { background: #f2c14e14; border: 1px solid #f2c14e44; color: var(--gold); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }

.table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.thead, .row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 110px 80px 90px 140px;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
}
.thead { height: 40px; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; background: var(--bg-2); }
.row { height: 58px; background: var(--row); border-top: 1px solid var(--line); cursor: pointer; transition: background 0.12s; }
.row:nth-child(even) { background: #0e111c; }
.row:hover, .row:focus-visible { background: var(--row-hover); outline: none; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank { font-weight: 800; color: var(--dim); font-size: 16px; }
.row[data-place="1"] .rank { color: var(--gold); }
.row[data-place="2"] .rank { color: var(--silver); }
.row[data-place="3"] .rank { color: var(--bronze); }
.player { display: flex; align-items: center; gap: 12px; min-width: 0; overflow: hidden; }
/* ranking rows: the full name on top, the badges in a small line under it */
.row:has(.tags) { height: auto; min-height: 58px; padding-top: 7px; padding-bottom: 7px; }
.who { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; flex: 1 1 auto; }
.who .name { max-width: 100%; }
.tags { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; max-width: 100%; }
.tags .badge { font-size: 9px; padding: 1px 6px; letter-spacing: 0.1em; border-radius: 4px; }
.row .tags .sup-pill.rank { margin: 0; padding: 0; border: 0; background: none; }
.row .tags .sup-pill.rank span { display: none; }
.row .tags .sup-pill.rank img, .row .tags .sup-pill.small img { width: 17px; height: 17px; }
.row .tags .sup-pill.rank img { padding: 1px; border-radius: 50%; background: #ff6fae40; box-shadow: 0 0 0 1px #ff6fae88; }
.avatar { width: 38px; height: 38px; border-radius: 8px; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: #3b2f6e; }
.avatar img, .card-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
[hidden] { display: none !important; }
.initial { font-weight: 800; color: #ffffffd9; }
.name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc { color: var(--dim); }
.lvl { color: var(--dim); }
.pp { font-weight: 800; font-size: 16px; }
.empty { color: var(--dim); text-align: center; padding: 40px 0; }

.badge {
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
  padding: 2px 7px; border-radius: 5px; color: #0c0a14;
  background: var(--accent); flex-shrink: 0;
}

/* developers: a slow rainbow, like in the game */
.dev .badge, .dev.badge { animation: rainbow-bg 8s linear infinite; }
.dev .name, .dev .card-name {
  background: linear-gradient(90deg, #ff9ad5, #b69bff, #7fd8ff, #8dffc4, #ffe08a, #ff9ad5);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: rainbow-text 8s linear infinite;
}
.row.dev { box-shadow: inset 3px 0 0 0 var(--accent); animation: rainbow-edge 8s linear infinite; }
.card.dev { animation: rainbow-border 8s linear infinite; border-width: 2px; }
@keyframes rainbow-bg { 0% { background: #ff9ad5; } 25% { background: #b69bff; } 50% { background: #7fd8ff; } 75% { background: #ffe08a; } 100% { background: #ff9ad5; } }
@keyframes rainbow-text { to { background-position: 300% 0; } }
@keyframes rainbow-edge { 0% { box-shadow: inset 3px 0 0 #ff9ad5; } 33% { box-shadow: inset 3px 0 0 #b69bff; } 66% { box-shadow: inset 3px 0 0 #7fd8ff; } 100% { box-shadow: inset 3px 0 0 #ff9ad5; } }
@keyframes rainbow-border { 0% { border-color: #ff9ad5; } 25% { border-color: #b69bff; } 50% { border-color: #7fd8ff; } 75% { border-color: #ffe08a; } 100% { border-color: #ff9ad5; } }

/* ---------------------------------------------------------------- player card */
.back { display: inline-block; color: var(--dim); font-weight: 600; margin-bottom: 18px; }
.back:hover { color: var(--text); }
.card {
  position: relative; overflow: hidden;
  display: flex; gap: 28px; align-items: center;
  padding: 26px; border-radius: 20px;
  background: linear-gradient(135deg, #151829, #0c0e18);
  border: 1px solid var(--line);
}
.card-rank { position: absolute; right: 22px; top: -10px; font-size: clamp(64px, 12vw, 140px); font-weight: 300; color: #ffffff14; pointer-events: none; }
.card-avatar { width: 150px; height: 150px; border-radius: 14px; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: #3b2f6e; font-size: 64px; }
.card-body { flex: 1; min-width: 0; position: relative; }
.card-name-row { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.card-name { margin: 0; font-size: clamp(30px, 5vw, 44px); font-weight: 600; overflow-wrap: anywhere; flex: 0 1 auto; min-width: min(100%, max-content); margin-right: 4px; }
.card-title { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 2px; }
.card-stats { display: flex; gap: 32px; margin: 16px 0 14px; flex-wrap: wrap; }
.card-stats div { display: flex; flex-direction: column; }
.card-stats dt { color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.card-stats dd { margin: 2px 0 0; font-size: 26px; font-weight: 800; }
.level { display: flex; align-items: center; gap: 12px; }
.c-lvl { font-weight: 800; font-size: 18px; min-width: 52px; }
.c-next { color: var(--faint); font-size: 12px; white-space: nowrap; }
.bar { flex: 1; height: 12px; border-radius: 6px; background: #120f08; border: 1px solid #ffffff1f; overflow: hidden; }
.fill { height: 100%; background: linear-gradient(90deg, #c9952b, #f2c14e); border-radius: 6px; }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px max(16px, calc((100vw - 1100px) / 2)); color: var(--faint); font-size: 12px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 720px) {
  .thead, .row { grid-template-columns: 44px minmax(0, 1fr) 72px 88px; padding: 0 12px; gap: 8px; }
  /* phones: name on top, badges in a wrapping line under it, so nothing runs into the numbers */
  .row { height: auto; min-height: 58px; padding-top: 8px; padding-bottom: 8px; }
  .player { gap: 10px; }
  .avatar { width: 34px; height: 34px; }
  .who .name { max-width: 100%; font-size: 14px; }
  .tags .badge { font-size: 8px; padding: 1px 5px; letter-spacing: 0.08em; }
  .acc { font-size: 13px; }
  .pp { font-size: 14px; }
  .pp-old-tag { font-size: 8px; letter-spacing: 0.04em; }
  .hide-sm { display: none; }
  .thead { font-size: 10px; letter-spacing: 0.06em; }
  .hero-side { width: 100%; justify-content: space-between; }
  .search { min-width: 0; flex: 1; }
  .card { flex-direction: column; align-items: flex-start; padding: 20px; }
  .card-avatar { width: 110px; height: 110px; font-size: 48px; }
  .updated { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dev .badge, .dev .name, .dev .card-name, .row.dev, .card.dev { animation: none; }
}

/* online status */
.avatar, .card-avatar { position: relative; overflow: visible; }
.avatar img, .card-avatar img { border-radius: inherit; }
.dot { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%; background: #6b6f80; border: 2px solid var(--bg-2); }
.card-avatar .dot { width: 22px; height: 22px; right: -6px; bottom: -6px; border-width: 4px; }
.dot.on { background: #3ddc84; box-shadow: 0 0 8px #3ddc8488; }
.online-count { color: #3ddc84; }
.card-status { color: var(--faint); font-size: 13px; font-weight: 600; margin-top: 4px; }
.card-status.on { color: #3ddc84; }

/* stat tiles, bio, friends-with-dev */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; display: flex; flex-direction: column; }
.tile span { color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.tile b { font-size: 22px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.bio { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
.bio h2 { margin: 0 0 6px; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.bio-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.rainbow-text { background: linear-gradient(90deg, #ff5d5d, #ffb347, #fff35c, #5dff8f, #5dc8ff, #b35dff, #ff5d5d); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: rainbow-slide 4s linear infinite; }
@keyframes rainbow-slide { to { background-position: 200% 0; } }
.devfriend { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; border: 1px solid #8b7bff66; background: var(--surface); font-weight: 700; animation: rainbow-border 8s linear infinite; }
.devfriend .heart { color: #ff6fae; }
.devfriend-sub { color: var(--faint); font-weight: 500; font-size: 13px; }

/* granted badges */
.role-mod .badge { background: #5ad98c; }
.role-tester .badge { background: #66b3ff; }
.role-vip .badge { background: #ffc74d; }
.role-creator .badge, .badge.role-creator { background: #ff2133; color: #fff; }
.badge.extra { margin-left: 6px; }
.badge.extra.role-mod { background: #5ad98c; } .badge.extra.role-tester { background: #66b3ff; } .badge.extra.role-vip { background: #ffc74d; }
.card.role-creator { border-color: #ff213380; }

/* content creators' socials */
.socials { margin-top: 18px; }
.social-links { display: flex; flex-wrap: wrap; gap: 10px; }
.social {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 10px; min-width: 180px;
  background: var(--surface); border: 1px solid #ff213355; color: var(--text); text-decoration: none;
}
.social:hover { border-color: #ff2133; }
.social-name { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #ff6b77; }
.social-handle { font-weight: 700; word-break: break-all; }
.plays { color: var(--dim); }

/* ================================================================ v1.2.1: home, downloads, account */
.nav nav { flex-wrap: wrap; }
.nav-account { border: 1px solid #8b7bff55; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-solid); color: var(--text); font: inherit; font-weight: 700; font-size: 15px;
  cursor: pointer; transition: transform .12s, background .12s, border-color .12s, box-shadow .12s; white-space: nowrap;
}
.btn:hover { background: #1c2034; border-color: #ffffff2a; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, #8b7bff, #6a5cf0); border-color: transparent; color: #fff; box-shadow: 0 6px 24px #7c6cff44; }
.btn.primary:hover { box-shadow: 0 8px 30px #7c6cff77; filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; }
.btn.disabled, .btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; filter: none; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ---------- home */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 24px 0 36px; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-2); background: #4fd6e814; border: 1px solid #4fd6e833; padding: 6px 12px; border-radius: 999px; }
.home-copy h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.04; margin: 18px 0 16px; font-weight: 800; letter-spacing: -0.02em; }
.grad { background: linear-gradient(90deg, #a99bff, #4fd6e8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--dim); font-size: 18px; line-height: 1.6; margin: 0 0 26px; max-width: 560px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.cta .btn { height: 50px; padding: 0 26px; font-size: 16px; }
.home-meta { color: var(--faint); font-size: 13px; margin-top: 16px; min-height: 1em; }
.home-art { position: relative; display: grid; place-items: center; min-height: 420px; }
.home-art .emblem { position: absolute; width: 150px; height: 150px; left: -4px; bottom: 6px; filter: drop-shadow(0 0 24px #7c6cff66); }

.emblem .e-fill { fill: #11141f; }
.emblem .e-outer { fill: none; stroke: #7c6cff; stroke-width: 2.4; stroke-linejoin: round; }
.emblem .e-mid { fill: none; stroke: #3fd8e6; stroke-width: 1.4; stroke-linejoin: round; }
.emblem .e-inner { fill: none; stroke: #eef0f877; stroke-width: .8; }
.emblem .e-tick { stroke: #3fd8e6; stroke-width: 1.7; }
.emblem .e-p { fill: #7c6cff; } .emblem .e-c { fill: #3fd8e6; }
.emblem g { transform-origin: 50px 50px; transform-box: view-box; }
.emblem .spin-a { animation: spin 40s linear infinite; }
.emblem .spin-b { animation: spin 28s linear infinite reverse; }
.emblem .spin-c { animation: spin 20s linear infinite; }
.emblem .e-note { animation: note-pop 1.5s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes note-pop { 0%, 70%, 100% { opacity: 1; } 35% { opacity: .55; } }

.playfield {
  position: relative; width: min(320px, 100%); height: 420px; border-radius: 18px; overflow: hidden;
  background: repeating-linear-gradient(0deg, #ffffff06 0 1px, transparent 1px 60px), #0b0d16;
  border: 1px solid #ffffff1a; box-shadow: 0 30px 80px #000a, inset 0 0 60px #7c6cff1a;
}
.pf-lanes { position: absolute; inset: 0 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pf-lane { position: relative; background: #ffffff05; border-left: 1px solid #ffffff0a; border-right: 1px solid #ffffff0a; }
.pf-note {
  position: absolute; left: 6px; right: 6px; height: 18px; top: -24px; border-radius: 6px;
  background: linear-gradient(180deg, #a99bff, #7c6cff); box-shadow: 0 0 14px #7c6cff99;
  animation: fall 3s linear infinite;
}
.pf-lane.inner .pf-note { background: linear-gradient(180deg, #8ff0fa, #3fd8e6); box-shadow: 0 0 14px #3fd8e699; }
.pf-receptor { position: absolute; left: 4px; right: 4px; bottom: 54px; height: 20px; border-radius: 7px; border: 2px solid #ffffff55; }
@keyframes fall { 0% { transform: translateY(0); opacity: 1; } 79.9% { transform: translateY(352px); opacity: 1; } 80%, 100% { transform: translateY(352px); opacity: 0; } }
.pf-judge { position: absolute; top: 46%; left: 0; right: 0; text-align: center; font-weight: 800; letter-spacing: .3em; color: #ffd866; text-shadow: 0 0 16px #ffd86699; animation: judge .75s ease-out infinite; }
.pf-combo { position: absolute; top: 34%; left: 0; right: 0; text-align: center; font-size: 42px; font-weight: 800; color: #ffffffe6; }
@keyframes judge { 0% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); opacity: .75; } }

.home-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 44px; }
.hstat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.hstat b { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.hstat span { color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

.section-title { font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin: 0 0 18px; letter-spacing: -0.01em; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.more { color: var(--accent); font-weight: 700; }
.features { margin-bottom: 48px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; transition: border-color .15s, transform .15s; }
.feature:hover { border-color: #8b7bff55; transform: translateY(-2px); }
.feature h3 { margin: 14px 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.55; }
.f-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #7c6cff33, #3fd8e622); border: 1px solid #8b7bff44; }
.f-icon svg, .dl-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.home-top { margin-bottom: 48px; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 22px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: transform .15s, border-color .15s; }
.pod:hover { transform: translateY(-3px); border-color: #ffffff30; }
.pod .avatar { width: 72px; height: 72px; border-radius: 16px; font-size: 28px; }
.pod-rank { font-weight: 800; font-size: 22px; color: var(--dim); }
.pod[data-place="1"] { border-color: #f2c14e55; } .pod[data-place="1"] .pod-rank { color: var(--gold); }
.pod[data-place="2"] .pod-rank { color: var(--silver); } .pod[data-place="3"] .pod-rank { color: var(--bronze); }
.pod-name { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.pod-name .badge.extra { margin-left: 0; }
.pod-pp { font-size: 22px; font-weight: 800; }
.pod-sub { color: var(--faint); font-size: 13px; }
.home-end { display: flex; align-items: center; gap: 24px; padding: 28px; border-radius: 22px; background: linear-gradient(135deg, #1a1640, #0f1a26); border: 1px solid #8b7bff44; margin-bottom: 12px; }
.home-end .emblem { width: 84px; height: 84px; flex-shrink: 0; }
.home-end h2 { margin: 0 0 4px; font-size: 26px; }
.home-end p { margin: 0; color: var(--dim); }
.home-end > div { flex: 1; }
.home-end .btn { height: 50px; padding: 0 26px; }

/* ---------- downloads */
.page-head { margin: 8px 0 24px; }
.page-head h1 { margin: 0; font-size: clamp(30px, 4vw, 42px); font-weight: 800; }
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dl { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.dl.suggested { border-color: #8b7bff88; box-shadow: 0 0 0 1px #8b7bff33, 0 20px 50px #7c6cff1f; }
.dl-head { display: flex; align-items: center; gap: 14px; }
.dl-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: #ffffff0a; border: 1px solid var(--line); flex-shrink: 0; }
.dl-icon svg { width: 28px; height: 28px; }
.dl-os { color: var(--faint); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.dl h3 { margin: 2px 0 0; font-size: 20px; }
.dl-desc { margin: 0; color: var(--dim); line-height: 1.55; flex: 1; }
.dl-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dl-size { color: var(--faint); font-size: 13px; }
.dl-alt { color: var(--accent); font-size: 13px; font-weight: 600; }
.dl-note { margin: 0; color: var(--faint); font-size: 12px; line-height: 1.5; }
.dl.soon .dl-icon svg { stroke: var(--gold); } .dl.soon h3 { color: var(--gold); }
.dl.unsupported { opacity: .8; } .dl.unsupported .dl-icon svg { stroke: var(--faint); } .dl.unsupported h3 { color: #ff7a8f; }
.release-notes { margin-top: 18px; padding: 20px 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.release-notes h2 { margin: 0 0 8px; font-size: 18px; }
.release-notes p { margin: 0 0 10px; color: var(--dim); line-height: 1.6; }

/* ---------- account */
.auth-wrap { display: grid; place-items: center; padding: 20px 0 40px; }
.auth-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 30px; border-radius: 22px; background: linear-gradient(160deg, #161a2c, #0d0f1a); border: 1px solid var(--line); box-shadow: 0 30px 80px #0008; }
.auth-card .emblem { width: 64px; height: 64px; align-self: center; }
.auth-card h1 { margin: 0; text-align: center; font-size: 28px; }
.auth-card .sub { text-align: center; margin: -6px 0 6px; }
.auth-links { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: var(--faint); text-align: center; }
.auth-links a { color: var(--accent); font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { color: var(--dim); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.field-hint { color: var(--faint); font-size: 12px; }
input[type=text], input[type=password], input[type=email], textarea {
  width: 100%; background: #0b0d16; border: 1px solid #ffffff1f; border-radius: 10px; color: var(--text);
  font: inherit; font-size: 15px; padding: 11px 13px; outline: none; transition: border-color .12s;
}
input:focus, textarea:focus { border-color: #8b7bffaa; }
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.form-msg { margin: 0; font-size: 14px; color: #ff7a8f; }
.form-msg.ok { color: var(--success); }
.form-msg:empty { display: none; }
.me-card { margin-bottom: 16px; }
.me-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel h2 { margin: 0; font-size: 18px; }
.panel-sub { margin: -6px 0 0; color: var(--faint); font-size: 13px; line-height: 1.5; }
.panel-actions { display: flex; justify-content: flex-end; }
.panels .notice { grid-column: 1 / -1; margin: 0; }
.creator-panel { border-color: #ff213355; } .creator-panel h2 { color: #ff6b77; }
.social-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pic-row { display: flex; align-items: center; gap: 16px; }
.pic-preview { width: 84px; height: 84px; border-radius: 16px; overflow: hidden; display: grid; place-items: center; background: #3b2f6e; font-size: 34px; flex-shrink: 0; }
.pic-preview img { width: 100%; height: 100%; object-fit: cover; }
.bio-preview-box { background: #0b0d16; border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; display: flex; flex-direction: column; gap: 4px; }
.inline-form { display: flex; align-items: flex-end; gap: 10px; }
.inline-form .field { flex: 1; }
.email-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px; background: #4ad3910f; border: 1px solid #4ad39133; }
.email-row .btn { margin-left: auto; height: 34px; padding: 0 12px; font-size: 13px; }
.email-ok { color: var(--success); font-weight: 800; }
.pw-grid { display: grid; gap: 10px; }

@media (max-width: 860px) {
  .home-hero { grid-template-columns: 1fr; }
  .home-art { min-height: 0; }
  .home-art .emblem { width: 110px; height: 110px; left: 0; bottom: 0; }
  .home-stats { grid-template-columns: repeat(2, 1fr); }
  .podium, .dl-grid, .panels { grid-template-columns: 1fr; }
  .home-end { flex-direction: column; text-align: center; }
}
@media (max-width: 520px) {
  .social-form { grid-template-columns: 1fr; }
  .inline-form { flex-direction: column; align-items: stretch; }
  .nav { gap: 10px; flex-wrap: wrap; }
  .nav nav a { padding: 6px 10px; }
  .playfield { height: 360px; }
}
@media (prefers-reduced-motion: reduce) {
  .emblem g, .emblem .e-note, .pf-note, .pf-judge { animation: none; }
  .pf-note { display: none; }
}

/* ---------- legal pages (privacy.html, terms.html) */
.legal { max-width: 780px; line-height: 1.7; color: #d6d9ea; }
.legal h1 { font-size: clamp(30px, 4vw, 42px); margin: 8px 0 4px; color: var(--text); }
.legal-date { color: var(--faint); margin: 0 0 24px; font-size: 14px; }
.legal h2 { font-size: 20px; margin: 32px 0 8px; color: var(--text); }
.legal h3 { font-size: 16px; margin: 18px 0 4px; color: var(--accent-2); }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal-summary { background: var(--surface); border: 1px solid #8b7bff44; border-radius: 14px; padding: 14px 18px; }
.legal-links { margin-top: 36px; color: var(--faint); }
.foot a:hover { color: var(--text); }

/* play in the browser */
.btn.play { background: linear-gradient(135deg, #2ec4d6, #3fd8e6); border-color: transparent; color: #071016; box-shadow: 0 6px 24px #3fd8e644; }
.btn.play:hover { filter: brightness(1.08); box-shadow: 0 8px 30px #3fd8e677; }
.dl.web { grid-column: 1 / -1; border-color: #3fd8e666; background: linear-gradient(135deg, #10202a99, #12152299); }
.dl.web .dl-icon svg { stroke: var(--accent-2); }

/* discord link code */
.link-code { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 10px; background: #5865f214; border: 1px solid #5865f255; }
.link-cmd { font-family: ui-monospace, Consolas, monospace; font-size: 18px; font-weight: 700; color: #c9cdfb; user-select: all; }

/* ---------------------------------------------------------------- 1.3.1: online status, supporters, following */
.dot.on.site { background: #66b3ff; box-shadow: 0 0 8px #66b3ff88; }
:root { --pink: #ff6fae; }
.sup-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; background: #ff6fae1f; border: 1px solid #ff6fae66; color: var(--pink); font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; flex-shrink: 0; }
.sup-pill img { width: 22px; height: 22px; }
.sup-pill.small { padding: 0; border: 0; background: none; margin-left: 6px; }
.sup-pill.small img { width: 22px; height: 22px; padding: 1px; border-radius: 50%; background: #ff6fae40; box-shadow: 0 0 0 1px #ff6fae88; }
.row.supporter { box-shadow: inset 4px 0 0 var(--pink); background: linear-gradient(90deg, #ff6fae14, transparent 40%), var(--row); }
.row.supporter:hover { background: linear-gradient(90deg, #ff6fae22, transparent 50%), var(--row-hover); }
.row.dev.supporter { box-shadow: inset 4px 0 0 var(--pink); animation: none; }
.card.supporter { border: 2px solid #ff6fae88; }
.card.has-banner::before { content: ""; position: absolute; inset: 0; background: var(--banner) center / cover no-repeat; opacity: 0.42; pointer-events: none; }
.card.has-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0c0e18dd, #0c0e1866); pointer-events: none; }
.card > * { position: relative; z-index: 1; }
.card > .card-rank { position: absolute; }
.fx-layer { position: absolute !important; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2 !important; }
.card-name span { white-space: pre-wrap; }

.social-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.fc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; flex: 1 1 420px; }
.fc-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.social-row .follow-count { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--dim); font: inherit; cursor: pointer; text-align: left; transition: border-color .15s, background .15s, transform .15s; }
.social-row .follow-count:hover { border-color: #8b7bff99; background: #8b7bff14; transform: translateY(-1px); }
.fc-icon { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: #8b7bff26; color: var(--accent); }
.fc-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fc-text { display: flex; flex-direction: column; min-width: 0; }
.fc-text b { color: var(--text); font-size: 20px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fc-text small { font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.follow-count { color: var(--dim); font-size: 14px; }
.follow-count b { color: var(--text); font-size: 18px; margin-right: 4px; }
.social-row .grow { flex: 1; }
.social-msg { color: #ff8080; font-size: 13px; }
.btn.gift { border-color: #ff6fae66; color: var(--pink); }
.btn.gift:hover { background: #ff6fae18; }

.sup-section { margin-top: 18px; padding: 18px; border-radius: 16px; border: 1px solid #ff6fae44; background: linear-gradient(135deg, #ff6fae12, transparent 60%); }
.sup-section h2 { margin: 0 0 4px; color: var(--pink); font-size: 18px; }
.tester-dl { margin: 0 0 22px; padding: 18px 20px; border-radius: 16px; border: 1px solid #5fb8ff55; background: linear-gradient(135deg, #5fb8ff14, transparent 60%), var(--surface); }
.tester-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tester-head h2 { margin: 0; font-size: 19px; }
.tester-tag { background: #5fb8ff; color: #06121f; }
.tester-notes { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: #ffffff08; color: var(--dim); font-size: 14px; }
.tester-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.sup-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.sup-title h2 { margin: 0; }
.sup-no { padding: 3px 10px; border-radius: 999px; border: 1px solid #ff6fae66; background: #ff6fae14; color: var(--pink); font-size: 12px; font-weight: 800; letter-spacing: 0.05em; font-variant-numeric: tabular-nums; }
.sup-pill.small.gifter img { background: #ffd36a33; box-shadow: 0 0 0 1px #ffd36a88; }
.sup-earned { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.sup-earned figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 84px; }
.sup-earned img { width: 64px; height: 64px; }
.sup-earned figcaption { color: var(--dim); font-size: 11px; font-weight: 700; text-align: center; }
.sup-earned.big figure { width: 110px; }
.sup-earned.big img { width: 92px; height: 92px; }

.nav-support { color: var(--pink) !important; }
.supporter-page { display: flex; flex-direction: column; gap: 18px; }
.thanks { padding: 14px 18px; border-radius: 14px; background: #4ad39118; border: 1px solid #4ad39155; color: var(--success); }
.sup-hero { display: flex; gap: 26px; align-items: center; padding: 26px; border-radius: 20px; background: radial-gradient(600px 300px at 0% 0%, #ff6fae26, transparent 70%), linear-gradient(135deg, #151829, #0c0e18); border: 1px solid #ff6fae44; }
.sup-hero h1 { margin: 0; font-size: clamp(30px, 5vw, 46px); }
.sup-hero-badge { width: 128px; height: 128px; flex-shrink: 0; filter: drop-shadow(0 8px 30px #4fd6e855); }
.sup-status { margin-top: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sup-status .dim, .gift-pick .dim { color: var(--dim); }
.sup-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 860px) { .sup-grid { grid-template-columns: 1fr; } .sup-hero { flex-direction: column; text-align: center; } }
.seg-row { display: flex; gap: 6px; margin: 12px 0; }
.seg { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--row); color: var(--dim); font: inherit; font-weight: 700; cursor: pointer; }
.seg.on { color: var(--text); border-color: var(--pink); background: #ff6fae1a; }
.gift-box { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.gift-box input { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--row); color: var(--text); font: inherit; }
.gift-chosen { display: flex; align-items: center; gap: 6px; }
.gift-chosen .link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.gift-list { display: flex; flex-direction: column; gap: 4px; }
.gift-pick { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--row); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.gift-pick:hover { border-color: var(--pink); }
.months-row { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.months-label { min-width: 92px; font-size: 18px; }
.months-slider { flex: 1; accent-color: var(--pink); }
.quick-months { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--row); color: var(--dim); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.chip.on { border-color: var(--pink); color: var(--text); background: #ff6fae1a; }
.price-box { display: flex; align-items: center; gap: 16px; margin: 14px 0; padding: 14px 18px; border-radius: 14px; background: var(--row); border: 1px solid var(--line); }
.price-total { font-size: 38px; font-weight: 800; }
.price-box div { display: flex; flex-direction: column; }
.price-each { color: var(--dim); font-size: 14px; }
.price-save { color: var(--faint); font-size: 13px; font-weight: 700; }
.price-save.on { color: var(--success); }
.btn.buy { background: linear-gradient(135deg, #ff6fae, #b66cff); box-shadow: 0 6px 24px #ff6fae44; }
.fine { color: var(--faint); font-size: 12px; margin-top: 12px; }
.center { text-align: center; }
.perks { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 12px; }
.perks li { display: flex; flex-direction: column; padding-left: 16px; border-left: 3px solid #ff6fae66; }
.perks li span { color: var(--dim); font-size: 14px; }
.wall-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.wall-item { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--row); border: 1px solid #ff6fae44; font-weight: 700; }
.wall-item:hover { border-color: var(--pink); }
.wall-item img { width: 26px; height: 26px; }
.name-preview-box { padding: 12px 14px; border-radius: 10px; background: var(--row); border: 1px solid var(--line); font-size: 22px; font-weight: 700; margin: 6px 0; }
.effect-preview { position: relative; height: 110px; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, #151829, #0c0e18); border: 1px solid var(--line); margin: 6px 0 14px; display: grid; place-items: center; color: var(--faint); font-size: 12px; }
.banner-preview { aspect-ratio: 3 / 1; border-radius: 12px; background: var(--row) center / cover no-repeat; border: 1px solid var(--line); margin: 6px 0; }
.btn.free-gift { margin-top: 8px; border-color: #ff6fae88; color: var(--pink); }
.btn.free-gift:hover { background: #ff6fae18; }
.modal-layer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: #04050acc; backdrop-filter: blur(6px); animation: fade-in 0.2s ease; }
.gift-modal { position: relative; overflow: hidden; width: min(440px, 100%); padding: 28px 24px 22px; border-radius: 20px; text-align: center; background: radial-gradient(400px 220px at 50% 0%, #ff6fae30, transparent 70%), linear-gradient(160deg, #181b2e, #0c0e18); border: 1px solid #ff6fae66; box-shadow: 0 20px 60px #000a; display: flex; flex-direction: column; gap: 10px; animation: pop-in 0.28s cubic-bezier(.2,1.3,.4,1); }
.gift-modal > * { position: relative; z-index: 1; }
.gift-modal h2 { margin: 0; font-size: 26px; color: var(--pink); }
.gift-art { width: 112px; height: 112px; margin: 0 auto; filter: drop-shadow(0 8px 26px #ff6fae55); animation: gift-bob 3s ease-in-out infinite; }
.gift-items { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.gift-items li { padding: 8px 12px; border-radius: 10px; background: #ffffff08; border: 1px solid var(--line); }
.gift-items .dim { color: var(--faint); }
.gift-banner { width: 100%; margin-bottom: 14px; padding: 12px 16px; border-radius: 14px; border: 1px solid #ff6fae88; background: #ff6fae18; color: var(--pink); font: inherit; font-weight: 800; cursor: pointer; }
.gift-banner:hover { background: #ff6fae28; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.9) translateY(10px); } }
@keyframes gift-bob { 50% { transform: translateY(-6px) rotate(3deg); } }

/* achievements on profiles */
.ach-section { margin-top: 18px; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.ach-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ach-head h2 { margin: 0; font-size: 18px; }
.ach-count { font-weight: 800; color: var(--gold); }
.ach-bar { flex: 1; min-width: 120px; }
.ach-bar .fill { background: linear-gradient(90deg, #f2c14e, #ff9a5a); }
.ach-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 12px; }
.ach-tab { display: inline-flex; gap: 8px; align-items: center; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--row); color: var(--dim); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ach-tab b { color: var(--faint); font-size: 12px; }
.ach-tab.on { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.ach-tab.on b { color: var(--c); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.ach-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--row); border: 1px solid var(--line); opacity: 0.5; }
.ach-card.got { opacity: 1; border-color: color-mix(in srgb, var(--c) 45%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--c) 12%, transparent), transparent 70%), var(--row); }
.ach-icon { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: #ffffff0d; }
.ach-card.got .ach-icon { background: var(--c); color: #0c0a14; }
.ach-text { display: flex; flex-direction: column; min-width: 0; }
.ach-text b { font-size: 14px; }
.ach-text span { color: var(--dim); font-size: 12px; }
.ach-text .ach-date { color: var(--c); font-weight: 700; margin-top: 3px; }

/* account page: header with your looks, sections in tabs */
.me-card { flex-wrap: wrap; padding: 20px 22px; gap: 22px; }
.me-card .card-avatar { width: 112px; height: 112px; }
.me-card .card-name { font-size: clamp(28px, 4vw, 38px); }
.me-card .me-actions { display: flex; flex-direction: column; gap: 8px; align-self: center; }
.acc-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.acc-nav { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 76px; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.acc-tab { text-align: left; padding: 10px 14px; border-radius: 10px; border: 0; background: none; color: var(--dim); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.acc-tab:hover { background: #ffffff0a; color: var(--text); }
.acc-tab.on { background: #8b7bff22; color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.acc-body { min-width: 0; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.sup-edit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.sup-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.name-row { display: flex; gap: 8px; align-items: stretch; }
.name-row .name-preview-box { flex: 1; margin: 0; font-size: 20px; padding: 8px 12px; }
.effect-preview { height: 84px; margin: 0; }
.panel-actions.left { justify-content: flex-start; }
.sup-col select { padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--row); color: var(--text); font: inherit; }
.sup-col .pic-preview { width: 72px; height: 72px; }
.gift-banner { margin-bottom: 14px; }
@media (max-width: 860px) {
  .acc-layout { grid-template-columns: 1fr; }
  .acc-nav { flex-direction: row; overflow-x: auto; position: static; }
  .acc-tab.on { box-shadow: inset 0 -3px 0 var(--accent); }
  .split, .sup-edit { grid-template-columns: 1fr; }
  .me-card .me-actions { flex-direction: row; }
}

/* supporters: a light pink ring around their picture, the full badge in the ranking */
.row.supporter .avatar { box-shadow: 0 0 0 2px #ffbde0; border-radius: 9px; }
.card.supporter .card-avatar { box-shadow: 0 0 0 4px #ffbde0, 0 0 22px #ff6fae55; }
.row .sup-pill.rank { margin-left: 8px; padding: 2px 8px 2px 3px; font-size: 10px; }
.row .sup-pill.rank img { width: 18px; height: 18px; }
@media (max-width: 640px) { .row .sup-pill.rank span { display: none; } }
.ach-more { margin: 12px auto 0; display: block; }
.row.pp-old .pp { color: var(--faint); }
.pp-old-tag { display: block; font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.role-charter .badge, .badge.role-charter { background: #8f5cff; color: #fff; }

/* ---------------------------------------------------------------- 1.4: help page */
.help-page { max-width: 820px; margin: 0 auto; }
.help-search { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--row); color: var(--text); font: inherit; margin-bottom: 18px; }
.help-group h2 { font-size: 16px; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; margin: 22px 0 8px; }
.help-item { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 8px; }
.help-item summary { cursor: pointer; padding: 12px 16px; font-weight: 700; list-style: none; position: relative; padding-right: 40px; }
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::after { content: "+"; position: absolute; right: 16px; top: 9px; font-size: 20px; color: var(--dim); }
.help-item[open] summary::after { content: "–"; }
.help-item p { margin: 0; padding: 0 16px 14px; color: var(--dim); line-height: 1.55; }

/* ---------------------------------------------------------------- 1.4: phones (smaller everything, menu button) */
.menu-btn { display: none; margin-left: auto; width: 42px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #ffffff08; padding: 9px; flex-direction: column; justify-content: space-between; cursor: pointer; }
.menu-btn span { display: block; height: 2px; border-radius: 2px; background: var(--text); }
@media (max-width: 760px) {
  .nav { gap: 10px; padding: 10px 14px; flex-wrap: wrap; }
  .brand { font-size: 13px; letter-spacing: 0.24em; }
  .brand img { width: 26px; height: 26px; }
  .menu-btn { display: flex; }
  .updated { display: none; }
  .nav nav { display: none; width: 100%; flex-direction: column; gap: 2px; padding: 6px 0 4px; }
  body.menu-open .nav nav { display: flex; }
  .nav nav a { padding: 11px 12px; font-size: 15px; }
  main { padding: 18px 12px 32px; }
  .hero h1, .page-head h1 { font-size: 26px; }
  .home-copy h1 { font-size: 34px; }
  .sub { font-size: 14px; }
  .card { padding: 16px; gap: 14px; flex-wrap: wrap; border-radius: 16px; }
  .card-avatar, .me-card .card-avatar { width: 84px; height: 84px; font-size: 36px; }
  .card-name, .me-card .card-name { font-size: 24px; flex-basis: 100%; }
  .card-name-row { flex-wrap: wrap; gap: 6px 8px; }
  .card-body { flex-basis: 100%; }
  .card-rank { font-size: 64px; top: -4px; }
  .card-stats { gap: 12px; }
  .card-stats dd { font-size: 18px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tile { padding: 10px 12px; }
  .tile b { font-size: 18px; }
  .row { height: auto; min-height: 52px; }
  .panel { padding: 16px; }
  .sup-hero { padding: 18px; gap: 14px; }
  .sup-hero-badge { width: 84px; height: 84px; }
  .price-total { font-size: 30px; }
  .ach-grid { grid-template-columns: 1fr; }
  .social-row { gap: 10px; }
  .btn { padding: 9px 14px; font-size: 14px; }
  .gift-modal { padding: 22px 16px 16px; }
}

/* ---------------------------------------------------------------- messages */
.nav-count { display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.dm-page { display: grid; grid-template-columns: 320px 1fr; gap: 16px; max-width: 1100px; margin: 24px auto; padding: 0 16px; height: calc(100vh - 170px); min-height: 460px; }
.dm-side { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.dm-side h1 { font-size: 22px; margin: 4px 6px 12px; }
.dm-list { overflow-y: auto; flex: 1; min-height: 0; }
.dm-row { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; }
.dm-row:hover { background: var(--row-hover); }
.dm-row.active { background: #8b7bff22; }
.dm-row-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dm-row-name { font-weight: 600; font-size: 14px; }
.dm-row-last { color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-row.unread .dm-row-last { color: var(--text); font-weight: 600; }
.dm-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.dm-when { color: var(--faint); font-size: 11px; }
.dm-count { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.dm-cap { color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 14px 8px 4px; }
.dm-none { color: var(--dim); font-size: 14px; padding: 12px 8px; line-height: 1.5; }
.dm-av { flex: none; width: 38px; height: 38px; border-radius: 9px; background: #3b2f73; display: grid; place-items: center; font-weight: 700; overflow: hidden; }
.dm-av img { width: 100%; height: 100%; object-fit: cover; }
.dm-pane { display: flex; flex-direction: column; min-height: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dm-empty { flex: 1; display: grid; place-items: center; color: var(--dim); }
.dm-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dm-head-name { font-weight: 700; font-size: 16px; }
.dm-head-name:hover { text-decoration: underline; }
.dm-back { display: none; font-size: 20px; padding: 0 6px; }
.dm-feed { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.dm-day { align-self: center; color: var(--faint); font-size: 11px; margin: 8px 0 2px; text-transform: uppercase; letter-spacing: .06em; }
.dm-msg { align-self: flex-start; max-width: 78%; background: #ffffff10; border-radius: 12px; padding: 8px 12px; }
.dm-msg.mine { align-self: flex-end; background: #8b7bff44; }
.dm-msg.pending { opacity: .6; }
.dm-msg.failed { border: 1px solid #ff6b81aa; }
.dm-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.4; }
.dm-time { display: block; text-align: right; color: var(--faint); font-size: 10px; margin-top: 2px; }
.dm-msg.failed .dm-time { color: #ff8a9b; }
.dm-send { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.dm-input { flex: 1; resize: none; background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; max-height: 160px; }
.dm-pane .form-msg { margin: 0 12px 10px; }
.dm-signin { max-width: 480px; margin: 60px auto; text-align: center; padding: 0 16px; }
@media (max-width: 760px) {
  .dm-page { grid-template-columns: 1fr; margin: 12px auto; height: calc(100vh - 130px); }
  .dm-page.dm-open .dm-side { display: none; }
  .dm-page:not(.dm-open) .dm-pane { display: none; }
  .dm-back { display: block; }
  .dm-msg { max-width: 88%; }
}

/* ---------------------------------------------------------------- public profile: tabs and people lists */
@media (max-width: 520px) {
  .fc-tiles { gap: 6px; flex-basis: 100%; }
  .social-row .follow-count { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; }
  .fc-icon { width: 28px; height: 28px; border-radius: 8px; }
  .fc-text b { font-size: 17px; }
  .fc-actions { width: 100%; }
  .fc-actions .btn { flex: 1; justify-content: center; }
}
.prof-tabs { display: flex; gap: 6px; margin: 22px 0 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; scroll-margin-top: 80px; }
.prof-tab { background: none; border: 0; color: var(--dim); font: inherit; font-weight: 700; font-size: 14px; padding: 10px 16px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.prof-tab:hover { color: var(--text); }
.prof-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.prof-overview > :first-child { margin-top: 0; }
.people { display: flex; flex-direction: column; gap: 8px; max-height: min(70vh, 720px); overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; scrollbar-width: thin; }
.people-count { position: sticky; top: 0; z-index: 1; background: var(--bg); padding: 4px 0 6px; }
.people-count { color: var(--faint); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 4px; }
.person { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.person:hover { border-color: #8b7bff55; }
.person-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.person-av { flex: none; width: 42px; height: 42px; border-radius: 10px; background: #3b2f73; display: grid; place-items: center; font-weight: 700; overflow: hidden; }
.person-av img { width: 100%; height: 100%; object-fit: cover; }
.person-text { display: flex; flex-direction: column; min-width: 0; }
.person-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-sub { color: var(--dim); font-size: 13px; }
.person-on { width: 9px; height: 9px; border-radius: 50%; background: var(--success); flex: none; }
.people-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.people-actions .btn { padding: 6px 12px; font-size: 13px; }
@media (max-width: 760px) {
  .person { flex-wrap: wrap; }
  .people-actions { width: 100%; justify-content: flex-end; }
  .prof-tab { padding: 8px 10px; }
}

/* narrow phones: tighter ranking columns so names and badges get the room */
@media (max-width: 480px) {
  .thead, .row { grid-template-columns: 30px minmax(0, 1fr) 54px 72px; gap: 6px; padding-left: 10px; padding-right: 10px; }
  .thead { letter-spacing: 0.02em; font-size: 9px; }
  .rank { font-size: 13px; }
  .avatar { width: 30px; height: 30px; border-radius: 7px; }
  .player { gap: 8px; }
  .acc { font-size: 12px; }
  .pp { font-size: 13px; }
}

/* ---------------------------------------------------------------- 1.4.2: update history */
.updates-page { max-width: 860px; margin: 0 auto; }
.updates-list { display: flex; flex-direction: column; gap: 14px; }
.update { position: relative; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 18px 22px; overflow: hidden; }
.update.latest { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent), 0 10px 40px -20px var(--accent); }
.update-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.update-head h2 { margin: 0; font-size: 20px; letter-spacing: 0.02em; }
.update-ver { color: var(--accent); }
.update-head time { display: block; color: var(--dim); font-size: 13px; margin-top: 2px; }
.update-pill { flex-shrink: 0; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.md { color: var(--text); line-height: 1.55; font-size: 14.5px; }
.md h3 { font-size: 18px; margin: 14px 0 6px; }
.md h4 { font-size: 15px; margin: 16px 0 6px; color: var(--accent); }
.md p { margin: 6px 0; color: var(--dim); }
.md ul { margin: 4px 0 8px; padding-left: 20px; color: var(--dim); }
.md li { margin: 3px 0; }
.md strong { color: var(--text); }
.md code { background: #ffffff10; border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; font-size: 13px; }
.md a { color: var(--accent-2); word-break: break-word; }
.update.folded .md { max-height: 420px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.update-more { margin-top: 10px; }
@media (max-width: 760px) {
  .update { padding: 14px 14px; border-radius: 14px; }
  .update-head h2 { font-size: 17px; }
  .md { font-size: 14px; }
}

/* ---------------------------------------------------------------- 1.4.6: the top bar */
.nav { gap: 22px; }
.nav-main { display: flex; align-items: center; gap: 4px; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav .updated { display: none; }
.nav-right a { padding: 7px 14px; border-radius: 10px; color: var(--dim); font-weight: 600; font-size: 14px; }
.nav-right a:hover { color: var(--text); background: #ffffff0a; }
.nav-right a.active { color: var(--text); background: #8b7bff33; }
.nav-right .nav-account { color: var(--text); background: linear-gradient(135deg, #8b7bff40, #4fd6e830); border: 1px solid #8b7bff66; }
.nav-more { position: relative; }
.nav-more-btn { font: inherit; font-weight: 600; font-size: 14px; color: var(--dim); background: none; border: 0; padding: 7px 14px; border-radius: 10px; cursor: pointer; }
.nav-more-btn:hover, .nav-more.open .nav-more-btn, .nav-more-btn.active { color: var(--text); background: #ffffff0a; }
.nav-more-btn span { font-size: 10px; opacity: 0.7; }
.nav-menu { display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 200px; padding: 6px; border-radius: 14px; background: #10121ef2; border: 1px solid var(--line); box-shadow: 0 18px 50px -12px #000c; flex-direction: column; gap: 2px; z-index: 20; }
.nav-more:hover .nav-menu, .nav-more:focus-within .nav-menu, .nav-more.open .nav-menu { display: flex; }
.nav-menu a { padding: 9px 12px !important; border-radius: 9px; }
@media (max-width: 760px) {
  .nav-main, .nav-right { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 2px; margin: 0; }
  body.menu-open .nav-main, body.menu-open .nav-right { display: flex; }
  .nav-more-btn { display: none; }
  .nav-menu { display: flex; position: static; box-shadow: none; border: 0; background: none; padding: 0; min-width: 0; }
  .nav-right a, .nav-menu a { padding: 11px 12px !important; font-size: 15px; }
}

/* ---------------------------------------------------------------- 1.4.6: the front page */
.h2-hero { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; padding: 56px 0 30px; }
.h2-glow { position: absolute; inset: -80px -10vw auto; height: 520px; z-index: -1; background: radial-gradient(600px 300px at 20% 30%, #8b7bff33, transparent 70%), radial-gradient(500px 280px at 80% 40%, #4fd6e826, transparent 70%), radial-gradient(400px 240px at 55% 80%, #ff5c8a1f, transparent 70%); filter: blur(10px); pointer-events: none; }
.h2-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: #ffffff0d; border: 1px solid var(--line); color: var(--dim); font-size: 13px; font-weight: 600; }
.h2-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green, #5cffb0); box-shadow: 0 0 10px var(--green, #5cffb0); }
.h2-copy h1 { font-size: clamp(38px, 5.4vw, 66px); line-height: 1.02; margin: 18px 0 16px; letter-spacing: -0.02em; }
.h2-copy .lead { font-size: 17px; color: var(--dim); line-height: 1.6; max-width: 560px; }
.h2-copy .cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.btn.big { padding: 13px 24px; font-size: 16px; border-radius: 14px; }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.h2-art { position: relative; display: flex; justify-content: center; }
.h2-frame { border-radius: 26px; padding: 14px; background: linear-gradient(160deg, #ffffff12, #ffffff03); border: 1px solid #ffffff1a; box-shadow: 0 40px 90px -30px #8b7bff66; transform: perspective(900px) rotateY(-8deg) rotateX(4deg); }
.h2-art > svg { position: absolute; right: 4%; bottom: -14px; opacity: 0.9; filter: drop-shadow(0 8px 24px #8b7bff88); }
.h2-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 10px 0 36px; }
.h2-live { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.h2-live b { font-size: 26px; letter-spacing: -0.01em; }
.h2-live span { color: var(--dim); font-size: 13px; }
.h2-live.on b { color: var(--green, #5cffb0); }
.h2-row { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 24px; margin-bottom: 40px; }
.h2-card { border-radius: 18px; background: var(--surface); border: 1px solid var(--line); padding: 18px 20px; }
.h2-news { max-height: 460px; overflow: hidden; position: relative; }
.h2-news .md { max-height: 330px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
.h2-news-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.h2-news-head b { font-size: 18px; color: var(--accent); }
.h2-news-head span { color: var(--dim); font-size: 13px; }
.h2-news .btn { margin-top: 12px; }
.h2-shelf { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.h2-shelf .ws-desc, .h2-shelf .ws-actions .btn:not(.primary) { display: none; }
.h2-features { margin-bottom: 40px; }
.h2-bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.h2-feature { border-radius: 18px; padding: 18px; background: linear-gradient(160deg, #ffffff0b, #ffffff03); border: 1px solid var(--line); transition: transform 0.15s, border-color 0.15s; }
.h2-feature:hover { transform: translateY(-2px); border-color: #8b7bff66; }
.h2-feature.big { grid-column: span 2; background: linear-gradient(140deg, #8b7bff1f, #4fd6e80d); }
.h2-feature h3 { margin: 12px 0 6px; font-size: 16px; }
.h2-feature p { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.5; }
.h2-end { display: flex; align-items: center; gap: 22px; padding: 28px; border-radius: 22px; margin: 40px 0 10px; background: linear-gradient(120deg, #8b7bff26, #4fd6e814 60%, #ff5c8a14); border: 1px solid #8b7bff40; }
.h2-end h2 { margin: 0 0 4px; }
.h2-end p { margin: 0; color: var(--dim); }
.h2-end .cta { margin-left: auto; }
@media (max-width: 900px) {
  .h2-hero { grid-template-columns: 1fr; padding-top: 28px; }
  .h2-art { display: none; }
  .h2-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h2-row { grid-template-columns: 1fr; }
  .h2-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h2-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h2-end { flex-direction: column; align-items: flex-start; }
  .h2-end .cta { margin-left: 0; }
}

/* ---------------------------------------------------------------- 1.4.6: the Workshop */
.ws-page { max-width: 1100px; margin: 0 auto; }
.ws-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 6px 0 10px; }
.ws-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-tab { font: inherit; font-weight: 700; font-size: 14px; color: var(--dim); background: #ffffff08; border: 1px solid var(--line); padding: 8px 16px; border-radius: 12px; cursor: pointer; }
.ws-tab.on { color: var(--text); background: #8b7bff33; border-color: #8b7bffaa; }
.ws-count { margin-left: 8px; font-size: 11px; padding: 1px 7px; border-radius: 9px; background: #ffffff14; }
.ws-tools { display: flex; gap: 8px; align-items: center; }
.ws-search { width: 260px; margin: 0 !important; }
.ws-sort { font: inherit; color: var(--text); background: var(--row); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.ws-status { color: var(--dim); font-size: 13px; margin: 4px 0 12px; }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.ws-card { border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform 0.15s, border-color 0.15s; }
.ws-card:hover { transform: translateY(-2px); border-color: #8b7bff66; }
.ws-pic { height: 140px; background: #12152a; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ws-pic img { width: 100%; height: 100%; object-fit: cover; }
.ws-pic.contain img { object-fit: contain; padding: 10px; }
.ws-type { color: #ffffff30; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; }
.ws-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.ws-kind { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.ws-body h3 { margin: 0; font-size: 15px; line-height: 1.3; }
.ws-by { color: var(--accent-2); font-size: 13px; font-weight: 600; }
.ws-desc { margin: 4px 0 0; color: var(--dim); font-size: 13px; line-height: 1.45; }
.ws-meta { margin-top: auto; padding-top: 8px; color: var(--faint); font-size: 12px; }
.ws-actions { display: flex; gap: 6px; margin-top: 8px; }
@media (max-width: 760px) { .ws-search { width: 100%; } .ws-tools { width: 100%; } }
.h2-frame .playfield { width: 320px; }
.h2-art .emblem { position: absolute; width: 120px; height: 120px; left: 2%; bottom: -10px; filter: drop-shadow(0 0 24px #7c6cff66); }
.h2-shelf > .empty, .ws-grid > .empty { grid-column: 1 / -1; text-align: left; }

/* ---------------------------------------------------------------- 1.4.6: the live playfield (real chart, autoplay) */
.live-pf { position: relative; width: 320px; height: 440px; border-radius: 18px; overflow: hidden;
  background: repeating-linear-gradient(0deg, #ffffff06 0 1px, transparent 1px 60px), #0b0d16; border: 1px solid #ffffff1a; box-shadow: inset 0 0 60px #7c6cff1a; }
.live-pf canvas { position: absolute; inset: 0; display: block; }
.live-tag { position: absolute; top: 10px; left: 12px; display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #ffffffb0; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #ff4d6d; box-shadow: 0 0 8px #ff4d6d; animation: live-blink 1.4s ease-in-out infinite; }
@keyframes live-blink { 50% { opacity: 0.35; } }
.live-song { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; flex-direction: column; font-size: 11px; color: #ffffff99; text-shadow: 0 1px 6px #000; pointer-events: none; }
.live-song b { color: #fff; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-sound { position: absolute; top: 30px; left: 10px; font: inherit; font-size: 11px; font-weight: 700; color: #fff; background: #00000080; border: 1px solid #ffffff2a; border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.live-sound:hover { background: #8b7bff66; }
@media (max-width: 900px) { .h2-art { display: flex; } .h2-frame { transform: none; } .h2-art .emblem { display: none; } }

.fc-discord { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 12px; border-radius: 10px; background: #5865f222; border: 1px solid #5865f266; font-size: 13px; }
.fc-discord span { color: #9aa4ff; font-weight: 700; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.live-sound { top: auto; left: auto; right: 10px; bottom: 12px; }
.live-song { right: 90px; }

/* ---------------------------------------------------------------- 1.4.6: Discord */
.dc-logo { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.fc-discord { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 7px 12px; border-radius: 12px; background: #5865f226; border: 1px solid #5865f277; color: #dfe2ff; font: inherit; font-size: 14px; cursor: pointer; }
.fc-discord:hover { background: #5865f244; }
.fc-discord .dc-copy { font-size: 11px; font-weight: 700; color: #aab2ff; text-transform: uppercase; letter-spacing: 0.06em; }
.dc-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.dc-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: #ffffff06; border: 1px solid var(--line); cursor: pointer; }
.dc-opt input { margin-top: 3px; width: 18px; height: 18px; accent-color: #5865f2; }
.dc-opt span { display: flex; flex-direction: column; gap: 2px; }
.dc-why { margin: 6px 0 14px; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, #5865f22a, #5865f20d); border: 1px solid #5865f266; }
.dc-why-head { display: flex; align-items: center; gap: 10px; }
.dc-perks { margin: 10px 0 0; padding-left: 20px; color: var(--dim); line-height: 1.6; font-size: 14px; }
.ws-profile { margin-top: 24px; }

/* ---------------------------------------------------------------- 1.5: the sidebar (replaces the top bar) */
:root { --side: 232px; }
body.has-side { padding-left: var(--side); }
.has-side .nav { display: none !important; }
.side { position: fixed; z-index: 30; left: 0; top: 0; bottom: 0; width: var(--side); display: flex; flex-direction: column; gap: 6px;
  padding: 18px 12px 14px; background: linear-gradient(180deg, #0b0d18f2, #07080ef2); border-right: 1px solid var(--line); backdrop-filter: blur(12px); overflow-y: auto; }
.side .brand { padding: 4px 10px 14px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; color: var(--dim); font-weight: 600; font-size: 14px; position: relative; }
.side-nav a svg, .side-me svg { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side-nav a:hover { color: var(--text); background: #ffffff0a; }
.side-nav a.active { color: var(--text); background: linear-gradient(90deg, #8b7bff38, #8b7bff12); }
.side-nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.side-nav a[hidden] { display: none; }
.side-nav .nav-support { color: var(--pink, #ff6fae) !important; }
.side-group { margin: 14px 12px 4px; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.side-nav .nav-count { margin-left: auto; }
.side-me { display: flex; align-items: center; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.side-me .nav-account { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; font-weight: 700; font-size: 14px;
  background: linear-gradient(135deg, #8b7bff33, #4fd6e822); border: 1px solid #8b7bff55; }
.side-me .nav-account:hover { border-color: var(--accent); }
.side-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #ffffff10; overflow: hidden; flex-shrink: 0; }
.side-av img { width: 100%; height: 100%; object-fit: cover; }
.side-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-me .nav-settings { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--dim); border: 1px solid var(--line); background: #ffffff06; flex-shrink: 0; }
.side-me .nav-settings:hover, .side-me .nav-settings.active { color: var(--text); border-color: #8b7bff77; }
.side-me .nav-settings[hidden] { display: none; }
.side .updated { display: block; margin: 8px 10px 0; color: var(--faint); font-size: 11px; }
.mtop { display: none; }
.side-scrim { display: none; }
.foot { padding-left: 24px; padding-right: 24px; }
main { max-width: 1160px; padding-left: 28px; padding-right: 28px; }
@media (max-width: 900px) {
  body.has-side { padding-left: 0; }
  .mtop { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: #07080ee6; backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .mtop .menu-btn { display: flex; margin-left: 0; }
  .side { transform: translateX(-100%); transition: transform 0.22s ease; width: min(280px, 82vw); box-shadow: 20px 0 60px -20px #000; }
  body.menu-open .side { transform: none; }
  body.menu-open .side-scrim { display: block; position: fixed; inset: 0; z-index: 29; background: #0008; }
  main { padding: 18px 14px 32px; }
}
/* checks beside names */
.check { display: inline-block; width: 1em; height: 1em; vertical-align: -0.12em; margin-left: 0.3em; flex-shrink: 0; background: center / contain no-repeat; }
.check.verified { background-image: url(verified.png); }
.check.official { background-image: url(official.png); }
/* 1.5: every Workshop card the same size (fixed picture, one-line title, two-line description, buttons at the bottom) */
.ws-card { height: 100%; min-height: 392px; }
.ws-card .ws-pic { height: 168px; flex-shrink: 0; }
.ws-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.ws-body h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-by { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.ws-actions { margin-top: 8px; }

/* 1.5: Open in OCTIVE */
.ws-open { border-color: #8b7bff77; }
.open-hint { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  max-width: min(640px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 14px; background: #141729f2; border: 1px solid #8b7bff66; box-shadow: 0 18px 50px -12px #000c; font-size: 14px; color: var(--dim); }
.open-hint b { color: var(--text); }
.open-hint a { color: var(--accent-2); font-weight: 700; }
.open-page { text-align: center; padding: 60px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.open-page h1 { margin: 10px 0 0; font-size: 32px; }
.open-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }

/* 1.5: any number of supporter months */
.months-custom-wrap { display: flex; align-items: center; gap: 6px; color: var(--dim); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.months-custom { width: 78px; font: inherit; font-size: 15px; font-weight: 700; color: var(--text); background: var(--row); border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; text-transform: none; letter-spacing: 0; }
.months-custom:focus { outline: none; border-color: var(--accent); }
/* 1.5.1: Message (the official account) */
.fc-actions .btn.msg { border-color: #8b7bff77; }

/* 1.5.2: Workshop badges, filters and item pages */
.ws-pic { position: relative; cursor: pointer; }
.ws-verified { position: absolute; left: 10px; top: 10px; padding: 3px 8px; border-radius: 6px; background: #3380ffee; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 0.08em; }
.ws-verified.inline { position: static; display: inline-block; margin-left: 12px; vertical-align: middle; font-size: 11px; }
.ws-custom { position: absolute; right: 10px; top: 10px; padding: 3px 7px; border-radius: 6px; background: #1a9966e6; color: #fff; font-size: 9px; font-weight: 800; letter-spacing: 0.06em; }
.ws-custom-filter { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-size: 13px; font-weight: 600; }
.ws-body h3 a { color: inherit; }
.ws-body h3 a:hover { color: var(--accent); }
.ws-item { margin-top: 10px; }
.ws-item-top { display: flex; gap: 22px; flex-wrap: wrap; }
.ws-item-pic { width: 360px; max-width: 100%; height: 200px; border-radius: 16px; overflow: hidden; background: #12152a; flex-shrink: 0; }
.ws-item-pic img { width: 100%; height: 100%; object-fit: cover; }
.ws-item-pic.contain img { object-fit: contain; padding: 12px; }
.ws-item-head { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 4px; }
.ws-item-head h1 { margin: 2px 0 0; font-size: 30px; }
.ws-item-desc { margin: 18px 0 6px; color: var(--dim); white-space: pre-wrap; line-height: 1.5; }
.ws-diffs { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.ws-song { display: flex; gap: 12px; align-items: baseline; margin: 10px 0 4px; flex-wrap: wrap; }
.ws-diff { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; background: #ffffff08; }
.ws-diff-bar { width: 4px; height: 18px; border-radius: 2px; flex-shrink: 0; }
.ws-diff-keys { width: 30px; color: var(--dim); font-weight: 700; font-size: 13px; }
.ws-diff-name { flex: 1; font-weight: 600; }
.ws-diff-stars { white-space: nowrap; }

/* Workshop filters (the same as the game's) */
.ws-filter-btn { white-space: nowrap; }
.ws-filters { background: rgba(8, 9, 14, 0.85); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 12px 16px; margin: 4px 0 12px; }
.ws-fline { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.ws-fcap { width: 96px; flex-shrink: 0; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dim, #8a90a8); padding-top: 7px; }
.ws-fkids { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ws-chip { background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); color: var(--dim, #8a90a8); border-radius: 10px; padding: 5px 11px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ws-chip.on { background: rgba(139, 123, 255, 0.25); border-color: rgba(139, 123, 255, 0.7); color: #fff; }
.ws-ftext { background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; color: inherit; font: inherit; padding: 6px 10px; width: 220px; }
.ws-ftext.short { width: 96px; }
.ws-to { color: var(--dim, #8a90a8); font-size: 12px; }
.ws-fend { display: flex; justify-content: flex-end; }
.ws-stars { position: absolute; left: 8px; bottom: 8px; color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 7px; }
.ws-facts { margin: 4px 0 0; font-size: 13px; color: var(--dim, #8a90a8); }
.ws-facts b { color: var(--accent, #8b7bff); }
.ws-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.ws-tag { font-size: 10px; font-weight: 700; color: #36e0c8; background: rgba(54, 224, 200, 0.12); border-radius: 6px; padding: 2px 6px; }
@media (max-width: 640px) { .ws-fline { flex-direction: column; gap: 4px; } .ws-fcap { width: auto; padding-top: 0; } .ws-ftext { width: 100%; } }

/* the points shop's title under a name, and the profile showcase */
.shop-title { color: #ff8fc8; font-style: italic; font-weight: 800; font-size: 15px; margin-top: 2px; }
.showcase { margin-top: 16px; background: var(--surface); border: 1px solid #f2c14e40; border-radius: 14px; padding: 14px 18px; }
.showcase h2 { margin: 0 0 10px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.sc-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .sc-row { grid-template-columns: 1fr; } }
.sc-card { border-radius: 12px; overflow: hidden; background: #ffffff0a; border: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; transition: border-color 0.15s, transform 0.15s; }
.sc-card:hover, .sc-card:focus-visible { border-color: var(--accent); transform: translateY(-2px); outline: none; }
.sc-pic { position: relative; height: 90px; background: #141826 center / cover no-repeat; }
.sc-grade { position: absolute; left: 10px; bottom: 4px; font-size: 24px; font-weight: 900; color: var(--gold); text-shadow: 0 2px 6px #000c; }
.sc-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sc-title { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-diff { color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-stats { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; margin-top: 4px; }
.sc-pr { color: var(--accent); font-weight: 800; }
.sc-mods { color: var(--gold); font-size: 11px; font-weight: 800; }
.sc-view { align-self: flex-start; margin-top: 8px; padding: 5px 12px; border-radius: 8px; background: #ffffff12; border: 1px solid var(--line); color: var(--text); font-size: 12px; font-weight: 700; text-decoration: none; }
.sc-view:hover { border-color: var(--accent); }
.sc-empty { min-height: 160px; border-radius: 12px; display: grid; place-items: center; color: var(--faint); background: #ffffff05; border: 1px solid var(--line); font-weight: 700; }
.scd-modal { width: min(720px, 100%); max-height: 92vh; overflow: auto; padding: 0 0 18px; border-radius: 20px; background: linear-gradient(160deg, #181b2e, #0c0e18); border: 1px solid #ffffff1f; box-shadow: 0 20px 60px #000a; animation: pop-in 0.28s cubic-bezier(.2,1.3,.4,1); }
.scd-banner { position: relative; height: 170px; background: #141826 center / cover no-repeat; border-radius: 20px 20px 0 0; }
.scd-shade { position: absolute; inset: auto 0 0 0; height: 100px; background: linear-gradient(transparent, #06070dee); }
.scd-cap { position: absolute; left: 20px; right: 20px; bottom: 12px; }
.scd-cap h2 { margin: 0; font-size: 24px; }
.scd-cap p { margin: 2px 0 0; color: var(--dim); font-size: 13px; }
.scd-grade { position: absolute; right: 22px; top: 10px; font-size: 54px; font-weight: 900; color: var(--gold); text-shadow: 0 3px 10px #000c; }
.scd-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; padding: 14px 18px 0; }
.scd-tile { padding: 10px 14px; border-radius: 12px; background: #ffffff0a; border: 1px solid var(--line); display: flex; flex-direction: column; }
.scd-tile span { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.scd-tile b { font-size: 20px; }
.scd-tile.pr b { color: var(--accent); }
.scd-tile.fc b { color: var(--success); }
.scd-judg { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 10px 18px 0; }
@media (max-width: 640px) { .scd-judg { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.scd-judg div { text-align: center; padding: 6px 4px; border-radius: 10px; background: color-mix(in srgb, var(--j) 14%, transparent); border: 1px solid color-mix(in srgb, var(--j) 40%, transparent); }
.scd-judg span { display: block; font-size: 9px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--j); }
.scd-judg b { font-size: 16px; }
.scd-mods { padding: 12px 18px 0; margin: 0; font-weight: 700; color: var(--gold); }
.scd-mods span { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-right: 8px; }
.scd-when { padding: 4px 18px 0; margin: 0; color: var(--dim); font-size: 12px; }
.scd-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px 0; }

/* leaderboard icons from the points shop: a shape before the name, white or in the player's icon colour */
.lb-icon { display: inline-flex; width: 1em; height: 1em; margin-right: .38em; vertical-align: -0.14em; flex: none; color: #fff; }
.lb-icon svg { width: 100%; height: 100%; display: block; overflow: visible; }
.lb-icon.rainbow { animation: lb-rainbow 5s linear infinite; }
@keyframes lb-rainbow {
  0%, 100% { color: #ff5c8a; } 17% { color: #ffb04d; } 33% { color: #ffe95c; }
  50% { color: #5cff9d; } 67% { color: #5cc8ff; } 83% { color: #b47cff; }
}
@media (prefers-reduced-motion: reduce) { .lb-icon.rainbow { animation: none; color: #ff5c8a; } }
