/* ============================================================
   MCTIERS — design system v1 (ember theme)
   tiersmc.site · 2026
   ============================================================ */

:root {
  --bg: #0b0604;
  --bg-2: #140b06;
  --bg-3: #1c110a;
  --panel: rgba(255, 243, 228, 0.035);
  --panel-2: rgba(255, 243, 228, 0.06);
  --line: rgba(255, 210, 160, 0.11);
  --line-soft: rgba(255, 210, 160, 0.07);

  --t1: #f8efe3;
  --t2: #c9b49b;
  --t3: #8d7a64;

  --amber: #ffb84d;
  --gold: #ffd34e;
  --orange: #ff7e1b;
  --ember: #f04a23;
  --deep: #b92a1c;
  --grad-brand: linear-gradient(92deg, #ffe08a, #ffa24b 45%, #ff5a36);

  --ok: #7ad98b;
  --err: #ff7a70;

  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --font-d: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-b: 'Inter', system-ui, -apple-system, sans-serif;

  --shadow-card: 0 24px 60px -32px rgba(255, 84, 30, 0.28), 0 8px 24px -18px rgba(0, 0, 0, 0.8);
  --nav-h: 68px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--t1);
  font: 400 16px/1.6 var(--font-b);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Ambient fire atmosphere (pure CSS, no images) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(52rem 34rem at 82% -10%, rgba(255, 126, 27, 0.13), transparent 62%),
    radial-gradient(46rem 30rem at -8% 16%, rgba(240, 74, 35, 0.10), transparent 60%),
    radial-gradient(60rem 44rem at 50% 118%, rgba(185, 42, 28, 0.14), transparent 64%),
    linear-gradient(180deg, #0d0704 0%, #0b0604 40%, #0a0503 100%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(255, 126, 27, 0.35); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a1a10; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: 24px; }
.mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; }

/* ---------------- progress bar ---------------- */
#topbar-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--grad-brand);
  z-index: 200; border-radius: 0 2px 2px 0;
  transition: width 0.25s ease, opacity 0.4s ease;
  opacity: 0; pointer-events: none;
}
#topbar-progress.active { opacity: 1; }

/* ---------------- nav ---------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(11, 6, 4, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: 1180px; margin-inline: auto; padding-inline: 24px;
  height: 100%; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-d); font-weight: 700; font-size: 19px; letter-spacing: 0.02em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand img.brand-logo { width: 26px; height: 26px; flex: none; border-radius: 6px; }
.brand b {
  font-weight: 700;
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 6px; }
.nav-links a {
  padding: 9px 14px; border-radius: 10px; font-size: 14.5px; font-weight: 500; color: var(--t2);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--t1); background: var(--panel-2); }
.nav-links a[aria-current='page'] { color: var(--t1); background: var(--panel-2); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--line); color: var(--t2);
  transition: color 0.2s, border-color 0.2s, transform 0.2s, background 0.2s;
}
.icon-btn:hover { color: #fff; border-color: rgba(88, 101, 242, 0.55); background: rgba(88, 101, 242, 0.10); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-burger { display: none; }

.mobile-menu {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 99;
  background: rgba(13, 7, 4, 0.96);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 24px 18px;
  display: none; flex-direction: column; gap: 2px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 13px 10px; border-radius: 10px; font-weight: 600; color: var(--t2); }
.mobile-menu a:hover { color: var(--t1); background: var(--panel-2); }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-d); font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: 13px;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s, border-color 0.18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: linear-gradient(135deg, #ffc55e, #ff8a25 55%, #f0512f);
  color: #200a02;
  box-shadow: 0 12px 34px -14px rgba(255, 126, 27, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 16px 40px -14px rgba(255, 126, 27, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
.btn-ghost { background: var(--panel); border-color: var(--line); color: var(--t1); }
.btn-ghost:hover { background: var(--panel-2); border-color: rgba(255, 210, 160, 0.22); transform: translateY(-1px); }
.btn-discord { background: rgba(88, 101, 242, 0.14); border-color: rgba(88, 101, 242, 0.45); color: #c3caff; }
.btn-discord:hover { background: rgba(88, 101, 242, 0.24); transform: translateY(-1px); }
.btn-discord svg { width: 18px; height: 18px; }
.btn[disabled], .btn.loading { opacity: 0.55; pointer-events: none; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; border-radius: 11px; }

/* ---------------- tier badges ---------------- */
.tier {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-d); font-weight: 700; font-size: 11.5px;
  letter-spacing: 0.06em; padding: 4px 10px; border-radius: 999px;
  color: var(--tc, #ffb84d);
  background: color-mix(in srgb, var(--tc, #ffb84d) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc, #ffb84d) 38%, transparent);
  line-height: 1.3; white-space: nowrap;
}
.tier .retake { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.9; flex: none; }
.tier-untested { --tc: #6d5f50; }
.tier-ht1 { --tc: #ffd34e; }
.tier-lt1 { --tc: #ffa53c; }
.tier-ht2 { --tc: #ff7e3b; }
.tier-lt2 { --tc: #ff5e3a; }
.tier-ht3 { --tc: #f0512f; }
.tier-lt3 { --tc: #d8442f; }
.tier-ht4 { --tc: #b04036; }
.tier-lt4 { --tc: #a0453c; }
.tier-ht5 { --tc: #8a4a42; }
.tier-lt5 { --tc: #7a4a44; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  padding: 4px 11px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--t2);
}

/* ---------------- glass card ---------------- */
.glass {
  background: linear-gradient(180deg, rgba(255, 246, 235, 0.05), rgba(255, 246, 235, 0.018));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(16px) saturate(1.05);
  -webkit-backdrop-filter: blur(16px) saturate(1.05);
  box-shadow: var(--shadow-card);
}

/* ---------------- reveal animations ---------------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--rd, 0s); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
}

/* ---------------- skeletons ---------------- */
.skel {
  border-radius: var(--r-md);
  background: linear-gradient(90deg, rgba(255, 246, 235, 0.04) 25%, rgba(255, 246, 235, 0.09) 40%, rgba(255, 246, 235, 0.04) 60%);
  background-size: 300% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -150% 0; } }

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 72px) 0 40px;
  min-height: 82vh;
  display: flex; align-items: center;
}
.hero-grid { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 56px; align-items: center; width: 100%; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-d); font-size: 12px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--amber);
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(255, 184, 77, 0.25); background: rgba(255, 184, 77, 0.07);
}
.eyebrow .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 0 rgba(255, 126, 27, 0.6); animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 126, 27, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(255, 126, 27, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 126, 27, 0); }
}
.hero h1 {
  font-family: var(--font-d); font-weight: 700;
  font-size: clamp(2.7rem, 5.6vw, 4.3rem);
  line-height: 1.04; letter-spacing: -0.02em;
  margin: 22px 0 18px;
}
.hero h1 .grad {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { color: var(--t2); font-size: 18.5px; line-height: 1.65; max-width: 34em; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-trust { display: flex; gap: 26px; margin-top: 38px; flex-wrap: wrap; }
.trust-item { display: flex; flex-direction: column; gap: 3px; }
.trust-item b { font-family: var(--font-d); font-size: 22px; font-weight: 700; color: var(--t1); font-variant-numeric: tabular-nums; }
.trust-item span { font-size: 12.5px; color: var(--t3); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }

/* hero side panel — top ranked */
.top-panel { padding: 22px 22px 14px; position: relative; overflow: hidden; }
.top-panel::before {
  content: '';
  position: absolute; inset: -1px;
  background: radial-gradient(24rem 14rem at 85% -12%, rgba(255, 170, 60, 0.14), transparent 60%);
  pointer-events: none;
}
.top-panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.top-panel-head h2 { font-family: var(--font-d); font-size: 15px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t2); margin: 0; }
.top-panel-head a { font-size: 12.5px; color: var(--amber); font-weight: 600; }
.top-panel-head a:hover { text-decoration: underline; }
.top-row {
  display: grid; grid-template-columns: 30px 42px 1fr auto auto; gap: 12px; align-items: center;
  padding: 9px 8px; border-radius: 13px;
  transition: background 0.2s;
}
.top-row:hover { background: var(--panel-2); }
.top-rank { font-family: var(--font-d); font-weight: 700; font-size: 13px; color: var(--t3); text-align: center; }
.top-row:nth-child(2) .top-rank { color: var(--gold); }
.top-row:nth-child(3) .top-rank { color: #d9c1a0; }
.top-row:nth-child(4) .top-rank { color: #c98d5a; }
.top-head { width: 40px; height: 40px; border-radius: 9px; image-rendering: pixelated; background: var(--bg-3); border: 1px solid var(--line-soft); }
.top-name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-name small { display: block; font-size: 11px; color: var(--t3); font-weight: 500; letter-spacing: 0.05em; }
.top-points { font-family: var(--font-d); font-weight: 700; font-size: 14.5px; color: var(--amber); font-variant-numeric: tabular-nums; }
.top-panel .top-row + .top-row { border-top: 1px solid var(--line-soft); border-radius: 0; }
.top-panel .top-row:first-of-type { margin-top: 4px; }

/* ---------------- sections ---------------- */
.section { padding: 92px 0; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(255, 240, 220, 0.014) 30%, transparent); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; flex-wrap: wrap; }
.section-head h2 { font-family: var(--font-d); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; letter-spacing: -0.01em; margin: 6px 0 0; }
.kicker { font-family: var(--font-d); font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--orange); }
.section-head p { color: var(--t2); max-width: 44em; margin: 0; font-size: 15.5px; }

/* ---------------- mode cards ---------------- */
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mode-card {
  padding: 22px; position: relative; overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.25s, box-shadow 0.25s;
  display: block;
}
.mode-card:hover { transform: translateY(-4px); border-color: rgba(255, 184, 77, 0.3); box-shadow: 0 30px 60px -30px rgba(255, 110, 40, 0.35); }
.mode-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(16rem 8rem at 90% -20%, rgba(255, 150, 50, 0.09), transparent 65%);
  opacity: 0; transition: opacity 0.3s;
}
.mode-card:hover::after { opacity: 1; }
.mode-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mode-title { font-family: var(--font-d); font-weight: 700; font-size: 18px; }
.mode-count { font-size: 12.5px; color: var(--t3); font-variant-numeric: tabular-nums; }
.mode-faces { display: flex; }
.mode-faces img { width: 30px; height: 30px; border-radius: 7px; image-rendering: pixelated; border: 1px solid var(--line-soft); margin-right: -9px; background: var(--bg-3); }
.mode-faces img:last-child { margin-right: 0; }
.mode-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.mode-best { display: flex; gap: 6px; align-items: center; }
.mode-link { font-size: 12.5px; color: var(--t3); font-weight: 600; transition: color 0.2s; }
.mode-card:hover .mode-link { color: var(--amber); }

/* ---------------- leaderboard table ---------------- */
.lb-panel { padding: 10px 22px 8px; }
.lb-row {
  display: grid; grid-template-columns: 44px 46px minmax(120px, 1.4fr) 90px 90px minmax(0, 1.5fr) auto;
  gap: 14px; align-items: center; padding: 13px 6px;
  border-radius: 12px; transition: background 0.2s;
}
.lb-row:hover { background: var(--panel-2); }
.lb-row + .lb-row { border-top: 1px solid var(--line-soft); }
.lb-rank { font-family: var(--font-d); font-weight: 700; font-size: 15px; color: var(--t3); }
.lb-row:nth-child(2) .lb-rank { color: var(--gold); }
.lb-row:nth-child(3) .lb-rank { color: #d9c1a0; }
.lb-row:nth-child(4) .lb-rank { color: #c98d5a; }
.lb-head { width: 42px; height: 42px; border-radius: 9px; image-rendering: pixelated; background: var(--bg-3); border: 1px solid var(--line-soft); }
.lb-name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name:hover { color: var(--amber); }
.lb-region { font-size: 12px; color: var(--t3); font-weight: 600; letter-spacing: 0.06em; }
.lb-points { font-family: var(--font-d); font-weight: 700; color: var(--amber); font-variant-numeric: tabular-nums; text-align: right; }
.lb-tiers { display: flex; gap: 6px; flex-wrap: wrap; }
.lb-view { font-size: 13px; font-weight: 600; color: var(--t3); transition: color 0.2s; white-space: nowrap; }
.lb-row:hover .lb-view { color: var(--amber); }
.lb-head-row { display: grid; grid-template-columns: 44px 46px minmax(120px, 1.4fr) 90px 90px minmax(0, 1.5fr) auto; gap: 14px; padding: 12px 6px 10px; border-bottom: 1px solid var(--line); }
.lb-head-row span { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t3); }

/* ---------------- recent tests ticker ---------------- */
.tests-scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 295px; gap: 14px; overflow-x: auto; padding: 4px 4px 18px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.test-card { scroll-snap-align: start; padding: 18px; }
.test-card .row1 { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.test-card .row1 img { width: 34px; height: 34px; border-radius: 8px; image-rendering: pixelated; background: var(--bg-3); }
.test-card .who b { font-size: 14px; display: block; line-height: 1.3; }
.test-card .who span { font-size: 11.5px; color: var(--t3); }
.test-card .row2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.test-when { font-size: 11.5px; color: var(--t3); }

/* ---------------- steps / how it works ---------------- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step-card { padding: 26px; position: relative; }
.step-num {
  width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-weight: 700; font-size: 16px; color: #200a02;
  background: linear-gradient(135deg, #ffc55e, #f0512f);
  margin-bottom: 18px;
  box-shadow: 0 8px 24px -8px rgba(255, 126, 27, 0.5);
}
.step-card h3 { font-family: var(--font-d); font-size: 17px; margin: 0 0 8px; }
.step-card p { color: var(--t2); font-size: 14.5px; margin: 0; line-height: 1.65; }

/* ---------------- community CTA ---------------- */
.cta-panel {
  padding: 54px 40px; text-align: center; position: relative; overflow: hidden;
}
.cta-panel::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(34rem 18rem at 18% 0%, rgba(88, 101, 242, 0.12), transparent 60%),
    radial-gradient(30rem 18rem at 85% 110%, rgba(255, 120, 40, 0.13), transparent 60%);
  pointer-events: none;
}
.cta-panel h2 { font-family: var(--font-d); font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 12px; position: relative; }
.cta-panel p { color: var(--t2); max-width: 36em; margin: 0 auto 26px; position: relative; }
.cta-actions { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; position: relative; }
.cta-note { margin-top: 16px !important; font-size: 12.5px !important; color: var(--t3) !important; }

/* ---------------- footer ---------------- */
footer { border-top: 1px solid var(--line-soft); padding: 56px 0 40px; margin-top: 40px; background: linear-gradient(180deg, transparent, rgba(20, 10, 5, 0.7)); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.foot-brand .brand { margin-bottom: 14px; }
.foot-brand p { color: var(--t3); font-size: 13.5px; max-width: 30em; margin: 0 0 18px; }
.foot-col h4 { font-family: var(--font-d); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--t3); margin: 4px 0 16px; }
.foot-col a { display: block; color: var(--t2); font-size: 14px; padding: 5px 0; transition: color 0.2s; }
.foot-col a:hover { color: var(--amber); }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-soft); color: var(--t3); font-size: 12.5px; }

/* ---------------- page hero (inner pages) ---------------- */
.page-hero { padding: calc(var(--nav-h) + 58px) 0 34px; }
.page-hero h1 { font-family: var(--font-d); font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 700; letter-spacing: -0.02em; margin: 14px 0 10px; }
.page-hero p { color: var(--t2); max-width: 44em; margin: 0; }

/* ---------------- players browse ---------------- */
.browse-tools { display: flex; flex-direction: column; gap: 14px; margin: 8px 0 26px; }
.search-shell { position: relative; max-width: 620px; }
.search-shell svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--t3); pointer-events: none; }
.search-shell input {
  width: 100%; padding: 15px 88px 15px 48px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 15px;
  font-size: 15.5px; color: var(--t1);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.search-shell input::placeholder { color: var(--t3); }
.search-shell input:focus { outline: none; border-color: rgba(255, 184, 77, 0.45); box-shadow: 0 0 0 4px rgba(255, 150, 50, 0.10); background: var(--panel-2); }
.search-kbd {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--t3); border: 1px solid var(--line); border-radius: 7px; padding: 3px 8px;
  font-family: var(--font-d);
}
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.select-wrap { position: relative; }
.select-wrap select {
  appearance: none; -webkit-appearance: none;
  background: var(--panel); border: 1px solid var(--line); color: var(--t2);
  font-size: 13.5px; font-weight: 600; padding: 9px 34px 9px 14px; border-radius: 11px;
  cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.select-wrap select:hover { border-color: rgba(255, 184, 77, 0.35); color: var(--t1); }
.select-wrap select:focus { outline: none; border-color: rgba(255, 184, 77, 0.45); }
.select-wrap::after {
  content: ''; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px;
  border-right: 1.6px solid var(--t3); border-bottom: 1.6px solid var(--t3);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.results-meta { color: var(--t3); font-size: 13.5px; }
.results-meta b { color: var(--t2); font-variant-numeric: tabular-nums; }

.players-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.player-card { padding: 20px; transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.22s, box-shadow 0.22s; display: flex; flex-direction: column; gap: 14px; }
.player-card:hover { transform: translateY(-4px); border-color: rgba(255, 184, 77, 0.32); box-shadow: 0 26px 54px -28px rgba(255, 110, 40, 0.35); }
.pc-top { display: flex; align-items: center; gap: 14px; }
.pc-top img { width: 52px; height: 52px; border-radius: 11px; image-rendering: pixelated; background: var(--bg-3); border: 1px solid var(--line-soft); flex: none; }
.pc-id { min-width: 0; }
.pc-name { font-family: var(--font-d); font-weight: 700; font-size: 16.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-name:hover { color: var(--amber); }
.pc-sub { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.pc-stats { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pc-points { font-family: var(--font-d); font-weight: 700; font-size: 15px; color: var(--amber); font-variant-numeric: tabular-nums; }
.pc-points small { font-size: 10.5px; color: var(--t3); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; display: block; }
.pc-tiers { display: flex; gap: 5px; flex-wrap: wrap; }
.pc-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: auto; }
.pc-view { font-size: 13px; font-weight: 600; color: var(--t3); transition: color 0.2s; }
.player-card:hover .pc-view { color: var(--amber); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 34px 0 10px; }
.page-btn {
  min-width: 42px; height: 42px; padding: 0 14px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line);
  font-family: var(--font-d); font-weight: 600; font-size: 14px; color: var(--t2);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.page-btn:hover:not([disabled]) { border-color: rgba(255, 184, 77, 0.4); color: var(--t1); transform: translateY(-1px); }
.page-btn[disabled] { opacity: 0.4; cursor: default; }
.page-ind { font-family: var(--font-d); font-size: 13.5px; color: var(--t3); font-variant-numeric: tabular-nums; padding: 0 6px; }

.empty-state { text-align: center; padding: 70px 20px; }
.empty-state .big { font-size: 40px; margin-bottom: 12px; opacity: 0.75; }
.empty-state h3 { font-family: var(--font-d); margin: 0 0 8px; }
.empty-state p { color: var(--t2); margin: 0 auto 20px; max-width: 30em; }

/* ---------------- player profile ---------------- */
.profile-grid { display: grid; grid-template-columns: 350px 1fr; gap: 22px; align-items: start; }
.profile-card { padding: 28px; text-align: center; position: relative; overflow: hidden; }
.profile-card::before {
  content: ''; position: absolute; inset: -1px;
  background: radial-gradient(20rem 12rem at 50% -10%, rgba(255, 150, 50, 0.13), transparent 65%);
  pointer-events: none;
}
.profile-skin { width: 110px; height: 110px; border-radius: 22px; image-rendering: pixelated; margin: 6px auto 16px; background: var(--bg-3); border: 1px solid var(--line); box-shadow: 0 18px 44px -18px rgba(255, 110, 40, 0.45); }
.profile-name { font-family: var(--font-d); font-size: 25px; font-weight: 700; margin: 0 0 6px; word-break: break-word; }
.profile-meta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.stat-box { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 14px 10px; }
.stat-box b { font-family: var(--font-d); font-size: 21px; font-weight: 700; color: var(--amber); display: block; font-variant-numeric: tabular-nums; }
.stat-box span { font-size: 11px; color: var(--t3); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.profile-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.tiers-panel { padding: 26px; }
.tiers-panel h2 { font-family: var(--font-d); font-size: 16px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t2); margin: 0 0 18px; }
.tiers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tier-cell {
  display: flex; flex-direction: column; gap: 9px; padding: 15px;
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  transition: border-color 0.2s, transform 0.2s;
}
.tier-cell:hover { border-color: rgba(255, 184, 77, 0.3); transform: translateY(-2px); }
.tier-cell .m { font-size: 12px; font-weight: 600; color: var(--t3); letter-spacing: 0.06em; text-transform: uppercase; }
.tier-cell .dash { color: var(--t3); font-weight: 600; font-size: 13px; }

.sync-note { display: inline-flex; align-items: center; gap: 7px; color: var(--t3); font-size: 12.5px; }

/* ---------------- apply wizard ---------------- */
.wizard { max-width: 620px; margin-inline: auto; }
.wizard-steps { display: flex; align-items: center; gap: 10px; margin: 26px 0 30px; justify-content: center; }
.wstep { display: flex; align-items: center; gap: 9px; }
.wdot {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-weight: 700; font-size: 12.5px;
  background: var(--panel); border: 1px solid var(--line); color: var(--t3);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.wstep.active .wdot { background: linear-gradient(135deg, #ffc55e, #f0512f); border-color: transparent; color: #200a02; }
.wstep.done .wdot { background: rgba(122, 217, 139, 0.14); border-color: rgba(122, 217, 139, 0.4); color: var(--ok); }
.wlabel { font-size: 12.5px; font-weight: 600; color: var(--t3); letter-spacing: 0.04em; }
.wstep.active .wlabel { color: var(--t1); }
.wline { width: 46px; height: 1px; background: var(--line); }
.wpanel { padding: 32px; }
.wpanel h2 { font-family: var(--font-d); font-size: 21px; margin: 0 0 8px; }
.wpanel .hint { color: var(--t2); font-size: 14.5px; margin: 0 0 24px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--t2); margin-bottom: 8px; letter-spacing: 0.02em; }
.field input, .field select {
  width: 100%; padding: 13px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  color: var(--t1); font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder { color: var(--t3); }
.field input:focus, .field select:focus { outline: none; border-color: rgba(255, 184, 77, 0.45); box-shadow: 0 0 0 4px rgba(255, 150, 50, 0.10); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-alert {
  display: none; padding: 12px 15px; border-radius: 11px; font-size: 13.5px; margin-bottom: 18px;
  background: rgba(255, 122, 112, 0.08); border: 1px solid rgba(255, 122, 112, 0.3); color: var(--err);
}
.form-alert.show { display: block; }
.form-alert.info { background: rgba(255, 184, 77, 0.07); border-color: rgba(255, 184, 77, 0.3); color: var(--amber); }

.ign-result { display: none; align-items: center; gap: 14px; padding: 15px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 22px; }
.ign-result.show { display: flex; }
.ign-result img { width: 46px; height: 46px; border-radius: 10px; image-rendering: pixelated; background: var(--bg-3); }
.ign-result .info { flex: 1; min-width: 0; }
.ign-result .info b { font-family: var(--font-d); font-size: 16px; display: block; }
.ign-result .info span { font-size: 12.5px; color: var(--t3); }
.ign-result .chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }

.otp-row { display: flex; gap: 10px; justify-content: center; margin: 8px 0 22px; }
.otp-row input {
  width: 52px; height: 60px; text-align: center;
  font-family: var(--font-d); font-size: 24px; font-weight: 700;
  background: var(--panel); border: 1px solid var(--line); border-radius: 13px; color: var(--t1);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.otp-row input:focus { outline: none; border-color: rgba(255, 184, 77, 0.5); box-shadow: 0 0 0 4px rgba(255, 150, 50, 0.10); transform: translateY(-1px); }

.done-panel { text-align: center; padding: 44px 32px; }
.done-check {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(122, 217, 139, 0.12); border: 1px solid rgba(122, 217, 139, 0.4); color: var(--ok);
}
.done-check svg { width: 28px; height: 28px; }
.ref-chip {
  display: inline-block; font-family: ui-monospace, Menlo, monospace; font-size: 14px; letter-spacing: 0.08em;
  background: var(--panel); border: 1px solid var(--line); padding: 8px 16px; border-radius: 10px; color: var(--gold); margin: 6px 0 18px;
}

/* ---------------- 404 ---------------- */
.nf-wrap { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; padding-top: var(--nav-h); }
.nf-code { font-family: var(--font-d); font-size: clamp(5rem, 14vw, 9rem); font-weight: 700; line-height: 1; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------- toast ---------------- */
#toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 16px);
  background: rgba(24, 13, 7, 0.92); border: 1px solid var(--line);
  backdrop-filter: blur(14px); border-radius: 13px;
  padding: 12px 20px; font-size: 14px; color: var(--t1);
  opacity: 0; pointer-events: none; z-index: 300;
  transition: opacity 0.3s, transform 0.3s; max-width: 90vw;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- responsive ---------------- */
@media (max-width: 1024px) {
  .hero-grid { gap: 36px; }
  .mode-grid { grid-template-columns: repeat(2, 1fr); }
  .players-grid { grid-template-columns: repeat(2, 1fr); }
  .tiers-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .lb-row { grid-template-columns: 40px 42px minmax(100px, 1.3fr) 70px 80px auto; }
  .lb-tiers, .lb-head-row span:nth-child(6), .lb-row > .lb-tiers { display: none; }
  .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links, .nav-right .btn { display: none; }
  .nav-burger { display: inline-flex; }
  .hero { min-height: 0; padding-top: calc(var(--nav-h) + 48px); }
  .hero-grid { grid-template-columns: 1fr; }
  .top-panel { max-width: 480px; }
  .hero-trust { gap: 20px; }
  .section { padding: 64px 0; }
  .steps-grid { grid-template-columns: 1fr; }
  .players-grid { grid-template-columns: 1fr; }
  .mode-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .lb-head-row { display: none; }
  .lb-row { grid-template-columns: 34px 40px 1fr auto; gap: 10px; }
  .lb-region, .lb-points, .lb-view { display: none; }
  .lb-row .tier { display: none; }
  .tiers-grid { grid-template-columns: 1fr; }
  .wizard-steps .wlabel { display: none; }
  .otp-row input { width: 46px; height: 54px; font-size: 20px; }
  .wpanel { padding: 24px 20px; }
  .tests-scroller { grid-auto-columns: 260px; }
}
@media (max-width: 520px) {
  .wrap { padding-inline: 18px; }
  .hero h1 { font-size: clamp(2.2rem, 9vw, 2.8rem); }
  .top-row { grid-template-columns: 26px 36px 1fr auto; }
  .top-row .tier { display: none; }
  .cta-panel { padding: 40px 22px; }
}
