/* ============================================================
   mSamex P2P — shared styles
   Brand v3 "Modern Exchange": Charcoal anchor, ONE punch color (Mint).
   Geist + Geist Mono. No gradients. No emoji. Mobile-first (390px),
   desktop scale-up for Market / Trade room / Dashboard.
   Dark default · light via html[data-theme="light"].
   ============================================================ */

:root {
  /* Surfaces — dark */
  --bg:        #0B0E11;
  --surface:   #14181E;
  --elevated:  #1C2127;
  --line:      #252A33;
  --line-soft: #1A1E25;

  /* Brand accent — singular */
  --mint:      #00D68F;
  --mint-deep: #00B377;
  --mint-08:   rgba(0, 214, 143, 0.08);
  --mint-12:   rgba(0, 214, 143, 0.12);
  --mint-18:   rgba(0, 214, 143, 0.18);
  --mint-25:   rgba(0, 214, 143, 0.25);
  --mint-ink:  #00D68F;            /* mint used AS text on bg */

  /* Text */
  --ink:       #0B0E11;
  --snow:      #FFFFFF;
  --txt:       #FFFFFF;
  --dim:       rgba(255, 255, 255, 0.72);
  --mute:      #8B95A3;
  --faint:     rgba(255, 255, 255, 0.46);

  /* Semantic */
  --down:      #F6465D;
  --down-08:   rgba(246, 70, 93, 0.08);
  --down-25:   rgba(246, 70, 93, 0.3);
  --warn:      #F0B90B;
  --warn-08:   rgba(240, 185, 11, 0.08);
  --warn-25:   rgba(240, 185, 11, 0.3);

  /* Type */
  --font: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'JetBrains Mono', monospace;

  /* Radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;

  /* Safe areas */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);

  --tabbar-h: 64px;
  --hdr-bg: rgba(11, 14, 17, 0.78);
  --sheet-shadow: 0 -24px 60px rgba(0,0,0,0.5);
}

html[data-theme="light"] {
  --bg:        #F4F6F8;
  --surface:   #FFFFFF;
  --elevated:  #E8ECF1;
  --line:      #D8DEE6;
  --line-soft: #E3E8EE;
  --mint-ink:  #009468;
  --txt:       #0B0E11;
  --snow:      #0B0E11;
  --dim:       #3D454F;
  --mute:      #8B95A3;
  --faint:     rgba(11, 14, 17, 0.4);
  --hdr-bg:    rgba(244, 246, 248, 0.82);
  --sheet-shadow: 0 -24px 60px rgba(20, 30, 40, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; color: inherit; }
img, svg { display: block; }
::selection { background: var(--mint); color: var(--ink); }

.mono { font-family: var(--mono); font-feature-settings: "tnum" 1; }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.up { color: var(--mint-ink); }
.down { color: var(--down); }
.muted { color: var(--mute); }
.dim { color: var(--dim); }

/* ---- App shell ---- */
.shell {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

/* ============================================================
   LOGO / WORDMARK
   ============================================================ */
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand .mesh { flex-shrink: 0; }
.wordmark {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: -0.04em;
  font-size: 19px;
  line-height: 1;
  color: var(--txt);
}
.wordmark .s { color: var(--mint-ink); }
.app-pill {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mint-ink);
  border: 1px solid var(--mint-25);
  background: var(--mint-08);
  padding: 3px 7px;
  border-radius: 6px;
  line-height: 1;
}

/* ============================================================
   HEADER (sticky, glassy)
   ============================================================ */
.hdr {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: calc(12px + var(--sat)) 18px 12px;
  background: var(--hdr-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.hdr-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative;
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--dim);
  transition: border-color .14s ease;
}
.icon-btn:hover { border-color: var(--mute); }
.icon-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.icon-btn .dot {
  position: absolute; top: 6px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--mint); border: 2px solid var(--bg);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 20px;
  min-height: 46px;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.975); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.btn-primary { background: var(--mint); color: var(--ink); }
.btn-primary:hover { background: var(--mint-deep); }
.btn-ghost { background: transparent; color: var(--txt); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--mute); }
.btn-danger { background: transparent; color: var(--down); border-color: var(--down-25); }
.btn-danger:hover { background: var(--down-08); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 9px 16px; font-size: 13.5px; }
.btn-lg { min-height: 52px; padding: 15px 24px; font-size: 16px; }
.btn:disabled { opacity: 0.4; pointer-events: none; }

/* ---- Eyebrow / kicker ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mint-ink);
  background: var(--mint-08);
  border: 1px solid var(--mint-25);
  padding: 6px 11px;
  border-radius: 999px;
}
.kicker {
  font-family: var(--mono);
  white-space: nowrap;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mute);
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---- Section primitives ---- */
.sec { padding: 56px 18px; position: relative; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-head { margin-bottom: 28px; }
.h2 {
  font-weight: 700;
  font-size: clamp(28px, 8vw, 40px);
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin: 14px 0 12px;
  text-wrap: balance;
}
.lede { font-size: 15.5px; line-height: 1.55; color: var(--dim); margin: 0; text-wrap: pretty; }
.fine { font-size: 12.5px; color: var(--mute); line-height: 1.55; }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.card-pad { padding: 18px; }

/* ---- Screen scaffold ---- */
.screen-head { padding: 22px 18px 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.screen-head h2 { font-weight: 700; font-size: 26px; letter-spacing: -0.03em; margin: 0; }
.screen-head p { font-size: 13.5px; color: var(--mute); margin: 6px 0 0; }
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; padding: 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mute);
}
.back-btn:hover { color: var(--txt); }
.back-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.subhead { font-family: var(--mono); font-size: 11px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--mute); margin: 0 0 10px; }

/* ============================================================
   BOTTOM TAB BAR + FAB
   ============================================================ */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0; z-index: 70;
  width: 100%; max-width: 460px;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--hdr-bg);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid var(--line);
  padding-bottom: var(--sab);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  min-height: var(--tabbar-h);
  background: none; border: none;
  color: var(--mute);
  font-size: 10.5px; font-weight: 500; letter-spacing: 0.01em;
  transition: color .15s ease;
}
.tab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.tab.is-active { color: var(--mint-ink); }
.tab-fab { position: relative; }
.tab-fab .fab-circle {
  width: 46px; height: 46px; border-radius: 999px;
  background: var(--mint); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  margin-top: -14px;
  box-shadow: 0 6px 18px var(--mint-25);
}
.tab-fab .fab-circle svg { width: 22px; height: 22px; stroke: var(--ink); }
.tab-fab span { margin-top: 2px; white-space: nowrap; }

/* ============================================================
   BOTTOM SHEET / SCRIM / TOAST
   ============================================================ */
.scrim {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(5, 7, 10, 0.66);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed; left: 50%; bottom: 0; z-index: 90;
  width: 100%; max-width: 460px;
  transform: translateX(-50%) translateY(102%);
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 8px 18px calc(20px + var(--sab));
  max-height: 92vh; max-height: 92dvh;
  overflow-y: auto;
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
  box-shadow: var(--sheet-shadow);
}
.sheet.is-open { transform: translateX(-50%) translateY(0); }
.sheet-grab { width: 38px; height: 4px; border-radius: 999px; background: var(--line); margin: 8px auto 14px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sheet-title { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; margin: 0; }
.sheet-sub { font-size: 13px; color: var(--mute); margin: 4px 0 0; }
.sheet-close {
  background: var(--elevated); border: 1px solid var(--line);
  color: var(--dim); width: 34px; height: 34px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px;
}

.toast-wrap {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--sab) + 14px);
  z-index: 120;
  display: flex; flex-direction: column; gap: 8px;
  width: calc(100% - 36px); max-width: 420px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--elevated); border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 13.5px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  animation: toast-in .25s cubic-bezier(.2,.8,.2,1);
}
.toast svg { width: 16px; height: 16px; flex-shrink: 0; stroke: var(--mint); fill: none; stroke-width: 2; }
.toast.t-warn svg { stroke: var(--warn); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================
   FORMS
   ============================================================ */
.field-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); display: block; margin-bottom: 8px; }
.field { margin-bottom: 16px; }
.text-input, .select-input {
  width: 100%;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 13px 14px;
  color: var(--txt);
  font-family: var(--font); font-size: 15px;
  outline: none;
  transition: border-color .14s ease;
}
.text-input:focus, .select-input:focus { border-color: var(--mint); }
.text-input::placeholder { color: var(--faint); }
.select-input { appearance: none; -webkit-appearance: none; cursor: pointer; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ""; position: absolute; right: 14px; top: 50%;
  width: 8px; height: 8px;
  border-right: 1.6px solid var(--mute); border-bottom: 1.6px solid var(--mute);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.amount-input {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 14px 16px;
}
.amount-input:focus-within { border-color: var(--mint); }
.amount-input input {
  flex: 1; min-width: 0;
  background: none; border: none; outline: none;
  color: var(--txt);
  font-family: var(--mono); font-weight: 500;
  font-size: 24px; letter-spacing: -0.02em;
}
.amount-input .cur { font-family: var(--mono); font-size: 14px; color: var(--mute); }
.amount-input input::placeholder { color: var(--faint); }

/* segmented pills */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-item {
  flex: 1; min-width: fit-content;
  text-align: center;
  background: var(--bg); border: 1px solid var(--line);
  color: var(--dim);
  border-radius: var(--r-sm);
  padding: 10px 8px;
  font-weight: 600; font-size: 13px;
  transition: all .14s ease;
}
.seg-item small { display: block; font-family: var(--mono); font-weight: 400; font-size: 9.5px; color: var(--mute); margin-top: 3px; letter-spacing: 0.04em; }
.seg-item.is-active { border-color: var(--mint); background: var(--mint-08); color: var(--txt); }
.seg-item.is-active small { color: var(--mint-ink); }
.seg-item.is-down.is-active { border-color: var(--down); background: var(--down-08); }

/* toggle switch */
.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .knob {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--elevated); border: 1px solid var(--line);
  transition: background .15s ease, border-color .15s ease;
  cursor: pointer;
}
.switch .knob::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--mute);
  transition: transform .18s cubic-bezier(.2,.8,.2,1), background .15s ease;
}
.switch input:checked + .knob { background: var(--mint-18); border-color: var(--mint); }
.switch input:checked + .knob::after { transform: translateX(18px); background: var(--mint); }

/* check chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
  background: var(--bg); border: 1px solid var(--line);
  color: var(--dim);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 13px; font-weight: 500;
  transition: all .14s ease;
  min-height: 36px;
}
.chip.is-active { border-color: var(--mint); background: var(--mint-08); color: var(--txt); }
.chip svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* setting / list rows */
.list-row {
  display: flex; align-items: center; gap: 13px;
  width: 100%; text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 15px 16px;
  min-height: 56px;
  transition: border-color .14s ease;
}
button.list-row:hover { border-color: var(--mute); }
.list-row .lr-ic {
  width: 34px; height: 34px; border-radius: var(--r-sm); flex-shrink: 0;
  background: var(--elevated); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--mint-ink);
}
.list-row .lr-ic svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.list-row .lr-body { flex: 1; min-width: 0; }
.list-row .lr-body strong { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.list-row .lr-body span { display: block; font-size: 12px; color: var(--mute); margin-top: 1px; }
.list-row .chev { color: var(--faint); flex-shrink: 0; }
.list-row .chev svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.list-stack { display: flex; flex-direction: column; gap: 10px; padding: 0 18px; }

/* ============================================================
   STATUS PILLS + BADGES + TRUST
   ============================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 9px;
  border: 1px solid var(--line);
  background: var(--elevated); color: var(--dim);
  white-space: nowrap;
}
.pill.p-mint  { background: var(--mint-08); border-color: var(--mint-25); color: var(--mint-ink); }
.pill.p-warn  { background: var(--warn-08); border-color: var(--warn-25); color: var(--warn); }
.pill.p-down  { background: var(--down-08); border-color: var(--down-25); color: var(--down); }
.pill .pdot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.tbadge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em;
  color: var(--mute);
  background: var(--elevated); border: 1px solid var(--line);
  padding: 3px 7px; border-radius: 6px;
  white-space: nowrap;
}
.tbadge svg { width: 11px; height: 11px; stroke: var(--mint-ink); fill: none; stroke-width: 2; flex-shrink: 0; }
.tbadge.b-shield { color: var(--mint-ink); border-color: var(--mint-25); background: var(--mint-08); }

/* trust meter */
.trust-meter { display: flex; align-items: center; gap: 10px; }
.trust-meter .tm-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--elevated); overflow: hidden; }
.trust-meter .tm-bar span { display: block; height: 100%; border-radius: 999px; background: var(--mint); transition: width .6s cubic-bezier(.2,.8,.2,1); }
.trust-meter .tm-val { font-family: var(--mono); font-weight: 500; font-size: 15px; letter-spacing: -0.01em; }
.trust-meter .tm-val small { font-size: 10px; color: var(--mute); }

/* avatar */
.avatar {
  border-radius: 999px; flex-shrink: 0;
  background: var(--elevated); border: 1px solid var(--line);
  color: var(--mint-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  position: relative;
}
.avatar.online::after {
  content: ""; position: absolute; bottom: -1px; right: -1px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--mint); border: 2px solid var(--surface);
}

/* ============================================================
   AD CARD (order book row)
   ============================================================ */
.ad-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 15px;
  transition: border-color .15s ease;
}
.ad-card:hover { border-color: var(--mute); }
.ad-card.is-featured { border-color: var(--mint-25); background: linear-gradient(150deg, var(--mint-08), transparent 50%), var(--surface); }
.ad-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ad-trader { flex: 1; min-width: 0; }
.ad-trader .name { display: flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.ad-trader .meta { font-family: var(--mono); font-size: 10.5px; color: var(--mute); margin-top: 2px; }
.ad-price { text-align: right; }
.ad-price .val { font-family: var(--mono); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.ad-price .val small { font-size: 11px; color: var(--mute); font-weight: 400; }
.ad-price .lbl { font-family: var(--mono); font-size: 9.5px; color: var(--mute); letter-spacing: 0.06em; }
.ad-mid { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.ad-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ad-limits { font-family: var(--mono); font-size: 11px; color: var(--mute); line-height: 1.45; }
.ad-limits b { color: var(--dim); font-weight: 500; }

/* ============================================================
   COUNTDOWN TIMER + STEP TRACKER
   ============================================================ */
.timer {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-weight: 500;
  font-size: 22px; letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.timer svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.timer.t-urgent { color: var(--warn); }
.timer.t-critical { color: var(--down); animation: pulse 1.2s infinite; }

.steps { display: flex; flex-direction: column; }
.step { display: flex; gap: 13px; position: relative; padding-bottom: 20px; }
.step:last-child { padding-bottom: 0; }
.step-node {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; z-index: 1;
  background: var(--elevated); border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: var(--mute);
  transition: all .3s ease;
}
.step-node svg { width: 13px; height: 13px; stroke: var(--ink); fill: none; stroke-width: 2.6; }
.step-line { position: absolute; left: 12.5px; top: 26px; bottom: 0; width: 1.5px; background: var(--line); }
.step:last-child .step-line { display: none; }
.step.is-done .step-node { background: var(--mint); border-color: var(--mint); }
.step.is-done .step-line { background: var(--mint-25); }
.step.is-active .step-node { border-color: var(--mint); color: var(--mint-ink); box-shadow: 0 0 0 4px var(--mint-12); }
.step-body { flex: 1; min-width: 0; padding-top: 2px; }
.step-body strong { display: block; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--mute); }
.step.is-active .step-body strong, .step.is-done .step-body strong { color: var(--txt); }
.step-body span { display: block; font-size: 12px; color: var(--mute); margin-top: 2px; }

/* ============================================================
   PAYMENT DETAILS CARD
   ============================================================ */
.pay-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.pay-row {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line-soft);
}
.pay-row:last-child { border-bottom: none; }
.pay-row .pk { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); width: 84px; flex-shrink: 0; }
.pay-row .pv { flex: 1; min-width: 0; font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.copy-btn {
  width: 44px; height: 44px; margin: -8px -8px -8px 0;
  border-radius: var(--r-sm);
  background: none; border: none;
  color: var(--mute);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: color .14s ease;
}
.copy-btn:hover { color: var(--mint-ink); }
.copy-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.copy-btn.copied { color: var(--mint-ink); }

/* ============================================================
   SAFETY BANNERS
   ============================================================ */
.banner {
  display: flex; gap: 10px; align-items: flex-start;
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 12.5px; line-height: 1.5;
}
.banner svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; stroke: currentColor; fill: none; stroke-width: 2; }
.banner p { margin: 0; color: var(--dim); }
.banner strong { font-weight: 600; color: var(--txt); }
.banner.b-mint { background: var(--mint-08); border: 1px solid var(--mint-25); }
.banner.b-mint svg { stroke: var(--mint-ink); }
.banner.b-warn { background: var(--warn-08); border: 1px solid var(--warn-25); }
.banner.b-warn svg { stroke: var(--warn); }
.banner.b-down { background: var(--down-08); border: 1px solid var(--down-25); }
.banner.b-down svg { stroke: var(--down); }

/* ============================================================
   CHAT
   ============================================================ */
/* chat pane behaves like a messenger on mobile: feed scrolls, dock pinned.
   Height is set by JS (trade room) to fill the viewport under the tabs. */
.trade-chat-pane { display: flex; flex-direction: column; }
.trade-chat-pane .chat-scroll { flex: 1 1 auto; overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; }
.trade-chat-pane .chat-dock { flex-shrink: 0; }

.chat-feed { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; }
.msg { max-width: 82%; }
.msg .bubble {
  border-radius: 14px;
  padding: 10px 13px;
  font-size: 14px; line-height: 1.45;
}
.msg .msg-meta { font-family: var(--mono); font-size: 9.5px; color: var(--faint); margin-top: 4px; letter-spacing: 0.04em; }
.msg.m-them { align-self: flex-start; }
.msg.m-them .bubble { background: var(--elevated); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.m-you { align-self: flex-end; text-align: right; }
.msg.m-you .bubble { background: var(--mint-12); border: 1px solid var(--mint-25); border-bottom-right-radius: 5px; text-align: left; }
.msg.m-sys { align-self: center; max-width: 92%; text-align: center; }
.msg.m-sys .bubble {
  background: none; border: none; padding: 2px 8px;
  font-family: var(--mono); font-size: 11px; color: var(--mute);
}
.msg.m-sys.sys-mint .bubble { color: var(--mint-ink); }
.msg .bubble img { max-width: 100%; border-radius: 9px; }
.chat-quick { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.chat-quick::-webkit-scrollbar { display: none; }
.composer {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 6px 6px 16px;
}
.composer input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--txt); font-family: var(--font); font-size: 14.5px; }
.composer input::placeholder { color: var(--faint); }
.composer .send {
  width: 38px; height: 38px; border-radius: 999px; border: none;
  background: var(--mint); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.composer .send svg { width: 16px; height: 16px; stroke: var(--ink); fill: none; stroke-width: 2.2; }
.composer .attach { background: none; border: none; color: var(--mute); width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.composer .attach svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }

/* ============================================================
   STATS / TABLES / MISC
   ============================================================ */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 15px 16px; position: relative; overflow: hidden; }
.stat-card .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--mute); }
.stat-card .v { font-family: var(--mono); font-weight: 500; font-size: 21px; letter-spacing: -0.02em; margin-top: 7px; }
.stat-card .v small { font-size: 11px; color: var(--mute); }
.stat-card .v.mint { color: var(--mint-ink); }
.stat-card.span2 { grid-column: 1 / -1; }

.cap { height: 6px; border-radius: 999px; background: var(--elevated); overflow: hidden; }
.cap > span { display: block; height: 100%; background: var(--mint); border-radius: 999px; }
.cap.warn > span { background: var(--warn); }

/* stacked balance bar */
.vault-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--elevated); }
.vault-bar span { display: block; height: 100%; }
.vault-bar .vb-res { background: var(--warn); opacity: .8; }
.vault-bar .vb-lock { background: var(--down); opacity: .8; }
.vault-bar .vb-free { background: var(--mint); }
.vault-key { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.vault-key div { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--mute); }
.vault-key i { width: 8px; height: 8px; border-radius: 3px; display: block; }

.tok-dot { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #fff; flex-shrink: 0; }
.dot-usdt { background: #26A17B; }
.dot-usdc { background: #2775CA; }
.dot-bsc  { background: #F0B90B; color: #1a1a1a; }
.dot-eth  { background: #627EEA; }

/* simple table */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); text-align: left; font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* rating stars */
.stars { display: inline-flex; gap: 3px; }
.stars svg { width: 16px; height: 16px; fill: var(--elevated); stroke: var(--line); stroke-width: 1; }
.stars svg.on { fill: var(--mint); stroke: var(--mint); }
.stars.lg svg { width: 30px; height: 30px; }
.stars button { background: none; border: none; padding: 4px; }

/* skeleton shimmer */
.skel { position: relative; overflow: hidden; background: var(--elevated); border-radius: var(--r-sm); }
.skel::after {
  content: ""; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* empty state */
.empty {
  text-align: center; padding: 44px 24px;
  border: 1px dashed var(--line); border-radius: var(--r-md);
}
.empty .e-ic { width: 44px; height: 44px; border-radius: 999px; background: var(--elevated); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; color: var(--mute); }
.empty .e-ic svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.empty h4 { margin: 0 0 6px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.empty p { margin: 0 0 18px; font-size: 13px; color: var(--mute); }

/* pulse network mark scales via width/height attrs; SMIL animation lives in the SVG */

/* offline + announcement bars */
.offline-bar {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: calc(10px + var(--sat)); z-index: 130;
  display: flex; align-items: center; gap: 9px;
  width: calc(100% - 32px); max-width: 440px;
  background: var(--warn-08); border: 1px solid var(--warn-25);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: var(--r-sm); padding: 10px 13px;
  font-size: 12.5px; font-weight: 500; color: var(--txt);
}
.offline-bar svg { width: 15px; height: 15px; stroke: var(--warn); fill: none; stroke-width: 2; flex-shrink: 0; }
.announce {
  display: flex; align-items: center; gap: 9px;
  background: var(--mint-08); border-bottom: 1px solid var(--mint-25);
  padding: 9px 18px;
  font-size: 12.5px;
}
.announce svg { width: 14px; height: 14px; stroke: var(--mint-ink); fill: none; stroke-width: 2; flex-shrink: 0; }
.announce p { margin: 0; flex: 1; color: var(--dim); }
.announce a { color: var(--mint-ink); text-decoration: underline; }
.announce button { background: none; border: none; color: var(--mute); padding: 2px; flex-shrink: 0; }

/* trade room mini status strip (mobile chat tab) */
.mini-strip, .mini-strip.hide-desktop {
  display: flex; align-items: center; gap: 10px;
  width: calc(100% - 36px); margin: 0 18px 12px; text-align: left;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 10px 13px;
}
.mini-strip .ms-timer { font-family: var(--mono); font-weight: 500; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--mint-ink); }
.mini-strip .ms-label { flex: 1; font-size: 12.5px; color: var(--dim); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-strip svg { width: 14px; height: 14px; stroke: var(--mute); fill: none; stroke-width: 2; flex-shrink: 0; }

/* glow */
.glow { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; z-index: 0; }
.glow-mint { background: var(--mint-12); }

/* utility */
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; }
.stack > * + * { margin-top: 12px; }
.pad { padding: 0 18px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; } .mt28 { margin-top: 28px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; } .mb20 { margin-bottom: 20px; }

/* sticky bottom action bar (in-flow screens) */
.action-bar {
  position: sticky; bottom: calc(var(--tabbar-h) + var(--sab));
  z-index: 50;
  padding: 12px 18px;
  background: var(--hdr-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  display: flex; gap: 10px;
}
.action-bar .btn { flex: 1; }

/* ============================================================
   TWEAKS PANEL
   ============================================================ */
.tweaks {
  position: fixed; right: 14px; top: calc(70px + var(--sat)); z-index: 200;
  width: 250px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
  display: none;
}
.tweaks.is-open { display: block; }
.tweaks-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: grab; }
.tweaks-head strong { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; }
.tweaks-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 14px; max-height: 60vh; overflow-y: auto; }
.tweak-lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--mute); display: block; margin-bottom: 7px; }
.tweaks .seg-item { padding: 7px 6px; font-size: 11.5px; border-radius: 8px; }
.tweaks-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 500; }

/* ============================================================
   DESKTOP (≥1020px) — wide stage for market / trade / dashboard
   ============================================================ */
.hide-desktop { display: initial; }
.only-desktop { display: none !important; }

@media (min-width: 1020px) {
  .hide-desktop { display: none !important; }
  .only-desktop { display: initial !important; }
  .shell.is-wide { max-width: 1120px; }
  .shell.is-wide .hdr { padding-left: 26px; padding-right: 26px; }
  .tabbar { display: none; }
  body { padding-bottom: 0 !important; }
  .hdr-nav { display: flex !important; align-items: center; gap: 4px; }
  .hdr-nav button {
    background: none; border: none;
    color: var(--mute); font-weight: 500; font-size: 14px;
    padding: 8px 13px; border-radius: 999px;
    transition: color .14s ease, background .14s ease;
  }
  .hdr-nav button:hover { color: var(--txt); }
  .hdr-nav button.is-active { color: var(--mint-ink); background: var(--mint-08); }
  .action-bar { position: static; background: none; border: none; backdrop-filter: none; padding-left: 0; padding-right: 0; }

  /* market: two columns of ads on wide */
  .market-list.desk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

  /* trade room two-pane */
  .trade-grid { display: grid; grid-template-columns: minmax(380px, 460px) 1fr; gap: 22px; align-items: start; padding: 0 26px; }
  .trade-grid .trade-chat-pane {
    position: sticky; top: 84px;
    border: 1px solid var(--line); border-radius: var(--r-md);
    background: var(--surface);
    display: flex; flex-direction: column;
    height: calc(100dvh - 110px);
    overflow: hidden;
  }
  .trade-grid .trade-chat-pane .chat-scroll { flex: 1; overflow-y: auto; padding: 0 16px; }
  .trade-grid .trade-chat-pane .chat-dock { padding: 10px 16px 14px; border-top: 1px solid var(--line); }
  .trade-tabs { display: none !important; }
  .pane-mob-hidden { display: block !important; }

  .desk-cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .desk-cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .stat-grid.desk-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   RTL (Arabic / Farsi) — flex/grid flip automatically with dir;
   these fix the remaining physical-position spots.
   ============================================================ */
[dir="rtl"] .step-line { left: auto; right: 12.5px; }
[dir="rtl"] .back-btn svg, [dir="rtl"] .chev svg { transform: scaleX(-1); }
[dir="rtl"] .ad-price { text-align: left; }
[dir="rtl"] .msg.m-you .bubble { border-bottom-right-radius: 14px; border-bottom-left-radius: 5px; text-align: right; }
[dir="rtl"] .msg.m-them .bubble { border-bottom-left-radius: 14px; border-bottom-right-radius: 5px; }
[dir="rtl"] .select-wrap::after { right: auto; left: 14px; }
[dir="rtl"] .select-input { padding-right: 14px; padding-left: 32px; }
[dir="rtl"] .copy-btn { margin: -8px 0 -8px -8px; }
[dir="rtl"] .tweaks { right: auto; left: 14px; }
[dir="rtl"] .avatar.online::after { right: auto; left: -1px; }
[dir="rtl"] .icon-btn .dot { right: auto; left: 7px; }
[dir="rtl"] .timer, [dir="rtl"] .ms-timer, [dir="rtl"] .pay-row .pv, [dir="rtl"] .ad-price .val { direction: ltr; unicode-bidi: embed; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
