:root {
  --bg: #0b0e13;
  --surface: #12161d;
  --surface-2: #181d26;
  --surface-3: #1f2530;
  --line: #262d3a;
  --line-2: #333c4c;
  --text: #e9ecf2;
  --muted: #8a93a5;
  --accent: #f2a32c;
  --accent-2: #ffbe55;
  --ct: #5b9bff;
  --t: #e9b44c;
  --ok: #3ddc84;
  --bad: #ff5d6c;
  --r: #b0c3d9;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 "Segoe UI", system-ui, -apple-system, Arial, sans-serif; }
.hidden { display: none !important; }
button, input { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--surface-3); border: 1px solid var(--line-2);
       border-radius: 8px; padding: 8px 14px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--text); white-space: nowrap; }
.btn:hover { border-color: #46516a; background: #262d3a; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.ghost { background: transparent; }
.btn.icon { padding: 6px 10px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1a1000; }
.btn.primary:hover { background: var(--accent-2); }
.btn.big { width: 100%; padding: 12px 16px; font-size: 15px; }
.btn.done { background: rgba(61, 220, 132, .12); border-color: rgba(61, 220, 132, .45); color: var(--ok); }
.btn.steam { background: #1b2838; border-color: #66c0f4; }
.btn.steam:hover { background: #22364b; }
.steam-logo { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 18%, transparent 19%), radial-gradient(circle at 65% 65%, #fff 0 12%, transparent 13%), #66c0f4; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px clamp(14px, 3vw, 28px);
          background: rgba(11, 14, 19, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .14em; font-size: 14px; }
.brand.big { justify-content: center; font-size: 18px; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; background: var(--accent); color: #1a1000; font-weight: 900; letter-spacing: 0; }
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.online { color: var(--ok); } .status.online i { background: var(--ok); }
.status.offline { color: var(--bad); } .status.offline i { background: var(--bad); }
.me { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.me-ava { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); font-weight: 800; }
.me-ava img { width: 100%; height: 100%; object-fit: cover; }
.me-name { font-weight: 600; font-size: 13px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* CT / T switch */
.side-switch { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin: 0 auto; }
.side-switch button { background: none; border: 0; padding: 7px 16px; border-radius: 7px; font-weight: 700; color: var(--muted); cursor: pointer; }
.side-switch button.ct.active { background: rgba(91, 155, 255, .16); color: var(--ct); box-shadow: inset 0 0 0 1px rgba(91, 155, 255, .45); }
.side-switch button.t.active { background: rgba(233, 180, 76, .16); color: var(--t); box-shadow: inset 0 0 0 1px rgba(233, 180, 76, .45); }

/* login */
.login { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 20px; }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.login-card p { margin: 0; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.code-form { display: flex; gap: 8px; }
.code-form input { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 12px; text-align: center; letter-spacing: .25em; font-weight: 700; text-transform: uppercase; outline: 0; }
.code-form input:focus { border-color: var(--accent); }
.notice { min-height: 18px; font-size: 13px; }
.notice.error { color: var(--bad); } .notice.success { color: var(--ok); }

/* app */
.app { max-width: 1280px; margin: 0 auto; padding: 18px clamp(14px, 3vw, 28px) 40px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 18px; scrollbar-width: none; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent-2); border-bottom-color: var(--accent); }
.tab .n { font-size: 11px; color: var(--muted); margin-left: 4px; }

/* loadout grid */
.loadout { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.slot { position: relative; display: flex; flex-direction: column; text-align: left; cursor: pointer; overflow: hidden; padding: 0;
        background: var(--surface); border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s, background .15s; }
.slot:hover { border-color: var(--line-2); background: var(--surface-2); }
.slot::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--r); }
.slot-art { height: 120px; display: grid; place-items: center; background: linear-gradient(180deg, var(--surface-2), var(--surface)); }
.slot-art img { max-width: 86%; max-height: 104px; object-fit: contain; }
.slot-art .ph { font-size: 30px; color: var(--muted); }
.slot-body { padding: 10px 12px 13px; }
.slot-weapon { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; display: flex; justify-content: space-between; gap: 8px; }
.slot-skin { font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-skin.stock { color: var(--muted); font-weight: 500; }
.tag { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; padding: 1px 6px; border-radius: 4px; }
.tag.ct { color: var(--ct); background: rgba(91, 155, 255, .14); }
.tag.t { color: var(--t); background: rgba(233, 180, 76, .14); }
.tag.on { color: var(--ok); background: rgba(61, 220, 132, .14); }
.empty { color: var(--muted); padding: 40px 10px; text-align: center; grid-column: 1 / -1; }
.section-note { grid-column: 1 / -1; color: var(--muted); font-size: 13px; margin: -4px 0 4px; }

/* drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 30; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); z-index: 31; display: flex; flex-direction: column;
          background: var(--surface); border-left: 1px solid var(--line); transform: translateX(105%); transition: transform .22s ease; }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px 18px 10px; }
.drawer-head h2 { margin: 2px 0 0; font-size: 20px; }
.drawer-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.drawer-kicker.ct { color: var(--ct); } .drawer-kicker.t { color: var(--t); }
.preview { margin: 0 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); display: grid; grid-template-columns: 170px 1fr; gap: 14px; padding: 12px; align-items: center; }
.preview-art { height: 110px; display: grid; place-items: center; border-bottom: 3px solid var(--r); }
.preview-art img { max-width: 100%; max-height: 104px; object-fit: contain; }
.preview-art .ph { color: var(--muted); font-size: 30px; }
.preview-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.preview-info b { font-size: 16px; }
.rarity { font-size: 12px; font-weight: 700; color: var(--r); }
.preview-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.drawer-tools { padding: 12px 18px 8px; display: flex; flex-direction: column; gap: 8px; }
.drawer-tools input { background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 12px; outline: 0; }
.drawer-tools input:focus { border-color: var(--accent); }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip { background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--r); }
.chip.active { color: var(--text); border-color: var(--r); }
.skins { flex: 1; overflow-y: auto; padding: 4px 18px 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; align-content: start; }
.skin { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px 9px; cursor: pointer; text-align: left; overflow: hidden; }
.skin:hover { border-color: var(--line-2); }
.skin.picked { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.skin::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--r); }
.skin-art { height: 64px; display: grid; place-items: center; }
.skin-art img { max-width: 100%; max-height: 60px; object-fit: contain; }
.skin-art .ph { color: var(--muted); font-size: 20px; }
.skin-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.skin .tag { position: absolute; top: 5px; left: 5px; }

/* shared & toasts */
.shared, .share-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
                      background: rgba(242, 163, 44, .08); border: 1px solid rgba(242, 163, 44, .3); border-radius: 10px; padding: 12px 14px; }
.shared p { margin: 2px 0 0; }
.share-box input { flex: 1; min-width: 200px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; }
.toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; width: min(420px, calc(100vw - 28px)); }
.toast { background: var(--surface-3); border: 1px solid var(--line-2); border-left: 4px solid var(--ok); border-radius: 8px; padding: 10px 14px; }
.toast.error { border-left-color: var(--bad); }

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .side-switch { order: 3; width: 100%; }
  .side-switch button { flex: 1; }
  .me-name, #status-label { display: none; }
  .loadout { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
  .slot-art { height: 96px; }
  .preview { grid-template-columns: 1fr; }
}

.slot-art.dim img { opacity: .28; filter: grayscale(1); }

/* ====================================================================== */
/*  Redesign v2 — premium HUD matching the main site (Aurora look)        */
/* ====================================================================== */
:root {
  --bg: #080a11;
  --surface: #0f131d;
  --surface-2: #161d2a;
  --surface-3: #1f2838;
  --line: #212a3c;
  --line-2: #33415c;
  --text: #ecf0f8;
  --muted: #8d98b2;
  --accent: #ff8a1f;
  --accent-2: #ffc24d;
  --grad: linear-gradient(135deg, #ffd470, #ff8a1f 48%, #ff4d2e);
  --body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Unbounded", "Segoe UI", sans-serif;
}
body {
  font-family: var(--body);
  background:
    radial-gradient(1000px 500px at -4% -12%, rgba(255,138,31,.12), transparent 56%),
    radial-gradient(900px 480px at 104% -8%, rgba(99,112,255,.12), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; background: var(--grad); pointer-events: none; }

/* brand */
.brand { font-family: var(--display); letter-spacing: .12em; }
.brand-mark { background: var(--grad); color: #1a0b00; box-shadow: 0 7px 18px -8px rgba(255,138,31,.85); border-radius: 9px; }
.topbar { background: rgba(8,10,17,.82); backdrop-filter: blur(14px) saturate(1.2); }

/* status pill */
.status { background: var(--surface-2); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; }
.status.online { background: rgba(61,220,132,.1); border-color: rgba(61,220,132,.3); }

/* CT / T switch — active = solid gradient pill */
.side-switch { border-radius: 12px; }
.side-switch button { border-radius: 9px; font-weight: 700; padding: 7px 14px; transition: .15s; color: var(--muted); }
.side-switch button.active { background: var(--grad); color: #1a0b00; box-shadow: 0 8px 20px -12px rgba(255,138,31,.9); }
.side-switch button.ct.active { background: linear-gradient(135deg, #8fc0ff, #3f7bff); color: #061024; }

/* buttons */
.btn { border-radius: 11px; font-weight: 700; transition: transform .12s, filter .12s, border-color .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--grad); border-color: transparent; color: #1a0b00; box-shadow: 0 12px 26px -14px rgba(255,138,31,.9); }
.btn.primary:hover { filter: brightness(1.07); background: var(--grad); }
.btn.done { background: rgba(61,220,132,.14); border-color: rgba(61,220,132,.5); color: var(--ok); }

/* tabs — pill style */
.tabs { gap: 6px; }
.tab { border: 1px solid transparent; border-radius: 999px; padding: 7px 15px; }
.tab:hover { color: var(--text); background: rgba(255,255,255,.04); }
.tab.active { color: #1a0b00; background: var(--grad); border-color: transparent; box-shadow: 0 8px 20px -12px rgba(255,138,31,.9); }

/* loadout slots — glassy cards with hover depth + art zoom */
.slot { border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 16px 36px -26px rgba(0,0,0,.9);
  transition: transform .18s cubic-bezier(.2,.7,.2,1), box-shadow .22s, border-color .18s; }
.slot:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 26px 50px -24px rgba(0,0,0,.85), 0 0 26px -18px var(--accent); }
.slot-art { height: 128px; overflow: hidden; }
.slot-art img { transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.slot:hover .slot-art img { transform: scale(1.1); }
.tag { border-radius: 6px; }
.tag.on { color: #1a0b00; background: var(--accent-2); }

/* drawer */
.drawer { background: linear-gradient(180deg, #11151e, #0b0e14); border-left: 1px solid var(--line-2); box-shadow: -30px 0 70px -20px rgba(0,0,0,.8); }
.drawer-head h2 { font-family: var(--display); }
.preview { border-radius: 14px; background: var(--surface-2); }
.btn.reset { border-color: rgba(61,220,132,.4); color: #7dffb5; }
.btn.reset:hover { background: rgba(61,220,132,.12); border-color: rgba(61,220,132,.6); }

/* skins grid */
.skin { border-radius: 11px; transition: transform .14s, border-color .15s, box-shadow .18s; }
.skin:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 14px 30px -20px rgba(0,0,0,.8); }
.skin.picked { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent), 0 0 22px -14px var(--accent); }
.chip.active { background: rgba(255,138,31,.12); border-color: var(--accent); color: var(--text); }

/* login card */
.login { min-height: calc(100vh - 54px); display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 28% 12%, rgba(255,138,31,.16), transparent 55%), radial-gradient(circle at 78% 92%, rgba(99,112,255,.14), transparent 55%); }
.login-card { border-radius: 22px; box-shadow: 0 50px 110px -34px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.05); }
.login-card .brand.big { font-size: 20px; }

/* shared / toast */
.shared, .share-box { background: rgba(255,138,31,.08); border-color: rgba(255,138,31,.3); border-radius: 12px; }
.toast { border-radius: 12px; box-shadow: 0 16px 40px -16px rgba(0,0,0,.7); }

/* scrollbar */
* { scrollbar-width: thin; scrollbar-color: #39445f transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2c3650; border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }

/* ====================================================================== */
/*  v2 — same look as the main site: periwinkle accent, glass bar,        */
/*  bigger skin art with rarity glow, clear picked state.                 */
/* ====================================================================== */
:root { --bg: #0c0e13; --surface: #151821; --surface-2: #1b1f2a; --surface-3: #232835; --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.14);
  --text: #eceff5; --muted: #949cb0; --accent: #6b74e8; --accent-2: #a4aaf5; --ok: #32e08a; --bad: #ff5a6e; }
body { background: radial-gradient(900px 520px at 80% -10%, rgba(107,116,232,.14), transparent 60%), radial-gradient(700px 500px at -10% 30%, rgba(90,166,255,.07), transparent 60%), var(--bg) fixed !important;
  font: 14.5px/1.5 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(13,15,21,.86) !important; backdrop-filter: blur(14px); border-bottom: 1px solid var(--line) !important; box-shadow: none !important; }
.brand { font-weight: 900; letter-spacing: .06em; }
.brand-mark { background: linear-gradient(135deg, #8e95f0, #565fd6) !important; color: #fff !important; border-radius: 9px !important; box-shadow: 0 6px 16px -6px rgba(107,116,232,.8); }
.btn { border-radius: 10px !important; font-weight: 700 !important; transition: transform .12s, background .14s, border-color .14s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent) !important; border-color: transparent !important; color: #fff !important; box-shadow: 0 8px 18px -10px rgba(107,116,232,.9); }
.btn.primary:hover { background: #7d86f0 !important; }
.btn.ghost { background: rgba(255,255,255,.04) !important; border-color: var(--line) !important; }
.side-switch { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.side-switch button { border-radius: 9px !important; border: 0 !important; font-weight: 800; padding: 8px 14px; }
.side-switch button.ct.active { background: rgba(90,166,255,.2) !important; color: #9cc9ff !important; box-shadow: inset 0 0 0 1px rgba(90,166,255,.5); }
.side-switch button.t.active { background: rgba(255,178,62,.18) !important; color: #ffd08a !important; box-shadow: inset 0 0 0 1px rgba(255,178,62,.5); }

/* category tabs: segmented, wraps on phones */
.tabs { border: 1px solid var(--line) !important; border-radius: 14px; background: rgba(255,255,255,.03); padding: 5px; gap: 4px; margin-bottom: 20px !important; }
.tab { border: 0 !important; border-radius: 10px; padding: 9px 15px !important; font-weight: 700 !important; transition: background .14s, color .14s; }
.tab:hover { background: rgba(255,255,255,.05); }
.tab.active { background: var(--accent) !important; color: #fff !important; box-shadow: 0 8px 18px -10px rgba(107,116,232,.9); }
.tab.active .n { color: rgba(255,255,255,.8); }

/* loadout slots */
.loadout { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important; gap: 14px !important; }
.slot { border-radius: 16px !important; border: 1px solid var(--line) !important; background: linear-gradient(180deg, #181b25, #12141b) !important;
  transition: transform .18s, border-color .18s, box-shadow .18s !important; }
.slot:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--r) 55%, transparent) !important; box-shadow: 0 18px 30px -18px color-mix(in srgb, var(--r) 70%, transparent); }
.slot::after { height: 3px !important; box-shadow: 0 0 14px var(--r); }
.slot-art { height: 136px !important; background: radial-gradient(70% 70% at 50% 45%, color-mix(in srgb, var(--r) 22%, transparent), transparent 70%) !important; }
.slot-art img { max-height: 118px !important; filter: drop-shadow(0 10px 14px rgba(0,0,0,.6)); transition: transform .25s; }
.slot:hover .slot-art img { transform: scale(1.06) rotate(-2deg); }
.slot-weapon { font-size: 11px !important; }
.slot-skin { font-size: 14.5px; color: #fff; }
.slot-skin.stock { color: var(--muted) !important; }

/* picker drawer */
.drawer { background: linear-gradient(180deg, #171a23, #111319) !important; border-left: 1px solid var(--line-2) !important; box-shadow: -30px 0 60px -20px rgba(0,0,0,.8) !important; }
.drawer-backdrop { background: rgba(4,5,9,.6) !important; backdrop-filter: blur(3px); }
.drawer-kicker { color: var(--accent-2) !important; font-weight: 800; letter-spacing: .1em; }
.preview { border-radius: 16px !important; background: radial-gradient(80% 90% at 50% 40%, color-mix(in srgb, var(--r) 25%, #1b1f2a), #12141b) !important; border: 1px solid var(--line) !important; }
.preview-art img { filter: drop-shadow(0 16px 22px rgba(0,0,0,.7)); }
#drawer-search { border-radius: 12px !important; background: #0f1117 !important; border: 1px solid var(--line-2) !important; padding: 10px 14px !important; }
#drawer-search:focus, .code-form input:focus { outline: none; border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(107,116,232,.22); }
.chip { border-radius: 999px !important; font-weight: 700; }
.chip.active, .chip.on { background: var(--accent) !important; color: #fff !important; border-color: transparent !important; }
.skins { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)) !important; gap: 10px !important; }
.skin { border-radius: 12px !important; background: linear-gradient(180deg, color-mix(in srgb, var(--r) 10%, #1b1f2a), #14161e) !important; transition: transform .14s, border-color .14s; }
.skin:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--r) 60%, transparent) !important; }
.skin.picked { border-color: var(--ok) !important; box-shadow: 0 0 0 1px var(--ok), 0 10px 22px -14px rgba(50,224,138,.7) !important; }
.skin.picked::before { content: "✓"; position: absolute; top: 6px; right: 7px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ok); color: #0b2a19; font-size: 11px; font-weight: 900; z-index: 1; }
.skin-art { height: 74px !important; }
.skin-art img { max-height: 70px !important; filter: drop-shadow(0 6px 8px rgba(0,0,0,.55)); }

/* login */
.login-card { border-radius: 22px !important; background: linear-gradient(180deg, #1a1d27, #13151c) !important; border: 1px solid var(--line-2) !important; box-shadow: 0 40px 80px -30px #000 !important; }
.btn.steam { background: linear-gradient(135deg, #1b2838, #2a475e) !important; border: 1px solid rgba(102,192,244,.4) !important; color: #fff !important; }
.btn.steam:hover { border-color: #66c0f4 !important; }
.code-form input { border-radius: 10px !important; background: #0f1117 !important; border: 1px solid var(--line-2) !important; letter-spacing: .3em; font-weight: 800; text-align: center; }
.toast { border-radius: 12px !important; }
.status.online, .status.on { color: var(--ok) !important; }

@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 8px; }
  .side-switch { order: 3; width: 100%; display: grid !important; grid-template-columns: 1fr 1fr; }
  .side-switch.hidden { display: none !important; }
  .loadout { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .slot-art { height: 104px !important; }
  .slot-art img { max-height: 90px !important; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; }
  .drawer { width: 100% !important; }
  .skins { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (prefers-reduced-motion: reduce) { .slot, .skin, .slot-art img { transition: none !important; } }
:root { --grad: linear-gradient(90deg, #8e95f0, #6b74e8, #565fd6); }
.login { background: radial-gradient(circle at 28% 12%, rgba(107,116,232,.18), transparent 55%), radial-gradient(circle at 78% 92%, rgba(90,166,255,.10), transparent 55%) !important; }

/* ---------- site rail (shared look with the main site) ---------- */
.site-rail { position: fixed; left: 0; top: 0; bottom: 0; width: 88px; z-index: 40; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px;
  background: linear-gradient(180deg, #11131a, #0d0e13); border-right: 1px solid var(--line); }
.sr-logo { display: grid; place-items: center; width: 100%; padding: 4px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.sr-logo svg { width: 38px; height: 38px; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.sr-logo:hover svg { transform: rotate(90deg); }
.sr-logo-bg { fill: #6b74e8; }
.sr-logo-ln { fill: none; stroke: #11070a; stroke-width: 2.6; }
.site-rail nav { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.site-rail nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; border-radius: 13px; color: var(--muted); text-decoration: none;
  font-size: 10.5px; font-weight: 700; transition: background .15s, color .15s; }
.site-rail nav a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.site-rail nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.site-rail nav a:hover svg { transform: translateY(-2px) scale(1.08); }
.site-rail nav a.active { background: linear-gradient(135deg, rgba(107,116,232,.26), rgba(107,116,232,.08)); color: #fff; }
.site-rail nav a.active svg { stroke: var(--accent-2); }
.site-rail nav a.active::before { content: ""; position: absolute; left: -8px; top: 22%; bottom: 22%; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent-2); box-shadow: 0 0 12px rgba(164,170,245,.7); }
body { padding-left: 88px; }
.topbar { left: 88px; }
.drawer-backdrop { z-index: 45; }
.drawer { z-index: 46; }
@media (max-width: 860px) {
  body { padding-left: 0; padding-bottom: 86px; }
  .topbar { left: 0; }
  .site-rail { left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; height: 64px; flex-direction: row; padding: 6px; border-radius: 20px; border: 1px solid var(--line-2);
    background: rgba(17,19,27,.86); backdrop-filter: blur(16px); box-shadow: 0 18px 40px -12px rgba(0,0,0,.75); }
  .sr-logo { display: none; }
  .site-rail nav { flex-direction: row; gap: 0; }
  .site-rail nav a { flex: 1 1 0; min-width: 0; padding: 6px 2px; font-size: 9.5px; }
  .site-rail nav a:nth-child(5), .site-rail nav a:nth-child(4) { display: none; }
  .site-rail nav a.active::before { display: none; }
  .site-rail nav a.active svg { stroke: #fff; background: var(--accent); border-radius: 10px; width: 40px; height: 26px; padding: 3px 9px; }
}
/* ---------- catalog hero ---------- */
.sk-hero { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; margin: 4px 0 18px; padding: 24px 26px; border-radius: 20px;
  background: radial-gradient(70% 140% at 100% 0%, rgba(197,107,255,.22), transparent 60%), radial-gradient(60% 120% at 0% 100%, rgba(90,166,255,.16), transparent 60%), linear-gradient(135deg, #1a1d29, #12141b);
  border: 1px solid var(--line-2); }
.sk-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(142,149,240,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(142,149,240,.08) 1px, transparent 1px); background-size: 36px 36px;
  mask-image: linear-gradient(90deg, #000, transparent 60%); -webkit-mask-image: linear-gradient(90deg, #000, transparent 60%); }
.sk-hero > * { position: relative; z-index: 1; }
.sk-kicker { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.sk-hero h1 { margin: 6px 0 8px; font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; letter-spacing: -.02em; text-transform: uppercase;
  background: linear-gradient(100deg, #fff, #c9ccff 40%, #a4aaf5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sk-hero p { margin: 0; max-width: 620px; color: #c7cddb; font-size: 14px; }
.sk-hero code { background: rgba(255,255,255,.08); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; color: #dfe2ff; }
.sk-steps { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; }
.sk-steps li { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.sk-steps b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 12px; }
@media (max-width: 640px) { .sk-hero { padding: 18px; } .sk-steps { width: 100%; } .sk-steps li { flex: 1; justify-content: center; padding: 8px 6px; font-size: 12px; } }
/* ---------- v3: offline mode, global search, clearer picker ---------- */
.sk-hero { flex-wrap: wrap; }
.sk-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.sk-summary { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.sk-offline { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 12px 14px; border-radius: 14px;
  background: rgba(245,185,58,.08); border: 1px solid rgba(245,185,58,.3); }
.sk-offline b { color: #ffd27a; }
.sk-offline span { color: #e6d6b3; font-size: 13.5px; }
.sk-search { flex-basis: 100%; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 14px; background: rgba(0,0,0,.35); border: 1px solid var(--line-2); }
.sk-search span { font-size: 20px; color: var(--muted); }
.sk-search input { flex: 1; height: 48px; border: 0; background: transparent; outline: none; color: #fff; font-size: 15px; font-weight: 600; }
.sk-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(107,116,232,.22); }
.status.away { color: #ffd27a !important; }
.status.away i { background: #f5b93a !important; box-shadow: 0 0 10px #f5b93a; }

.tab .n { margin-left: 7px; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 11px; font-weight: 800; color: var(--muted); }
.tab .n.has { background: rgba(50,224,138,.16); color: var(--ok); }
.tab.active .n { background: rgba(255,255,255,.22); color: #fff; }

.slot-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }
.slot-rarity { font-size: 11px; font-weight: 800; letter-spacing: .03em; color: var(--r); padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--r) 14%, transparent); }
.slot-rarity.none { color: var(--muted); background: rgba(255,255,255,.05); }
.slot-count { font-size: 11px; color: var(--muted); white-space: nowrap; }
.slot-art.dim img { opacity: .35; filter: grayscale(1) !important; }

/* search results reuse the skin card, laid out like the loadout */
.loadout.searching { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important; }
.loadout.searching .section-note { grid-column: 1 / -1; }
.search-hit { padding: 10px !important; }
.search-hit .skin-art { height: 92px !important; }
.search-hit .skin-art img { max-height: 86px !important; }
.skin-sub { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* picker */
.drawer { width: min(720px, 100%) !important; }
.preview { display: grid !important; grid-template-columns: 220px 1fr; gap: 18px; align-items: center; padding: 16px !important; margin: 0 18px 12px !important; }
.preview-art { height: 170px !important; display: grid; place-items: center; border-radius: 14px;
  background: radial-gradient(70% 70% at 50% 45%, color-mix(in srgb, var(--r) 38%, transparent), transparent 70%) !important; }
.preview-art img { max-height: 160px !important; max-width: 100%; animation: skFloat 4s ease-in-out infinite; }
@keyframes skFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-6px) rotate(1deg); } }
.preview-info b { font-size: 20px; font-weight: 900; line-height: 1.2; }
.preview-info .rarity { display: inline-block; width: fit-content; margin: 6px 0 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
  color: var(--r); background: color-mix(in srgb, var(--r) 15%, transparent); }
.preview-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.preview-actions .btn { height: 40px; }
.preview-actions .btn.done { background: rgba(50,224,138,.14) !important; border-color: rgba(50,224,138,.4) !important; color: var(--ok) !important; opacity: 1; }
.skins-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; font-size: 12.5px; }
.sort-switch { display: flex; gap: 6px; }
.rarity-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--r); }
.rarity-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, color-mix(in srgb, var(--r) 50%, transparent), transparent); }
.skin .tag { position: absolute; top: 6px; left: 6px; z-index: 1; }
@media (max-width: 640px) {
  .preview { grid-template-columns: 1fr; margin: 0 12px 10px !important; }
  .preview-art { height: 130px !important; }
  .preview-art img { max-height: 120px !important; }
  .sk-side { align-items: stretch; width: 100%; }
  .loadout.searching { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (prefers-reduced-motion: reduce) { .preview-art img { animation: none; } }
/* rows must keep their natural height and scroll, not squeeze to fit the drawer */
.skins { grid-auto-rows: max-content !important; grid-template-rows: none !important; min-height: 0; }
.skins .skin { min-height: max-content; }

/* OneTapCS brand */
.brand-cs { background: linear-gradient(100deg, #a4aaf5, #c56bff); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.brand-sub { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--muted); margin-left: 6px; }
.brand-mark { font-size: 11px !important; letter-spacing: -.02em; }

/* real Steam logo in the sign-in button */
svg.steam-logo { width: 20px; height: 20px; flex: none; background: none !important; }
.btn.steam { gap: 10px !important; }
