:root {
  --bg: #04071a;
  --bg-2: #0a1236;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.075);
  --panel-3: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef2ff;
  --muted: #98a3c7;
  --faint: #66708f;
  --accent: #3e6bff;
  --accent-2: #5cc8ff;
  --accent-ink: #ffffff;
  --good: #34d27b;
  --play: #4aa8ff;
  --warn: #ffb547;
  --danger: #ff5a6e;
  --bronze: #d38c56;
  --silver: #c6cfdc;
  --gold: #f4c64e;
  --platinum: #b9dcff;
  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(1200px 700px at 78% -10%, rgba(40, 84, 220, 0.35), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(30, 60, 170, 0.18), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
a.link, .link { color: var(--accent-2); cursor: pointer; }
a.link:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; font-weight: 300; }
h2 { font-size: 20px; }
h3 { font-size: 15px; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.hidden { display: none !important; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.fill { fill: currentColor; stroke: none; }

/* ------------------------------------------------------------- top bar */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  height: 64px; padding: 0 clamp(16px, 3vw, 32px);
  background: rgba(4, 7, 26, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: 0.32em; font-size: 14px; white-space: nowrap; }
.brand .mark { width: 30px; height: 30px; }
.brand small { letter-spacing: 0.12em; font-weight: 400; color: var(--muted); }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  color: var(--muted); font-weight: 500; font-size: 14px; position: relative;
}
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: var(--text); background: var(--panel-2); }
.search { flex: 1; max-width: 340px; margin-left: auto; position: relative; }
.search input {
  width: 100%; height: 38px; padding: 0 14px 0 38px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); outline: none;
}
.search input:focus { border-color: rgba(92, 200, 255, 0.5); background: var(--panel-2); }
.search svg { position: absolute; left: 12px; top: 9px; width: 18px; height: 18px; color: var(--muted); }
.search .results { position: absolute; top: 46px; left: 0; right: 0; }
.top-right { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: transparent; border: 0; cursor: pointer; color: var(--muted);
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.badge {
  position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.nav .badge { position: static; margin-left: 2px; }

/* ------------------------------------------------------------- layout */
main { padding: 28px clamp(16px, 3vw, 32px) 80px; max-width: 1240px; margin: 0 auto; }
.grid-home { display: grid; grid-template-columns: 280px minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack > * { min-width: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.sticky { position: sticky; top: 88px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px;
}
.card.flush { padding: 0; overflow: hidden; }
.card h2 { margin-bottom: 12px; }
.card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-title h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; }
.sep { height: 1px; background: var(--line); margin: 14px 0; }
.empty { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty svg { width: 34px; height: 34px; margin: 0 auto 10px; opacity: 0.6; }

/* ------------------------------------------------------------- buttons + fields */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:hover { background: var(--panel-3); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible, .icon-btn:focus-visible, .nav a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.btn.primary { background: #fff; color: #0a1030; }
.btn.primary:hover { box-shadow: 0 0 0 4px rgba(150, 185, 255, 0.25); background: #fff; }
.btn.accent { background: var(--accent); color: #fff; }
.btn.accent:hover { background: #557dff; }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { background: var(--panel); }
.btn.danger { background: rgba(255, 90, 110, 0.14); color: #ff8b98; }
.btn.danger:hover { background: rgba(255, 90, 110, 0.24); }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn.steam { background: #171d2b; border-color: rgba(255,255,255,0.14); }
.btn.steam:hover { background: #222a3d; }
.btn.google { background: #fff; color: #1f1f1f; }
.btn.google:hover { background: #f1f3f6; }
.btn.discord { background: #5865f2; color: #fff; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.input, textarea.input, select.input {
  width: 100%; min-height: 42px; padding: 10px 14px; border-radius: var(--r-sm);
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); outline: none; resize: vertical;
}
.input:focus { border-color: rgba(92, 200, 255, 0.55); box-shadow: 0 0 0 3px rgba(92, 200, 255, 0.12); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select.input option { background: #101634; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.err { color: #ff8b98; font-size: 13px; min-height: 0; }
.ok-msg { color: var(--good); font-size: 13px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); }
.seg button { border: 0; background: none; height: 32px; padding: 0 14px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 500; font-size: 13px; }
.seg button.on { background: var(--panel-3); color: var(--text); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--panel-3); transition: background 0.2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }

/* ------------------------------------------------------------- avatar + presence */
.av { position: relative; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; overflow: visible; }
.av > .face { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: center; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av .dot { position: absolute; right: 2%; bottom: 2%; width: 26%; height: 26%; min-width: 9px; min-height: 9px; border-radius: 50%; border: 2px solid var(--bg); background: var(--faint); }
.av .dot.online { background: var(--good); }
.av .dot.playing { background: var(--play); }
.av .dot.away { background: var(--warn); }
.presence { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.presence::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.presence.online::before { background: var(--good); }
.presence.playing { color: #9fd1ff; }
.presence.playing::before { background: var(--play); }
.presence.away::before { background: var(--warn); }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who .names { min-width: 0; }
.who .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .handle { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------- landing */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; min-height: calc(100vh - 220px); padding: 30px 0 40px; }
.hero .kicker { color: var(--accent-2); font-weight: 600; letter-spacing: 0.18em; font-size: 12px; text-transform: uppercase; margin-bottom: 14px; }
.hero p.lead { font-size: 18px; color: var(--muted); margin: 18px 0 28px; max-width: 520px; }
.ring-wrap { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; margin: 0 auto; }
.ring-wrap canvas { width: 100%; height: 100%; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }
.feature { padding: 22px; }
.feature .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(62, 107, 255, 0.16); color: #9db6ff; margin-bottom: 14px; }
.feature h3 { margin-bottom: 6px; font-size: 16px; }
.feature p { color: var(--muted); font-size: 14px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 46px 0 16px; }

/* ------------------------------------------------------------- auth */
.auth { max-width: 440px; margin: 4vh auto 0; }
.auth .card { padding: 30px; border-radius: 22px; background: rgba(12, 18, 50, 0.7); box-shadow: var(--shadow); }
.auth h1 { font-size: 28px; font-weight: 400; margin-bottom: 6px; }
.auth .sub { color: var(--muted); margin-bottom: 22px; }
.auth .providers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.auth .foot { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------- feed */
.composer textarea { border: 0; background: transparent; padding: 4px 0; min-height: 56px; box-shadow: none; }
.composer textarea:focus { box-shadow: none; }
.composer .thumb { position: relative; margin-top: 10px; max-width: 220px; }
.composer .thumb img { border-radius: 10px; }
.composer .thumb button { position: absolute; top: 6px; right: 6px; }
.post { padding: 18px; }
.post .head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post .head .when { margin-left: auto; color: var(--faint); font-size: 13px; white-space: nowrap; }
.post .body { white-space: pre-wrap; word-wrap: break-word; }
.post .pic { margin-top: 12px; border-radius: 12px; overflow: hidden; background: #000; }
.post .pic img { width: 100%; max-height: 560px; object-fit: contain; }
.post .actions { display: flex; gap: 6px; margin-top: 12px; }
.post .actions .btn { height: 34px; padding: 0 12px; background: transparent; color: var(--muted); font-weight: 500; }
.post .actions .btn:hover { background: var(--panel-2); color: var(--text); }
.post .actions .btn.liked { color: #ff7d93; }
.post .actions .btn.liked svg { fill: currentColor; }
.activity { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: linear-gradient(110deg, rgba(62, 107, 255, 0.2), rgba(62, 107, 255, 0.04)); border: 1px solid rgba(110, 150, 255, 0.18); }
.activity .art { width: 120px; aspect-ratio: 460 / 215; border-radius: 8px; overflow: hidden; background: #0c1430; flex: none; }
.activity .art img { width: 100%; height: 100%; object-fit: cover; }
.activity .what { font-size: 13px; color: var(--muted); }
.activity .game { font-size: 17px; font-weight: 600; }
.comments { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.comment { display: flex; gap: 10px; align-items: flex-start; }
.comment .bubble { background: var(--panel-2); border-radius: 14px; padding: 8px 12px; min-width: 0; }
.comment .bubble b { font-weight: 600; font-size: 13px; margin-right: 6px; }
.comment .bubble span { white-space: pre-wrap; word-wrap: break-word; }
.comment .x { margin-left: auto; opacity: 0.4; }
.comment:hover .x { opacity: 1; }

/* ------------------------------------------------------------- lists */
.list { display: flex; flex-direction: column; gap: 4px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; }
a.list-item:hover, .list-item.hover:hover { background: var(--panel-2); }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------- profile */
.banner { height: clamp(150px, 24vw, 260px); border-radius: 22px; background: linear-gradient(120deg, #1a2f86, #0b1440 60%, #2a1a6e); background-size: cover; background-position: center; position: relative; overflow: hidden; }
.banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(4, 7, 26, 0.75)); }
.pf-head { display: flex; gap: 22px; align-items: flex-end; margin: -64px 0 0 28px; position: relative; z-index: 2; flex-wrap: wrap; }
.pf-head .av { border: 5px solid var(--bg); }
.pf-head .meta { flex: 1; min-width: 220px; padding-bottom: 8px; }
.pf-head .meta h1 { font-size: 30px; font-weight: 500; }
.pf-head .acts { display: flex; gap: 8px; padding: 0 28px 10px 0; flex-wrap: wrap; }
.pf-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; margin-top: 26px; align-items: start; }
.level { display: flex; align-items: center; gap: 14px; }
.level .lv { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-weight: 700;
  background: conic-gradient(var(--accent-2) calc(var(--p) * 1turn), rgba(255,255,255,0.08) 0); position: relative; }
.level .lv::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: #0b1238; }
.level .lv span { position: relative; }
.tcount { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.tcount div { text-align: center; padding: 10px 4px; border-radius: 10px; background: var(--panel); }
.tcount b { display: block; font-size: 18px; }
.tcount small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.tro { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--panel-2); font-size: 13px; color: var(--text); }
.chip small { color: var(--muted); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 12px 14px; color: var(--muted); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: #fff; }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.game { border-radius: 12px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.game .cover { aspect-ratio: 460 / 215; background: linear-gradient(135deg, #1b2a6e, #0b1030); display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; padding: 0; }
.game .cover img { width: 100%; height: 100%; object-fit: cover; }
.game .info { padding: 10px 12px; }
.game .info b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trophy-game { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px; }
.trophy-game .cover { aspect-ratio: 460 / 215; border-radius: 8px; overflow: hidden; background: #0c1430; }
.trophy-game .cover img { width: 100%; height: 100%; object-fit: cover; }
.bar { height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 3px; }
.ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; padding: 4px 12px 14px; }
.ach > div { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; background: rgba(0,0,0,0.2); }
.ach img { width: 40px; height: 40px; border-radius: 6px; }
.ach .locked { opacity: 0.45; }

/* ------------------------------------------------------------- themes */
.themes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.theme-card { border-radius: var(--r); overflow: hidden; background: var(--panel); border: 1px solid var(--line); transition: transform 0.15s, border-color 0.15s; display: block; }
.theme-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.22); }
.theme-card .pv { aspect-ratio: 16 / 9; background: #0b1238; }
.theme-card .pv img { width: 100%; height: 100%; object-fit: cover; }
.theme-card .meta { padding: 12px 14px; }
.theme-card .meta b { display: block; }
.theme-hero { border-radius: 22px; overflow: hidden; aspect-ratio: 16 / 9; background: #0b1238; box-shadow: var(--shadow); }
.theme-hero img { width: 100%; height: 100%; object-fit: cover; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 14px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; border: 1px solid rgba(255,255,255,0.25); }

/* ------------------------------------------------------------- link console */
.link-page { max-width: 560px; margin: 4vh auto 0; text-align: center; }
.code-in { display: flex; gap: 10px; justify-content: center; margin: 26px 0 10px; }
.code-in input { width: 100%; max-width: 330px; height: 64px; text-align: center; font-size: 30px; letter-spacing: 0.22em; font-weight: 600; text-transform: uppercase; border-radius: 14px; }
.device { display: flex; gap: 16px; text-align: left; align-items: center; padding: 18px; margin: 22px 0; }
.device .ic { width: 54px; height: 54px; border-radius: 14px; background: rgba(62, 107, 255, 0.18); display: grid; place-items: center; color: #a9bfff; }
.big-check { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 20px; display: grid; place-items: center; background: rgba(52, 210, 123, 0.16); color: var(--good); }
.big-check svg { width: 42px; height: 42px; stroke-width: 2.4; }

/* ------------------------------------------------------------- settings */
.set-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.set-nav { display: flex; flex-direction: column; gap: 2px; }
.set-nav a { padding: 10px 14px; border-radius: 10px; color: var(--muted); font-weight: 500; display: flex; gap: 10px; align-items: center; }
.set-nav a.on, .set-nav a:hover { background: var(--panel-2); color: var(--text); }
.set-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.set-row:first-of-type { border-top: 0; }
.set-row .grow { flex: 1; min-width: 0; }
.set-row .grow .sub { font-size: 13px; color: var(--muted); }
.prov-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); flex: none; }
.upload-av { position: relative; cursor: pointer; }
.upload-av::after { content: 'Change'; position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,0.5); opacity: 0; font-size: 12px; font-weight: 600; transition: opacity 0.15s; }
.upload-av:hover::after { opacity: 1; }

/* ------------------------------------------------------------- popovers, toasts, modal */
.pop {
  position: absolute; z-index: 50; background: #111a44; border: 1px solid rgba(255,255,255,0.12); border-radius: 14px; box-shadow: var(--shadow);
  padding: 6px; min-width: 240px;
}
.menu-pop { right: 0; top: 50px; }
.menu-pop a, .menu-pop button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: none; border: 0; cursor: pointer; text-align: left; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--panel-2); }
.notif-pop { right: 0; top: 50px; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow-y: auto; }
.notif { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; }
.notif.new { background: rgba(62, 107, 255, 0.12); }
.notif:hover { background: var(--panel-2); }
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #fff; color: #0a1030; padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); animation: tin 0.25s ease-out; }
.toast.bad { background: #ff5a6e; color: #fff; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }
.modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(2, 4, 16, 0.7); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fin 0.2s; }
.modal { width: min(520px, 100%); max-height: 90vh; overflow-y: auto; background: #0e1640; border: 1px solid rgba(255,255,255,0.12); border-radius: 20px; padding: 26px; box-shadow: var(--shadow); }
.modal h2 { margin-bottom: 8px; }
.modal .btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@keyframes fin { from { opacity: 0; } }
.skeleton { background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r); }
@keyframes sk { to { background-position: -200% 0; } }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,0.2); border-top-color: #fff; animation: spin 0.8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
footer.site { text-align: center; color: var(--faint); font-size: 13px; padding: 30px 16px 90px; }
footer.site a { color: var(--muted); }

/* ------------------------------------------------------------- mobile */
.bottom-nav { display: none; }
@media (max-width: 1100px) {
  .grid-home { grid-template-columns: minmax(0, 1fr) 300px; }
  .grid-home > .left { display: none; }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav, .search { display: none; }
  .top { gap: 10px; }
  .top-right { margin-left: auto; }
  .grid-home, .pf-grid, .set-grid, .hero { grid-template-columns: minmax(0, 1fr); }
  .grid-home > .right { order: -1; }
  .grid-home > .right .hide-m { display: none; }
  .hero { min-height: 0; padding-top: 10px; }
  .hero .ring-wrap { max-width: 280px; order: -1; }
  .pf-head { margin-left: 14px; }
  .pf-head .acts { padding-right: 14px; }
  .set-nav { flex-direction: row; overflow-x: auto; }
  .set-nav a { white-space: nowrap; }
  .trophy-game { grid-template-columns: 100px minmax(0, 1fr); }
  .trophy-game > :last-child { grid-column: 1 / -1; }
  .form-grid { grid-template-columns: 1fr; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; height: 62px;
    background: rgba(6, 10, 32, 0.92); backdrop-filter: blur(16px); border-top: 1px solid var(--line);
    justify-content: space-around; align-items: center; padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding: 6px 10px; position: relative; }
  .bottom-nav a.on { color: var(--text); }
  .bottom-nav .badge { top: 0; right: 4px; }
  main { padding-bottom: 100px; }
}
@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
  .activity .art { width: 84px; }
  .brand small { display: none; }
  .code-in input { font-size: 24px; height: 58px; }
}
