:root {
  --bg: #000;
  --panel: rgba(10, 10, 11, .88);
  --panel-2: rgba(22, 22, 24, .88);
  --panel-solid: #0b0b0c;
  --line: rgba(255, 255, 255, .11);
  --line-2: rgba(255, 255, 255, .26);
  --text: #f2f2f4;
  --muted: #9a9aa3;
  --muted-2: #5f5f68;
  --accent: #ffffff;
  --accent-2: #d9d9de;
  --accent-ink: #0a0a0c;
  --danger: #ff6b6b;
  --ok: #7ee2a8;
  --warn: #ffd166;
  --r: 6px;
  --r-s: 4px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .6);
  --font: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Unbounded", var(--font);
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
* { box-sizing: border-box; }
html { color-scheme: dark; scrollbar-color: #2a2a30 transparent; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(255, 255, 255, .4); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2a2a30; border-radius: 10px; border: 2px solid #000; }
::-webkit-scrollbar-track { background: transparent; }

/* backdrop */
.bg { position: fixed; inset: 0; z-index: -1; background: #000; }
.bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* surfaces */
.glass { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.glass-2 { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-s); }
.card { padding: 20px; }
.card h3 { margin: 0 0 10px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-family: var(--display); font-weight: 700; color: var(--accent-2); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.hide { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.right { text-align: right; }

/* loaders: a proper rotating ring */
.spin { display: inline-block; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .18); border-top-color: var(--accent); animation: spin .7s linear infinite; vertical-align: middle; flex: none; }
.spin.lg { width: 44px; height: 44px; border-width: 4px; }
.spin.sm { width: 14px; height: 14px; border-width: 2px; }
.loader { display: grid; place-items: center; padding: 56px 20px; }
.loader .spin { margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn .spin { width: 16px; height: 16px; border-width: 2px; }

/* nav */
.nav { position: sticky; top: 10px; z-index: 50; margin: 10px auto 0; max-width: 1280px; padding: 0 16px; }
.nav-inner { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 10px; border-radius: 8px; background: rgba(6, 6, 7, .86); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); border: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 900; letter-spacing: -.01em; font-size: 16px; margin-right: 10px; padding: 4px 8px 4px 4px; border-radius: 6px; white-space: nowrap; flex: none; }
.brand img { width: 28px; height: 28px; border-radius: 4px; flex: none; }
.nav-links { display: flex; gap: 1px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { position: relative; padding: 8px 11px; border-radius: 4px; color: var(--muted); font-weight: 500; font-size: 13.5px; transition: color .15s, background .15s; white-space: nowrap; }
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, .1); }
.nav-links a.active { color: var(--text); background: rgba(255, 255, 255, .12); }
.nav-right { display: flex; align-items: center; gap: 6px; flex: none; }
.nav-user { display: flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border-radius: 5px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); transition: background .15s; }
.nav-user:hover { background: rgba(255, 255, 255, .14); }
.nav-user .av { width: 26px; height: 26px; border-radius: 4px; overflow: hidden; background: #1a1a1f; }
.nav-user b { font-size: 13px; font-weight: 600; display: block; line-height: 1.1; }
.nav-user .lvl { font-size: 11px; color: var(--muted); }
.burger { display: none; }
.mobile-menu { display: none; }
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .burger { display: inline-flex; }
  .mobile-menu { display: block; position: fixed; inset: 0; z-index: 60; background: rgba(0, 4, 12, .97); padding: 24px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .2s; overflow: auto; }
  .mobile-menu.open { transform: none; opacity: 1; pointer-events: auto; }
  .mobile-menu a { display: block; padding: 13px 8px; font-size: 19px; font-family: var(--display); font-weight: 700; border-bottom: 1px solid var(--line); }
}

/* layout */
.page { max-width: 1280px; margin: 0 auto; padding: 26px 16px 80px; animation: pagein .3s var(--ease); }
@keyframes pagein { from { opacity: 0; transform: translateY(8px); } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
h1, h2 { font-family: var(--display); letter-spacing: -.01em; margin: 0; }
h1 { font-size: 30px; font-weight: 900; line-height: 1.1; }
h2 { font-size: 18px; font-weight: 700; }
.eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 8px; font-family: var(--display); }
.lead { color: var(--muted); font-size: 15.5px; max-width: 62ch; margin: 8px 0 0; }
.section { margin-top: 34px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head a { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.section-head a:hover { color: var(--text); transform: translateX(2px); }
.section-head a { transition: color .15s, transform .15s; }
.count { color: var(--muted); font-weight: 500; font-size: 13px; margin-left: 8px; font-family: var(--font); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border-radius: 5px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: var(--text); font-weight: 600; font-size: 13.5px; cursor: pointer; transition: background .15s, border-color .15s, transform .12s var(--ease); white-space: nowrap; line-height: 1.2; }
.btn:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .5); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: #e4e4e8; border-color: #e4e4e8; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, .1); }
.btn.danger { color: var(--danger); border-color: rgba(255, 107, 107, .3); }
.btn.danger:hover { background: rgba(255, 107, 107, .1); }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn.xs { padding: 4px 8px; font-size: 12px; gap: 5px; }
.btn.icon { padding: 8px; width: 36px; height: 36px; border-radius: 5px; }
.btn.icon.sm { width: 30px; height: 30px; padding: 5px; }
.btn.on { background: rgba(255, 255, 255, .28); border-color: rgba(255, 255, 255, .6); }
.btn svg, .ic { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn.xs svg { width: 13px; height: 13px; }

/* inputs */
.input, select.input, textarea.input { width: 100%; padding: 10px 14px; border-radius: 5px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .5); color: var(--text); outline: none; transition: border-color .15s, background .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); background: rgba(0, 0, 0, .65); }
.input::placeholder { color: var(--muted-2); }
textarea.input { resize: vertical; min-height: 84px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239a9aa3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
select.input option { background: #0c0c0f; }
.input.sm { padding: 7px 10px; font-size: 13px; border-radius: 4px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
label.field > span { font-weight: 500; }
.search { position: relative; }
.search .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 38px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { padding: 6px 12px; border-radius: 4px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--muted); font-size: 13px; font-weight: 500; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.pill:hover { color: var(--text); border-color: var(--line-2); background: rgba(255, 255, 255, .1); }
.pill.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 3px; background: rgba(255, 255, 255, .1); font-size: 12px; color: var(--muted); }
a.tag:hover { color: var(--text); background: rgba(255, 255, 255, .2); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 3px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .08); }
.badge.lvl { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-family: var(--display); font-size: 10.5px; }
.badge.soft { border-color: transparent; background: rgba(255, 255, 255, .1); color: var(--muted); }
.badge.ok { border-color: rgba(93, 228, 161, .4); color: var(--ok); }
.badge.warn { border-color: rgba(255, 209, 102, .4); color: var(--warn); }
.badge.bad { border-color: rgba(255, 107, 107, .4); color: var(--danger); }
.badge.live { background: var(--ok); color: #03140a; border-color: var(--ok); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(93, 228, 161, 0); } }

/* skin cards */
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.skin-grid.compact { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.skin-card { display: flex; flex-direction: column; padding: 10px 12px 12px; gap: 8px; position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); transition: transform .18s var(--ease), border-color .18s, background .18s; will-change: transform; overflow: hidden; transform-style: preserve-3d; }

.skin-card:hover { border-color: var(--line-2); background: var(--panel-2); }
.skin-art { aspect-ratio: 1; display: grid; place-items: center; position: relative; }
.skin-art::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .07), transparent 70%); }
.skin-art svg { width: 76%; height: 76%; position: relative; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .6)); transition: transform .25s var(--ease); }
.skin-card:hover .skin-art svg { transform: scale(1.06); }
.skin-name { font-weight: 600; font-size: 14px; }
.skin-by { font-size: 12px; color: var(--muted); }
.skin-stats { display: flex; gap: 10px; font-size: 12px; color: var(--muted); }
.skin-stats span { display: inline-flex; align-items: center; gap: 4px; }
.skin-stats svg { width: 12px; height: 12px; }
.skin-card .ribbon { position: absolute; top: 10px; left: 10px; z-index: 2; }
.skin-card .quick { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; opacity: 0; transform: translateY(-4px); transition: opacity .15s, transform .15s; z-index: 2; }
.skin-card:hover .quick, .skin-card:focus-within .quick { opacity: 1; transform: none; }
.skin-card .quick .btn { background: rgba(8, 8, 9, .92); }
@media (hover: none) { .skin-card .quick { opacity: 1; transform: none; } }
.skeleton { background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .1), rgba(255, 255, 255, .04)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r); min-height: 220px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; font-family: var(--display); font-weight: 700; }

/* home */
.hero { padding: 44px 36px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; position: relative; overflow: hidden; min-height: 520px; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.02; }
.hero h1 span { color: var(--muted); }
.hero .lead { margin: 16px 0 0; }
.wall { position: relative; height: 480px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent); }
.wall .col { display: flex; flex-direction: column; gap: 14px; will-change: transform; animation: wallup var(--dur, 40s) linear infinite; }
.wall .col.down { animation-name: walldown; }
.wall:hover .col { animation-play-state: paused; }
.wall .orb { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; transition: transform .25s var(--ease), filter .25s; flex: none; }
.wall .orb:hover { transform: scale(1.1); filter: brightness(1.15); }
.wall .orb svg { width: 100%; height: 100%; filter: drop-shadow(0 18px 36px rgba(0, 0, 0, .7)); }
@keyframes wallup { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes walldown { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.stat { padding: 14px 16px; }
.stat b { font-family: var(--display); font-size: 22px; display: block; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 12px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 18px; }
.feature { padding: 18px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; transition: border-color .18s, background .18s; }

.feature:hover { border-color: var(--line-2); background: var(--panel-2); }
.feature .ic { width: 22px; height: 22px; color: var(--accent); }
.feature b { font-family: var(--display); font-size: 14px; }
.feature span { color: var(--muted); font-size: 13px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding: 32px 22px; min-height: 0; } .stats-row { grid-template-columns: repeat(2, 1fr); } .wall { height: 300px; } }

/* filter bar */
.filters { position: sticky; top: 72px; z-index: 20; padding: 12px 14px; margin-bottom: 16px; background: rgba(3, 8, 18, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: var(--r); }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); font-weight: 600; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover td, .table tr:hover td { background: rgba(255, 255, 255, .06); }
.table a.name { position: relative; }
.table a.name::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1px; background: #fff; transition: right .2s var(--ease); }
.table a.name:hover::after { right: 0; }
.table a.name:hover { text-decoration: none; }
.table tr:last-child td { border-bottom: 0; }
.table tr.me td { background: rgba(255, 255, 255, .1); }
.table .rank { color: var(--muted); font-family: var(--display); font-weight: 700; width: 52px; font-size: 13px; }
.table .rank.top { color: var(--accent); }
.table a.name { font-weight: 600; }
.table a.name:hover { text-decoration: underline; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.online { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; }
.offline { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); margin-right: 6px; }
.rating { font-family: var(--display); font-weight: 700; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.up { color: var(--ok); } .dn { color: var(--danger); }

/* progress */
.progress { height: 6px; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.progress > i { display: block; height: 100%; background: #fff; border-radius: 2px; transition: width .6s var(--ease); }
.big-num { font-family: var(--display); font-size: 36px; font-weight: 900; line-height: 1; }

/* tabs */
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 6px; background: rgba(0, 0, 0, .5); border: 1px solid var(--line); width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { padding: 7px 14px; border-radius: 4px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.tabs button:hover { color: var(--text); }
.tabs button.on { background: rgba(255, 255, 255, .25); color: var(--text); }

/* modal */
.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .18s; }
.modal-root.open { opacity: 1; pointer-events: auto; }
.modal { width: min(540px, 100%); max-height: 90vh; overflow: auto; padding: 24px; transform: translateY(10px) scale(.98); transition: transform .18s var(--ease); background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow); }
.modal-root.open .modal { transform: none; }
.modal.wide { width: min(900px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h2 { font-size: 17px; }

/* toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border-radius: 6px; font-size: 14px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: toastin .2s var(--ease); display: flex; gap: 10px; align-items: flex-start; }
.toast.ok { border-color: rgba(93, 228, 161, .5); }
.toast.err { border-color: rgba(255, 107, 107, .5); }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } }

/* skin detail */
.detail { display: grid; grid-template-columns: 360px 1fr; gap: 20px; }
.detail-art { padding: 28px; display: grid; place-items: center; position: relative; overflow: hidden; }
.detail-art::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .08), transparent 55%); }
.detail-art svg { width: 100%; max-width: 280px; position: relative; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .7)); }
.detail h1 { font-size: 26px; }
.vote { display: inline-flex; border-radius: 5px; border: 1px solid var(--line-2); overflow: hidden; }
.vote button { padding: 8px 14px; border: 0; background: rgba(255, 255, 255, .06); color: var(--muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; transition: background .15s; }
.vote button:hover { background: rgba(255, 255, 255, .16); color: var(--text); }
.vote button.on { background: var(--accent); color: var(--accent-ink); }
.vote b { padding: 8px 12px; border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2); font-family: var(--display); font-size: 13px; }
.code-box { display: flex; gap: 8px; align-items: center; }
.code-box .input { font-family: var(--mono); font-size: 12px; }
.sizes { display: flex; gap: 16px; align-items: flex-end; }
.sizes svg { filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .6)); }
.about-skin { font-size: 14.5px; line-height: 1.6; color: #c9d5ea; }
.about-skin .by-ai { display: inline-block; margin-left: 6px; font-size: 11px; color: var(--muted-2); letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }

/* profile */
.profile-head { display: grid; grid-template-columns: 120px 1fr auto; gap: 22px; align-items: center; padding: 26px; }
.profile-head .av { width: 120px; height: 120px; border-radius: 50%; transition: transform .3s var(--ease); }
.profile-head .av:hover { transform: rotate(-6deg) scale(1.04); }
.profile-head .av svg { width: 100%; height: 100%; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .6)); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.kv div { padding: 12px 14px; transition: border-color .18s, background .18s; }
.kv div:hover { border-color: var(--line-2); background: var(--panel-2); }
.kv b { display: block; font-family: var(--display); font-size: 18px; }
.kv span { font-size: 12px; color: var(--muted); }
.slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.slot { padding: 14px; text-align: center; position: relative; }
.slot svg { width: 100%; max-width: 110px; margin: 0 auto 8px; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .55)); }
.slot .n { font-size: 12px; color: var(--muted); }
.slot.active { border-color: var(--accent); }
.slot.active::after { content: "active"; position: absolute; top: 8px; right: 8px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
@media (max-width: 860px) { .profile-head { grid-template-columns: 80px 1fr; } .profile-head .av { width: 80px; height: 80px; } .slots { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .slots { grid-template-columns: repeat(2, 1fr); } }

/* dashboard */
.dash { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }
.side { padding: 10px; position: sticky; top: 90px; align-self: start; }
.side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 4px; color: var(--muted); font-weight: 500; font-size: 14px; transition: background .15s, color .15s; }
.side a:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.side a.active { background: rgba(255, 255, 255, .18); color: var(--text); }
@media (max-width: 860px) { .dash { grid-template-columns: 1fr; } .side { position: static; display: flex; overflow-x: auto; gap: 4px; } .side a { white-space: nowrap; } }

/* skin editor */
.editor { display: grid; grid-template-columns: 250px minmax(0, 1fr) 300px; gap: 14px; min-height: calc(100vh - 160px); }
.ed-panel { padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.ed-panel h4 { margin: 2px 2px 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); font-weight: 700; display: flex; justify-content: space-between; align-items: center; font-family: var(--display); }
.ed-stage { display: flex; flex-direction: column; gap: 12px; align-items: center; padding: 14px; }
.ed-toolbar { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ed-canvas-wrap { position: relative; width: min(560px, 100%); aspect-ratio: 1; }
.ed-canvas-wrap.drop { outline: 2px dashed var(--accent); outline-offset: 8px; border-radius: 50%; }
.ed-canvas { width: 100%; height: 100%; touch-action: none; user-select: none; overflow: visible; }
.ed-canvas .layer { cursor: grab; }
.ed-canvas .layer.locked { cursor: default; }
.ed-canvas .sel-box { fill: none; stroke: #fff; stroke-width: .18; stroke-dasharray: .5 .35; pointer-events: none; }
.ed-canvas .handle { fill: #fff; stroke: #000; stroke-width: .12; cursor: nwse-resize; }
.ed-canvas .handle.rot { cursor: grab; }
.ed-canvas .outline { fill: none; stroke: rgba(255, 255, 255, .35); stroke-width: .14; pointer-events: none; }
.ed-previews { display: flex; gap: 14px; align-items: flex-end; }
.ed-previews div { text-align: center; color: var(--muted); font-size: 11px; }
.ed-previews svg { margin: 0 auto 4px; }
.layers { display: flex; flex-direction: column; gap: 4px; overflow: auto; max-height: 34vh; }
.layer-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 4px; border: 1px solid transparent; cursor: pointer; font-size: 13px; transition: background .12s; }
.layer-row:hover { background: rgba(255, 255, 255, .08); }
.layer-row.on { background: rgba(255, 255, 255, .18); border-color: var(--line-2); }
.layer-row .thumb { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 3px; background: rgba(0, 0, 0, .4); flex: none; }
.layer-row .thumb svg { width: 20px; height: 20px; }
.layer-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer-row .sw { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); flex: none; }
.layer-row .btn.xs { opacity: .5; }
.layer-row:hover .btn.xs, .layer-row.on .btn.xs { opacity: 1; }
.layer-row.hidden-layer { opacity: .45; }
.props { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.props label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.props input { width: 100%; }
.swatches { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.swatches button { aspect-ratio: 1; border-radius: 2px; border: 1px solid rgba(0, 0, 0, .4); cursor: pointer; padding: 0; transition: transform .1s; }
.swatches button:hover { transform: scale(1.12); }
.swatches button.on { outline: 2px solid #fff; outline-offset: 1px; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 38px; height: 34px; border-radius: 4px; border: 1px solid var(--line-2); background: transparent; padding: 2px; cursor: pointer; }
.shape-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 6px; overflow: auto; padding: 2px; flex: 1; min-height: 200px; max-height: 60vh; align-content: start; }
.shape-grid.modal-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.shape-cell { aspect-ratio: 1; display: grid; place-items: center; border-radius: 4px; border: 1px solid var(--line); background: rgba(0, 0, 0, .35); cursor: grab; position: relative; transition: border-color .12s, background .12s, transform .12s; touch-action: none; user-select: none; -webkit-user-select: none; }
.shape-cell:hover { border-color: var(--accent); background: rgba(255, 255, 255, .14); transform: scale(1.06); z-index: 1; }
.shape-cell:active { cursor: grabbing; }
.shape-cell svg { width: 68%; height: 68%; fill: #fff; pointer-events: none; }
.shape-cell span { position: absolute; left: 4px; top: 2px; font-size: 9px; color: var(--muted-2); pointer-events: none; }
.drag-ghost { position: fixed; z-index: 500; width: 56px; height: 56px; pointer-events: none; transform: translate(-50%, -50%) scale(1.1); filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .7)); }
.drag-ghost svg { width: 100%; height: 100%; fill: #fff; }
.kbd { display: inline-block; padding: 1px 6px; border-radius: 3px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .06); font-family: var(--mono); font-size: 11px; color: var(--muted); }
@media (max-width: 1100px) { .editor { grid-template-columns: 1fr; } .side-left { order: 2; } .side-right { order: 3; } .ed-stage { order: 1; } .shape-grid { max-height: 300px; } }

/* maps */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.map-card { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); position: relative; transition: transform .18s var(--ease), border-color .18s, box-shadow .18s; }
.map-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.map-card .thumb { border-radius: 10px; overflow: hidden; aspect-ratio: 730 / 500; background: #0b0f1a; border: 1px solid var(--line); }
.map-card .thumb svg { width: 100%; height: 100%; }
.map-card .nm { font-weight: 600; font-size: 14px; }
.map-card .by { font-size: 12px; color: var(--muted); }
.map-view { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #0b0f1a; }
.map-view svg { width: 100%; height: auto; display: block; }
.med { display: grid; grid-template-columns: 240px minmax(0, 1fr) 300px; gap: 14px; }
.mcanvas-wrap { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: #0b0f1a; }
.mcanvas { width: 100%; height: auto; display: block; touch-action: none; user-select: none; }
.mcanvas .body { cursor: grab; }
.mcanvas .body:hover > * { filter: brightness(1.2); }
.mcanvas .body.sel > * { stroke: #fff; stroke-width: 2; stroke-dasharray: 6 4; }
.mcanvas .spawn { cursor: grab; }
.mcanvas .spawn.sel circle:first-child { stroke: var(--accent); stroke-width: 3; }
.mlist { display: flex; flex-direction: column; gap: 3px; overflow: auto; max-height: 50vh; }
.mrow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; cursor: pointer; font-size: 13px; border: 1px solid transparent; }
.mrow:hover { background: rgba(255, 255, 255, .08); }
.mrow.on { background: rgba(255, 255, 255, .18); border-color: var(--line-2); }
.mrow .sw { width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(255, 255, 255, .3); flex: none; }
.mrow .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .ty { font-size: 10px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .08em; }
.props.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 1100px) { .med { grid-template-columns: 1fr; } }

/* tournaments and brackets */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.t-card { padding: 16px; display: flex; flex-direction: column; gap: 8px; transition: border-color .18s, background .18s; }
.t-card:hover { border-color: var(--line-2); background: var(--panel-2); }
.t-card .nm { font-family: var(--display); font-weight: 700; font-size: 15px; }
.t-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.bracket { display: flex; gap: 28px; overflow-x: auto; padding: 10px 4px 20px; align-items: stretch; }
.round { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; min-width: 220px; }
.round h4 { margin: 0 0 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); font-family: var(--display); text-align: center; }
.bmatch { border: 1px solid var(--line); border-radius: 5px; background: var(--panel); overflow: hidden; font-size: 13.5px; position: relative; }
.bmatch .p { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; gap: 8px; }
.bmatch .p + .p { border-top: 1px solid var(--line); }
.bmatch .p.w { background: rgba(93, 228, 161, .12); font-weight: 700; }
.bmatch .p.l { color: var(--muted); }
.bmatch .p .sc { font-family: var(--display); font-size: 12px; color: var(--accent-2); }
.bmatch .p.tbd { color: var(--muted-2); font-style: italic; }
.bmatch.ready { border-color: rgba(255, 255, 255, .45); }
.bmatch.reported { border-color: rgba(255, 209, 102, .5); }
.bmatch .act { padding: 6px 10px; border-top: 1px solid var(--line); display: flex; gap: 6px; justify-content: flex-end; background: rgba(0, 0, 0, .25); }
.winner-banner { padding: 18px 22px; display: flex; align-items: center; gap: 14px; border-color: rgba(255, 209, 102, .5); background: linear-gradient(135deg, rgba(255, 209, 102, .14), transparent); }
.winner-banner .ic { width: 32px; height: 32px; color: var(--warn); }

/* guilds */
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.g-card { padding: 16px; display: flex; gap: 14px; align-items: center; transition: border-color .18s, background .18s; }
.g-card:hover { border-color: var(--line-2); background: var(--panel-2); }
.g-mark { width: 56px; height: 56px; border-radius: 6px; display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 15px; color: #fff; flex: none; text-shadow: 0 2px 6px rgba(0, 0, 0, .6); overflow: hidden; }
.g-mark svg { width: 100%; height: 100%; }
.g-mark.big { width: 96px; height: 96px; border-radius: 8px; font-size: 24px; }
.g-card .nm { font-family: var(--display); font-weight: 700; font-size: 15px; }
.battle { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; padding: 14px 16px; }
.battle .side { text-align: center; }
.battle .side b { display: block; font-family: var(--display); font-size: 14px; }
.battle .vs { font-family: var(--display); font-weight: 900; font-size: 18px; color: var(--accent); padding: 4px 12px; }
.battle .score { font-family: var(--display); font-weight: 900; font-size: 26px; }
.battle .side.w { color: var(--ok); }

/* lobbies */
.room-row td .mode { font-size: 12px; color: var(--muted); }
.flag { width: 18px; height: 13px; border-radius: 2px; object-fit: cover; display: inline-block; vertical-align: middle; margin-right: 6px; }

/* misc */
.footer { max-width: 1280px; margin: 40px auto 30px; padding: 0 16px; color: var(--muted-2); font-size: 12.5px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer a:hover { color: var(--text); }
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 22px; color: var(--muted); font-size: 13px; }
.notice { padding: 12px 14px; border-radius: 5px; border: 1px solid rgba(255, 209, 102, .3); background: rgba(255, 209, 102, .06); font-size: 13.5px; }
.notice.err { border-color: rgba(255, 107, 107, .35); background: rgba(255, 107, 107, .06); }
.notice.info { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); }
.hr { height: 1px; background: var(--line); margin: 14px 0; }
.lb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lb-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.top3 { padding: 14px 16px; }
.top3 h3 { margin: 0 0 8px; }
.top3 .r { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.top3 .r:last-child { border: 0; }
@media (max-width: 900px) { .lb-grid { grid-template-columns: 1fr; } }
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.about p { color: var(--muted); max-width: 70ch; }
.cols2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 860px) { .cols2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .page, .toast, .wall .col { animation: none; } .skin-card, .btn, .wall .orb { transition: none; } }

/* charts */
.chart { width: 100%; height: auto; display: block; font-family: var(--font); }
.chart .grid { stroke: rgba(255, 255, 255, .12); stroke-width: 1; }
.chart .base { stroke: rgba(255, 255, 255, .25); stroke-dasharray: 4 4; }
.chart .tick { fill: var(--muted); font-size: 11px; }
.chart .dot { fill: #000; stroke: #fff; stroke-width: 2; opacity: 0; transition: opacity .15s; }
.chart:hover .dot { opacity: 1; }
.chart-empty { padding: 30px 10px; text-align: center; }
.spark { display: inline-block; vertical-align: middle; }
.chart-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.feed { display: flex; flex-direction: column; gap: 0; }
.feed .it { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.feed .it:last-child { border: 0; }
.feed .it .ic { color: var(--accent); flex: none; }
.feed .it .t { color: var(--muted-2); font-size: 12px; margin-left: auto; white-space: nowrap; }
.place { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 4px; font-family: var(--display); font-size: 11px; font-weight: 900; background: rgba(255, 255, 255, .14); }
.place.p1 { background: var(--warn); color: #231a00; } .place.p2 { background: #cfd8e6; color: #111; } .place.p3 { background: #c98a4b; color: #1a0e00; }
.skin-grid > *, .map-grid > *, .t-grid > *, .g-grid > * { animation: cardin .35s var(--ease) both; }
.skin-grid > *:nth-child(2), .map-grid > *:nth-child(2), .t-grid > *:nth-child(2), .g-grid > *:nth-child(2) { animation-delay: .04s; }
.skin-grid > *:nth-child(3), .map-grid > *:nth-child(3), .t-grid > *:nth-child(3), .g-grid > *:nth-child(3) { animation-delay: .08s; }
.skin-grid > *:nth-child(4), .map-grid > *:nth-child(4), .t-grid > *:nth-child(4), .g-grid > *:nth-child(4) { animation-delay: .12s; }
.skin-grid > *:nth-child(5), .map-grid > *:nth-child(5) { animation-delay: .16s; }
.skin-grid > *:nth-child(6), .map-grid > *:nth-child(6) { animation-delay: .2s; }
@keyframes cardin { from { opacity: 0; transform: translateY(10px); } }
.profile-tabs { margin: 16px 0; }
.rival { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rival:last-child { border: 0; }
.rival .bar { height: 6px; border-radius: 3px; background: rgba(255, 107, 107, .5); overflow: hidden; width: 90px; }
.rival .bar i { display: block; height: 100%; background: var(--ok); }

/* section sub navigation */
.subnav { display: flex; gap: 4px; flex-wrap: wrap; margin: -6px 0 18px; padding: 3px; border-radius: 6px; background: rgba(0, 0, 0, .45); border: 1px solid var(--line); width: max-content; max-width: 100%; }
.subnav a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 4px; color: var(--muted); font-weight: 600; font-size: 13px; transition: background .15s, color .15s; }
.subnav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.subnav a.on { color: var(--accent-ink); background: var(--accent); }
.subnav a .ic { width: 14px; height: 14px; }
.roomlink { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 12.5px; }
.roomlink:hover { background: #e4e4e8; }
.hero h1 span { color: var(--muted-2); }
.roomlink .ic { width: 13px; height: 13px; }
.bmatch .act { border-top: 1px solid var(--line); }

.orb-ph { width: 76%; height: 76%; border-radius: 50%; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.1), rgba(255,255,255,.04)); background-size: 200% 100%; animation: shimmer 1.4s infinite; position: relative; }
.wall .orb .orb-ph { width: 100%; height: 100%; }

.statbar { display: grid; grid-template-columns: 120px 1fr 60px; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.statbar .l { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: capitalize; }
.statbar .b { height: 6px; border-radius: 2px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.statbar .b i { display: block; height: 100%; background: #fff; border-radius: 2px; }
.statbar .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* small screens: nothing may push the page wider than the viewport */
.page { overflow-x: clip; }
.editor > *, .med > *, .cols2 > *, .detail > *, .dash > *, .lb-grid > *, .hero > *, .wall .col, .feature-grid > *, .skin-grid > *, .kv > * { min-width: 0; }
.wall .orb svg, .hero-art svg { width: 100%; height: auto; }
.table td .lockin { display: inline-flex; vertical-align: middle; margin-left: 6px; color: var(--muted); }
.table td .lockin .ic { width: 13px; height: 13px; }
@media (max-width: 700px) {
  html { font-size: 15px; }
  .page { padding: 18px 12px 60px; }
  .nav { padding: 0 10px; top: 8px; }
  .page-head { margin-bottom: 14px; }
  h1 { font-size: 24px; }
  .hero { padding: 24px 18px; }
  .hero h1 { font-size: 30px; }
  .lead { font-size: 14.5px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat b { font-size: 19px; }
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .feature { padding: 14px; }
  .skin-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .skin-card { padding: 8px 10px 10px; }
  .filters { position: static; padding: 10px; }
  .filters form { gap: 8px; }
  .filters select { width: 100% !important; }
  .table { font-size: 13px; }
  .table th, .table td { padding: 8px 8px; }
  .subnav { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .subnav::-webkit-scrollbar { display: none; }
  .subnav a { white-space: nowrap; }
  .tabs { width: 100%; }
  .ed-stage { padding: 10px; }
  .ed-toolbar .btn.sm:not(.icon) { padding: 6px 9px; }
  .ed-panel { padding: 10px; }
  .shape-grid { grid-template-columns: repeat(6, 1fr); max-height: 260px; }
  .layers { max-height: 220px; }
  .modal { padding: 18px; }
  .footer { flex-direction: column; gap: 8px; }
  .bracket { gap: 16px; }
  .round { min-width: 180px; }
  .battle { grid-template-columns: 1fr; text-align: center; }
  .profile-head { padding: 18px; gap: 14px; }
  .kv { grid-template-columns: 1fr 1fr; }
  .wall { gap: 10px; }
}

/* pointer feedback */
.tilt { transition: transform .12s linear, border-color .18s, background .18s; }
.tilt.lift { transition: transform .35s var(--ease), border-color .18s, background .18s; }
a, button { -webkit-tap-highlight-color: transparent; }
.nav-links a:hover { transform: translateY(-1px); }
.nav-links a { transition: color .15s, background .15s, transform .15s; }

/* cursor reactive headlines */
.react { cursor: default; }
.react .ch { display: inline-block; transition: transform .35s var(--ease), color .35s; will-change: transform; }
.react .w { display: inline-block; white-space: nowrap; }
