/* =====================================================================
   CrownXP design system: game launcher edition
   Signature: cut-corner geometry, hexagon levels, segmented XP,
   and one rarity system used for ranks, achievements, rewards, quests.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@500;600;700;800&family=Saira:wght@400;500;600;700&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* Hull */
  --bg: #060914;
  --hull: #0b1020;
  --panel: #10172c;
  --raised: #162038;
  --raised-2: #1d2946;
  --edge: rgba(126, 154, 255, 0.14);
  --edge-2: rgba(126, 154, 255, 0.24);
  --edge-3: rgba(126, 154, 255, 0.4);

  /* Ink */
  --ink: #e9edff;
  --ink-2: #a3acd0;
  --ink-3: #69749c;
  --ink-4: #454f73;

  /* Accents */
  --volt: #7b5cff;        /* primary */
  --volt-hi: #a691ff;
  --volt-deep: #4a32c9;
  --arc: #3d8bff;          /* blue */
  --cyan: #2be3d0;
  --mag: #ff3d8b;
  --gold: #ffc24b;         /* legendary and first place only */
  --live: #ff4655;
  --ok: #3fdb8a;
  --warn: #ffb43d;

  /* Rarity (the one colour language for progression) */
  --r-common: #a3acc8;
  --r-uncommon: #3fdb8a;
  --r-rare: #3d8bff;
  --r-epic: #a35cff;
  --r-legendary: #ffb43d;
  --r-mythic: #ff3d8b;

  /* Type */
  --f-head: 'Saira Condensed', 'Arial Narrow', ui-sans-serif, system-ui, sans-serif;
  --f-ui: 'Saira', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t-xs: 12px; --t-sm: 13px; --t-base: 15px; --t-md: 17px; --t-lg: 20px; --t-xl: 26px; --t-2xl: 34px; --t-3xl: 46px; --t-4xl: 64px;

  /* Space */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 40px; --s-9: 56px; --s-10: 72px;

  /* Geometry */
  --cut: 14px;      /* panel corner cut */
  --cut-sm: 8px;    /* buttons, tags */
  --r-1: 3px; --r-2: 4px; --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 140ms; --t-mid: 260ms; --t-slow: 640ms;

  --nav-h: 64px;
  --shell: 1480px;
  --gutter: clamp(16px, 3vw, 40px);
  color-scheme: dark;
}
.rar-common { --rar: var(--r-common); } .rar-uncommon { --rar: var(--r-uncommon); } .rar-rare { --rar: var(--r-rare); }
.rar-epic { --rar: var(--r-epic); } .rar-legendary { --rar: var(--r-legendary); } .rar-mythic { --rar: var(--r-mythic); }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 180ms var(--ease) both vtOut; }
::view-transition-new(root) { animation: 260ms var(--ease-out) both vtIn; }
@keyframes vtOut { to { opacity: 0; } }
@keyframes vtIn { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--raised-2) transparent; }
body { min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--f-ui); font-size: var(--t-base); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
/* Ambient layers: two slow drifting lights over a faint tactical grid */
body::before {
  content: ''; position: fixed; inset: -20vh -20vw; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40vw 40vh at 18% 12%, rgba(123, 92, 255, 0.16), transparent 70%),
    radial-gradient(36vw 36vh at 86% 78%, rgba(43, 227, 208, 0.07), transparent 70%),
    radial-gradient(30vw 30vh at 70% 10%, rgba(255, 61, 139, 0.06), transparent 70%);
  animation: drift 40s ease-in-out infinite alternate;
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(126, 154, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 154, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}
@keyframes drift { to { transform: translate3d(4vw, 3vh, 0) rotate(4deg); } }
img, svg, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
::selection { background: rgba(123, 92, 255, 0.45); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
code { font-size: 0.9em; padding: 1px 5px; background: var(--raised); border-radius: var(--r-1); }

/* ---------- Type ---------- */
h1, h2, h3, .head { font-family: var(--f-head); font-weight: 700; letter-spacing: 0.005em; line-height: 1.02; }
h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); line-height: 1.15; }
h4 { font-size: var(--t-base); font-weight: 600; }
.mega { font-family: var(--f-head); font-weight: 800; font-size: clamp(44px, 6vw, 88px); line-height: 0.92; letter-spacing: -0.01em; text-transform: uppercase; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.hnum { font-family: var(--f-head); font-weight: 700; font-variant-numeric: tabular-nums; }
.lede { font-size: var(--t-md); color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); } .small { font-size: var(--t-sm); } .xs { font-size: var(--t-xs); }
.volt { color: var(--volt-hi); } .cyan { color: var(--cyan); } .gold { color: var(--gold); } .rar-c { color: var(--rar); }
p + p { margin-top: 0.8em; }

/* ---------- Layout ---------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.shell-wide { width: 100%; max-width: 2200px; margin-inline: auto; padding-inline: var(--gutter); }
main { padding-top: var(--nav-h); }
.section { padding-block: var(--s-8); }
.section-tight { padding-block: var(--s-6); }
.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-6); }
.row-flex { display: flex; align-items: center; gap: var(--s-3); }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: var(--s-4); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hr { height: 1px; background: var(--edge); border: 0; }

/* Section heading: a short angled bar marks the start of each section */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.sec-head h2 { display: flex; align-items: center; gap: 12px; font-size: var(--t-xl); }
.sec-head h2::before { content: ''; width: 16px; height: 16px; background: linear-gradient(135deg, var(--volt-hi), var(--volt)); clip-path: polygon(30% 0, 100% 0, 70% 100%, 0 100%); flex-shrink: 0; }
.sec-head p { color: var(--ink-3); font-size: var(--t-sm); margin-top: 4px; padding-left: 28px; }

/* ---------- HUD panels (cut corners) ----------
   The 1px edge is the element's own background; ::before paints the face
   inset by 1px under the same clip, so the border follows the cut. */
.hud, .panel {
  --face: var(--panel); --rim: var(--edge);
  position: relative; isolation: isolate;
  background: var(--rim);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.hud::before, .panel::before {
  content: ''; position: absolute; inset: 1px; z-index: -1; background: var(--face);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.hud.glow, .panel.glow { --rim: linear-gradient(135deg, var(--volt-hi), rgba(123, 92, 255, 0.1) 40%, rgba(43, 227, 208, 0.08) 60%, var(--cyan)); }
.hud.rar-edge { --rim: linear-gradient(135deg, var(--rar), color-mix(in srgb, var(--rar) 10%, transparent) 45%, color-mix(in srgb, var(--rar) 40%, transparent)); }
.hud.raised, .panel.raised { --face: var(--raised); }
.panel-pad { padding: var(--s-6); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--edge); }
.panel-head h3 { font-size: var(--t-md); letter-spacing: 0.02em; }
.panel-body { padding: var(--s-5); }
.corner-tick { position: absolute; right: 10px; top: 10px; width: 8px; height: 8px; border-top: 1px solid var(--edge-3); border-right: 1px solid var(--edge-3); }

/* ---------- Navigation ---------- */
.cx-nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h); background: rgba(6, 9, 20, 0.86); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--edge); }
.cx-nav::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(123, 92, 255, 0.6), rgba(43, 227, 208, 0.4), transparent); opacity: 0.6; }
.cx-nav .shell-wide { height: 100%; display: flex; align-items: center; gap: var(--s-6); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--ink); }
.wordmark .cx-crown { width: 46px; height: auto; flex-shrink: 0; filter: drop-shadow(0 0 10px rgba(123, 92, 255, 0.35)); }
.wordmark .wm-text b { display: block; font-family: var(--f-head); font-weight: 800; font-size: 24px; line-height: 0.95; letter-spacing: 0.01em; font-style: normal; text-transform: none; color: var(--ink); }
.wordmark .wm-text b span { color: var(--volt-hi); }
.wordmark .wm-text small { display: block; font-size: 9px; font-weight: 700; letter-spacing: 0.08em; white-space: nowrap; color: var(--ink-3); margin-top: 3px; }
@media (max-width: 1400px) { .cx-nav .wordmark .wm-text small { display: none; } }
.nav-links { display: flex; align-items: stretch; height: 100%; }
.nav-link { position: relative; display: flex; align-items: center; padding: 0 14px; font-family: var(--f-head); font-weight: 600; font-size: 16px; letter-spacing: 0.04em; color: var(--ink-3); text-transform: uppercase; transition: color var(--t-fast); }
.nav-link:hover { color: var(--ink); }
.nav-link[aria-current='page'] { color: var(--ink); }
.nav-link[aria-current='page']::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; background: var(--volt); box-shadow: 0 0 14px var(--volt), 0 0 4px var(--volt-hi); clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 100%, 0 100%); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }

.preview-switch { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border: 1px dashed var(--edge-3); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-2); text-transform: uppercase; transition: border-color var(--t-fast), color var(--t-fast); }
.preview-switch:hover { border-color: var(--cyan); color: var(--ink); }
.preview-switch .dot { width: 7px; height: 7px; background: var(--ink-4); transform: rotate(45deg); }
.preview-switch[aria-pressed='true'] .dot { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

.xp-plate { display: inline-grid; grid-template-columns: auto 150px; gap: 10px; align-items: center; height: 44px; padding: 0 12px 0 4px; }
.xp-plate .lvl-hex { width: 38px; height: 42px; }
.xp-plate .xp-plate-txt { display: grid; gap: 4px; font-size: 11px; color: var(--ink-3); line-height: 1; }
.xp-plate .xp-plate-txt b { font-family: var(--f-head); font-size: 15px; color: var(--ink); font-weight: 700; letter-spacing: 0.02em; }
.xp-plate:hover .xpbar { filter: brightness(1.2); }

.icon-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; color: var(--ink-2); transition: background var(--t-fast), color var(--t-fast); clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }
.icon-btn:hover { background: var(--raised); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .badge-dot { position: absolute; top: 8px; right: 8px; min-width: 8px; height: 8px; background: var(--mag); box-shadow: 0 0 8px var(--mag); transform: rotate(45deg); }

.avatar { display: inline-grid; place-items: center; flex-shrink: 0; overflow: hidden; width: 38px; height: 38px; background: linear-gradient(145deg, var(--raised-2), var(--panel)); font-family: var(--f-head); font-weight: 700; font-size: 17px; color: var(--ink); background-size: cover; background-position: center; clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%); }
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }
.avatar.lg { width: 56px; height: 56px; font-size: 24px; }
.avatar.xl { width: 128px; height: 128px; font-size: 56px; }
.avatar-btn { display: inline-grid; }
.av-frame { position: relative; display: inline-grid; place-items: center; padding: 3px; background: linear-gradient(135deg, var(--rar, var(--volt)), transparent 50%, var(--rar, var(--cyan))); clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%); }

.menu { position: absolute; right: 0; top: calc(100% + 12px); min-width: 240px; z-index: 60; background: var(--raised); border: 1px solid var(--edge-2); padding: 6px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9); animation: menuIn var(--t-mid) var(--ease-out); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } }
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--edge); margin-bottom: 6px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; font-size: var(--t-sm); color: var(--ink-2); text-align: left; }
.menu-item:hover { background: var(--raised-2); color: var(--ink); }
.menu-item svg { width: 16px; height: 16px; }
.menu-sep { height: 1px; background: var(--edge); margin: 6px 4px; }
.cx-tabbar { display: none; }
@media (max-width: 1100px) { .nav-link { padding: 0 9px; font-size: 14px; } .xp-plate { grid-template-columns: auto 110px; } }
@media (max-width: 960px) {
  .nav-links, .nav-right .hide-m { display: none; }
  body { padding-bottom: 72px; }
  .cx-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 50; height: 64px; padding-bottom: env(safe-area-inset-bottom); background: rgba(8, 11, 24, 0.95); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--edge); }
  .cx-tabbar a { position: relative; display: grid; place-items: center; align-content: center; gap: 3px; font-family: var(--f-head); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px; color: var(--ink-3); }
  .cx-tabbar a svg { width: 21px; height: 21px; }
  .cx-tabbar a[aria-current='page'] { color: var(--ink); }
  .cx-tabbar a[aria-current='page'] svg { color: var(--volt-hi); filter: drop-shadow(0 0 6px var(--volt)); }
  .cx-tabbar a[aria-current='page']::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; background: var(--volt); box-shadow: 0 0 10px var(--volt); }
}

/* ---------- Buttons ---------- */
.btn {
  --bfill: var(--raised); --bedge: var(--edge-2);
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px;
  font-family: var(--f-head); font-size: 15px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  color: var(--ink); background: var(--bedge);
  clip-path: polygon(var(--cut-sm) 0, 100% 0, 100% calc(100% - var(--cut-sm)), calc(100% - var(--cut-sm)) 100%, 0 100%, 0 var(--cut-sm));
  transition: transform var(--t-fast) var(--ease), filter var(--t-fast), color var(--t-fast);
}
.btn::before { content: ''; position: absolute; inset: 1px; z-index: -1; background: var(--bfill); clip-path: inherit; transition: background var(--t-fast); }
.btn::after { /* hover sheen; animates background-position so it never widens the page */ content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.16) 50%, transparent 65%) 0 0 / 300% 100% no-repeat; transition: background-position 600ms var(--ease); pointer-events: none; }
.btn:hover::after { background-position: 100% 0; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { --bfill: linear-gradient(180deg, #8a6dff, var(--volt) 55%, #6343f0); --bedge: linear-gradient(180deg, #c3b4ff, #5a3be8); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }
.btn-play { --bfill: linear-gradient(180deg, #46f0de, var(--cyan) 50%, #12b3a2); --bedge: linear-gradient(180deg, #b8fff7, #0e9c8d); color: #04201d; height: 54px; padding: 0 34px; font-size: 19px; }
.btn-gold { --bfill: linear-gradient(180deg, #ffd77d, var(--gold) 55%, #e09a1b); --bedge: linear-gradient(180deg, #fff0c9, #b87610); color: #2a1800; }
.btn-ghost { --bfill: rgba(16, 23, 44, 0.85); }
.btn-ghost:hover { --bedge: var(--edge-3); }
.btn-quiet { --bfill: transparent; --bedge: transparent; color: var(--ink-2); padding: 0 10px; }
.btn-quiet:hover { color: var(--ink); --bfill: var(--raised); }
.btn-danger { --bfill: rgba(255, 70, 85, 0.08); --bedge: rgba(255, 70, 85, 0.45); color: #ff9aa3; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; --cut-sm: 6px; }
.btn-lg { height: 50px; padding: 0 28px; font-size: 17px; --cut-sm: 10px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.45; pointer-events: none; }
.btn.is-joined { --bedge: rgba(43, 227, 208, 0.55); --bfill: rgba(43, 227, 208, 0.08); color: var(--cyan); }

/* ---------- Tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; font-family: var(--f-head); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; background: var(--raised-2); color: var(--ink-2); clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%); }
.tag-live { background: var(--live); color: #fff; }
.tag-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.tag-preview { background: transparent; color: var(--ink-3); outline: 1px dashed var(--edge-3); outline-offset: -1px; clip-path: none; }
.tag-xp { background: rgba(43, 227, 208, 0.14); color: var(--cyan); }
.tag-volt { background: rgba(123, 92, 255, 0.2); color: var(--volt-hi); }
.tag-gold { background: rgba(255, 194, 75, 0.16); color: var(--gold); }
.tag-ok { background: rgba(63, 219, 138, 0.14); color: var(--ok); }
.tag-platform { background: transparent; color: var(--ink-2); outline: 1px solid var(--edge-2); outline-offset: -1px; clip-path: none; }
.tag-rar { background: color-mix(in srgb, var(--rar) 16%, transparent); color: var(--rar); }
.tag-rar.rar-mythic { background: linear-gradient(90deg, rgba(255, 61, 139, 0.22), rgba(43, 227, 208, 0.22)); color: #ff9cc4; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 7px; }
.field > span, .field > label { font-size: var(--t-sm); color: var(--ink-2); font-weight: 500; }
.field .hint { font-size: var(--t-xs); color: var(--ink-3); }
.input, .select, .textarea { width: 100%; min-height: 42px; padding: 10px 12px; background: rgba(6, 9, 20, 0.7); border: 1px solid var(--edge-2); border-left: 2px solid var(--edge-3); color: var(--ink); font-size: var(--t-base); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--volt); border-left-color: var(--cyan); box-shadow: 0 0 0 3px rgba(123, 92, 255, 0.18); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23a3acd0' stroke-width='1.6'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.input-search { padding-left: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2369749c' stroke-width='1.6'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3.5 3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 14px center; }
.form-error { padding: 10px 12px; background: rgba(255, 70, 85, 0.1); border-left: 2px solid var(--live); color: #ffb0b7; font-size: var(--t-sm); }
.form-ok { padding: 10px 12px; background: rgba(63, 219, 138, 0.1); border-left: 2px solid var(--ok); color: #a8f0c9; font-size: var(--t-sm); }

.seg { display: inline-flex; gap: 2px; padding: 3px; background: rgba(6, 9, 20, 0.7); border: 1px solid var(--edge); }
.seg button { height: 32px; padding: 0 14px; font-family: var(--f-head); font-weight: 600; font-size: 14px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); transition: background var(--t-fast), color var(--t-fast); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed='true'] { background: var(--volt); color: #fff; box-shadow: 0 0 16px -4px var(--volt); clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%); }

.switch { position: relative; display: inline-block; width: 42px; height: 22px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; background: var(--raised-2); transition: background var(--t-fast); pointer-events: none; clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%); }
.switch i::after { content: ''; position: absolute; top: 3px; left: 5px; width: 14px; height: 16px; background: var(--ink-2); transition: transform var(--t-mid) var(--spring), background var(--t-fast); clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%); }
.switch input:checked + i { background: var(--volt); }
.switch input:checked + i::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + i { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- XP bar (segmented with a lit leading edge) ---------- */
.xpbar { position: relative; height: 8px; background: rgba(126, 154, 255, 0.1); clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%); }
.xpbar.thin { height: 4px; clip-path: none; }
.xpbar.thick { height: 14px; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.xpbar::after { /* segment gaps */ content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), var(--bg) calc(10% - 2px) 10%); opacity: 0.9; }
.xpbar.thin::after { display: none; }
.xpbar-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--volt-deep), var(--volt) 60%, var(--cyan)); transition: width 1200ms var(--ease-out); }
.xpbar-fill::after { /* lit edge */ content: ''; position: absolute; right: 0; top: -2px; bottom: -2px; width: 3px; background: #fff; box-shadow: 0 0 10px 2px var(--cyan); opacity: 0.9; }
.xpbar.rar .xpbar-fill { background: linear-gradient(90deg, color-mix(in srgb, var(--rar) 45%, #000), var(--rar)); }
.xpbar.rar .xpbar-fill::after { box-shadow: 0 0 10px 2px var(--rar); }
.xpbar.gold .xpbar-fill { background: linear-gradient(90deg, #8a5a08, var(--gold)); }
.xpbar.gold .xpbar-fill::after { box-shadow: 0 0 10px 2px var(--gold); }
.xpbar.done .xpbar-fill { background: linear-gradient(90deg, #1a8a57, var(--ok)); }
.xpbar.done .xpbar-fill::after { box-shadow: 0 0 10px 2px var(--ok); }

/* Hex level badge */
.lvl-hex { display: block; overflow: visible; }
.lvl-hex .hex-track { fill: none; stroke: rgba(126, 154, 255, 0.16); }
.lvl-hex .hex-fill { fill: none; stroke-linecap: round; transition: stroke-dashoffset 1300ms var(--ease-out); }
.lvl-hex text { font-family: var(--f-head); font-weight: 800; fill: var(--ink); }

/* Sparks emitted when XP lands */
.spark { position: fixed; z-index: 120; width: 4px; height: 4px; pointer-events: none; background: var(--c, var(--cyan)); box-shadow: 0 0 8px var(--c, var(--cyan)); transform: rotate(45deg); animation: spark 800ms var(--ease-out) forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) rotate(45deg) scale(0.2); opacity: 0; } }

/* ---------- Stage (stream surface) ---------- */
.stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--hull); isolation: isolate; container-type: size; clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut)); }
.stage::before { content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(180deg, rgba(6, 9, 20, 0) 50%, rgba(6, 9, 20, 0.75)); }
.stage-art { position: absolute; inset: 0; z-index: -1; }
.stage-art::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px); background-size: 24px 24px; }
.stage-mono { position: absolute; right: 6cqw; top: 50%; transform: translateY(-50%) skewX(-8deg); z-index: -1; font-family: var(--f-head); font-weight: 800; font-size: 82cqh; line-height: 0.8; color: rgba(255, 255, 255, 0.07); pointer-events: none; user-select: none; text-transform: uppercase; }
.stage-top, .stage-bottom, .stage-note { z-index: 1; }
.stage-top { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.stage-bottom { position: absolute; left: 14px; right: 14px; bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stage-viewers { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); font-weight: 600; color: var(--ink); background: rgba(6, 9, 20, 0.72); padding: 3px 8px; }
.stage-offline { filter: grayscale(0.8) brightness(0.7); }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage-note { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; padding: 24px; color: var(--ink-2); font-size: var(--t-sm); }
.stage-note strong { font-family: var(--f-head); font-weight: 700; font-size: var(--t-md); color: var(--ink); letter-spacing: 0.03em; text-transform: uppercase; }
.stage-note span { max-width: 42ch; font-size: var(--t-xs); color: var(--ink-3); }
@container (max-width: 300px) { .stage-note span { display: none; } .stage-note strong { font-size: 13px; } }
@container (max-height: 120px) { .stage-note { display: none; } }

/* ---------- Creator card ---------- */
.ccard { display: block; position: relative; }
.ccard .stage { transition: transform var(--t-mid) var(--ease-out), filter var(--t-mid); }
.ccard:hover .stage { transform: translateY(-3px); filter: brightness(1.12); }
.ccard::after { content: ''; position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 16 / 9; pointer-events: none; border-bottom: 2px solid var(--brand, var(--volt)); opacity: 0; transition: opacity var(--t-mid); }
.ccard:hover::after { opacity: 1; }
.ccard-meta { display: flex; gap: 12px; padding-top: 12px; }
.ccard-name { font-family: var(--f-head); font-size: var(--t-md); font-weight: 700; line-height: 1.15; letter-spacing: 0.01em; }
.ccard-title { color: var(--ink-2); font-size: var(--t-sm); display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.ccard-sub { color: var(--ink-3); font-size: var(--t-xs); margin-top: 2px; }

/* ---------- Lists / leaderboards ---------- */
.list-row { display: flex; align-items: center; gap: var(--s-4); padding: 13px 0; border-bottom: 1px solid var(--edge); }
.list-row:last-child { border-bottom: 0; }
.lb-row { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: var(--s-4); padding: 10px var(--s-5); border-bottom: 1px solid var(--edge); transition: background var(--t-fast); }
.lb-row:hover { background: rgba(126, 154, 255, 0.04); }
.lb-row:last-child { border-bottom: 0; }
.lb-row.is-you { background: linear-gradient(90deg, rgba(123, 92, 255, 0.2), transparent 70%); }
.lb-row.is-you::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--volt); box-shadow: 0 0 10px var(--volt); }
.lb-pos { font-family: var(--f-head); font-size: var(--t-lg); font-weight: 800; color: var(--ink-3); text-align: center; font-variant-numeric: tabular-nums; }
.lb-row.p1 .lb-pos { color: var(--gold); text-shadow: 0 0 12px rgba(255, 194, 75, 0.5); }
.lb-row.p2 .lb-pos { color: #d7deef; }
.lb-row.p3 .lb-pos { color: #e09a6a; }
.lb-xp { text-align: right; font-family: var(--f-head); font-weight: 700; font-size: var(--t-md); font-variant-numeric: tabular-nums; }
.lb-xp small { display: block; font-family: var(--f-ui); font-weight: 500; color: var(--ink-3); font-size: 11px; }
.delta { font-size: 11px; font-weight: 700; font-family: var(--f-head); letter-spacing: 0.04em; }
.delta.up { color: var(--ok); } .delta.down { color: var(--live); } .delta.same { color: var(--ink-4); }
table.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th { text-align: left; font-family: var(--f-head); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; font-size: 12px; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--edge); }
.table td { padding: 12px; border-bottom: 1px solid var(--edge); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }

/* ---------- Stats ---------- */
.stat { padding: var(--s-5) var(--s-6); position: relative; }
.stat .v { font-family: var(--f-head); font-weight: 800; font-size: var(--t-2xl); line-height: 1; font-variant-numeric: tabular-nums; }
.stat .k { font-size: var(--t-xs); color: var(--ink-3); margin-top: 6px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat-strip > * + * { border-left: 1px solid var(--edge); }
@media (max-width: 720px) { .stat-strip > * + * { border-left: 0; border-top: 1px solid var(--edge); } }

/* ---------- Emblems, badges ---------- */
.emblem { display: inline-block; flex-shrink: 0; overflow: visible; }
.rank-line { display: inline-flex; align-items: center; gap: 8px; }
.rank-line b { font-family: var(--f-head); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: var(--t-sm); color: var(--rar); }
.badge { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; padding: var(--s-5) var(--s-3) var(--s-4); transition: transform var(--t-mid) var(--ease-out), background var(--t-fast); }
.badge:hover { transform: translateY(-3px); background: rgba(126, 154, 255, 0.04); }
.badge svg { width: 76px; height: 84px; overflow: visible; }
.badge .b-name { font-family: var(--f-head); font-weight: 700; font-size: var(--t-md); letter-spacing: 0.02em; }
.badge .b-desc { font-size: var(--t-xs); color: var(--ink-3); max-width: 24ch; }
.badge .b-rar { font-family: var(--f-head); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rar); }
.badge.locked .b-name { color: var(--ink-3); }
.badge.locked .b-rar { color: var(--ink-4); }
.badge.mythic-shine svg { animation: hueShift 6s linear infinite; }
@keyframes hueShift { 50% { filter: hue-rotate(60deg) drop-shadow(0 0 12px rgba(255, 61, 139, 0.5)); } }

/* ---------- Reward card ---------- */
.rcard { --cut: 16px; display: grid; grid-template-rows: auto 1fr; transition: transform var(--t-mid) var(--ease-out); }
.rcard:hover { transform: translateY(-4px); }
.rcard-art { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background-size: cover; background-position: center; }
.rcard-art::after { content: ''; position: absolute; inset: 0; background: radial-gradient(70% 70% at 50% 60%, color-mix(in srgb, var(--rar) 32%, transparent), transparent 70%); mix-blend-mode: screen; pointer-events: none; }
.rcard-art .glyph { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; }
.rcard-art .glyph svg { width: 70px; height: 70px; color: var(--rar); filter: drop-shadow(0 0 16px var(--rar)); }
.rcard.locked .rcard-art .glyph svg { color: var(--ink-3); filter: none; opacity: 0.6; }
.rcard .lock { position: absolute; right: 14px; bottom: 14px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; background: rgba(6, 9, 20, 0.75); color: var(--ink-2); clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%); }
.rcard .lock svg { width: 16px; height: 16px; }
.rcard-body { padding: var(--s-5); display: grid; gap: var(--s-3); align-content: start; }
.rcard-body h3 { font-size: var(--t-lg); }
.req { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: var(--s-3); border-top: 1px solid var(--edge); font-size: var(--t-sm); }
.rcard.unlocking .rcard-art::before { content: ''; position: absolute; inset: 0; z-index: 3; background: linear-gradient(110deg, transparent 20%, color-mix(in srgb, var(--rar) 70%, #fff) 50%, transparent 80%); animation: unlockSweep 900ms var(--ease-out) forwards; }
@keyframes unlockSweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* ---------- Quest row ---------- */
.quest { --cut: 12px; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; }
.quest .q-ico { width: 52px; height: 56px; display: grid; place-items: center; color: var(--rar); background: color-mix(in srgb, var(--rar) 12%, transparent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.quest .q-ico svg { width: 22px; height: 22px; }
.quest .q-title { font-family: var(--f-head); font-weight: 700; font-size: var(--t-md); letter-spacing: 0.01em; }
.quest .q-meta { display: flex; gap: 12px; align-items: center; font-size: var(--t-xs); color: var(--ink-3); margin-top: 3px; flex-wrap: wrap; }
.quest .q-prog { margin-top: 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: var(--t-xs); color: var(--ink-2); }
.quest .q-reward { display: grid; justify-items: end; gap: 6px; text-align: right; }
.quest .q-xp { font-family: var(--f-head); font-weight: 800; font-size: var(--t-lg); color: var(--cyan); }
.quest.done { opacity: 0.6; }
.quest.done .q-title { text-decoration: line-through; text-decoration-color: var(--ink-4); }
.quest.claiming { animation: questPop 700ms var(--spring); }
@keyframes questPop { 40% { transform: scale(1.02); filter: brightness(1.4); } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: grid; gap: 10px; justify-items: end; pointer-events: none; }
@media (max-width: 960px) { .toasts { bottom: 84px; right: 12px; left: 12px; justify-items: stretch; } }
.toast { --cut: 10px; pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 270px; max-width: 390px; padding: 12px 18px 12px 12px; font-size: var(--t-sm); animation: toastIn 460ms var(--spring); }
.toast.out { animation: toastOut 260ms var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(16px); } }
.toast .t-ico { display: grid; place-items: center; width: 40px; height: 44px; flex-shrink: 0; background: color-mix(in srgb, var(--rar, var(--volt)) 20%, transparent); color: var(--rar, var(--volt-hi)); font-family: var(--f-head); font-weight: 800; font-size: 14px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.toast .t-ico svg { width: 18px; height: 18px; }
.toast b { font-family: var(--f-head); font-weight: 700; font-size: var(--t-md); letter-spacing: 0.02em; }
.toast .t-sub { color: var(--ink-3); font-size: var(--t-xs); }
.toast.xp .t-ico { --rar: var(--cyan); }

/* ---------- Level-up sequence ---------- */
.levelup { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, rgba(80, 56, 200, 0.55), rgba(4, 6, 14, 0.96) 55%); backdrop-filter: blur(6px); animation: fadeIn 300ms var(--ease); }
.levelup.out { animation: fadeOut 420ms var(--ease) forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.levelup-card { position: relative; display: grid; justify-items: center; gap: 14px; text-align: center; padding: 32px; }
.levelup-card .lu-kicker { font-family: var(--f-head); font-weight: 800; font-size: 28px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--cyan); text-shadow: 0 0 20px rgba(43, 227, 208, 0.6); animation: luKick 700ms 150ms var(--spring) both; }
@keyframes luKick { from { opacity: 0; letter-spacing: 0.6em; } }
.levelup-card .lu-hex { position: relative; width: 200px; height: 224px; animation: luHex 800ms var(--spring) both; }
@keyframes luHex { from { transform: scale(0.4) rotate(-30deg); opacity: 0; } }
.levelup-card .lu-hex .lvl-hex { width: 100%; height: 100%; }
.levelup-card .lu-num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-head); font-weight: 800; font-size: 84px; line-height: 1; }
.levelup-card .lu-unlocks { display: grid; gap: 8px; min-width: 280px; margin-top: 6px; }
.levelup-card .lu-unlock { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(16, 23, 44, 0.9); border-left: 2px solid var(--rar); font-size: var(--t-sm); text-align: left; animation: luItem 500ms var(--ease-out) both; }
@keyframes luItem { from { opacity: 0; transform: translateY(8px); } }
.lu-rays { position: absolute; left: 50%; top: 50%; width: 520px; height: 520px; margin: -260px 0 0 -260px; pointer-events: none; background: repeating-conic-gradient(from 0deg, rgba(123, 92, 255, 0.16) 0 6deg, transparent 6deg 20deg); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 65%); mask-image: radial-gradient(circle, #000 20%, transparent 65%); animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Dialog ---------- */
dialog.dlg { margin: auto; width: min(580px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 1px solid var(--edge-2); background: var(--panel); color: var(--ink); padding: 0; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(123, 92, 255, 0.2); }
dialog.dlg::backdrop { background: rgba(3, 5, 12, 0.75); backdrop-filter: blur(4px); }
dialog.dlg[open] { animation: dlgIn 340ms var(--spring); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--edge); }
.dlg-head h3 { font-size: var(--t-lg); }
.dlg-body { padding: 22px; display: grid; gap: 18px; }
.dlg-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--edge); }

/* ---------- Skeleton / empty ---------- */
.skel { position: relative; overflow: hidden; background: var(--panel); }
.skel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(126, 154, 255, 0.08), transparent); transform: translateX(-100%); animation: skel 1.3s infinite; }
@keyframes skel { to { transform: translateX(100%); } }
.empty { display: grid; justify-items: start; gap: 10px; padding: var(--s-7) var(--s-6); border: 1px dashed var(--edge-2); background: rgba(11, 16, 32, 0.5); }
.empty h3 { font-size: var(--t-lg); }
.empty p { color: var(--ink-2); font-size: var(--t-sm); max-width: 54ch; }
.empty.center { justify-items: center; text-align: center; }

/* ---------- Page header ---------- */
.ph { padding: var(--s-8) 0 var(--s-6); }
.ph h1 { font-size: clamp(40px, 5vw, 68px); font-weight: 800; text-transform: uppercase; letter-spacing: 0; line-height: 0.95; }
.ph p { margin-top: 10px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--edge); overflow-x: auto; scrollbar-width: none; }
.tabs button, .tabs a { position: relative; padding: 12px 14px; font-family: var(--f-head); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; font-size: 14px; color: var(--ink-3); white-space: nowrap; }
.tabs button:hover, .tabs a:hover { color: var(--ink); }
.tabs [aria-selected='true'] { color: var(--ink); }
.tabs [aria-selected='true']::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--volt); box-shadow: 0 0 10px var(--volt); }

.cx-foot { margin-top: var(--s-10); padding: var(--s-7) 0; border-top: 1px solid var(--edge); color: var(--ink-3); font-size: var(--t-sm); }
.cx-foot .shell { display: flex; justify-content: space-between; gap: var(--s-6); flex-wrap: wrap; align-items: center; }
.cx-foot a:hover { color: var(--ink); }

/* ---------- Utilities ---------- */
.mt-2 { margin-top: var(--s-2); } .mt-3 { margin-top: var(--s-3); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); }
@media (max-width: 1100px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .hide-sm { display: none !important; }
  h1 { font-size: var(--t-2xl); }
  .section { padding-block: var(--s-7); }
  .panel-pad, .panel-body { padding: var(--s-4); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
  body::before { animation: none; }
  .spark, .lu-rays { display: none; }
}

/* Aliases for page styles written against the previous token names */
:root {
  --ob-0: var(--bg); --ob-1: var(--panel); --ob-2: var(--raised); --ob-3: var(--raised-2); --ob-4: #26345a;
  --line: var(--edge); --line-2: var(--edge-2); --line-3: var(--edge-3);
  --ivory: var(--ink); --ivory-2: var(--ink-2); --ivory-3: var(--ink-3); --ivory-4: var(--ink-4);
  --gold-soft: rgba(255, 194, 75, 0.14); --xp: var(--volt); --xp-hi: var(--cyan); --xp-soft: rgba(43, 227, 208, 0.12); --xp-deep: var(--volt-deep);
  --f-display: var(--f-head); --r-3: 4px; --sh-1: none; --sh-2: 0 24px 60px -24px rgba(0, 0, 0, 0.95); --sh-gold: 0 0 0 1px var(--gold), 0 0 30px -6px var(--gold);
}
.serif-num { font-family: var(--f-head); font-weight: 800; font-variant-numeric: tabular-nums; }
.label { font-size: var(--t-xs); color: var(--ink-3); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.xp-c { color: var(--cyan); }
.sec-head { flex-wrap: wrap; }
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { flex-shrink: 0; }

/* =====================================================================
   Twitch discovery (Discover > All of Twitch, streamer profiles)
   ===================================================================== */
.stage-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.stage-avatar { position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%); object-fit: cover; z-index: -1; opacity: 0.55; clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%); }
.tw-mark { color: #c9a8ff; }
.tw-mark svg { width: 11px; height: 11px; }
.fbadge { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; background: color-mix(in srgb, var(--rar) 14%, rgba(6, 9, 20, 0.85)); border: 1px solid color-mix(in srgb, var(--rar) 55%, transparent); clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.fbadge .fb-crown { display: grid; place-items: center; width: 30px; height: 30px; color: var(--rar); filter: drop-shadow(0 0 8px var(--rar)); }
.fbadge .fb-crown svg { width: 22px; height: 22px; }
.fbadge b { display: block; font-family: var(--f-head); font-weight: 800; font-size: 17px; letter-spacing: 0.02em; line-height: 1.05; color: var(--ink); }
.fbadge small { display: block; font-family: var(--f-head); font-weight: 700; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rar); }
.fbadge.big { padding: 10px 20px 10px 12px; }
.fbadge.big .fb-crown { width: 40px; height: 40px; } .fbadge.big .fb-crown svg { width: 30px; height: 30px; }
.fbadge.big b { font-size: 24px; }
@media (max-width: 480px) { .nav-right > a.btn-quiet[href="login.html"] { display: none; } } /* Sign in lives in the bottom tab bar on phones */

/* ---------- top nav: fit the full bar between tablet and wide desktop ----------
   Control Center and the Preview switch are also in the account menu, so they step aside first. */
.cx-nav .nav-link { white-space: nowrap; }
@media (max-width: 1560px) { .cx-nav .nav-link { padding: 0 10px; font-size: 15px; } .cx-nav .xp-plate { grid-template-columns: auto 110px; } }
@media (max-width: 1440px) { .cx-nav .nav-right > a.btn-ghost[href="streamer-dashboard.html"] { display: none; } }
@media (max-width: 1340px) { .cx-nav .xp-plate { grid-template-columns: auto; padding-right: 4px; } .cx-nav .xp-plate .xp-plate-txt { display: none; } }
@media (max-width: 1240px) { .cx-nav .preview-switch { display: none; } .cx-nav .nav-link { padding: 0 8px; font-size: 14px; letter-spacing: 0.02em; } }
@media (max-width: 1100px) { .cx-nav .wordmark .wm-text b { font-size: 21px; } .cx-nav .wordmark .cx-crown { width: 38px; } .cx-nav .nav-link { padding: 0 7px; font-size: 13px; } }
@media (max-width: 1024px) { .cx-nav .nav-link { padding: 0 5px; font-size: 12.5px; } .cx-nav .nav-right .btn-sm { padding-left: 10px; padding-right: 10px; } }
.cx-tabbar { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; } .cx-tabbar a { min-width: 0; overflow: hidden; }

/* Continue with Twitch (creator sign-in) */
.tw-creator { display: grid; gap: 14px; margin-top: 18px; }
.tw-btn { --bfill: linear-gradient(180deg, #a970ff, #9146ff); --bedge: #c9a8ff; color: #fff; gap: 10px; }
.tw-btn[aria-disabled="true"] { filter: grayscale(0.6) brightness(0.75); cursor: not-allowed; }
.tw-creator .check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--t-sm); color: var(--ink-2); }
.tw-creator .check input { margin-top: 3px; accent-color: var(--volt); width: 16px; height: 16px; flex-shrink: 0; }
.shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
