/* VEXAR: интерфейс как окно инвентаря из аметистовой жеоды.
   Панели выпуклые, ячейки вдавленные, всё квадратное и пиксельное. Скругления и свечения не используем. */
[hidden] { display: none !important; }
:root {
  --deep: #17111f;
  --stone: #241c2e;
  --stone2: #2c2338;
  --slot: #1a1323;
  --hi: #3f3252;
  --lo: #0c0812;
  --amethyst: #9a5cf0;
  --amethyst-hi: #c9a2ff;
  --amethyst-lo: #5a2f9e;
  --gold: #f5c451;
  --text: #eee8f6;
  --muted: #a497b6;
  --ok: #6fd39a;
  --bad: #ff6b7f;
  --display: 'Handjet', 'Golos Text', system-ui, sans-serif;
  --body: 'Golos Text', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--deep); }
body {
  margin: 0; color: var(--text); font: 400 15px/1.55 var(--body); min-height: 100vh; overflow-x: hidden;
  background: var(--deep);
  /* мелкая «каменная» крошка вместо градиентов */
  background-image:
    radial-gradient(#221a2c 1px, transparent 1.5px),
    radial-gradient(#1d1626 1px, transparent 1.5px);
  background-size: 22px 22px, 34px 34px;
  background-position: 0 0, 11px 17px;
}
a { color: var(--amethyst-hi); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pad { padding: 20px; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; letter-spacing: .01em; margin: 0; }
h2 { font-size: 34px; }
h3 { font-size: 24px; }

/* выпуклая панель и вдавленная ячейка */
.raised { background: var(--stone); box-shadow: inset 3px 3px 0 var(--hi), inset -3px -3px 0 var(--lo); }
.sunken { background: var(--slot); box-shadow: inset 3px 3px 0 var(--lo), inset -3px -3px 0 var(--hi); }

/* шапка */
.bar {
  max-width: 1200px; margin: 0 auto; padding: 18px 16px 10px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand img { image-rendering: pixelated; }
.brand span { font: 800 38px/1 var(--display); letter-spacing: .08em; }
.servers { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.addr {
  display: flex; align-items: baseline; gap: 10px; border: 0; cursor: pointer; color: var(--text); padding: 9px 14px;
  background: var(--stone); box-shadow: inset 3px 3px 0 var(--hi), inset -3px -3px 0 var(--lo);
}
.addr:active { box-shadow: inset 3px 3px 0 var(--lo), inset -3px -3px 0 var(--hi); }
.addr-label { color: var(--muted); font-size: 13px; }
.addr-ip { font: 700 22px/1 var(--display); letter-spacing: .04em; }
.online { font-size: 13px; color: var(--muted); padding: 0 4px; white-space: nowrap; }
.online:empty { display: none; }
.online b { color: var(--ok); font-weight: 600; }
.online::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 6px; background: var(--ok); vertical-align: 1px; }
.online.off::before { background: var(--muted); }

/* вкладки, прикреплённые к окну */
.tabs { max-width: 1200px; margin: 0 auto; padding: 0 16px; display: flex; gap: 4px; position: relative; z-index: 2; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  flex: none; font: 700 24px/1 var(--display); color: var(--muted); text-decoration: none; padding: 12px 20px 10px;
  background: #1f1828; box-shadow: inset 3px 3px 0 #33293f, inset -3px 0 0 var(--lo); margin-top: 6px;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] {
  color: var(--text); background: var(--stone); margin-top: 0; padding-bottom: 16px; margin-bottom: -3px;
  box-shadow: inset 3px 3px 0 var(--hi), inset -3px 0 0 var(--lo);
}
.window {
  max-width: 1168px; margin: 0 auto; padding: 22px; min-height: 560px;
  background: var(--stone); box-shadow: inset 3px 3px 0 var(--hi), inset -3px -3px 0 var(--lo);
}
@media (min-width: 1200px) { .window { max-width: 1168px; } }
.test-banner { background: #3a2c12; color: var(--gold); padding: 10px 14px; margin-bottom: 18px; font-weight: 600; box-shadow: inset 3px 3px 0 #5a4520, inset -3px -3px 0 #1d1508; }

/* переключатели */
.seg { display: inline-flex; gap: 0; margin-bottom: 18px; }
.seg button {
  border: 0; cursor: pointer; font: 700 20px/1 var(--display); color: var(--muted); padding: 10px 18px;
  background: var(--slot); box-shadow: inset 3px 3px 0 var(--lo), inset -3px -3px 0 var(--hi);
}
.seg button[aria-selected="true"] { color: #fff; background: var(--amethyst-lo); box-shadow: inset 3px 3px 0 var(--amethyst), inset -3px -3px 0 #351a62; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button {
  border: 0; cursor: pointer; font: 600 14px var(--body); color: var(--muted); padding: 8px 12px; background: var(--stone2);
  box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo);
}
.chips button[aria-pressed="true"] { color: var(--deep); background: var(--gold); box-shadow: inset 2px 2px 0 #ffe59a, inset -2px -2px 0 #a07a1e; }

/* магазин */
.shop { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.cat { margin-bottom: 26px; }
.cat h3 { margin-bottom: 4px; }
.cat > p { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.slot {
  display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; padding: 0 0 6px; cursor: pointer; color: var(--text);
  background: none; font: inherit; text-align: center;
}
.slot-box { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; background: var(--slot); box-shadow: inset 3px 3px 0 var(--lo), inset -3px -3px 0 var(--hi); }
.slot-box svg { width: 56%; height: 56%; image-rendering: pixelated; shape-rendering: crispEdges; }
.slot:hover .slot-box { background: #241a31; }
.slot[aria-pressed="true"] .slot-box { background: #2b1d40; box-shadow: inset 0 0 0 3px var(--amethyst-hi), inset 6px 6px 0 var(--lo); }
.slot-tag { position: absolute; top: 6px; left: 6px; font: 700 13px/1 var(--display); color: var(--deep); background: var(--gold); padding: 3px 5px 2px; }
.slot-name { font: 700 19px/1 var(--display); }
.slot-price { font: 700 17px/1 var(--display); color: var(--gold); }

.detail { position: sticky; top: 14px; padding: 20px; background: var(--stone2); box-shadow: inset 3px 3px 0 var(--hi), inset -3px -3px 0 var(--lo); }
.detail-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.detail-icon { width: 76px; height: 76px; flex: none; display: grid; place-items: center; background: var(--slot); box-shadow: inset 3px 3px 0 var(--lo), inset -3px -3px 0 var(--hi); }
.detail-icon svg { width: 48px; height: 48px; image-rendering: pixelated; shape-rendering: crispEdges; }
.detail-icon:empty { display: none; }
.detail h2 { font-size: 34px; }
.detail-price { font: 700 26px/1 var(--display); color: var(--gold); margin: 6px 0 0; }
.detail-price:empty { display: none; }
.detail-short { margin: 0 0 12px; color: var(--muted); }
.detail-perks { list-style: none; padding: 0; margin: 0 0 18px; }
.detail-perks li { padding: 4px 0 4px 18px; position: relative; border-bottom: 1px solid #362b44; }
.detail-perks li::before { content: ''; position: absolute; left: 2px; top: 12px; width: 6px; height: 6px; background: var(--amethyst-hi); }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-weight: 600; margin-bottom: 6px; }
.field em { color: var(--muted); font-style: normal; font-weight: 400; }
.field input, .qty input {
  width: 100%; border: 0; color: var(--text); padding: 12px; font: 500 16px var(--body); outline: none;
  background: var(--slot); box-shadow: inset 3px 3px 0 var(--lo), inset -3px -3px 0 var(--hi);
}
.field input:focus, .qty input:focus { box-shadow: inset 0 0 0 3px var(--amethyst-hi); }
.field input.bad { box-shadow: inset 0 0 0 3px var(--bad); }
.qty { display: flex; gap: 6px; }
.qty input { text-align: center; font: 700 22px var(--display); }
.qty-btn { flex: none; width: 48px; border: 0; cursor: pointer; color: var(--text); font: 700 24px var(--display); background: var(--stone); box-shadow: inset 3px 3px 0 var(--hi), inset -3px -3px 0 var(--lo); }
.qty-btn:active { box-shadow: inset 3px 3px 0 var(--lo), inset -3px -3px 0 var(--hi); }
.presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.presets button { border: 0; cursor: pointer; color: var(--muted); font: 700 16px var(--display); padding: 6px 10px; background: var(--stone); box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo); }
.presets button[aria-pressed="true"] { color: var(--deep); background: var(--gold); box-shadow: inset 2px 2px 0 #ffe59a, inset -2px -2px 0 #a07a1e; }
.err { display: block; color: var(--bad); font-size: 13px; margin-top: 5px; font-weight: 600; }
.err:empty { display: none; }
.agree { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14px; margin: 4px 0 12px; cursor: pointer; }
.agree input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--amethyst); flex: none; }
.btn-pay {
  width: 100%; border: 0; cursor: pointer; color: #fff; font: 800 28px/1 var(--display); padding: 14px 16px 12px; letter-spacing: .02em;
  background: var(--amethyst); box-shadow: inset 4px 4px 0 var(--amethyst-hi), inset -4px -4px 0 var(--amethyst-lo);
}
.btn-pay:hover { background: #a86cf5; }
.btn-pay:active { box-shadow: inset 4px 4px 0 var(--amethyst-lo), inset -4px -4px 0 var(--amethyst-hi); }
.btn-pay:disabled { opacity: .6; cursor: wait; }
.pay-note { color: var(--muted); font-size: 12px; margin: 10px 0 0; }

.recent { margin-top: 8px; }
.recent h3 { font-size: 22px; margin-bottom: 8px; }
.recent ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 18px; font-size: 14px; }
.recent li { color: var(--muted); }
.recent b { color: var(--text); font-weight: 600; }

/* топы */
.top-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; justify-content: space-between; margin-bottom: 6px; }
.top-head .seg { margin-bottom: 12px; }
.top-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.top-grid.solo { grid-template-columns: 1fr; }
.board { background: var(--slot); box-shadow: inset 3px 3px 0 var(--lo), inset -3px -3px 0 var(--hi); padding: 6px 3px; }
.board table { width: 100%; border-collapse: collapse; }
.board th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 8px 14px; }
.board td { padding: 9px 14px; border-top: 1px solid #2a2135; }
.board td.place { width: 56px; font: 700 22px/1 var(--display); color: var(--muted); }
.board tr.p1 td.place { color: var(--gold); }
.board tr.p2 td.place { color: #d6d0e0; }
.board tr.p3 td.place { color: #d99a6c; }
.board td.nick { font-weight: 600; }
.board td.val { text-align: right; font: 700 22px/1 var(--display); color: var(--amethyst-hi); white-space: nowrap; }
.board td.sub { text-align: right; color: var(--muted); font-size: 13px; white-space: nowrap; }
.head { width: 24px; height: 24px; vertical-align: -6px; margin-right: 10px; image-rendering: pixelated; }
.side { padding: 16px; background: var(--stone2); box-shadow: inset 3px 3px 0 var(--hi), inset -3px -3px 0 var(--lo); }
.side h3 { margin-bottom: 10px; }
.feed { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.feed li { padding: 6px 0; border-bottom: 1px solid #362b44; color: var(--muted); }
.feed b { color: var(--text); font-weight: 600; }
.feed .elo { color: var(--ok); }

/* карта */
.map-frame { background: var(--slot); box-shadow: inset 3px 3px 0 var(--lo), inset -3px -3px 0 var(--hi); padding: 3px; height: min(72vh, 720px); }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.map-frame .pad { max-width: 520px; }

/* помощь */
.help { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.help h2 { margin-bottom: 14px; }
.steps { margin: 0 0 14px; padding-left: 26px; }
.steps li { margin-bottom: 10px; padding-left: 4px; }
.steps li::marker { font: 700 22px var(--display); color: var(--gold); }
details { background: var(--stone2); box-shadow: inset 2px 2px 0 var(--hi), inset -2px -2px 0 var(--lo); padding: 0 14px; margin-bottom: 6px; }
summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
details p { color: var(--muted); margin: 0 0 14px; }

/* подвал */
.foot { max-width: 1200px; margin: 0 auto; padding: 22px 16px 40px; display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; font-size: 13px; }
.seller { color: var(--muted); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); }
.foot .small { grid-column: 1 / -1; margin: 0; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 50; padding: 10px 16px; font-weight: 600; background: var(--stone2); box-shadow: inset 3px 3px 0 var(--hi), inset -3px -3px 0 var(--lo); }

/* страница заказа и документы */
.page { max-width: 640px; margin: 0 auto; padding: 0 16px 60px; }
.page .window { padding: 28px; min-height: 0; }
.order-state { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.order-state svg { width: 64px; height: 64px; flex: none; image-rendering: pixelated; shape-rendering: crispEdges; }
.order-state h1 { font-size: 40px; }
.order-meta { margin: 18px 0; }
.order-meta div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #362b44; }
.order-meta span { color: var(--muted); }
.btn-line { display: inline-block; color: var(--text); text-decoration: none; font: 700 22px/1 var(--display); padding: 12px 18px 10px; background: var(--stone2); box-shadow: inset 3px 3px 0 var(--hi), inset -3px -3px 0 var(--lo); }
.doc { max-width: 860px; }
.doc h1 { font-size: 44px; margin-bottom: 10px; }
.doc h2 { font-size: 26px; margin: 26px 0 8px; }
.doc p, .doc li { color: #d9d0e6; }

@media (max-width: 920px) {
  .shop, .top-grid, .help { grid-template-columns: 1fr; }
  .detail { position: static; }
}
@media (max-width: 560px) {
  .window { padding: 14px; }
  .brand span { font-size: 32px; }
  .servers { margin-left: 0; width: 100%; }
  .tabs a { font-size: 20px; padding: 10px 12px 8px; }
  .tabs a[aria-current="page"] { padding-bottom: 14px; }
  .slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .slot-name { font-size: 17px; }
  .board td, .board th { padding: 8px 8px; }
  .board td.sub { display: none; }
  .foot { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.page-top { padding-top: 48px; }
.page-top h1 { font-size: 44px; margin-bottom: 8px; }
.order-sub { margin: 6px 0 0; }
.gap-top { margin-top: 22px; }
.board th.num { text-align: right; }
.bar .bar-note { margin-left: auto; color: var(--muted); }
