/* ====================================================================
   STALCASH Web — тёмный игровой интерфейс (STALCRAFT: X / STALZONE)
   ==================================================================== */

:root {
  --bg: #070a0f;
  --bg-2: #0b1119;
  --panel: #0f1723;
  --panel-2: #131d2b;
  --panel-3: #182335;
  --border: #223146;
  --border-soft: #1a2638;
  --text: #e8eef7;
  --text-dim: #93a4bd;
  --text-faint: #64748b;
  --accent: #f5a524;
  --accent-2: #ff7a1a;
  --good: #34d399;
  --bad: #f87171;
  --info: #60a5fa;

  --r-common: #9aa7b8;
  --r-uncommon: #43d17a;
  --r-rare: #3fa9ff;
  --r-epic: #b45cff;
  --r-legend: #ffb300;
  --r-myth: #ff5f6d;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-soft: 0 4px 16px rgba(0, 0, 0, .35);
  --mono: "JetBrains Mono", "Consolas", "SF Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

body {
  background-image:
    radial-gradient(900px 600px at 15% -10%, rgba(245, 165, 36, .07), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(63, 169, 255, .06), transparent 55%),
    linear-gradient(180deg, #070a0f 0%, #060910 100%);
  background-attachment: fixed;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

img { max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* -------------------- Шапка -------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px clamp(12px, 3vw, 28px);
  background: rgba(9, 13, 19, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.brand { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 0 0 auto; cursor: pointer; border-radius: 12px; padding: 3px 6px 3px 3px; transition: background .14s ease; }
.brand:hover { background: rgba(255,255,255,.04); }
.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.brand-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #1a1206;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 1px rgba(255, 200, 90, .35), 0 6px 18px rgba(245, 165, 36, .28);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-size: 17px; letter-spacing: .3px; }
.brand-text small { color: var(--text-faint); font-size: 10.5px; letter-spacing: .4px; }

/* Вкладок стало 8 («Главная» + разделы) — на ноутбуке они не помещаются одной
   строкой и раньше растягивали весь документ по горизонтали. Теперь полоса
   вкладок сжимается и прокручивается, а не выталкивает шапку за экран. */
.main-tabs { display: flex; gap: 6px; margin: 0 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.main-tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  padding: 9px 18px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  transition: all .16s ease;
  white-space: nowrap;
}
.tab:hover { color: var(--text); background: var(--panel-2); }
.tab.active {
  color: #12100a;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(245, 165, 36, .25);
}

/* Вкладка «Аукцион» с выпадающим меню под-разделов (Каталог / Советник /
   Выбросы). Меню раскрывается наведением (и фокусом с клавиатуры), поэтому
   перейти в под-раздел можно прямо из шапки, не заходя в аукцион.

   ВАЖНО: полоса вкладок прокручивается по горизонтали (`.main-tabs` имеет
   `overflow-x:auto`), а любой scroll-контейнер вынужденно обрезает и вылет по
   вертикали (`overflow-y` вычисляется в `auto`). Абсолютная панель под вкладкой
   из-за этого была не видна — торчала только «стрелочка». Поэтому панель
   `position:fixed`: она вынесена из-под обрезки, а координаты под вкладкой
   ставит JS (bindAuctionTabMenu) — с поправкой на topbar, который из-за
   `backdrop-filter` служит containing block для fixed-потомков. */
.tab-dd { position: relative; display: inline-flex; }
.tab-caret { font-size: 10px; opacity: .7; margin-left: 2px; font-style: normal; }
.tab-dd-panel {
  position: fixed; top: 0; left: 0; z-index: 120;
  min-width: 264px; padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}
/* Мостик над панелью: пока курсор идёт от вкладки к меню, он остаётся внутри
   `.tab-dd:hover`, и панель не «захлопывается» на 6-пиксельном зазоре. */
.tab-dd-panel::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.tab-dd.open .tab-dd-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.tab-dd-opt {
  display: flex; flex-direction: column; gap: 2px; text-align: left;
  padding: 9px 11px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--text-dim);
  transition: background .12s ease, color .12s ease;
}
.tab-dd-opt b { color: var(--text); font-size: 13.5px; font-weight: 600; }
.tab-dd-opt span { font-size: 11.5px; color: var(--text-faint); }
.tab-dd-opt:hover { background: var(--panel-2); border-color: var(--border-soft); }
.tab-dd-opt:hover b { color: var(--accent); }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.worker-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--text-dim);
  white-space: nowrap;
}
.worker-pill .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--text-faint);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, .5);
}
.worker-pill.live .dot { background: var(--good); animation: pulse 1.8s infinite; }
.worker-pill.live { color: var(--good); border-color: rgba(52,211,153,.35); }
.worker-pill.dead .dot { background: var(--bad); }
.worker-pill.dead { color: var(--bad); border-color: rgba(248,113,113,.35); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52,211,153,.55); }
  70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); }
  100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); }
}

.icon-btn {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 38px; height: 38px;
  border-radius: 10px;
  font-size: 16px;
  transition: all .15s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.icon-btn.off { opacity: .45; }

/* -------------------- Страницы -------------------- */
.page {
  display: none;
  flex: 1;
  /* Интерфейс занимает ВСЮ ширину окна (раньше был лимит 1500px — на широких
     мониторах оставался пустой «жёлоб» по краям). */
  padding: clamp(14px, 1.7vw, 30px);
  max-width: none;
  width: 100%;
  margin: 0 auto;
  animation: fade .22s ease;
}
.page.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* -------------------- Карточки/панели -------------------- */
.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
}

.filters-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
}
.filters-head h2 { margin: 0; font-size: 15px; letter-spacing: .3px; }
.engine-note { color: var(--text-faint); font-size: 12px; }
/* Плашка BETA для разделов в активной разработке (пока свободный доступ). */
.beta-badge {
  display: inline-block; vertical-align: middle; margin-left: 8px;
  font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  color: #1a1205; background: linear-gradient(135deg, #ffd764, #ffb52e);
  box-shadow: 0 2px 8px rgba(255,181,46,.35);
}

.filters-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px 16px;
  padding: 16px 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 12px; color: var(--text-dim); font-weight: 600; letter-spacing: .2px; }

/* -------------------- Кастомный список «Глубина истории» -------------------- */
.lbl-tip { display: inline-flex; align-items: center; gap: 6px; }
.tip {
  width: 16px; height: 16px; padding: 0; flex: none;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel-3);
  color: var(--text-dim);
  font-size: 11px; font-weight: 700; line-height: 1;
  cursor: help; transition: border-color .15s ease, color .15s ease;
}
.tip:hover { border-color: var(--accent); color: var(--accent); }

.dd { position: relative; }
.dd-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 14px; font-family: inherit; text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.dd-trigger:hover { border-color: var(--accent); }
.dd.open .dd-trigger {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 165, 36, .14);
}
.dd-caret { color: var(--text-faint); font-size: 12px; }
.dd-panel {
  position: absolute; z-index: 60;
  top: calc(100% + 6px); left: 0; right: 0;
  min-width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
}
.dd.open .dd-panel { display: block; }
.dd-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 14px; color: var(--text);
  cursor: pointer;
}
.dd-opt::before {
  content: ""; width: 15px; height: 15px; flex: none;
  border-radius: 50%; border: 2px solid var(--border);
}
.dd-opt:hover { background: var(--panel-2); }
.dd-opt.active {
  background: rgba(245, 165, 36, .1); color: var(--accent); font-weight: 600;
}
.dd-opt.active::before {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 0 42%, transparent 46%);
}
.dd-check {
  display: flex; align-items: flex-start; gap: 9px;
  margin-top: 6px; padding: 10px 12px;
  border-top: 1px solid var(--border-soft);
  font-size: 13px; color: var(--text); font-weight: 600;
  cursor: pointer;
}
.dd-check input {
  width: 16px; height: 16px; flex: none; margin-top: 1px;
  accent-color: var(--accent);
}
.dd-hint {
  padding: 2px 12px 8px 37px;
  font-size: 12px; line-height: 1.4; color: var(--text-faint);
}

input[type="text"], input[type="number"], input[type="search"], select {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 165, 36, .14);
}
select { cursor: pointer; }

.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); width: fit-content; max-width: 100%; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

.row-inline { display: flex; gap: 8px; flex-wrap: wrap; }

/* -------------------- Кнопки -------------------- */
.primary-btn {
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #14100a;
  border: none;
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 6px 18px rgba(245, 165, 36, .22);
  transition: transform .12s ease, box-shadow .12s ease;
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(245,165,36,.32); }
.primary-btn:active { transform: translateY(0); }

.ghost-btn {
  background: var(--panel-3);
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  transition: all .15s ease;
}
.ghost-btn:hover { color: var(--text); border-color: var(--accent); }
.ghost-btn.active { color: var(--accent); border-color: var(--accent); }

.mini-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-faint);
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 12px;
  transition: all .14s ease;
}
.mini-btn:hover { color: var(--accent); border-color: var(--accent); }

.filters-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 0 18px 16px;
}

/* 📖 Гайд «Как пользоваться снайпером» — свёрнутая строка под фильтрами. */
.sniper-guide-wrap {
  padding: 0 18px 14px;
  border-top: 1px solid var(--border-soft);
  margin-top: 2px;
}
.sniper-guide-toggle {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-faint);
  padding: 4px 0;
}
.sniper-guide-toggle:hover { color: var(--text-dim); }
.sniper-guide { margin-top: 8px; }
.sniper-guide .noot-start-steps { gap: 10px; }

/* 💰 «Где профит выше»: таблица редкостей внутри гайда метовых модулей. */
.mm-money {
  margin-top: 12px; padding: 14px 15px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--border-soft);
}
.mm-money-head {
  font-size: 14px; font-weight: 800; margin-bottom: 3px;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.mm-money-sub { font-size: 12px; font-weight: 500; color: var(--text-faint); }
.mm-money-rows { display: flex; flex-direction: column; gap: 1px; margin-top: 9px; }
.mm-money-row {
  display: grid; grid-template-columns: 108px minmax(0, 1fr) 132px;
  align-items: center; gap: 10px; padding: 7px 6px;
  border-radius: 8px; font-size: 13px;
}
.mm-money-row:nth-child(odd) { background: rgba(255, 255, 255, .022); }
.mm-money-name { font-weight: 800; }
.mm-money-cells { color: var(--text-dim); line-height: 1.45; }
.mm-money-cells b { color: var(--text); }
.mm-money-verdict { font-size: 12px; font-weight: 700; text-align: right; }
.mm-money-verdict.dim { color: var(--text-faint); }
.mm-money-verdict.good { color: var(--good); }
.mm-money-verdict.best { color: #eab308; }
.mm-money-tip {
  margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--border-soft);
  font-size: 12.5px; line-height: 1.6; color: var(--text-dim);
}
.mm-money-tip b { color: var(--text); }
.mm-money-note {
  margin-top: 7px; font-size: 12px; line-height: 1.55; color: var(--text-faint); font-style: italic;
}
@media (max-width: 860px) {
  .mm-money-row { grid-template-columns: 1fr; gap: 3px; }
  .mm-money-verdict { text-align: left; }
}

/* -------------------- Чипы категорий -------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 7px; max-height: 210px; overflow-y: auto; padding: 2px; }
.chip {
  border: 1px solid var(--border);
  background: var(--panel-3);
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  transition: all .14s ease;
  white-space: nowrap;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active {
  background: rgba(245, 165, 36, .15);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.chip .cnt { opacity: .6; font-size: 11px; margin-left: 4px; }

/* -------------------- Избранное -------------------- */
.fav-box { position: relative; }
.suggest {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--panel-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 260px; overflow-y: auto;
  box-shadow: var(--shadow);
  display: none;
}
.suggest.open { display: block; }
.suggest .item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; cursor: pointer; font-size: 13px;
}
.suggest .item:hover { background: var(--panel-2); }
.suggest .item img { width: 26px; height: 26px; object-fit: contain; }
.suggest .item small { color: var(--text-faint); margin-left: auto; }

.fav-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.fav-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--panel-3); border: 1px solid var(--border);
  padding: 5px 8px 5px 11px; border-radius: 999px; font-size: 12.5px;
}
.fav-tag button { background: none; border: none; color: var(--bad); font-size: 14px; }

/* -------------------- Диагностика -------------------- */
.diag-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 16px 18px; }
.diag-cell { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 11px; padding: 11px 13px; }
.diag-cell b { display: block; font-size: 20px; }
.diag-cell span { color: var(--text-faint); font-size: 12px; }

/* -------------------- Лента -------------------- */
.feed-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 4px 2px 12px; }
.feed-head h2 { margin: 0; font-size: 18px; }
.feed-stats { color: var(--text-faint); font-size: 13px; }
.feed-stats b { color: var(--accent); }

/* Карточки в ряду — одной высоты: сетка растягивает их, а внутренний флекс
   прижимает «Выставлен…» и кнопки к низу, чтобы подвалы стояли на одной линии. */
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; align-items: stretch; }

/* --- Карточка лота с рамкой редкости --- */
.lot-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--rarity, var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 14px 15px 13px;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  animation: cardIn .3s ease;
}
.lot-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.lot-card.is-new { box-shadow: 0 0 0 1px var(--good), var(--shadow); }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.lot-top { display: flex; gap: 12px; align-items: flex-start; }

/* --- Игровая «ячейка» предмета (как слот инвентаря в STALCRAFT) --- */
.lot-ico {
  position: relative;
  width: 58px; height: 58px; flex: 0 0 58px;
  border-radius: 8px;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--rarity, #888) 60%, var(--border));
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--rarity, #888) 16%, var(--bg-2)) 0%,
      var(--bg-2) 100%);
  box-shadow: inset 0 0 10px color-mix(in srgb, var(--rarity, #888) 20%, transparent);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.lot-ico::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--rarity, #888);
  opacity: .85;
}
.ico-img {
  width: 100%; height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .55));
}
.ico-qty {
  position: absolute; top: 2px; right: 3px;
  font-size: 10.5px; font-weight: 800; line-height: 1;
  color: #f3f5f8;
  text-shadow: 0 1px 3px #000, 0 0 3px #000;
  pointer-events: none;
}
.lot-head { min-width: 0; flex: 1; }
.lot-title { font-weight: 700; font-size: 14.5px; line-height: 1.25; word-break: break-word; color: var(--rarity, var(--text)); }
.lot-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; }
.lot-badge {
  display: inline-block;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--rarity, #888) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--rarity, #888) 55%, transparent);
  color: var(--rarity, var(--text-dim));
}
.new-chip {
  display: inline-block;
  background: var(--good); color: #052e1b;
  font-size: 10px; font-weight: 800; letter-spacing: .6px;
  padding: 3px 7px; border-radius: 6px;
}
.copy-btn {
  margin-left: auto;
  background: var(--panel-3); border: 1px solid var(--border);
  color: var(--text-dim); border-radius: 8px; padding: 6px 9px; font-size: 14px;
  transition: all .14s ease; flex: 0 0 auto;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.done { color: var(--good); border-color: var(--good); }

.lot-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 11px 0; font-size: 12px; color: var(--text-dim); }
.lot-meta .m b { color: var(--text); font-weight: 600; }
.lot-meta .pro-lock { color: var(--accent); cursor: pointer; }
.lot-meta .pro-lock:hover { text-decoration: underline; }
.lot-time { color: var(--text-faint); font-size: 11.5px; margin-top: auto; padding-top: 10px; }
.pro-lock { color: var(--accent); cursor: pointer; }
.pro-lock:hover { text-decoration: underline; }

/* Тизер целого PRO-блока (ИИ-подсказчик Убежища, когда нет подписки): сама
   секция и суть фичи видны, данные скрыты. Клик открывает личный кабинет. */
.pro-teaser {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 18px; border-radius: var(--radius-sm);
  background: linear-gradient(120deg, rgba(245,165,36,.10), rgba(255,122,26,.05));
  border: 1px dashed var(--accent); cursor: pointer;
}
.pro-teaser:hover { background: linear-gradient(120deg, rgba(245,165,36,.16), rgba(255,122,26,.08)); }
.pro-teaser .pt-ico { font-size: 20px; }
.pro-teaser .pt-text { color: var(--text); font-weight: 600; }
.pro-teaser .pt-cta {
  margin-left: auto; color: #0b0f16; background: var(--accent);
  border-radius: 8px; padding: 6px 12px; font-weight: 700; font-size: 13px; white-space: nowrap;
}

.lot-prices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 4px; }
.price-cell { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 10px; padding: 8px 10px; text-align: center; }
.price-cell span { display: block; font-size: 10.5px; color: var(--text-faint); }
.price-cell b { font-size: 15px; font-family: var(--mono); }
.price-cell.buy b { color: var(--info); }
.price-cell.target b { color: var(--accent); }
.net-note { display: block; margin-top: 3px; font-style: normal; font-size: 10.5px; color: var(--text-faint); }
.lot-warn { margin-top: 6px; font-size: 11px; color: var(--accent); background: rgba(245,165,36,0.08); border: 1px solid rgba(245,165,36,0.35); border-radius: 8px; padding: 4px 8px; text-align: center; }
.lot-compete { margin-top: 6px; font-size: 11px; color: var(--text-faint); text-align: center; }
.lot-compete b { color: var(--text); }
.lot-compete.dense { color: var(--bad, #f87171); }
.lot-compete.dense b { color: var(--bad, #f87171); }

.profit-line {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 11px; padding: 10px 12px;
  background: rgba(52, 211, 153, .08);
  border: 1px solid rgba(52, 211, 153, .25);
  border-radius: 11px;
}
.profit-line .pl-label { font-size: 12px; color: var(--text-dim); }
.profit-line .pl-val { font-size: 19px; font-weight: 800; color: var(--good); font-family: var(--mono); }
.profit-line .pl-pct { font-size: 13px; color: var(--good); margin-left: 8px; }
.profit-line.neg { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.3); }
.profit-line.neg .pl-val, .profit-line.neg .pl-pct { color: var(--bad); }
/* Нет рекомендации по варианту (target=0): нейтральный серый, без «зелёной» цены. */
.price-cell.none b { color: var(--text-dim); font-size: 13.5px; font-family: inherit; }
.profit-line.none { background: rgba(148,163,184,.06); border-color: var(--border-soft); }
.profit-line.none .pl-val { color: var(--text-dim); font-size: 13px; font-weight: 600; font-family: inherit; }

/* --- Свойства/прокрутка модуля --- */
.lot-stats { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 6px; }
.stat-chip {
  font-size: 11.5px; padding: 4px 9px; border-radius: 8px;
  background: var(--bg-2); border: 1px solid var(--border-soft); color: var(--text-dim);
}
.stat-chip b { color: var(--text); }
.stat-chip.bonus { border-color: rgba(245,165,36,.35); color: var(--accent); }

/* Характеристики предмета (артефакты/броня/оружие): вместо столбика широких
   «капсул» на всю ширину — те же ровные строки, что у эффектов модулей.
   Длинный список по умолчанию свёрнут (3 строки) и открывается кнопкой. */
.stat-box { margin-top: 10px; }
.stat-rows {
  display: flex; flex-direction: column;
  background: rgba(255,255,255,.017);
  border: 1px solid var(--border-soft); border-radius: 10px;
  padding: 7px 10px 8px;
}
.stat-row {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 10px;
  font-size: 12px; padding: 2.5px 0; color: var(--text-dim);
}
.stat-row + .stat-row { border-top: 1px solid rgba(255,255,255,.04); }
.stat-row.hidden-extra { display: none; }
.stat-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-row-val {
  font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--text); white-space: nowrap;
}
.stat-row.pos .stat-row-val { color: var(--good); }
.stat-row.neg .stat-row-val { color: var(--bad); }
.stat-row.pos .stat-row-name { color: #a7b4c7; }
.stat-row.neg .stat-row-name { color: #a7b4c7; }

.stats-toggle {
  margin-top: 6px; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border-soft); border-radius: 8px;
  color: var(--text-faint); font-family: inherit; font-size: 11.5px; font-weight: 600;
  padding: 3px 9px; cursor: pointer; transition: all .13s ease;
}
.stats-toggle:hover { color: var(--accent); border-color: rgba(245,165,36,.45); }
.stats-toggle i {
  font-style: normal; font-family: var(--mono); font-size: 10.5px;
  color: var(--accent); opacity: .85;
}

/* Характеристики модуля: Слот → Название → значение, ниже — аккуратные строки
   «свойство … значение». Раньше эффекты были отдельными капсулами в свободном
   потоке: ряды не выравнивались, значения прыгали по ширине, а цвет плюса/минуса
   вообще не срабатывал (классы .pos/.neg против type="positive"/"negative"). */
.rolls { margin-top: 12px; border-top: 1px dashed var(--border); padding-top: 10px; }
.roll-slot {
  margin-bottom: 8px; padding: 8px 10px 9px;
  background: rgba(255,255,255,.017);
  border: 1px solid var(--border-soft); border-radius: 10px;
}
.roll-slot:last-child { margin-bottom: 0; }
.roll-slot-head {
  display: flex; align-items: baseline; gap: 8px; font-size: 12px;
  padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.045);
}
.roll-slot-name {
  color: var(--text-faint); font-weight: 700; font-size: 10.5px;
  letter-spacing: .5px; text-transform: uppercase; flex: 0 0 auto;
}
.roll-name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roll-val {
  margin-left: auto; font-family: var(--mono); font-weight: 700; font-size: 12.5px;
  flex: 0 0 auto;
}
.roll-effects { display: flex; flex-direction: column; gap: 1px; margin-top: 6px; }
.roll-effects.hidden { display: none; }
.rolls-toggle { margin-top: 8px; }
.rolls .stats-toggle + .stats-toggle { margin-left: 0; }

/* Строка характеристики: название слева, значение справа (колонкой) — ровная
   сетка по всем слотам, без «капсул» и рамок вокруг каждой строки. */
.eff {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 10px;
  font-size: 11.5px; padding: 2px 0; border-radius: 5px;
  color: var(--text-dim);
}
.eff-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eff-val {
  font-family: var(--mono); font-weight: 700; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.eff.pos .eff-val { color: var(--good); }
.eff.neg .eff-val { color: var(--bad); }
.eff.pos .eff-name { color: #a7b4c7; }
.eff.neg .eff-name { color: #a7b4c7; }
/* Совместимость со старыми классами (.pos/.neg на всей плашке). */
.eff.pos { color: var(--good); }
.eff.neg { color: var(--bad); }

.bonus-row { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.bonus-chip { font-size: 11.5px; padding: 4px 9px; border-radius: 8px; background: rgba(245,165,36,.1); border: 1px solid rgba(245,165,36,.3); color: var(--accent); }

.lot-foot { display: flex; gap: 9px; margin-top: 12px; }
.lot-foot .ghost-btn { flex: 1; }

.feed-empty { text-align: center; color: var(--text-faint); padding: 40px 20px; font-size: 14px; }

/* -------------------- Модалка истории -------------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 6, 10, .78);
  backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  animation: fade .18s ease;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  width: min(900px, 100%);
  max-height: 92vh; overflow-y: auto;
  padding: 18px 20px 22px;
}
.modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.modal-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* Иконка в шапке окна истории — та же игровая «ячейка», что в ленте: рамка,
   подложка и полоска снизу окрашены в редкость/ранг (--rarity). Раньше это был
   голый <img> с серой рамкой, поэтому у «Мастера» НЕ было красной обводки. */
.modal-ico { position: relative; width: 46px; height: 46px; flex: 0 0 46px; border-radius: 10px; padding: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rarity, #888) 60%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--rarity, #888) 16%, var(--bg-2)) 0%, var(--bg-2) 100%);
  box-shadow: inset 0 0 10px color-mix(in srgb, var(--rarity, #888) 20%, transparent); }
.modal-ico::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rarity, #888); opacity: .85; }
.modal-ico img { max-width: 100%; max-height: 100%; object-fit: contain; }
.modal-title b { display: block; font-size: 16px; }
.modal-title small { color: var(--text-faint); font-size: 12px; }
.modal-head .icon-btn { margin-left: auto; }

.periods-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.periods { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 0; }
.hist-variant { white-space: nowrap; }
.periods button {
  background: var(--panel-3); border: 1px solid var(--border); color: var(--text-dim);
  padding: 6px 14px; border-radius: 9px; font-size: 13px; font-weight: 600; transition: all .14s ease;
}
.periods button:hover { color: var(--text); border-color: var(--accent); }
.periods button.active { background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: #14100a; border-color: transparent; }

/* Шапка графика: крупная цена периода + селектор периодов справа (как на
   биржевых трекерах). Периоды — компактный «сегмент» в один ряд. */
.chart-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.chart-price { display: flex; flex-direction: column; gap: 2px; min-height: 42px; justify-content: flex-end; }
.chart-price .cp-cap { font-size: 11px; letter-spacing: .4px; text-transform: uppercase; color: var(--text-faint); }
.chart-price .cp-val { font-size: 26px; font-weight: 800; font-family: var(--mono); line-height: 1.05; }
.chart-price .cp-chg { font-size: 12.5px; font-weight: 600; }
.chart-price .cp-chg.up { color: var(--good); }
.chart-price .cp-chg.down { color: var(--bad); }
.chart-head .periods { margin-left: auto; }
/* Правая часть шапки графика: галочка «⚡ Выбросы» + селектор периодов в ряд. */
.chart-head-side { display: flex; align-items: center; gap: 14px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.chart-head-side .periods { margin-left: 0; }
/* Галочка выбросов: компактная, с акцентной обводкой при включении. */
.em-toggle { font-size: 12.5px; font-weight: 600; padding: 5px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel-3); cursor: pointer; transition: border-color .14s ease, color .14s ease; white-space: nowrap; }
.em-toggle:hover { border-color: var(--accent); color: var(--text); }
.em-toggle:has(input:checked) { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel-3)); }
/* Замок-тизер «Выбросы — с PRO» для не-премов: тот же вид, что у галочки, но
   кликабельная плашка, открывающая кабинет (без чекбокса внутри). */
.em-lock { color: var(--accent); }
.em-lock:hover { border-color: var(--accent); text-decoration: none; }
.em-band { pointer-events: none; }

.chart-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.csum { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 11px; padding: 10px 12px; text-align: center; }
.csum span { display: block; font-size: 11px; color: var(--text-faint); }
.csum b { font-size: 16px; font-family: var(--mono); }

.chart-holder { position: relative; height: 300px; background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 12px; overflow: hidden; }
.chart-holder svg { display: block; width: 100%; height: 100%; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5;
  background: var(--panel-3); border: 1px solid var(--border); color: var(--text);
  font-size: 12px; padding: 7px 11px; border-radius: 9px; white-space: nowrap;
  box-shadow: var(--shadow); transform: translate(-50%, -120%); opacity: 0; transition: opacity .1s ease;
  display: flex; flex-direction: column; gap: 1px; text-align: center;
}
.chart-tip b { font-family: var(--mono); font-size: 14px; color: var(--accent); }
.chart-tip span { color: var(--text-faint); font-size: 11px; }
.chart-tip.on { opacity: 1; }
.chart-note { color: var(--text-dim); font-size: 12.5px; margin-top: 11px; min-height: 18px; }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--text-faint); font-size: 13.5px; }

.history-trades { margin-top: 16px; }
.ht-head { color: var(--text-faint); font-size: 12px; margin-bottom: 6px; }
/* Прокручиваемая рамка списка сделок: фиксированная высота, чтобы длинный список
   НЕ растягивал страницу/модалку, а листался внутри. Данные уже в памяти. */
.ht-list { max-height: 320px; overflow-y: auto; margin-top: 2px; padding-right: 4px;
  border: 1px solid var(--border-soft); border-radius: 10px; background: var(--bg-2); }
.ht-list .ht-row { padding: 7px 10px; border-bottom: 1px solid var(--border-soft); }
.ht-list .ht-row:last-child { border-bottom: none; }
.ht-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--border-soft); font-size: 12.5px; }
.ht-row span { color: var(--text-faint); }
.ht-row b { font-family: var(--mono); }

/* -------------------- Убежище -------------------- */
/* Контейнер фильтров Убежища — flex (см. `.shelter-filters { display: flex }`
   ниже). Раньше здесь стоял `grid-template-columns` — он ни на что не влиял,
   но создавал иллюзию grid-раскладки (из-за чего панель навыков пытались
   ставить через `grid-column`). */

/* Виды страницы Убежища (под-вкладки). Таблица — на ВСЮ ширину страницы,
   без боковой колонки: min-width:0 не даёт широкой таблице выталкивать layout. */
.shelter-view { min-width: 0; }

/* «Рейтинг рецептов» должен ПОМЕЩАТЬСЯ в ширину страницы: страница Убежища
   занимает всю ширину окна (снимаем общий лимит .page 1500px), иначе широкой
   таблице не хватало места и правые колонки уезжали за край. */
.page#page-shelter { max-width: none; }

.table-card { margin-bottom: 0; }
.table-wrap { max-height: 70vh; overflow: auto; border-radius: 0 0 var(--radius) var(--radius); }
/* Таблица тянется на всю ширину контейнера (width:100%) и сжимает колонки —
   ничего не выезжает за экран. На очень узких экранах .table-wrap всё ещё
   даёт горизонтальный скролл как запасной вариант. */
table.rtable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.rtable thead th.sortable { cursor: pointer; user-select: none; }
table.rtable thead th.sortable:hover { color: var(--text); }
table.rtable thead th.sorted { color: var(--accent); }
table.rtable thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--panel-3);
  color: var(--text-dim); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  text-align: left; padding: 8px 9px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.rtable tbody td { padding: 8px 9px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.rtable tbody tr:hover { background: rgba(255,255,255,.025); }
table.rtable td.num { font-family: var(--mono); text-align: right; white-space: nowrap; }
/* Числовые колонки: заголовок выравнивается ВПРАВО (как и сами значения — .num),
   поэтому подпись стоит ровно над цифрами. Заголовку разрешаем ПЕРЕНОС строки:
   длинная подпись («Профит (с остатком)», «Затраты (Крафт+Аук)») иначе задавала
   ширину колонки, и короткие числа «висели» в широком пустом столбце. Теперь
   ширину диктуют сами числа (width:1% + nowrap на td.num). */
table.rtable thead th.num { text-align: right; white-space: normal; }
table.rtable thead th.num, table.rtable tbody td.num { width: 1%; }
/* ШИРИНЫ КОЛОНОК. Узкие столбцы (числа, статусы, кнопка) сжимаются по
   содержимому (width:1%); широкие текстовые (название, «Что скрафтить»,
   «Что купить с аука») забирают ВСЁ свободное место. Так в середине таблицы не
   остаётся пустых пробелов, а длинные названия/списки получают максимум ширины. */
table.rtable th.shrink, table.rtable td.shrink { width: 1%; white-space: nowrap; }
table.rtable th.wide, table.rtable td.wide { width: auto; min-width: 240px; }
table.rtable th.wide { white-space: normal; }
/* Текст в широких колонках переносится максимум в 4 строки (дальше — многоточие).
   Шаги крафта и списки покупок часто занимают 3–5 строк — 2 было недостаточно.
   Клип делаем на внутреннем div (.clamp2), а не на <td>, чтобы не ломать раскладку.
   Также `white-space: pre-line` — чтобы backend'овские \n между шагами рецепта
   отображались как переносы строк, а не как пробелы. */
table.rtable td.txt { white-space: normal; max-width: none; }
table.rtable .clamp2 {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden; white-space: pre-line; word-break: break-word; line-height: 1.4;
}
table.rtable td.profit-pos { color: var(--good); font-weight: 700; }
table.rtable td.profit-neg { color: var(--bad); }

/* Шаги крафта и списки покупок: вместо слипшейся строки — вертикальные
   позиции с номерами/маркерами. Глаз цепляется за структуру, а не выискивает
   запятые. Ширина колонки та же (wide), поэтому таблица не «прыгает». */
table.rtable .step-list,
table.rtable .buy-list {
  display: flex; flex-direction: column; gap: 3px;
  line-height: 1.35; font-size: 12px;
}
table.rtable .step-item {
  display: flex; align-items: flex-start; gap: 6px;
  word-break: break-word;
}
table.rtable .step-num {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-top: 1px;
  font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums;
  border-radius: 50%;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
table.rtable .buy-item {
  display: flex; align-items: flex-start; gap: 6px; word-break: break-word;
}
table.rtable .buy-item::before {
  content: "•"; flex: none; color: var(--text-faint); line-height: 1.2;
}
/* Энергия: единицы + стоимость одной компактной строкой (₽ — приглушённо). */
table.rtable .en-cost { margin-left: 6px; color: var(--text-faint); font-weight: 400; }
table.rtable .cell-item { display: flex; align-items: center; gap: 9px; flex-wrap: nowrap; min-width: 0; }
table.rtable .cell-item img { width: 30px; height: 30px; object-fit: contain; flex: none; }
/* Имя рецепта — не длиннее ДВУХ строк (полное — в title-подсказке). */
table.rtable .cell-item .tree-link {
  flex: 1 1 auto; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; white-space: normal; word-break: break-word; line-height: 1.3;
}
table.rtable .add-btn {
  background: var(--panel-3); border: 1px solid var(--border); color: var(--accent);
  border-radius: 7px; padding: 5px 10px; font-size: 12px; white-space: nowrap;
}
table.rtable .add-btn:hover { border-color: var(--accent); }
/* Столбец «Спрос» без PRO: вместо значений — замочек-тизер. Клик открывает кабинет. */
table.rtable thead th.pro-lock-th { color: var(--accent); cursor: pointer; }
table.rtable thead th.pro-lock-th:hover { text-decoration: underline; }
table.rtable tbody td.pro-lock-cell { color: var(--accent); cursor: pointer; }
table.rtable tbody td.pro-lock-cell:hover { text-decoration: underline; }
.tablo-empty { padding: 30px; text-align: center; color: var(--text-faint); }

/* Уровни навыков (фильтр рецептов по доступности) */
/* Уровни навыков (фильтр рецептов по доступности).
   ВАЖНО: контейнер `.shelter-filters` — flex (см. ниже), поэтому `grid-column`
   здесь НЕ работает: панель становилась обычным flex-элементом, прилипала
   справа и растягивала ряд фильтров в пустоту. Нужен `flex: 1 0 100%`, чтобы
   панель уезжала на отдельную строку и занимала всю ширину. */
.skill-levels {
  flex: 1 0 100%;
  width: 100%;
  /* 260px вместо 220: при 220 на широком экране влезало 4 колонки, и имени
     ветки доставалось ~106px — «Защитное снаряжение» (140px) и «Сырье и
     материалы» снова обрезались многоточием. При 260 колонок три, имени
     достаётся ~150px. */
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 18px; padding: 12px 14px; margin-top: 4px;
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 10px;
}
.skill-levels .skill-level {
  /* Имя ветки получает чуть больше места, чем ползунок: «Защитное
     снаряжение» требует ~140px, при равных долях (1fr/auto) оно обрезалось
     многоточием. 1.25fr ≈ 141px при 3 колонках на широком экране. */
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto;
  align-items: center; gap: 9px;
}
.skill-levels .sl-name { font-size: 12.5px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skill-levels input[type="range"] { width: 100%; min-width: 90px; accent-color: var(--accent); }
.skill-levels .sl-val { font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--accent); min-width: 12px; text-align: right; }

/* Пояснение к режиму расчёта Убежища.
   Внутри `.shelter-filters` (flex), поэтому блок обязан сам уезжать на свою
   строку и занимать всю ширину — иначе он встанет третьим столбцом и текст
   сожмётся в узкую колонку. */
.mode-explain {
  /* order: 99 — блок стоит в разметке сразу под селектором режима (логично для
     чтения кода), но визуально уезжает В КОНЕЦ ряда фильтров: иначе он рвал
     ряд на три части и остальные поля повисали отдельной строкой. */
  order: 99;
  flex: 1 0 100%;
  width: 100%;
  margin-top: 2px;
  padding: 11px 14px 12px;
  background: linear-gradient(180deg, rgba(255, 176, 32, .045), rgba(255, 176, 32, 0));
  border: 1px solid var(--border-soft);
  border-left: 3px solid rgba(255, 176, 32, .55);
  border-radius: 10px;
}
.mode-explain-head {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.mode-explain-head .me-ico { font-size: 15px; line-height: 1; }
.mode-explain-head b { font-size: 13px; color: var(--text); }
.mode-explain-toggle {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-faint);
  padding: 2px 0;
  cursor: pointer;
}
.mode-explain-toggle:hover { color: var(--accent); }
.mode-explain-lead {
  margin: 7px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-dim);
}
.mode-explain-lead b { color: var(--text); }
.mode-explain-body {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.me-row {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  font-size: 12.5px;
  line-height: 1.5;
}
.me-k {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-faint);
  padding-top: 1px;
}
.me-v { color: var(--text-dim); }
.me-v b { color: var(--text); }
.me-v code {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--panel-3);
  color: var(--accent);
}
.me-row.me-note {
  margin-top: 2px;
  padding-top: 7px;
  border-top: 1px dashed var(--border-soft);
}
.me-row.me-note .me-k { color: var(--accent); }

@media (max-width: 720px) {
  .me-row { grid-template-columns: 1fr; gap: 2px; }
  .me-k { padding-top: 0; }
}

/* ИИ-советник */
.advisor-body { padding: 14px 18px; }
.shelter-guide-wrap {
  padding: 0 18px 10px;
  font-size: 13px;
}
.shelter-guide-toggle {
  font-size: 12.5px;
  color: var(--text-faint);
  padding: 4px 0;
  cursor: pointer;
}
.shelter-guide-toggle:hover { color: var(--text-dim); }
.shelter-guide {
  margin-top: 6px;
  padding: 11px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sg-step { line-height: 1.55; color: var(--text-dim); }
.sg-step b { color: var(--text); }
.sg-pro {
  display: inline-block;
  font-size: 11px;
  padding: 1px 6px;
  background: rgba(148,163,184,.12);
  border: 1px solid rgba(148,163,184,.3);
  border-radius: 5px;
  color: var(--text-faint);
}
.advisor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.rec-card { background: var(--bg-2); border: 1px solid var(--border-soft); border-left: 4px solid var(--rarity, var(--accent)); border-radius: 12px; padding: 13px 15px; }
.rec-card.hot { border-left-color: var(--bad); }
.rec-card.good { border-left-color: var(--good); }
.rec-card.skip { border-left-color: var(--text-faint); opacity: .8; }
/* Советник Ноостанка: левую полосу красит РЕДКОСТЬ ядра (--rarity), а вердикт
   по прибыли показывает маленькая точка у заголовка. Раньше полосу красил
   вердикт (hot/good/skip), из-за чего легендарное ядро с минусовым профитом
   обводилось бледно-серым, а не золотым. */
.rec-verdict { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: var(--text-faint); box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); }
.rec-verdict.hot { background: var(--bad); }
.rec-verdict.good { background: var(--good); }
.rec-verdict.skip { background: var(--text-faint); }
.rec-head { display: flex; align-items: center; gap: 8px; }
.rec-head b { font-size: 14px; }
.rec-score { margin-left: auto; font-family: var(--mono); font-weight: 800; color: var(--accent); }
/* Бейдж оценки советника (0–100). Отдельный класс, чтобы не задеть другие
   использования .rec-score (циклы партии, звёзды редкости). */
.rec-score-pts {
  display: inline-flex; align-items: baseline; gap: 1px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 8px; padding: 2px 8px; font-size: 13px; cursor: help;
}
/* «/100» — приглушённо, чтобы читалась сама оценка, а не знаменатель. */
.rec-score-pts i {
  font-style: normal; font-size: 10px; font-weight: 600;
  color: var(--text-faint); opacity: .9;
}
.rec-metrics { display: flex; gap: 14px; flex-wrap: wrap; margin: 9px 0; font-size: 12px; color: var(--text-dim); }
.rec-metrics b { color: var(--text); }
.rec-bar { height: 6px; background: var(--panel-3); border-radius: 999px; overflow: hidden; margin: 8px 0; }
.rec-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.rec-tips { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--text-dim); }
.rec-tips li { margin-bottom: 3px; }
.advisor-controls { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }

/* Корзина / План производства — теперь на всю ширину отдельного вида */
.cart-card { margin-bottom: 0; }
.cart-head { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 16px 18px; }
.cs { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 10px; padding: 9px 11px; }
.cs span { display: block; font-size: 11px; color: var(--text-faint); }
.cs b { font-size: 15px; font-family: var(--mono); }
.cs b.profit { color: var(--good); }
/* Пояснение к партии: сколько ушло на неторгуемые рецепты (прокачка верстака).
   Эти траты не входят в профит, поэтому стоят отдельной строкой под сводкой. */
.cart-note { margin: 0 18px 6px; padding: 8px 11px; border-radius: 9px; font-size: 12px;
  color: var(--text-dim, #a7b0c4); background: rgba(255, 176, 32, .08);
  border: 1px solid rgba(255, 176, 32, .25); }
.cart-note[hidden] { display: none; }
.cart-list { padding: 0 18px; max-height: 60vh; overflow-y: auto; }
.cart-item { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.cart-item img { width: 28px; height: 28px; object-fit: contain; }
.cart-item .ci-body { flex: 1; min-width: 0; }
.cart-item .ci-body b { display: block; font-size: 13px; }
.cart-item .ci-body small { color: var(--text-faint); }
.cart-item .ci-ctl { display: flex; align-items: center; gap: 5px; }
.cart-item .ci-ctl button { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel-3); color: var(--text-dim); }
.cart-item .ci-ctl button:hover { color: var(--accent); border-color: var(--accent); }
.cart-item .ci-del { color: var(--bad); border: none; background: none; font-size: 15px; }
.cart-actions { padding: 16px 18px; }

/* Бейдж числа рецептов на под-вкладке «План производства» */
#shelterSubtabs button b {
  display: inline-block; min-width: 20px; margin-left: 6px; padding: 1px 7px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: var(--accent); color: #1a1206; text-align: center;
}
#shelterSubtabs button b.zero { background: var(--panel-3); color: var(--text-faint); }

/* -------------------- Ноостанок и Советник модулей -------------------- */
.shelter-filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
#ncTargets.noot-targets {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px; padding: 14px 18px;
}
.noot-slot { display: flex; flex-direction: column; gap: 5px; }
.noot-slot label { font-size: 12px; font-weight: 700; color: var(--text-dim); }
.noot-slot label small { color: var(--text-faint); font-weight: 400; }
.noot-slot select { width: 100%; }
.noot-result { padding: 0 18px 18px; }
.noot-result .verdict {
  display: inline-block; margin: 0 0 12px; padding: 8px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 700; border: 1px solid var(--border-soft);
}
.noot-result .verdict.good { background: rgba(56, 190, 110, .12); border-color: var(--good); color: var(--good); }
.noot-result .verdict.warn { background: rgba(230, 170, 60, .12); border-color: var(--warn, #e6aa3c); color: var(--warn, #e6aa3c); }
.noot-result .verdict.bad { background: rgba(220, 70, 70, .12); border-color: var(--bad); color: var(--bad); }
.noot-breakdown { margin-top: 14px; }
/* Честный EV: список «что оставлять» и чипы исключённых групп */
.noot-keep { margin-top: 10px; border-top: 1px dashed var(--border-soft); padding-top: 9px; }
.noot-keep-title {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; color: var(--text-faint); margin-bottom: 6px;
}
.noot-keep-row {
  display: grid; grid-template-columns: 18px auto 1fr;
  grid-template-areas:
    "idx name name"
    ". price demand";
  gap: 1px 8px; align-items: baseline;
  padding: 4px 6px; border-radius: 7px; cursor: pointer; font-size: 12px;
}
.noot-keep-row:hover { background: var(--panel-3); }
.nk-idx { grid-area: idx; color: var(--text-faint); font-family: var(--mono); font-size: 11px; }
.nk-name {
  grid-area: name; color: var(--text); line-height: 1.25;
  overflow-wrap: anywhere;
}
.nk-price { grid-area: price; font-family: var(--mono); color: var(--accent); font-weight: 700; white-space: nowrap; }
.nk-demand { grid-area: demand; justify-self: end; font-family: var(--mono); color: var(--text-faint); font-size: 11px; white-space: nowrap; }
.noot-keep-empty { font-size: 12px; color: var(--text-faint); }
.noot-excl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 9px 0 2px; }
.noot-excl-label { font-size: 11.5px; color: var(--text-faint); font-weight: 700; }
.noot-excl-chip {
  padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  background: rgba(220, 70, 70, .12); border: 1px solid rgba(220, 70, 70, .35);
  color: var(--bad);
}
.ht-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.ht-row span:first-child { color: var(--text-dim); }
.ht-row b, .ht-row span:last-child { font-family: var(--mono); }
.profit-pos, .ht-row .profit-pos { color: var(--good); }
.profit-neg, .ht-row .profit-neg { color: var(--bad); }

/* Советник Ноостанка: крупные карточки — РОВНО по 3 в ряд (2 ряда по 3 вместо
   6 узких колонок auto-fit из .advisor-grid). minmax(0,1fr) — чтобы широкие
   названия модулей не распирали колонки. Узкие экраны: 2 колонки, затем 1. */
.noot-adv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .noot-adv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .noot-adv-grid { grid-template-columns: 1fr; } }

/* Компактная плашка «План действий» внизу карточки Советника — вместо длинной
   стены текста .rec-tips (три <li> в столбик). */
.noot-plan {
  margin-top: 10px; padding: 8px 11px; border-radius: 9px;
  background: var(--panel-3); border: 1px solid var(--border-soft);
  font-size: 12px; line-height: 1.5; color: var(--text-dim);
}
.noot-plan-title {
  display: block; margin-bottom: 2px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-faint);
}
.noot-plan b { color: var(--text); }

/* ♻ Подсказка по циклу переработки над сеткой Советника: не список, а ровная
   плашка в тон «Планам действий» (перебивает списочные стили .rec-tips). */
.noot-recycle {
  margin: 0 0 12px; padding: 8px 11px; list-style: none;
  background: color-mix(in srgb, var(--accent) 8%, var(--panel-3));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border-soft));
}

/* --- 🟢 Крупная плашка «С чего начать прямо сейчас» ------------------------ */
.noot-start {
  margin: 0 0 14px; padding: 18px 20px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(56, 190, 110, .10), rgba(56, 190, 110, .02) 60%);
  border: 1px solid rgba(56, 190, 110, .38);
}
.noot-start-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 18px; margin-bottom: 14px;
}
.noot-start-dot {
  width: 11px; height: 11px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 4px rgba(56, 190, 110, .18); flex: 0 0 auto;
}
.noot-start-sub { font-size: 13px; color: var(--text-dim); font-weight: 500; }
.noot-start-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .noot-start-steps { grid-template-columns: 1fr; } }
.noot-start-step {
  display: flex; gap: 12px; padding: 14px 15px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--border-soft);
}
.nss-num {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
  background: rgba(56, 190, 110, .16); color: var(--good);
  border: 1px solid rgba(56, 190, 110, .4);
}
.nss-title { font-size: 14px; font-weight: 800; margin-bottom: 5px; }
.nss-text { font-size: 13.5px; line-height: 1.55; color: var(--text-dim); }
.nss-text b { color: var(--text); }

/* --- Карточки «Как есть»: крупный вердикт и минимум цифр ------------------- */
.noot-asis-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.noot-badge {
  padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 800;
  letter-spacing: .3px; border: 1px solid transparent;
}
.noot-badge.good { background: rgba(56, 190, 110, .16); border-color: var(--good); color: var(--good); }
.noot-badge.bad { background: rgba(220, 70, 70, .16); border-color: var(--bad); color: var(--bad); }
.noot-asis-core { font-size: 15px; font-weight: 800; }
.noot-asis-figures {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px; margin-top: 12px;
}
.naf {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 11px; border-radius: 10px;
  background: var(--panel-3); border: 1px solid var(--border-soft);
}
.naf span { font-size: 11.5px; color: var(--text-dim); font-weight: 700; }
.naf b { font-family: var(--mono); font-size: 15px; }
/* «План действий» шагами — вместо одной строки через точки. */
.noot-plan-steps {
  margin: 10px 0 0; padding: 10px 12px 10px 30px; border-radius: 9px;
  background: var(--panel-3); border: 1px solid var(--border-soft);
  font-size: 12.5px; line-height: 1.5; color: var(--text-dim);
}
.noot-plan-steps li { margin-bottom: 2px; }
.noot-plan-steps li::marker { color: var(--accent); font-weight: 800; }
.noot-plan-steps b { color: var(--text); }

/* --- 🎯 Кластерный крафт меты: три крупных блока --------------------------- */
.noot-cl-block {
  margin-top: 11px; padding: 12px 14px; border-radius: 11px;
  background: var(--panel-3); border: 1px solid var(--border-soft);
}
.noot-cl-block-title {
  font-size: 12.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-faint); margin-bottom: 7px;
}
.noot-cl-big { font-size: 15.5px; line-height: 1.45; color: var(--text-dim); }
.noot-cl-big + .noot-cl-big { margin-top: 3px; }
.noot-cl-big b { font-family: var(--mono); font-size: 17px; color: var(--text); }
.noot-cl-note { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--text-dim); }
.noot-cl-note b { color: var(--text); }
.noot-cl-kept { display: flex; flex-direction: column; gap: 5px; }
.noot-cl-kept-row { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; }
.ncl-slot { flex: 0 0 auto; min-width: 96px; color: var(--text-faint); font-size: 12.5px; }
.noot-cl-kept-row b { color: var(--text); }
.noot-cl-lost-title { margin: 9px 0 5px; font-size: 12.5px; font-weight: 800; color: var(--warn, #e6aa3c); }
.noot-cl-lost-row {
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
  padding: 4px 0; border-bottom: 1px dashed var(--border-soft); font-size: 13px;
}
.noot-cl-lost-row b { font-family: var(--mono); white-space: nowrap; }
.noot-cluster-apply {
  margin-top: 12px; width: 100%; justify-content: center;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 16px; border: none; border-radius: 11px; cursor: pointer;
  font-size: 15px; font-weight: 800; color: #1a1105;
  background: linear-gradient(135deg, #ff9d2e, #f57c00);
  box-shadow: 0 6px 18px rgba(245, 124, 0, .28);
}
.noot-cluster-apply:hover { filter: brightness(1.07); }
.noot-cluster-apply:active { transform: translateY(1px); }
.noot-only-positive { align-self: center; }

/* --- 🎯 Карточка «Прицельно»: цена 1 попытки vs вся серия ------------------ */
.noot-tg-versus {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px; margin-top: 2px;
}
@media (max-width: 560px) { .noot-tg-versus { grid-template-columns: 1fr; } }
.noot-tg-cell {
  display: flex; flex-direction: column; gap: 2px;
  padding: 9px 11px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--border-soft);
}
.noot-tg-cell.accent {
  background: color-mix(in srgb, var(--accent) 10%, var(--panel-2));
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border-soft));
}
.noot-tg-cell > span { font-size: 11.5px; font-weight: 700; color: var(--text-dim); }
.noot-tg-cell > b { font-family: var(--mono); font-size: 16px; color: var(--text); }
.noot-tg-cell > small { font-size: 11.5px; line-height: 1.4; color: var(--text-faint); }
.noot-tg-card .noot-plan-steps { margin-top: 2px; }

/* --- Быстрая проверка выпавшего модуля (🔍) -------------------------------- */
.noot-check { padding: 12px 18px; border-bottom: 1px solid var(--border-soft); }
.noot-check-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.noot-check-label { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; }
.noot-check-qlt { width: auto; min-width: 150px; }
.noot-check-field { position: relative; flex: 1; min-width: 220px; }
.noot-check-field input { width: 100%; }
.noot-check-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px; margin-top: 10px;
}
.noot-check-slot { display: flex; flex-direction: column; gap: 5px; }
.noot-check-slot label { font-size: 12px; font-weight: 700; color: var(--text-dim); }
.noot-check-slot select { width: 100%; }
.noot-check-verdict:empty { display: none; }

/* Вердикт по выпавшему модулю: зелёная «продавать» / красная «в разбор». */
.noot-verdict {
  margin-top: 11px; padding: 11px 14px; border-radius: 11px;
  border: 1px solid var(--border-soft); background: var(--panel-3);
}
.noot-verdict.sell { border-color: var(--good); background: color-mix(in srgb, var(--good) 10%, var(--panel-3)); }
.noot-verdict.dismantle { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--panel-3)); }
.noot-verdict.unknown { border-color: var(--border); }
.nv-title { font-size: 15px; font-weight: 800; letter-spacing: .3px; }
.noot-verdict.sell .nv-title { color: var(--good); }
.noot-verdict.dismantle .nv-title { color: var(--bad); }
.nv-body { margin-top: 4px; font-size: 13px; color: var(--text-dim); }
.nv-body b { color: var(--text); }
.nv-metrics { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--text-dim); }
.nv-metrics b { color: var(--text); }
.nv-note { margin-top: 7px; font-size: 12px; color: var(--warn, #e6aa3c); }
/* «Мало сделок за 30 дней»: цена взята с висящего лота, а не из продаж.
   Отдельный фон, чтобы предупреждение нельзя было пропустить. */
.nv-note.nv-caution {
  margin-top: 8px; padding: 6px 9px; border-radius: 6px;
  background: rgba(230, 170, 60, .12);
  border-left: 3px solid var(--warn, #e6aa3c);
  color: var(--warn, #e6aa3c);
}
.nv-actions { margin-top: 9px; }

/* --- Кнопка «все окупные» в карточке редкости ------------------------------ */
.noot-all-btn { margin-top: 9px; width: 100%; justify-content: center; font-size: 12.5px; }

/* --- Модалка «Все окупные комбинации» -------------------------------------- */
.noot-prof-head {
  display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px;
  color: var(--text-dim); padding-bottom: 10px; border-bottom: 1px solid var(--border-soft);
}
.noot-prof-head b { color: var(--text); }
.noot-prof-search { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.noot-prof-search input { flex: 1; }
.noot-prof-wrap { max-height: 58vh; overflow-y: auto; }
.noot-prof-table thead th { position: sticky; top: 0; background: var(--panel-2); z-index: 1; }
.noot-prof-table tbody tr { cursor: pointer; }
.noot-prof-table .profit-pos { color: var(--good); font-weight: 700; }
.nps-stats { display: block; margin-top: 2px; font-size: 11px; color: var(--text-faint); }

/* -------------------- Аукцион (каталог) -------------------- */
.auction-layout {
  display: grid;
  grid-template-columns: 292px 1fr;
  gap: 18px;
  align-items: start;
}

/* -- Левая панель -- */
.auction-side {
  position: sticky;
  top: 80px;
  padding: 14px;
  margin-bottom: 0;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}
.auc-search { margin-bottom: 12px; }
.auc-search input { width: 100%; }
.auc-block { margin-bottom: 14px; }
.auc-block-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text-faint);
  margin-bottom: 8px;
}
.auc-nav {
  display: flex; align-items: center; gap: 9px;
  width: 100%; text-align: left;
  background: transparent; border: 1px solid transparent;
  color: var(--text-dim);
  padding: 8px 10px; border-radius: 9px;
  font-size: 13px; transition: all .14s ease;
}
.auc-nav:hover { background: var(--panel-3); color: var(--text); }
.auc-nav.active { background: rgba(245,165,36,.13); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.auc-nav b { margin-left: auto; font-size: 12px; color: var(--text-faint); font-family: var(--mono); }

.auc-toggle { display: flex; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.auc-toggle button {
  flex: 1; border: none; background: transparent; color: var(--text-dim);
  padding: 7px 6px; border-radius: 8px; font-size: 12px; font-weight: 600; transition: all .14s ease;
}
.auc-toggle button.active { background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: #14100a; }

.auc-cats-block { margin-bottom: 0; }
.auc-cats { display: flex; flex-direction: column; gap: 2px; }
.auc-cat {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: none; color: var(--text-dim);
  padding: 8px 10px; border-radius: 9px; font-size: 13px; text-align: left;
  transition: all .14s ease; border-left: 3px solid transparent;
}
.auc-cat:hover { background: var(--panel-3); color: var(--text); }
.auc-cat.active { background: rgba(63,169,255,.12); color: var(--info); border-left-color: var(--info); font-weight: 600; }
.auc-cat span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auc-cat b { font-size: 11.5px; color: var(--text-faint); font-family: var(--mono); font-weight: 600; }

/* -- Основная зона -- */
.auction-main { min-width: 0; }
.auction-toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 14px;
}
.auction-toolbar #aSearchTop { flex: 1; min-width: 200px; }
.auction-toolbar select { width: auto; min-width: 168px; }

/* -- Метка редкости на карточке артефакта (лежит ПОВЕРХ иконки) -- */
.auc-rarity {
  position: absolute; left: 3px; bottom: 2px; z-index: 2;
  max-width: calc(100% - 6px);
  padding: 0 5px; border-radius: 5px;
  background: rgba(9, 13, 19, .78);
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  color: var(--rarity, #888); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}
/* -- Цена «по истории» (активных лотов нет, но сделки есть).
       Пояснение выводится строкой .auc-price-note НАД ценой, а не чипом на иконке. -- */
.auc-price.hist { color: var(--info); }

.auction-grid-head { display: flex; align-items: baseline; gap: 12px; margin: 2px 2px 12px; flex-wrap: wrap; }
.auction-grid-head h2 { margin: 0; font-size: 18px; }
.auction-count { color: var(--text-faint); font-size: 13px; }
.auction-count b { color: var(--accent); }

/* -- Сетка карточек: крупные «плитки» на всю ширину, как в каталоге-референсе -- */
.auc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 16px;
}
.auc-card {
  position: relative;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 12px 12px 13px;
  aspect-ratio: 1 / 1.02;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: transform .13s ease, box-shadow .13s ease, border-color .13s ease;
  overflow: hidden;
}
.auc-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 0%,
    color-mix(in srgb, var(--rarity, #888) 22%, transparent), transparent 70%);
  opacity: .9; pointer-events: none;
}
.auc-card::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--rarity, #888); opacity: .85;
}
.auc-card:hover {
  transform: translateY(-3px);
  border-color: var(--rarity, var(--accent));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--rarity, #888) 55%, transparent), var(--shadow);
}
.auc-card.fav { border-color: var(--accent); }

.auc-ico {
  position: relative;
  width: 100%; flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 2px;
}
.auc-ico img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.6));
}
.auc-qty {
  position: absolute; top: 2px; right: 3px;
  font-size: 12px; font-weight: 800; line-height: 1; color: #eef2f8;
  text-shadow: 0 1px 3px #000; pointer-events: none;
}

.auc-actions {
  position: absolute; top: 7px; left: 7px; right: 7px;
  display: flex; gap: 5px; justify-content: space-between;
  opacity: 0; transition: opacity .13s ease; z-index: 2;
}
.auc-card:hover .auc-actions { opacity: 1; }
.auc-act {
  width: 30px; height: 30px; border-radius: 8px;
  background: rgba(9,13,19,.82); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 15px; display: grid; place-items: center;
  transition: all .13s ease;
}
.auc-act:hover { color: var(--accent); border-color: var(--accent); }
.auc-act.fav-on { color: var(--accent); border-color: var(--accent); }

.auc-name {
  font-size: 12.5px; line-height: 1.25; font-weight: 600;
  color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-top: 7px; min-height: 31px;
  position: relative; z-index: 1;
}
.auc-price {
  /* Блок (не flex): строка цены держится ОДНОЙ строкой и не растягивает
     карточку; подпись «по истории» уводим вправо абсолютом, чтобы flex
     иконки не сжимался разной высотой блока цены. */
  display: block; margin-top: auto; padding-top: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--mono); font-size: 14px; font-weight: 800;
  color: var(--good);
  position: relative; z-index: 1;
}
.auc-price.none { color: var(--text-faint); font-size: 12px; font-weight: 600; }
/* Пояснение, когда активных лотов нет и цена взята из истории сделок:
   отдельная синяя строка НАД ценой (не чип на иконке — он наезжал на редкость). */
.auc-price-note {
  display: block; margin-top: auto; padding-top: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 10.5px; font-weight: 600; color: var(--info);
  position: relative; z-index: 1;
}
.auc-price-note + .auc-price { margin-top: 0; padding-top: 2px; }
.auc-lots-note { margin-left: 5px; font-size: 11px; color: var(--text-faint); font-family: var(--mono); }

.auc-empty { text-align: center; color: var(--text-faint); padding: 60px 20px; font-size: 14px; }

/* ---------- База данных предметов (справочник с описаниями) ---------- */
.db-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}
.db-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--rarity, #888);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  transition: transform .13s ease, box-shadow .13s ease, border-color .13s ease;
}
.db-card:hover {
  transform: translateY(-2px);
  border-color: var(--rarity, var(--accent));
  box-shadow: var(--shadow);
}
.db-ico {
  flex: 0 0 auto; width: 64px; height: 64px;
  display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 12px;
}
.db-ico img { max-width: 52px; max-height: 52px; object-fit: contain; }
.db-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.db-name { font-size: 14.5px; font-weight: 700; color: var(--text); line-height: 1.25; }
.db-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 45%, transparent);
  border-radius: 6px; padding: 1px 5px; margin-left: 4px; vertical-align: middle;
}
/* «Бартер» — предмет нельзя продать на аукционе (крафт/квест/персональный). */
.db-tag-barter {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.db-meta { font-size: 11.5px; color: var(--text-faint); }
.db-lore {
  font-size: 12.5px; line-height: 1.4; color: var(--text-dim);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.db-lore.db-nolore { color: var(--text-faint); font-style: italic; }
.db-price { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--good); margin-top: 2px; }
.db-price.none { color: var(--text-faint); font-weight: 600; }
.db-more-wrap { text-align: center; margin-top: 18px; }

/* ---------- Карточка предмета из базы: характеристики + график урона ---------- */
.db-modal { width: min(880px, 96vw); max-width: 880px; position: relative; }
.dbm-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; padding-right: 34px; }
.dbm-ico {
  flex: 0 0 auto; width: 76px; height: 76px; display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 12px; position: relative;
  border-left: 3px solid var(--rarity, #888);
}
.dbm-ico img { max-width: 62px; max-height: 62px; object-fit: contain; }
.dbm-headtext { min-width: 0; flex: 1; }
.dbm-name { margin: 0 0 3px; font-size: 18px; color: var(--text); line-height: 1.25; }
.dbm-meta { font-size: 12px; color: var(--text-faint); }
.dbm-price { font-size: 12.5px; color: var(--text-dim); margin-top: 5px; }
.dbm-price b { font-family: var(--mono); font-size: 15px; color: var(--good); }
.dbm-goto { align-self: flex-start; white-space: nowrap; }

/* ---------- Сравнение предметов (модалка) ---------- */
.dbm-cmp-btn { align-self: flex-start; white-space: nowrap; }
.cmp-modal { width: min(920px, 96vw); max-width: 920px; }
.cmp-title { margin: 0 0 14px; font-size: 19px; color: var(--text); }
.cmp-picker { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: start; }
.cmp-pick-side { min-width: 0; }
.cmp-pick-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-faint); margin-bottom: 6px; }
.cmp-vs { align-self: center; margin-top: 20px; font-weight: 800; color: var(--text-faint); }
.cmp-mini { display: flex; gap: 10px; align-items: center; padding: 9px 11px; background: var(--bg-2);
  border: 1px solid var(--border-soft); border-left: 3px solid var(--rarity, #888); border-radius: 10px; }
.cmp-mini img { width: 42px; height: 42px; object-fit: contain; flex: 0 0 auto; }
.cmp-mini-text { min-width: 0; flex: 1; }
.cmp-mini-name { font-size: 14px; color: var(--text); }
.cmp-mini-meta { font-size: 11.5px; color: var(--text-faint); }
.cmp-mini-price { font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--good); margin-top: 2px; }
/* Крестик на карточке B — вернуться к выбору другого предмета. */
.cmp-reset {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; cursor: pointer;
  background: transparent; border: 1px solid var(--border); color: var(--text-faint);
  font-size: 13px; line-height: 1; display: grid; place-items: center; transition: all .15s ease;
}
.cmp-reset:hover { color: var(--bad); border-color: var(--bad); }
.cmp-search { width: 100%; margin-bottom: 8px; }
.cmp-cands { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.cmp-cand { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; cursor: pointer;
  background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 5px 8px; color: var(--text-dim); }
.cmp-cand:hover { background: var(--panel-3); border-color: var(--border); }
.cmp-cand.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.cmp-cand img { width: 26px; height: 26px; object-fit: contain; flex: 0 0 auto; }
.cmp-cand-name { flex: 1; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp-cand-price { font-family: var(--mono); font-size: 11.5px; color: var(--good); white-space: nowrap; }
.cmp-pick-hint { font-size: 12px; color: var(--text-faint); font-style: italic; padding: 8px 2px; }
.cmp-mini-loading { font-size: 12px; color: var(--text-faint); padding: 10px 2px; }

.cmp-verdict { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 12px; padding: 13px 15px; margin-bottom: 16px; }
.cmp-verdict-head { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.cmp-verdict-lines { margin: 0 0 8px; padding-left: 18px; }
.cmp-verdict-lines li { font-size: 12.5px; line-height: 1.55; color: var(--text-dim); margin-bottom: 4px; }
.cmp-verdict-lines b { color: var(--text); }
.cmp-verdict-sum { font-size: 12.5px; color: var(--text-dim); border-top: 1px dashed var(--border-soft); padding-top: 8px; }
.cmp-score { margin-top: 8px; font-family: var(--mono); font-size: 12.5px; font-weight: 700; }
.cmp-side-a { color: var(--info); }
.cmp-side-b { color: var(--accent); }
.cmp-warn { background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 9px; padding: 8px 12px; font-size: 12.5px; color: var(--text-dim); margin-bottom: 14px; }

.cmp-table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.cmp-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-faint);
  padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.cmp-table th:nth-child(2) { text-align: center; }
.cmp-table th:nth-child(3) { text-align: right; }
.cmp-table td { padding: 6px 10px; font-size: 12.5px; border-bottom: 1px dashed color-mix(in srgb, var(--border-soft) 60%, transparent); }
.cmp-val-a, .cmp-val-b { font-family: var(--mono); font-weight: 700; color: var(--text-dim); }
.cmp-val-b { text-align: right; }
.cmp-metric-name { text-align: center; color: var(--text-dim); }
.cmp-win { color: var(--good) !important; }
.cmp-win::after { content: ' ✓'; font-size: 11px; }

.cmp-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent); margin: 0 0 10px; }
.cmp-sec { margin-bottom: 14px; }
.cmp-sec-title { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--text-dim);
  border-bottom: 1px solid var(--border-soft); padding-bottom: 4px; }
.cmp-sec-rows { display: flex; flex-direction: column; gap: 1px; }
.cmp-row { display: grid; grid-template-columns: 1fr 1.2fr 1fr; align-items: center; gap: 8px;
  padding: 3px 0; border-bottom: 1px dashed color-mix(in srgb, var(--border-soft) 50%, transparent); }
.cmp-cell { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.cmp-cell.b { text-align: right; }
.cmp-cell.win { color: var(--good); font-weight: 700; }
.cmp-cell-name { font-size: 12px; color: var(--text-faint); text-align: center; }

.dbm-lore {
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 10px;
  padding: 11px 13px; margin-bottom: 14px;
}
.dbm-lore p { margin: 0 0 8px; font-size: 12.5px; line-height: 1.5; color: var(--text-dim); }
.dbm-lore p:last-child { margin-bottom: 0; }

.dbm-loading { text-align: center; color: var(--text-faint); padding: 40px 10px; font-size: 14px; }

.dbm-sec { margin-bottom: 16px; }
.dbm-sec-title {
  margin: 0 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--accent);
  border-bottom: 1px solid var(--border-soft); padding-bottom: 5px;
}
.dbm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 3px 20px; }
.dbm-stat {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px;
  padding: 4px 0; border-bottom: 1px dashed color-mix(in srgb, var(--border-soft) 60%, transparent);
}
.dbm-stat-name { font-size: 12.5px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbm-stat-val { font-family: var(--mono); font-size: 12.5px; font-weight: 700; color: var(--text); text-align: right; white-space: nowrap; }
.dbm-stat-val.bad { color: var(--bad); }
.dbm-bar { grid-column: 1 / -1; height: 4px; border-radius: 3px; background: var(--panel-3); overflow: hidden; margin: -1px 0 2px; }
.dbm-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.dbm-bar.bad i { background: linear-gradient(90deg, var(--bad), #ef4444); }

.dbm-chart { width: 100%; height: auto; display: block; }
.dbm-grid-line { stroke: var(--border-soft); stroke-width: 1; }
.dbm-vline { stroke: color-mix(in srgb, var(--border) 70%, transparent); stroke-width: 1; stroke-dasharray: 3 3; }
.dbm-area { fill: color-mix(in srgb, var(--accent) 16%, transparent); }
.dbm-line { fill: none; stroke: var(--accent); stroke-width: 2; }
.dbm-axis { fill: var(--text-faint); font-size: 10px; font-family: var(--mono); }
.dbm-dmg-note { font-size: 12px; color: var(--text-faint); margin-top: 6px; text-align: center; }
.dbm-dmg-note b { color: var(--text-dim); font-family: var(--mono); }

/* Лор-описание в карточке предмета (модалка). Высоту ограничиваем: иначе
   длинный текст растягивает левую колонку и уводит кнопки/вкладки вниз. */
.item-lore {
  margin: 10px 0 4px; padding: 10px 12px;
  max-height: 132px; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 10px;
}
.item-lore p { margin: 0 0 8px; font-size: 12.5px; line-height: 1.45; color: var(--text-dim); }
.item-lore p:last-child { margin-bottom: 0; }

/* ---------- Таймер выбросов в шапке ---------- */
.emission-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-dim); white-space: nowrap;
}
.emission-pill .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--text-faint); transition: background .2s ease;
}
.emission-pill.active { color: var(--good); border-color: rgba(52,211,153,.4); }
.emission-pill.active .dot { background: var(--good); animation: pulse 1.4s infinite; }

/* ---------- Под-вкладки Аукциона ---------- */
.auc-subtabs {
  display: flex; gap: 8px; margin: 2px 0 14px; flex-wrap: wrap;
}
.auc-subtabs button {
  padding: 9px 16px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 14px; font-weight: 600;
  transition: all .13s ease;
}
.auc-subtabs button:hover { color: var(--text); border-color: var(--border-soft); }
.auc-subtabs button.active {
  color: #1a1206; background: linear-gradient(140deg, var(--accent), var(--accent-2));
  border-color: transparent; box-shadow: 0 4px 14px rgba(245,165,36,.25);
}
.auc-view { min-width: 0; }

/* ---------- Советник рынка (просадки) ---------- */
.advisor-toolbar { display: block; }
.advisor-filters {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px;
}
.advisor-filters .field { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.advisor-filters .field span { font-size: 12px; color: var(--text-faint); }
.advisor-filters input, .advisor-filters select {
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 7px 10px; font-size: 13px;
}
.advisor-note { margin-top: 9px; font-size: 12.5px; color: var(--text-faint); }

/* ---------- Советник: переключатель режимов заработка ---------- */
.adv-modes {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px; margin-top: 12px;
}
.adv-mode {
  display: flex; flex-direction: column; gap: 3px; text-align: left;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text-dim); transition: border-color .13s ease, background .13s ease;
}
.adv-mode b { font-size: 13.5px; color: var(--text); }
.adv-mode span { font-size: 11.5px; line-height: 1.35; color: var(--text-faint); }
.adv-mode:hover { border-color: var(--accent); }
.adv-mode.active {
  background: rgba(245, 165, 36, .1); border-color: rgba(245, 165, 36, .55);
}
.adv-mode.active b { color: var(--accent); }
@media (max-width: 820px) {
  .adv-modes { grid-template-columns: 1fr; }
}

/* ---------- Советник: бонус скупщика (режим «Дешевле скупщика») ---------- */
.adv-npc {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--border-soft);
}
.adv-npc-field { display: flex; flex-direction: column; gap: 4px; min-width: 160px; }
.adv-npc-field span { font-size: 12px; color: var(--text-faint); }
.adv-npc-field input {
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 7px 10px; font-size: 13px;
}
.adv-npc-hint { flex: 1 1 100%; font-size: 12px; color: var(--text-faint); }
.adv-npc-hint b { color: var(--text); }

/* Карточки режимов: дневная прибыль, партии и сдача скупщику */
.adv-profit.daily {
  color: var(--accent); background: rgba(245, 165, 36, .12);
  border-color: rgba(245, 165, 36, .35);
}
.adv-profit.daily i { color: var(--accent); }
.adv-batches { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 9px; }
.adv-batch {
  flex: 1 1 0; min-width: 92px; background: var(--bg-2);
  border: 1px solid var(--border-soft); border-radius: 8px; padding: 5px 8px;
}
.adv-batch span { display: block; font-size: 10.5px; color: var(--text-faint); }
.adv-batch b { font-family: var(--mono); font-size: 12.5px; color: var(--good); }
.adv-batch i { display: block; font-style: normal; font-size: 10px; color: var(--text-faint); }


/* ---------- Выбросы: панель сортировки и фильтров ---------- */
.em-toolbar {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  margin-bottom: 4px;
}
.em-toolbar .advisor-filters { margin-top: 0; flex: 1 1 auto; }
.em-toolbar .advisor-filters .field { min-width: 132px; }
.em-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.em-preset {
  font-size: 12.5px; padding: 7px 11px; border-radius: 8px;
  border: 1px solid var(--border);
}
.em-preset:hover { border-color: var(--accent); color: var(--accent); }
.em-preset.active {
  background: rgba(245, 165, 36, .16); border-color: rgba(245, 165, 36, .6);
  color: var(--accent); font-weight: 700;
}

/* ---------- Выбросы: гайд, легенда цифр, предупреждение ---------- */
.em-guide-card { padding: 0; }
.em-guide-wrap { padding: 0 16px 14px; border-top: 0; }
.em-guide-toggle { margin-top: 12px; }

.em-legend {
  margin-top: 12px; padding: 13px 15px; border-radius: 12px;
  background: var(--panel-2); border: 1px solid var(--border-soft);
}
.em-legend-title {
  font-size: 13px; font-weight: 800; margin-bottom: 10px;
  letter-spacing: .2px;
}
.em-legend-rows { display: grid; gap: 7px; }
.em-legend-rows > div {
  display: grid; grid-template-columns: 148px 1fr; gap: 12px;
  font-size: 13px; line-height: 1.5; color: var(--text-dim);
  align-items: baseline;
}
.em-legend-rows > div > span {
  font-family: var(--mono); font-size: 11.5px; color: var(--accent);
  text-transform: uppercase; letter-spacing: .3px;
}
.em-legend-rows b { color: var(--text); }

.em-warn {
  margin-top: 12px; padding: 11px 14px; border-radius: 10px;
  font-size: 13px; line-height: 1.55; color: var(--text-dim);
  background: rgba(245, 165, 36, .07);
  border: 1px solid rgba(245, 165, 36, .3);
  border-left: 3px solid rgba(245, 165, 36, .7);
}
.em-warn b { color: var(--text); }

@media (max-width: 700px) {
  .em-legend-rows > div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 820px) {
  .em-toolbar { align-items: stretch; }
  .em-toolbar .advisor-filters { width: 100%; }
  .em-toolbar .advisor-filters .field { flex: 1 1 132px; min-width: 0; }
  .em-presets { width: 100%; }
}

.adv-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.adv-card {
  position: relative;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border-soft); border-left: 3px solid var(--rarity, #888);
  border-radius: 12px; padding: 12px 13px; cursor: pointer;
  transition: transform .13s ease, box-shadow .13s ease, border-color .13s ease;
  overflow: hidden;
}
.adv-card:hover {
  transform: translateY(-2px);
  border-color: var(--rarity, var(--accent));
  box-shadow: var(--shadow-soft);
}
.adv-head { display: flex; align-items: center; gap: 10px; }
.adv-ico { position: relative; width: 40px; height: 40px; flex-shrink: 0; }
.adv-head .adv-ico img { width: 40px; height: 40px; object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
/* -- Метка редкости (качества) на иконке: у артефактов редкость не видна по
      иконке, поэтому подписываем её прямо на картинке, как в каталоге. -- */
.adv-rarity {
  position: absolute; left: -2px; bottom: -3px; z-index: 2;
  max-width: calc(100% + 6px);
  padding: 0 5px; border-radius: 5px;
  background: rgba(9, 13, 19, .85);
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  color: var(--rarity, #888); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}
/* Заточка артефакта — отдельный вариант цены («+0» и «+15» стоят по-разному). */
.adv-name { display: flex; align-items: center; gap: 7px; }
.adv-name-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adv-ptn {
  position: static; flex: 0 0 auto;
  padding: 0 6px; border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .2px;
  color: #fbbf24;
  background: rgba(251, 191, 36, .14);
  border: 1px solid rgba(251, 191, 36, .45);
  pointer-events: none;
}
.adv-title { min-width: 0; flex: 1; }.adv-name { font-weight: 700; font-size: 14px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.adv-cat { font-size: 11.5px; color: var(--text-faint); }
.adv-profit {
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  font-family: var(--mono); font-weight: 800; font-size: 14px;
  color: var(--good); background: rgba(52,211,153,.12);
  border: 1px solid rgba(52,211,153,.32); border-radius: 8px; padding: 3px 9px;
  white-space: nowrap;
}
.adv-profit i { font-style: normal; font-weight: 600; font-size: 10.5px; color: var(--good); opacity: .85; }
.adv-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.adv-cell { background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: 8px; padding: 6px 8px; }
.adv-cell span { display: block; font-size: 10.5px; color: var(--text-faint); }
.adv-cell b { font-family: var(--mono); font-size: 13px; }
.adv-cell.buy b { color: var(--info); }
.adv-cell.usual b { color: var(--text-dim); }
.adv-cell.net b { color: var(--good); }

/* Полоса «дно → пик»: где сейчас цена относительно 90-дневного диапазона */
.adv-range { margin: 4px 0 10px; }
.adv-range-bar {
  position: relative; height: 7px; border-radius: 4px;
  background: linear-gradient(90deg, rgba(52,211,153,.25) 0%,
    rgba(148,163,184,.22) 50%, rgba(248,113,113,.28) 100%);
  border: 1px solid var(--border-soft);
}
.adv-range-fill {
  position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px;
  background: rgba(148,163,184,.30);
}
.adv-range-you {
  position: absolute; top: -3px; width: 12px; height: 12px; margin-left: -6px;
  border-radius: 50%; background: var(--info);
  border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--info);
}
.adv-range-legend {
  display: flex; justify-content: space-between; gap: 6px; margin-top: 5px;
  font-size: 10.5px; color: var(--text-faint);
}
.adv-range-legend .you { color: var(--info); font-weight: 600; }
.adv-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.adv-tag {
  font-size: 11px; color: var(--text-dim); background: var(--panel-2);
  border: 1px solid var(--border-soft); border-radius: 6px; padding: 2px 7px;
}
.adv-meta-detail { margin-top: -3px; }
.adv-tag.dim { opacity: 0.82; }
.adv-tag.warn {
  color: #e0a94a; border-color: rgba(224, 169, 74, 0.45);
  background: rgba(224, 169, 74, 0.12);
}
.adv-reason { font-size: 12px; color: var(--text-dim); line-height: 1.35; margin-bottom: 9px; }
.adv-hist { width: 100%; text-align: center; }

/* ---------- Аналитика выбросов ---------- */
.emission-status-card { padding: 14px 16px; margin-bottom: 14px; }
.em-state { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.em-state.active { color: var(--good); font-weight: 700; }
.em-state.active span { font-family: var(--mono); font-size: 13px; color: var(--text-dim); font-weight: 500; }
.em-state .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-faint); }
.em-state .dot.idle { background: var(--text-faint); }
.em-sub { margin-top: 5px; font-size: 12.5px; color: var(--text-faint); }

.auction-head-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.em-list { display: flex; flex-direction: column; gap: 8px; }
.em-card {
  display: grid; grid-template-columns: 44px 1fr auto 44px;
  align-items: center; gap: 12px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
  border: 1px solid var(--border-soft); border-left: 3px solid var(--rarity, #888);
  border-radius: 11px; padding: 9px 12px; cursor: pointer;
  transition: border-color .13s ease, transform .13s ease;
}
.em-card:hover { transform: translateX(2px); border-color: var(--rarity, var(--accent)); }
.em-card.artifact { box-shadow: inset 0 0 0 1px rgba(255,179,0,.12); }
.em-card img { width: 40px; height: 40px; object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.em-main { min-width: 0; }
.em-name { font-weight: 700; font-size: 14px; }
.em-badge { font-size: 10px; color: var(--accent); border: 1px solid rgba(245,165,36,.4);
  border-radius: 5px; padding: 1px 5px; margin-left: 5px; vertical-align: middle; }
.em-ptn { font-size: 10px; font-weight: 700; color: #fbbf24;
  background: rgba(251,191,36,.14); border: 1px solid rgba(251,191,36,.45);
  border-radius: 5px; padding: 1px 5px; margin-left: 5px; vertical-align: middle; }
.em-meta { font-size: 11.5px; color: var(--text-faint); }
.em-nums { display: flex; gap: 14px; align-items: flex-start; flex-wrap: nowrap; }
.em-nums div { text-align: right; white-space: nowrap; }
.em-nums span { display: block; font-size: 10.5px; color: var(--text-faint); }
.em-nums b { font-family: var(--mono); font-size: 13px; }
.em-nums i { display: block; font-style: normal; font-size: 10px; color: var(--text-faint); margin-top: 1px; }
.em-drop b { color: var(--bad); font-weight: 800; }
.em-profit b { color: var(--good); font-weight: 800; font-size: 14px; }
.em-roi { color: var(--accent) !important; }
/* На узких экранах пять числовых колонок не влезают: прячем доходность
   (она вторична) и уменьшаем отступы, чтобы прибыль и просадка остались. */
@media (max-width: 900px) {
  .em-nums { gap: 10px; }
  .em-nums .em-roi, .em-nums div:has(.em-roi) { display: none; }
}
@media (max-width: 640px) {
  .em-card { grid-template-columns: 36px 1fr 36px; row-gap: 6px; }
  .em-card img { width: 34px; height: 34px; }
  .em-nums { grid-column: 1 / -1; justify-content: space-between; width: 100%;
    border-top: 1px solid var(--border-soft); padding-top: 6px; }
  .em-hist { grid-column: 3; grid-row: 1; }
}
.em-hist { width: 36px; padding: 6px 0; text-align: center; }

/* -- Модалка лотов -- */
.lots-list { display: flex; flex-direction: column; gap: 8px; }
.lot-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center; gap: 12px;
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-left: 3px solid var(--rarity, var(--border));
  border-radius: 10px; padding: 9px 12px;
}
.lot-row img { width: 40px; height: 40px; object-fit: contain; }
.lot-row .lr-main { min-width: 0; }
.lot-row .lr-main b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lot-row .lr-main small { color: var(--text-faint); font-size: 11.5px; }
.lot-row .lr-price { text-align: right; font-family: var(--mono); }
.lot-row .lr-price b { display: block; font-size: 14px; color: var(--accent); }
.lot-row .lr-price small { color: var(--text-faint); font-size: 10.5px; }

/* -- Фильтр «только с лотами» -- */
.auc-haslots { margin: 0; white-space: nowrap; }

/* -------------------- Карточка предмета (модалка) -------------------- */
.item-modal { width: min(1080px, 96vw); max-width: 1080px; position: relative; }
.item-close { position: absolute; top: 12px; right: 12px; z-index: 3; }
.item-layout { display: grid; grid-template-columns: 258px 1fr; gap: 18px; align-items: start; }
.item-side { min-width: 0; }
.item-ico { position: relative; width: 118px; height: 118px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 14px; }
.item-ico img { max-width: 92px; max-height: 92px; object-fit: contain; }
.item-qlt { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 10px; background: var(--panel-3); border: 1px solid var(--rarity, #888); color: var(--rarity, #e5e7eb); white-space: nowrap; }
.item-name { text-align: center; font-size: 15px; margin: 12px 0 12px; color: var(--text); line-height: 1.3; }
.item-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 12px; }
.item-summary .isum { background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 9px; padding: 7px 9px; }
.item-summary .isum span { display: block; font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .3px; }
.item-summary .isum b { font-size: 13px; font-family: var(--mono); color: var(--accent); }
.item-buttons { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.item-buttons .ghost-btn { width: 100%; justify-content: center; }
.item-tabs { display: flex; flex-direction: column; gap: 4px; }
.item-tabs button { text-align: left; background: transparent; border: 1px solid transparent; color: var(--text-dim); padding: 9px 11px; border-radius: 9px; font-size: 13px; transition: all .14s ease; }
.item-tabs button:hover { background: var(--panel-3); color: var(--text); }
.item-tabs button.active { background: rgba(245,165,36,.13); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.item-main { min-width: 0; }

/* -- Переключатели редкости/заточки в окне предмета -- */
.item-facets { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.facet-row { display: flex; align-items: flex-start; gap: 10px; }
.facet-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-faint); min-width: 62px; padding-top: 5px; }
.facet-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.facet-chip { background: var(--panel-3); border: 1px solid var(--border); color: var(--text-dim); padding: 5px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; transition: all .14s ease; }
.facet-chip:hover { color: var(--text); border-color: var(--rarity, var(--accent)); }
.facet-chip.active { background: color-mix(in srgb, var(--rarity, var(--accent)) 22%, transparent); border-color: var(--rarity, var(--accent)); color: var(--text); }
.facet-chip.off { opacity: .4; }
.best-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: linear-gradient(120deg, rgba(245,165,36,.16), rgba(63,169,255,.08)); border: 1px solid var(--accent); border-radius: 12px; padding: 12px 15px; margin-bottom: 14px; }
.best-bar .bb-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--accent); }
.best-bar .bb-price { font-size: 22px; font-weight: 700; font-family: var(--mono); color: var(--text); }
.best-bar .bb-diff { font-size: 12.5px; font-weight: 700; font-family: var(--mono); padding: 2px 9px; border-radius: 8px; }
.best-bar .bb-diff.good { color: var(--good); background: rgba(52,211,153,.12); }
.best-bar .bb-diff.bad { color: var(--bad); background: rgba(248,113,113,.12); }
.best-bar .bb-meta { font-size: 12.5px; color: var(--text-dim); }
.best-bar .bb-meta b { color: var(--text); font-family: var(--mono); }
.best-bar .bb-time { margin-left: auto; font-size: 12.5px; color: var(--text-dim); }

.lots-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.lots-toolbar select { min-width: 220px; width: auto; }
.lots-count { font-size: 12.5px; color: var(--text-faint); }
.lots-table-wrap { overflow-x: auto; }
.lots-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.lots-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-faint); padding: 7px 9px; border-bottom: 1px solid var(--border); white-space: nowrap; }
/* Кликабельные заголовки: сортировка по столбцу (стрелка у активного столбца). */
.lots-table thead th[data-sort] { cursor: pointer; user-select: none; }
.lots-table thead th[data-sort]:hover { color: var(--accent); }
.lots-table thead th.sorted { color: var(--accent); }
.lots-table thead th.sorted[data-dir="asc"]::after { content: " ▲"; font-size: 8px; }
.lots-table thead th.sorted[data-dir="desc"]::after { content: " ▼"; font-size: 8px; }
.lots-table td { padding: 8px 9px; border-bottom: 1px solid var(--border-soft); font-family: var(--mono); color: var(--text-dim); white-space: nowrap; }
.lots-table tr:hover td { background: var(--panel-3); }
.lots-table tr.best td { background: rgba(245,165,36,.08); }
.lots-table .lt-lot { font-family: inherit; display: flex; align-items: center; gap: 8px; }
.lots-table .lt-lot img { width: 34px; height: 34px; object-fit: contain; }
.lots-table .lt-lot .lt-name { min-width: 0; }
.lots-table .lt-lot .lt-name b { display: block; font-size: 12.5px; color: var(--text); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lots-table .lt-name small { color: var(--text-faint); font-size: 10.5px; }
.lots-table .lt-best { font-size: 9.5px; font-weight: 700; color: #14100a; background: linear-gradient(140deg, var(--accent), var(--accent-2)); padding: 1px 7px; border-radius: 8px; font-family: inherit; }
.lots-table .lt-unit { color: var(--accent); font-weight: 700; }
.lots-table .lt-dev { font-weight: 700; }
.lots-table .lt-dev.good { color: var(--good); }
.lots-table .lt-dev.bad { color: var(--bad); }
.lots-table .lt-ptn { color: var(--info); }
/* Прокрутка оружейного модуля в строке таблицы лотов: краткая подпись под именем
   и раскрываемый блок со свойствами и эффектами (как на карточке ленты). */
.lots-table .lt-rolls-sum { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 3px; font-size: 10.5px; font-family: var(--mono); }
.lots-table .lt-roll { white-space: nowrap; }
.lots-table .lt-rolls-toggle { margin-top: 3px; padding: 1px 7px; font-size: 10px; border-radius: 7px; border: 1px solid var(--border); background: var(--panel-3); color: var(--text-faint); cursor: pointer; font-family: inherit; }
.lots-table .lt-rolls-toggle:hover { color: var(--accent); border-color: var(--accent); }
.lots-table .lt-rolls-detail { margin-top: 4px; padding: 6px 8px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 4px; white-space: normal; }
.lots-table .lt-roll-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-size: 11px; }
.lots-table .lt-roll-slot {
  color: var(--text-faint); min-width: 74px; font-size: 10px; font-weight: 700;
  letter-spacing: .4px; text-transform: uppercase;
}
.lots-table .lt-roll-name { font-family: inherit; font-weight: 700; }
.lots-table .lt-roll-eff { display: flex; flex-direction: column; gap: 1px; min-width: 190px; }
.lots-table .lt-roll-eff .eff { font-size: 10.5px; color: var(--text-dim); }
.lots-empty { text-align: center; color: var(--text-faint); padding: 40px 16px; font-size: 13px; }

.item-pane .chart-holder { height: 300px; }

/* -------------------- Тосты -------------------- */
.toast-wrap { position: fixed; bottom: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: var(--panel-3); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: 11px; padding: 11px 15px; font-size: 13px; box-shadow: var(--shadow);
  animation: toastIn .25s ease; max-width: 340px;
}
.toast.good { border-left-color: var(--good); }
.toast.bad { border-left-color: var(--bad); }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

/* -------------------- Футер -------------------- */
.footer {
  padding: 20px clamp(12px, 3vw, 28px); color: var(--text-faint); font-size: 12px;
  border-top: 1px solid var(--border-soft);
}
.footer-cols { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
.footer-col { display: flex; flex-direction: column; gap: 6px; min-width: 200px; flex: 1; }
.footer-brand { color: var(--text-dim); }
.footer-req { color: var(--text); font-weight: 600; }
.footer-docs { flex: 0 1 auto; }
.footer-docs .footer-link { display: block; }
.footer-pay-label { color: var(--text-faint); }
.footer-pay-row { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-pay-row i {
  font-style: normal; padding: 4px 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--panel);
  color: var(--text-dim); font-weight: 700; font-size: 11.5px; letter-spacing: .3px;
}
.footer-legal {
  margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--border-soft);
  color: var(--text-faint); font-size: 11.5px; line-height: 1.5; max-width: 900px;
}
/* Тарифы PRO в карточке на главной: цены строками. */
.land-plan-tariffs { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 14px; }
.lpt-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 11px; border-radius: 9px; background: var(--panel-3);
  border: 1px solid var(--border); font-size: 13px; color: var(--text-dim);
}
.lpt-row b { color: var(--text); }
.lpt-row.popular { border-color: var(--accent); }
.lpt-row.popular b { color: var(--accent); }

/* -------------------- Мобильная адаптация -------------------- */
@media (max-width: 1080px) {
  .feed { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .auction-layout { grid-template-columns: 1fr; }
  .auction-side { position: static; max-height: none; }
  .auc-cats { flex-direction: row; flex-wrap: wrap; }
  .auc-cat { flex: 0 1 auto; }
  .item-layout { grid-template-columns: 1fr; }
  .item-summary { grid-template-columns: 1fr 1fr; }
  .auc-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 13px; }
}

@media (max-width: 760px) {
  body { font-size: 14px; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 9px 12px; }
  .brand-text small { display: none; }
  .main-tabs { order: 3; width: 100%; margin: 4px 0 0; }
  .tab { flex: 1; text-align: center; padding: 10px 8px; font-size: 13px; }
  .auc-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 11px; }
  .auction-toolbar #aSearchTop { min-width: 140px; }
  .auction-toolbar select { min-width: 0; flex: 1; }
  .topbar-right { margin-left: auto; }
  .worker-pill span#workerText { display: none; }
  .page { padding: 12px; }
  .feed { grid-template-columns: 1fr; }
  .lot-prices { grid-template-columns: repeat(2, 1fr); }
  .chart-summary { grid-template-columns: repeat(2, 1fr); }
  .modal { padding: 14px; border-radius: 14px; }
  .chart-holder { height: 220px; }
  .chart-head { gap: 8px; }
  .chart-price .cp-val { font-size: 21px; }
  .item-summary { grid-template-columns: 1fr 1fr; }
  .item-pane .chart-holder { height: 240px; }
  .lots-toolbar select { min-width: 0; flex: 1; }
  .cart-head { grid-template-columns: 1fr 1fr; }
  .filters-body { grid-template-columns: 1fr 1fr; }
  .field-wide { grid-column: 1 / -1; }
  .footer { flex-direction: column; gap: 5px; }
}

@media (max-width: 460px) {
  .filters-body { grid-template-columns: 1fr; }
  .cart-head { grid-template-columns: 1fr; }
}

/* Скрытые элементы управления (для снятия morganия при автообновлении) */
.hidden { display: none !important; }
/* Атрибут hidden обязан скрывать элемент всегда. Без этого правила авторские
   display-правила (напр. `.facet-row { display:flex }`, `.modal-backdrop{display:flex}`)
   имеют ту же специфичность, что и встроенное `[hidden]{display:none}` от браузера,
   и ПОБЕЖДАЮТ его — поэтому `el.hidden = true` не прятал фильтры «Редкость»/«Заточка». */
[hidden] { display: none !important; }

/* ====================================================================
   АВТОРИЗАЦИЯ ЧЕРЕЗ TELEGRAM + ЛИЧНЫЙ КАБИНЕТ
   ==================================================================== */
.user-area { display: flex; align-items: center; }

.tg-login-btn {
  display: flex; align-items: center; gap: 7px;
  background: linear-gradient(140deg, #2aabee, #229ed9);
  color: #fff; border: none; border-radius: 999px;
  padding: 8px 14px; font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 16px rgba(42,171,238,.28);
  white-space: nowrap;
}
.tg-login-btn:hover { filter: brightness(1.08); }
.tg-login-btn .tg-ico { font-size: 14px; }

.user-chip {
  display: flex; align-items: center; gap: 9px;
  background: var(--panel); border: 1px solid var(--border);
  padding: 4px 12px 4px 5px; border-radius: 999px; cursor: pointer;
  transition: border-color .15s ease;
}
.user-chip:hover { border-color: var(--accent); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  color: #14100a; background: linear-gradient(140deg, var(--accent), var(--accent-2));
}
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-meta b { font-size: 12.5px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { font-size: 10.5px; color: var(--text-faint); }
.user-meta small.pro { color: var(--good); }
.user-meta small.no-pro { color: var(--bad); }
.user-bell {
  border: none; background: transparent; font-size: 15px; padding: 2px 4px;
  border-radius: 8px; line-height: 1;
}
.user-bell:hover { background: var(--panel-3); }
.user-bell.off { opacity: .4; }

/* -------------------- Модалка входа -------------------- */
.auth-modal { max-width: 440px; }
.auth-body { display: flex; flex-direction: column; gap: 14px; padding: 4px 0 6px; }
.auth-lead { color: var(--text-dim); font-size: 13.5px; line-height: 1.5; margin: 0; }
.auth-btn-wrap { display: flex; justify-content: center; width: 100%; }
.auth-tg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: linear-gradient(140deg, #2aabee, #229ed9); color: #fff;
  text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 13px 26px; border-radius: 13px; border: none; cursor: pointer;
  width: 100%; box-shadow: 0 8px 22px rgba(42,171,238,.3);
}
.auth-tg-btn:hover { filter: brightness(1.08); }
.auth-tg-btn.disabled { opacity: .55; pointer-events: none; }
.auth-tg-btn.small {
  font-size: 13px; padding: 9px 16px; border-radius: 10px;
  width: auto; flex: 0 0 auto; box-shadow: 0 4px 12px rgba(42,171,238,.24);
}
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--text-faint); font-size: 11.5px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
/* Steam — равнозначная кнопка, но в своей фирменной синей гамме и такой же
   яркости, как Telegram: раньше тёмно-синий градиент читался как «неактивно». */
.auth-steam-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: linear-gradient(140deg, #66c0f4, #2a7fb5); color: #0a1520;
  text-decoration: none; font-weight: 800; font-size: 15px;
  padding: 13px 26px; border-radius: 13px; border: 1px solid rgba(102,192,244,.45);
  cursor: pointer; width: 100%; box-shadow: 0 8px 22px rgba(42,127,181,.32);
}
.auth-steam-btn:hover { filter: brightness(1.1); }
.auth-steam-btn.disabled { opacity: .55; pointer-events: none; }
.auth-steam-btn .steam-ico { font-size: 16px; }
/* E-mail — нейтральная кнопка-раскрывашка: сами поля появляются ниже. */
.auth-mail-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--panel-3); color: var(--text); border: 1px solid var(--border);
  text-decoration: none; font-weight: 700; font-size: 15px;
  padding: 13px 26px; border-radius: 13px; cursor: pointer; width: 100%;
}
.auth-mail-btn:hover { border-color: var(--accent); color: var(--accent); }
.auth-mail-btn .mail-ico { font-size: 16px; }
.auth-email-box {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--panel-3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
}
.auth-email-code { display: flex; flex-direction: column; gap: 10px; }
.auth-email-code input, .auth-email-box input#authEmailInput { letter-spacing: normal; }
.auth-email-code input#authEmailCode { letter-spacing: 6px; font-family: var(--mono); font-size: 18px; text-align: center; }
.auth-link-row { display: flex; gap: 8px; align-items: center; }
.auth-link-row input { flex: 1; background: var(--panel-3); border: 1px solid var(--border); color: var(--text-dim); border-radius: 9px; padding: 8px 10px; font-size: 12px; font-family: var(--mono); }
.auth-status { text-align: center; font-size: 13px; color: var(--text-dim); }
.auth-status.ok { color: var(--good); font-weight: 600; }
.auth-status.err { color: var(--bad); }
.auth-hint { text-align: center; font-size: 11.5px; color: var(--text-faint); min-height: 14px; }
.auth-spinner { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------- Личный кабинет -------------------- */
.cabinet-modal { max-width: 620px; }
.cab-pro {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--panel-3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; margin: 4px 0 10px;
}
.cab-pro .cab-pro-label { font-size: 12.5px; color: var(--text-dim); }
.cab-pro .cab-pro-value { font-size: 17px; font-weight: 700; }
.cab-pro .cab-pro-value.pro { color: var(--good); }
.cab-pro .cab-pro-value.no-pro { color: var(--bad); }
.cab-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.cab-tabs button {
  flex: 1 1 auto; white-space: nowrap; border: 1px solid var(--border); background: var(--panel);
  color: var(--text-dim); padding: 9px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 600;
}
.cab-tabs button.active { color: #12100a; background: linear-gradient(140deg, var(--accent), var(--accent-2)); border-color: transparent; }
.cab-pane { display: flex; flex-direction: column; gap: 12px; }
.cab-toggle-row { display: flex; gap: 18px; flex-wrap: wrap; }
.cab-switch { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text); cursor: pointer; }
.cab-switch input { width: 17px; height: 17px; accent-color: var(--accent); }
.cab-rules-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cab-rules-head h3 { font-size: 14px; margin: 0; }
/* Сканер в админке: пилюля состояния + кнопка перезапуска. Раньше жил в шапке
   у всех пользователей и занимал место; теперь это служебный блок. */
.cab-worker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cab-worker .worker-pill { margin: 0; }
.cab-rules { display: flex; flex-direction: column; gap: 8px; }
.cab-rule {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px;
}
.cab-rule .cab-rule-main { flex: 1; min-width: 0; }
.cab-rule .cab-rule-main b { font-size: 13px; display: block; }
.cab-rule .cab-rule-main small { color: var(--text-faint); font-size: 11.5px; }
.cab-rule .cab-rule-state { font-size: 11px; color: var(--good); }
.cab-rule.disabled { opacity: .55; }
.cab-rule .cab-rule-del { border: none; background: transparent; color: var(--bad); font-size: 15px; cursor: pointer; padding: 2px 5px; border-radius: 7px; }
.cab-rule .cab-rule-del:hover { background: rgba(248,113,113,.12); }
.cab-empty { color: var(--text-faint); font-size: 12.5px; padding: 14px; text-align: center; border: 1px dashed var(--border); border-radius: 10px; }
.cab-rule-form {
  display: flex; flex-direction: column; gap: 11px;
  background: var(--panel-3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px;
}
.cab-rule-form h4 { margin: 0; font-size: 13.5px; }
.cab-rule-form .field { display: flex; flex-direction: column; gap: 5px; }
.cab-rule-form label span { font-size: 12px; color: var(--text-dim); }
.cab-rule-form input, .cab-rule-form select {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 9px 10px; font-size: 13px; width: 100%;
}
.cab-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.cab-form-actions { display: flex; justify-content: flex-end; gap: 9px; }
.cab-item-search { position: relative; }
.cab-item-results {
  position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--panel-3); border: 1px solid var(--border); border-radius: 10px;
  max-height: 240px; overflow-y: auto; box-shadow: var(--shadow);
}
.cab-item-results .cab-item-row {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px; cursor: pointer;
}
.cab-item-results .cab-item-row:hover { background: var(--panel-2); }
.cab-item-results img { width: 26px; height: 26px; object-fit: contain; }
.cab-item-results span { font-size: 12.5px; }
.cab-item-results .cab-item-rarity { margin-left: auto; font-weight: 700; font-size: 11.5px; }
.cab-item-picked {
  display: flex; align-items: center; gap: 8px; margin-top: 6px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px;
}
.cab-item-picked img { width: 26px; height: 26px; object-fit: contain; }
.cab-item-picked b { font-size: 12.5px; flex: 1; }
.cab-item-picked button { border: none; background: transparent; color: var(--text-faint); cursor: pointer; font-size: 13px; }
.cab-tariffs { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.cab-tariff {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; text-align: center; cursor: pointer; transition: all .15s ease;
}
.cab-tariff:hover { border-color: var(--accent); transform: translateY(-2px); }
.cab-tariff.popular { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(245,165,36,.25); }
.cab-tariff .ct-label { font-size: 14px; font-weight: 700; }
.cab-tariff .ct-price { margin-top: 4px; font-size: 20px; font-weight: 800; color: var(--accent); }
.cab-tariff .ct-badge { font-size: 10px; color: var(--accent); font-weight: 700; }
.cab-tariff .ct-choose { margin-top: 9px; font-size: 12px; color: var(--text-dim); }
/* Обязательное согласие с офертой/политикой перед оплатой. */
.cab-sub-lead { margin: 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }
.cab-consent {
  display: flex; align-items: flex-start; gap: 9px; cursor: pointer;
  background: var(--panel-3); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 13px; font-size: 12.5px;
  color: var(--text-dim); line-height: 1.5;
}
.cab-consent input { margin-top: 2px; flex: none; width: 16px; height: 16px; accent-color: var(--accent); }
.cab-consent a { color: var(--accent); text-decoration: none; }
.cab-consent a:hover { text-decoration: underline; }
.cab-consent.shake { animation: cabShake .5s ease; border-color: #e5534b; }
@keyframes cabShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(4px); }
}
/* Тариф, пока оплата не подключена: карточка не «продаёт», а обещает. */
.cab-tariff.soon { opacity: .78; }
.cab-tariff.soon:hover { transform: none; border-color: var(--border); }
.cab-tariff.soon .ct-choose { color: var(--accent); font-weight: 600; }
/* Заглушка «оплата в процессе подключения» во вкладке «Подписка». */
.cab-pay-soon {
  display: flex; align-items: flex-start; gap: 11px;
  background: rgba(245,165,36,.08); border: 1px solid rgba(245,165,36,.35);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.cab-pay-soon .cps-ico { font-size: 19px; line-height: 1.2; }
.cab-pay-soon b { display: block; font-size: 13.5px; color: var(--accent); }
.cab-pay-soon small { display: block; margin-top: 3px; font-size: 12px; color: var(--text-dim); line-height: 1.45; }
.cab-pay-note { font-size: 12.5px; color: var(--text-dim); text-align: center; }
.cab-footer { display: flex; justify-content: flex-end; margin-top: 14px; border-top: 1px solid var(--border-soft); padding-top: 12px; }
.cab-section { background: var(--panel-3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.cab-section h3 { margin: 0 0 6px; font-size: 14px; }
.cab-note { font-size: 12px; color: var(--text-faint); }
.cab-nick-row { display: flex; gap: 8px; margin-top: 8px; }
.cab-nick-row input { flex: 1; background: var(--panel); border: 1px solid var(--border); color: var(--text); border-radius: 9px; padding: 9px 10px; font-size: 13px; }
.cab-links { display: flex; flex-direction: column; gap: 7px; margin: 8px 0; }
.cab-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; font-size: 12.5px; color: var(--text-dim); }
.cab-link.on { border-color: rgba(34,197,94,.4); }
.cab-link.on b { color: var(--good); }
.cab-link b { font-weight: 600; }
.cab-admin-users { display: flex; flex-direction: column; gap: 5px; max-height: 320px; overflow-y: auto; }
.cab-admin-head, .cab-admin-row { display: grid; grid-template-columns: 1.4fr 1.1fr .7fr 1.4fr; gap: 8px; align-items: center; }
.cab-admin-head { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); padding: 0 4px; }
.cab-admin-row { background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px; font-size: 12px; }
.cab-admin-row .cau-name b { display: block; font-size: 12.5px; }
.cab-admin-row .cau-name small, .cab-admin-row .cau-tg { color: var(--text-faint); font-size: 11px; }
.cab-admin-row .cau-actions { display: flex; gap: 4px; justify-content: flex-end; }
.cab-admin-row .cau-actions .mini-btn { padding: 4px 7px; font-size: 11px; }
.cab-admin-req-h { margin: 10px 0 0; font-size: 14px; }
.cab-admin-reqs { display: flex; flex-direction: column; gap: 5px; }
.cab-admin-req { display: flex; flex-direction: column; gap: 2px; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 8px 11px; }
.cab-admin-req small { color: var(--text-faint); font-size: 11px; }

/* 📊 Вкладка «Статистика» в админке: карточки-счётчики + простые графики.
   Графики рисуем div-столбиками (без библиотек) — высота в % от контейнера. */
.cab-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cab-stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.cab-stat-card b { display: block; font-size: 19px; line-height: 1.2; }
.cab-stat-card span { font-size: 11px; color: var(--text-faint); }
.cab-stats-sub { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.cab-chart { display: flex; align-items: flex-end; gap: 3px; height: 110px; padding: 6px 0 0; border-bottom: 1px solid var(--border); }
.cab-bar { flex: 1; min-width: 2px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--accent), rgba(245,165,36,.25)); transition: height .2s ease; }
.cab-chart-x { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-faint); margin-top: 3px; }
/* Сворачиваемые заголовки админки (диагностика категорий и пр.). */
.cab-collapsible { cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 6px; }
.cab-collapsible:hover { color: var(--accent); }
.cab-collapsible .cab-chev { font-size: 11px; color: var(--text-faint); }
.cab-collapsible.collapsed .cab-chev { color: var(--accent); }

/* ====================================================================
   ДНЕВНИК ПЕРЕКУПА
   ==================================================================== */
/* Кнопка «В дневник» на карточках лота/каталога/предмета */
.diary-add-btn {
  border: 1px solid rgba(245,165,36,.45); background: rgba(245,165,36,.08);
  color: var(--accent); border-radius: 9px; padding: 6px 12px; font-size: 12.5px;
  font-weight: 700; cursor: pointer; transition: all .15s ease; font-family: inherit;
  white-space: nowrap;
}
.diary-add-btn:hover { background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: #12100a; border-color: transparent; }
.diary-add-btn:active { transform: translateY(1px); }

/* Баннер гостевого режима */
.diary-guest {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
  padding: 13px 16px; border-color: rgba(245,165,36,.4);
  background: linear-gradient(120deg, rgba(245,165,36,.10), rgba(255,122,26,.04));
}
.diary-guest .dg-ico { font-size: 26px; line-height: 1; }
.diary-guest .dg-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.diary-guest .dg-text b { font-size: 14px; color: var(--text); }
.diary-guest .dg-text span { font-size: 12.5px; color: var(--text-dim); }

/* Сводные карточки статистики */
.diary-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin-bottom: 14px;
}
.diary-stat {
  background: linear-gradient(150deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow-soft); position: relative; overflow: hidden;
}
.diary-stat::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); opacity: .7;
}
.diary-stat.good::before { background: var(--good); }
.diary-stat.info::before { background: var(--info); }
.diary-stat.bad::before { background: var(--bad); }
.diary-stat .ds-label { display: block; font-size: 11.5px; color: var(--text-faint); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .4px; }
.diary-stat .ds-value { display: block; font-family: var(--mono); font-size: 21px; font-weight: 700; color: var(--text); }
.diary-stat .ds-value.good { color: var(--good); }
.diary-stat .ds-value.bad { color: var(--bad); }
.diary-stat .ds-sub { display: block; margin-top: 5px; font-size: 11.5px; color: var(--text-dim); }
.diary-stat .ds-sub b { color: var(--text); }

/* Панель управления: период + действия */
.diary-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px;
}
.diary-toolbar-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.diary-periods { display: flex; gap: 6px; flex-wrap: wrap; }
.diary-periods button {
  border: 1px solid var(--border); background: var(--panel); color: var(--text-dim);
  border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .15s ease; font-family: inherit;
}
.diary-periods button:hover { color: var(--text); border-color: var(--accent); }
.diary-periods button.active {
  color: #12100a; background: linear-gradient(140deg, var(--accent), var(--accent-2)); border-color: transparent;
}

/* Аналитика: графики */
.diary-charts { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; margin-bottom: 14px; }
.diary-chart-card { overflow: hidden; }
.diary-chart-card .chart-holder { border-radius: 0; border-left: none; border-right: none; border-bottom: none; }
.diary-cats { padding: 14px 16px; display: flex; flex-direction: column; gap: 11px; }
.diary-cat-row { display: flex; flex-direction: column; gap: 4px; }
.diary-cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.diary-cat-head .dc-name { color: var(--text); font-weight: 600; }
.diary-cat-head .dc-val { font-family: var(--mono); font-weight: 700; color: var(--good); }
.diary-cat-bar { height: 8px; border-radius: 6px; background: var(--bg-2); overflow: hidden; }
.diary-cat-bar i { display: block; height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.diary-cat-row.neg .dc-val { color: var(--bad); }
.diary-cat-row.neg .diary-cat-bar i { background: linear-gradient(90deg, var(--bad), #b91c1c); }
.diary-cats-empty { padding: 24px 16px; text-align: center; color: var(--text-faint); font-size: 13px; }

/* Таблица сделок */
.diary-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.diary-table th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--text-faint); padding: 9px 10px; border-bottom: 1px solid var(--border);
  white-space: nowrap; position: sticky; top: 0; background: var(--panel);
}
.diary-table th.num, .diary-table td.num { text-align: right; }
.diary-table td { padding: 9px 10px; border-bottom: 1px solid var(--border-soft); color: var(--text-dim); vertical-align: middle; }
.diary-table tr:hover td { background: var(--panel-3); }
.diary-table .dt-item { display: flex; align-items: center; gap: 9px; }
/* Игровая «ячейка» иконки: рамка/подложка/полоска снизу окрашены в редкость
   (--rarity) — как в ленте Снайпера, каталоге Аукциона и карточке предмета.
   Раньше тут была «голая» картинка, поэтому у всех редкостей иконка выглядела
   одинаково. */
.diary-table .dt-ico {
  position: relative; flex-shrink: 0;
  width: 38px; height: 38px; padding: 2px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid color-mix(in srgb, var(--rarity, #888) 60%, var(--border));
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--rarity, #888) 16%, var(--bg-2)) 0%,
    var(--bg-2) 100%);
  box-shadow: inset 0 0 8px color-mix(in srgb, var(--rarity, #888) 20%, transparent);
  overflow: hidden;
}
.diary-table .dt-ico::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--rarity, #888); opacity: .85;
}
.diary-table .dt-item img { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }
.diary-table .dt-item .dt-name { min-width: 0; }
.diary-table .dt-item .dt-name b { display: block; font-size: 12.5px; color: var(--text); max-width: 220px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diary-table .dt-item .dt-name small { color: var(--text-faint); font-size: 10.5px; }
/* Чип заточки после названия («+11»): заметно, что это вариант с заточкой */
.diary-table .dt-item .dt-name .dt-ptn {
  display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 6px;
  font-size: 10.5px; font-weight: 700; vertical-align: middle;
  color: var(--rarity, var(--text-dim));
  background: color-mix(in srgb, var(--rarity, #888) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--rarity, #888) 45%, transparent);
}
.diary-table .dt-money { font-family: var(--mono); color: var(--text); }
.diary-table .dt-profit { font-family: var(--mono); font-weight: 700; }
.diary-table .dt-profit.good { color: var(--good); }
.diary-table .dt-profit.bad { color: var(--bad); }
.diary-table .dt-roi { font-size: 11px; color: var(--text-faint); }
.diary-table .dt-actions { display: flex; gap: 4px; justify-content: flex-end; }
.diary-table .dt-act {
  border: 1px solid var(--border); background: var(--panel); color: var(--text-dim);
  border-radius: 8px; padding: 4px 8px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.diary-table .dt-act:hover { color: var(--text); border-color: var(--accent); }
.diary-table .dt-act.del:hover { color: var(--bad); border-color: var(--bad); }
.diary-table tr.dt-open td { background: rgba(245,165,36,.04); }
.diary-table tr.dt-sold td { background: rgba(52,211,153,.03); }

/* Плашка статуса */
.diary-status {
  display: inline-block; font-size: 11px; font-weight: 700; border-radius: 8px;
  padding: 2px 9px; white-space: nowrap;
}
.diary-status.bought { color: var(--info); background: rgba(96,165,250,.12); }
.diary-status.sold { color: var(--good); background: rgba(52,211,153,.12); }
.diary-status.st-click { cursor: pointer; user-select: none; transition: filter .13s ease; }
.diary-status.st-click:hover { filter: brightness(1.25); }
.diary-status.st-click::after { content: "▾"; margin-left: 4px; opacity: .65; font-size: 9px; }

/* Под-вкладки «Куплено» / «Продано» над таблицей */
.diary-subtabs { padding: 12px 16px 0; margin: 0; }
.diary-subtabs .dst-cnt {
  display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px;
  border-radius: 7px; background: var(--bg-2); color: var(--text-dim);
  font-family: var(--mono); font-size: 11px; font-weight: 700;
}
.diary-subtabs button.active .dst-cnt { background: rgba(20,16,10,.22); color: #1a1206; }

/* Плавающее меню быстрой смены статуса */
.diary-status-menu {
  position: fixed; z-index: 60; min-width: 150px;
  background: var(--panel-3); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow); padding: 5px; display: flex; flex-direction: column; gap: 3px;
}
.diary-status-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  background: transparent; border: none; color: var(--text-dim); cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 10px; border-radius: 8px;
}
.diary-status-menu button:hover { background: var(--panel); color: var(--text); }
.diary-status-menu button.active { color: var(--text); }
.diary-status-menu button b { margin-left: auto; color: var(--accent); }
.dsm-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dsm-dot.bought { background: var(--info); }
.dsm-dot.sold { background: var(--good); }

/* Модалка сделки */
.diary-modal { width: min(620px, 96vw); max-width: 620px; }
.diary-form { display: flex; flex-direction: column; gap: 12px; padding: 16px 20px 20px; }
.diary-form .field { display: flex; flex-direction: column; gap: 5px; }
.diary-form label span { font-size: 12px; color: var(--text-dim); font-weight: 600; }
.diary-form input, .diary-form select {
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 9px 10px; font-size: 13px; width: 100%;
}
.diary-form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 11px; }
.diary-form-preview {
  background: var(--panel-3); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 13px; font-size: 12.5px; color: var(--text-dim);
  display: flex; flex-wrap: wrap; gap: 6px 18px;
}
.diary-form-preview b { color: var(--text); font-family: var(--mono); }
.diary-form-preview .good { color: var(--good); }
.diary-form-preview .bad { color: var(--bad); }
.diary-empty { color: var(--text-faint); font-size: 12.5px; padding: 22px; text-align: center; }

@media (max-width: 900px) {
  .diary-charts { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .user-meta { display: none; }
  .cab-tariffs { grid-template-columns: 1fr; }
  .cab-form-row { grid-template-columns: 1fr; }
}

/* Скроллбар */
/* ==================================================================
   🔥 МЕТОВЫЕ МОДУЛИ — радар высокого спроса и снайпинга
   ================================================================== */
.mm-intro {
  margin: 0; padding: 13px 18px 0;
  font-size: 12.5px; line-height: 1.5; color: var(--text-dim);
}
.mm-intro b { color: var(--accent); font-weight: 600; }
.mm-rarities { padding-top: 0; }
.mm-rarities .chips { max-height: none; }
.mm-rar-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 7px; vertical-align: middle;
  box-shadow: 0 0 6px currentColor;
}
.mm-dim { color: var(--text-faint); font-size: 12px; }
/* Пустое состояние радара: причина + кнопки, ослабляющие фильтр. Без них
   «ничего не найдено» читалось как «раздел пустой», и человек уходил. */
.mm-empty-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-top: 14px;
}
.mm-empty-actions .chip { font-size: 12px; padding: 7px 12px; }
/* Гайд под интро — тот же вид, что у гайда снайпера. */
.mm-guide-wrap { padding: 6px 18px 0; border-top: none; }
/* Редкость без PRO: видна, но помечена замком (как «Спрос» в снайпере). */
.chip.pro-locked { opacity: .62; cursor: pointer; }
.chip.pro-locked:hover { border-color: var(--accent); opacity: 1; }
.chip .mm-pro {
  margin-left: 6px; padding: 1px 5px; border-radius: 5px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .2px;
  color: var(--accent); background: rgba(245, 165, 36, .14);
  border: 1px solid rgba(245, 165, 36, .42);
}

/* Оценка метовости в шапке карточки */
.mm-score {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11.5px; font-weight: 700; font-family: var(--mono);
  color: var(--accent);
  background: rgba(245, 165, 36, .12);
  border: 1px solid rgba(245, 165, 36, .35);
  border-radius: 999px; padding: 2px 8px;
}

/* Чипы-предупреждения и хорошие сигналы в полосе статов */
.stat-chip.mm-bad { color: var(--bad); border-color: rgba(248, 113, 113, .3); }
.stat-chip.mm-bad b { color: var(--bad); }
.stat-chip.mm-good { color: var(--good); border-color: rgba(52, 211, 153, .3); }
.stat-chip.mm-good b { color: var(--good); }

/* Список готовых целей — лоты ниже порога выкупа */
.mm-targets {
  margin-top: 11px;
  border: 1px solid rgba(52, 211, 153, .28);
  background: rgba(52, 211, 153, .05);
  border-radius: 10px; padding: 10px 12px;
}
/* Свёрнутый список целей: показываем первые две (заголовок — 1-й ребёнок). */
.mm-targets.collapsed .mm-target:nth-child(n+4) { display: none; }
.mm-targets-head {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; color: var(--good); margin-bottom: 8px;
}
.mm-target {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 10px;
  padding: 6px 0; border-top: 1px dashed rgba(52, 211, 153, .18);
}
.mm-target:first-of-type { border-top: none; padding-top: 0; }
.mm-t-price { font-family: var(--mono); font-weight: 700; font-size: 13.5px; color: var(--text); }
.mm-t-meta { font-size: 11px; color: var(--text-faint); }
.mm-t-profit {
  font-family: var(--mono); font-weight: 700; font-size: 13px;
  color: var(--good); text-align: right; white-space: nowrap;
}
.mm-t-profit span {
  display: inline-block; margin-left: 6px; font-size: 11px;
  color: var(--text-dim); font-weight: 600;
}
.mm-no-targets {
  margin-top: 11px; padding: 10px 12px;
  font-size: 12px; color: var(--text-faint); text-align: center;
  border: 1px dashed var(--border); border-radius: 10px;
}
.mm-no-targets b { color: var(--text-dim); font-family: var(--mono); }

/* Эффекты прокрутки свёрнуты кнопкой (см. rollsBlockHTML) */
.mm-card .rolls { margin-top: 10px; }

/* ПРОБНАЯ карточка без PRO: витрина «Обычного» модуля с замком на месте
   премиум-метрик. Рамка чуть приглушена, чтобы не выглядела как обычная
   карточка с недостающими цифрами. */
.mm-card.mm-trial { border-color: rgba(245,165,36,.28); }
.mm-trial-lock {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  margin-top: 8px; padding: 9px 11px; cursor: pointer;
  background: rgba(245,165,36,.07); border: 1px dashed rgba(245,165,36,.38);
  border-radius: 10px; font-size: 12px; color: var(--text-dim);
}
.mm-trial-lock:hover { background: rgba(245,165,36,.12); }
.mm-trial-lock .pt-text { flex: 1 1 auto; min-width: 120px; }
.mm-trial-lock .pt-cta {
  font-weight: 700; font-size: 11.5px; color: #f5a524; white-space: nowrap;
}

/* Компактная строка слотов в «Метовых модулях»: все три слота в одну строку,
   чтобы карточки комбинаций были одной высоты и сетка не «рвалась». */
.roll-brief {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  padding: 7px 10px; font-size: 11.5px;
  background: rgba(255,255,255,.017); border: 1px solid var(--border-soft);
  border-radius: 10px;
}
.roll-brief-item { display: inline-flex; align-items: baseline; gap: 5px; min-width: 0; }
.roll-brief-slot {
  color: var(--text-faint); font-weight: 700; font-size: 9.5px;
  letter-spacing: .4px; text-transform: uppercase;
}
.roll-brief-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roll-brief-val { font-family: var(--mono); font-weight: 700; font-size: 11.5px; }
.rolls-compact .rolls-toggle { margin-top: 7px; }
/* Три кнопки в подвале метовой карточки: подписи в одну строку, иначе
   «Все цели / История цен» ломаются на две строки и подвал «прыгает». */
.mm-card .lot-foot { gap: 6px; }
.mm-card .lot-foot .ghost-btn {
  padding: 7px 6px; font-size: 11.5px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .mm-target { grid-template-columns: 1fr auto; }
  .mm-t-meta { grid-column: 1 / -1; }
}

/* -------------------- ГЛАВНАЯ: лендинг -------------------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--panel) 0%, var(--panel-2) 55%, #0d1520 100%);
  border: 1px solid var(--border); border-radius: 20px;
  padding: 40px clamp(20px, 4vw, 46px) 32px;
  box-shadow: var(--shadow); margin-bottom: 20px;
}
.hero-glow {
  position: absolute; inset: -40% -10% auto auto; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(245,165,36,.20) 0%, rgba(245,165,36,0) 62%);
  pointer-events: none;
}
.hero-body { position: relative; max-width: 900px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: var(--accent); background: rgba(245,165,36,.10);
  border: 1px solid rgba(245,165,36,.32); margin-bottom: 16px;
}
.hero-title {
  margin: 0 0 14px; font-size: clamp(24px, 3.4vw, 38px); line-height: 1.22;
  letter-spacing: -.3px; color: var(--text); font-weight: 800;
}
.hero-accent {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead {
  margin: 0 0 22px; font-size: 15px; line-height: 1.68; color: var(--text-dim);
  max-width: 720px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.hero-cta { font-size: 14px; padding: 11px 20px; }
.hero-cta-2 { font-size: 13px; padding: 10px 16px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px; padding-top: 22px; border-top: 1px solid var(--border-soft);
}
.hero-stat {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px; border-radius: 11px;
  background: rgba(255,255,255,.022); border: 1px solid var(--border-soft);
}
.hero-stat b {
  font-family: var(--mono); font-size: 21px; font-weight: 800;
  color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.4px;
}
.hero-stat span { font-size: 11.5px; color: var(--text-faint); }

.land-section { margin-bottom: 20px; }
.land-head { margin: 0 0 14px; }
.land-head h2 {
  margin: 0 0 5px; font-size: 19px; letter-spacing: -.2px; color: var(--text);
}
.land-head p { margin: 0; font-size: 13.5px; color: var(--text-dim); }

.land-tools {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px;
}
.land-tool {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 16px 14px; box-shadow: var(--shadow-soft);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.land-tool:hover {
  transform: translateY(-2px); border-color: rgba(245,165,36,.45);
  box-shadow: var(--shadow);
}
.land-tool-ico {
  width: 38px; height: 38px; display: grid; place-items: center;
  font-size: 19px; border-radius: 11px; margin-bottom: 10px;
  background: rgba(245,165,36,.12); border: 1px solid rgba(245,165,36,.28);
}
.land-tool h3 { margin: 0 0 3px; font-size: 15.5px; color: var(--text); }
.land-tool-sub { margin: 0 0 10px; font-size: 12.5px; color: var(--accent); font-weight: 600; }
.land-tool-list { margin: 0 0 14px; padding: 0; list-style: none; }
.land-tool-list li {
  position: relative; padding-left: 17px; margin-bottom: 6px;
  font-size: 12.5px; line-height: 1.5; color: var(--text-dim);
}
.land-tool-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--good); font-weight: 800; font-size: 12px;
}
.land-tool-foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding-top: 10px; border-top: 1px solid var(--border-soft);
}
.land-tool-out { font-size: 11.5px; color: var(--text-faint); }

.land-compare {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px;
}
.land-col {
  border-radius: var(--radius); padding: 16px 18px;
  border: 1px solid var(--border); background: var(--panel);
}
.land-col h3 { margin: 0 0 12px; font-size: 14.5px; }
.land-col ul { margin: 0; padding: 0; list-style: none; }
.land-col li {
  position: relative; padding-left: 24px; margin-bottom: 9px;
  font-size: 13px; line-height: 1.5; color: var(--text-dim);
}
.land-col li::before {
  position: absolute; left: 0; top: 0; font-weight: 800; font-size: 12.5px;
}
.land-col-blind { border-color: rgba(248,113,113,.28); background: linear-gradient(180deg, rgba(248,113,113,.045), var(--panel)); }
.land-col-blind h3 { color: var(--bad); }
.land-col-blind li::before { content: "✕"; color: var(--bad); }
.land-col-ai { border-color: rgba(52,211,153,.30); background: linear-gradient(180deg, rgba(52,211,153,.05), var(--panel)); }
.land-col-ai h3 { color: var(--good); }
.land-col-ai li::before { content: "✓"; color: var(--good); }

.land-pricing {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px;
}
.land-plan {
  position: relative; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow-soft);
}
.land-plan h3 { margin: 0 0 6px; font-size: 14px; letter-spacing: .4px; text-transform: uppercase; color: var(--text-dim); }
.land-plan-price {
  margin: 0 0 14px; font-family: var(--mono); font-size: 25px; font-weight: 800;
  color: var(--text); letter-spacing: -.5px;
}
.land-plan ul { margin: 0 0 16px; padding: 0; list-style: none; }
.land-plan li {
  position: relative; padding-left: 19px; margin-bottom: 7px;
  font-size: 12.5px; line-height: 1.5; color: var(--text-dim);
}
.land-plan li::before {
  content: "•"; position: absolute; left: 3px; color: var(--accent); font-weight: 800;
}
.land-plan .ghost-btn { margin-top: auto; width: 100%; }
.land-plan-pro {
  border-color: rgba(245,165,36,.55);
  box-shadow: 0 0 0 1px rgba(245,165,36,.18), var(--shadow);
}
.land-plan-pro h3 { color: var(--accent); }
.land-plan-badge {
  position: absolute; top: -10px; right: 14px;
  padding: 3px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 800;
  letter-spacing: .4px; text-transform: uppercase;
  color: #12100a; background: linear-gradient(120deg, var(--accent), var(--accent-2));
}
.land-plan .primary-btn { margin-top: auto; width: 100%; }
/* Заглушка в карточке PRO: оплата ещё не подключена. */
.land-plan-soon {
  margin: 0 0 9px; padding: 7px 10px; border-radius: 9px;
  background: rgba(245,165,36,.09); border: 1px dashed rgba(245,165,36,.45);
  font-size: 11.5px; font-weight: 600; color: var(--accent); text-align: center;
}
.land-note { margin: 12px 0 0; font-size: 12px; color: var(--text-faint); }

/* Подсветка блока тарифов после кнопки «Что даёт PRO»: видно, куда перебросило. */
@keyframes landFlash {
  0% { box-shadow: 0 0 0 2px rgba(245,165,36,.65); }
  100% { box-shadow: 0 0 0 2px rgba(245,165,36,0); }
}
.land-flash { animation: landFlash 1.2s ease-out; border-radius: 16px; }

@media (max-width: 640px) {
  .hero { padding: 26px 16px 22px; border-radius: 16px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-actions .hero-cta, .hero-actions .hero-cta-2 { width: 100%; }
  .land-tool-foot { flex-wrap: wrap; }
}

/* -------------------- FAQ: инструменты и заработок -------------------- */
.faq-hero { padding: 22px 22px 18px; }
.faq-hero h1 { margin: 0 0 8px; font-size: 21px; letter-spacing: .2px; }
.faq-hero-sub { margin: 0; color: var(--text-dim); font-size: 13.5px; line-height: 1.55; max-width: 820px; }

.faq-how { padding: 18px 22px; }
.faq-how h2 { margin: 0 0 10px; font-size: 15px; }
.faq-how p { margin: 0 0 10px; color: var(--text-dim); font-size: 13.5px; line-height: 1.6; max-width: 900px; }
.faq-how p:last-child { margin-bottom: 0; }

.faq-tools-wrap { margin-bottom: 16px; }
.faq-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px;
  margin-top: 12px;
}
.faq-card {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 14px 15px;
  display: flex; flex-direction: column; gap: 9px;
}
.faq-card-title { margin: 0; font-size: 14.5px; letter-spacing: .2px; }
.faq-card-title a { color: var(--text); text-decoration: none; }
.faq-card-title a:hover { color: var(--accent); }
.faq-card-what { margin: 0; color: var(--text-dim); font-size: 12.8px; line-height: 1.55; }

.faq-block { background: var(--bg-2); border-radius: 9px; padding: 9px 11px; }
.faq-block-earn { background: rgba(52,211,153,.06); border: 1px solid rgba(52,211,153,.16); }
.faq-label {
  display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .7px;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 5px;
}
.faq-block-earn .faq-label { color: var(--good); }
.faq-list { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 4px; }
.faq-list li { color: var(--text-dim); font-size: 12.4px; line-height: 1.5; }
.faq-list li::marker { color: var(--accent); }
.faq-block-earn .faq-list li::marker { color: var(--good); }

.faq-open { align-self: flex-start; margin-top: auto; padding: 6px 12px; font-size: 12px; }
.faq-card .faq-block:last-of-type { margin-bottom: 2px; }

.faq-earn-wrap, .faq-questions-wrap { padding-bottom: 18px; }
.faq-earn-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px;
  padding: 16px 18px 0;
}
.faq-earn-card {
  background: var(--bg-2); border: 1px solid var(--border-soft);
  border-radius: 11px; padding: 12px 13px;
}
.faq-earn-card h3 { margin: 0 0 6px; font-size: 13.5px; color: var(--accent); }
.faq-earn-card p { margin: 0; color: var(--text-dim); font-size: 12.6px; line-height: 1.55; }

.faq-questions { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 0; }
.faq-q {
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 10px;
  padding: 10px 13px;
}
.faq-q summary {
  cursor: pointer; font-size: 13.4px; font-weight: 700; color: var(--text);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.faq-q summary::-webkit-details-marker { display: none; }
.faq-q summary::before {
  content: '▸'; color: var(--accent); font-size: 11px; transition: transform .15s ease;
}
.faq-q[open] summary::before { content: '▾'; }
.faq-q[open] summary { color: var(--accent); }
.faq-a { margin-top: 8px; color: var(--text-dim); font-size: 12.8px; line-height: 1.6; }

.faq-lead { margin-top: 0; }
.footer-link { color: var(--text-faint); text-decoration: none; }
.footer-link:hover { color: var(--accent); }

@media (max-width: 640px) {
  .faq-grid { grid-template-columns: 1fr; }
  .faq-earn-grid { grid-template-columns: 1fr; }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; border: 2px solid var(--bg-2); }
::-webkit-scrollbar-thumb:hover { background: var(--panel-3); }
