:root {
  --bg: #12161c;
  --bg-deep: #0c0f13;
  --ink: #f4f7fb;
  --muted: #8b95a3;
  --accent: #2fe0c8;
  --accent-2: #7af0df;
  --accent-ink: #032824;
  --accent-dim: rgba(47, 224, 200, 0.18);
  --star: #ffc857;
  --violet: #7c6cff;
  --line: rgba(255, 255, 255, 0.08);
  --panel: rgba(36, 43, 54, 0.92);
  --panel-2: #2c3542;
  --panel-solid: #242b36;
  --ok: #3dde7a;
  --ok-ink: #04210c;
  --ok-glow: rgba(61, 222, 122, 0.35);
  --danger: #ff5d55;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 68px;
  --tabbar-bottom: 10px;
  --tabbar-gap: 10px;
  /* reserved band under scrollport so content never sits under the dock */
  --bottom-clearance: calc(var(--tabbar-h) + var(--tabbar-bottom) + var(--tabbar-gap) + var(--safe-b));
  --display: "Outfit", system-ui, sans-serif;
  --ui: "Sora", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 22px;
  --radius-sm: 16px;
  --gold: var(--accent);
  --gold-2: var(--accent-2);
  --gold-dim: var(--accent-dim);
  --yellow: var(--accent);
  --yellow-2: var(--accent-2);
  --yellow-ink: var(--accent-ink);
  --yellow-dim: var(--accent-dim);
  --mono: var(--ui);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  height: var(--app-vh, var(--tg-viewport-stable-height, 100dvh));
  color: var(--ink);
  font-family: var(--ui);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body {
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

.atmosphere {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(70% 45% at 15% 0%, rgba(124, 108, 255, 0.22), transparent 55%),
    radial-gradient(80% 50% at 90% 8%, rgba(47, 224, 200, 0.2), transparent 52%),
    radial-gradient(60% 40% at 50% 100%, rgba(255, 200, 87, 0.08), transparent 50%),
    linear-gradient(165deg, #1a2030 0%, var(--bg) 42%, var(--bg-deep) 100%);
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: floaty 12s ease-in-out infinite alternate;
}
.blob-a {
  width: 220px;
  height: 220px;
  top: -60px;
  right: -40px;
  background: rgba(47, 224, 200, 0.45);
}
.blob-b {
  width: 180px;
  height: 180px;
  top: 18%;
  left: -70px;
  background: rgba(124, 108, 255, 0.4);
  animation-delay: -3s;
}
.blob-c {
  width: 160px;
  height: 160px;
  bottom: 18%;
  right: -50px;
  background: rgba(255, 200, 87, 0.22);
  animation-delay: -6s;
}
.grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.cursor-ember {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.cursor-ember.is-on {
  opacity: 1;
}
.orbit, .veins, .stamp-bg, .seal, .top { display: none !important; }

#app {
  position: relative;
  z-index: 1;
  max-width: 440px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  margin: 0 auto;
  padding: 14px 14px calc(8px + var(--safe-b));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 10px;
}

.boot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 40vh;
  text-align: center;
}

.brand-mark {
  font-family: var(--display);
  font-size: clamp(40px, 12vw, 52px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.9;
  background: linear-gradient(120deg, #fff 10%, var(--accent-2) 45%, var(--star) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 24px rgba(47, 224, 200, 0.25));
}
.brand-mark-sm {
  font-size: 28px;
  margin-bottom: 10px;
  text-align: center;
}

.view.hidden, .panel.hidden, .hidden { display: none !important; }

#shell {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 8px;
  box-sizing: border-box;
}
#shell.shell-in {
  animation: fadeRise 0.36s var(--ease) both;
}
#shell.shell-out {
  animation: fadeDrop 0.18s ease both;
}

.view {
  width: 100%;
}
.view.is-active {
  position: relative;
  z-index: 1;
}
.view.is-swiping {
  z-index: 6;
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.45);
  border-radius: 0 18px 18px 0;
  will-change: transform;
}
html.swipe-back-on #shell {
  overscroll-behavior-x: none;
}
.view.view-enter {
  animation: viewFadeIn 0.22s ease both;
}
.view.is-leaving {
  animation: none;
}

@keyframes viewFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

h1 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
h1::before, h1::after { content: none; display: none; }

.hello {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.home-hero {
  margin-bottom: 6px;
}

.profile-head {
  display: grid;
  justify-items: center;
  gap: 6px;
  margin: 0 0 16px;
  text-align: center;
}
.profile-avatar-wrap {
  position: relative;
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  filter: drop-shadow(0 10px 22px rgba(47, 180, 255, 0.28));
}
.profile-frame {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.profile-frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.profile-avatar {
  position: absolute;
  z-index: 1;
  /* photo sits on top of the crown area; star tips stay as frame */
  inset: 22%;
  width: auto;
  height: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  color: #0b141c;
  background: transparent;
  overflow: hidden;
  box-shadow: none;
  pointer-events: none;
}
.profile-avatar:not(.has-photo) #profile-avatar-letter {
  opacity: 0;
}
.profile-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  background: transparent;
}
.profile-avatar.has-photo .profile-avatar-img {
  opacity: 1;
}
.profile-avatar.has-photo #profile-avatar-letter {
  opacity: 0;
}
#profile-avatar-letter {
  position: relative;
  z-index: 1;
  transition: opacity 0.2s ease;
}
.profile-name {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.profile-handle {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.muted, .hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.subh {
  margin: 18px 0 10px;
  font-size: 13px;
  font-weight: 650;
  color: var(--accent);
}

/* —— Balance card —— */
.signal {
  position: relative;
  margin: 0 0 14px;
  padding: 20px 18px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(160deg, rgba(47, 224, 200, 0.16), transparent 45%),
    linear-gradient(320deg, rgba(124, 108, 255, 0.12), transparent 40%),
    rgba(28, 34, 44, 0.92);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  animation: none;
  backdrop-filter: blur(16px);
}
.signal-glow {
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 224, 200, 0.35), transparent 68%);
  animation: drift 7s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
.signal::before { display: none; }
.signal-compact { padding: 14px; }
.signal-head {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  z-index: 1;
}
.signal-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 700;
}
.signal-live em {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(61, 222, 122, 0.5);
  animation: ping 1.8s ease-out infinite;
  font-style: normal;
}
.signal-tag {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.signal-amount {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 4px 0 16px;
}
.signal-currency {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  color: var(--star);
  margin-top: 10px;
}
.signal-sum {
  font-family: var(--display);
  font-size: clamp(42px, 12vw, 54px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-shadow: 0 8px 30px rgba(47, 224, 200, 0.2);
}

.wallet-split {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0 14px;
}
.wallet-pill {
  display: grid;
  gap: 4px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(18, 22, 28, 0.45);
}
.wallet-pill-k {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.wallet-pill strong {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.bento {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.bento-tile {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 13px;
  text-align: left;
  background: rgba(0, 0, 0, 0.22);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  display: grid;
  gap: 3px;
  min-width: 0;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}
.bento-tile.static { cursor: default; }
.bento-tile:not(.static):active { transform: scale(0.98); }
.bento-tile.gold {
  border-color: rgba(47, 224, 200, 0.35);
  background: linear-gradient(160deg, rgba(47, 224, 200, 0.18), rgba(0, 0, 0, 0.15));
}
.bento-tile.action {
  border-color: rgba(61, 222, 122, 0.35);
  background: linear-gradient(160deg, rgba(61, 222, 122, 0.14), rgba(0, 0, 0, 0.15));
}
.bento-k {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.bento-tile strong {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.bento-hint {
  font-size: 11px;
  color: var(--accent-2);
  font-weight: 650;
}

/* —— Buttons —— */
.btn,
button.primary,
.btn-link.primary,
.cta-deal,
.action-btn,
.chip,
.tab,
.menu-row,
.choice-btn,
.bento-tile,
button.back {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.btn,
button.primary:not(.chip),
button.secondary:not(.chip),
.btn-link.primary {
  appearance: none;
  width: 100%;
  min-height: 50px;
  height: 50px;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition:
    transform 0.22s var(--ease),
    filter 0.22s ease,
    opacity 0.22s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}
.btn:active,
button.primary:not(.chip):active,
button.secondary:not(.chip):active,
.btn-link.primary:active {
  transform: scale(0.97);
}
.btn:disabled,
button.primary:not(.chip):disabled,
button.secondary:not(.chip):disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}
.btn.primary,
button.primary:not(.chip),
.btn-link.primary {
  border: 0;
  background: linear-gradient(135deg, var(--accent-2), var(--accent) 55%, #1fc4ad);
  color: var(--accent-ink);
  /* без большого glow — иначе под кнопкой «пятно» */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.btn.secondary,
button.secondary:not(.chip) {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  box-shadow: none;
}
.btn.danger {
  border-color: rgba(255, 93, 85, 0.35);
  background: rgba(255, 93, 85, 0.14);
  color: #ffb4ae;
}
.btn.ok {
  border: 0;
  color: var(--ok-ink);
  background: linear-gradient(135deg, #57e98f, var(--ok));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cta-deal {
  appearance: none;
  width: 100%;
  margin: 2px 0 12px;
  border: 0;
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-ink);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 40%),
    linear-gradient(135deg, var(--accent-2), var(--accent) 60%, #18b9a3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  cursor: pointer;
  position: relative;
  z-index: 2;
  overflow: hidden;
  transition: transform 0.22s var(--ease), filter 0.22s ease, box-shadow 0.25s ease;
}
.cta-deal > * {
  position: relative;
  z-index: 1;
}
.cta-deal::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.28) 48%, transparent 62%);
  transform: translateX(-120%);
  animation: shine 3.8s ease-in-out infinite;
}
.cta-arrow {
  display: none;
}
.cta-deal:active {
  transform: scale(0.97);
  filter: brightness(0.97);
}

.home-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
  position: relative;
  z-index: 2;
}
.action-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0 12px;
  min-height: 50px;
  height: 50px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  color: var(--ink);
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: transform 0.22s var(--ease), border-color 0.25s ease, background 0.25s ease;
  backdrop-filter: blur(10px);
}
.action-btn.ghost {
  /* перебиваем глобальный .ghost (иначе кнопка становится «голым» текстом) */
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  color: var(--ink) !important;
  padding: 0 12px !important;
  border-radius: 16px;
  min-height: 50px;
  height: 50px;
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.action-btn:active { transform: scale(0.97); }
.action-btn.wide {
  grid-column: 1 / -1;
}

.home-deals {
  margin-top: 18px;
}
.home-deals .index-head { margin-bottom: 10px; }
.home-deals-all {
  font-size: 13px;
  font-weight: 650;
  flex-shrink: 0;
  color: var(--accent);
}
.home-deals-list { gap: 8px; }

.market-home-gate {
  margin-top: 4px;
  margin-bottom: 4px;
}
.market-home-gate .market-cats-entry {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(22, 26, 34, 0.92);
  min-height: 54px;
}
.market-home-gate .market-cats-entry:active {
  background: rgba(255, 255, 255, 0.05);
}
.market-cat-list {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(22, 26, 34, 0.92);
}
.market-cat-list-lg {
  margin-bottom: 18px;
}
.market-cat {
  appearance: none;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0;
  min-height: 52px;
  padding: 0 14px;
  margin: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--ui);
  background: transparent;
  position: relative;
  overflow: visible;
  transition: background 0.18s ease;
}
.market-cat:last-child {
  border-bottom: 0;
}
.market-cat::before { display: none; }
.market-cat:active {
  transform: none;
  background: rgba(255, 255, 255, 0.05);
}
.market-cat-ico {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: rgba(244, 247, 251, 0.92);
}
.market-cat-ico svg {
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.market-cat strong {
  display: block;
  position: static;
  flex: 1;
  min-width: 0;
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: rgba(244, 247, 251, 0.96);
}
.market-cat span.market-cat-hint {
  display: none;
}
.market-cat .market-cat-chev {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.28);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  margin-left: auto;
  padding-left: 8px;
}
.market-cat.tone-accounts,
.market-cat.tone-items,
.market-cat.tone-services,
.market-cat.tone-digital,
.market-cat.tone-currency,
.market-cat.tone-keys,
.market-cat.tone-soft,
.market-cat.tone-it,
.market-cat.tone-trade,
.market-cat.tone-learn,
.market-cat.tone-arbitrage,
.market-cat.tone-exchange,
.market-cat.tone-sim,
.market-cat.tone-buyup,
.market-cat.tone-freebies {
  --cat-bg: transparent;
  --cat-glow: transparent;
}

.market-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.market-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.market-hero h1 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.market-hero-copy .muted {
  margin: 0;
  max-width: 42ch;
  font-size: 13px;
  line-height: 1.45;
}
.market-sell-fab {
  appearance: none;
  flex-shrink: 0;
  width: 64px;
  min-height: 64px;
  border-radius: 18px;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--accent-ink);
  background: linear-gradient(160deg, var(--accent-2), var(--accent));
  font-family: var(--ui);
  box-shadow: 0 10px 28px rgba(47, 224, 200, 0.28);
  transition: transform 0.22s var(--ease);
}
.market-sell-fab span {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}
.market-sell-fab em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.market-sell-fab:active { transform: scale(0.96); }

.market-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.market-all-cats-btn {
  appearance: none;
  flex: 1 1 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(47, 224, 200, 0.35);
  background: rgba(47, 224, 200, 0.12);
  color: #dffcf6;
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background 0.18s ease;
}
.market-all-cats-btn:active {
  transform: scale(0.97);
  background: rgba(47, 224, 200, 0.2);
}
.market-all-cats-ico {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #2fe0c8;
}
.market-all-cats-ico svg {
  width: 18px;
  height: 18px;
}
.market-search {
  flex: 1;
  margin: 0;
  min-width: 0;
}
.market-search input {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 14px;
  padding: 0 14px;
  outline: none;
}
.market-search input:focus {
  border-color: rgba(47, 224, 200, 0.45);
}

.market-cats-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  pointer-events: auto;
}
.market-cats-overlay.hidden {
  display: none;
}
.market-cats-backdrop {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 14, 0.62);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.market-cats-panel {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(86vh, 720px);
  overflow: auto;
  border-radius: 22px 22px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 0;
  background:
    linear-gradient(180deg, rgba(47, 224, 200, 0.08), transparent 28%),
    #141a22;
  box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.45);
  padding: 14px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  animation: marketCatsIn 0.28s var(--ease) both;
}
@keyframes marketCatsIn {
  from {
    transform: translateY(18px);
    opacity: 0.4;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.market-cats-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 2px 2px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.market-cats-panel-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.market-cats-close {
  appearance: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.market-cats-close:active {
  transform: scale(0.96);
}
.market-cats-overlay .market-cat-list {
  margin: 0;
}
.market-cats-overlay .market-cat.is-on {
  background: rgba(47, 224, 200, 0.1);
}
.market-cats-overlay .market-cat.is-on strong {
  color: #2fe0c8;
}
body.market-cats-open {
  overflow: hidden;
}

.market-viewbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 2px 0;
}
.market-view-modes {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.market-view-btn {
  appearance: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.38);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.market-view-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.market-view-btn svg path,
.market-view-btn svg rect,
.market-view-btn svg circle {
  fill: none;
  stroke: currentColor;
}
.market-view-btn svg circle {
  fill: currentColor;
  stroke: none;
}
.market-view-btn.is-on {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
}
.market-view-btn:active {
  transform: scale(0.96);
}
.market-viewbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  min-width: 0;
}
.market-price-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  max-width: 118px;
  padding: 0 8px 0 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.market-price-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.55);
}
.market-price-btn-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.market-price-btn.is-on {
  color: #2fe0c8;
}
.market-price-btn.is-on svg {
  color: #2fe0c8;
}
.market-price-btn:active {
  background: rgba(255, 255, 255, 0.06);
}
.market-price-hint {
  margin: 0 0 12px;
}
.market-filters-sheet {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
}
.market-price-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
}
.market-price-actions .btn {
  width: 100%;
}

.market-sort-wrap {
  position: relative;
  flex: 0 0 auto;
}
.market-sort-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 8px 0 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.market-sort-btn svg {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.55);
}
.market-sort-btn.is-open,
.market-sort-btn:active {
  background: rgba(255, 255, 255, 0.06);
}
.market-sort-caret {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1;
}
.market-sort-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  min-width: 168px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #171d27;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 2px;
}
.market-sort-menu.hidden {
  display: none;
}
.market-sort-opt {
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
}
.market-sort-opt.is-on {
  background: rgba(47, 224, 200, 0.12);
  color: #2fe0c8;
}
.market-sort-opt:active {
  background: rgba(255, 255, 255, 0.06);
}

.market-filters {
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 24, 32, 0.72);
  display: grid;
  gap: 10px;
}
.market-filters-row {
  display: grid;
  gap: 6px;
}
.market-filters-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.market-filters .filters {
  margin: 0;
  flex-wrap: wrap;
}
.market-price-range {
  display: flex;
  align-items: center;
  gap: 6px;
}
.market-price-field {
  flex: 1;
  margin: 0;
  min-width: 0;
}
.market-price-field input {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 14px;
  padding: 0 12px;
  outline: none;
}
.market-price-field input:focus {
  border-color: rgba(47, 224, 200, 0.45);
}
.market-price-field input::-webkit-outer-spin-button,
.market-price-field input::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.market-price-field input[type="number"],
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.market-price-sep {
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
  flex: 0 0 auto;
}
.market-price-presets {
  margin: 0;
}
.market-price-presets .chip.active {
  border-color: rgba(47, 224, 200, 0.55);
  color: #2fe0c8;
}

.market-feed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.market-feed.is-list {
  grid-template-columns: 1fr;
  gap: 8px;
}
.market-feed.is-grid {
  grid-template-columns: 1fr 1fr;
}
.market-feed.is-list .market-card {
  flex-direction: row;
  align-items: stretch;
  min-height: 0;
  border-radius: 16px;
}
.market-feed.is-list .market-card-media {
  width: 112px;
  flex: 0 0 112px;
  aspect-ratio: 1 / 1;
  border-radius: 0;
}
.market-feed.is-list .market-card-body {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.market-feed.is-list .market-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.market-feed.is-list .market-card-badge {
  display: none;
}
.market-card {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  color: inherit;
  background: rgba(28, 34, 44, 0.88);
  font-family: var(--ui);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.2s var(--ease), border-color 0.2s ease;
}
.market-card:active { transform: scale(0.98); }
.market-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.06), transparent),
    var(--lot-bg, #1a2230);
  overflow: hidden;
}
.market-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.market-card-media .lot-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0.85;
}
.market-card-media .lot-fallback .market-cat-ico,
.market-item-gallery .lot-fallback .market-cat-ico {
  width: 56px;
  height: 56px;
  color: rgba(255, 255, 255, 0.55);
}
.market-card-media .lot-fallback .market-cat-ico svg,
.market-item-gallery .lot-fallback .market-cat-ico svg {
  width: 40px;
  height: 40px;
}
.market-card-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(8, 12, 16, 0.72);
  backdrop-filter: blur(8px);
  color: var(--accent-2);
}
.market-card-promo {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #081018;
  background: linear-gradient(135deg, #7dffc8, #2fe0c8);
  box-shadow: 0 4px 14px rgba(47, 224, 200, 0.35);
}
.market-card-promo.is-vip {
  background: linear-gradient(135deg, #ffd56a, #f0a020);
  box-shadow: 0 4px 14px rgba(240, 160, 32, 0.4);
}
.market-card.is-promoted {
  border-color: rgba(47, 224, 200, 0.45);
  box-shadow: 0 0 0 1px rgba(47, 224, 200, 0.22), 0 10px 28px rgba(0, 0, 0, 0.28);
}
.market-card.is-promoted .market-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(47, 224, 200, 0.12), transparent 42%);
}
.market-card-qty {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(47, 224, 200, 0.2);
  color: #2fe0c8;
}
.market-card-body {
  padding: 10px 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.market-card-price {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-2);
}
.market-card-title {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.market-card-meta {
  margin-top: auto;
  padding-top: 6px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.market-empty {
  grid-column: 1 / -1;
  padding: 28px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.market-soon {
  min-height: min(58vh, 480px);
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 8px;
  padding: 36px 18px 48px;
}
.market-soon .market-kicker {
  margin: 0;
}
.market-soon-mark {
  width: 56px;
  height: 56px;
  margin: 6px 0 2px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  background: linear-gradient(160deg, var(--accent-2), var(--accent));
  box-shadow: 0 12px 28px rgba(47, 224, 200, 0.28);
}
.market-soon-mark svg {
  width: 26px;
  height: 26px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.market-soon h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.market-soon .muted {
  margin: 0;
  max-width: 28ch;
  font-size: 14px;
  line-height: 1.45;
}

.market-item-gallery {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #171d26;
  margin-bottom: 14px;
}
.market-item-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.market-item-gallery .lot-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 56px;
  background: linear-gradient(145deg, #1c2834, #121820);
}
.market-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: -4px 0 14px;
  scrollbar-width: none;
}
.market-thumbs::-webkit-scrollbar { display: none; }
.market-thumbs button {
  appearance: none;
  border: 1px solid transparent;
  padding: 0;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  background: #1a2230;
}
.market-thumbs button.is-on {
  border-color: var(--accent);
}
.market-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.market-item-price {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent-2);
  margin: 0 0 6px;
}
.market-item-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.market-seller {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin: 12px 0 10px;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.market-seller:active {
  transform: scale(0.99);
}
.market-seller-av {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(145deg, rgba(47,224,200,0.35), rgba(124,108,255,0.35));
  flex-shrink: 0;
}
.market-seller strong { display: block; font-size: 14px; }
.market-seller span { font-size: 12px; color: var(--muted); }
.market-seller-go {
  margin-left: auto;
  color: var(--muted);
  font-size: 18px;
}
.market-item-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.market-tool-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(20, 24, 32, 0.72);
  color: inherit;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.market-promo-pack.is-picked {
  border-color: rgba(47, 224, 200, 0.55);
  box-shadow: 0 0 0 1px rgba(47, 224, 200, 0.25);
}
.market-tool-report {
  opacity: 0.85;
}
.market-tool-btn:active {
  transform: scale(0.97);
}
.market-card-fav {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  color: #ff8eaa;
  font-size: 14px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.market-item-desc {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(244, 247, 251, 0.88);
  margin: 0 0 16px;
}
.market-item-actions {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}
.market-mine-tabs {
  margin: 0 0 12px;
}
.market-card.is-archived {
  opacity: 0.78;
}
.market-card-archive {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(20, 24, 32, 0.82);
}
.market-status-chip.is-archived {
  color: #f4f7fb;
  background: rgba(255, 255, 255, 0.16);
}
.market-status-chip {
  width: auto !important;
  height: auto !important;
  padding: 7px 12px !important;
  font-size: 11px !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 0;
}
.market-status-chip.is-top {
  color: #081018;
  background: linear-gradient(135deg, #7dffc8, #2fe0c8);
}
.market-status-chip.is-vip {
  color: #1a1205;
  background: linear-gradient(135deg, #ffd56a, #f0a020);
}
.market-promo-packs {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}
.market-promo-pack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(20, 24, 32, 0.88);
  color: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.market-promo-pack:active {
  transform: scale(0.98);
}
.market-promo-pack.is-vip {
  border-color: rgba(240, 160, 32, 0.45);
  background: linear-gradient(135deg, rgba(240, 160, 32, 0.14), rgba(20, 24, 32, 0.92));
}
.market-promo-pack-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.market-promo-pack-main strong {
  font-size: 14px;
  font-weight: 700;
}
.market-promo-pack-main span {
  font-size: 12px;
  color: rgba(244, 247, 251, 0.62);
  line-height: 1.35;
}
.market-promo-pack-price {
  flex-shrink: 0;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-2);
}
.market-promo-pack.is-vip .market-promo-pack-price {
  color: #ffd56a;
}
.market-promo-status {
  margin-top: 12px;
  font-size: 12px;
}
.market-buy-box {
  display: grid;
  gap: 12px;
}
.market-buy-qty {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 24, 32, 0.72);
}
.market-buy-qty[hidden] {
  display: none;
}
.market-buy-qty-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.market-buy-stepper {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 8px;
  align-items: center;
}
.market-buy-step {
  appearance: none;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}
.market-buy-step:active {
  transform: scale(0.96);
}
.market-buy-stepper input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}
.market-buy-stepper input::-webkit-outer-spin-button,
.market-buy-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.market-buy-total {
  font-size: 13px;
}
.market-buy-total strong {
  color: #2fe0c8;
  font-weight: 800;
}

.market-photo-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.market-photo-previews {
  display: flex;
  gap: 10px;
}
.market-photo-thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.market-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.market-photo-thumb button {
  appearance: none;
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 8px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.market-photo-add {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}
.market-photo-add span {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.market-photo-add em {
  font-style: normal;
  font-size: 11px;
  font-weight: 650;
}
.market-photo-add input { display: none; }
.market-sell-cats {
  margin-top: 8px;
}
.market-sell-cats .choice-btn {
  min-height: 64px;
}
.msell-exchange {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 4px 0 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.msell-exchange-note {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.35;
}
.msell-exchange.hidden { display: none; }
.msell-side-grid {
  margin-top: 8px;
  grid-template-columns: 1fr 1fr;
}
.msell-side-grid .choice-btn {
  min-height: 52px;
  flex-direction: column;
  gap: 2px;
}
.msell-side-grid .choice-btn span {
  font-size: 11px;
  font-weight: 500;
}
.market-card-ex-side {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text, #fff);
  background: rgba(255, 255, 255, 0.12);
}
.msell-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 8px;
}
.msell-minmax {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.msell-minmax.hidden { display: none; }
.msell-minmax .field { margin: 0; }
.msell-minmax .field > span:first-child {
  white-space: nowrap;
}
.msell-minmax .field-note {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.3;
}
@media (max-width: 380px) {
  .msell-minmax { grid-template-columns: 1fr; }
}
.msell-ccy-field > span {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted, #9aa);
}
.msell-ccy-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.msell-ccy-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #fff);
  border-radius: 12px;
  min-height: 42px;
  width: 100%;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.msell-ccy-chip.is-on {
  border-color: rgba(61, 184, 160, 0.55);
  background: rgba(61, 184, 160, 0.16);
  color: #dff8f0;
}
.msell-ccy-chip:active {
  transform: scale(0.98);
}
.msell-swap {
  appearance: none;
  align-self: center;
  margin-top: 22px;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted, #9aa);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}
.msell-swap:active {
  transform: scale(0.96);
}
.market-ex-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 12px;
}
.market-ex-filters.hidden { display: none; }
.market-ex-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.market-ex-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
.market-ex-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.market-card-ex {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--accent, #7dd3a0);
}
.market-card-ex-detail {
  font-size: 11px;
  font-weight: 550;
  color: var(--muted);
}

/* BestChange-style exchange rows */
.market-card.market-card-exrow {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 12px 14px 10px;
  min-height: 0;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
}
.market-card.market-card-exrow.is-promoted {
  border-color: rgba(47, 224, 200, 0.35);
  background: rgba(47, 224, 200, 0.06);
}
.market-feed.is-list .market-card.market-card-exrow,
.market-feed.is-grid .market-card.market-card-exrow {
  flex-direction: column;
}
.market-feed.is-grid .market-card.market-card-exrow {
  grid-column: 1 / -1;
}
.exrow-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 0;
  margin-bottom: 2px;
}
.exrow-top:empty {
  display: none;
}
.exrow-promo,
.exrow-archive {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(47, 224, 200, 0.18);
  color: #2fe0c8;
}
.exrow-promo.is-vip {
  background: rgba(255, 196, 80, 0.2);
  color: #ffc450;
}
.exrow-archive {
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
}
.exrow-fav {
  margin-left: auto;
  color: #ff6b8a;
  font-size: 12px;
}
.exrow-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
.exrow-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.exrow-side.is-get {
  text-align: right;
  align-items: flex-end;
}
.exrow-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.exrow-amt {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text, #fff);
  line-height: 1.15;
  word-break: break-word;
}
.exrow-side.is-get .exrow-amt {
  color: var(--accent-2, #2fe0c8);
}
.exrow-ccy {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.exrow-arrow {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.exrow-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.exrow-rate {
  font-size: 12px;
  font-weight: 650;
  color: var(--accent, #7dd3a0);
}
.exrow-rate.is-empty {
  color: var(--muted);
  font-weight: 500;
}
.exrow-method {
  font-size: 12px;
  font-weight: 600;
  color: var(--text, #fff);
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}
.market-card.market-card-exrow .market-card-meta {
  margin-top: 8px;
  padding-top: 0;
}

/* Compact lot rows (same language as exchange) */
.market-card.market-card-mrow {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 12px 14px 10px;
  min-height: 0;
  text-align: left;
  background: rgba(255, 255, 255, 0.035);
}
.market-card.market-card-mrow.is-promoted {
  border-color: rgba(47, 224, 200, 0.35);
  background: rgba(47, 224, 200, 0.06);
}
.market-feed.is-list .market-card.market-card-mrow,
.market-feed.is-grid .market-card.market-card-mrow {
  flex-direction: column;
}
.market-feed.is-grid .market-card.market-card-mrow {
  grid-column: 1 / -1;
}
.mrow-pair {
  display: grid;
  grid-template-columns: 1fr 56px;
  gap: 12px;
  align-items: center;
}
.mrow-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mrow-price {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-2, #2fe0c8);
  line-height: 1.15;
}
.mrow-title {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--text, #fff);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mrow-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.mrow-cat,
.mrow-qty {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}
.mrow-thumb {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.mrow-thumb.is-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.mrow-thumb.is-empty .market-cat-ico {
  width: 22px;
  height: 22px;
  opacity: 0.75;
}
.market-card.market-card-mrow .market-card-meta {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.market-ex-card {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.market-ex-pair {
  font-size: 16px;
}
.market-ex-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.market-ex-line span {
  color: var(--muted);
  flex-shrink: 0;
}
.market-ex-line em {
  font-style: normal;
  text-align: right;
  font-weight: 600;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 360px) {
  .market-feed.is-grid { grid-template-columns: 1fr; }
}

.index-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 650;
  color: var(--accent);
}
.index-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.menu-list {
  display: grid;
  gap: 0;
  border-radius: var(--radius);
  background: rgba(36, 43, 54, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}
.menu-list + .menu-list { margin-top: 12px; }
.menu-row, .btn-link, a.menu-row {
  appearance: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 560;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease);
}
.menu-list > :last-child { border-bottom: 0; }
.index-list .menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.menu-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1;
  color: #fff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}
.menu-ico.blue { background: #3b82f6; }
.menu-ico.teal { background: #14b8a6; }
.menu-ico.purple { background: #8b5cf6; }
.menu-ico.orange { background: #f59e0b; }
.menu-ico.green { background: #22c55e; }
.menu-ico.pink { background: #ec4899; }
.menu-ico.slate { background: #64748b; }
.menu-row b {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  min-width: 1.5em;
}
.menu-row i {
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(255, 255, 255, 0.28);
  border-top: 2px solid rgba(255, 255, 255, 0.28);
  transform: rotate(45deg);
  opacity: 0.65;
  margin-left: auto;
  flex-shrink: 0;
}
.menu-row:active { background: rgba(255, 255, 255, 0.04); }
.menu-row:hover, .menu-row.selected {
  color: var(--ink);
  background: rgba(45, 212, 191, 0.06);
}
.menu-row.selected {
  box-shadow: inset 3px 0 0 var(--accent);
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}
.actions > .btn,
.actions > button.primary,
.actions > button.secondary {
  width: 100%;
  min-height: 50px;
  height: 50px;
}

button.back {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 8px 12px 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
button.back:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(45, 212, 191, 0.35);
}
button:disabled { opacity: 0.45; cursor: default; }

.chip {
  appearance: none;
  border: 0;
  background: var(--panel);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 13px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.2s var(--ease), box-shadow 0.25s ease;
}
.chip.active {
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: none;
}
.chip.accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-height: 0;
  margin-top: 8px;
  color: var(--accent-ink);
  background: var(--accent);
  box-shadow: none;
}
.chip:active { transform: scale(0.96); }
.chip.green {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
}

.view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.view-head h1 { margin: 0; }
.view-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 4px;
}
.wallet-chip-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 12px;
}
.wallet-chip {
  appearance: none;
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 13px 14px;
  min-height: 64px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 22, 28, 0.55);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.wallet-chip strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.wallet-chip span {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.wallet-chip.active {
  border-color: rgba(45, 212, 191, 0.55);
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.16), rgba(45, 212, 191, 0.05));
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.1);
}
.wallet-chip.active span {
  color: color-mix(in srgb, var(--ink) 70%, var(--accent-2));
}
.wallet-chip:active {
  transform: scale(0.985);
}
#rep-filters {
  margin-top: 4px;
}
#rep-filters .chip[data-rep-filter="positive"].active {
  border-color: rgba(52, 199, 89, 0.45);
  color: var(--ok);
}
#rep-filters .chip[data-rep-filter="negative"].active {
  border-color: rgba(255, 69, 58, 0.45);
  color: var(--danger);
}

.field {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.field-hint {
  font-weight: 500;
  opacity: 0.75;
}
.field input,
.field textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(45, 212, 191, 0.5);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
}
.search-row button.primary,
.search-row button.secondary,
.search-row .btn {
  width: auto;
  min-width: 100px;
  height: 50px;
  min-height: 50px;
  white-space: nowrap;
}

.radio-group {
  display: grid;
  gap: 8px;
  margin: 8px 0 14px;
}
.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 0;
  background: var(--panel);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0 4px;
}
.choice-grid-soft {
  margin-top: 4px;
}
.choice-btn {
  appearance: none;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 13px 14px;
  min-height: 68px;
  background: rgba(18, 22, 28, 0.55);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  display: grid;
  align-content: center;
  gap: 5px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.choice-btn strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.choice-btn span {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}
.choice-btn.active {
  border-color: rgba(45, 212, 191, 0.55);
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.14), rgba(45, 212, 191, 0.04));
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.1);
}
.choice-btn.pos-choice.active {
  border-color: rgba(52, 199, 89, 0.5);
  background: linear-gradient(180deg, rgba(52, 199, 89, 0.14), rgba(52, 199, 89, 0.04));
  box-shadow: none;
}
.choice-btn.neg-choice.active {
  border-color: rgba(255, 69, 58, 0.45);
  background: linear-gradient(180deg, rgba(255, 69, 58, 0.12), rgba(255, 69, 58, 0.04));
  box-shadow: none;
}
.choice-btn:active { transform: scale(0.985); }
.field-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

.result, .notice, .rep-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 0;
  background: var(--panel);
  font-size: 13px;
  line-height: 1.5;
}
.result a { color: var(--accent-2); }
#wd-result,
#dep-result,
#blago-result,
#deal-topup {
  margin-top: 14px;
  padding: 0;
  background: transparent;
  border: 0;
}
#wd-result > .wd-item,
#dep-result > .wd-item,
#blago-result > .wd-item,
#deal-topup > .wd-item { margin: 0; }
.wd-check-paid {
  margin-top: 10px;
}
.notice {
  margin: 0 0 14px;
  color: #baf7c8;
  background: rgba(52, 199, 89, 0.1);
}
.notice .chip.accent {
  display: inline-flex;
  margin-left: 6px;
  vertical-align: middle;
}
.review-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 12px 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(45, 212, 191, 0.22);
  background: rgba(45, 212, 191, 0.08);
  overflow: hidden;
}
.review-cta-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.review-cta-text strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.review-cta-text span {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.review-cta .review-cta-btn,
button.review-cta-btn {
  appearance: none;
  flex: 0 0 auto;
  width: auto !important;
  min-width: 96px;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: none;
  cursor: pointer;
  white-space: nowrap;
  z-index: 2;
}

.list { display: grid; gap: 8px; }

#view-support.support-view.is-active,
#view-exchange-order.support-view.is-active {
  display: flex !important;
  flex-direction: column;
  height: calc(100dvh - var(--bottom-clearance) - 28px);
  max-height: calc(100dvh - var(--bottom-clearance) - 28px);
  min-height: 0;
  gap: 0;
  overflow: hidden;
}
#shell.shell-support,
#shell.shell-exchange-order {
  overflow: hidden;
  padding-bottom: 0;
}
.support-top {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.support-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
}
.support-top .support-nav-btn,
.support-top .support-back,
.support-top .support-close-btn {
  appearance: none;
  width: auto;
  min-width: 0;
  min-height: 34px;
  height: 34px;
  margin: 0;
  padding: 0 13px;
  box-sizing: border-box;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.support-top .support-back {
  color: var(--accent-2);
  border-color: rgba(47, 224, 200, 0.32);
  background: rgba(47, 224, 200, 0.12);
}
.support-top .support-close-btn {
  margin-left: auto;
  color: #ff9b94;
  border-color: rgba(255, 93, 85, 0.42);
  background: rgba(255, 93, 85, 0.14);
}
.support-top .support-close-btn.hidden {
  display: none;
}
.support-top h1 { margin: 0; font-size: 22px; }
.support-top .muted { margin: 2px 0 0; font-size: 12px; }
.support-review {
  flex: 0 0 auto;
  margin-top: 10px;
  padding: 12px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.support-review strong { font-size: 15px; }
.support-review .muted { margin: 0; font-size: 12px; }
.support-stars {
  display: flex;
  gap: 6px;
}
.support-stars button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--panel-2);
  color: #5a6573;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.support-stars button.on {
  color: #ffc857;
  background: rgba(255, 200, 87, 0.14);
}
.support-review textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-deep);
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  resize: vertical;
}
.support-review-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
}
.support-closed {
  flex: 0 0 auto;
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(61, 222, 122, 0.28);
  background: rgba(61, 222, 122, 0.1);
  color: #baf7c8;
  font-size: 13px;
}
.support-closed p { margin: 0; }
.support-thread {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(47, 224, 200, 0.06);
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(47, 224, 200, 0.06), transparent 55%),
    rgba(0, 0, 0, 0.28);
  align-content: start;
}
.support-thread .muted {
  margin: auto;
  text-align: center;
}
.support-bubble {
  max-width: 82%;
  padding: 8px 11px 6px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
.support-bubble.mine {
  align-self: flex-end;
  background: #2a8f7a;
  color: #f4fffb;
  border: 1px solid rgba(122, 240, 223, 0.45);
  border-bottom-right-radius: 5px;
}
.support-bubble.theirs {
  align-self: flex-start;
  background: var(--panel-2);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom-left-radius: 5px;
}
.support-bubble .support-who {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 3px;
  opacity: 0.85;
  -webkit-user-select: none;
  user-select: none;
}
.support-bubble.mine .support-who { color: #c8ffe9; }
.support-bubble.theirs .support-who { color: var(--accent); }
.support-bubble .support-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
}
.support-bubble .support-text a.support-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  -webkit-user-select: text;
  user-select: text;
}
.support-bubble.mine .support-text a.support-link {
  color: #c8ffe9;
}
.support-bubble .support-meta {
  margin-top: 4px;
  font-size: 10px;
  opacity: 0.7;
  text-align: right;
  -webkit-user-select: none;
  user-select: none;
}
.support-bubble img.support-shot {
  display: block;
  max-width: min(240px, 70vw);
  max-height: 280px;
  width: auto;
  height: auto;
  border-radius: 12px;
  margin: 2px 0 4px;
  object-fit: cover;
  background: #0c0f13;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: zoom-in;
}
.support-bubble .support-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 4px;
  font-size: 13px;
  opacity: 0.9;
}
.support-preview {
  flex: 0 0 auto;
  position: relative;
  margin-top: 8px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
}
.support-preview img {
  display: block;
  max-height: 96px;
  max-width: 100%;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.support-preview-x {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.support-composer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
  padding: 8px;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.support-composer.ex-order-composer {
  grid-template-columns: 1fr 42px;
}
.support-attach {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--panel-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  overflow: hidden;
  flex: 0 0 auto;
}
.support-attach input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.support-composer textarea {
  width: 100%;
  min-height: 42px;
  max-height: 120px;
  resize: none;
  border: 0;
  border-radius: 14px;
  background: var(--bg-deep);
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  box-sizing: border-box;
}
.support-send {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  flex: 0 0 auto;
}
.support-send:disabled {
  opacity: 0.5;
  cursor: default;
}
.deal, .entry, .wd-item {
  padding: 14px;
  border-radius: var(--radius);
  border: 0;
  background: var(--panel);
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: var(--ink);
  font: inherit;
  transition: background 0.2s ease;
}
.deal-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 6px;
}
.deal-amount {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent-2);
}
.deal-hint {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  color: color-mix(in srgb, var(--ink) 82%, var(--muted));
}
.deal-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.deal-card-id {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.deal-card-role {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.deal-card-meta {
  display: grid;
  gap: 4px;
  margin-top: 2px;
}
.deal-card-pay,
.deal-card-cp {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}
.deal-card-pay {
  color: color-mix(in srgb, var(--ink) 68%, var(--accent-2));
}
.deal-card-terms {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.deal-card-terms span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.deal-card-terms p {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
  white-space: pre-wrap;
  word-break: break-word;
}
.deal-tip {
  margin: 8px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.42);
}
.deal-tip-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffe08a;
}
.deal-tip ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: color-mix(in srgb, var(--ink) 88%, #ffe08a);
}
.deal-tip li::marker {
  color: #ffc107;
}
.deal-tip.compact {
  margin: 10px 0 12px;
}
.deal-tip.compact p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: color-mix(in srgb, var(--ink) 88%, #ffe08a);
}
.deal.tone-success {
  box-shadow: inset 3px 0 0 var(--ok);
  background: linear-gradient(90deg, rgba(52, 199, 89, 0.1), var(--panel) 40%);
}
.deal.tone-danger {
  box-shadow: inset 3px 0 0 var(--danger);
  background: linear-gradient(90deg, rgba(255, 69, 58, 0.1), var(--panel) 40%);
}
.deal.tone-warn {
  box-shadow: inset 3px 0 0 var(--star);
  background: linear-gradient(90deg, rgba(255, 193, 7, 0.1), var(--panel) 40%);
}
.deal.tone-wait {
  box-shadow: inset 3px 0 0 var(--accent);
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.1), var(--panel) 40%);
}
.deal.tone-work {
  box-shadow: inset 3px 0 0 #5ab0ff;
  background: linear-gradient(90deg, rgba(90, 176, 255, 0.1), var(--panel) 40%);
}
.deal.tone-muted { opacity: 0.92; }
.deal .row, .wd-item .row, .entry .row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.meta { color: var(--muted); font-size: 12px; }
.wd-item {
  cursor: default;
}
.wd-item.tone-success,
.wd-item.tone-in {
  box-shadow: inset 3px 0 0 var(--ok);
  background: linear-gradient(90deg, rgba(52, 199, 89, 0.12), var(--panel) 42%);
}
.wd-item.tone-out {
  box-shadow: inset 3px 0 0 var(--danger);
  background: linear-gradient(90deg, rgba(255, 69, 58, 0.12), var(--panel) 42%);
}
.wd-item.tone-danger {
  box-shadow: inset 3px 0 0 #ff8a3d;
  background: linear-gradient(90deg, rgba(255, 138, 61, 0.14), var(--panel) 42%);
}
.wd-item.tone-warn,
.wd-item.tone-wait {
  box-shadow: inset 3px 0 0 var(--star);
  background: linear-gradient(90deg, rgba(255, 193, 7, 0.12), var(--panel) 42%);
}
.wd-item.tone-work {
  box-shadow: inset 3px 0 0 #5ab0ff;
  background: linear-gradient(90deg, rgba(90, 176, 255, 0.12), var(--panel) 42%);
}
.wd-item.tone-muted {
  box-shadow: inset 3px 0 0 rgba(160, 170, 185, 0.55);
  background: linear-gradient(90deg, rgba(160, 170, 185, 0.1), var(--panel) 42%);
  opacity: 0.95;
}
.hist-amt {
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.hist-amt.in { color: #57e98f; }
.hist-amt.out { color: #ff6b61; }
.hist-card.tone-wait .hist-amt.in,
.hist-card.tone-wait .hist-amt.out { color: #ffd666; }
.hist-card.tone-danger .hist-amt { color: #ff8a3d; }
.hist-card.tone-muted .hist-amt { color: var(--muted); }
.wd-item .deal-status-row {
  margin: 6px 0 2px;
  align-items: flex-start;
}
.wd-item .deal-status-row .meta {
  text-align: right;
  line-height: 1.35;
}
.wd-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.wd-actions .btn {
  min-height: 44px;
  font-size: 14px;
  font-weight: 650;
}
.wd-check-url {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
  word-break: break-all;
  user-select: text;
}
.wd-wait {
  margin-top: 8px;
}
.terms { font-size: 13px; color: color-mix(in srgb, var(--ink) 80%, var(--muted)); }
.deal-terms-block {
  margin: 14px 0 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.deal-terms-block .cp-kicker {
  margin-bottom: 8px;
}
.deal-terms-body {
  font-size: 14px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
  white-space: pre-wrap;
  word-break: break-word;
}
.confirm-terms {
  margin: 10px 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.confirm-terms .cp-kicker { margin-bottom: 8px; }
.confirm-warn {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 69, 58, 0.1);
  border: 1.5px solid rgba(255, 69, 58, 0.9);
  box-shadow: 0 0 0 1px rgba(255, 69, 58, 0.22);
}
.confirm-warn-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ff6b63;
}
.confirm-warn .confirm-body {
  margin: 0;
  color: color-mix(in srgb, var(--ink) 92%, #ff6b63);
}
.pos { color: var(--ok); }
.neg { color: var(--danger); }

.deal-detail h2 {
  margin: 10px 0 6px;
  font-size: 18px;
  font-weight: 700;
}
.deal-detail .amount {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 6px 0 10px;
  color: var(--accent-2);
}
.deal-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 12px;
}
.role-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
}
.pay-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.pay-banner {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.22);
}
.pay-banner strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}
.pay-banner .meta {
  margin: 6px 0 0;
}
.party-status {
  margin: 12px 0;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--line);
}
.party-status-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--muted);
}
.party-status-track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.party-chip {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}
.party-chip-mark {
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.party-chip-name {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.party-chip-state {
  font-size: 11px;
  color: var(--muted);
}
.party-chip.is-done {
  border-color: rgba(61, 222, 122, 0.35);
  background: rgba(61, 222, 122, 0.1);
}
.party-chip.is-done .party-chip-mark {
  color: var(--ok-ink);
  background: var(--ok);
}
.party-chip.is-done .party-chip-state {
  color: #8fe6ad;
}
.party-chip.is-wait .party-chip-mark {
  color: #6a7380;
  background: rgba(255, 255, 255, 0.08);
}
.cp-block {
  margin: 14px 0 4px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid var(--line);
}
.cp-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--muted);
}
.cp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.user-link.cp-name {
  appearance: none;
  border: 1px solid rgba(47, 224, 200, 0.35);
  background: rgba(47, 224, 200, 0.12);
  color: var(--accent-2);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-link.cp-name:active {
  transform: scale(0.98);
}
.cp-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 9px 12px;
  border-radius: 12px;
  cursor: pointer;
}
.cp-chip:active {
  transform: scale(0.98);
}
.cp-chip:disabled {
  opacity: 0.45;
  cursor: default;
}
.deal-actions { display: grid; gap: 10px; margin-top: 14px; }
.deal-actions .btn { width: 100%; }
.deal-confirm { margin-top: 14px; }
.confirm-sheet {
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.12), transparent 55%), var(--panel);
  animation: viewIn 0.35s var(--ease) both;
}
.deal-confirm:not(.hidden) {
  animation: viewIn 0.3s var(--ease) both;
}
.confirm-sheet.confirm-danger {
  background: linear-gradient(180deg, rgba(255, 69, 58, 0.12), transparent 55%), var(--panel);
}
.confirm-sheet h3 {
  margin: 6px 0 8px;
  font-size: 18px;
  font-weight: 750;
}
.confirm-body {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--ink) 88%, var(--muted));
}
.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.confirm-actions .btn { width: 100%; }
.dispute-side-actions {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
}
.dispute-side-actions .btn { width: 100%; }
.deal-detail {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--panel);
}
.deal-detail.tone-success {
  background: linear-gradient(180deg, rgba(52, 199, 89, 0.1), transparent 40%), var(--panel);
}
.deal-detail.tone-danger {
  background: linear-gradient(180deg, rgba(255, 69, 58, 0.1), transparent 40%), var(--panel);
}
.deal-detail.tone-warn {
  background: linear-gradient(180deg, rgba(255, 193, 7, 0.1), transparent 40%), var(--panel);
}
.deal-detail.tone-wait {
  background: linear-gradient(180deg, rgba(45, 212, 191, 0.1), transparent 40%), var(--panel);
}
.deal-detail.tone-work {
  background: linear-gradient(180deg, rgba(90, 176, 255, 0.1), transparent 40%), var(--panel);
}
.status-hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
}
.notice-warn {
  color: #ffe9a0 !important;
  background: rgba(255, 193, 7, 0.1) !important;
}

.dispute-panel, .dispute-open {
  margin-top: 18px;
  padding-top: 4px;
}
.dispute-open .btn { margin-top: 4px; }
.dispute-thread {
  margin: 10px 0 12px;
  max-height: 280px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
}
.dispute-msg {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--panel-2);
  font-size: 13px;
  line-height: 1.45;
}
.dispute-msg.dispute-me {
  background: rgba(52, 199, 89, 0.12);
  margin-left: 18px;
}
.dispute-msg.dispute-arbiter {
  background: rgba(45, 212, 191, 0.12);
  margin-right: 18px;
}
.dispute-msg.dispute-peer {
  background: rgba(255, 255, 255, 0.06);
  margin-right: 18px;
}
.dispute-msg.dispute-system {
  opacity: 0.85;
  font-size: 12px;
}
.market-deal-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(45, 212, 191, 0.1);
}
.market-deal-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}
.purchase-card {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  width: 100%;
}
.purchase-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
}
.purchase-thumb-empty {
  background: rgba(255, 255, 255, 0.06);
}
.purchase-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.purchase-body .money {
  color: var(--accent, #2dd4bf);
  font-weight: 700;
}
.market-buy-confirm {
  margin-top: 12px;
}
.market-buy-confirm.hidden {
  display: none;
}
.market-buy-sheet .market-buy-confirm-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 8px 0 12px;
}
.market-buy-confirm-photo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}
.market-buy-confirm-photo.is-empty {
  display: block;
}
.market-buy-confirm-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.market-buy-confirm-meta strong {
  font-size: 15px;
  line-height: 1.3;
}
.market-buy-confirm-sum {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent, #2dd4bf);
  margin: 0 0 12px;
}
.market-buy-wallet {
  margin: 0 0 14px;
}
.market-buy-wallet .cp-kicker {
  margin-bottom: 8px;
}
.deal-detail .dispute-panel {
  margin-top: 14px;
  margin-bottom: 4px;
}
.deal-detail .dispute-panel.hidden {
  display: none;
}
#btn-close-deal-chat {
  margin-top: 10px;
  width: 100%;
}
.dispute-meta-block {
  margin: 10px 0 4px;
  display: grid;
  gap: 8px;
}
.deal-detail .deal-actions {
  margin-top: 12px;
}
.dispute-who {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
  font-weight: 700;
}
.dispute-media {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.dispute-shot-wrap {
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0f141a;
  max-width: 100%;
  cursor: zoom-in;
}
.dispute-shot-wrap.is-ready:active {
  transform: scale(0.99);
}
.dispute-shot {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #0f141a;
  pointer-events: none;
}
.dispute-composer { display: grid; gap: 10px; }
.dispute-composer textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-deep);
  color: var(--ink);
  padding: 12px;
  font: inherit;
  font-size: 14px;
  resize: vertical;
}
.dispute-tools {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: stretch;
}
.dispute-file-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--accent, #2dd4bf) 55%, var(--line));
  background: rgba(45, 212, 191, 0.08);
  color: var(--accent, #2dd4bf);
  font-family: var(--ui);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}
.dispute-file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.dispute-tools .btn {
  width: 100%;
  margin: 0;
}
.dispute-attach-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dispute-attach-previews.hidden {
  display: none;
}
.dispute-attach-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}
.dispute-attach-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dispute-attach-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.dispute-attach-add {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--accent, #2dd4bf) 55%, var(--line));
  background: rgba(45, 212, 191, 0.08);
  color: var(--accent, #2dd4bf);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
}
.dispute-attach-add input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  max-width: 100%;
}
.status-pill.status-lg {
  margin-bottom: 2px;
  padding: 7px 14px 7px 11px;
  font-size: 12px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.status-pill.tone-success,
.status-pill.tone-in {
  color: #baf7c8;
  background: rgba(52, 199, 89, 0.12);
}
.status-pill.tone-success .status-dot,
.status-pill.tone-in .status-dot { background: #34c759; }
.status-pill.tone-out {
  color: #ffb4ae;
  background: rgba(255, 69, 58, 0.14);
}
.status-pill.tone-out .status-dot { background: #ff453a; }
.status-pill.tone-danger {
  color: #ffd0a8;
  background: rgba(255, 138, 61, 0.14);
}
.status-pill.tone-danger .status-dot { background: #ff8a3d; }
.status-pill.tone-warn,
.status-pill.tone-wait {
  color: #ffe5a3;
  background: rgba(255, 193, 7, 0.14);
}
.status-pill.tone-warn .status-dot,
.status-pill.tone-wait .status-dot {
  background: var(--star);
  animation: status-pulse 1.6s ease-in-out infinite;
}
.status-pill.tone-work {
  color: #bfe3ff;
  background: rgba(90, 176, 255, 0.12);
}
.status-pill.tone-work .status-dot {
  background: #5ab0ff;
  animation: status-pulse 1.5s ease-in-out infinite;
}
.status-pill.tone-muted { color: var(--muted); }
@keyframes status-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}

.rep-stats { display: grid; gap: 6px; margin-top: 8px; font-size: 13px; }

/* —— Major floating tabbar —— */
.tabbar {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  flex: 0 0 auto;
  width: 100%;
  height: var(--tabbar-h);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  padding: 6px;
  background: rgba(18, 22, 30, 0.96);
  backdrop-filter: blur(24px) saturate(1.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  z-index: 40;
  pointer-events: auto;
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(47, 224, 200, 0.06) inset;
}
.tab-pill {
  position: absolute;
  top: 0;
  left: 0;
  width: 34px;
  height: 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 6px 16px rgba(47, 224, 200, 0.4);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transform: translate(0, 0);
  transition:
    transform 0.38s var(--ease),
    width 0.38s var(--ease),
    height 0.38s var(--ease),
    opacity 0.2s ease;
  will-change: transform;
}
.tab-pill.is-ready {
  opacity: 1;
}
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 650;
  padding: 4px 2px;
  border-radius: 16px;
  cursor: pointer;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
  z-index: 1;
  transition: color 0.28s var(--ease), transform 0.2s var(--ease);
}
.tab > span:last-child {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  padding: 0;
  line-height: 1.15;
}
.tab-ico {
  width: 34px;
  height: 28px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 0;
  color: inherit;
  background: rgba(255, 255, 255, 0.03);
  transition:
    background 0.28s var(--ease),
    color 0.28s var(--ease);
}
.tab-ico svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tab.active {
  color: var(--muted);
  background: transparent;
}
.tab.active .tab-ico {
  color: var(--accent-ink);
  background: transparent;
}
.tab.active span:last-child {
  color: var(--accent-2);
  transition: color 0.28s var(--ease);
}
.tab:active { transform: scale(0.96); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 24px + var(--safe-b));
  transform: translateX(-50%) translateY(8px);
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  max-width: min(90vw, 360px);
  text-align: center;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
}
.toast.toast-in {
  animation: toastIn 0.35s var(--ease) both;
}
.toast.toast-out {
  animation: toastOut 0.28s ease both;
}

#shell.hidden ~ .tabbar {
  display: none;
}

.gate {
  margin-top: 28px;
  text-align: center;
  opacity: 1;
}
.gate.gate-in {
  animation: fadeRise 0.45s var(--ease) both;
}
.gate.gate-out {
  animation: fadeDrop 0.2s ease both;
}
.gate .brand-mark {
  margin-bottom: 18px;
}
.gate h1 {
  font-size: 24px;
}
.gate .actions { margin-top: 14px; }

.ghost:not(.action-btn) {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  font: inherit;
  padding: 0;
  cursor: pointer;
}
.user-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  font: inherit;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(45, 212, 191, 0.35);
  text-underline-offset: 2px;
}
.rep-card-wrap {
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  background: #1a212b;
  min-height: 0;
  position: relative;
  aspect-ratio: 16 / 10;
}
.rep-card-wrap.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 20%,
    rgba(47, 224, 200, 0.08) 45%,
    transparent 70%
  );
  background-size: 200% 100%;
  animation: cardShine 1.1s ease-in-out infinite;
}
.rep-card-wrap.is-failed {
  min-height: 72px;
  aspect-ratio: auto;
  display: grid;
  place-items: center;
}
.rep-card-wrap.is-failed::before {
  content: "Карточка не загрузилась";
  color: var(--muted);
  font-size: 12px;
}
.rep-card-wrap.has-img {
  aspect-ratio: auto;
  min-height: 0;
}
.rep-card-wrap.has-img::after,
.rep-card-wrap.has-img::before {
  display: none;
}
.rep-card-img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 1;
  transition: opacity 0.25s ease;
}
.rep-card-img.is-pending {
  opacity: 0;
  position: absolute;
}
@keyframes cardShine {
  from { background-position: 120% 0; }
  to { background-position: -40% 0; }
}
.entry-has-photo { cursor: pointer; }
.entry.is-openable { cursor: pointer; }
.entry.is-openable:active { transform: scale(0.99); }
.entry-proof {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
}
.entry-media {
  margin-top: 10px;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0f141a;
  min-height: 120px;
}
.entry-media.is-ready {
  cursor: zoom-in;
}
.entry-media.is-ready:active {
  transform: scale(0.995);
}
.entry-shot {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #0f141a;
  pointer-events: none;
}
.entry-media-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 0;
  background: rgba(8, 12, 16, 0.72);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.entry-media-badge svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  touch-action: none;
  overscroll-behavior: none;
}
.media-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.media-lightbox.hidden {
  display: none;
}
.media-lightbox-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: max(48px, env(safe-area-inset-top)) 12px max(40px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}
.media-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  background: transparent;
}
.media-lightbox-x {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.media-lightbox-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(14px, env(safe-area-inset-bottom));
  margin: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  pointer-events: none;
}
.support-shot {
  cursor: zoom-in;
}
.rep-entry-detail {
  display: grid;
  gap: 12px;
}
.rep-entry-detail .rep-entry-card {
  padding: 14px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
}
.rep-entry-actions {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.rep-dispute-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 12px;
}
.rep-dispute-photos:empty { display: none; }
.rep-dispute-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #12161b;
}
.rep-dispute-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rep-dispute-thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.rep-dispute-actions {
  display: grid;
  gap: 8px;
}
.rep-dispute-attach {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
.rep-name { display: block; margin-bottom: 6px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes viewOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-10px) scale(0.99); }
}
@keyframes fadeRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDrop {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(6px); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(0.96); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  to { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.96); }
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(61, 222, 122, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(61, 222, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 222, 122, 0); }
}
@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(-16px, 20px); }
}
@keyframes floaty {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(18px) scale(1.06); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shine {
  0%, 55% { transform: translateX(-120%); }
  75%, 100% { transform: translateX(120%); }
}

/* --- Exchange preview (deep-link only) --- */
#view-exchange,
#view-exchange-req,
#view-exchange-terms {
  display: grid;
  gap: 14px;
  align-content: start;
}
#view-exchange-req > button.back,
#view-exchange-terms > button.back {
  width: auto;
  max-width: max-content;
  justify-self: start;
  margin: 0;
}
.ex-top {
  display: grid;
  gap: 4px;
  margin: 0;
}
.ex-title {
  margin: 0;
  font-family: var(--display, var(--ui));
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.ex-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.ex-wallet-field {
  margin: 0;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.16);
}
.ex-wallet-field .cp-kicker {
  display: block;
  margin: 0 0 10px;
}
.ex-wallet-field .choice-grid {
  margin: 0;
  gap: 8px;
}
.ex-wallet-field .choice-btn {
  min-height: 58px;
  padding: 11px 12px;
  border-radius: 14px;
}
.ex-stack {
  position: relative;
  display: grid;
  gap: 10px;
  margin: 0;
}
.ex-pane {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}
.ex-pane[data-side="to"] {
  border-color: rgba(47, 224, 200, 0.22);
  background:
    linear-gradient(165deg, rgba(47, 224, 200, 0.1), rgba(255, 255, 255, 0.02));
}
.ex-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.ex-max,
.ex-est {
  appearance: none;
  border: 0;
  background: rgba(47, 224, 200, 0.14);
  color: var(--accent-2);
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
}
.ex-est {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: default;
}
.ex-pane-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.ex-pane-body-solo {
  grid-template-columns: minmax(0, 1fr);
}
.ex-amount {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--display, var(--ui));
  font-size: clamp(28px, 8vw, 36px);
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.05;
  padding: 0;
  outline: none;
}
.ex-amount-out {
  color: var(--accent-2);
}
.ex-amount::placeholder {
  color: rgba(244, 247, 251, 0.28);
}
.ex-asset {
  appearance: none;
  max-width: 132px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    rgba(0, 0, 0, 0.28)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237af0df' d='M1.1 1.2 6 6.1l4.9-4.9'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 0 30px 0 12px;
}
.ex-bal {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.ex-swap {
  appearance: none;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #171c24;
  color: var(--accent-2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}
.ex-swap:active {
  transform: translate(-50%, -50%) scale(0.94) rotate(180deg);
}
.ex-arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #171c24;
  color: var(--accent-2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.ex-asset-fixed {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(47, 224, 200, 0.35);
  background: rgba(47, 224, 200, 0.12);
  color: var(--accent-2);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.ex-meta {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}
.ex-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.ex-meta-row strong {
  color: var(--ink);
  font-weight: 700;
  text-align: right;
}
.ex-cta {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
  font-weight: 750;
}
.ex-cta:disabled {
  opacity: 0.55;
}
.ex-hint {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.ex-step-top {
  display: grid;
  gap: 4px;
  margin: 0 0 4px;
}
.ex-step-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.ex-step-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.ex-form {
  display: grid;
  gap: 12px;
}
.ex-form .field {
  margin: 0;
}
.ex-form input,
.ex-select {
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 22, 28, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 0 14px;
  outline: none;
}
.ex-bank-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.ex-bank-grid .ex-bank-btn {
  appearance: none;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 22, 28, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.ex-bank-grid .ex-bank-btn.active {
  border-color: rgba(47, 224, 200, 0.55);
  background: rgba(47, 224, 200, 0.14);
  color: var(--accent-2);
}
.ex-bank-grid .ex-bank-btn:active {
  transform: scale(0.98);
}
.ex-dd-field {
  position: relative;
}
.ex-dd-trigger {
  appearance: none;
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    rgba(18, 22, 28, 0.72)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237af0df' d='M1.1 1.2 6 6.1l4.9-4.9'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  text-align: left;
  padding: 0 36px 0 14px;
  cursor: pointer;
}
.ex-dd-trigger[aria-expanded="true"] {
  border-color: rgba(47, 224, 200, 0.45);
}
.ex-dd-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1a2029;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  -webkit-overflow-scrolling: touch;
}
.ex-dd-menu.hidden {
  display: none;
}
.ex-dd-option {
  appearance: none;
  width: 100%;
  display: block;
  text-align: left;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 12px;
  cursor: pointer;
}
.ex-dd-option:active,
.ex-dd-option.active {
  background: rgba(47, 224, 200, 0.14);
  color: var(--accent-2);
}
.ex-form input::placeholder {
  color: rgba(244, 247, 251, 0.32);
  font-weight: 500;
}
.ex-terms-box {
  max-height: min(42vh, 340px);
  overflow: auto;
  padding: 14px 14px 14px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 16, 22, 0.85);
  color: rgba(244, 247, 251, 0.88);
  font-size: 13px;
  line-height: 1.45;
  -webkit-overflow-scrolling: touch;
}
.ex-terms-box ol {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}
.ex-terms-box li {
  padding-left: 2px;
}
.ex-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.ex-agree input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent-2, #2fe0c8);
  flex: 0 0 auto;
}
.ex-terms-summary {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
  font-size: 13px;
  color: var(--muted);
}
.ex-terms-summary strong {
  color: var(--ink);
  font-weight: 700;
}
#shell.shell-exchange {
  padding-bottom: 28px;
}
#shell.shell-exchange.shell-exchange-order {
  padding-bottom: 0;
}
#shell.shell-exchange ~ #tabbar,
body:has(#shell.shell-exchange) #tabbar {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .view, .view.is-active, .view.is-leaving, .view.view-enter,
  .signal, .cta-deal, .signal-live em, .home-hero,
  .status-pill .status-dot, .blob, .cta-deal::after,
  .signal-glow, .toast.toast-in, .toast.toast-out,
  #shell.shell-in, #shell.shell-out, .gate.gate-in, .gate.gate-out,
  .confirm-sheet,
  .ex-swap {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .ex-swap {
    transform: translate(-50%, -50%) !important;
  }
  .tab-pill {
    transition: none !important;
  }
}
