/* Practical Basketball Labs */

:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-2: #0e0e0e;
  --surface: #131313;
  --surface-2: #1a1a1a;
  --border: #232323;
  --border-strong: #333;
  --text: #f4f4f4;
  --text-2: #bdbdbd;
  --muted: #858585;
  --accent: #e11d2e;          /* Practical Basketball red */
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --green: #34d399;           /* "green release" */
  --green-soft: rgba(52, 211, 153, 0.12);
  --red: #ff4d5e;
  --tier-S: #e11d2e;
  --tier-A: #f97316;
  --tier-B: #eab308;
  --tier-C: #22c55e;
  --tier-D: #60a5fa;
  --series-1: #e11d2e;
  --series-2: #e5e5e5;
  --series-3: #60a5fa;
  --grid: #1f1f1f;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --radius: 12px;
  --radius-sm: 8px;
  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1160px;
}


* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Ticker ---------- */
.ticker {
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-track { display: inline-flex; gap: 48px; padding: 8px 0; animation: ticker 40s linear infinite; }
.ticker-track span::before { content: "●"; margin-right: 10px; opacity: 0.6; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo svg { width: 30px; height: 30px; flex-shrink: 0; }
.logo-img { height: 34px; width: auto; max-width: 200px; object-fit: contain; flex-shrink: 0; }
.site-footer .logo-img { height: 40px; }
.logo-p { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 65%, transparent)); }
.logo-text, .logo-short { font: 600 16px/1 var(--font-display); letter-spacing: -0.015em; white-space: nowrap; }
.logo-text em, .logo-short em { font-style: normal; color: var(--accent); }

.nav { display: flex; align-items: center; gap: 2px; margin-left: 12px; }
.nav a, .nav-drop > button {
  padding: 8px 12px; border-radius: 8px; color: var(--text-2);
  font-weight: 600; font-size: 14px; background: none; border: 0; cursor: pointer; white-space: nowrap;
}
.nav a:hover, .nav-drop > button:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); background: var(--surface-2); }
.nav-drop { position: relative; }
.nav-drop-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 6px; box-shadow: var(--shadow); display: none;
}
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu { display: block; }
.nav-drop-menu a { display: block; padding: 10px 12px; }
.nav-drop-menu a small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer;
}
.icon-btn:hover { border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.search-btn { display: flex; align-items: center; gap: 10px; width: auto; padding: 0 12px; color: var(--muted); font-size: 13px; }
.search-btn kbd { font: 11px var(--font-mono); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }
.menu-btn { display: none; }

@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  .search-btn span, .search-btn kbd { display: none; }
  .search-btn { width: 38px; padding: 0; justify-content: center; }
  body.nav-open .nav {
    display: flex; flex-direction: column; align-items: stretch;
    position: fixed; inset: 64px 0 auto 0; margin: 0; padding: 12px 16px 20px;
    background: var(--bg); border-bottom: 1px solid var(--border); max-height: calc(100vh - 64px); overflow-y: auto;
  }
  body.nav-open .nav-drop-menu { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; background: none; }
  body.nav-open .nav-drop > button { display: none; }
}

/* ---------- Buttons, chips, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 10px;
  font-weight: 600; font-size: 14px; border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, #fff); }
.btn-ghost { background: var(--surface); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-strong); }
.btn-danger { background: transparent; color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.input, .select, textarea.input {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); outline: none;
}
.input:focus, .select:focus { border-color: var(--accent); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 24px; }
.toolbar .input { max-width: 280px; }
.toolbar .select { width: auto; }

/* ---------- Tags / badges ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px;
  font: 600 11px/1.4 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}
.tag-accent { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 75%, var(--text)); border-color: transparent; }
.tag-green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.tier {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  font: 600 16.3px/1 var(--font-display); color: #10131a; flex-shrink: 0;
}
.tier-sm { width: 24px; height: 24px; font-size: 16px; border-radius: 6px; }
.tier-S { background: var(--tier-S); } .tier-A { background: var(--tier-A); }
.tier-B { background: var(--tier-B); } .tier-C { background: var(--tier-C); }
.tier-D { background: var(--tier-D); } .tier-none { background: var(--surface-2); color: var(--muted); }
kbd.key {
  display: inline-block; min-width: 26px; padding: 3px 7px; text-align: center;
  font: 600 12px/1.3 var(--font-mono); border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-bottom-width: 3px;
}

/* ---------- Layout sections ---------- */
main { min-height: 60vh; }
.page-head { padding: 48px 0 28px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.eyebrow { font: 600 12px/1 var(--font-mono); color: var(--accent); letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 12px; display: flex; gap: 8px; align-items: center; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
.page-head h1, .hero h1 { font: 600 clamp(32px, 4.4vw, 48px)/1.05 var(--font-display); letter-spacing: -0.02em; }
.page-head p { color: var(--text-2); max-width: 680px; margin: 14px 0 0; font-size: 16px; }
.section { padding: 36px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font: 600 24px/1.15 var(--font-display); letter-spacing: -0.02em; }
.section-head a { color: var(--accent); font-weight: 600; font-size: 14px; white-space: nowrap; }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; transition: border-color .15s, transform .15s; position: relative;
}
a.card:hover { border-color: var(--border-strong); background: color-mix(in srgb, var(--surface) 70%, var(--surface-2)); }
.card h3 { font-size: 17px; font-weight: 700; }
.card-top { display: flex; align-items: start; gap: 12px; margin-bottom: 12px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.card p { color: var(--text-2); margin: 8px 0 0; font-size: 14px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 112px 0 72px; overflow: hidden; text-align: center; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .14; mask-image: linear-gradient(to bottom, #000 40%, transparent); pointer-events: none; }

.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }
.hero .eyebrow { justify-content: center; }
.hero h1 { font-size: clamp(44px, 7vw, 80px); line-height: 1; letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: 18px; color: var(--text-2); max-width: 600px; margin: 22px auto 32px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hero-court { width: 100%; max-width: 440px; justify-self: end; }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } .hero-court { display: none; } }

.stat-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 40px; margin: 64px auto 0; padding-top: 28px; border-top: 1px solid var(--border); max-width: 860px; }
.stat { text-align: center; }
a.stat:hover b { color: var(--accent); }
.stat b { display: block; font: 600 26.6px/1 var(--font-display); }
.stat span { font: 500 11px/1.4 var(--font-mono); color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Attribute bars ---------- */
.attrs { display: grid; gap: 8px; }
.attr { display: grid; grid-template-columns: 110px 1fr 32px; gap: 10px; align-items: center; font-size: 13px; }
.attr-name { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attr-val { font: 600 13px var(--font-mono); text-align: right; }
.bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.bar.green > i { background: var(--green); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; padding: 12px 14px; font: 600 11px/1.2 var(--font-mono); letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--bg-2);
}
table.data th[data-sort] { cursor: pointer; user-select: none; }
table.data th[data-sort]:hover { color: var(--text); }
table.data th.sorted { color: var(--accent); }
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.num { font-family: var(--font-mono); text-align: right; white-space: nowrap; }
table.data th.num { text-align: right; }
.rank { font: 600 16.3px/1 var(--font-display); color: var(--muted); width: 36px; }
.pct-cell { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.pct-cell .bar { flex: 1; }
.pct-cell b { font: 600 13px var(--font-mono); width: 48px; text-align: right; }

/* ---------- Detail pages ---------- */
.detail { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.detail aside { position: sticky; top: 88px; display: grid; gap: 16px; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } .detail aside { position: static; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-weight: 600; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .pros-cons { grid-template-columns: 1fr; } }
.pros-cons ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; }
.pros-cons li { display: flex; gap: 8px; }
.pros li::before { content: "+"; color: var(--green); font-weight: 800; }
.cons li::before { content: "−"; color: var(--red); font-weight: 800; }
.card-title { font: 600 12px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.back { display: inline-flex; gap: 6px; color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.back:hover { color: var(--text); }

/* Rendered markdown */
.prose { color: var(--text-2); font-size: 16px; line-height: 1.75; }
.prose h2, .prose h3 { color: var(--text); margin: 1.6em 0 .5em; }
.prose h2 { font: 600 22.2px/1.1 var(--font-display); letter-spacing: -0.02em; }
.prose h3 { font-size: 19px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose code { font: 13px var(--font-mono); background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }
.prose blockquote { margin: 1em 0; padding: 4px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose > :first-child { margin-top: 0; }

/* ---------- Tier list ---------- */
.tier-row { display: grid; grid-template-columns: 90px 1fr; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; background: var(--surface); }
.tier-label { display: grid; place-items: center; font: 600 35.5px/1 var(--font-display); color: #10131a; }
.tier-items { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; align-items: center; min-height: 84px; }
.tier-pill { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; font-size: 14px; }
.tier-pill small { color: var(--muted); font-weight: 500; font-size: 12px; }
a.tier-pill:hover { border-color: var(--border-strong); }

/* ---------- Updates timeline ---------- */
.timeline { position: relative; display: grid; gap: 18px; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; }
.tl-item::before { content: ""; position: absolute; left: -26px; top: 22px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.tl-item ul { margin: 10px 0 0; padding-left: 18px; color: var(--text-2); font-size: 14px; }

/* ---------- Empty / loading ---------- */
.empty {
  text-align: center; padding: 56px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.empty svg { width: 44px; height: 44px; color: var(--accent); margin-bottom: 10px; }
.empty h3 { font: 600 20.7px/1 var(--font-display); letter-spacing: -0.02em; }
.empty p { color: var(--muted); margin: 8px auto 0; max-width: 420px; font-size: 14px; }
.skeleton { height: 140px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%) 0 0 / 200% 100%; animation: shimmer 1.2s infinite; border: 1px solid var(--border); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Compare tool ---------- */
.compare-pickers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
@media (max-width: 700px) { .compare-pickers { grid-template-columns: 1fr; } }
.picker { display: flex; align-items: center; gap: 10px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.legend span { display: inline-flex; gap: 8px; align-items: center; }
.cmp-chart { display: grid; gap: 14px; }
.cmp-row { display: grid; grid-template-columns: 130px 1fr; gap: 14px; align-items: center; }
.cmp-row > span { font-size: 13px; color: var(--text-2); }
.cmp-bars { display: grid; gap: 2px; position: relative; }
.cmp-bar { height: 10px; border-radius: 0 4px 4px 0; position: relative; cursor: default; }
.cmp-bar-hit { padding: 1px 0; }
.cmp-axis { display: grid; grid-template-columns: 130px 1fr; gap: 14px; font: 11px var(--font-mono); color: var(--muted); }
.cmp-axis div { display: flex; justify-content: space-between; }
.tooltip {
  position: fixed; z-index: 100; pointer-events: none; padding: 8px 10px; border-radius: 8px; font-size: 12px;
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); white-space: nowrap;
}
.tooltip b { font-family: var(--font-mono); }

/* ---------- Release trainer ---------- */
.trainer { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
@media (max-width: 900px) { .trainer { grid-template-columns: 1fr; } }
.trainer-stage {
  position: relative; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  min-height: 420px; display: grid; place-items: center; overflow: hidden; user-select: none; touch-action: none; cursor: pointer;
}
.meter { position: relative; width: 36px; height: 280px; border-radius: 18px; background: var(--surface-2); border: 2px solid var(--border-strong); overflow: hidden; }
.meter-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(to top, var(--accent), color-mix(in srgb, var(--accent) 50%, #fff)); }
.meter-window { position: absolute; left: 0; right: 0; background: var(--green-soft); border-top: 2px solid var(--green); border-bottom: 2px solid var(--green); }
.meter-peak { position: absolute; left: -2px; right: -2px; height: 2px; background: var(--green); }
.trainer-result { position: absolute; top: 28px; left: 0; right: 0; text-align: center; font: 600 38.5px/1 var(--font-display); letter-spacing: -0.02em; }
.trainer-result small { display: block; font: 500 13px var(--font-mono); color: var(--muted); letter-spacing: 0; margin-top: 6px; }
.trainer-hint { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--muted); }
.res-green { color: var(--green); } .res-early, .res-late { color: var(--tier-A); } .res-miss { color: var(--red); }

/* ---------- Search dialog ---------- */
dialog.search {
  width: min(620px, calc(100% - 32px)); padding: 0; border: 1px solid var(--border-strong); border-radius: 16px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow); margin-top: 12vh;
}
dialog.search::backdrop { background: rgba(5, 8, 14, .6); backdrop-filter: blur(3px); }
.search input { width: 100%; border: 0; border-bottom: 1px solid var(--border); padding: 18px 20px; background: none; font-size: 17px; outline: none; }
.search-results { max-height: 50vh; overflow-y: auto; padding: 8px; }
.search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; }
.search-results a:hover, .search-results a.sel { background: var(--surface-2); }
.search-empty { padding: 20px; color: var(--muted); text-align: center; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 80px; border-top: 1px solid var(--border); padding: 48px 0 28px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 28px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { font: 600 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.footer-grid a { display: block; color: var(--text-2); padding: 3px 0; }
.footer-grid a:hover { color: var(--accent); }
.disclaimer { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; line-height: 1.6; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 20px; right: 20px; z-index: 200; padding: 12px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: 14px; max-width: 360px; white-space: pre-line; }
.toast.err { border-color: var(--red); }
.toast.ok { border-color: var(--green); }

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .attr { grid-template-columns: 90px 1fr 30px; }
  .cmp-row, .cmp-axis { grid-template-columns: 90px 1fr; }
  .tier-row { grid-template-columns: 60px 1fr; }
  .tier-label { font-size: 36px; }
}

/* Inline icons default to text size */
.eyebrow svg, .btn svg, .back svg { width: 16px; height: 16px; flex-shrink: 0; }
.search-btn span { white-space: nowrap; }
.btn { white-space: nowrap; }
@media (max-width: 600px) {
  .header-inner { gap: 10px; }
  .header-actions { gap: 6px; }
  .logo { min-width: 0; }
  .logo svg { width: 26px; height: 26px; }
  .logo-img { height: 28px; max-width: 140px; }
}
table.data td:has(> a[href^="/shooting/"]) { min-width: 180px; }

/* ---------- Build Survey ---------- */

.survey-card { max-width: 760px; margin: 0 auto; padding: 28px; }
.survey-progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-bottom: 18px; }
.survey-progress i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .25s; }
.survey-step { font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.survey-q { font: 600 clamp(22.2px, 3vw, 31.1px)/1.05 var(--font-display); letter-spacing: -0.02em; margin: 6px 0 22px; }
.survey-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.survey-opt {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg-2); cursor: pointer; transition: border-color .12s, background .12s, transform .12s;
}
.survey-opt:hover { border-color: var(--border-strong); }
.survey-opt[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); }
.survey-opt b { display: block; font-size: 15px; }
.survey-opt small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.survey-opt .key { flex-shrink: 0; }
.survey-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }
.btn[disabled] { opacity: .4; cursor: default; }
.survey-summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.ring { position: relative; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; display: block; }
.ring span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.ring b { font: 600 19.2px/1 var(--font-display); }
.ring small { font: 500 9px/1.4 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.runner-up .ring b { font-size: 19px; }

.top-match { padding: 24px; border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.top-match-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.top-match-name { font: 600 clamp(22.2px, 3vw, 32.6px)/1 var(--font-display); letter-spacing: -0.02em; }
.top-match-body { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); }
@media (max-width: 760px) { .top-match-body { grid-template-columns: 1fr; } }
.reasons { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--text-2); }
.reasons li::before { content: "✓"; color: var(--green); font-weight: 800; margin-right: 6px; }

.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.badge-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; }
a.badge-card:hover { border-color: var(--accent); }
.badge-card small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.badge-cat { font: 600 10px/1.4 var(--font-mono); color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }

.video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--border); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Build sheet ---------- */
:root { --lvl-bronze: #b0703c; --lvl-silver: #a7b0bd; --lvl-gold: #e2b33c; --lvl-hof: #8b5cf6; }
.profile { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 22px; }
.profile div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.profile span { display: block; font: 500 10px/1.4 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.profile b { font: 600 19.2px/1.1 var(--font-display); letter-spacing: -0.02em; }
.rsheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px 32px; }
.rsheet-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 8px; }
.rsheet-head .mono { font-size: 12px; color: var(--muted); }
.rsheet-head .mono b { color: var(--text); }
.rrow { display: grid; grid-template-columns: 130px 1fr 92px; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }
.rname { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rnums { text-align: right; font-size: 13px; white-space: nowrap; }
.rbonus { color: var(--green); font-weight: 700; }
.rbar { display: flex; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.rbar i { display: block; height: 100%; }
.rbar i:last-child { border-radius: 0 4px 4px 0; }
.rbar-start { background: var(--border-strong); }
.rbar-gain { background: var(--accent); }
.rbar-bonus { background: var(--green); }
.rlegend { display: flex; gap: 12px; text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-weight: 500; font-size: 12px; }
.rlegend span { display: inline-flex; align-items: center; gap: 6px; }
.rlegend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
@media (max-width: 600px) { .rrow { grid-template-columns: 104px 1fr 78px; } .rsheet { grid-template-columns: 1fr; } }

.badge-groups { display: grid; gap: 16px; }
.badge-group-head { font: 600 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); margin-bottom: 8px; }
.badge-card { flex-direction: row; align-items: center; gap: 10px; }
.badge-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.badge-icon { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.badge-icon-lg { width: 44px; height: 44px; }
.badge-icon-xl { width: 72px; height: 72px; }
.lvl { flex-shrink: 0; font: 700 10px/1 var(--font-mono); letter-spacing: .06em; padding: 4px 6px; border-radius: 5px; color: #10131a; }
.lvl-bronze { background: var(--lvl-bronze); color: #fff; }
.lvl-silver { background: var(--lvl-silver); }
.lvl-gold { background: var(--lvl-gold); }
.lvl-hof { background: var(--lvl-hof); color: #fff; }

/* ---------- Game data pages ---------- */
:root { --lvl-diamond: #38d3f0; }
.lvl-diamond { background: var(--lvl-diamond); }
.keys { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.controls-table td:nth-child(2), .controls-table td:nth-child(3) { min-width: 200px; }
a.stat:hover { border-color: var(--border-strong); }
.lvl-legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.req-line { display: flex; gap: 8px; align-items: baseline; font-size: 13px !important; }

.anim-group { font: 600 17.8px/1 var(--font-display); letter-spacing: -0.02em; margin: 22px 0 10px; }
.anim-table td.req { font-size: 13px; min-width: 220px; }
.anim-table td.status { min-width: 180px; }
.anim-table tr.locked td:first-child b { color: var(--muted); }
.anim-table tr:target td { background: var(--accent-soft); }
.sig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.sig { display: flex; flex-direction: column; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 14px; }
.sig span { color: var(--accent); font-weight: 600; font-size: 13px; }

.qual-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px 24px; }
.qual-list { display: grid; gap: 6px; }
.qual { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; }
a.qual:hover { border-color: var(--border-strong); }
.qual small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.qual-none b { color: var(--muted); font-weight: 600; }
.unlock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.unlock { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); font-size: 13px; }
a.unlock:hover { border-color: var(--border-strong); }
.unlock > span { color: var(--text-2); font-weight: 600; }
.unlock b { font: 600 22.2px/1 var(--font-display); }
.unlock b small { font-size: 16px; color: var(--muted); }

.checker { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
.checker form { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; }
@media (max-width: 960px) { .checker { grid-template-columns: 1fr; } .checker form { position: static; max-height: none; } }
.ck-groups { display: grid; gap: 14px; }
.ck-group { border: 0; padding: 0; margin: 0; }
.ck-group legend { font: 600 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ck-row { display: grid; grid-template-columns: 120px 1fr 56px; gap: 10px; align-items: center; font-size: 13px; padding: 2px 0; }
.ck-row input[type="range"] { width: 100%; accent-color: var(--accent); }
.ck-row .num { padding: 5px 6px; text-align: center; font-family: var(--font-mono); }

.rt { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
@media (max-width: 900px) { .rt { grid-template-columns: 1fr; } }
.rt-chart { width: 100%; height: auto; display: block; }
.rt-grid { stroke: var(--grid); stroke-width: 1; }
.rt-axis { fill: var(--muted); font: 11px var(--font-mono); }
.rt-label { fill: var(--text); font: 600 12px var(--font-mono); }
.rt-line { fill: none; stroke: var(--accent); stroke-width: 2; }
.rt-reading { fill: var(--accent); opacity: .35; }
.rt-avg { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.rt-hit:hover .rt-avg { r: 8; }
.rt-nogreen { fill: color-mix(in srgb, var(--red) 8%, transparent); }
.rt-key { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--text-2); margin-top: 10px; }
.rt-key span { display: inline-flex; align-items: center; gap: 6px; }
.rt-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
@media (max-width: 600px) { .ck-row { grid-template-columns: 96px 1fr 50px; } }
.badge-card small { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Range test court diagram */
.rt-court { width: 100%; height: auto; display: block; border-radius: 10px; }
.rt-floor { fill: var(--surface-2); }
.rt-lines, .rt-lines * { fill: none; stroke: var(--border-strong); stroke-width: 0.22; }
.rt-paint { fill: color-mix(in srgb, var(--accent) 6%, transparent) !important; }
.rt-board { stroke: var(--text-2); stroke-width: 0.35; }
.rt-rim { fill: none; stroke: var(--accent); stroke-width: 0.3; }
.rt-edge { fill: none; stroke: var(--red); stroke-width: 0.18; stroke-dasharray: 0.6 0.6; opacity: .8; }
.rt-mark { fill: none; stroke-width: 0.75; stroke-linecap: round; }
.rt-hitarea { fill: none; stroke: transparent; stroke-width: 3; }
.rt-court .rt-hit { cursor: default; }
.rt-court .rt-hit:hover .rt-mark { stroke-width: 1.1; }
.rt-dist { font: 600 1.25px var(--font-mono); fill: var(--text-2); dominant-baseline: middle; }
.rt-spot { font: 700 1.7px var(--font-mono); fill: var(--text); letter-spacing: .05px; }
.rt-note { font: 500 1.2px var(--font-mono); fill: var(--red); }
.rt-c0 { stroke: #8fd18b; background: #8fd18b; }
.rt-c1 { stroke: #2fbf71; background: #2fbf71; }
.rt-c2 { stroke: #2bb3d6; background: #2bb3d6; }
.rt-c3 { stroke: #ff5c6c; background: #ff5c6c; }
.rt-c4 { stroke: #a37bff; background: #a37bff; }

/* Keep the header on one line at laptop widths */
@media (max-width: 1320px) {
  .header-inner { gap: 14px; }
  .nav { margin-left: 0; }
  .nav a, .nav-drop > button { padding: 8px 9px; }
  .search-btn span, .search-btn kbd { display: none; }
  .search-btn { width: 38px; padding: 0; justify-content: center; }
}

/* ---------- Accounts ---------- */
.auth-wrap { display: grid; place-items: start center; padding: 56px 16px 24px; }
.auth-card { width: min(440px, 100%); padding: 26px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); margin-bottom: 22px; }
.auth-tabs button { border: 0; background: none; padding: 9px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--text-2); cursor: pointer; }
.auth-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.auth-title { font: 600 28.1px/1 var(--font-display); letter-spacing: -0.02em; }
.auth-sub { margin: 8px 0 20px; font-size: 14px; }
.auth-form { display: grid; gap: 14px; }
.auth-form .btn-primary { justify-content: center; }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.field-hint { font-size: 12px; font-weight: 500; color: var(--muted); }
.field-hint.good { color: var(--green); }
.field-hint.bad { color: var(--red); }
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--surface-2); color: var(--text-2); font: 600 12px var(--font-body); padding: 5px 9px; border-radius: 7px; cursor: pointer; }
.pw-rules { list-style: none; padding: 0; margin: -4px 0 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.pw-rules li { padding: 4px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.pw-rules li::before { content: "○ "; }
.pw-rules li.met { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); background: var(--green-soft); }
.pw-rules li.met::before { content: "✓ "; }
.pw-rules.has-name::after { content: "Can't contain your username"; padding: 4px 9px; border-radius: 999px; color: var(--red); border: 1px solid color-mix(in srgb, var(--red) 45%, transparent); }
.auth-error { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); border: 1px solid color-mix(in srgb, var(--red) 35%, transparent); }
.auth-foot { text-align: center; font-size: 13px; margin: 0; }
.auth-foot a { color: var(--accent); font-weight: 600; }
.btn:disabled { opacity: .6; cursor: default; }

.login-btn { white-space: nowrap; }
.account-btn { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 4px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 13px; }
.account-btn:hover { border-color: var(--border-strong); }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font: 600 12.6px/1 var(--font-display); }
.account-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-drop .nav-drop-menu { left: auto; right: 0; min-width: 210px; }
.account-head { display: flex; flex-direction: column; padding: 8px 12px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.account-head small { color: var(--muted); font-size: 12px; }
.account-menu a, .account-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; border: 0; background: none; font-weight: 600; font-size: 14px; color: var(--text-2); cursor: pointer; }
.account-menu a:hover, .account-menu button:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Coming soon ---------- */
.nav a { position: relative; }
.soon { position: absolute; top: -7px; right: -6px; padding: 2px 5px; border-radius: 5px; background: var(--accent); color: var(--accent-ink); font: 700 8.5px/1.1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; pointer-events: none; box-shadow: 0 0 0 2px var(--bg); }

.soon-card { max-width: 640px; margin: 8px auto 24px; text-align: center; padding: 44px 28px; border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface); }
.soon-card h2 { font: 600 34px/1 var(--font-display); letter-spacing: -0.02em; margin: 14px 0 10px; }
.soon-card p { color: var(--text-2); max-width: 480px; margin: 0 auto 12px; }
.soon-badge { display: inline-block; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 700 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.preview-banner { margin: 0 0 20px; padding: 10px 14px; border-radius: 10px; font-size: 13px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); color: var(--text-2); }

/* ---------- Shooting Lab method + creators ---------- */
.method { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 28px; }
.method div { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.method b { display: block; font: 600 22.2px/1 var(--font-display); letter-spacing: -0.02em; color: var(--accent); }
.method span { font-size: 13px; color: var(--text-2); }
@media (max-width: 700px) { .method { grid-template-columns: 1fr; } }
.more-soon { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 4px 0 32px; padding: 12px; border-radius: 12px; border: 1px dashed var(--border-strong); color: var(--text-2); font-size: 14px; }
.more-soon svg { width: 16px; height: 16px; color: var(--accent); }
.creator-top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.creator-avatar { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.creator-avatar.initials { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 600 17.8px/1 var(--font-display); }
.creator.featured { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.creator-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

/* ---------- Header fit (wide nav + account) ---------- */
.site-header .wrap { max-width: 1440px; padding: 0 24px; }
.nav a, .nav-drop > button { padding: 8px 10px; }
.logo-short { display: none; }
@media (max-width: 1439px) { .account-name { display: none; } .account-btn { padding: 0 4px; } }
@media (max-width: 1365px) {
  .logo-text { display: none; }
  .logo-short { display: inline; }
  .header-inner { gap: 12px; }
}
@media (max-width: 1120px) {
  .nav { display: none; }
  .menu-btn { display: inline-grid; }
  body.nav-open .nav {
    display: flex; flex-direction: column; align-items: stretch;
    position: fixed; inset: 64px 0 auto 0; margin: 0; padding: 12px 16px 20px;
    background: var(--bg); border-bottom: 1px solid var(--border); max-height: calc(100vh - 64px); overflow-y: auto;
  }
  body.nav-open .nav-drop-menu { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; background: none; }
  body.nav-open .nav-drop > button { display: none; }
  body.nav-open .nav .soon { position: static; margin-left: 8px; box-shadow: none; }
}
@media (max-width: 600px) {
  .site-header .wrap { padding: 0 14px; }
  .header-actions { gap: 6px; }
  .login-btn { padding: 7px 10px; }
}

/* ---------- Edit mode ---------- */
#edit-bar { position: fixed; right: 18px; bottom: 18px; z-index: 150; display: flex; gap: 10px; align-items: center; }
#edit-bar.on { left: 18px; justify-content: space-between; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--accent); box-shadow: var(--shadow); font-size: 14px; color: var(--text-2); }
#edit-bar .btn-ghost { box-shadow: var(--shadow); }
body.editing [data-edit] { outline: 1.5px dashed color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; border-radius: 3px; cursor: text; min-width: 1ch; display: inline-block; }
body.editing [data-edit]:hover { background: var(--accent-soft); }
body.editing [data-edit]:focus { outline: 2px solid var(--accent); background: var(--accent-soft); }
[data-multiline] { white-space: pre-line; }
body.editing [data-edit-block] { position: relative; outline: 1.5px dashed color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 4px; border-radius: 6px; }
.block-edit { position: absolute; top: 6px; right: 6px; z-index: 5; padding: 5px 10px; border-radius: 8px; border: 0; background: var(--accent); color: var(--accent-ink); font: 700 12px var(--font-body); cursor: pointer; }
#ticker [data-edit-block] .block-edit { top: 2px; padding: 2px 8px; }
body.editing { padding-bottom: 72px; }

/* ---------- Dialogs ---------- */
dialog.modal { width: min(520px, calc(100% - 32px)); padding: 0; border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
dialog.modal::backdrop { background: rgba(5, 8, 14, .6); backdrop-filter: blur(3px); }
.modal-body { display: grid; gap: 14px; padding: 22px; }
.modal-body h2 { font: 600 22.2px/1 var(--font-display); letter-spacing: -0.02em; }
.modal-body textarea { font-family: var(--font-mono); font-size: 13px; resize: vertical; }
.modal-actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.img-field { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.img-preview { width: 72px; height: 72px; border-radius: 12px; border: 1px dashed var(--border-strong); display: grid; place-items: center; overflow: hidden; background: var(--bg-2); font-size: 11px; }
.img-preview img { width: 100%; height: 100%; object-fit: contain; }
.img-preview:has(img[src*="/uploads/"]) { width: auto; min-width: 72px; max-width: 220px; padding: 6px; background: #0a0a0a; }

/* ---------- Season rewards ---------- */
.season-card { display: flex; gap: 24px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; padding: 22px; }
.season-name { font: 600 clamp(25.2px, 3.7vw, 38.5px)/1 var(--font-display); letter-spacing: -0.02em; }
.season-card p { color: var(--text-2); max-width: 640px; }
.season-stats { display: flex; gap: 10px; }
.season-stats div { text-align: center; padding: 10px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); min-width: 80px; }
.season-stats b { display: block; font: 600 23.7px/1 var(--font-display); }
.season-stats span { font: 600 11px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.track { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.track:focus-visible { outline: 2px solid var(--accent); }
.track-head, .track-row { display: grid; grid-template-columns: 64px 1fr 1fr; gap: 10px; align-items: stretch; padding: 8px 12px; }
.track-head { background: var(--bg-2); border-bottom: 1px solid var(--border); font: 600 12px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); align-items: center; }
.track-col { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 4px 10px; border-radius: 8px; }
.track-col.free { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); }
.track-col.paid { background: var(--accent-soft); color: var(--accent); }
.track-add { width: 30px; height: 30px; border-radius: 8px; border: 0; cursor: pointer; font: 700 20px/1 var(--font-body); color: #fff; background: var(--accent); }
.track-col.free .track-add { background: var(--green); color: #06130c; }
/* The rewards list scrolls on its own; the page doesn't scroll while the wheel is over it. */
.track-scroll { max-height: min(560px, 65vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.track-row { border-bottom: 1px solid var(--border); }
.track-row:last-child { border-bottom: 0; }
.lvl-num { display: grid; place-items: center; font: 600 20.7px/1 var(--font-display); color: var(--text-2); }
.reward { position: relative; display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); min-height: 64px; }
.reward.free { border-left: 3px solid var(--green); }
.reward.paid { border-left: 3px solid var(--accent); }
.reward.none { justify-content: center; background: none; border-style: dashed; }
.reward.add { justify-content: center; border-style: dashed; background: none; color: var(--text-2); font-weight: 700; font-size: 13px; cursor: pointer; }
.reward.add:hover { border-color: var(--accent); color: var(--accent); }
.reward-img { width: 48px; height: 48px; border-radius: 10px; object-fit: contain; background: var(--bg-2); flex-shrink: 0; }
.reward-img.noimg { display: grid; place-items: center; color: var(--muted); border: 1px dashed var(--border); }
.reward-img.noimg svg { width: 20px; height: 20px; }
.reward-text { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.reward-text small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.reward-edit { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text-2); }
.reward-edit:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 640px) {
  .track-head, .track-row { grid-template-columns: 40px 1fr 1fr; gap: 6px; padding: 6px 8px; }
  .reward { flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px; }
  .reward-img { width: 40px; height: 40px; }
  .lvl-num { font-size: 22px; }
}

/* Home teasers */
.season-teaser { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; align-items: center; }
@media (max-width: 760px) { .season-teaser { grid-template-columns: 1fr; } }
.mini-track { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-track th { text-align: left; font: 600 10px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 4px 6px; }
.mini-track td { padding: 6px; border-top: 1px solid var(--border); }
.mini-reward { display: inline-flex; gap: 6px; align-items: center; }
.mini-reward img { width: 22px; height: 22px; object-fit: contain; border-radius: 5px; }
.range-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.range-chips span { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.range-chips b { font: 600 19.2px/1 var(--font-display); color: var(--accent); }
.range-chips small { font-size: 12px; color: var(--muted); }

/* Guides */
.byline { color: var(--muted); }
.byline b { color: var(--text-2); }
.guide-card { display: flex; flex-direction: column; }
.guide-cover { width: calc(100% + 36px); margin: -18px -18px 14px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.guide-meta { display: flex; align-items: center; gap: 12px; margin-top: 18px; font-size: 14px; }
.guide-meta .avatar { width: 38px; height: 38px; font-size: 20px; }
.guide-hero { width: 100%; border-radius: var(--radius); margin-bottom: 20px; }
.prose figure { margin: 1.4em 0; }
.prose figure img, .prose img { max-width: 100%; border-radius: 10px; display: block; }
.prose figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; text-align: center; }
body.editing .toast { bottom: 88px; }
.guide-hero { aspect-ratio: 16 / 9; max-height: 440px; object-fit: cover; background: var(--surface-2); }
.prose figure img { margin: 0 auto; max-height: 520px; }
.season-teaser .season-name { font-size: clamp(30px, 4vw, 40px); }
a.range-teaser { display: block; }

/* ---------- Premium ---------- */
#ticker[hidden] { display: none; }
.upgrade-btn { white-space: nowrap; }
.upgrade-btn[hidden] { display: none; }
@media (max-width: 760px) { .upgrade-btn { display: none; } }
.lock-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 70%, var(--text));
  font: 600 11px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
}
.lock-badge svg, .lock-inline svg, .locked-note > svg { width: 13px; height: 13px; flex-shrink: 0; }
.lock-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.lock-inline b { color: var(--text-2); }
a.lock-inline:hover b { color: var(--text); }

.locked-card { display: flex; flex-direction: column; gap: 14px; min-height: 150px; overflow: hidden; }
.locked-blur { display: grid; gap: 8px; filter: blur(5px); opacity: .55; user-select: none; }
.locked-blur span { display: block; height: 10px; border-radius: 5px; background: var(--border-strong); }
.locked-blur span:nth-child(1) { width: 70%; }
.locked-blur span:nth-child(2) { width: 90%; }
.locked-blur span:nth-child(3) { width: 50%; }
.locked-info { display: grid; gap: 6px; justify-items: start; margin-top: auto; }
.locked-info h3 { color: var(--text-2); }
.locked-info small { color: var(--muted); font-size: 13px; }
a.locked-card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }

.blur-bar { display: inline-block; width: 90px; max-width: 100%; height: 9px; border-radius: 5px; background: var(--border-strong); filter: blur(3px); opacity: .6; vertical-align: middle; }
.locked-row td { color: var(--muted); }
.locked-sig { gap: 8px; }
.locked-sig b { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.locked-sig svg { width: 12px; height: 12px; }

.locked-note {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 0; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: 14px; color: var(--text-2);
}
.locked-note > svg { color: var(--accent); }
.locked-note span { flex: 1; min-width: 180px; }

.paywall { position: relative; margin-top: 8px; }
.paywall-blur { display: grid; gap: 14px; filter: blur(6px); opacity: .5; user-select: none; pointer-events: none; padding: 8px 0 120px; }
.paywall-blur p { height: 12px; margin: 0; border-radius: 6px; background: var(--border-strong); }
.paywall::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent, var(--bg) 70%); pointer-events: none; }
.paywall-card {
  position: absolute; left: 50%; top: 40px; transform: translateX(-50%); z-index: 1; width: min(460px, 100%);
  display: grid; gap: 12px; justify-items: center; text-align: center; padding: 28px 24px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow);
}
.paywall-card h3 { font: 600 22px/1.2 var(--font-display); letter-spacing: -0.02em; }
.paywall-card p { margin: 0; color: var(--text-2); font-size: 15px; }

.premium-hero { padding: 88px 0 24px; text-align: center; }
.premium-hero h1 { font: 600 clamp(36px, 6vw, 64px)/1.02 var(--font-display); letter-spacing: -0.035em; margin: 18px 0 0; }
.premium-hero .lead { color: var(--text-2); font-size: 18px; max-width: 560px; margin: 18px auto 20px; }
.premium-wrap { max-width: 860px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; display: grid; gap: 10px; align-content: start; padding: 26px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 50px -20px color-mix(in srgb, var(--accent) 45%, transparent); }
.plan-flag { position: absolute; top: -11px; left: 24px; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 11px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.plan-name { font-weight: 600; color: var(--text-2); }
.plan-price { font: 600 44px/1 var(--font-display); letter-spacing: -0.03em; }
.plan-price small { font: 500 15px var(--font-body); color: var(--muted); letter-spacing: 0; }
.plan p { margin: 0 0 8px; font-size: 14px; }
.plan .btn { justify-content: center; }
.plan-note { text-align: center; font-size: 14px; margin: 18px 0 0; }
.benefits-title { font: 600 24px/1.2 var(--font-display); letter-spacing: -0.02em; text-align: center; margin: 64px 0 22px; }
.benefits { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
@media (max-width: 640px) { .benefits { grid-template-columns: 1fr; } }
.benefits li { display: flex; gap: 12px; align-items: flex-start; }
.benefits li > svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.benefits b { font-size: 15px; }
.benefits p { margin: 2px 0 0; color: var(--text-2); font-size: 14px; }
.premium-done { max-width: 620px; text-align: center; padding: 100px 20px; display: grid; gap: 14px; justify-items: center; }
.premium-done h1 { font: 600 clamp(32px, 5vw, 48px)/1.05 var(--font-display); letter-spacing: -0.03em; }
.premium-done .lead { color: var(--text-2); font-size: 17px; margin: 0; }
.plan-card { display: grid; gap: 12px; }

/* Admin dialogs */
dialog.modal.wide { width: min(760px, calc(100% - 32px)); }
.modal-body { max-height: calc(100vh - 64px); overflow-y: auto; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .two-col { grid-template-columns: 1fr; } }
.benefit-edit { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; align-items: center; }
@media (max-width: 560px) { .benefit-edit { grid-template-columns: 1fr auto; } .benefit-edit [data-b=text] { grid-column: 1; } }
.limits { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 12px; }
.limits label { display: grid; gap: 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.limits .input { padding: 7px 10px; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; }
.select-sm { padding: 6px 8px; font-size: 13px; width: auto; }

/* ---------- Dribble Tut ---------- */
.section-sub { margin: 6px 0 0; font-size: 14px; }
.tut { display: flex; flex-direction: column; gap: 10px; }
.tut-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tut-head h3 { font-size: 16px; font-weight: 600; }
.tut-video { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; border: 1px solid var(--border); display: block; object-fit: contain; }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; font-size: 13px; color: var(--text-2); }
.empty-line { padding: 22px; border: 1px dashed var(--border-strong); border-radius: var(--radius); text-align: center; color: var(--muted); font-size: 14px; }
.progress { position: relative; height: 22px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.progress[hidden] { display: none; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); transition: width .15s; }
.progress span { position: relative; display: block; text-align: center; font: 600 11px/22px var(--font-mono); color: var(--text); }
.footer-grid a.logo { display: flex; padding: 0; color: var(--text); }
.site-footer .logo-text { display: inline; }
.nav-upgrade { display: none; }
@media (max-width: 1120px) {
  body.nav-open .nav a.nav-upgrade:not([hidden]) { display: block; order: 99; margin-top: 8px; background: var(--accent); color: var(--accent-ink); text-align: center; }
}
.console-logo { display: flex; flex-direction: column; gap: 4px; }
.console-logo small { font-size: 11px; color: var(--muted); }

/* ---------- Tier list tabs ---------- */
.soon-inline { margin-left: 4px; padding: 1px 5px; border-radius: 4px; background: var(--surface-2); color: var(--muted); font: 600 9px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; vertical-align: 1px; }
.chip[aria-pressed="true"] .soon-inline { background: transparent; color: inherit; }
.tier-pill span { display: inline-flex; align-items: center; gap: 5px; }
.tier-pill.locked { color: var(--text-2); }
.tier-pill.locked svg { width: 12px; height: 12px; color: var(--muted); }

/* ---------- Comments ---------- */
.comments { max-width: 820px; }
.comment-form { display: grid; gap: 8px; margin-bottom: 22px; }
.comment-form textarea { resize: vertical; min-height: 84px; font-family: var(--font-body); font-size: 14px; }
.comment-form-bar { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.comment-form-bar [data-count] { margin-right: auto; font-size: 12px; }
.comment-login { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; margin-bottom: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: 14px; color: var(--text-2); }
.comment-login span { flex: 1; min-width: 200px; }
.comment-list { display: grid; gap: 4px; }
.comment-thread { padding: 14px 0; border-top: 1px solid var(--border); }
.comment-thread:first-child { border-top: 0; }
.comment { display: flex; gap: 12px; align-items: flex-start; }
.comment .avatar { flex-shrink: 0; width: 32px; height: 32px; font-size: 14px; }
.comment.reply .avatar { width: 26px; height: 26px; font-size: 12px; background: var(--surface-2); color: var(--text-2); }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.comment-head .muted { font-size: 12px; }
.comment-body { margin: 4px 0 0; font-size: 15px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.mention { color: var(--accent); font-weight: 600; }
.comment-actions { display: flex; gap: 14px; margin-top: 6px; }
.comment-actions button { border: 0; background: none; padding: 0; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.comment-actions button:hover { color: var(--text); }
.comment-actions [data-delete]:hover { color: var(--red); }
.comment-slot .comment-form { margin: 10px 0 0; }
.replies { display: grid; gap: 14px; margin: 14px 0 0 44px; padding-left: 14px; border-left: 2px solid var(--border); }
.comment.deleted p { margin: 0; font-size: 14px; font-style: italic; }
@media (max-width: 600px) { .replies { margin-left: 16px; } }

/* ---------- Creator assets ---------- */
.folder-card { display: flex; flex-direction: column; gap: 8px; }
.folder-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.folder-icon { font-size: 26px; line-height: 1; }
.folder-card p { margin: 0; }
.asset-list { display: grid; gap: 8px; }
.asset-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.asset-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.asset-kind { display: grid; place-items: center; font: 600 11px var(--font-mono); color: var(--muted); letter-spacing: .06em; }
.asset-info { flex: 1; min-width: 0; display: grid; }
.asset-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-info small { font-size: 12px; }
@media (max-width: 600px) { .asset-row { flex-wrap: wrap; } .asset-row .btn { flex: 1; justify-content: center; } }
.dropzone { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 26px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); cursor: pointer; font-size: 14px; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.upload-row { display: grid; grid-template-columns: minmax(0, 1fr) 2fr; gap: 12px; align-items: center; font-size: 13px; }
.upload-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-row .progress { margin: 0; }
.upload-row.failed .progress span { color: var(--red); }
