:root {
  --bg: #06070a;
  --panel: #0d1016;
  --panel-2: #11151d;
  --line: rgba(255, 255, 255, 0.065);
  --line-2: rgba(255, 255, 255, 0.11);
  --text: #eef1f7;
  --muted: #8b94a7;
  --dim: #586073;
  --accent: #ff6a2b;
  --accent-2: #ffb02e;
  --cyan: #3ef2ff;
  --gold: #ffd23e;
  --display: "Unbounded", "Segoe UI", sans-serif;
  --sans: "Manrope", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.85, 0.15, 1);
  --header-h: 72px;
}

* { box-sizing: border-box; }
html { scrollbar-color: #262b36 transparent; }
body {
  margin: 0;
  min-height: 100vh;
  font: 500 14px/1.5 var(--sans);
  color: var(--text);
  background:
    radial-gradient(1000px 520px at 88% -8%, rgba(255, 106, 43, 0.16), transparent 62%),
    radial-gradient(900px 640px at -12% 18%, rgba(62, 242, 255, 0.07), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}
body.lock { overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(255, 106, 43, 0.35); }

/* ---------- header ---------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  background: linear-gradient(180deg, rgba(6, 7, 10, 0.88), rgba(6, 7, 10, 0.55));
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.035);
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  display: grid;
  grid-template-columns: repeat(2, 13px);
  gap: 3px;
  transform: rotate(-8deg);
}
.logo-mark i {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 14px rgba(255, 106, 43, 0.5);
}
.logo-mark i:nth-child(2) { opacity: 0.55; }
.logo-mark i:nth-child(3) { opacity: 0.8; }
.logo-mark i:nth-child(4) { background: linear-gradient(135deg, #fff, var(--cyan)); box-shadow: 0 0 14px rgba(62, 242, 255, 0.45); }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b { font: 500 9.5px/1 var(--mono); letter-spacing: 0.34em; color: var(--muted); }
.logo-text i {
  font: 900 19px/1.15 var(--display);
  font-style: normal;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, #fff 30%, #ffc79e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hdr-mid { display: flex; align-items: center; gap: 16px; justify-content: center; min-width: 0; }
.tabs {
  position: relative;
  display: flex;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}
.tab-ind {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ff7d42, #ff5418);
  box-shadow: 0 8px 26px -8px rgba(255, 106, 43, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.45s var(--ease), width 0.45s var(--ease);
}
.tab {
  position: relative;
  z-index: 1;
  height: 36px;
  padding: 0 18px;
  border-radius: 10px;
  font: 700 11px/1 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.tab:hover { color: var(--text); }
.tab.on { color: #170800; }
a.tab.tab-link { text-decoration: none; color: var(--muted); }
a.tab.tab-link:hover { color: var(--text); }
.tab .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  font: 700 9px/1 var(--mono);
  letter-spacing: 0;
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
  pointer-events: none;
}
.tab.on .badge { background: rgba(0, 0, 0, 0.28); color: #170800; }
.tab .badge:empty { display: none; }
.tab:has(.badge:not(:empty)) { padding-right: 22px; }

.search { position: relative; flex: 0 1 380px; min-width: 180px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.search input {
  width: 100%;
  height: 44px;
  padding: 0 44px 0 42px;
  border-radius: 13px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.035);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.search input::placeholder { color: var(--dim); }
.search input:focus {
  border-color: rgba(255, 106, 43, 0.6);
  background: rgba(255, 106, 43, 0.05);
  box-shadow: 0 0 0 4px rgba(255, 106, 43, 0.12);
}
.search kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font: 600 11px/1 var(--mono);
  color: var(--dim);
  padding: 4px 7px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
}

.hdr-right { display: flex; align-items: center; gap: 10px; position: relative; }
.cond-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px 0 12px;
  border-radius: 13px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.2s, background 0.2s;
  max-width: 380px;
}
.cond-btn:hover, .cond-btn.on { border-color: rgba(255, 106, 43, 0.55); background: rgba(255, 106, 43, 0.06); }
.cond-btn .lbl { font: 600 10px/1 var(--mono); letter-spacing: 0.16em; color: var(--accent); text-transform: uppercase; }
.cond-btn .sum { font-weight: 700; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn.spin svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

body.cond-open .hdr { z-index: 60; }

/* ---------- conditions popover ---------- */
.cond-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 400px;
  padding: 20px;
  border-radius: 20px;
  background: rgba(13, 16, 22, 0.97);
  backdrop-filter: blur(24px);
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 106, 43, 0.06);
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.3s var(--ease);
}
.cond-pop.open { opacity: 1; transform: none; pointer-events: auto; }
.cond-pop h5 {
  margin: 0 0 16px;
  font: 700 13px/1 var(--display);
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cond-pop h5 button { font: 600 11px var(--sans); color: var(--muted); }
.cond-pop h5 button:hover { color: var(--accent); }
.cg { margin-bottom: 14px; }
.cg > span { display: block; font: 600 10px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.seg {
  display: flex;
  padding: 3px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}
.seg button {
  flex: 1;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.seg button:hover { color: var(--text); }
.seg button.on {
  color: #170800;
  background: linear-gradient(180deg, #ff7d42, #ff5418);
  box-shadow: 0 6px 18px -6px rgba(255, 106, 43, 0.8);
}
.hp-row { display: flex; gap: 8px; align-items: center; }
.hp-row input {
  width: 100px;
  height: 38px;
  text-align: center;
  font: 700 15px var(--mono);
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.035);
  outline: none;
}
.hp-row input:focus { border-color: rgba(255, 106, 43, 0.6); }
.hp-row .seg { flex: 1; }

.dd {
  position: relative;
  display: block;
  flex: 0 0 210px;
  z-index: 1;
}
.dd.open { z-index: 40; }
.dd-btn {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
  text-align: left;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.dd-btn > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dd-btn::after {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s var(--ease), border-color 0.2s;
}
.dd.open .dd-btn::after {
  transform: translateY(2px) rotate(225deg);
  border-color: var(--accent);
}
.dd-btn:hover,
.dd.open .dd-btn,
.dd-btn:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: rgba(255, 255, 255, 0.055);
}
.dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(340px, 55vh);
  overflow-y: auto;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: #0e1219;
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 106, 43, 0.06);
  scrollbar-width: thin;
  scrollbar-color: #2a3140 transparent;
  animation: ddIn 0.18s var(--ease);
}
.dd-menu[hidden] { display: none; }
@keyframes ddIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.dd-opt {
  width: 100%;
  display: block;
  padding: 9px 12px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 650;
  font-size: 13px;
  text-align: left;
  line-height: 1.25;
}
.dd-opt:hover,
.dd-opt:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}
.dd-opt.on {
  background: rgba(255, 106, 43, 0.14);
  color: #fff;
}

/* ---------- layout ---------- */
main { position: relative; z-index: 1; padding: 0 28px 120px; max-width: 1680px; margin: 0 auto; }
.view { display: none; animation: viewIn 0.5s var(--ease); }
.view.on { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 44px 0 26px;
  flex-wrap: wrap;
}
.eyebrow {
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; box-shadow: 0 0 10px var(--accent); }
.hero h1 {
  margin: 14px 0 0;
  font: 900 clamp(40px, 6vw, 78px)/0.95 var(--display);
  letter-spacing: -0.02em;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.hero h1 sup {
  font: 700 clamp(14px, 1.6vw, 20px)/1 var(--mono);
  color: var(--accent);
  margin-top: 0.4em;
  letter-spacing: 0;
}
.hero p { margin: 12px 0 0; color: var(--muted); max-width: 520px; }
.hero-stats { display: flex; gap: 10px; }
.hs {
  min-width: 120px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}
.hs b { display: block; font: 700 26px/1 var(--display); }
.hs span { font: 600 10px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}
.cmp-capture {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cmp-corner .btn { margin-top: 8px; height: 36px; padding: 0 14px; font-size: 12px; }
.cmp-corner .btn[disabled] { opacity: 0.35; pointer-events: none; }
.btn[disabled] { opacity: 0.35; pointer-events: none; }

.toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 28px 14px;
  margin: 0 -28px 8px;
  background:
    linear-gradient(180deg, rgba(6, 7, 10, 0.98) 0%, rgba(6, 7, 10, 0.94) 100%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.toolbar .chips {
  flex: 1 1 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 10px;
}
.toolbar .dd { flex: 0 0 210px; }
.chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
  padding: 4px 2px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.chip:hover { color: var(--text); background: rgba(255, 255, 255, 0.055); }
.chip .dot { width: 7px; height: 7px; border-radius: 2px; background: var(--c, var(--accent)); box-shadow: 0 0 8px var(--c, var(--accent)); }
.chip em { font: 600 11px var(--mono); font-style: normal; color: var(--dim); }
.chip.on {
  color: #fff;
  border-color: color-mix(in srgb, var(--c, var(--accent)) 45%, transparent);
  background: color-mix(in srgb, var(--c, var(--accent)) 14%, transparent);
  box-shadow: 0 0 28px -10px var(--c, var(--accent));
}
.chip.on em { color: color-mix(in srgb, var(--c, var(--accent)) 70%, #fff); }

.result-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 18px;
  color: var(--muted);
  font-size: 13px;
}
.result-line b { color: var(--text); font-family: var(--mono); }
.result-line button { color: var(--accent); font-weight: 700; font-size: 12.5px; }

/* ---------- cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 16px;
}
.grid-group {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font: 700 13px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.grid-group:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.grid-group .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 12px color-mix(in srgb, var(--c) 55%, transparent);
}
.grid-group b { color: var(--text); letter-spacing: 0.04em; }
.grid-group em {
  font: 600 11px/1 var(--mono);
  color: var(--muted);
  opacity: 0.85;
}
.card {
  position: relative;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  overflow: hidden;
  cursor: pointer;
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
  transition: transform 0.35s var(--ease), border-color 0.3s, box-shadow 0.35s;
  animation: cardIn 0.6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 22ms);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--c) 45%, transparent);
  box-shadow: 0 24px 60px -24px color-mix(in srgb, var(--c) 55%, transparent);
}
.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(110% 85% at 50% 105%, color-mix(in srgb, var(--c) 26%, transparent), transparent 62%),
    linear-gradient(180deg, #0b0d12, #0e1117);
}
.card-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: radial-gradient(ellipse at 50% 80%, #000, transparent 70%);
}
.card-media::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  z-index: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c), transparent);
  opacity: 0.7;
}
.card-media img {
  position: absolute;
  inset: 6px;
  z-index: 3;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.65));
  transition: transform 0.6s var(--ease), opacity 0.18s ease;
}
/* Пока режем прозрачные поля — не показываем «мелкую» версию */
img[data-fit="1"],
img[data-fit="busy"] {
  opacity: 0;
}
img[data-fit="done"] {
  opacity: 1;
}
.card-media .ph { position: relative; max-width: 86%; max-height: 78%; }
.card:hover .card-media img[data-fit="done"] { transform: scale(1.06) rotate(-2deg); }
.type-tag {
  position: absolute;
  z-index: 5;
  top: 11px;
  left: 11px;
  padding: 5px 8px;
  border-radius: 7px;
  font: 700 9.5px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, rgba(0, 0, 0, 0.5));
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
}
.card-add {
  position: absolute;
  z-index: 5;
  top: 9px;
  right: 9px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--line-2);
  color: var(--text);
  font: 700 18px/1 var(--sans);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s, transform 0.25s var(--ease), background 0.2s;
}
.card:hover .card-add, .card-add.on { opacity: 1; transform: none; }
.card-add:hover { background: rgba(255, 255, 255, 0.12); }
.card-add.on { background: var(--c); border-color: transparent; color: #0a0a0a; font-size: 14px; }
.card-body {
  position: relative;
  z-index: 1;
  padding: 13px 15px 15px;
}
.card h3 {
  margin: 0;
  font: 800 15px/1.25 var(--sans);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card .series { margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 13px; }
.mini b { display: block; font: 700 15px/1.1 var(--mono); }
.mini i { font-style: normal; font: 600 9.5px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.mbar { height: 3px; margin-top: 7px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.mbar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 50%, transparent), var(--c)); }

.ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.ph span {
  font: 900 clamp(22px, 3vw, 34px)/1 var(--display);
  letter-spacing: 0.02em;
  color: transparent;
  -webkit-text-stroke: 1.2px color-mix(in srgb, var(--c, #fff) 70%, transparent);
  opacity: 0.8;
}

.skeleton {
  height: 312px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.02) 30%, rgba(255, 255, 255, 0.06) 50%, rgba(255, 255, 255, 0.02) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -150% 0; } }

.empty-state {
  grid-column: 1 / -1;
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-state b { display: block; font: 800 22px/1.2 var(--display); color: var(--text); margin-bottom: 8px; }

/* ---------- screenshot host (copy card) ---------- */
/* shot-card стили для скрина живут в arsenal.js (SHOT_CSS), без color-mix */

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 6, 0.62);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity 0.35s;
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(640px, 100%);
  overflow-y: auto;
  background: linear-gradient(180deg, #0e1118, #08090d 60%);
  border-left: 1px solid var(--line-2);
  box-shadow: -50px 0 120px rgba(0, 0, 0, 0.6);
  transform: translateX(104%);
  transition: transform 0.55s var(--ease);
}
.drawer.open { pointer-events: auto; }
.drawer.open .drawer-scrim { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }

.d-hero {
  position: relative;
  height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(55% 65% at 50% 62%, color-mix(in srgb, var(--c) 34%, transparent), transparent 72%),
    linear-gradient(180deg, #0b0d12, #0e1118);
}
.d-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 50% 60%, #000 10%, transparent 70%);
}
.d-ghost {
  position: absolute;
  inset: auto 0 18px;
  text-align: center;
  font: 900 150px/1 var(--display);
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.07);
  white-space: nowrap;
  user-select: none;
}
.d-hero img {
  position: absolute;
  inset: 20px 24px;
  z-index: 1;
  width: calc(100% - 48px);
  height: calc(100% - 40px);
  object-fit: contain;
  filter: drop-shadow(0 26px 30px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 40px color-mix(in srgb, var(--c) 25%, transparent));
  animation: float 6s ease-in-out infinite;
}
.d-hero .ph { position: relative; height: 160px; }
.d-hero .ph span { font-size: 64px; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-1deg); } }
.d-close {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line-2);
  color: var(--text);
  transition: background 0.2s, transform 0.3s var(--ease);
}
.d-close:hover { background: rgba(255, 255, 255, 0.1); transform: rotate(90deg); }
.d-head { padding: 22px 28px 24px; }
.d-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 5px 9px;
  border-radius: 7px;
  font: 600 10.5px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.025);
}
.tag.c { color: var(--c); border-color: color-mix(in srgb, var(--c) 35%, transparent); background: color-mix(in srgb, var(--c) 10%, transparent); }
.d-head h2 {
  margin: 14px 0 0;
  font: 900 clamp(26px, 4vw, 36px)/1.05 var(--display);
  letter-spacing: -0.01em;
}
.d-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.d-copy { margin-top: 10px; }
.d-copy .btn { width: 100%; justify-content: center; }
.d-actions .btn[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

.btn {
  height: 42px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 800;
  font-size: 13px;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { background: rgba(255, 255, 255, 0.08); }
.btn:active { transform: scale(0.97); }
.btn-accent {
  border-color: transparent;
  color: #170800;
  background: linear-gradient(180deg, #ff7d42, #ff5418);
  box-shadow: 0 12px 30px -12px rgba(255, 106, 43, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-accent:hover { background: linear-gradient(180deg, #ff8b55, #ff5f26); }

.d-sec { padding: 22px 28px; border-top: 1px solid var(--line); }
.d-sec h4 {
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font: 600 10.5px/1 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.d-sec h4::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.d-sec h4 small { font-size: 10px; letter-spacing: 0.06em; text-transform: none; color: var(--dim); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile {
  position: relative;
  padding: 13px 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
  overflow: hidden;
}
.tile .l { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.tile .v { display: block; margin-top: 6px; font: 700 22px/1 var(--display); letter-spacing: -0.01em; }
.tile .v small { font: 600 10px var(--mono); color: var(--dim); margin-left: 5px; letter-spacing: 0.04em; }
.tbar { display: block; height: 3px; margin-top: 12px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.tbar span { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 40%, transparent), var(--c)); box-shadow: 0 0 10px var(--c); }

.kill { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: center; }
.fig { width: 100%; height: auto; overflow: visible; }
.fig rect {
  fill: var(--pc);
  fill-opacity: 0.78;
  stroke: rgba(0, 0, 0, 0.55);
  stroke-width: 1.5;
  rx: 2.5;
  transition: fill-opacity 0.2s, filter 0.2s;
  cursor: default;
}
.fig rect.hl { fill-opacity: 1; filter: drop-shadow(0 0 7px var(--pc)); }
.kp-list { display: grid; gap: 2px; }
.kp {
  display: grid;
  grid-template-columns: 10px 1fr 56px 52px 78px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  transition: background 0.15s;
}
.kp.head-row { padding-top: 0; font: 600 9.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.kp.hl { background: rgba(255, 255, 255, 0.05); }
.kp i { width: 8px; height: 8px; border-radius: 2px; background: var(--pc); box-shadow: 0 0 8px var(--pc); }
.kp span { font-weight: 700; font-size: 13px; }
.kp b, .kp strong, .kp em { text-align: right; font-family: var(--mono); font-style: normal; }
.kp b { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.kp strong { font-size: 16px; color: var(--pc); }
.kp em { font-size: 12px; color: var(--text); }
.kp.head-row b, .kp.head-row strong, .kp.head-row em { font: inherit; color: inherit; }
.cond-line {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(255, 106, 43, 0.06);
  border: 1px dashed rgba(255, 106, 43, 0.3);
  font-size: 12px;
  color: var(--muted);
}
.cond-line button { color: var(--accent); font-weight: 800; font-size: 12px; white-space: nowrap; }

.econ { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.econ .tile .v { font-size: 18px; }

.variants { display: grid; grid-auto-flow: column; grid-auto-columns: 132px; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.var {
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
  overflow: hidden;
  text-align: left;
  transition: border-color 0.2s, transform 0.25s var(--ease);
}
.var:hover { border-color: color-mix(in srgb, var(--c) 50%, transparent); transform: translateY(-3px); }
.var .vm { height: 74px; display: grid; place-items: center; background: radial-gradient(90% 80% at 50% 100%, color-mix(in srgb, var(--c) 20%, transparent), transparent 70%), #0b0d12; }
.var .vm img { width: 88%; height: 82%; object-fit: contain; }
.var .vm .ph { max-width: 84%; max-height: 74%; }
.var .vm .ph span { font-size: 16px; }
.var span { display: block; padding: 8px 10px; font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- compare ---------- */
.cmp-verdict {
  position: relative;
  margin-bottom: 18px;
  padding: 22px 26px;
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(600px 200px at 0% 0%, rgba(255, 106, 43, 0.14), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  overflow: hidden;
}
.cmp-verdict .big { font: 800 clamp(20px, 2.6vw, 30px)/1.15 var(--display); }
.cmp-verdict .big em { font-style: normal; color: var(--lc, var(--accent)); }
.cmp-verdict p { margin: 8px 0 0; color: var(--muted); }
.winbar { display: flex; height: 8px; gap: 3px; margin-top: 16px; border-radius: 4px; overflow: hidden; }
.winbar span { background: var(--sc); box-shadow: 0 0 12px var(--sc); transition: flex 0.6s var(--ease); }
.winlegend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--muted); }
.winlegend b { font-family: var(--mono); color: var(--text); }
.winlegend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--sc); margin-right: 6px; }

.cmp-scroll { overflow-x: auto; padding-bottom: 8px; }
.cmp {
  display: grid;
  --cols: 3;
  grid-template-columns: minmax(170px, 240px) repeat(var(--cols), minmax(210px, 1fr));
  gap: 8px 12px;
  min-width: calc(240px + var(--cols) * 222px);
}
.cmp-corner {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 4px;
  padding: 0 4px 10px;
  font-size: 12px;
  color: var(--muted);
}
.cmp-corner > span { line-height: 1.35; }
.cmp-corner > button:not(.btn) {
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  margin-top: 4px;
}
.slot {
  position: relative;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--sc) 35%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--sc) 8%, transparent), rgba(255, 255, 255, 0.01));
  overflow: hidden;
  cursor: pointer;
}
.slot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--sc); box-shadow: 0 0 18px var(--sc); }
.slot .card-media { aspect-ratio: 16 / 9; }
.slot-body { padding: 12px 15px 15px; }
.slot-body b { display: block; font: 800 15px/1.25 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-body span { font-size: 12px; color: var(--muted); }
.slot-x {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 15px;
}
.slot-x:hover { background: #ff3e6c; border-color: transparent; }
.slot.empty {
  min-height: 230px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1.5px dashed var(--line-2);
  background: rgba(255, 255, 255, 0.012);
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.slot.empty::before { display: none; }
.slot.empty:hover { border-color: var(--sc); color: var(--text); background: color-mix(in srgb, var(--sc) 6%, transparent); }
.slot.empty .plus {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  font: 300 30px/1 var(--sans);
  color: var(--sc);
}
.slot.empty b { font-weight: 800; }

.cmp-group {
  grid-column: 1 / -1;
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font: 600 10.5px/1 var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
.cmp-group::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cmp-label { align-self: stretch; display: flex; align-items: center; padding: 0 4px; font-weight: 700; font-size: 13px; color: var(--muted); }
.cmp-label, .cmp-corner {
  position: sticky;
  left: 0;
  z-index: 6;
  background: linear-gradient(90deg, var(--bg) 88%, rgba(6, 7, 10, 0));
}
.cv {
  position: relative;
  padding: 11px 14px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid transparent;
  transition: background 0.2s;
}
.cv.empty { background: transparent; border: 1px dashed var(--line); }
.cv b { font: 700 16px/1 var(--mono); }
.cv .cbar { height: 4px; margin-top: 9px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.cv .cbar span { display: block; height: 100%; border-radius: 3px; background: color-mix(in srgb, var(--sc) 55%, transparent); transition: width 0.6s var(--ease); }
.cv.win {
  background: color-mix(in srgb, var(--sc) 11%, transparent);
  border-color: color-mix(in srgb, var(--sc) 40%, transparent);
}
.cv.win .cbar span { background: var(--sc); box-shadow: 0 0 10px var(--sc); }
.cv .crown {
  position: absolute;
  top: 10px;
  right: 12px;
  font: 700 9px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sc);
}

/* ---------- top ---------- */
.top-controls { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.top-controls .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.top-controls .row > span { font: 600 10px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); min-width: 90px; }
.top-controls .row .chips { flex: 1; }
.top-controls .seg { flex: 0 1 auto; }
.top-controls .seg button { padding: 0 16px; height: 34px; }

.podium {
  display: grid;
  grid-template-columns: 1fr 1.18fr 1fr;
  gap: 16px;
  align-items: end;
  margin-bottom: 26px;
}
.pod {
  position: relative;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--pc) 35%, var(--line));
  background:
    radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--pc) 16%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008));
  padding: 18px 20px 22px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.pod:hover { transform: translateY(-6px); box-shadow: 0 30px 70px -30px var(--pc); }
.pod.p1 { order: 2; --pc: var(--gold); }
.pod.p2 { order: 1; --pc: #cfd7e6; }
.pod.p3 { order: 3; --pc: #ff9a5a; }
.pod .rank {
  position: absolute;
  top: 6px;
  left: 18px;
  font: 900 92px/1 var(--display);
  color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--pc) 60%, transparent);
  opacity: 0.8;
}
.pod.p1 .rank { -webkit-text-stroke: 0; background: linear-gradient(180deg, #fff3b0, var(--gold) 50%, #b8860b); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 22px rgba(255, 210, 62, 0.45)); }
.pod .pm { height: 170px; display: grid; place-items: center; margin-top: 40px; }
.pod.p1 .pm { height: 210px; }
.pod .pm { position: relative; z-index: 1; }
.pod .pm img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.6)); }
.pod .pm .ph { max-width: 90%; max-height: 90%; }
.pod.p1 .pm img { animation: float 6s ease-in-out infinite; }
.pod .rank { z-index: 2; }
.pod h3, .pod .meta, .pod .val { position: relative; z-index: 2; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85); }
.pod h3 { margin: -18px 0 2px; font: 800 18px/1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod .meta { font-size: 12px; color: var(--muted); }
.pod .val { margin-top: 14px; display: flex; align-items: baseline; gap: 8px; }
.pod .val b { font: 800 30px/1 var(--display); color: var(--pc); }
.pod .val span { font-size: 12px; color: var(--muted); }

.ranklist { display: grid; gap: 8px; }
.top-count {
  padding: 6px 10px 14px;
  font: 600 13px/1.3 var(--sans);
  color: var(--dim);
}
.top-more {
  display: grid;
  place-items: center;
  min-height: 64px;
  margin-top: 8px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  color: var(--dim);
  font: 600 13px/1 var(--sans);
}
.rrow {
  display: grid;
  grid-template-columns: 64px 148px minmax(0, 1fr) 170px minmax(140px, 280px);
  align-items: center;
  gap: 20px;
  padding: 14px 20px;
  border-radius: 18px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.rrow:hover { background: rgba(255, 255, 255, 0.03); border-color: var(--line); }
.rrow .rn { font: 800 22px/1 var(--display); color: var(--dim); text-align: right; }
.rrow .rm {
  height: 84px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(90% 90% at 50% 100%, color-mix(in srgb, var(--c) 20%, transparent), transparent 70%),
    #0b0d12;
  border: 1px solid var(--line);
  overflow: hidden;
}
.rrow .rm img { width: 92%; height: 88%; object-fit: contain; }
.rrow .rm .ph { max-width: 86%; max-height: 80%; }
.rrow .rm .ph span { font-size: 18px; }
.rrow .nm b {
  display: block;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rrow .nm span { font-size: 13px; color: var(--muted); }
.rrow .nm span i { font-style: normal; color: var(--c); }
.rrow .rv { font: 700 22px/1 var(--mono); text-align: right; }
.rrow .rv small { display: block; margin-top: 6px; font-size: 12px; color: var(--dim); font-weight: 500; }
.rrow .rb { height: 8px; border-radius: 5px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.rrow .rb span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 40%, transparent), var(--c)); }

/* ---------- palette ---------- */
.palette {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12vh;
  background: rgba(3, 4, 6, 0.66);
  backdrop-filter: blur(8px);
}
.palette[hidden] { display: none; }
.pal-box {
  width: min(660px, 92vw);
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background: #0d1016;
  box-shadow: 0 50px 140px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 106, 43, 0.08);
  overflow: hidden;
  animation: pop 0.28s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(0.97); } }
.pal-box input {
  height: 64px;
  padding: 0 24px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 18px;
  font-weight: 700;
  outline: none;
}
.pal-box input::placeholder { color: var(--dim); }
.pal-list { overflow-y: auto; padding: 8px; }
.pal-item {
  width: 100%;
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 7px 12px;
  border-radius: 12px;
  text-align: left;
}
.pal-item.act { background: rgba(255, 106, 43, 0.12); }
.pal-item .rm { height: 44px; display: grid; place-items: center; border-radius: 9px; background: #0b0d12; border: 1px solid var(--line); }
.pal-item .rm img, .pal-item .rm .ph { max-width: 86%; max-height: 80%; object-fit: contain; }
.pal-item .rm .ph span { font-size: 12px; }
.pal-item b { display: block; font-weight: 800; }
.pal-item span { font-size: 12px; color: var(--muted); }
.pal-item kbd { font: 600 11px var(--mono); color: var(--dim); }
.pal-empty { padding: 30px; text-align: center; color: var(--muted); }

/* ---------- tray & toast ---------- */
.tray {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--line-2);
  background: rgba(13, 16, 22, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  transform: translate(-50%, 160%);
  transition: transform 0.5s var(--ease);
}
.tray.show { transform: translate(-50%, 0); }
.tray-clear {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 12px;
  margin-right: 2px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.tray-clear:hover {
  color: #fff;
  border-color: rgba(255, 62, 108, 0.45);
  background: rgba(255, 62, 108, 0.12);
}
.tray-items { display: flex; gap: 6px; }
.tray-item {
  position: relative;
  width: 72px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #0b0d12;
  border: 1px solid color-mix(in srgb, var(--sc) 55%, transparent);
}
.tray-item { overflow: hidden; }
.tray-item img { width: 88%; height: 84%; object-fit: contain; }
.tray-item .ph { max-width: 84%; max-height: 80%; }
.tray-item .ph span { font-size: 11px; }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  max-width: 380px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(13, 16, 22, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  font-weight: 700;
  font-size: 13px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.35s var(--ease);
}
.toast.show { opacity: 1; transform: none; }
.toast.err { border-color: rgba(255, 62, 108, 0.5); }

.foot { position: relative; z-index: 1; padding: 30px 28px 40px; text-align: center; font-size: 12px; color: var(--dim); }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .hdr { grid-template-columns: auto 1fr; height: auto; padding: 12px 20px; row-gap: 12px; }
  .hdr-mid { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; }
  .hdr-right { grid-column: 2; grid-row: 1; justify-self: end; }
  .toolbar {
    position: relative;
    top: auto;
    margin: 0 0 8px;
    padding: 12px 0 14px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 0;
    box-shadow: none;
  }
  .cond-pop { position: fixed; top: 80px; right: 16px; }
}
@media (max-width: 760px) {
  main { padding: 0 14px 120px; }
  .hdr-mid { flex-direction: column; align-items: stretch; }
  .tabs { justify-content: space-between; }
  .tab { padding: 0 10px; font-size: 10px; }
  .search { flex: 1 1 auto; }
  .cond-btn .sum { display: none; }
  .hero-stats { display: none; }
  .toolbar { flex-wrap: wrap; }
  .toolbar .chips { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; }
  .toolbar .dd { flex: 1 1 140px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .mini { gap: 6px; }
  .tiles, .econ { grid-template-columns: repeat(2, 1fr); }
  .kill { grid-template-columns: 1fr; }
  .fig { max-width: 130px; margin: 0 auto; }
  .podium { grid-template-columns: 1fr; }
  .pod.p1, .pod.p2, .pod.p3 { order: 0; }
  .rrow { grid-template-columns: 44px 110px minmax(0, 1fr) 110px; gap: 14px; padding: 12px 14px; }
  .rrow .rm { height: 68px; }
  .rrow .nm b { font-size: 16px; }
  .rrow .rv { font-size: 18px; }
  .rrow .rb { display: none; }
  .cond-pop { width: calc(100vw - 32px); }
  .d-ghost { font-size: 100px; }
}
