:root {
  --bg: #0d0e0b;
  --bg2: #13150f;
  --panel: #181b13;
  --panel2: #1f2318;
  --line: #2c3123;
  --line2: #3b4230;
  --text: #e4e2d6;
  --muted: #9a9a86;
  --dim: #6f705f;
  --accent: #e0a64a;
  --accent2: #f2c46d;
  --olive: #8fa25c;
  --good: #7fc46a;
  --bad: #e06a5a;
  --r0: #b9b9ae; --r1: #5fc35f; --r2: #4f8fe6; --r3: #b46ae6; --r4: #e05656; --r5: #e8c547;
  --radius: 10px;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, system-ui, sans-serif; }
body {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(224,166,74,.08), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(143,162,92,.07), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 1px, transparent 1px 3px),
    var(--bg);
  min-height: 100vh;
}
a { color: var(--accent2); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
.mono { font-family: var(--mono); }

/* шапка */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 28px;
  padding: 12px 28px; background: rgba(13,14,11,.88); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; font-size: 20px;
  background: linear-gradient(135deg, var(--accent), #a8732a); color: #1a1408; }
.brand-text { font-family: "Russo One", sans-serif; font-size: 20px; letter-spacing: .5px; line-height: 1; }
.brand-text small { display: block; font: 500 11px Inter; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: #1a1408; background: var(--accent); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.emission { font: 500 13px var(--mono); padding: 6px 10px; border: 1px solid var(--line2); border-radius: 999px; color: var(--muted); }
.emission.live { color: #1a1408; background: var(--bad); border-color: var(--bad); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .65; } }
.userbox { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line2); color: var(--text); font-weight: 500; }
.userbox:hover { border-color: var(--accent); }

.app { max-width: 1240px; margin: 0 auto; padding: 28px; min-height: 70vh; }
.foot { text-align: center; color: var(--dim); font-size: 12px; padding: 24px; }
h1 { font: 26px "Russo One", sans-serif; margin: 0 0 4px; letter-spacing: .3px; }
h2 { font: 18px "Russo One", sans-serif; margin: 0 0 12px; }
.sub { color: var(--muted); margin: 0 0 22px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel + .panel { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } .top { flex-wrap: wrap; gap: 10px; padding: 10px 16px; } .app { padding: 16px; } }

label.f { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin: 14px 0 6px; }
input[type=text], input[type=number], select {
  width: 100%; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px; outline: none; }
input:focus, select:focus { border-color: var(--accent); }
.check { display: flex; gap: 8px; align-items: center; margin-top: 10px; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 8px;
  border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; font-weight: 600; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: #1a1408; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent2); }
.btn.wide { width: 100%; margin-top: 18px; padding: 12px; }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn.tg { background: #2a9fd8; border-color: #2a9fd8; color: #fff; }
.btn:disabled { opacity: .5; cursor: progress; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--bg2); cursor: pointer;
  color: var(--muted); font-size: 13px; font-weight: 500; }
.chip.on { background: rgba(224,166,74,.14); border-color: var(--accent); color: var(--accent2); }

/* сборки */
.builds { display: grid; gap: 14px; }
.build { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.build-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--panel2); border-bottom: 1px solid var(--line); }
.build-rank { font: 20px "Russo One"; color: var(--accent); width: 28px; }
.build-label { font-weight: 600; }
.build-price { margin-left: auto; font: 600 14px var(--mono); color: var(--accent2); }
.build-body { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; }
@media (max-width: 760px) { .build-body { grid-template-columns: 1fr; } }
.build-col { padding: 14px 16px; }
.build-col + .build-col { border-left: 1px solid var(--line); }
.gear { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.gear img, .gear .ph { width: 38px; height: 38px; object-fit: contain; border-radius: 6px; background: var(--bg2); border: 1px solid var(--line); flex: none; }
.gear .meta { font-size: 12px; color: var(--muted); }
.gear .gname { font-weight: 500; }
.gear .cnt { font: 600 13px var(--mono); color: var(--accent2); }
.gear .pr { margin-left: auto; font: 12px var(--mono); color: var(--muted); white-space: nowrap; }
.art-list { margin-top: 6px; border-top: 1px dashed var(--line2); padding-top: 6px; }
.rar { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.q0 { background: var(--r0); } .q1 { background: var(--r1); } .q2 { background: var(--r2); }
.q3 { background: var(--r3); } .q4 { background: var(--r4); } .q5 { background: var(--r5); }
.tq0 { color: var(--r0); } .tq1 { color: var(--r1); } .tq2 { color: var(--r2); } .tq3 { color: var(--r3); } .tq4 { color: var(--r4); } .tq5 { color: var(--r5); }
.gear img.bq0 { border-color: var(--r0); } .gear img.bq1 { border-color: var(--r1); } .gear img.bq2 { border-color: var(--r2); }
.gear img.bq3 { border-color: var(--r3); } .gear img.bq4 { border-color: var(--r4); } .gear img.bq5 { border-color: var(--r5); }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.kpi { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.kpi b { display: block; font: 600 20px var(--mono); color: var(--text); }
.kpi span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; }
.kpi.hl b { color: var(--accent2); }
.stats { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; font-size: 13px; }
.stats .v { font-family: var(--mono); text-align: right; }
.good { color: var(--good); } .bad { color: var(--bad); }
.acc { font-size: 12px; color: var(--muted); margin-top: 8px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 8px; }

/* аукцион */
.search { position: relative; }
.search input { font-size: 17px; padding: 14px 16px 14px 44px; }
.search::before { content: "⌕"; position: absolute; left: 15px; top: 9px; font-size: 24px; color: var(--muted); }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 16px; }
.icard { display: flex; gap: 10px; align-items: center; padding: 10px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; color: var(--text); }
.icard:hover { border-color: var(--accent); background: var(--panel2); }
.icard img, .icard .ph { width: 44px; height: 44px; object-fit: contain; flex: none; }
.icard .ph, .gear .ph { display: grid; place-items: center; color: var(--dim); }
.icard small { display: block; color: var(--muted); font-size: 12px; }
.empty { color: var(--muted); padding: 30px; text-align: center; }

.item-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.item-head img { width: 84px; height: 84px; object-fit: contain; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab { padding: 9px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 500; }
.tab.on { color: var(--accent2); border-color: var(--accent); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line2); }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.t td.n { font-family: var(--mono); text-align: right; white-space: nowrap; }
table.t th.n { text-align: right; }
table.t tr:hover td { background: rgba(255,255,255,.02); }
.chart { width: 100%; height: 260px; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }

.tracker-form { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 10px; align-items: end; }
@media (max-width: 760px) { .tracker-form { grid-template-columns: 1fr; } }
.tracker-form label.f { margin-top: 0; }

/* кабинет */
.trk { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.trk img, .trk .ph { width: 40px; height: 40px; object-fit: contain; }
.trk .meta { color: var(--muted); font-size: 13px; }
.trk .act { margin-left: auto; display: flex; gap: 6px; }
.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line2); border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: var(--text); border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(20px); background: #1a1408; }
.setting { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setting p { margin: 0; color: var(--muted); font-size: 13px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none;
  background: var(--panel2); border: 1px solid var(--accent); padding: 10px 16px; border-radius: 8px; transition: .25s; z-index: 50; }
.toast.on { opacity: 1; transform: translateX(-50%); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { color: var(--muted); padding: 30px; text-align: center; }
.note { font-size: 13px; color: var(--muted); }
.badge { font-size: 11px; padding: 2px 7px; border-radius: 99px; border: 1px solid var(--line2); color: var(--muted); }
@media (max-width: 600px) {
  .top { position: static; }
  .brand-text small { display: none; }
  .emission { font-size: 11px; padding: 4px 8px; }
  .userbox { padding: 5px 10px; font-size: 13px; }
  .kpi b { font-size: 16px; }
}

/* крафт */
.recipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.recipe { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; }
.rhead { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.rres { font-weight: 600; display: flex; flex-wrap: wrap; gap: 8px; }
.rbody { padding: 6px 12px; flex: 1; }
.rfoot { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.rfoot b { font-family: var(--mono); color: var(--text); }
.ing { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; }
.ing .pr { margin-left: auto; font: 12px var(--mono); color: var(--muted); white-space: nowrap; }
.ing .cnt { font: 600 12px var(--mono); color: var(--accent2); }
.ilink { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.ilink:hover span { color: var(--accent2); }
.ilink.nt { cursor: default; } .ilink.nt:hover span { color: var(--text); }
.ilink img, .ilink .ph { width: 28px; height: 28px; object-fit: contain; flex: none; border-radius: 4px; background: var(--panel); font-size: 13px; display: grid; place-items: center; color: var(--dim); }
.used { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2px 16px; }
.used .note { margin-left: auto; }
.chip.lock { opacity: .55; }

/* мета */
.meta-filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; align-items: end; }
.meta-filters label.f { margin-top: 0; }
@media (max-width: 760px) { .meta-filters { grid-template-columns: 1fr; } }
.grid-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-meta .panel + .panel { margin-top: 0; }
@media (max-width: 900px) { .grid-meta { grid-template-columns: 1fr; } }
.bar { height: 3px; background: var(--line); border-radius: 2px; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.combo { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.combo .plus { color: var(--dim); }
.combo b { margin-left: auto; color: var(--accent2); }

/* игроки */
.phead { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.avatar { width: 72px; height: 72px; border-radius: 14px; display: grid; place-items: center; font: 26px "Russo One";
  background: linear-gradient(135deg, var(--olive), #4b5530); color: #12140d; }
.pstats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pstats .panel + .panel { margin-top: 0; }

/* выброс */
a.emission { color: var(--muted); } a.emission:hover { border-color: var(--accent); }
.em-big { font: 30px "Russo One"; padding: 20px 0; }
.em-big small { display: block; font: 14px Inter; color: var(--muted); margin-top: 6px; }
.em-big.live { color: var(--bad); animation: pulse 1.2s infinite; }
.chips.sub { width: 100%; padding-top: 6px; margin-top: 2px; border-top: 1px dashed var(--line2); }
.grid2 > .panel + .panel { margin-top: 0; }
@media (max-width: 600px) { table.t .hm { display: none; } .panel { overflow-x: auto; } table.t td, table.t th { padding: 7px 6px; } }
@media (max-width: 900px) { .nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; } .nav a { white-space: nowrap; padding: 7px 11px; } }

/* ручная подстройка */
.tune-bar { display: flex; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--line); background: var(--bg2); }
.tune-panel { padding: 14px 16px; border-top: 1px dashed var(--line2); }
.trows { display: grid; gap: 4px; }
.trow { display: grid; grid-template-columns: 1fr 80px 120px 90px 90px; gap: 8px; align-items: center; font-size: 14px; }
.trow.th { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.trow .tv { text-align: right; color: var(--muted); }
.trow input { padding: 6px 8px; font-size: 13px; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; }
.seg button { width: 38px; padding: 5px 0; border: 0; background: var(--bg2); cursor: pointer; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line2); }
.seg button.on.up { background: rgba(127,196,106,.2); color: var(--good); }
.seg button.on.keep { background: rgba(224,166,74,.18); color: var(--accent2); }
.seg button.on.down { background: rgba(224,106,90,.18); color: var(--bad); }
.tup { color: var(--good); }
.tadd { margin-top: 8px; max-width: 320px; }
.tune-out { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.dchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dchip { padding: 4px 10px; border-radius: 99px; font-size: 13px; border: 1px solid var(--line2); }
.dchip.plus { border-color: rgba(127,196,106,.5); color: var(--good); }
.dchip.minus { border-color: rgba(224,106,90,.5); color: var(--bad); }
@media (max-width: 600px) { .trow { grid-template-columns: 1fr 64px 116px; } .trow input, .trow.th span:nth-child(n+4) { display: none; } }

/* инвентарь, забаффы, сравнение, модалка */
.inv-row { display: flex; gap: 8px; } .inv-row select { flex: 1; }
.own { font-size: 11px; color: var(--good); border: 1px solid rgba(127,196,106,.4); border-radius: 99px; padding: 0 6px; margin-left: 4px; }
.buy { font-size: 11px; color: var(--accent2); border: 1px solid rgba(224,166,74,.4); border-radius: 99px; padding: 0 6px; }
details.buffs { margin-top: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
details.buffs summary { cursor: pointer; font-size: 13px; }
.gear.sm img, .gear.sm .ph { width: 28px; height: 28px; }
.tune-bar { flex-wrap: wrap; }
.btn.on { border-color: var(--accent); color: var(--accent2); background: rgba(224,166,74,.12); }
.cmpbar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; display: flex; gap: 10px; align-items: center;
  background: var(--panel2); border: 1px solid var(--accent); border-radius: 12px; padding: 8px 12px; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); display: none; align-items: flex-start; justify-content: center; padding: 40px 12px; overflow-y: auto; }
.modal.on { display: flex; }
.modal-box { position: relative; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 20px; width: min(760px, 100%); }
.modal-x { position: absolute; right: 12px; top: 12px; }
table.cmp td.small { font-size: 12px; font-family: Inter, sans-serif; white-space: normal; text-align: left; }
.invmine, .invlist { display: grid; gap: 4px; }
.invlist { max-height: 340px; overflow-y: auto; margin-top: 8px; }
.invrow { display: flex; gap: 10px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); }
.invrow img, .invrow .ph { width: 30px; height: 30px; object-fit: contain; }
.invrow > span:nth-child(2) { flex: 1; }
.tiers button { width: 26px; height: 26px; border: 1px solid var(--line2); background: var(--bg2); border-radius: 6px; cursor: pointer; font-size: 15px; margin-left: 2px; }
.seg button[disabled] { color: var(--text); cursor: default; }
a.tab { color: var(--muted); } a.tab.on { color: var(--accent2); }
.pf-form { display: grid; grid-template-columns: 2fr 1fr .7fr .6fr 1fr 1fr auto; gap: 10px; align-items: end; }
.pf-form label.f { margin-top: 0; }
@media (max-width: 900px) { .pf-form { grid-template-columns: 1fr 1fr; } .pf-item { grid-column: 1 / -1; } }
.pf-item { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; }
.suggest:empty { display: none; }
.sg { display: flex; gap: 8px; align-items: center; padding: 6px 10px; cursor: pointer; }
.sg:hover { background: var(--bg2); }
.sg img, .sg .ph { width: 26px; height: 26px; object-fit: contain; }
.sg small { margin-left: auto; color: var(--muted); }
.kpis4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) { .kpis4 { grid-template-columns: repeat(2, 1fr); } }
.nowrap { white-space: nowrap; }
.tracker-form { grid-template-columns: repeat(4, 1fr) auto; }

:root { color-scheme: dark; }
.kpi b span { font-size: inherit; text-transform: none; letter-spacing: 0; }
.sellin { width: 130px !important; padding: 5px 8px !important; font-size: 13px; }
.spark { display: block; } .badge.good { color: var(--good); border-color: rgba(127,196,106,.4); }
.grid-meta { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) { .grid-meta { grid-template-columns: minmax(0, 1fr); } }
.grid-meta > .panel { overflow-x: auto; min-width: 0; }
@media (max-width: 1400px) { .grid-meta table.t .hp { display: none; } }
@media (max-width: 600px) { table.t .hsp { display: none; } }

.region { width: auto !important; padding: 6px 8px !important; font: 500 13px var(--mono); border-radius: 999px !important; }
.langbtn { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; cursor: pointer; font: 600 12px var(--mono); color: var(--muted); }
.langbtn:hover { border-color: var(--accent); color: var(--text); }
@media (max-width: 600px) { .userbox { max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
/* фильтры каталога */
.filters { margin-top: 12px; display: grid; gap: 10px; }
.fgroup { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: start; }
.flabel { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; padding-top: 8px; }
@media (max-width: 700px) { .fgroup { grid-template-columns: 1fr; } .flabel { padding-top: 0; } }
.chip.plus.on { background: rgba(127,196,106,.15); border-color: var(--good); color: var(--good); }
.chip.minus.on { background: rgba(224,106,90,.15); border-color: var(--bad); color: var(--bad); text-decoration: line-through; }
.chip .note { font-size: 11px; }
.icard .props { display: flex; flex-wrap: wrap; gap: 2px 8px; font: 11px var(--mono); margin-top: 3px; }
.rk5 { color: #e8c547; } .rk4 { color: #e05656; } .rk3 { color: #b46ae6; } .rk2 { color: #4f8fe6; } .rk1 { color: #5fc35f; }
.panel.alert { border-color: var(--bad); background: rgba(224,106,90,.08); margin-bottom: 16px; }
.kpi.warn b { color: var(--bad); }
td.small { font-size: 12px; }
.cslot { display: grid; grid-template-columns: 16px 1fr 110px 80px; gap: 6px; align-items: center; margin-bottom: 6px; }
.cslot select, .cslot input { padding: 7px 8px; font-size: 13px; }
.saved { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.saved > div { flex: 1; }
.cslot { grid-template-columns: 18px 1fr 1fr; grid-template-areas: "n a a" ". q p"; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.cslot > span { grid-area: n; } .cslot [data-k=id] { grid-area: a; } .cslot [data-k=qlt] { grid-area: q; } .cslot [data-k=quality] { grid-area: p; }
.trend { font-size: 15px; margin: 6px 0; }
h3 { font: 14px "Russo One", sans-serif; margin: 0 0 8px; color: var(--muted); }
.bars { display: flex; gap: 3px; align-items: flex-end; height: 110px; }
.bar1 { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar1 i { display: block; width: 100%; background: var(--line2); border-radius: 3px 3px 0 0; }
.bar1.best i { background: var(--accent); }
.bar1 span { font-size: 10px; color: var(--muted); margin-top: 3px; font-family: var(--mono); }
.trow.price { padding: 6px 0; border-bottom: 1px dashed var(--line2); margin-bottom: 4px; }
.trow.price .pm-hint { font-size: 12px; }
@media (max-width: 600px) { .trow.price .pm-hint { display: none; } .trow.price input { display: block !important; grid-column: 1 / -1; } }

.cslot { grid-template-columns: 18px 1fr 1fr; grid-template-areas: "n a a" ". q p" ". b b"; }
.cslot .cbtns { grid-area: b; display: flex; gap: 6px; justify-content: flex-end; }
.cslot .cbtns .btn { padding: 3px 9px; }
.btn:disabled { opacity: .35; cursor: default; }
.cslot { grid-template-columns: 18px 1fr 76px auto; grid-template-areas: "n a a a" ". q p b"; }

/* ───────── полировка: отклик, плавность, мелкие неровности (без смены стиля) ───────── */
:root { --ease-out: cubic-bezier(.23, 1, .32, 1); --ease: cubic-bezier(.25, .1, .25, 1); }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scrollbar-color: var(--line2) transparent; }
/* цифры одинаковой ширины — колонки цен и статов не «пляшут» */
.mono, td.n, .kpi b, .build-price, .gear .pr, .gear .cnt, .stats .v, .ing .pr, .rfoot b { font-variant-numeric: tabular-nums; }
h1, h2 { text-wrap: balance; } .sub, .note { text-wrap: pretty; }

/* переходы только нужных свойств, быстро и с сильным ease-out */
.btn, .chip, .nav a, .tab, .langbtn, .userbox, .seg button, .tiers button, .icard, .sg, .region, a.emission {
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease), transform 160ms var(--ease-out);
}
input[type=text], input[type=number], select { transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease); }
input:focus, select:focus { box-shadow: 0 0 0 3px rgba(224, 166, 74, .14); }

/* нажатие чувствуется */
.btn:active:not(:disabled), .chip:active, .langbtn:active, .userbox:active, .nav a:active, .tab:active,
.seg button:active:not([disabled]), .tiers button:active { transform: scale(.97); }
.icard:active { transform: scale(.985); }

/* наведение — только там, где есть мышь (на телефоне тап не залипает) */
@media (hover: hover) and (pointer: fine) {
  .chip:not(.on):hover { border-color: #4a5340; color: var(--text); }
  .tab:not(.on):hover, a.tab:not(.on):hover { color: var(--text); }
  .seg button:not(.on):not([disabled]):hover { color: var(--text); }
  .btn.primary:hover { border-color: var(--accent2); }
}
@media not ((hover: hover) and (pointer: fine)) {
  .btn:hover:not(.on):not(.primary), .userbox:hover, .langbtn:hover { border-color: var(--line2); }
  .nav a:hover:not(.on) { background: transparent; color: var(--muted); }
  .icard:hover { border-color: var(--line); background: var(--panel); }
  .btn.primary:hover { background: var(--accent); }
}

/* фокус с клавиатуры виден, мышью — нет */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
input:focus-visible, select:focus-visible { outline: none; }

/* панели — едва заметная глубина */
.panel, .build, .icard, .recipe { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025), 0 10px 24px -18px rgba(0, 0, 0, .7); }
.build-head { background: linear-gradient(180deg, var(--panel2), #1c2016); }

/* уведомление и переключатели: конкретные свойства вместо transition: all */
.toast { transition: opacity 180ms var(--ease-out), transform 260ms var(--ease-out); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.switch span { transition: background-color 180ms var(--ease); }
.switch span::before { transition: transform 220ms var(--ease-out), background-color 180ms var(--ease); }

/* модалка появляется, а не «выпрыгивает» */
.modal.on { animation: kpk-fade 160ms var(--ease-out); }
.modal.on .modal-box { animation: kpk-pop 220ms var(--ease-out); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); }
@keyframes kpk-fade { from { opacity: 0; } }
@keyframes kpk-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* результаты подбора — лёгкий каскад */
#bres > .builds > .build { animation: kpk-rise 280ms var(--ease-out) both; }
#bres > .builds > .build:nth-child(2) { animation-delay: 40ms; }
#bres > .builds > .build:nth-child(3) { animation-delay: 80ms; }
#bres > .builds > .build:nth-child(4) { animation-delay: 120ms; }
#bres > .builds > .build:nth-child(n+5) { animation-delay: 160ms; }
@keyframes kpk-rise { from { opacity: 0; transform: translateY(8px); } }
.emission.live, .em-big.live { animation-duration: 1.6s; }

/* вкладки не ломаются на телефоне, а прокручиваются */
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { white-space: nowrap; flex: none; }
.emission { white-space: nowrap; }

/* мета: названия не рвутся на 3–4 строки */
.grid-meta table.t td, .grid-meta table.t th { padding-left: 7px; padding-right: 7px; }
.grid-meta table.t td:nth-child(2) { min-width: 150px; }
.grid-meta .spark { width: 56px; height: 20px; }
.grid-meta table.t th { line-height: 1.25; }

/* меньше движения, если так настроено в системе (спиннер оставляем — это индикатор) */
@media (prefers-reduced-motion: reduce) {
  *:not(.spinner), *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-property: opacity, color, background-color, border-color !important; }
  .btn:active, .chip:active, .icard:active, .nav a:active, .tab:active { transform: none !important; }
}
.grid-meta table.t td:nth-child(2) { min-width: 205px; }
@media (max-width: 600px) {
  .top-right { width: 100%; min-width: 0; gap: 8px; }
  .top-right .emission { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; }
  .top-right .userbox { margin-left: auto; flex: none; }
}
.ilink.unk span { color: var(--dim); font-style: italic; }
