/* Альтернативный skin по прототипу брата.
   Включается классом body.proto-skin. Убрать класс / отключить файл — откат. */

body.proto-skin {
  --proto-bg: #070708;
  --proto-panel: #121214;
  --proto-panel-2: #18181b;
  --proto-glass: rgba(18, 18, 20, 0.72);
  --proto-glass-strong: rgba(18, 18, 20, 0.92);
  --proto-topbar: linear-gradient(180deg, rgba(7, 7, 8, 0.96), rgba(7, 7, 8, 0.82));
  --proto-thead: #0e0e10;
  --proto-line: rgba(220, 28, 28, 0.55);
  --proto-line-soft: rgba(255, 255, 255, 0.08);
  --proto-row-line: rgba(255, 255, 255, 0.05);
  --proto-row-hover: rgba(255, 255, 255, 0.025);
  --proto-fg: #ffffff;
  --proto-muted: rgba(255, 255, 255, 0.55);
  --proto-faint: rgba(255, 255, 255, 0.48);
  --proto-icon-muted: rgba(255, 255, 255, 0.35);
  --proto-chip: rgba(18, 18, 20, 0.85);
  --proto-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  --proto-shadow-deep: 0 24px 48px rgba(0, 0, 0, 0.45);
  --proto-red: #d61f1f;
  --proto-red-hot: #ff2e2e;
  --proto-good: #3ddc84;
  --proto-bad: #ff4d57;
  --proto-hazard-dark: rgba(0, 0, 0, 0.75);
  --page-max: 1380px;
  /* База 13px в styles.css — макет читается крупнее; rem отсюда. */
  font-size: 16px;
  line-height: 1.4;
  color: var(--proto-fg);
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(160, 16, 16, 0.18), transparent 60%),
    var(--proto-bg);
}

body.proto-skin .demon-field {
  opacity: 0.35;
}

/* --- Top bar --- */
body.proto-skin .proto-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  /* На всю ширину окна: логотип влево, профиль/тема вправо */
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.85rem clamp(0.85rem, 2.2vw, 1.75rem) 0.65rem;
  background: var(--proto-topbar);
  backdrop-filter: blur(8px);
}

body.proto-skin .proto-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  justify-self: start;
  text-decoration: none;
  color: var(--proto-fg);
}

body.proto-skin .proto-games {
  justify-self: center;
}

body.proto-skin .proto-top-end {
  justify-self: end;
}

body.proto-skin .proto-brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(220, 28, 28, 0.35));
}

body.proto-skin .proto-brand-text {
  font-family: var(--font-display), "Syne", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

body.proto-skin .proto-brand-text .brand-demon { color: var(--proto-fg); }
body.proto-skin .proto-brand-text .brand-tv { color: var(--proto-red-hot); }

body.proto-skin .proto-games {
  display: flex;
  justify-content: center;
  min-width: 0;
}

body.proto-skin .game-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  background: transparent;
  padding: 0 0 0.45rem;
}

body.proto-skin .game-switch-btn {
  position: relative;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 2.85rem;
  height: 2.85rem;
  margin: 0;
  /* Отступ: рамка и линия не наезжают на картинку */
  padding: 3px;
  border: 1px solid var(--proto-line-soft);
  border-radius: 8px;
  background: var(--proto-chip);
  color: var(--proto-fg);
  cursor: pointer;
  overflow: visible;
}

body.proto-skin .game-switch-btn img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 5px;
  opacity: 0.95;
}

body.proto-skin .game-switch-btn:hover {
  border-color: rgba(220, 28, 28, 0.45);
}

body.proto-skin .game-switch-btn:hover img {
  opacity: 1;
}

body.proto-skin .game-switch-btn.is-active {
  border-color: rgba(220, 28, 28, 0.75);
  background:
    linear-gradient(165deg, rgba(255, 80, 80, 0.18), rgba(220, 28, 28, 0.06) 55%),
    var(--proto-panel-2);
  box-shadow: 0 0 0 1px rgba(220, 28, 28, 0.2);
}

body.proto-skin .game-switch-btn.is-active img {
  opacity: 1;
}

body.proto-skin .game-switch-btn.is-active::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -6px;
  height: 2px;
  border-radius: 1px;
  background: var(--proto-red-hot);
  box-shadow: 0 0 10px rgba(255, 46, 46, 0.55);
}

body.proto-skin .proto-top-end {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  justify-content: flex-end;
}

body.proto-skin .proto-nav-link {
  font-size: 0.9rem;
  white-space: nowrap;
}

body.proto-skin .lang-btn {
  font-size: 0.92rem;
  font-weight: 700;
}

body.proto-skin .theme-sun-btn {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--proto-line-soft);
  border-radius: 999px;
  background: var(--proto-chip);
  color: var(--proto-muted);
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

body.proto-skin .theme-sun-btn:hover {
  color: var(--proto-fg);
  border-color: rgba(220, 28, 28, 0.55);
}

body.proto-skin .theme-sun-btn.is-light,
body.proto-skin .theme-sun-btn[aria-pressed="true"] {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.1);
}

body.proto-skin .theme-sun-ico {
  display: block;
}

body.proto-skin .lang-switch {
  margin: 0;
}

body.proto-skin .admin-online-badge {
  margin-left: 0.15rem;
}

body.proto-skin .proto-banner {
  width: min(var(--page-max), calc(100% - 32px));
  margin: 0 auto 0.35rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(252, 165, 165, 0.8);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-align: center;
}

/* --- Hero title --- */
body.proto-skin .proto-page {
  padding-top: 0.4rem;
}

body.proto-skin .proto-hero {
  display: flex;
  justify-content: center;
  margin: 0.4rem 0 1.1rem;
}

body.proto-skin .proto-hero-title {
  position: relative;
  margin: 0;
  padding: 0.35rem 1.4rem 0.55rem;
  color: #fff;
  font-family: var(--font-display), "Syne", sans-serif;
  font-size: clamp(1.7rem, 3.4vw, 2.55rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.05;
  z-index: 0;
}

body.proto-skin .proto-hero-title::before {
  content: "";
  position: absolute;
  inset: 12% -4% 8%;
  z-index: -1;
  background:
    linear-gradient(100deg, transparent 0%, rgba(190, 18, 18, 0.92) 12%, rgba(210, 24, 24, 0.95) 50%, rgba(160, 12, 12, 0.9) 88%, transparent 100%);
  clip-path: polygon(2% 18%, 8% 8%, 94% 10%, 99% 28%, 97% 78%, 90% 94%, 8% 92%, 1% 72%);
  filter: contrast(1.05) saturate(1.1);
  opacity: 0.95;
}

body.proto-skin .seo-h1 {
  display: none;
}

/* Workspace больше не общая рамка — контролы и таблица живут отдельно. */
body.proto-skin .workspace {
  margin-top: 0.35rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

/* --- Controls row --- */
body.proto-skin .compare-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin: 0 0 1.15rem;
}

body.proto-skin .proto-controls {
  display: grid;
  /* Поиск чуть шире; маршрут всё ещё тянет место под «Мин прайс (холд)». */
  grid-template-columns: minmax(200px, 1fr) minmax(0, 1.75fr) auto;
  align-items: center;
  gap: 0.75rem 0.85rem;
  margin: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--proto-line-soft);
  border-radius: 14px;
  background: var(--proto-glass);
  box-shadow: var(--proto-shadow);
}

body.proto-skin .proto-search {
  position: relative;
  display: block;
  margin: 0;
}

body.proto-skin .proto-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--proto-icon-muted);
  font-size: 1rem;
  pointer-events: none;
}

body.proto-skin .proto-search input {
  width: 100%;
  height: 3rem;
  padding: 0 1rem 0 2.5rem;
  border: 1px solid var(--proto-line-soft);
  border-radius: 999px;
  background: var(--proto-panel);
  color: var(--proto-fg);
  font-size: 1rem;
}

body.proto-skin .proto-search input:focus {
  outline: none;
  border-color: rgba(220, 28, 28, 0.65);
  box-shadow: 0 0 0 3px rgba(220, 28, 28, 0.12);
}

body.proto-skin .proto-route {
  display: grid;
  /* Обе стороны с полом: «Куда» без kind больше не схлопывается в «C». */
  grid-template-columns: minmax(16.5rem, 1.35fr) auto minmax(9.75rem, 1fr);
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body.proto-skin .proto-route .route-kicker { display: none; }

body.proto-skin .proto-route .route-side,
body.proto-skin .proto-route .trade-leg {
  min-width: 0;
  padding: 0.4rem 0.5rem;
  overflow: visible;
}

body.proto-skin .proto-route .route-fields {
  /* Market + kind: kind достаточно широкий, market не ужимается ниже имени площадки. */
  grid-template-columns: minmax(8.25rem, 0.95fr) minmax(10.75rem, 1.25fr);
  gap: 0.4rem;
}

body.proto-skin .proto-route .market-pick-field,
body.proto-skin .proto-route .kind-field {
  margin: 0;
  min-width: 0;
}

body.proto-skin .proto-route .market-pick-field:not(.kind-field) {
  min-width: 8.25rem;
}

body.proto-skin .proto-route .kind-field {
  min-width: 10.5rem;
}

body.proto-skin .proto-route select,
body.proto-skin .proto-route .choice-btn,
body.proto-skin .proto-route .choice-trigger {
  min-height: 3rem;
  border-radius: 10px;
  border-color: var(--proto-line-soft);
  background: var(--proto-panel);
  font-size: 0.95rem;
  font-weight: 600;
}

body.proto-skin .proto-route .choice-trigger-label,
body.proto-skin .proto-route .choice-option {
  white-space: nowrap;
}

body.proto-skin .proto-route .choice-menu {
  left: 0;
  right: auto;
  width: max-content;
  min-width: max(100%, 11.5rem);
  max-width: min(18rem, 80vw);
}

body.proto-skin .proto-route .swap-btn {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 999px;
  border: 1px solid var(--proto-line-soft);
  background: var(--proto-panel-2);
  color: var(--proto-fg);
  font-size: 1.15rem;
}

body.proto-skin .proto-filters-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 3rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #e22727, #b91414);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(180, 16, 16, 0.35);
}

body.proto-skin .proto-filters-btn:hover {
  filter: brightness(1.06);
}

body.proto-skin .proto-filters-btn[aria-expanded="true"] {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 8px 22px rgba(180, 16, 16, 0.35);
}

body.proto-skin .proto-filters-ico {
  font-size: 0.95rem;
  opacity: 0.9;
}

body.proto-skin .proto-drawer {
  margin: 0 0 0.85rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--proto-line-soft);
  border-radius: 12px;
  background: var(--proto-glass-strong);
}

body.proto-skin .proto-drawer[hidden] { display: none; }

body.proto-skin .filter-tools-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

body.proto-skin .filter-tools-buttons .tool-btn {
  height: 2.55rem;
  padding: 0 1rem;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

body.proto-skin .tool-btn.is-current {
  border-color: rgba(220, 28, 28, 0.55);
  color: var(--proto-fg);
}

/* --- Table frame --- */
body.proto-skin .results-shell {
  margin-top: 0;
}

body.proto-skin .results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.95rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--proto-line-soft);
  border-radius: 12px;
  background: var(--proto-glass);
  box-shadow: var(--proto-shadow);
}

body.proto-skin .proto-table-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--proto-line);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 18%),
    var(--proto-panel);
  box-shadow: var(--proto-shadow-deep);
}

body.proto-skin .proto-table-frame::before,
body.proto-skin .proto-table-frame::after {
  content: "";
  position: absolute;
  width: 72px;
  height: 18px;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    -45deg,
    rgba(210, 24, 24, 0.95) 0 6px,
    var(--proto-hazard-dark) 6px 12px
  );
  opacity: 0.9;
}

body.proto-skin .proto-table-frame::before {
  top: 0;
  left: 0;
  clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%);
}

body.proto-skin .proto-table-frame::after {
  right: 0;
  bottom: 0;
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
}

body.proto-skin .results-table {
  width: 100%;
  border-collapse: collapse;
}

body.proto-skin .results-table thead th {
  background: var(--proto-thead);
  border-bottom: 1px solid rgba(220, 28, 28, 0.28);
  color: var(--proto-muted);
  font-size: 0.82rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.85rem 0.9rem;
}

/* В макете брата нет от/до в шапке — диапазоны остаются в DOM для логики, визуально прячем. */
body.proto-skin .results-table thead .col-range {
  display: none;
}

body.proto-skin .results-table thead .th-label {
  justify-content: center;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  color: var(--proto-fg);
}

body.proto-skin .results-table tbody td {
  padding: 0.78rem 0.9rem;
  border-bottom: 1px solid var(--proto-row-line);
  background: transparent;
  font-size: 1rem;
}

body.proto-skin .results-table tbody tr:hover td {
  background: var(--proto-row-hover);
}

body.proto-skin .results-table .name {
  color: var(--proto-fg);
  font-weight: 600;
}

body.proto-skin .item-thumb-wrap,
body.proto-skin .item-thumb {
  width: 72px;
  height: 72px;
}

body.proto-skin .item-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.01em;
}

body.proto-skin .results-table .sub,
body.proto-skin .item-meta,
body.proto-skin .col-num .sub {
  color: var(--proto-faint);
  font-size: 0.88rem;
  line-height: 1.3;
}

body.proto-skin .pager-shown,
body.proto-skin .pager-note {
  font-size: 0.92rem;
}

body.proto-skin .pager-shown span {
  font-size: 0.78rem;
}

body.proto-skin .min-stock-field {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  white-space: nowrap;
}

body.proto-skin .min-stock-field input {
  width: 4.5rem;
  height: 2.1rem;
  font-size: 0.95rem;
}

body.proto-skin .results-table tbody td.col-num {
  font-size: 1.1rem;
}

body.proto-skin .price-value {
  color: var(--proto-fg);
  font-weight: 800;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

body.proto-skin .price-editable {
  border-bottom: 0 !important;
  text-decoration: none;
}

body.proto-skin .price-editable:hover,
body.proto-skin .price-editable:focus-visible {
  box-shadow: 0 0 0 1px rgba(220, 28, 28, 0.5);
}

/* Проценты ≈ цены по размеру, как в макете */
body.proto-skin .results-table tbody td.percent-cell {
  font-size: 1.22rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

body.proto-skin .percent-cell .percent-pill {
  display: inline;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
}

body.proto-skin .percent-cell.pos,
body.proto-skin .percent-cell.pos .percent-pill {
  color: var(--proto-good);
}

body.proto-skin .percent-cell.neg,
body.proto-skin .percent-cell.neg .percent-pill {
  color: var(--proto-bad);
}

body.proto-skin .percent-cell.flat,
body.proto-skin .percent-cell.flat .percent-pill {
  color: var(--proto-muted);
}

body.proto-skin .th.sortable.is-sorted .th-label::after,
body.proto-skin th.sortable.is-sorted .th-label::after {
  color: var(--proto-red-hot);
}

/* --- Extra markets + Hold (в ящике фильтров) --- */
body.proto-skin .extra-markets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--proto-line-soft);
}

body.proto-skin .extra-market-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
  min-width: 0;
  color: var(--proto-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.proto-skin .extra-market-field select,
body.proto-skin .extra-market-field .choice-trigger {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0 0.85rem;
  border: 1px solid var(--proto-line-soft);
  border-radius: 10px;
  background: var(--proto-panel);
  color: var(--proto-fg);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.proto-skin .extra-market-field select:hover,
body.proto-skin .extra-market-field .choice-trigger:hover {
  border-color: rgba(220, 28, 28, 0.4);
}

body.proto-skin .extra-market-field select:focus,
body.proto-skin .extra-market-field .choice-trigger:focus-visible {
  outline: none;
  border-color: rgba(220, 28, 28, 0.7);
  box-shadow: 0 0 0 3px rgba(220, 28, 28, 0.12);
}

body.proto-skin .hold-compact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--proto-line-soft);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
    var(--proto-panel);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

body.proto-skin .hold-compact-check {
  flex-direction: row;
  gap: 0.55rem;
  color: var(--proto-fg);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

body.proto-skin .hold-compact-check input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 5px;
  border-color: var(--proto-line-soft);
  background: var(--proto-panel-2);
}

body.proto-skin .hold-compact-check input[type="checkbox"]:checked {
  border-color: rgba(220, 28, 28, 0.95);
  background-color: var(--proto-red);
}

body.proto-skin .hold-slider {
  gap: 0.65rem;
}

body.proto-skin .hold-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 0.45rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(220, 28, 28, 0.55), rgba(255, 255, 255, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.08);
  outline: none;
  accent-color: var(--proto-red-hot);
}

body.proto-skin .hold-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--proto-red-hot);
  box-shadow: 0 0 0 3px rgba(220, 28, 28, 0.2), 0 4px 10px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

body.proto-skin .hold-slider input[type="range"]::-moz-range-thumb {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--proto-red-hot);
  box-shadow: 0 0 0 3px rgba(220, 28, 28, 0.2), 0 4px 10px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

body.proto-skin .hold-slider input[type="range"]::-moz-range-track {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

body.proto-skin .hold-days-label {
  min-width: 2.4rem;
  padding: 0.25rem 0.45rem;
  border-radius: 7px;
  background: rgba(220, 28, 28, 0.14);
  border: 1px solid rgba(220, 28, 28, 0.35);
  color: var(--proto-fg);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
}

body.proto-skin .hold-compact.is-off {
  opacity: 0.72;
}

body.proto-skin .proto-route .choice-trigger,
body.proto-skin .proto-route select,
body.proto-skin .min-stock-field,
body.proto-skin .min-stock-field input,
body.proto-skin .pager-shown,
body.proto-skin .pager-note,
body.proto-skin .proto-nav-link,
body.proto-skin .lang-btn {
  color: var(--proto-fg);
}

body.proto-skin .item-title {
  color: var(--proto-fg);
}

/* --- Light theme: тот же layout, светлая палитра как раньше --- */
html[data-theme="light"] body.proto-skin {
  --proto-bg: #ececef;
  --proto-panel: #ffffff;
  --proto-panel-2: #f4f4f5;
  --proto-glass: rgba(255, 255, 255, 0.92);
  --proto-glass-strong: #ffffff;
  --proto-topbar: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86));
  --proto-thead: #f4f4f5;
  --proto-line: rgba(220, 28, 28, 0.4);
  --proto-line-soft: rgba(24, 24, 27, 0.12);
  --proto-row-line: rgba(24, 24, 27, 0.08);
  --proto-row-hover: rgba(24, 24, 27, 0.045);
  --proto-fg: #09090b;
  --proto-muted: #3f3f46;
  --proto-faint: #52525b;
  --proto-icon-muted: #71717a;
  --proto-chip: #ffffff;
  --proto-shadow: 0 12px 28px rgba(24, 24, 27, 0.1);
  --proto-shadow-deep: 0 18px 40px rgba(24, 24, 27, 0.12);
  --proto-red: #d61f1f;
  --proto-red-hot: #dc1c1c;
  --proto-good: #15803d;
  --proto-bad: #dc2626;
  --proto-hazard-dark: rgba(24, 24, 27, 0.18);
  background:
    radial-gradient(1100px 480px at 50% -8%, rgba(220, 28, 28, 0.08), transparent 58%),
    linear-gradient(180deg, #f7f7f8 0%, var(--proto-bg) 42%);
}

html[data-theme="light"] body.proto-skin .demon-field {
  opacity: 0.45;
}

html[data-theme="light"] body.proto-skin .proto-top {
  border-bottom: 1px solid var(--proto-line-soft);
}

html[data-theme="light"] body.proto-skin .proto-banner {
  color: #b91c1c;
}

html[data-theme="light"] body.proto-skin .proto-hero-title {
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] body.proto-skin .game-switch-btn {
  border-color: rgba(24, 24, 27, 0.14);
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.06);
}

html[data-theme="light"] body.proto-skin .game-switch-btn.is-active {
  border-color: rgba(220, 28, 28, 0.65);
  background:
    linear-gradient(165deg, rgba(220, 28, 28, 0.12), rgba(220, 28, 28, 0.04) 55%),
    #fff;
}

html[data-theme="light"] body.proto-skin .theme-sun-btn.is-light,
html[data-theme="light"] body.proto-skin .theme-sun-btn[aria-pressed="true"] {
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(251, 191, 36, 0.18);
}

html[data-theme="light"] body.proto-skin .proto-controls,
html[data-theme="light"] body.proto-skin .proto-drawer,
html[data-theme="light"] body.proto-skin .results-meta {
  border-color: rgba(24, 24, 27, 0.12);
  background: #fff;
}

html[data-theme="light"] body.proto-skin .proto-search input,
html[data-theme="light"] body.proto-skin .proto-route .choice-trigger,
html[data-theme="light"] body.proto-skin .proto-route select,
html[data-theme="light"] body.proto-skin .extra-market-field select,
html[data-theme="light"] body.proto-skin .extra-market-field .choice-trigger,
html[data-theme="light"] body.proto-skin .min-stock-field input {
  background: #fff;
  border-color: rgba(24, 24, 27, 0.14);
  color: var(--proto-fg);
}

html[data-theme="light"] body.proto-skin .route-from,
html[data-theme="light"] body.proto-skin .trade-leg.route-from {
  background:
    linear-gradient(105deg, rgba(220, 28, 28, 0.08), transparent 55%),
    #fff;
}

html[data-theme="light"] body.proto-skin .route-to,
html[data-theme="light"] body.proto-skin .trade-leg.route-to {
  background:
    linear-gradient(105deg, rgba(21, 128, 61, 0.08), transparent 55%),
    #fff;
}

html[data-theme="light"] body.proto-skin .proto-table-frame {
  background: #fff;
  border-color: rgba(220, 28, 28, 0.28);
  box-shadow: var(--proto-shadow-deep);
}

html[data-theme="light"] body.proto-skin .results-table thead th {
  background: #f4f4f5;
  color: var(--proto-muted);
}

html[data-theme="light"] body.proto-skin .results-table tbody td {
  background: #fff;
}

html[data-theme="light"] body.proto-skin .results-table tbody tr:hover td {
  background: rgba(24, 24, 27, 0.035);
}

html[data-theme="light"] body.proto-skin .hold-compact {
  background: #fff;
  box-shadow: var(--proto-shadow);
}

html[data-theme="light"] body.proto-skin .hold-days-label {
  color: #7f1d1d;
  background: rgba(220, 28, 28, 0.1);
}

html[data-theme="light"] body.proto-skin .lang-btn:not(.is-current),
html[data-theme="light"] body.proto-skin .proto-nav-link {
  color: var(--proto-muted);
}

html[data-theme="light"] body.proto-skin .lang-btn.is-current {
  color: var(--proto-fg);
}

@media (max-width: 1180px) {
  body.proto-skin .proto-controls {
    grid-template-columns: minmax(160px, 0.85fr) minmax(0, 1.35fr) auto;
    gap: 0.55rem 0.65rem;
  }

  body.proto-skin .proto-route {
    grid-template-columns: minmax(14.5rem, 1.3fr) auto minmax(8.75rem, 1fr);
  }

  body.proto-skin .proto-route .route-fields {
    grid-template-columns: minmax(7.5rem, 0.9fr) minmax(9.75rem, 1.25fr);
  }

  body.proto-skin .proto-route .market-pick-field:not(.kind-field) {
    min-width: 7.5rem;
  }

  body.proto-skin .proto-route .kind-field {
    min-width: 9.5rem;
  }

  body.proto-skin .proto-route select,
  body.proto-skin .proto-route .choice-btn,
  body.proto-skin .proto-route .choice-trigger {
    font-size: 0.88rem;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }
}

@media (max-width: 980px) {
  body.proto-skin .proto-top {
    grid-template-columns: 1fr;
    justify-items: stretch;
    width: 100%;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  body.proto-skin .proto-brand,
  body.proto-skin .proto-games,
  body.proto-skin .proto-top-end {
    justify-self: center;
  }

  body.proto-skin .proto-top-end {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }

  body.proto-skin .proto-controls {
    grid-template-columns: 1fr;
  }

  body.proto-skin .proto-filters-btn {
    width: 100%;
  }

  body.proto-skin .proto-route {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  body.proto-skin .proto-route .route-mid {
    width: 100%;
  }

  body.proto-skin .proto-route .route-fields {
    grid-template-columns: minmax(0, 0.9fr) minmax(10.5rem, 1.35fr);
  }

  body.proto-skin .results-meta {
    flex-wrap: wrap;
  }

  body.proto-skin .extra-markets {
    grid-template-columns: 1fr;
  }

  body.proto-skin .hold-compact {
    flex-wrap: wrap;
  }
}

/* --- Account page (тот же proto chrome) --- */
body.proto-skin.account-body .account-page {
  width: min(640px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 0.4rem;
  padding-bottom: 2.5rem;
}

body.proto-skin.account-body .account-top-mid {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.proto-skin.account-body .account-shell {
  margin-top: 0.35rem;
}

body.proto-skin.account-body .account-card {
  border: 1px solid var(--proto-line-soft);
  border-radius: 14px;
  background: var(--proto-glass-strong);
  box-shadow: var(--proto-shadow-deep);
}

body.proto-skin.account-body .account-kicker {
  color: var(--proto-red-hot);
}

body.proto-skin.account-body .account-name,
body.proto-skin.account-body .account-title,
body.proto-skin.account-body .account-section-title,
body.proto-skin.account-body .account-mono {
  color: var(--proto-fg);
}

body.proto-skin.account-body .account-lead,
body.proto-skin.account-body .account-api-lead,
body.proto-skin.account-body .account-status,
body.proto-skin.account-body .account-api-empty {
  color: var(--proto-muted);
}

body.proto-skin.account-body .account-meta,
body.proto-skin.account-body .account-api {
  border-top-color: var(--proto-line-soft);
}

body.proto-skin.account-body .account-meta-row dt {
  color: var(--proto-faint);
}

body.proto-skin.account-body .account-api-docs {
  color: var(--proto-red-hot);
}

body.proto-skin.account-body .account-api-form input,
body.proto-skin.account-body .account-api-item {
  border-color: var(--proto-line-soft);
  background: var(--proto-panel);
  color: var(--proto-fg);
}

body.proto-skin.account-body .account-api-once {
  border-color: rgba(220, 28, 28, 0.4);
  background: rgba(220, 28, 28, 0.12);
  color: var(--proto-fg);
}

body.proto-skin.account-body .account-btn-primary,
body.proto-skin.account-body .account-api-form .account-btn-primary {
  border: 0;
  background: linear-gradient(180deg, #e22727, #b91414);
  color: #fff;
  box-shadow: 0 8px 22px rgba(180, 16, 16, 0.35);
}

body.proto-skin.account-body .proto-nav-link.is-current {
  color: var(--proto-fg);
  font-weight: 700;
}

html[data-theme="light"] body.proto-skin.account-body .account-card {
  background: #fff;
  border-color: rgba(24, 24, 27, 0.12);
}
