:root {
  --bg: #070A12;
  --raise: rgba(22, 28, 48, 0.82);
  --raise-solid: #141A2C;
  --line: rgba(88, 120, 255, 0.22);
  --line-strong: rgba(96, 140, 255, 0.45);
  --text: #F2F5FF;
  --muted: #9AA6C7;
  --faint: #7B87A8;
  --accent: #3D6BFF;
  --accent-2: #5B8CFF;
  --accent-glow: 0 0 0 1px rgba(93, 140, 255, 0.35), 0 0 22px rgba(61, 107, 255, 0.35);
  --ink: #FFFFFF;
  --danger: #FF7B8A;
  --ok: #5DDBA5;
  --sans: "Manrope", "Segoe UI", sans-serif;
  --mono: "Manrope", "Segoe UI", sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: #05070E;
  font-family: var(--sans);
}

body {
  position: relative;
  z-index: 0;
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(ellipse 80% 48% at 50% -18%, rgba(61, 107, 255, 0.28), transparent 60%),
    radial-gradient(ellipse 36% 28% at 100% 8%, rgba(90, 150, 255, 0.12), transparent 62%),
    radial-gradient(ellipse 42% 30% at 0% 90%, rgba(40, 70, 180, 0.16), transparent 66%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 42%, rgba(0, 0, 0, 0.35) 100%);
}

body::after {
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

button, input, select, textarea { font-family: inherit; }

a { color: #b7c0ff; text-decoration: none; }

a:hover { color: #d5dbff; }

h1, h2, .price, .money { font-weight: 700; letter-spacing: -0.02em; }

h1 { font-size: 22px; margin: 0 0 14px; }

h2 { font-size: 16px; margin: 28px 0 10px; }

p { margin: 0 0 12px; }

.wrap {
  width: min(1080px, 100%);
  margin-inline: auto;
  padding-inline: 16px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--accent);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
}

.skip:focus { top: 8px; }

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(7, 10, 18, 0.78);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid rgba(88, 120, 255, 0.16);
}

.top-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.brand svg {
  width: 24px;
  height: 24px;
  fill: var(--accent-2);
  filter: drop-shadow(0 0 10px rgba(91, 140, 255, 0.55));
}

.nav, .account, .subnav, .actions, .foot {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav { justify-content: center; }

.account, .userbox { justify-self: end; }

a.money:hover { color: white; }

.top .nav a,
.top .account a,
.top .money,
.top .brand,
.top .userbox summary,
.top .pop a,
.top .pop button,
.top .btn {
  transition: color 180ms ease, background-color 180ms ease, opacity 180ms ease;
}

.top .nav a:hover,
.top .account > a:hover { color: var(--text); }

.top .brand:hover { opacity: 0.8; }

.top .nav a { position: relative; }

.top .nav a::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(91, 140, 255, 0.8);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.top .nav a:hover::after,
.top .nav a[aria-current="page"]::after { transform: scaleX(1); }

.top .nav a[aria-current="page"] { color: var(--ink); font-weight: 700; }

.top .money {
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.top .userbox summary:hover { background: rgba(255, 255, 255, 0.05); }

.top .userbox details[open] .pop { animation: menu-in 180ms ease; }

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .top .nav a,
  .top .nav a::after,
  .top .account a,
  .top .money,
  .top .brand,
  .top .userbox summary,
  .top .pop,
  .top .pop a,
  .top .pop button,
  .top .btn,
  .listing-row,
  .listing-row .account-side .btn {
    transition: none;
    animation: none;
  }
}

.nav a, .account a, .subnav a, .foot a { color: var(--muted); }

.nav a[aria-current="page"], .subnav a[aria-current="page"] { color: var(--text); }

.center-block {
  width: min(640px, 100%);
  margin: 24px auto 0;
  text-align: center;
}

.history {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: left;
}

.history h2 { margin: 0 0 12px; font-size: 16px; }

.history ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.history li {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  font-size: 14px;
}

.history time { color: var(--muted); white-space: nowrap; }

.history .price { font-size: 14px; font-weight: 700; }

.center-block > .btn,
.center-block > form > .btn { margin-inline: auto; }

.center-block .tags { justify-content: center; }

.center-block .prose { text-align: center; }

.money { color: #d7dcff; font-variant-numeric: tabular-nums; }

.userbox { display: flex; align-items: center; gap: 10px; }

.userbox details { position: relative; }

.userbox summary {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  color: var(--text);
  border-radius: 8px;
  padding: 4px 6px;
  margin: -4px -6px;
}

.userbox summary::-webkit-details-marker { display: none; }

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #3A4B8C, #24315F);
  border: 1px solid rgba(120, 160, 255, 0.45);
  box-shadow: 0 0 12px rgba(61, 107, 255, 0.25);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 210px;
  padding: 6px;
  background: #222636;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  display: grid;
}

.pop a, .pop button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
}

.pop a:hover, .pop button:hover { background: #2c3148; color: white; }

main { padding: 22px 0 48px; }

.foot {
  color: var(--faint);
  font-size: 13px;
  padding-bottom: 22px;
}

.board, .row, .card {
  border: 1px solid var(--line);
  background: var(--raise);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(61, 107, 255, 0.05), 0 18px 50px rgba(0, 0, 0, 0.28);
}

.board { padding: 20px 20px 16px; }

.filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}

label { display: grid; gap: 5px; color: var(--faint); font-size: 12px; }

label.range span, .range span { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }

label.check input { width: auto; }

input, select, textarea {
  width: 100%;
  background: rgba(10, 14, 28, 0.88);
  color: var(--text);
  border: 1px solid rgba(88, 120, 255, 0.18);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font: inherit;
}

textarea { resize: vertical; min-height: 88px; }

input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid rgba(91, 140, 255, 0.75);
  outline-offset: 1px;
  box-shadow: var(--accent-glow);
}

select option { background: #141A2C; }

.board-bar h2 { margin: 0; }

.bar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.modal {
  width: min(420px, calc(100vw - 32px));
  margin: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--raise-solid);
  color: var(--text);
  box-shadow: var(--accent-glow);
}

.modal::backdrop { background: rgba(8, 10, 18, 0.72); }

.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

.modal h2 { margin: 0; font-size: 18px; }

.modal-close {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal label { margin-bottom: 12px; }

.modal .btn { width: 100%; margin-top: 4px; }

#price-facts { display: grid; gap: 14px; margin-top: 4px; }

#price-facts[hidden] { display: none; }

.modal .choice { margin: 0; }

.filter-grid .filter-choice {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  min-width: 0;
  border: 0;
}

.filter-grid .filter-caption {
  display: block;
  margin: 0;
  padding: 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.45;
}

.filter-grid .filter-choice .choice-set {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  height: 38px;
  background: rgba(10, 14, 28, 0.88);
  border: 1px solid rgba(88, 120, 255, 0.18);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.filter-grid .filter-choice .choice-set label { display: flex; min-width: 0; }

.filter-grid .filter-choice .choice-set label + label { box-shadow: inset 1px 0 0 var(--line); }

.filter-grid .filter-choice .choice-set span {
  flex: 1;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  line-height: 1;
}

.filter-grid .filter-choice .choice-set label:hover span { background: #222636; }

.filter-grid .filter-choice .choice-set input:checked + span,
.filter-grid .filter-choice .choice-set label:hover input:checked + span {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: white;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 18px rgba(61, 107, 255, 0.35);
}

.filter-grid .filter-choice .choice-set label:has(input:checked),
.filter-grid .filter-choice .choice-set label:has(input:checked) + label { box-shadow: none; }

.filter-grid input,
.filter-grid select {
  height: 40px;
  padding: 0 12px;
}

.filter-grid select {
  appearance: none;
  padding-right: 28px;
  background-color: rgba(10, 14, 28, 0.88);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.2 6 6.2 11 1.2' fill='none' stroke='%239AA6C7' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 7px;
}

.filter-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.filter-head-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.filter-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(61, 107, 255, 0.12);
  color: var(--accent-2);
  box-shadow: 0 0 18px rgba(61, 107, 255, 0.2);
}

.filter-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.filter-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.filter-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.filter-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(88, 120, 255, 0.14);
}

.filter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-links a,
.filter-links button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  height: 38px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(12, 16, 30, 0.7);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
}

.filter-links a:hover,
.filter-links button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.filter-search,
.board-bar > .btn,
.board-bar > a.btn {
  width: 168px;
  min-width: 168px;
  box-sizing: border-box;
  flex: none;
}

.board-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 16px 0 14px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 22, 40, 0.72);
  backdrop-filter: blur(12px);
}

.board-bar strong {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
}

.board-bar strong::before {
  content: "";
  width: 18px;
  height: 18px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B8CFF' stroke-width='1.8'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Ccircle cx='16.5' cy='9' r='2.5'/%3E%3Cpath d='M3.5 19c.6-2.8 2.8-4.2 5.5-4.2S14 16.2 14.5 19M14 15.2c1.5-.7 3.2-.7 4.8.2.9.5 1.5 1.4 1.8 2.6'/%3E%3C/svg%3E");
}

.saved-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.saved-filters[hidden] { display: none; }

.saved-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #191c2a;
  color: var(--text);
  font-size: 13px;
}

.saved-chip a {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
}

.saved-chip button {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.mass { position: relative; }

.mass[open] { z-index: 12; }

.mass > summary { list-style: none; }

.mass > summary::-webkit-details-marker { display: none; }

.mass-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 12;
  min-width: 190px;
  padding: 6px;
  background: #222636;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  display: grid;
}

.mass:not([open]) .mass-menu { display: none; }

.mass-menu button {
  text-align: left;
  background: none;
  border: 0;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
}

.mass-menu button:hover { background: #2c3148; color: white; }

#mass-note { width: 100%; margin: 0; text-align: right; }

.account-tools {
  position: relative;
  z-index: 8;
  margin: 0 0 12px;
}

.account-tools .account-sum { margin: 0; }

.account-mass {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.mass-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--faint);
  font-size: 12px;
}

.mass-label input {
  width: 112px;
  min-width: 112px;
  margin: 0;
  padding: 8px 10px;
  font-size: 13px;
}

.modal-status { margin: 0; color: var(--text); font-size: 15px; }

.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.modal-actions .btn { width: auto; margin: 0; }

.balance-form,
.adjust-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  align-items: end;
  margin: 8px 0 22px;
}

.adjust-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(110px, 0.7fr) minmax(0, 1.3fr) auto;
  margin: 0;
}

.balance-form .btn,
.adjust-form .btn { height: 38px; white-space: nowrap; }

.tool-form {
  display: grid;
  grid-template-columns: minmax(150px, 200px) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.tool-form.slim { grid-template-columns: minmax(0, 1fr) auto; }

.users-box {
  display: grid;
  gap: 14px;
}

.users-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--raise);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 0 0 1px rgba(61, 107, 255, 0.05), 0 18px 50px rgba(0, 0, 0, 0.28);
}

.users-hero-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.users-hero h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.users-hero .user-search {
  max-width: 320px;
  margin: 0;
}

.users-art {
  width: 72px;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(40, 80, 220, 0.28));
}

.user-search { max-width: 320px; margin: 0 0 14px; }

.tool-form .btn { height: 38px; white-space: nowrap; }

.facts { list-style: none; padding: 0; margin: 0; }

.facts li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 16px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.facts li:first-child { border-top: 0; padding-top: 0; }

.facts time,
.facts li > span:last-child { white-space: nowrap; }

.facts time { color: var(--muted); }

.block .facts { margin-top: 12px; }

.people-count {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.vk-hidden { color: var(--muted); }

.proxy-box { display: grid; gap: 12px; align-content: start; }

.proxy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.proxy-head h2 { margin: 0; }

.proxy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.proxy-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(10, 14, 28, 0.55);
}

.proxy-list li.proxy-empty {
  color: var(--muted);
  justify-content: center;
}

.proxy-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.proxy-meta code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--text);
}

.proxy-status {
  font-size: 12px;
  font-weight: 700;
}

.proxy-status.ok { color: #7ddea3; }
.proxy-status.bad { color: #f0a0a0; }

.proxy-modal { width: min(480px, calc(100vw - 32px)); }

.proxy-modal textarea {
  min-height: 140px;
  resize: vertical;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
}

.proxy-formats {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.proxy-formats strong {
  color: var(--text);
  font-size: 13px;
}

.proxy-formats code {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.proxy-formats p { margin: 6px 0 0; }

.proxy-check {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 160px;
  overflow: auto;
}

.proxy-check li {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 12px;
}

.proxy-check li.ok { border-color: rgba(90, 180, 120, 0.35); }
.proxy-check li.bad { border-color: rgba(220, 100, 100, 0.35); }

.proxy-check code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sell-proxy-note { max-width: 46ch; }

.buy-modal { width: min(480px, calc(100vw - 32px)); }

.buy-live {
  margin: 0 0 14px;
  max-height: 280px;
  overflow: auto;
}

.people {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.people li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 6px 8px 6px 10px;
  background: #191c2a;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.people .person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-weight: 600;
}

.people .avatar {
  width: 28px;
  height: 28px;
  font-size: 13px;
  background: #2c3348;
}

.people .mini-star {
  width: 14px;
  height: 14px;
  flex: none;
  color: #f2c14b;
  fill: currentColor;
}

.people .person-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people form { margin: 0; flex: none; }

.people li.people-empty {
  min-height: 0;
  padding: 2px 0 0;
  background: none;
  border: 0;
  color: var(--muted);
}

.facts form { margin: 0; justify-self: end; }


.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 0;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: white;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(61, 107, 255, 0.28);
}

.btn:hover {
  background: linear-gradient(180deg, #6E9AFF, #4A78FF);
  color: white;
}

a.btn:not(.ghost):not(.danger),
a.btn:not(.ghost):not(.danger):hover { color: white; }

.btn.ghost {
  background: rgba(20, 26, 44, 0.65);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  box-shadow: none;
}

.btn.ghost:hover {
  background: rgba(40, 55, 95, 0.55);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn.danger {
  background: transparent;
  border: 1px solid #5c3d46;
  color: var(--danger);
}

.btn.ignore {
  background: #d24b45;
  border: 1px solid #d24b45;
  color: white;
  font-weight: 700;
}

.btn.ignore:hover { background: #e15c56; color: white; }

.btn.small { height: 30px; padding: 0 10px; font-size: 13px; }

.btn.starred { gap: 6px; }

.btn.starred .star {
  width: 14px;
  height: 14px;
  flex: none;
  color: #f2c14b;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.btn.starred.ghost .star { fill: currentColor; stroke: none; }

.btn:disabled { opacity: 0.55; cursor: default; }
.btn.is-busy {
  opacity: 0.85;
  cursor: default;
  pointer-events: none;
}

.rows { display: grid; gap: 8px; margin-top: 12px; }

.rows[hidden],
#account-empty[hidden],
.board-bar > .btn[hidden] { display: none; }

.row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  color: inherit;
}

.row:hover { border-color: #46507a; }

.listing-row {
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}

.listing-row > .card-open {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.listing-row .account-foot a,
.listing-row .account-side form,
.listing-row .account-side > .btn {
  position: relative;
  z-index: 3;
}

@media (hover: hover) and (pointer: fine) {
  .listing-row:hover {
    transform: translateY(-2px);
    border-color: #55608a;
    background: #252a3d;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  }

  .listing-row .account-side form { pointer-events: none; }

  .listing-row:hover .account-side form,
  .listing-row:focus-within .account-side form { pointer-events: auto; }
}

.row.static:hover { border-color: var(--line); }

.row-main { display: grid; gap: 4px; min-width: 0; flex: 1; color: inherit; }

.row-main strong { font-size: 14px; }

.listing-row { position: relative; align-items: stretch; padding: 14px 16px; }

.listing-row:hover,
.listing-row:focus-within,
.listing-row:has(.more[open]) { z-index: 4; }

.listing-row form { margin: 0; }

.account-main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }

.account-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 16px; }

.account-side .price { font-size: 18px; }

@media (hover: hover) and (pointer: fine) {
  .listing-row .account-side .btn {
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
  }

  .listing-row:hover .account-side .btn,
  .listing-row:focus-within .account-side .btn {
    opacity: 1;
    pointer-events: auto;
  }
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #2a3146;
  color: #d7dced;
  font-size: 13px;
  line-height: 1.2;
}

.chip.warn {
  background: rgba(214, 78, 58, 0.16);
  border-color: #e36b52;
  color: #ff9078;
}

.chip.bad {
  background: rgba(176, 48, 48, 0.18);
  border-color: #d25b5b;
  color: #ffb4b4;
}

.chip.origin-brut {
  background: #5a4214;
  border-color: #f0b429;
  color: #ffd978;
}

.chip.origin-autoreg {
  background: #3a2460;
  border-color: #b07cff;
  color: #e4c8ff;
}

.chip.origin-phish {
  background: #5a1e1e;
  border-color: #ff6b6b;
  color: #ffb4b4;
}

.chip.origin-logs {
  background: #1a3a6e;
  border-color: #5aa0ff;
  color: #c4ddff;
}

.chip.origin-own {
  background: #163a28;
  border-color: #45d88a;
  color: #b0f0cc;
}

.account-tabs { margin-bottom: 14px; }

.account-sum { margin: 0 0 12px; }

.more {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.more[open] { z-index: 6; }

.more > summary {
  pointer-events: auto;
  position: absolute;
  right: 16px;
  bottom: 14px;
  list-style: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #202433;
  color: #c9cedf;
  padding: 0;
}

.more > summary svg {
  width: 15px;
  height: 15px;
  display: block;
}

.more > summary::-webkit-details-marker { display: none; }

.more-menu { display: none; }

.more[open] > .more-menu {
  pointer-events: auto;
  display: grid;
  position: absolute;
  top: calc(100% - 8px);
  right: 16px;
  width: 176px;
  padding: 4px;
  background: #222636;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.more-menu form { margin: 0; }

.more-menu .btn {
  width: 100%;
  height: 28px;
  min-height: 0;
  justify-content: flex-start;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.more-menu .btn:hover { background: #2c3148; color: white; }

.more-menu .btn.danger { color: #ff8d8d; background: transparent; }

.more-menu .btn.danger:hover { background: rgba(214, 78, 58, 0.16); color: #ffb4b4; }

@media (hover: hover) and (pointer: fine) {
  .listing-row .more > summary {
    opacity: 0;
  }

  .listing-row:hover .more > summary,
  .listing-row:focus-within .more > summary,
  .listing-row .more[open] > summary {
    opacity: 1;
    color: white;
    border-color: #5c6588;
  }
}

.listing-row .more .btn {
  opacity: 1;
  pointer-events: auto;
}

.chips-link, .chips-link:hover { color: inherit; }

.lot-chips { margin: 0 0 14px; }

.account-foot { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--muted); font-size: 13px; }

.account-foot .seller { color: var(--text); font-weight: 700; }

.account-foot .seller:hover { color: white; }

.listing-row .pick { align-self: center; }

label.pick { display: flex; align-items: center; gap: 8px; width: auto; color: var(--text); font-size: 14px; }

label.pick input { width: 16px; height: 16px; }

.buy-bar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 12px; }

.price { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 16px; }

.price-lg { font-size: 28px; margin: 6px 0 12px; }

.meta, .hint, .muted, .lead { color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }

.tags i, .tags li {
  font-style: normal;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  color: var(--muted);
  font-size: 12px;
  list-style: none;
}

.tags { list-style: none; padding: 0; margin: 0; }

.empty { color: var(--muted); padding: 18px 0; text-align: center; }

.flash {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--raise);
}

.flash.ok { color: var(--ok); }

.flash.error { color: var(--danger); }

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  display: grid;
  gap: 8px;
  width: min(340px, calc(100% - 32px));
}

.narrow {
  width: min(440px, 100%);
  margin-inline: auto;
  text-align: left;
}

.narrow .form-grid > .btn,
.sell-box > .btn { width: 100%; }

.form-grid { display: grid; gap: 12px; margin: 14px 0; justify-items: stretch; }

.page-head { margin-bottom: 16px; text-align: center; }

.page-head .order-actions { justify-content: center; margin-top: 10px; }

.block,
.sell-box,
.center-block,
.narrow {
  border: 1px solid var(--line);
  background: var(--raise);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(61, 107, 255, 0.05), 0 18px 50px rgba(0, 0, 0, 0.28);
}

.block { padding: 16px 18px; margin: 0 0 14px; }

.sell-box {
  width: min(820px, 100%);
  margin-inline: auto;
  display: grid;
  justify-items: stretch;
  gap: 16px;
  text-align: left;
  padding: 28px 26px;
}

.center-block { padding: 22px 18px 18px; }

.narrow { padding: 18px; }

.form-grid label,
.block,
.block h1,
.block h2 { text-align: left; }

.block h2 { margin: 0 0 12px; }

.block .empty { text-align: center; }

.sell-box h1,
.sell-box .lead,
.sell-box .hint { margin: 0; }

.sell-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.sell-hero-copy {
  display: grid;
  gap: 10px;
}

.sell-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sell-kicker svg {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 12px rgba(91, 140, 255, 0.55));
}

.sell-box h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.sell-box .lead {
  max-width: 46ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.sell-art {
  width: min(180px, 34vw);
  height: auto;
  filter: drop-shadow(0 16px 30px rgba(40, 80, 220, 0.35));
}

.sell-facts {
  display: grid;
  gap: 14px;
}

.sell-box label.sell-price { text-align: left; }

.sell-price-wrap {
  display: grid;
  gap: 6px;
}

.sell-price-field {
  position: relative;
}

.sell-price-field::before {
  content: "₽";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 700;
}

.sell-price-field input { padding-left: 30px; height: 44px; }

.sell-actions { display: grid; gap: 10px; }

.sell-files {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 14, 28, 0.72);
  overflow: hidden;
}

.sell-files-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(88, 120, 255, 0.14);
}

.sell-files-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.sell-files-title svg { width: 16px; height: 16px; color: var(--accent-2); }

.choice {
  border: 0;
  margin: 0;
  padding: 0;
  text-align: left;
}

.choice legend {
  padding: 0;
  margin: 0 0 8px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
}

.choice-set { display: flex; flex-wrap: wrap; gap: 8px; }

.choice-set label {
  display: inline-flex;
  margin: 0;
  cursor: pointer;
}

.choice-set input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice-set span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(88, 120, 255, 0.16);
  background: rgba(20, 28, 48, 0.8);
  color: #d5dbeb;
  font-size: 14px;
  font-weight: 600;
}

.choice.origin-set .choice-set {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.choice.origin-set .choice-set label { width: 100%; }

.choice.origin-set .choice-set span {
  width: 100%;
  justify-content: center;
  min-height: 46px;
}

.choice.origin-set .ico {
  width: 16px;
  height: 16px;
  flex: none;
}

.choice.pair-set .choice-set {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 280px;
  gap: 0;
  border: 1px solid rgba(88, 120, 255, 0.18);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(10, 14, 28, 0.88);
}

.choice.pair-set .choice-set span {
  width: 100%;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.choice-set label:hover span { background: rgba(40, 55, 95, 0.55); }

.choice-set input:checked + span,
.choice.pair-set .choice-set input:checked + span,
.choice.pair-set .choice-set label:hover input:checked + span {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: white;
  border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 18px rgba(61, 107, 255, 0.35);
}

.choice.origin-set .choice-set input:checked + span,
.choice.origin-set .choice-set label:hover input:checked + span {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: white;
  border-color: transparent;
  box-shadow: 0 0 18px rgba(61, 107, 255, 0.35);
}

.choice-set input:focus-visible + span {
  outline: 2px solid white;
  outline-offset: 2px;
}

.check-live {
  list-style: none;
  margin: 0;
  padding: 8px;
  display: grid;
  gap: 6px;
  max-height: 320px;
  overflow: auto;
  text-align: left;
}

.check-live[hidden] { display: none; }

.check-live li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(18, 24, 42, 0.9);
  border: 1px solid rgba(88, 120, 255, 0.1);
}

.check-live .file-ico {
  width: 16px;
  height: 16px;
  color: var(--accent-2);
}

.check-live .name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.check-live .size {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.check-live .state {
  flex: none;
  min-width: 72px;
  max-width: 200px;
  padding: 3px 8px;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.check-live .wait {
  color: var(--muted);
  background: rgba(122, 135, 168, 0.15);
}

.check-live .ok {
  color: #0d3b2a;
  background: #5DDBA5;
}

.check-live .bad {
  color: #4a1018;
  background: #FF7B8A;
}

.check-live .dup {
  color: #3d2f08;
  background: #e6c15a;
}

.check-live .proxy {
  color: #2a2038;
  background: #c4b0ff;
}

.check-live .stopped {
  color: #2a3148;
  background: rgba(122, 135, 168, 0.28);
}

.sell-result {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.sell-result svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
  color: var(--accent-2);
}

@media (max-width: 860px) {
  .choice.origin-set .choice-set { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sell-hero { grid-template-columns: 1fr; }
  .sell-art { display: none; }
  .users-hero { grid-template-columns: 1fr; }
  .users-art { display: none; }
}

@media (max-width: 560px) {
  .choice.origin-set .choice-set { grid-template-columns: 1fr 1fr; }
  .filter-foot { flex-direction: column; align-items: stretch; }
  .filter-search { width: 100%; }
}

label.file-pick {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}

input.file-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
  margin: 0 0 14px;
}

.split > .block,
.split > form.block {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
  min-height: 100%;
}

.split .form-grid {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 0;
  gap: 12px;
}

.split .form-grid > .btn,
.split .proxy-box .proxy-list {
  margin-top: auto;
}

.split .proxy-box > .hint { margin: 0; }

.prose { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 68ch; }

.secret {
  max-width: 100%;
  max-height: 240px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.4;
  white-space: pre;
  tab-size: 4;
  background: #191c2a;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin: 0 0 12px;
}

.order-follow {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0 0 8px;
  text-align: center;
}

.order-follow .hint {
  margin: 0;
  max-width: 52ch;
}

.resell-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: center;
  gap: 10px;
  margin: 6px 0 0;
}

.resell-form label {
  width: min(220px, 100%);
  text-align: left;
}

.resell-form .btn { width: auto; }

.order-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
}

.order-follow .order-actions { margin: 0; }

.order-actions form { margin: 0; display: flex; }

.order-actions .btn,
.order-actions a.btn {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  height: 38px;
  margin: 0;
  padding: 0 14px;
  white-space: nowrap;
  text-decoration: none;
  box-sizing: border-box;
  line-height: 1;
  border: 1px solid transparent;
  box-shadow: none;
}

.order-actions .btn:not(.ghost):not(.danger) {
  border-color: transparent;
}

.order-actions .btn.ghost {
  border-color: var(--line);
}

.center-block .chips,
.center-block .order-actions { justify-content: center; }

.center-block .order-actions {
  margin: 10px 0 14px;
}

.center-block > form[method="post"] {
  margin: 0;
  display: grid;
  justify-items: center;
}

.ledger { list-style: none; padding: 0; margin: 0; }

.ledger li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  column-gap: 16px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.ledger li:first-child { border-top: 0; padding-top: 0; }

.ledger .sum,
.ledger time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ledger time { color: var(--muted); }

.stack { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }

.stack li, .stack article {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.subnav { margin-bottom: 16px; justify-content: center; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 8px 0 18px;
}

.stats > div {
  border: 1px solid var(--line);
  background: #202433;
  border-radius: 12px;
  padding: 14px;
}

.card {
  display: grid;
  gap: 6px;
  padding: 14px;
  color: inherit;
}

.stats span, .card .meta { display: block; color: var(--muted); font-size: 12px; }

.stats strong { display: block; font-size: 22px; margin-top: 2px; }

.lots { width: 100%; border-collapse: collapse; table-layout: fixed; }

.lots th { font-weight: 500; color: var(--muted); font-size: 12px; }

.lots td, .lots th {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  text-align: left;
  overflow-wrap: anywhere;
}

.lots tr:last-child td { border-bottom: 0; }

.lots th.num, .lots td.num { text-align: left; font-variant-numeric: tabular-nums; }

.lots th.lot-actions,
.lots td.lot-actions {
  text-align: right;
  width: 220px;
  overflow-wrap: normal;
  white-space: nowrap;
}

.lot-buttons {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.lot-buttons form { margin: 0; }

.lot-buttons .btn { white-space: nowrap; }

.num { text-align: right; font-variant-numeric: tabular-nums; }

.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 14px; color: var(--muted); }

.spaced { margin-top: 14px; }

.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }

.section-head h1 { margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }

.chips a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
}

.chips a[aria-current="page"] { color: var(--text); border-color: #46507a; }

.account-tabs a[aria-current="page"] {
  background: var(--accent);
  border-color: transparent;
  color: white;
}

.faq { display: grid; gap: 8px; max-width: 680px; }

.faq details { border-top: 1px solid var(--line); padding: 8px 0; }

.faq summary { cursor: pointer; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }

::selection { background: #5b67f1; color: white; }

.fin-top {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.fin-top h1 { margin: 0; }

.fin-tools {
  display: grid;
  grid-template-columns: max-content;
  justify-items: stretch;
  gap: 12px;
}

.fin-balance {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.fin-sep { color: var(--faint); }

.fin-balance strong {
  color: white;
  font-size: 13px;
  font-weight: 600;
}

.fin-actions { display: flex; gap: 8px; }

.panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #202433;
}

.panel[hidden] { display: none; }

.ops-filters {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.4fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.ops-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 16px 0 8px;
}

.ops-bar strong { font-size: 16px; }

.totals { display: flex; gap: 14px; font-variant-numeric: tabular-nums; }

.plus { color: #3dcc7a; }

.minus { color: #ef5d5d; }

.hold { color: #e6b84d; }

.op {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 2px;
  border-top: 1px solid var(--line);
}

.op > span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.op strong { font-weight: 600; }

.op .sum { font-variant-numeric: tabular-nums; white-space: nowrap; }

.op-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin-top: 2px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.op-check:hover {
  background: var(--accent-2);
  color: white;
}

@media (max-width: 860px) {
  .filter-grid, .split, .stats, .ops-filters { grid-template-columns: 1fr 1fr; }
  .adjust-form { grid-template-columns: 1fr 1fr; }
  .adjust-form .btn { grid-column: 1 / -1; justify-self: start; }
  .who { display: none; }
}

@media (max-width: 640px) {
  .filter-grid, .split, .stats, .ops-filters, .tool-form, .tool-form.slim, .adjust-form { grid-template-columns: 1fr; }
  .tool-form .btn, .adjust-form .btn { width: 100%; }
  .order-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .order-actions .btn,
  .order-actions a.btn { width: 100%; }
  .top-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    gap: 8px;
    padding: 10px 0 12px;
  }
  .brand, .account, .userbox { justify-self: center; }
  .userbox summary { justify-content: center; }
  .nav { width: auto; max-width: 100%; justify-content: center; gap: 16px; }
  .ops-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .fin-top { justify-items: center; text-align: center; }
  .fin-tools { justify-self: center; }
  .fin-actions { width: 100%; }
  .fin-actions .btn { flex: 1; }
  .row { align-items: flex-start; }
  .listing-row { flex-wrap: wrap; }
  .account-side { width: 100%; flex-direction: row; align-items: center; }
  .lots { table-layout: auto; }
  .lots thead { display: none; }
  .lots td.lot-actions { width: auto; text-align: left; white-space: normal; }
  .lots td.lot-actions .lot-buttons { margin-left: auto; }
  .lots tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .lots td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 0; }
  .lots td::before { content: attr(data-label); color: var(--muted); }
}

.api-layout {
  --api-top: 72px;
  --api-nav-offset: 0px;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  min-width: 0;
}

main.wrap:has(.api-layout) {
  width: min(1080px, 100%);
}

.api-main {
  min-width: 0;
}

.api-layout section[id] {
  scroll-margin-top: calc(var(--api-top) + var(--api-nav-offset));
}

.api-main > .api-card + .api-group,
.api-main > .api-group + .api-group {
  margin-top: 10px;
  padding-top: 26px;
  border-top: 1px solid rgba(140, 170, 255, 0.35);
}

.api-layout section[id] > h2 { margin-top: 0; }

.api-side {
  position: sticky;
  top: var(--api-top);
  z-index: 12;
  display: grid;
  gap: 2px;
  align-self: start;
  max-height: calc(100vh - var(--api-top) - 16px);
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--raise);
  -webkit-overflow-scrolling: touch;
}

.api-side a {
  color: var(--muted);
  text-decoration: none;
  padding: 7px 8px;
  border-radius: 8px;
}

.api-side a:hover {
  color: var(--ink);
  background: rgba(91, 140, 255, 0.14);
}

.api-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 14px;
  background: var(--raise);
  min-width: 0;
  overflow-wrap: anywhere;
}

.api-call {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.verb {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex: 0 0 auto;
}

.verb.get { color: var(--ok); }
.verb.post { color: #8eb6ff; }
.verb.delete { color: var(--danger); }

.api-path, .api-sample, .api-secret {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.api-path {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.api-sample, .api-secret {
  display: block;
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

p:has(+ .api-sample),
p:has(+ .api-secret) {
  margin-bottom: 0;
}

.api-secret { user-select: all; }

.api-tokens { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.api-tokens li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.api-tokens li > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 960px) {
  .api-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .api-side {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .api-side a {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .api-card { padding: 14px; }
  .api-tokens li { align-items: stretch; }
  .api-tokens form { width: 100%; }
  .api-tokens .btn { width: 100%; }
}

/* —— Админка —— */
.admin-body main.wrap {
  width: min(1120px, 100%);
}

.admin-nav {
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 14px;
  flex-wrap: wrap;
}

.admin-head h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.admin-head .meta { margin: 0; }

.admin-balance {
  margin: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.admin-stats > div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--raise);
}

.admin-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.admin-panel {
  overflow: hidden;
}

.admin-panel > .admin-table,
.admin-panel > .lots {
  margin: 0 -4px;
}

.admin-section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-section-head h2 { margin: 0; }

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin: 0 0 14px;
}

.admin-toolbar.cols-4 {
  grid-template-columns: 100px minmax(120px, 1fr) minmax(140px, 1.2fr) auto;
}

.admin-toolbar input,
.admin-toolbar select {
  width: 100%;
  min-width: 0;
}

.admin-form {
  display: grid;
  gap: 10px;
  margin: 0;
}

.admin-form + .admin-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  color: var(--muted);
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  min-width: 0;
}

.admin-form .btn { justify-self: start; }

.admin-form.cols-2 {
  grid-template-columns: 1fr 1fr;
}

.admin-form.cols-3 {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: end;
}

.admin-form.cols-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  align-items: end;
}

.admin-form.cols-5 .btn,
.admin-form.cols-3 .btn {
  height: 38px;
  align-self: end;
}

.admin-check {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  color: var(--text);
  grid-template-columns: none !important;
}

.admin-check input { width: auto; }

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-grid .span-2 { grid-column: 1 / -1; }

.settings-grid .hint.span-2 {
  margin: -4px 0 4px;
  text-align: left;
}

.settings-grid .btn { grid-column: 1 / -1; }

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.admin-grid.history {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.admin-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.admin-chips { margin-bottom: 14px; }

.admin-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
}

.admin-inline input,
.admin-inline select {
  width: auto;
  min-width: 0;
  max-width: 140px;
  height: 34px;
}

.admin-inline .btn { height: 34px; }

.admin-table td.lot-actions {
  width: 280px;
  text-align: right;
  white-space: normal;
}

.admin-list {
  display: grid;
  gap: 0;
}

.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.admin-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.admin-row > div { min-width: 0; }

.admin-row strong { display: block; margin-bottom: 4px; }

.admin-row .meta,
.admin-row p { margin: 0; }

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}

.admin-row-actions form { margin: 0; }

.spaced-top { margin-top: 12px; }

.admin-tags {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 6px;
}

.admin-tags li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.admin-thread {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 12px;
}

.admin-thread li {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.admin-thread li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.admin-thread-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.admin-thread-head time { color: var(--muted); font-size: 12px; }

.admin-thread .prose { margin: 0; }

.facts.compact li {
  padding: 7px 0;
  font-size: 13px;
}

.warn-panel {
  border-color: rgba(230, 184, 77, 0.45);
  background: rgba(230, 184, 77, 0.08);
}

.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 4px 0;
}

.admin-pager-total {
  text-align: center;
  margin: 6px 0 0;
}

@media (max-width: 960px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-form.cols-5,
  .admin-toolbar.cols-4 {
    grid-template-columns: 1fr 1fr;
  }
  .admin-form.cols-5 .btn,
  .admin-toolbar.cols-4 .btn {
    grid-column: 1 / -1;
  }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .admin-form.cols-2,
  .admin-form.cols-3,
  .admin-form.cols-5,
  .admin-toolbar,
  .admin-toolbar.cols-4 {
    grid-template-columns: 1fr;
  }
  .admin-form .btn,
  .admin-toolbar .btn {
    width: 100%;
    justify-self: stretch;
  }
  .admin-row {
    flex-direction: column;
  }
  .admin-row-actions,
  .admin-inline {
    width: 100%;
    justify-content: stretch;
  }
  .admin-inline input,
  .admin-inline select {
    flex: 1;
    max-width: none;
  }
  .admin-table td.lot-actions {
    width: auto;
    text-align: left;
  }
  .admin-head { flex-direction: column; align-items: flex-start; }
}
