:root {
  --ink: #eef4fb;
  --muted: #9eb0c7;
  --line: rgba(186, 214, 255, 0.16);
  --glass: rgba(8, 18, 34, 0.62);
  --silver: #d5deea;
  --deep: #071422;
  --tg-pad-top: 0px;
  --tg-pad-bottom: 0px;
  color-scheme: dark;
}

[hidden] { display: none !important; }
.route-pending #market { display: none; }
* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: clip;
}
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  overflow-x: clip;
  color: var(--ink);
  font-family: Manrope, "Segoe UI", sans-serif;
  background: #07111c;
  -webkit-tap-highlight-color: transparent;
}
button, a, input, textarea { touch-action: manipulation; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.wash {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 50% -8%, rgba(37, 99, 235, 0.2), transparent 62%),
    linear-gradient(180deg, #07111e 0%, #081628 46%, #07111c 100%);
}
.flow {
  position: absolute;
  width: 170%;
  height: 170%;
  left: -35%;
  top: -35%;
  will-change: transform;
}
.flow-a {
  background:
    radial-gradient(42% 38% at 24% 18%, rgba(37, 99, 235, 0.62), transparent 70%),
    radial-gradient(34% 32% at 78% 16%, rgba(56, 189, 248, 0.4), transparent 68%),
    radial-gradient(40% 36% at 64% 82%, rgba(99, 102, 241, 0.36), transparent 72%),
    radial-gradient(32% 30% at 16% 74%, rgba(14, 165, 233, 0.3), transparent 70%);
  animation: flow-a 34s ease-in-out infinite alternate;
}
.flow-b {
  background:
    radial-gradient(36% 34% at 72% 34%, rgba(125, 211, 252, 0.34), transparent 70%),
    radial-gradient(42% 38% at 22% 46%, rgba(59, 130, 246, 0.32), transparent 72%),
    radial-gradient(28% 26% at 48% 12%, rgba(196, 181, 253, 0.22), transparent 70%);
  animation: flow-b 26s ease-in-out infinite alternate;
}
.wash::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at 50% 16%, #000 8%, transparent 74%);
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
}
.orb-a { width: 42vw; height: 42vw; left: -10vw; top: -14vw; background: #1d4ed8; opacity: 0.28; }
.orb-b { width: 30vw; height: 30vw; right: -6vw; top: -4vw; background: #38bdf8; opacity: 0.18; }
.orb-c { width: 28vw; height: 28vw; left: 22vw; bottom: -12vw; background: #0ea5e9; opacity: 0.12; }
.orb-d { width: 22vw; height: 22vw; right: 10vw; top: 46vh; background: #818cf8; opacity: 0.1; }
@keyframes flow-a {
  from { transform: translate3d(-3%, -2%, 0) rotate(0deg); }
  to { transform: translate3d(4%, 3%, 0) rotate(10deg); }
}
@keyframes flow-b {
  from { transform: translate3d(3%, 1%, 0) rotate(6deg); opacity: 0.4; }
  to { transform: translate3d(-5%, -3%, 0) rotate(-8deg); opacity: 0.95; }
}

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}
.top, main, .foot { position: relative; z-index: 1; }

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(7, 14, 28, 0.88);
  border-bottom: 1px solid rgba(186, 214, 255, 0.12);
  box-shadow: 0 8px 28px rgba(3, 8, 18, 0.16);
}
.top-inner {
  display: grid;
  grid-template-columns: auto minmax(180px, 460px) auto;
  gap: 18px;
  align-items: center;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  font-family: Montserrat, "Arial Black", "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.045em;
  line-height: 1;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35)) drop-shadow(0 10px 16px rgba(4, 12, 28, 0.45));
}
.brand-zxc, .brand-market {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.brand-zxc {
  background-image: linear-gradient(180deg, #ffffff 0%, #c5e2ff 14%, #5aa2ff 34%, #1f6fe0 60%, #163e86 100%);
}
.brand-market {
  background-image: linear-gradient(180deg, #ffffff 0%, #f4f7fb 18%, #c5ceda 48%, #8d9aab 72%, #eef3f8 100%);
}
.brand:hover { filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35)) drop-shadow(0 0 18px rgba(120, 180, 255, 0.35)); }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}
.search svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  flex: none;
}
.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
}
.search input::placeholder { color: #7f93ab; }
.search:focus-within {
  border-color: rgba(120, 176, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(61, 130, 255, 0.15);
}

.cart-btn, .checkout, .buy, .empty button, .qty button {
  border: 0;
}
.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px 0 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7fbff, #c5d2e4);
  color: #0c1830;
  font-weight: 700;
}
.cart-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cart-btn:hover { filter: brightness(1.05); }
.badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #14315f;
  color: #fff;
  font-size: 12px;
}

.intro { padding: 28px 0 6px; }
.eyebrow {
  margin: 0 0 8px;
  color: #8eb7ee;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 800;
  background: linear-gradient(180deg, #ffffff 10%, #d7e8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.lede {
  margin: 12px 0 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 16px;
}
.cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px 8px 14px;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
}
.cat img, .glyph img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}
.cat[aria-selected="true"] {
  background: linear-gradient(180deg, #f5f8fc, #c9d4e4);
  color: #0c1830;
  border-color: transparent;
}
.count { margin: 0; color: var(--muted); font-size: 14px; white-space: nowrap; }

.market-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding-top: 22px;
}
.market-stage { min-width: 0; }
.market-stage .intro { padding-top: 6px; }
.dock {
  position: sticky;
  top: calc(var(--tg-pad-top) + 97px);
  z-index: 2;
}
.dock-card {
  padding: 16px 14px 10px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(16, 32, 56, 0.96), rgba(8, 18, 34, 0.94));
  border: 1px solid rgba(186, 214, 255, 0.14);
  box-shadow: 0 16px 36px rgba(3, 10, 22, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.dock-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.dock-sumwrap { position: relative; }
.dock-sum {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.dock-sum span { overflow-wrap: anywhere; }
.dock-sum svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.dock-menu { left: 0; right: auto; min-width: 190px; }
.dock-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0 8px;
}
.dock-actions button {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
  min-height: 78px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.dock-act {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: #d5deea;
}
.dock-act svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dock-act.is-plus {
  background: linear-gradient(180deg, #f7fbff, #c5d2e4);
  border: 0;
  color: #0c1830;
  font-size: 28px;
  line-height: 1;
  font-weight: 500;
}
.dock-act.is-send {
  background: linear-gradient(180deg, #e7f1ff, #8eb6f2);
  border: 0;
  color: #10203a;
}
.dock-nav { display: grid; gap: 2px; }
.dock-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  padding: 4px 8px;
  text-align: left;
  font-weight: 700;
}
.dock-nav img {
  width: 36px;
  height: 36px;
  max-width: none;
  object-fit: contain;
  flex: none;
}
.dock-nav button[aria-current="page"] { background: rgba(255, 255, 255, 0.07); }
.dock-backdrop, .dock-grab { display: none; }
.dock-nav .dock-more { display: none; }
.dock-more-ico {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}
.dock-more-ico svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tabbar { display: none; }
@media (hover: hover) and (pointer: fine) {
  .dock-actions button:hover,
  .dock-nav button:hover { background: rgba(255, 255, 255, 0.05); }
}
.library { padding-bottom: 8px; }
.library h1 { margin-bottom: 16px; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.stat, .lib-row, .library-lock {
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(16, 32, 56, 0.96), rgba(8, 18, 34, 0.94));
  border: 1px solid rgba(186, 214, 255, 0.14);
}
.stat { padding: 14px 16px; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 700; }
.stat strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}
.lib-list { display: grid; gap: 10px; }
.lib-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 12px;
  color: inherit;
  text-align: left;
}
button.lib-row { border: 1px solid rgba(186, 214, 255, 0.14); }
.lib-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.lib-open {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
}
.lib-copy { display: grid; gap: 3px; min-width: 0; flex: 1; }
.lib-copy strong { overflow-wrap: anywhere; }
.lib-copy small, .lib-row small { color: var(--muted); font-size: 13px; }
.lib-row > img, .lib-main img {
  width: 36px;
  height: 36px;
  max-width: none;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
}
.lib-row > b { white-space: nowrap; }
.op-plus { color: #8dff9a; font-weight: 800; }
.op-minus { color: #ffb0b0; font-weight: 800; }
.library-lock { padding: 18px; margin-bottom: 12px; }
.library-lock .checkout { margin-top: 12px; }

.filters {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(200px, 280px);
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(16, 32, 56, 0.96), rgba(8, 18, 34, 0.94));
  border: 1px solid rgba(186, 214, 255, 0.14);
  box-shadow: 0 16px 36px rgba(3, 10, 22, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.filter-field, .filter-sort { display: grid; gap: 6px; min-width: 0; }
.filter-field span, .filter-sort > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.filter-field input, .sort-btn {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  padding: 0 12px;
  font-size: 16px;
}
.filter-field input::placeholder { color: #7f93ab; }
.filter-field input:focus, .sort-btn:focus-visible {
  outline: none;
  border-color: rgba(120, 176, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(61, 130, 255, 0.15);
}
.filter-sort { position: relative; }
.sort-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  font-weight: 700;
}
.sort-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
  transition: transform 0.2s ease;
}
.sort-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.sort-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% - 2px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(8, 18, 34, 0.98);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.sort-menu button {
  border: 0;
  background: transparent;
  text-align: left;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
}
.sort-menu button.is-current { background: rgba(90, 160, 255, 0.16); }
@media (hover: hover) and (pointer: fine) {
  .sort-menu button:hover { background: rgba(90, 160, 255, 0.16); }
}

.countries {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.countries[hidden] { display: none; }
.country-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 0 14px;
  white-space: nowrap;
  font-weight: 700;
  font-size: 14px;
  flex: none;
}
.country-chip[aria-selected="true"] {
  background: linear-gradient(180deg, #f5f8fc, #c9d4e4);
  color: #0c1830;
  border-color: transparent;
}
.country-chip .flag-mini {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.type-filter { margin: 0 0 16px; }
.type-filter[hidden] { display: none; }
.type-filter > p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#type-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.type-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  white-space: nowrap;
  min-height: 40px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 0 8px 0 14px;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.type-chip.is-all { padding: 0 14px; }
.type-chip.is-good[aria-selected="true"] {
  background: rgba(52, 199, 89, 0.18);
  border-color: rgba(52, 199, 89, 0.72);
  color: #e7ffee;
}
.type-chip.is-bad[aria-selected="true"] {
  background: rgba(255, 59, 48, 0.16);
  border-color: rgba(255, 59, 48, 0.7);
  color: #ffe8e6;
}
.type-gap { width: 8px; flex: none; }
.traits { display: flex; flex-wrap: wrap; gap: 6px; }
.trait {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 32px;
  padding: 4px 5px 4px 10px;
  border-radius: 11px;
  background: rgba(6, 12, 22, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f4f7fb;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}
.trait > span:first-child { min-width: 0; }
.mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  flex: none;
}
.trait.is-good .mark, .type-chip.is-good .mark { background: #34c759; color: #fff; }
.trait.is-bad .mark, .type-chip.is-bad .mark { background: #ff3b30; color: #fff; }
.mark svg { width: 14px; height: 14px; fill: currentColor; }
.trait.is-bad .mark svg, .type-chip.is-bad .mark svg { transform: rotate(180deg); }
.trait-pop {
  position: fixed;
  z-index: 120;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(18, 8, 10, 0.96);
  border: 1px solid rgba(255, 90, 80, 0.45);
  color: #ffe8e6;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
  pointer-events: none;
}
.category-note {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(90, 160, 255, 0.08);
  border: 1px solid rgba(120, 176, 255, 0.22);
}
.category-note[hidden] { display: none; }
.category-note p:first-child {
  margin: 0 0 4px;
  color: #9ec4ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.category-note p:last-child { margin: 0; white-space: pre-wrap; line-height: 1.45; }
.guide {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
}
.guide-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.guide-text, #acc-instruction { margin: 0; white-space: pre-wrap; line-height: 1.45; }
.pick { display: grid; gap: 8px; }
.pick-label { margin: 4px 0 0; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-row .trait { position: relative; cursor: pointer; }
.pick-row .trait input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.pick-row .trait:has(input:checked) { box-shadow: 0 0 0 2px currentColor; }
.pick-row .trait.is-good:has(input:checked) { color: #e7ffee; box-shadow: 0 0 0 2px #34c759; }
.pick-row .trait.is-bad:has(input:checked) { color: #ffe8e6; box-shadow: 0 0 0 2px #ff3b30; }
.admin-offer {
  margin: 0 0 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}
.admin-offer:first-child { border-top: 1px solid var(--line); padding-top: 14px; }
.admin-offer .admin-row { border: 0; padding: 0; flex-wrap: wrap; }
.admin-actions { display: flex; gap: 8px; flex: none; margin-top: 8px; }
.admin-actions .ghost { height: 40px; padding: 0 12px; white-space: nowrap; }
.admin-edit { display: grid; gap: 8px; margin-top: 10px; }
.admin-edit .pick-row { display: grid; grid-template-columns: 1fr 1fr; }
.admin-edit select, .admin-edit textarea, .admin-edit input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 14px;
  font-size: 16px;
  color: var(--ink);
  color-scheme: dark;
  font-family: inherit;
}
.admin-edit textarea { min-height: 74px; resize: vertical; }
.file-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}
.file-btn input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.price-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
.price-field { position: relative; display: block; min-width: 0; }
.price-field input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  padding: 0 36px 0 14px;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  color: var(--ink);
  color-scheme: dark;
}
.price-field span {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 800;
  pointer-events: none;
}
.price-edit .checkout { width: auto; min-width: 132px; height: 48px; }
.admin-fold { margin: 16px 0; }
.admin-fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(186, 214, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  list-style: none;
}
.admin-fold summary::-webkit-details-marker { display: none; }
.admin-fold summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  flex: none;
}
.admin-fold[open] summary::after { transform: rotate(45deg); }
.admin-fold .admin-form { margin-bottom: 0; }
.card-art.has-flag,
.sheet-art.has-flag,
.card-art.has-brand,
.sheet-art.has-brand {
  height: 176px;
  background:
    radial-gradient(72% 78% at 50% 46%, rgba(132, 178, 255, 0.36), transparent 68%),
    linear-gradient(165deg, #1d4d8c 0%, #14325f 52%, #0b1c36 100%);
}
.card-art.has-brand.is-mullvad,
.sheet-art.has-brand.is-mullvad {
  background:
    radial-gradient(70% 76% at 50% 44%, rgba(255, 196, 70, 0.18), transparent 64%),
    linear-gradient(165deg, #24527e 0%, #163654 52%, #0e2238 100%);
}
.card-art.has-brand.is-mullvad::before,
.sheet-art.has-brand.is-mullvad::before {
  background: radial-gradient(circle at 50% 48%, #f3f6fb 0 62px, rgba(243, 246, 251, 0) 64px);
}
.card-art.has-brand.is-mullvad .brand-hero,
.sheet-art.has-brand.is-mullvad .brand-hero {
  width: 136px;
  height: 136px;
}
.brand-hero,
.flag-hero {
  position: absolute;
  left: 50%;
  top: 48%;
  z-index: 1;
  width: 112px;
  height: 112px;
  transform: translate(-50%, -52%);
  object-fit: contain;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.34));
  pointer-events: none;
  user-select: none;
}
.card-art.has-flag::before,
.sheet-art.has-flag::before,
.card-art.has-brand::before,
.sheet-art.has-brand::before {
  display: block;
  width: auto;
  height: auto;
  right: auto;
  top: auto;
  border-radius: 0;
  inset: 0;
  background: radial-gradient(38% 34% at 50% 44%, rgba(255, 255, 255, 0.18), transparent 72%);
  pointer-events: none;
}
.card-art.has-flag::after,
.sheet-art.has-flag::after,
.card-art.has-brand::after,
.sheet-art.has-brand::after { display: none; }
.brand-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.brand-picks label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 800;
  cursor: pointer;
}
.brand-picks input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.brand-picks label:has(input:checked) {
  border-color: rgba(158, 196, 255, 0.72);
  background: rgba(90, 150, 255, 0.16);
}
.brand-picks img { width: 28px; height: 28px; object-fit: contain; }
.vpn-creds { display: grid; gap: 8px; margin-top: 12px; }
.vpn-creds .phone-copy { margin: 0; }
.cred-k, .cred-hint { color: #9eb6d4; font-size: 12px; font-weight: 700; }
.cred-v {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
  text-align: center;
}
.phone-copy.is-copied .cred-hint { color: #b7f0c8; }
.offer-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #9ec4ff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.flag-inline {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: none;
}
.offer-kind { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.offer-facts {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 8px;
  margin: 0;
}
.offer-facts div {
  min-width: 0;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
}
.offer-facts dt {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.offer-facts dd {
  margin: 1px 0 0;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
}
.offer-facts dd.is-empty { color: var(--muted); }
.offer-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.device-note {
  margin: 0;
  max-width: 42%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
}
.admin-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 16px;
}
.admin-switch .checkout,
.admin-switch .ghost { width: 100%; }
#admin .narrow { max-width: 960px; }
.admin-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.admin-tabs button {
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-weight: 800;
  font-size: 14px;
}
.admin-tabs button[aria-selected="true"] {
  background: linear-gradient(180deg, #f7fbff, #c5d2e4);
  color: #0c1830;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.stat-card {
  min-width: 0;
  padding: 14px 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(186, 214, 255, 0.14);
  background: linear-gradient(180deg, rgba(14, 28, 50, 0.94), rgba(8, 18, 34, 0.92));
}
.stat-card.span-2 { grid-column: span 2; }
.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}
.stat-card.span-2 strong { font-size: 32px; }
.stat-card em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}
.stat-block { margin-top: 14px; }
.stat-block h2 { margin: 0 0 10px; font-size: 18px; }
.source-list, .sale-list { display: grid; gap: 8px; }
.source-row, .sale-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.source-row img {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  object-fit: cover;
}
.source-row strong, .sale-row strong { display: block; overflow-wrap: anywhere; }
.source-row small, .sale-row small { color: var(--muted); font-weight: 700; }
.source-row b, .sale-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sale-row { grid-template-columns: minmax(0, 1fr) auto; }
.goods-bar { display: grid; gap: 10px; margin-bottom: 12px; }
.goods-bar .checkout { width: 100%; }
.admin-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-filters button {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-weight: 800;
  font-size: 14px;
}
.admin-filters button[aria-pressed="true"] {
  background: #f4f7fb;
  color: #0c1830;
  border-color: transparent;
}
#goods-search, #user-search {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font: inherit;
}
.admin-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  margin-bottom: 6px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(90, 160, 255, 0.16);
  color: #cfe3ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.user-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.user-grid .lede, .admin-list .lede { grid-column: 1 / -1; margin: 8px 0; }
button.user-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}
.user-card .person-avatar {
  width: 48px;
  height: 48px;
  font-size: 18px;
}
.user-card strong, .user-card small { display: block; overflow-wrap: anywhere; }
.user-card small { margin-top: 2px; color: var(--muted); font-weight: 700; }
.user-card .is-on { color: #8ee0a8; }
.user-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.user-head .person-avatar { width: 64px; height: 64px; font-size: 24px; }
.user-head h2 { margin: 0; font-size: 24px; overflow-wrap: anywhere; }
.user-head p { margin: 4px 0 0; color: var(--muted); }
.user-back { margin-bottom: 12px; }
.offer-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--silver);
  font-weight: 800;
}
.sheet-art.has-flag,
.sheet-art.has-brand {
  position: relative;
  overflow: hidden;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
  gap: 16px;
}
.card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(16, 32, 56, 0.94), rgba(8, 18, 34, 0.9));
  border: 1px solid rgba(186, 214, 255, 0.14);
  box-shadow: 0 16px 36px rgba(3, 10, 22, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-3px);
    border-color: rgba(160, 204, 255, 0.45);
    box-shadow: 0 20px 40px rgba(8, 24, 48, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
}
.card-art {
  position: relative;
  height: 132px;
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: linear-gradient(145deg, var(--a), var(--b));
  overflow: hidden;
}
.card-art::before {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -30px;
  top: -46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.card-art::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42px;
  background: linear-gradient(180deg, transparent, rgba(5, 12, 24, 0.28));
}
.glyph {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(8, 16, 32, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.22);
  z-index: 1;
}
.glyph svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tag {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(7, 16, 30, 0.35);
  font-size: 12px;
  font-weight: 700;
}
.card-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h2 { margin: 0; font-size: 17px; letter-spacing: -0.03em; line-height: 1.25; }
.term { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.card-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding-top: 6px;
}
.card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.heart {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: #9eb0c7;
  display: grid;
  place-items: center;
  flex: none;
  padding: 0;
}
.heart svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.heart[aria-pressed="true"] {
  color: #8ec5ff;
  background: rgba(80, 150, 255, 0.18);
  border-color: rgba(140, 190, 255, 0.45);
}
.heart[aria-pressed="true"] svg { fill: currentColor; }
.price { font-size: 18px; letter-spacing: -0.03em; white-space: nowrap; }
.buy {
  height: auto;
  min-height: 40px;
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  flex: 0 1 auto;
  min-width: 0;
}
.buy:hover { background: rgba(255, 255, 255, 0.14); }

.empty {
  margin: 28px 0 10px;
  padding: 28px;
  text-align: center;
  border-radius: 20px;
  border: 1px dashed var(--line);
  background: rgba(8, 18, 34, 0.4);
}
.empty p { margin: 0 0 12px; color: var(--muted); }
.empty button, .checkout {
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fbff, #c5d2e4);
  color: #0c1830;
  font-weight: 800;
}

.foot {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding: 28px 0 calc(22px + env(safe-area-inset-bottom, 0px));
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr));
  gap: 28px 32px;
  align-items: start;
}
.foot-brand { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.foot-mark {
  width: 48px;
  height: 48px;
  max-width: none;
  border-radius: 14px;
  flex: none;
}
.foot-name {
  margin: 0;
  font-family: Montserrat, "Arial Black", "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.045em;
  line-height: 1;
}
.foot-tag { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.foot-mail {
  display: inline-block;
  margin-top: 6px;
  color: #d5e6ff;
  font-size: 14px;
  text-decoration: none;
}
.foot-mail:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-col { min-width: 0; }
.foot-col > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.foot-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 10px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.foot-link > span:not(.foot-ico) {
  min-width: 0;
  line-height: 1.25;
}
a.foot-link { border-radius: 12px; }
a.foot-link:focus-visible { outline: 2px solid rgba(120, 176, 255, 0.7); outline-offset: 3px; }
a.foot-doc {
  justify-content: flex-start;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
@media (hover: hover) and (pointer: fine) {
  a.foot-link:hover { color: #fff; }
}
.foot-ico {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}
.foot-ico img { width: 22px; height: 22px; max-width: none; object-fit: contain; }
.foot-ico img.is-round { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(3, 8, 16, 0.55);
  backdrop-filter: blur(4px);
}
.drawer, .sheet {
  position: fixed;
  z-index: 50;
  background: rgba(10, 20, 36, 0.92);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.drawer {
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(400px, calc(100% - 24px));
  border-radius: 22px;
  display: flex;
  flex-direction: column;
}
.drawer-head, .sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}
.drawer-head h2, .sheet h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.sheet-head > div:first-child { flex: 1; min-width: 0; }
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 22px;
  line-height: 1;
}
.drawer-body { flex: 1; overflow: auto; padding: 8px 16px 16px; }
.drawer-foot { padding: 8px 16px 16px; border-top: 1px solid var(--line); }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.total strong { font-size: 22px; }
.checkout { width: 100%; }
.hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.cart-empty { color: var(--muted); margin: 18px 0; }
.line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.line h3 { margin: 0; font-size: 15px; }
.line p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.line-actions { display: flex; align-items: center; gap: 8px; }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}
.remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 0;
}

.sheet {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(480px, calc(100% - 24px));
  max-height: min(92dvh, 100%);
  border-radius: 22px;
  overflow: auto;
}
.sheet-art { height: 160px; background: linear-gradient(145deg, var(--a), var(--b)); }
.sheet-body { padding: 16px 18px 18px; }
.sheet-body .traits { margin-bottom: 10px; }
.sheet .term { margin-top: 6px; }
.sheet .blurb { margin: 12px 0 16px; color: var(--muted); line-height: 1.5; }
.sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-row .checkout { width: auto; min-width: 148px; padding: 0 18px; }

.toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  max-width: calc(100% - 32px);
  transform: translateX(-50%);
  padding: 12px 16px;
  border-radius: 14px;
  background: #f4f7fb;
  color: #0c1830;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.buy-scene {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
}
.buy-veil {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 16, 0.72);
  backdrop-filter: blur(8px);
  animation: fade-in 0.28s ease;
}
.buy-card {
  position: relative;
  width: min(360px, 100%);
  padding: 28px 22px 22px;
  border-radius: 28px;
  text-align: center;
  background: linear-gradient(180deg, rgba(16, 32, 56, 0.98), rgba(8, 18, 34, 0.96));
  border: 1px solid rgba(186, 214, 255, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: dialog-in 0.34s ease;
}
.buy-card h2 {
  margin: 0;
  color: #f4f8ff;
  font-size: 26px;
  letter-spacing: -0.04em;
  background: none;
  -webkit-text-fill-color: #f4f8ff;
}
.buy-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.buy-actions {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 8px;
  margin-top: 18px;
}
.scan, .broke {
  width: 124px;
  height: 124px;
  margin: 0 auto 18px;
  position: relative;
}
.broke { display: grid; place-items: center; }
.scan-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 58%, rgba(140, 196, 255, 0.15) 74%, #d7ecff 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
  animation: scan-spin 1.05s linear infinite;
}
.scan-core {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 38% 32%, #3d86dc, #14386a 72%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 10px 24px rgba(20, 70, 140, 0.35);
}
.scan-core svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.scan-beam {
  position: absolute;
  left: 20px;
  right: 20px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  box-shadow: 0 0 14px #9fd0ff;
  animation: scan-beam 1.35s ease-in-out infinite;
}
.broke-coin {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #3a2508;
  font-size: 38px;
  font-weight: 800;
  background: linear-gradient(160deg, #fff1c2, #f0c15a 42%, #c4842a);
  box-shadow: inset 0 0 0 6px rgba(255, 236, 180, 0.35), 0 14px 26px rgba(150, 80, 10, 0.35);
}
.broke.is-play .broke-coin {
  animation: coin-drop 0.62s cubic-bezier(0.2, 1.35, 0.36, 1) both, coin-shake 0.46s 0.62s ease both;
}
.broke-stamp {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 89px;
  height: 89px;
  margin: -44.5px 0 0 -44.5px;
  border-radius: 50%;
  border: 3px solid #ff5d6c;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
}
.broke-stamp::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  top: 50%;
  height: 3px;
  border-radius: 3px;
  background: #ff5d6c;
  transform: translateY(-50%) rotate(-18deg);
}
.broke.is-play .broke-stamp { animation: stamp-in 0.28s 0.98s ease both; }
.buy-scene.is-broke .buy-card { animation: dialog-in 0.34s ease, card-shake 0.42s 1.05s ease; }
.sent-card { padding-top: 26px; }
.sent-card .eyebrow { margin-bottom: 4px; }
.sent-mark {
  width: 108px;
  height: 108px;
  margin: 0 auto 8px;
  filter: drop-shadow(0 12px 18px rgba(40, 160, 90, 0.28));
}
.sent-scene.is-play .sent-mark { animation: sent-pop 0.46s cubic-bezier(0.2, 1.2, 0.32, 1) both; }
.sent-mark svg { width: 108px; height: 108px; overflow: visible; }
.sent-mark circle {
  fill: rgba(72, 196, 120, 0.12);
  stroke: #6ef0a4;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-dasharray: 189;
  stroke-dashoffset: 189;
  transform-origin: 36px 36px;
  transform: rotate(-90deg);
}
.sent-mark path {
  fill: none;
  stroke: #f4fff8;
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 46;
  stroke-dashoffset: 46;
}
.sent-scene.is-play .sent-mark circle { animation: draw-ring 0.55s 0.08s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.sent-scene.is-play .sent-mark path { animation: draw-check 0.34s 0.48s cubic-bezier(0.2, 0.85, 0.2, 1) forwards; }
.sent-sum {
  margin: 8px 0 0;
  color: #f4f8ff;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
}
.sent-scene.is-play .sent-sum { animation: rise 0.4s 0.28s ease both; }
.sent-who {
  margin: 8px 0 0;
  color: #d7e6ff;
  font-size: 16px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.sent-scene.is-play .sent-who { animation: rise 0.4s 0.38s ease both; }
.sent-left {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(186, 214, 255, 0.12);
  color: var(--muted);
  font-weight: 700;
}
.sent-left strong {
  color: #f4f8ff;
  font-size: 18px;
  letter-spacing: -0.03em;
}
.sent-scene.is-play .sent-left { animation: rise 0.4s 0.48s ease both; }
.sent-card .checkout { width: 100%; margin-top: 16px; }
@keyframes draw-ring { to { stroke-dashoffset: 0; } }
@keyframes draw-check { to { stroke-dashoffset: 0; } }
@keyframes sent-pop {
  0% { transform: scale(0.62); opacity: 0; }
  70% { transform: scale(1.06); opacity: 1; }
  100% { transform: none; opacity: 1; }
}

@keyframes scan-spin { to { transform: rotate(360deg); } }
@keyframes scan-beam {
  0% { top: 24px; opacity: 0.15; }
  45% { opacity: 1; }
  100% { top: 98px; opacity: 0.15; }
}
@keyframes coin-drop {
  0% { transform: translateY(-36px) scale(0.72); opacity: 0; }
  70% { transform: translateY(5px) scale(1.06); opacity: 1; }
  100% { transform: none; opacity: 1; }
}
@keyframes coin-shake {
  0%, 100% { transform: rotate(0); }
  30% { transform: rotate(-9deg); }
  60% { transform: rotate(8deg); }
  80% { transform: rotate(-3deg); }
}
@keyframes stamp-in {
  from { opacity: 0; transform: scale(1.35); }
  to { opacity: 1; transform: none; }
}
@keyframes card-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

:focus-visible {
  outline: 2px solid #8ebfff;
  outline-offset: 2px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.admin-btn { flex: none; white-space: nowrap; padding: 0 14px; }
.admin-short { display: none; }
.admin-form { display: grid; gap: 8px; margin: 16px 0; }
.admin-form h2 { margin: 4px 0 6px; font-size: 20px; }
.admin-form input, .admin-form textarea, .admin-form select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 14px;
  font-size: 16px;
  color: var(--ink);
  color-scheme: dark;
}
.admin-form textarea { min-height: 110px; resize: vertical; font-family: inherit; }
#stock-files { padding: 10px; }
button:disabled { opacity: 0.55; cursor: default; }
.code-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.code-row strong { font-size: 28px; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.code-row span { color: var(--muted); font-size: 14px; }
#goods-info .traits { margin: 10px 0 0; justify-content: center; }
#goods-info h2, #goods-codes h2, #goods-help h2 { text-align: center; }
.admin-list { display: grid; }
.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.admin-row:first-child { border-top: 0; padding-top: 0; }
.admin-row p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.admin-row strong { overflow-wrap: anywhere; }
.account-slot { position: relative; }
.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 12px 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.account-btn.has-user { padding-left: 6px; }
.account-btn[aria-expanded="true"] { border-color: rgba(160, 204, 255, 0.55); background: rgba(40, 120, 220, 0.12); }
#account-label {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-balance {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: #d7e4f4;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.account-chev {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.75;
  transition: transform 0.2s ease;
}
.account-btn[aria-expanded="true"] .account-chev { transform: rotate(180deg); }
.account-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  right: 0;
  min-width: 188px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(10, 20, 38, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
  transform-origin: top right;
  animation: menu-in 0.22s cubic-bezier(.2, .8, .2, 1);
}
.account-menu.is-leaving { animation: menu-out 0.16s ease forwards; }
.account-menu button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 11px 12px;
  border-radius: 12px;
  font-weight: 700;
}
.account-menu button:hover { background: rgba(90, 160, 255, 0.16); }
.mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
  font-size: 13px;
  font-weight: 800;
  color: #0c1830;
  background: linear-gradient(180deg, #f7fbff, #c5d2e4);
}
.mini-avatar img, .hero-avatar img, .person-avatar img { width: 100%; height: 100%; object-fit: cover; animation: fade-in 0.22s ease; }
.account-btn:hover, .account-btn[aria-current="page"] { border-color: rgba(160, 204, 255, 0.55); }
.view-focus .search { visibility: hidden; }

.account { padding: 28px 0 12px; }
.account-card {
  max-width: 560px;
  margin-top: 8px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(14, 28, 50, 0.94), rgba(8, 18, 34, 0.92));
  border: 1px solid rgba(186, 214, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.account-card h1 { font-size: 36px; }
.account-card .lede { margin-bottom: 18px; }
a.checkout { display: inline-flex; align-items: center; justify-content: center; }
.link-btn { width: 100%; margin-bottom: 8px; text-decoration: none; }
.link-btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
#code-form { display: grid; gap: 8px; margin-top: 16px; }
#code-form label { font-size: 14px; color: var(--muted); }
#code {
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  padding: 0 14px;
  letter-spacing: 0.14em;
  font-weight: 800;
  text-transform: uppercase;
}
#code:focus { outline: none; border-color: rgba(120, 176, 255, 0.55); box-shadow: 0 0 0 4px rgba(61, 130, 255, 0.15); }
.form-error { margin: 0; color: #ffb4b4; font-size: 14px; }
.form-error.is-ok { color: var(--silver); }
.profile-head { display: flex; align-items: center; justify-content: center; gap: 16px; text-align: left; }
.profile-head h1 { font-size: 32px; }
.avatar {
  width: 72px;
  height: 72px;
  flex: none;
  border-radius: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 800;
  font-size: 26px;
  color: #0c1830;
  background: linear-gradient(180deg, #f7fbff, #c5d2e4);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.facts { margin: 18px 0; }
.goods-dialog {
  width: min(520px, 100%);
  text-align: left;
}
#goods-info, #goods-codes, #goods-help {
  max-height: min(92dvh, 100%);
  overflow: auto;
}
#goods-info {
  padding: 16px 16px 14px;
}
#goods-info h2 {
  margin: 0 28px 6px;
  font-size: 22px;
}
#goods-info .traits { margin: 0 0 8px; }
#goods-info .phone-copy {
  gap: 1px;
  margin: 8px 0 4px;
  padding: 8px 12px 7px;
  border-radius: 16px;
}
#goods-info #acc-phone-num,
#goods-info #acc-key-value {
  font-size: 22px;
  line-height: 1.15;
}
#goods-info .acc-note {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.35;
}
#goods-info .acc-place { margin: 6px 0 0; font-size: 14px; }
#goods-info .goods-facts {
  gap: 6px;
  margin: 8px 0;
}
#goods-info .goods-facts .fact {
  gap: 1px;
  padding: 6px 10px;
  border-radius: 12px;
}
#goods-info .goods-facts .fact span { font-size: 11px; }
#goods-info .goods-facts .fact strong { font-size: 14px; }
#goods-info .guide {
  margin: 0 0 10px;
  padding: 8px 10px;
}
#goods-info .guide-label { margin-bottom: 2px; font-size: 11px; }
#goods-info #acc-instruction { font-size: 13px; line-height: 1.35; }
.goods-actions {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 8px;
}
.goods-actions:has(#acc-code[hidden]) { grid-template-columns: 1fr; }
.goods-actions .checkout,
.goods-actions .ghost {
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  font-size: 14px;
  white-space: nowrap;
}
#goods-help { width: min(400px, 100%); text-align: center; }
#goods-help h2 { text-align: center; }
#goods-help .auth-lead { margin-bottom: 14px; }
a.support-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
}
a.support-row > span:last-child { min-width: 0; line-height: 1.25; }
.phone-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin: 16px 0 10px;
  padding: 18px 16px 14px;
  border-radius: 20px;
  border: 1px solid rgba(140, 186, 255, 0.32);
  background:
    radial-gradient(90% 90% at 50% 0%, rgba(90, 150, 255, 0.24), transparent 68%),
    rgba(8, 18, 36, 0.55);
  color: inherit;
  font: inherit;
}
.phone-copy:disabled { opacity: 0.72; }
#acc-phone-num {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
  text-align: center;
}
#acc-phone-hint {
  color: #9eb6d4;
  font-size: 12px;
  font-weight: 700;
}
.phone-copy.is-copied #acc-phone-hint { color: #b7f0c8; }
.acc-place {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 4px;
  font-weight: 800;
}
.acc-note {
  margin: 12px 0 0;
  color: var(--muted);
  text-align: center;
  line-height: 1.45;
}
.goods-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0;
}
.goods-facts .fact {
  display: grid;
  gap: 3px;
  justify-content: start;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}
.goods-facts .fact strong { text-align: left; font-size: 16px; }
.goods-facts .fact-wide { grid-column: 1 / -1; }
#goods-info .checkout { width: 100%; }
.code-row.is-copy { cursor: pointer; border-radius: 12px; padding: 12px 10px; }
.code-row.is-copied strong { color: #b7f0c8; }
.fact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.fact span { color: var(--muted); }
.fact strong { text-align: right; overflow-wrap: anywhere; min-width: 0; }
.ghost {
  height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  font-weight: 700;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.ghost:hover { background: rgba(255, 255, 255, 0.06); }

.auth-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 16px;
  overflow: auto;
}
.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 16, 0.62);
  backdrop-filter: blur(10px);
  animation: fade-in 0.35s ease;
}
.auth-backdrop.is-leaving { animation: fade-out 0.28s ease forwards; }
.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  max-width: 100%;
  min-width: 0;
  margin: auto;
  padding: 28px 24px 24px;
  text-align: center;
  border-radius: 26px;
  background: rgba(10, 20, 38, 0.94);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  animation: dialog-in 0.46s cubic-bezier(.2, .8, .2, 1);
}
.auth-dialog.goods-dialog { width: min(520px, 100%); }
.offer-dialog { width: min(480px, 100%); text-align: left; }
.offer-dialog .eyebrow, .offer-dialog > h2, .offer-dialog .auth-lead, .offer-dialog .tg-hero { text-align: center; }
.offer-dialog .tg-hero { margin-left: auto; margin-right: auto; }
.offer-dialog .admin-form { margin: 0; }
.offer-nav { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 8px; }
#acc-key { margin-top: 8px; }
#acc-key-value { overflow-wrap: anywhere; }
.auth-dialog.is-leaving { animation: dialog-out 0.26s ease forwards; }
.auth-dialog.is-shaking { animation: shake 0.32s ease; }
.auth-dialog h2 {
  margin: 0 0 8px;
  font-size: 30px;
  letter-spacing: -0.04em;
}
.auth-lead { margin: 0 0 18px; color: var(--muted); }
.auth-x { position: absolute; top: 14px; right: 14px; }
.tg-choice {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 72px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 18px;
  font-weight: 800;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.tg-choice img, .tg-hero {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.pay-methods { display: grid; gap: 10px; }
.pay-soon { font-size: 12px; font-weight: 700; color: var(--muted); }
.buy-pay { width: min(420px, 100%); text-align: left; }
.buy-pay .eyebrow, .buy-pay > h2, .buy-pay-sum { text-align: center; }
.buy-pay > h2 { font-size: 24px; margin-bottom: 4px; }
.buy-pay-sum {
  margin: 0 0 14px;
  color: var(--silver);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.pay-list { display: grid; gap: 8px; }
.method-row {
  width: 100%;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 10px;
  align-items: center;
  column-gap: 12px;
  min-height: 58px;
  padding: 8px 14px 8px 8px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.method-row::after {
  content: "";
  width: 7px;
  height: 7px;
  justify-self: end;
  border-top: 2px solid rgba(214, 226, 245, 0.55);
  border-right: 2px solid rgba(214, 226, 245, 0.55);
  transform: rotate(45deg);
}
.method-row:hover { border-color: rgba(90, 176, 255, 0.55); background: rgba(40, 120, 220, 0.12); }
.method-row:disabled { opacity: 0.45; }
.pay-badge {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.pay-badge img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 0;
}
.pay-badge img.is-round {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
#buy-balance .pay-badge {
  background: linear-gradient(180deg, #1f5a3e, #123022);
  border-color: rgba(160, 230, 186, 0.22);
}
.pay-mark {
  color: #d7f8e2;
  font-weight: 800;
  font-size: 20px;
  line-height: 1;
}
.pay-name, .pay-copy strong {
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.pay-copy { display: grid; gap: 2px; min-width: 0; }
.pay-copy small {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.buy-pay .asset-row { margin-bottom: 12px; }
.buy-pay .form-error { margin: 10px 0 0; }
@media (max-width: 760px) {
  .buy-pay { padding: 20px 14px 14px; }
  .buy-pay > h2 { font-size: 22px; }
  .method-row { min-height: 54px; padding-right: 12px; }
  .pay-name, .pay-copy strong { font-size: 15px; }
}
.tg-choice img.pay-ico, img.pay-ico {
  border-radius: 14px;
  background: transparent;
}
.asset-row { display: flex; flex-wrap: wrap; gap: 8px; }
.asset-row button {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  font-weight: 800;
}
.asset-row button.is-on { box-shadow: 0 0 0 2px #5aa0ff; }
#crypto-form, #rub-form { display: grid; gap: 10px; }
#crypto-form label, #rub-form label { color: var(--muted); font-size: 14px; }
#crypto-amount, #rub-amount {
  width: 100%;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 28px;
  font-weight: 800;
}
#crypto-preview, #wait-sum { margin: 0; color: var(--silver); }
#pay-wait #wait-hero { border-radius: 50%; }
#pay-wait #pay-link { margin-top: 28px; margin-bottom: 0; }
#pay-check { width: 100%; margin-top: 10px; }
#pay-wait .hint { margin-top: 14px; }
.tg-choice:hover { transform: translateY(-2px); border-color: rgba(90, 176, 255, 0.55); background: rgba(40, 120, 220, 0.12); }
.tg-hero {
  width: 88px;
  height: 88px;
  margin: 4px auto 16px;
  display: block;
  animation: floaty 3.2s ease-in-out infinite;
}
#auth-open .link-btn, #auth-code .checkout { width: 100%; margin-top: 8px; }
#auth-code #code-form { margin-top: 8px; }
#auth-code #code { text-align: center; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes dialog-out {
  to { opacity: 0; transform: translateY(12px) scale(0.98); }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: none; }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

@media (max-width: 760px) {
  .top-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand actions" "search search";
    padding: 12px 0;
    gap: 10px;
  }
  .brand { grid-area: brand; font-size: 24px; }
  .actions { grid-area: actions; }
  .account-btn { padding: 0 8px; }
  #account-label { max-width: 72px; }
  .header-balance { font-size: 12px; padding-left: 8px; }
  .search { grid-area: search; }
  .view-focus .search { display: none; }
  .place-grid { grid-template-columns: 1fr; }
  .balance-sum { font-size: 32px; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .count { display: none; }
}

.place { padding: 8px 0 28px; }
html.route-pending #account { display: block !important; }
html.tg-desktop body {
  padding-top: var(--tg-pad-top);
  padding-bottom: var(--tg-pad-bottom);
}
html.tg-desktop .top { top: var(--tg-pad-top); }
html.tg-desktop .auth-layer,
html.tg-desktop .backdrop {
  top: var(--tg-pad-top);
  bottom: var(--tg-pad-bottom);
}
html.tg-desktop .drawer {
  top: calc(12px + var(--tg-pad-top));
  bottom: calc(12px + var(--tg-pad-bottom));
}
html.tg-desktop .toast { bottom: calc(22px + var(--tg-pad-bottom)); }
.place-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.side-card, .main-card {
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(14, 28, 50, 0.94), rgba(8, 18, 34, 0.92));
  border: 1px solid rgba(186, 214, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.side-card { text-align: center; }
.side-card h1, .main-card h1 { margin: 10px 0 0; font-size: 28px; overflow-wrap: anywhere; }
.rank { margin: 6px 0 14px; color: var(--muted); }
.wide { width: 100%; }
.side-card .wide + .wide, .side-card .wide { margin-top: 8px; }
.narrow { max-width: 520px; margin: 28px auto; }
.hero-avatar, .person-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  font-weight: 800;
  color: #143024;
  background: linear-gradient(180deg, #e9fff0, #7dcea0);
}
.hero-avatar {
  width: 112px;
  height: 112px;
  margin: 0 auto;
  font-size: 36px;
  animation: pop 0.45s cubic-bezier(.2, .8, .2, 1);
}
.hero-avatar img, .person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.block-title { margin: 22px 0 10px; font-size: 16px; text-align: left; }
.people { display: grid; gap: 8px; max-height: 420px; overflow: auto; text-align: left; }
.person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  animation: person-in 0.45s cubic-bezier(.2, .8, .2, 1) both;
}
.person-avatar { width: 46px; height: 46px; flex: none; font-size: 16px; }
.person strong, .person small { display: block; }
.person strong { overflow-wrap: anywhere; }
.person small { margin-top: 2px; color: var(--muted); font-size: 13px; }
.main-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.main-head h2 { margin: 0; font-size: 30px; text-align: left; overflow-wrap: anywhere; }
.presence { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 0; font-weight: 800; flex: none; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.on { background: #3ddc84; box-shadow: 0 0 10px #3ddc84; animation: pulse 2s ease-in-out infinite; }
.dot.off { background: #ff5d5d; box-shadow: 0 0 8px rgba(255, 93, 93, 0.65); }
.fact button {
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 800;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.balance-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.balance-sum {
  margin: 0;
  min-height: 1.15em;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.currency { position: relative; }
.currency-btn { display: inline-flex; align-items: center; gap: 6px; }
.currency-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.currency-menu {
  position: absolute;
  z-index: 4;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  display: grid;
  gap: 4px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(8, 18, 34, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  animation: dialog-in 0.28s ease;
}
.currency-menu button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
}
.currency-menu button.is-current, .currency-menu button:hover { background: rgba(90, 160, 255, 0.16); }
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.promo-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 8px;
  margin-top: 12px;
}
.promo-box input {
  width: 100%;
  min-width: 0;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  padding: 0 14px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.promo-box input::placeholder { letter-spacing: 0; text-transform: none; font-weight: 700; color: var(--silver); }
.promo-box .checkout { width: 100%; min-width: 0; padding: 0 8px; }
.promo-box .form-error, .promo-box .promo-ok { grid-column: 1 / -1; margin: 0; }
.promo-ok { color: #8ee7b0; font-weight: 700; }
.promo-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.promo-list { display: grid; gap: 10px; }
.promo-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}
.promo-card.is-off { opacity: 0.58; }
.promo-head, .promo-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.promo-head strong { font-size: 18px; letter-spacing: 0.08em; }
.promo-head span { color: #8ee7b0; font-weight: 800; }
.promo-meta { margin: 0; color: var(--silver); font-weight: 700; font-size: 14px; }
.promo-card .hint { margin: 0; }
.promo-card .ghost { width: 100%; }
.pay-row .ghost, .pay-row .checkout, .pay-row .pay-send { width: 100%; }
.pay-send {
  min-height: 42px;
  border: 1px solid rgba(158, 196, 255, 0.45);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(120, 168, 255, 0.28), rgba(36, 78, 150, 0.22));
  color: #e8f1ff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.pay-send svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#transfer-peer.is-found { color: #d5e6ff; }
#transfer-peer.is-bad { color: #ffb4b4; }
.ledger-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.ledger-row small { grid-column: 1 / -1; color: var(--muted); }
.choice-stack { display: grid; gap: 10px; }
.done-stars { margin: 10px 0 0; font-size: 28px; font-weight: 800; }
.done-rub { margin: 4px 0 16px; color: var(--silver); font-size: 18px; }
#pay-done .checkout { width: 100%; }
#pay-amount { padding-top: 22px; }
#pay-amount .tg-hero { width: 72px; height: 72px; margin: 6px auto 10px; }
#pay-amount h2 { margin-bottom: 14px; }
#stars-form { display: grid; gap: 12px; min-width: 0; }
#stars-form .checkout, #stars-form .link-btn { width: 100%; margin: 0; }
#stars-input {
  width: 100%;
  min-width: 0;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
#stars-input:focus { outline: none; border-color: rgba(120, 176, 255, 0.55); box-shadow: 0 0 0 4px rgba(61, 130, 255, 0.15); }
#stars-preview { margin: 0; min-height: 24px; color: var(--silver); font-size: 16px; }
#choose-stars img, #pay-open .tg-hero, #pay-wait .tg-hero {
  border-radius: 0;
  object-fit: contain;
  background: transparent;
}
#pay-open .tg-hero, #pay-wait .tg-hero { width: 104px; height: 104px; }
.align-left { text-align: left; }
.align-left h2 { text-align: center; }
#edit-form { display: grid; gap: 8px; margin-top: 8px; }
#edit-form label { color: var(--muted); font-size: 14px; }
#nick-input {
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  padding: 0 14px;
}
#avatar-input { font-size: 14px; }
#edit-form .wide { margin: 4px 0; }

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
@keyframes menu-out {
  to { opacity: 0; transform: translateY(-6px); }
}
@keyframes person-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.82); opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .intro, .account, .place, .person, .auth-dialog, .auth-backdrop, .mini-avatar img, .tg-hero, .hero-avatar, .balance-sum, .dot, .currency-menu, .sort-menu, .account-menu, .account-chev, .flow, .sort-btn svg, .dock-card, .dock-backdrop, .scan-ring, .scan-beam, .broke-coin, .broke-stamp, .buy-card, .buy-veil { animation: none; transition: none; }
  .card:hover, .tg-choice:hover { transform: none; }
}

@media (max-width: 760px) {
  .wrap { width: min(1120px, calc(100% - 28px)); }
  .top-inner { min-height: 0; }
  .intro { padding: 18px 0 0; }
  h1 { font-size: 34px; }
  .lede { margin-top: 8px; font-size: 15px; }
  .market-shell { display: block; padding-top: 14px; }
  body.route-solo #shell { height: 0; min-height: 0; padding: 0; overflow: visible; }
  main.wrap, .foot { z-index: auto; }
  #account-slot { display: none; }
  .dock {
    position: fixed;
    inset: 0;
    z-index: 36;
    pointer-events: none;
  }
  .dock-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(3, 8, 16, 0.62);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0s linear 0.22s;
  }
  .dock-card {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    max-height: min(74dvh, 560px);
    overflow: auto;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(calc(100% + 24px));
    transition: transform 0.28s cubic-bezier(0.22, 0.9, 0.24, 1), visibility 0s linear 0.28s;
  }
  .dock-grab {
    display: block;
    width: 42px;
    height: 4px;
    margin: 2px auto 12px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.28);
  }
  .dock-nav .dock-more { display: flex; }
  .dock.is-open { pointer-events: auto; }
  .dock.is-open .dock-backdrop { opacity: 1; pointer-events: auto; visibility: visible; transition: opacity 0.22s ease, visibility 0s; }
  .dock.is-open .dock-card {
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: transform 0.28s cubic-bezier(0.22, 0.9, 0.24, 1), visibility 0s;
  }
  .dock-sum { font-size: 26px; }
  .tabbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 42;
    padding: 4px 10px calc(4px + env(safe-area-inset-bottom, 0px));
    background: #07111c;
    border-top: 1px solid rgba(186, 214, 255, 0.14);
  }
  .tabbar button {
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }
  .tabbar button[aria-current="page"],
  .tabbar button[aria-expanded="true"] { color: #f4f7fb; }
  .tabbar svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .tab-face {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
  }
  .tab-face .tab-ico, .tab-avatar { grid-area: 1 / 1; }
  .tab-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(160deg, #3b82f6, #1d4ed8);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
  }
  .tab-avatar img { width: 100%; height: 100%; object-fit: cover; }
  .tab-face:has(.tab-avatar:not([hidden])) .tab-ico { visibility: hidden; }
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
  .stat-grid { grid-template-columns: 1fr; }
  .toolbar {
    display: block;
    margin: 16px 0 12px;
  }
  .count { margin-top: 10px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filter-sort { grid-column: 1 / -1; }
  .foot { margin-top: 36px; padding-top: 22px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 22px 16px; }
  .foot-brand { grid-column: 1 / -1; }
  .cats {
    margin-right: -14px;
    margin-left: -14px;
    padding: 0 14px 2px;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 14px;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  .cat {
    min-height: 44px;
    padding: 0 16px;
    scroll-snap-align: start;
    flex: none;
  }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .card-art { height: 148px; }
  .card h2 { font-size: 20px; overflow-wrap: anywhere; }
  .price { font-size: 22px; }
  .card-body { padding: 14px 14px 14px; }
  .orb, .flow-b { display: none; }
  .flow { will-change: auto; }
  .flow-a { animation-duration: 48s; }
  .account-btn { max-width: min(210px, 52vw); min-width: 0; padding-right: 10px; }
  .admin-long { display: none; }
  .admin-short { display: inline; }
  .actions:has(#open-admin:not([hidden])) .account-btn { max-width: 46vw; }
  #account-label { max-width: 92px; }
  .actions, .account-slot, .search { min-width: 0; }
  .place-grid { grid-template-columns: 1fr; }
  .balance-sum { font-size: 32px; overflow-wrap: anywhere; }
  .hero-avatar { width: 92px; height: 92px; }
  .main-head, .balance-head, .foot-inner { flex-wrap: wrap; }
  .pay-row { grid-template-columns: 1fr 1fr; }
  .side-card, .main-card, .account-card { padding: 16px; border-radius: 20px; }
  .ghost, .checkout, .pay-send, .empty button { min-height: 48px; }
  .qty button { width: 40px; height: 40px; }
  .sheet, .drawer {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-height: min(92dvh, 100%);
    border-radius: 22px 22px 0 0;
    transform: none;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .drawer {
    height: min(88dvh, 100%);
    display: flex;
  }
  .sheet-art { height: 120px; }
  .sheet-row { align-items: stretch; flex-direction: column; }
  .sheet-row .card-actions { width: 100%; }
  .sheet-row .card-actions .checkout { flex: 1; width: auto; min-width: 0; }
  .auth-layer {
    padding: 12px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .auth-dialog { border-radius: 22px; }
  #code, #nick-input { font-size: 16px; }
  main { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .admin-switch { grid-template-columns: 1fr; }
  #admin .narrow { margin-top: 4px; }
  .stat-grid, .user-grid { grid-template-columns: 1fr 1fr; }
  .stat-card strong { font-size: 22px; }
  .stat-card.span-2 strong { font-size: 26px; }
  .admin-tabs { grid-template-columns: 1fr 1fr; }
  .admin-tabs button { font-size: 13px; padding: 0 4px; }
  .promo-box, .promo-fields { grid-template-columns: minmax(0, 1fr); }
  .admin-list { padding: 12px; }
  .admin-row { flex-direction: column; align-items: stretch; }
  .admin-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; width: 100%; }
  .admin-actions .ghost { width: 100%; padding: 0 6px; font-size: 14px; }
  .price-edit { grid-template-columns: 1fr; }
  .price-edit .checkout { width: 100%; }
  .pick-row, .admin-edit .pick-row { display: grid; grid-template-columns: 1fr; }
  .pick-row .trait { width: 100%; min-height: 48px; font-size: 15px; }
}

@media (hover: none) {
  .card:active { border-color: rgba(160, 204, 255, 0.55); }
}

html:has(#buy-scene:not([hidden])),
html:has(#sent-scene:not([hidden])),
html:has(#sheet:not([hidden])),
html:has(#drawer:not([hidden])),
html:has(#auth-layer:not([hidden])),
html:has(#desk-layer:not([hidden])),
html:has(#goods-layer:not([hidden])),
html:has(#dock.is-open) {
  overflow: hidden;
}

@media (min-width: 761px) {
  body.route-solo #shell { display: none; }
}

@media (max-height: 480px) and (orientation: landscape) {
  .intro { padding-top: 12px; }
  h1 { font-size: 30px; }
  .card-art { height: 96px; }
  .top-inner { padding-top: 8px; padding-bottom: 8px; }
}
