:root {
  --bg: #0f141f; --page: #121826; --card: #141b28; --card2: #1a2232; --line: #222b3b; --line2: #2a3446;
  --pill: #1e2636; --text: #e6e9ef; --muted: #8b95a7; --dim: #5d677a;
  --gold: #ecb63b; --silver: #8c9da8; --bronze: #b5662b;
  --ok: #5fd39a; --bad: #ef5d5d; --warn: #f0a93b;
  --r: 22px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Inter, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; display: flex; flex-direction: column; }
body.noscroll { overflow: hidden; }
a { color: inherit; }
code { background: var(--pill); padding: 2px 7px; border-radius: 7px; font-size: .92em; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
svg.ui { width: 22px; height: 22px; flex: none; }
svg.ki { width: 34px; height: 34px; flex: none; display: block; }
svg.ki.sm { width: 26px; height: 26px; }
svg.ki.xs { width: 18px; height: 18px; display: inline-block; vertical-align: -4px; }

/* ------------------------------------------------ header */
.top { position: sticky; top: 0; z-index: 30; padding: 10px 10px 0; padding-top: max(10px, env(safe-area-inset-top)); background: linear-gradient(var(--bg) 70%, transparent); }
.bar { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px;
  background: rgba(17, 23, 35, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 2px solid var(--line); border-radius: 28px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; min-width: 0; flex: none; }
.brand img { height: 30px; width: auto; display: block; }
.brand-tag { font-weight: 900; font-size: 12px; letter-spacing: .12em; color: var(--gold); background: #2a2416; border-radius: 8px; padding: 3px 7px; }
.searchpill { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px;
  background: var(--pill); border-radius: 999px; color: var(--muted); border: 2px solid transparent; transition: border-color .15s; }
.searchpill.focus { border-color: var(--line2); }
.searchpill > svg { width: 22px; height: 22px; flex: none; }
.searchpill input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 18px; padding: 0; border-radius: 0; }
.searchpill input::placeholder { color: var(--muted); }
.searchpill input::-webkit-search-cancel-button { display: none; }
.suggest { position: absolute; left: 50%; transform: translateX(-50%); width: min(340px, 88vw); top: calc(100% + 8px); background: var(--card2); border: 2px solid var(--line2); border-radius: 18px; padding: 6px; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.suggest button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; border-radius: 12px; text-align: left; font-size: 16px; font-weight: 700; cursor: pointer; }
.suggest button > span:not(.skin) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest button small { color: var(--muted); font-weight: 600; }
.suggest button:hover, .suggest button.on { background: var(--pill); }
.dcbtn { flex: none; width: 46px; height: 46px; border-radius: 14px; background: #5865f2; color: #fff; display: grid; place-items: center; }
.dcbtn svg { width: 28px; height: 28px; }
.dcbtn:hover { filter: brightness(1.1); }
#drawer-nav a.dc-item { color: #aab3ff; }
#drawer-nav a.dc-item svg { color: #5865f2; }
.btn.discord { background: #5865f2; color: #fff; }
.burger { flex: none; width: 46px; height: 46px; border: 0; background: none; cursor: pointer; display: grid; place-content: center; gap: 7px; padding: 0; }
.burger span { display: block; width: 30px; height: 3px; border-radius: 3px; background: var(--text); }

/* ------------------------------------------------ drawer */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(3, 6, 12, .6); }
.drawer { position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(80vw, 360px); background: #111725; border-left: 2px solid var(--line);
  display: flex; flex-direction: column; padding: max(14px, env(safe-area-inset-top)) 0 max(20px, env(safe-area-inset-bottom)); overflow-y: auto;
  transform: translateX(100%); transition: transform .22s ease; }
.drawer.in { transform: none; }
.drawer .x { align-self: flex-end; margin: 4px 16px 10px; width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--line2); background: none; cursor: pointer; display: grid; place-content: center; }
.drawer .x svg { width: 24px; height: 24px; }
#drawer-nav { display: flex; flex-direction: column; gap: 4px; padding-left: 8px; }
#drawer-nav a, #drawer-nav button { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border: 0; background: none; text-decoration: none; text-align: left;
  font-size: 22px; font-weight: 800; border-radius: 22px 0 0 22px; cursor: pointer; flex-wrap: wrap; }
#drawer-nav a > span, #drawer-nav button > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
#drawer-nav svg { width: 30px; height: 30px; }
#drawer-nav small { flex-basis: 100%; padding-left: 46px; font-size: 14px; color: var(--muted); font-weight: 600; margin-top: -2px; }
#drawer-nav a.active, #drawer-nav a:hover, #drawer-nav button:hover { background: var(--card2); }
.nav-sep { margin: 18px 22px 4px; color: var(--muted); font-size: 15px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.label.lbl-stats { background: #3a311b; color: #f5c24a; }
.label svg.ui { width: 15px; height: 15px; }
.drawer-kits { margin-top: auto; padding: 26px 24px 0; }
.drawer-kits h3 { font-size: 22px; color: var(--muted); font-weight: 700; margin: 0 0 14px; }
.kitgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kitgrid a { aspect-ratio: 1; display: grid; place-items: center; background: #141b28; border: 2px solid var(--line); border-radius: 18px; }
.kitgrid a:hover { border-color: var(--line2); }
.kitgrid svg.ki { width: 62%; height: 62%; }

/* ------------------------------------------------ layout */
main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 18px 12px 40px; transition: opacity .15s; }
main.busy { opacity: .55; }
.foot { text-align: center; color: var(--dim); font-size: 13px; line-height: 1.7; padding: 22px 16px max(28px, env(safe-area-inset-bottom)); }
.foot a { color: var(--muted); }
.loading, .empty { color: var(--muted); padding: 34px 10px; text-align: center; }
h1 { font-size: 30px; line-height: 1.15; margin: 4px 0 10px; font-weight: 800; letter-spacing: -.01em; }
.h2 { font-size: 20px; margin: 28px 4px 12px; font-weight: 800; }
.sub { color: var(--muted); margin: 0 0 16px; font-size: 16px; line-height: 1.5; }

/* ------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 16px; padding: 13px 20px; font-weight: 800; font-size: 16px;
  text-decoration: none; cursor: pointer; background: var(--pill); color: var(--text); transition: filter .15s, transform .1s; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.white { background: #e5e7eb; color: #0f141f; }
.btn.navy { background: #1d2738; color: var(--text); }
.btn.big { font-size: 22px; padding: 20px 30px; border-radius: 20px; }
.btn.small { padding: 9px 14px; font-size: 14px; border-radius: 12px; }
.btn.wide { width: 100%; margin-top: 12px; }
.btn svg.ui { width: 26px; height: 26px; }
.btn.small svg.ui { width: 18px; height: 18px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mt { margin-top: 12px; }

/* ------------------------------------------------ home */
.hero-card { margin: 6px 0 8px; padding: 34px 26px 32px; border-radius: 28px; border: 2px solid #26272c;
  background: radial-gradient(600px 300px at 10% 0, rgba(236,182,59,.06), transparent 70%), linear-gradient(180deg, #232428, #17191f 70%, #141821); }
.hero-logo { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 0 22px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); }
.hero-card h1 { font-size: clamp(34px, 9vw, 52px); font-weight: 900; line-height: 1.12; margin: 0 0 18px; }
.hero-card p { color: var(--muted); font-size: 19px; line-height: 1.75; margin: 0 0 26px; max-width: 640px; }
.cta { display: flex; flex-wrap: wrap; gap: 16px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 30px 8px 16px; }
.sec-head h2 { white-space: nowrap; display: flex; align-items: center; gap: 14px; margin: 0; font-size: 22px; font-weight: 900; color: #b4bccb; letter-spacing: .02em; }
.sec-head a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 18px; font-weight: 600; white-space: nowrap; }
.sec-head a svg { width: 20px; height: 20px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.stat-row div { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 14px 10px; text-align: center; }
.stat-row b { display: block; font-size: 26px; font-weight: 900; }
.stat-row span { color: var(--muted); font-size: 13px; font-weight: 600; }

/* ------------------------------------------------ player cards (top players / ranking rows) */
.tp-card, .rk-row { display: block; text-decoration: none; background: var(--card); border: 2px solid var(--line); border-radius: 26px; padding: 20px 18px 22px; margin-bottom: 16px; transition: border-color .15s, transform .1s; }
.tp-card:hover, .rk-row:hover { border-color: var(--line2); }
.tp-card:active, .rk-row:active { transform: scale(.995); }
.tp-top { display: flex; align-items: center; gap: 16px; min-width: 0; }
.who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.nm { font-size: 30px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.01em; }
.title { display: inline-flex; align-items: center; gap: 10px; color: #a7b0c0; font-size: 20px; font-weight: 500; min-width: 0; }
.title > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title svg.badge { width: 30px; height: 32px; flex: none; }
.title.pill { padding: 10px 22px 10px 16px; border-radius: 999px; font-size: 22px; font-weight: 700; }
.title.pill.t-gm { background: #3d3720; color: #f6c945; }
.title.pill.t-master { background: #3a321c; color: #f2b53a; }
.title.pill.t-ace { background: #33264a; color: #d2a6fb; }
.title.pill.t-spec { background: #1d3446; color: #8dd0f3; }
.title.pill.t-cadet { background: #1b3a2c; color: #7de0ac; }
.title.pill.t-novice { background: #283142; color: #c2cad8; }
.title.pill.t-rookie { background: #232b39; color: #a3acbb; }
.ptschip { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 14px; border-radius: 999px; background: #3a311b; color: #f5c24a; font-size: 18px; font-weight: 900; line-height: 1.1; }
.ptschip small { font-size: 13px; font-weight: 700; opacity: .85; }

/* rank banner with number + player picture */
.rb { position: relative; flex: none; width: 44%; max-width: 230px; height: 86px; overflow: hidden; clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%); background: #2a3343; }
.rb.gold { background: linear-gradient(100deg, #f0bd3f 0 55%, #e6ad2e); }
.rb.silver { background: linear-gradient(100deg, #96a7b1 0 55%, #8796a0); }
.rb.bronze { background: linear-gradient(100deg, #bb6a2c 0 55%, #a85b22); }
.rb.plain { background: linear-gradient(100deg, #2b3446 0 55%, #252d3d); }
.rb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 58%, rgba(255,255,255,.18) 58% 64%, transparent 64%); pointer-events: none; }
.rb-n { position: absolute; left: 10px; bottom: 4px; z-index: 2; font-size: 58px; line-height: 1; font-weight: 900; font-style: italic; color: #fff; letter-spacing: -.04em;
  text-shadow: 3px 3px 0 rgba(0,0,0,.28); }
.rb.plain .rb-n { font-size: 44px; color: #d5dbe6; }
.rb-skin { position: absolute; right: 16%; bottom: -6px; height: 100%; aspect-ratio: 1; z-index: 1; }

/* tier icons + pills */
.kts { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 12px; margin-top: 22px; }
.kt { display: flex; flex-direction: column; align-items: center; text-decoration: none; }
.kc { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #0d121c; border: 3px solid #0d121c; box-shadow: 0 0 0 2px #1d2534; position: relative; z-index: 1; }
.kc svg.ki { width: 36px; height: 36px; }
.kc.ring1.ht { border-color: #4a3d1c; } .kc.ring2.ht { border-color: #3c4656; } .kc.ring3 { border-color: #6b3b1d; }
.tp { display: inline-block; min-width: 64px; text-align: center; padding: 5px 12px; margin-top: -4px; border-radius: 999px; font-weight: 900; font-size: 18px; letter-spacing: .02em; background: var(--pill); color: var(--muted); position: relative; z-index: 2; }
.tp.t1.ht { background: #3a321c; color: #f5c24a; }
.tp.t1.lt { background: #34301f; color: #e8c66c; }
.tp.t2.ht { background: #2c3441; color: #c9d3e0; }
.tp.t2.lt { background: #272e3a; color: #a3aebe; }
.tp.t3.ht { background: #7a4321; color: #f6a35e; }
.tp.t3.lt { background: #3c2a1f; color: #d68a52; }
.tp.t4.ht { background: #243045; color: #93b4e0; }
.tp.t4.lt { background: #212938; color: #7d93b4; }
.tp.t5.ht { background: #232a36; color: #8f99aa; }
.tp.t5.lt { background: #1f252f; color: #6f798a; }
.tp.none { background: none; }
.tiers-lbl { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 -8px 8px; font-size: 20px; font-weight: 900; color: #a3acbb; }
.rk-row .kts { justify-content: flex-start; }

/* ------------------------------------------------ rankings */
.tabs { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin: 8px -12px 0; padding: 0 12px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; scroll-snap-align: center; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-width: 132px;
  padding: 20px 18px 16px; border: 2px solid var(--line); border-bottom: 0; border-radius: 26px 26px 0 0; text-decoration: none; color: var(--dim); font-size: 21px; font-weight: 800; }
.tab svg.ki { width: 46px; height: 46px; opacity: .9; }
.tab span { white-space: nowrap; }
.tab.on { color: var(--text); }
.tab.on::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 0; height: 4px; border-radius: 4px; background: #e6e9ef; }
.tab:not(.on):hover { color: var(--muted); }
.rk-panel { background: var(--page); border: 2px solid var(--line); border-radius: 0 0 var(--r) var(--r); padding: 24px 16px 18px; }
.rk-panel > h1 { margin: 6px 8px 10px; font-size: 34px; }
.rk-panel > .sub { margin: 0 8px 20px; font-size: 19px; }
.info-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin: 0 8px 24px; }
.info-row > .btn { font-size: 20px; padding: 16px 24px; }
.info-row > .btn svg.ui { width: 30px; height: 30px; }
.ipbox { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ipbox .ipcup { width: 64px; height: 64px; }
.ipbox small { display: block; color: #a3acbb; font-size: 17px; font-weight: 900; letter-spacing: .02em; margin-bottom: 6px; }
.iprow { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ip { display: inline-flex; align-items: center; gap: 14px; padding: 10px 16px; border: 0; border-radius: 14px; background: var(--pill); font-size: 19px; font-weight: 800; cursor: pointer; min-width: 0; }
.ip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip svg.ui { color: var(--dim); }
.dc { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: #3b6df2; color: #fff; flex: none; }
.dc svg.ui { width: 30px; height: 30px; }
.list-head { display: grid; grid-template-columns: 60px 1fr; gap: 10px; padding: 0 14px 12px; color: #3f4a5e; font-size: 22px; font-weight: 900; }
.list-head span:nth-child(2) { padding-left: 34%; }

/* kit rankings: tier columns (stacked on phones, side by side on big screens) */
.tiercols { display: grid; gap: 12px; }
.tiercol { background: var(--card); border: 2px solid var(--line); border-radius: 20px; overflow: hidden; }
.tiercol h3 { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; padding: 14px; font-size: 22px; font-weight: 900; }
.tiercol.c1 h3 { background: linear-gradient(180deg, #4a3b16, #2e2716); color: #f5c24a; }
.tiercol.c2 h3 { background: linear-gradient(180deg, #3b4553, #262e3a); color: #d4dce7; }
.tiercol.c3 h3 { background: linear-gradient(180deg, #5a3218, #33231a); color: #f2a462; }
.tiercol.c4 h3 { background: #1e2636; color: #a3b6d2; }
.tiercol.c5 h3 { background: #1b212c; color: #8f99aa; }
.tiercol ul { list-style: none; margin: 0; padding: 8px; }
.tiercol li a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; text-decoration: none; }
.tiercol li a:hover { background: var(--card2); }
.tiercol .nm { font-size: 17px; font-weight: 800; flex: 1; }
.hl { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 900; color: var(--muted); }
.hl svg.ui { width: 16px; height: 16px; }
.tiercol li.ht .hl { color: var(--gold); }
.tiercols .tiercol ul:empty { display: none; }
.tiercol .none { color: var(--dim); text-align: center; padding: 18px 10px; font-size: 15px; }

/* ------------------------------------------------ player pictures */
.skin { display: inline-block; overflow: hidden; flex: none; }
.skin svg.px, .skin img { display: block; width: 100%; height: 100%; image-rendering: pixelated; shape-rendering: crispEdges; object-fit: contain; object-position: bottom; }
.skin.head, .skin.xs { width: 30px; height: 30px; border-radius: 7px; position: relative; background: #0d121c; }
.skin.xs { width: 24px; height: 24px; border-radius: 6px; }
.skin .loading-skin { opacity: 0; }
.skin img.real { animation: fade .25s ease; }
.rb-skin img.real, .pm-ava img.real { filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.skin.head .px, .skin.xs .px { position: absolute; width: 200%; height: 200%; left: -50%; top: -12.5%; }
.skin.me-ava { width: 76px; height: 76px; border-radius: 18px; background: var(--card2); border: 2px solid var(--line2); }

/* ------------------------------------------------ modal (player card, info) */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(3, 6, 12, .72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; justify-content: center; align-items: flex-start; padding: max(10px, env(safe-area-inset-top)) 10px 30px; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: relative; width: 100%; max-width: 560px; background: var(--page); border: 2px solid var(--line); border-radius: 28px; padding: 26px 20px 28px; animation: up .2s ease; }
@keyframes up { from { transform: translateY(18px); opacity: .6; } }
.x.round { position: absolute; top: 14px; right: 14px; width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--pill); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.x.round svg.ui { width: 34px; height: 34px; }
.pm { display: flex; flex-direction: column; align-items: center; text-align: center; }
.pm-ava { width: 170px; height: 170px; border-radius: 50%; border: 4px solid var(--line2); background: radial-gradient(circle at 50% 35%, #24304a, #141b28); overflow: hidden; display: grid; place-items: end center; margin-top: 30px; }
.pm-ava.gold { border-color: var(--gold); } .pm-ava.silver { border-color: var(--silver); } .pm-ava.bronze { border-color: var(--bronze); }
.pm-ava .skin { width: 82%; height: 82%; }
.pm-name { font-size: clamp(36px, 11vw, 52px); font-weight: 900; margin: 12px 0 14px; max-width: 100%; overflow-wrap: anywhere; }
.pm-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 10px; }
.pm-h { align-self: stretch; text-align: left; font-size: 34px; font-weight: 800; color: #b4bccb; margin: 26px 0 14px; letter-spacing: .01em; }
.pos-card { align-self: stretch; display: flex; align-items: center; gap: 14px; border: 2px solid var(--line2); border-radius: 20px; overflow: hidden; padding-right: 16px; }
.pos-card .rb { width: 130px; height: 74px; }
.pos-card .rb-n { font-size: 50px; }
.pos-txt { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.pos-card b { font-size: 28px; font-weight: 900; line-height: 1.1; }
.pos-txt span { color: #a3acbb; font-size: 17px; }
.pm-tiers { align-self: stretch; border: 2px solid var(--line2); border-radius: 20px; padding: 2px 12px 18px; }
.pm-tiers .kts { justify-content: flex-start; }
.pm .card, .pm > .sub { align-self: stretch; text-align: left; }
.info { padding-top: 6px; }
.info h2 { font-size: 28px; font-weight: 900; margin: 6px 70px 14px 0; }
.info h3 { font-size: 20px; margin: 24px 0 10px; }
.info p { color: #b4bccb; line-height: 1.6; font-size: 16px; }
.pts-table { width: 100%; border-collapse: collapse; }
.pts-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); font-weight: 700; }
.pts-table .tp { margin: 0; font-size: 15px; min-width: 58px; }
.pts-table .num { text-align: right; color: var(--gold); }
.titles { display: grid; gap: 10px; }
.titles > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.titles .title.pill { font-size: 17px; padding: 7px 16px 7px 12px; }
.titles .title svg.badge { width: 24px; height: 26px; }
.titles small { color: var(--muted); font-weight: 700; white-space: nowrap; }

/* ------------------------------------------------ cards, forms, labels */
.card { background: var(--card); border: 2px solid var(--line); border-radius: 20px; padding: 16px; margin-bottom: 14px; }
.card .head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.card .head .row b { font-size: 16px; }
.card .when { margin-left: auto; color: var(--dim); font-size: 13px; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 4px; color: var(--muted); font-size: 14px; }
.stats b { color: var(--text); }
.bars { display: grid; gap: 8px; margin-top: 12px; }
.sbar { display: grid; grid-template-columns: 120px 1fr 34px; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.sbar b { color: var(--text); text-align: right; }
.track { height: 9px; border-radius: 9px; background: #0d121c; overflow: hidden; }
.fill { height: 100%; border-radius: 9px; background: linear-gradient(90deg, #b5662b, #ecb63b); }
.feedback { margin-top: 12px; background: var(--card2); border-left: 3px solid var(--gold); border-radius: 12px; padding: 10px 12px; white-space: pre-wrap; line-height: 1.5; }
.feedback small { display: block; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.label { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--pill); color: #b4bccb; font-size: 13px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.lbl-tester { background: #1b3a2c; color: #7de0ac; }
.lbl-admin { background: #3e1d22; color: #f58a8a; }
.lbl-edited { background: #3a2f17; color: #f0c25a; }
.lbl-auto { background: #1e2636; color: var(--muted); }
.lbl-pending { background: #3c2c14; color: #f0a93b; }
.lbl-open { background: #1d3050; color: #8dbbf7; }
.lbl-claimed { background: #33264a; color: #d2a6fb; }
.lbl-scheduled { background: #173a3a; color: #6fe0d6; }
.lbl-done, .lbl-confirmed { background: #1b3a2c; color: #7de0ac; }
.lbl-cancelled { background: #262b35; color: #8b95a7; }
.card .head .tp { font-size: 14px; padding: 4px 10px; min-width: 0; margin: 0; }
label.f { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 800; color: #b4bccb; }
input, select, textarea { width: 100%; background: #0e1420; color: var(--text); border: 2px solid var(--line2); border-radius: 14px; padding: 12px 14px; font: inherit; font-size: 16px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #4a5870; }
textarea { min-height: 84px; resize: vertical; }
input.bigcode { font-size: 30px; font-weight: 900; letter-spacing: .3em; text-transform: uppercase; text-align: center; }
.grid2 { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.sendrow { display: flex; gap: 8px; }
.sendrow input { flex: 1; }
.msg { margin-top: 10px; font-size: 14px; font-weight: 700; }
.msg:empty { display: none; }
.msg.err { color: var(--bad); } .msg.ok { color: var(--ok); }
.chat { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; background: #0e1420; border: 2px solid var(--line); border-radius: 14px; padding: 10px; }
.msg-line { max-width: 88%; padding: 8px 12px; border-radius: 14px; background: var(--card2); line-height: 1.45; overflow-wrap: anywhere; }
.msg-line.from-tester { align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-line.from-player { align-self: flex-end; background: #1d2d48; border-bottom-right-radius: 4px; }
.msg-head { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.msg-head b { color: var(--text); }
.msg-head .label { padding: 1px 7px; font-size: 11px; }
.auth { max-width: 460px; margin: 10px auto 0; }
.steps { color: #b4bccb; line-height: 1.9; padding-left: 22px; font-size: 16px; }
.page-head { background: var(--page); border: 2px solid var(--line); border-radius: var(--r); padding: 22px 18px; margin-bottom: 6px; }
.page-head h1 { margin-top: 0; }
.kitstrip { display: flex; flex-wrap: wrap; gap: 8px; }
.kitstrip span { width: 46px; height: 46px; border-radius: 50%; background: #0d121c; display: grid; place-items: center; }
.kitstrip svg.ki { width: 28px; height: 28px; }
.me-card { display: flex; align-items: center; gap: 16px; background: var(--page); border: 2px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px; flex-wrap: wrap; }
.me-card > div { flex: 1; min-width: 0; }
.me-card h1 { margin: 0 0 8px; overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; background: #e5e7eb; color: #0f141f; font-weight: 800;
  padding: 12px 18px; border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.4); max-width: 90vw; text-align: center; }

/* ------------------------------------------------ small phones */
@media (max-width: 430px) {
  .bar { gap: 8px; padding: 10px 10px 10px 14px; }
  .brand img { height: 24px; }
  .brand-tag { display: none; }
  .dcbtn { width: 42px; height: 42px; border-radius: 12px; }
  .dcbtn svg { width: 25px; height: 25px; }
  .searchpill { height: 46px; padding: 0 14px; }
  .searchpill input { font-size: 16px; }
  .nm { font-size: 25px; }
  .title { font-size: 17px; }
  .title svg.badge { width: 26px; height: 28px; }
  .rb { height: 76px; }
  .rb-n { font-size: 50px; }
  .kc { width: 52px; height: 52px; }
  .kc svg.ki { width: 32px; height: 32px; }
  .tp { font-size: 16px; min-width: 56px; padding: 4px 10px; }
  .kts { gap: 12px 8px; }
  .tab { min-width: 112px; font-size: 18px; padding: 16px 12px 14px; }
  .tab svg.ki { width: 40px; height: 40px; }
  .rk-panel > h1 { font-size: 30px; }
  .pm-h { font-size: 28px; }
  .sbar { grid-template-columns: 100px 1fr 30px; }
  .hero-card { padding: 26px 18px; }
  .hero-card p { font-size: 17px; }
  .btn.big { font-size: 19px; padding: 17px 24px; }
  .sec-head h2 { font-size: 19px; gap: 10px; }
  .sec-head a { font-size: 16px; }
  .pos-card b { font-size: 24px; }
  .pos-card .rb { width: 110px; }
}
@media (min-width: 760px) {
  main { padding: 26px 20px 50px; }
  .tiercols { grid-template-columns: repeat(5, 1fr); align-items: start; }
}

/* ------------------------------------------------ shop */
svg.ki.coin.xs { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; }
.shop-head { background: radial-gradient(500px 220px at 90% 0, rgba(245,197,66,.10), transparent 70%), var(--page); border: 2px solid var(--line); border-radius: 26px; padding: 22px 18px; }
.sh-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sh-top h1 { margin: 0; font-size: 36px; font-weight: 900; }
.country { display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--pill); border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: 16px; cursor: pointer; }
.country .fl, .clist .fl { font-size: 22px; line-height: 1; }
.country svg.ui { width: 16px; height: 16px; color: var(--muted); }
.shop-head .sub { margin: 12px 0 16px; }
.bal { display: flex; align-items: center; gap: 12px; background: #2a2416; border-radius: 18px; padding: 12px 14px; flex-wrap: wrap; }
.bal > svg.ki { width: 42px; height: 42px; }
.bal > div { flex: 1; min-width: 160px; }
.bal b { font-size: 28px; font-weight: 900; color: #f5c24a; }
.bal div > span { color: #d9c28a; font-weight: 700; }
.bal small { display: block; color: #a8946a; font-size: 12px; }
.who-sm { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.login-cta { margin: 0; }
.sec-sub { margin: -6px 8px 12px; }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pack { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--card); border: 2px solid var(--line); border-radius: 22px; padding: 18px 12px 14px; overflow: hidden; }
.pack.best { border-color: #6b5a2a; background: linear-gradient(180deg, #2a2416, var(--card) 60%); }
.ribbon { position: absolute; top: 10px; right: -30px; transform: rotate(35deg); background: #f5c24a; color: #2a2416; font-size: 11px; font-weight: 900; padding: 3px 34px; letter-spacing: .06em; }
.pk-coins { position: relative; width: 64px; height: 46px; margin-bottom: 6px; }
.pk-coins svg.ki { position: absolute; width: 34px; height: 34px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.4)); }
.pk-coins svg:nth-child(1) { left: 0; top: 10px; } .pk-coins svg:nth-child(2) { left: 15px; top: 0; } .pk-coins svg:nth-child(3) { left: 30px; top: 12px; }
.pk-n { font-size: 30px; font-weight: 900; color: #f5c24a; line-height: 1.1; }
.pk-l { color: var(--muted); font-weight: 700; font-size: 14px; }
.pk-bonus { margin: 8px 0 4px; font-size: 12px; font-weight: 900; color: #7de0ac; background: #1b3a2c; border-radius: 999px; padding: 2px 10px; }
.pk-bonus.none { background: none; }
.pk-price { font-size: 22px; font-weight: 900; margin: 4px 0 10px; }
.btn.paypal { width: 100%; background: #ffc439; color: #111; padding: 11px 10px; font-size: 15px; }
.btn.paypal:disabled { background: var(--pill); color: var(--muted); opacity: 1; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.item { display: flex; flex-direction: column; background: var(--card); border: 2px solid var(--line); border-radius: 22px; padding: 16px; --rc: #8b95a7; }
.item .art, .tagcard .plate-wrap { border-radius: 16px; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--rc) 35%, transparent), #0d121c 75%); }
.item .art { height: 110px; display: grid; place-items: center; margin-bottom: 12px; }
.item .art svg.ki { width: 74px; height: 74px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.rar { color: var(--rc); font-size: 12px; font-weight: 900; letter-spacing: .1em; }
.it-n { font-size: 21px; font-weight: 900; margin: 2px 0 4px; }
.item p { color: var(--muted); font-size: 14px; line-height: 1.45; margin: 0 0 12px; flex: 1; }
.it-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.price { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; font-size: 18px; color: #f5c24a; }
.owned { color: #7de0ac; font-weight: 900; }
.item.have { border-color: #24503a; }
.r-common { --rc: #8b95a7; } .r-rare { --rc: #4ea8f5; } .r-epic { --rc: #b57bea; } .r-legendary { --rc: #f5a623; } .r-mythic { --rc: #ff4d8d; }
.item.r-mythic { border-color: #5a2440; box-shadow: 0 0 24px rgba(255,77,141,.12); }
.item.r-legendary { border-color: #5a4620; }
.tagcard { --rc: #b57bea; }
.plate-wrap { height: 110px; display: grid; place-items: center; margin-bottom: 6px; }
.plate { background: rgba(0,0,0,.55); padding: 6px 12px; font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 19px; color: #fff; letter-spacing: .02em; text-shadow: 2px 2px 0 rgba(0,0,0,.6); max-width: 92%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.plate .gr { color: #555; }
.colors { display: flex; flex-wrap: wrap; gap: 8px; }
.cchip { width: 34px; height: 34px; border-radius: 10px; border: 3px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); }
.cchip.on { border-color: #fff; }
.orders { display: grid; gap: 0; padding: 6px 16px; }
.ord { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ord:last-child { border-bottom: 0; }
.ord > span:first-child { flex: 1; min-width: 150px; font-weight: 700; }
.ord .price { font-size: 15px; }
.ord .label { white-space: normal; }
.fine { font-size: 12px; margin-top: 18px; text-align: center; }
.clist { display: grid; gap: 4px; margin-top: 12px; max-height: 55vh; overflow-y: auto; }
.clist button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: 12px; background: none; text-align: left; font-size: 17px; font-weight: 700; cursor: pointer; }
.clist button:hover, .clist button.on { background: var(--pill); }
.clist .cn { flex: 1; }
.clist small { color: var(--muted); font-weight: 800; }
@media (max-width: 430px) {
  .packs { grid-template-columns: repeat(2, 1fr); }
  .pk-n { font-size: 26px; }
}
.pk-bonus { min-height: 22px; }
