/* ===========================================================
   دارایی‌ها — Apple-minimal
   سیاه و سفید؛ رنگ فقط برای وضعیت و یک آبی برای تعامل.
   =========================================================== */

:root {
  color-scheme: light dark;

  /* --- سطح و جوهر --- */
  --bg:        #ffffff;
  --surface:   #ffffff;
  --raised:    #f5f5f7;
  --ink:       #000000;
  --ink-2:     #6e6e73;
  --ink-3:     #a1a1a6;
  --hair:      rgba(0, 0, 0, 0.11);
  --hair-soft: rgba(0, 0, 0, 0.06);
  --fill:      rgba(0, 0, 0, 0.05);
  --fill-2:    rgba(0, 0, 0, 0.035);
  --press:     rgba(0, 0, 0, 0.04);
  --chrome:    rgba(255, 255, 255, 0.72);
  --scrim:     rgba(0, 0, 0, 0.28);
  --inverse:   #ffffff;

  /* --- تنها رنگ تعامل --- */
  --blue:      #0071e3;

  /* --- رنگ فقط برای وضعیت --- */
  --pos:       #1d8f3f;
  --warn:      #a8690a;
  --neg:       #c8271f;

  /* --- حرکت --- */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --t-press:  120ms;
  --t-fast:   180ms;
  --t-nav:    240ms;
  --t-sheet:  300ms;

  /* --- اندازه --- */
  --maxw: 620px;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 10px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Arabic",
          "Segoe UI", "Vazirmatn", Tahoma, system-ui, sans-serif;
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* تیره — هم برای تنظیم سیستم، هم برای انتخاب دستی */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #000000;
    --surface:   #0e0e10;
    --raised:    #17171a;
    --ink:       #ffffff;
    --ink-2:     #98989f;
    --ink-3:     #6b6b70;
    --hair:      rgba(255, 255, 255, 0.14);
    --hair-soft: rgba(255, 255, 255, 0.08);
    --fill:      rgba(255, 255, 255, 0.09);
    --fill-2:    rgba(255, 255, 255, 0.055);
    --press:     rgba(255, 255, 255, 0.07);
    --chrome:    rgba(12, 12, 14, 0.72);
    --scrim:     rgba(0, 0, 0, 0.5);
    --inverse:   #000000;
    --blue:      #0a84ff;
    --pos:       #32d158;
    --warn:      #ffb340;
    --neg:       #ff453a;
  }
}
:root[data-theme="dark"] {
  --bg:        #000000;
  --surface:   #0e0e10;
  --raised:    #17171a;
  --ink:       #ffffff;
  --ink-2:     #98989f;
  --ink-3:     #6b6b70;
  --hair:      rgba(255, 255, 255, 0.14);
  --hair-soft: rgba(255, 255, 255, 0.08);
  --fill:      rgba(255, 255, 255, 0.09);
  --fill-2:    rgba(255, 255, 255, 0.055);
  --press:     rgba(255, 255, 255, 0.07);
  --chrome:    rgba(12, 12, 14, 0.72);
  --scrim:     rgba(0, 0, 0, 0.5);
  --inverse:   #000000;
  --blue:      #0a84ff;
  --pos:       #32d158;
  --warn:      #ffb340;
  --neg:       #ff453a;
}

/* ===== پایه ===== */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
  direction: rtl;
}
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
.hidden { display: none !important; }
.screen { position: fixed; inset: 0; background: var(--bg); }

/* اعداد: عرض ثابت، تا رقم‌ها موقع به‌روز شدن نلرزند. */
.num, .row-val, .row-val2, .total-value, .detail-total .v,
.rate-input, .num-input, .wiz-note {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ===== ظرف مرکزی (دسکتاپ) ===== */
.view > *, .nav-header > *, .tabbar-inner, .sheet-inner {
  max-width: var(--maxw);
  margin-inline: auto;
}

/* ===== صفحهٔ قفل ===== */
.lock { display: flex; align-items: center; justify-content: center; padding: 24px; }
.lock-inner { width: 100%; max-width: 340px; text-align: center; }
.lock-logo {
  width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 18px;
  background: var(--ink); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.lock-title { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 6px; }
.lock-sub { color: var(--ink-2); font-size: 16px; line-height: 1.4; margin: 0 0 26px; }
.lock-form { display: flex; flex-direction: column; gap: 10px; }
.pw-input {
  width: 100%; height: 54px; border-radius: var(--r-md); border: 1px solid var(--hair);
  background: var(--surface); padding: 0 16px; font-size: 20px; text-align: center;
  letter-spacing: 0.3em; text-indent: 0.3em; outline: none;
  transition: border-color var(--t-fast) var(--ease-out);
}
.pw-input:focus { border-color: var(--blue); }
.lock-err { color: var(--neg); min-height: 1.4em; margin: 0; font-size: 15px; }
.link-btn {
  color: var(--blue); margin-top: 26px; font-size: 16px; padding: 8px;
  transition: transform var(--t-press) var(--ease-out);
}
.link-btn:active { transform: scale(0.97); }

/* ===== دکمه‌ها ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 20px; border-radius: var(--r-md);
  font-weight: 500; font-size: 17px;
  transition: transform var(--t-press) var(--ease-out),
              background-color var(--t-fast) ease;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.3; }
.btn:disabled:active { transform: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-secondary { background: var(--fill); color: var(--ink); }
.btn-danger { background: var(--neg); color: #fff; }
.btn-big { width: 100%; height: 54px; font-size: 18px; font-weight: 500; }
.btn-block { width: 100%; }

/* ===== نماها ===== */
.app { display: flex; flex-direction: column; }
.view {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: calc(var(--safe-top) + 4px) 16px calc(92px + var(--safe-bottom));
}
.large-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 10px;
}
/* تیتر بزرگ: leading تنگ + tracking منفی.
   آزمون شد: مقدار منفی اتصال حروف فارسی را نمی‌شکند، ولی مقدار مثبت می‌شکند —
   به همین دلیل هیچ‌جای این فایل letter-spacing مثبت روی متن فارسی نیست. */
.large-title h1 {
  font-size: 30px; font-weight: 600; margin: 0; line-height: 1.12;
  letter-spacing: -0.02em;
}
.icon-btn {
  color: var(--ink-2); width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center; margin-inline-end: -8px;
  border-radius: 50%;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-fast) ease;
}
.icon-btn:active { transform: scale(0.94); background: var(--press); }

.section-title {
  font-size: 13px; font-weight: 500; color: var(--ink-3);
  margin: 26px auto 8px; padding-inline: 4px;
}

/* کارت‌ها: مو‌خط به‌جای سایه، در هر دو تم یکسان */
.card {
  background: var(--surface);
  border: 1px solid var(--hair-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.list .row + .row, .list .row + .row-btn,
.list .row-btn + .row, .list .row-btn + .row-btn,
.list > div > .row + .row { border-top: 1px solid var(--hair-soft); }

.row {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 11px 16px;
  width: 100%; text-align: start; background: transparent;
}
.row-btn {
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-fast) ease;
}
.row-btn:active { transform: scale(0.99); background: var(--press); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 17px; font-weight: 450; line-height: 1.3; }
.row-sub { font-size: 14px; color: var(--ink-2); line-height: 1.3; margin-top: 2px; }
.row-end { text-align: end; flex-shrink: 0; }
.row-val { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }
.row-val2 { font-size: 13px; color: var(--ink-2); letter-spacing: -0.005em; margin-top: 1px; }
.chev {
  width: 7px; height: 7px; border-top: 1.7px solid var(--ink-3); border-left: 1.7px solid var(--ink-3);
  transform: rotate(-45deg); margin-inline-start: 2px; flex-shrink: 0;
}
.danger .row-title { color: var(--neg); }

/* نشان دارایی: تک‌رنگ. هویت از نام می‌آید، نه از رنگ. */
.asset-ico,
.asset-ico.usd, .asset-ico.eur, .asset-ico.coin, .asset-ico.gold {
  width: 34px; height: 34px; border-radius: var(--r-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 500;
  background: var(--fill); color: var(--ink-2);
}

.empty { text-align: center; color: var(--ink-2); padding: 48px 20px; font-size: 16px; line-height: 1.6; }
.empty p { margin: 4px 0; }
.about { text-align: center; color: var(--ink-3); font-size: 13px; margin: 32px auto 12px; padding-inline: 10px; line-height: 1.5; }

/* ===== جمع کل: بدون کارت، بدون گرادیان ===== */
.total-card { padding: 8px 4px 20px; }
.total-label { font-size: 14px; color: var(--ink-2); }
.total-value {
  font-size: clamp(2.375rem, 10vw, 3.125rem);
  font-weight: 600;
  letter-spacing: -0.035em;   /* ارقام — امن برای خط فارسی */
  line-height: 1.04;
  margin-top: 6px;
  overflow-wrap: anywhere;    /* به‌جای break-all که عدد را وسط سه‌رقمی می‌شکست */
}
.total-unit { font-size: 0.42em; font-weight: 450; color: var(--ink-2); letter-spacing: 0; }
.rates-line {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  color: var(--ink-2); font-size: 13px;
  background: var(--fill-2); border-radius: 999px; padding: 6px 12px;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-fast) ease;
}
.rates-line:active { transform: scale(0.97); background: var(--fill); }
.rates-line.spin .refresh-ico { animation: spin 0.85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* خرید / فروش — سطح تک‌رنگ، رنگ فقط روی نشانهٔ وضعیت */
.action-row { display: flex; gap: 10px; margin-top: 4px; }
.action-btn {
  flex: 1; height: 58px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--hair);
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 17px; font-weight: 500; color: var(--ink);
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-fast) ease;
}
.action-btn:active { transform: scale(0.97); background: var(--press); }
.action-ico {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; line-height: 1; padding-bottom: 1px; color: #fff;
}
.action-btn.buy  .action-ico { background: var(--pos); }
.action-btn.sell .action-ico { background: var(--neg); }

/* ===== نوار پایین ===== */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 6px 8px calc(var(--safe-bottom) + 6px);
  background: var(--chrome);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--hair-soft);
}
.tabbar-inner { display: flex; justify-content: space-around; }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--ink-3); font-size: 11px; padding: 4px 0;
  transition: transform var(--t-press) var(--ease-out), color var(--t-fast) ease;
}
.tab svg { width: 25px; height: 25px; }
.tab.on { color: var(--blue); }
.tab:active { transform: scale(0.92); }

/* ===== صفحهٔ جزئیات ===== */
.detail {
  display: flex; flex-direction: column; z-index: 6;
  transform: translateX(-100%);
  transition: transform var(--t-nav) var(--ease-out);
}
.detail.show { transform: translateX(0); }
.detail.hidden { display: flex !important; pointer-events: none; }
.detail:not(.show) { pointer-events: none; }
.nav-header {
  padding: calc(var(--safe-top) + 8px) 8px 10px;
  background: var(--chrome);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hair-soft);
}
.nav-header > * {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.nav-header h1 {
  font-size: 16px; font-weight: 500; margin: 0; text-align: center;
  letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.back-btn {
  color: var(--blue); display: flex; align-items: center; font-size: 16px;
  justify-self: start; padding: 6px 6px;
  transition: transform var(--t-press) var(--ease-out);
}
.back-btn:active { transform: scale(0.96); }
.chev-back {
  width: 9px; height: 9px; border-top: 2px solid var(--blue); border-right: 2px solid var(--blue);
  transform: rotate(45deg); margin-inline-end: 7px; margin-inline-start: 2px;
}
.detail .view { padding-top: 14px; padding-bottom: calc(40px + var(--safe-bottom)); }
.detail-total { text-align: center; padding: 8px 0 2px; }
.detail-total .v { font-size: 30px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; }
.detail-total .l { color: var(--ink-2); font-size: 14px; line-height: 1.5; margin-top: 4px; }
.detail-actions { display: flex; gap: 8px; margin: 18px 0 4px; }
.detail-actions .btn { flex: 1; height: 46px; font-size: 16px; }

/* ===== برگهٔ پایین ===== */
.sheet-wrap { position: fixed; inset: 0; z-index: 20; }
.sheet-backdrop {
  position: absolute; inset: 0; background: var(--scrim);
  opacity: 0; transition: opacity var(--t-sheet) var(--ease-out);
}
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 94%;
  background: var(--bg);
  border-top: 1px solid var(--hair);
  border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--t-sheet) var(--ease-drawer);
}
.sheet-wrap.show .sheet-backdrop { opacity: 1; }
.sheet-wrap.show .sheet { transform: translateY(0); }
.sheet-header { padding: 16px 16px 4px; }
.sheet-header > * {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.sheet-header h2 { margin: 0; font-size: 16px; font-weight: 500; text-align: center; }
.sheet-cancel, .sheet-done {
  color: var(--blue); font-size: 16px; padding: 6px 4px;
  transition: transform var(--t-press) var(--ease-out);
}
.sheet-cancel { justify-self: start; }
.sheet-done { justify-self: end; font-weight: 500; }
.sheet-cancel:active, .sheet-done:active { transform: scale(0.96); }
.sheet-done:disabled { opacity: 0.3; }
.sheet-done:disabled:active { transform: none; }
.sheet-body {
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 4px 16px calc(24px + var(--safe-bottom));
}
.sheet-body > * { max-width: var(--maxw); margin-inline: auto; }

/* ===== ورودی‌ها ===== */
.field-label { font-size: 13px; color: var(--ink-3); margin: 18px 4px 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 9px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--hair);
  font-size: 16px; font-weight: 450; color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  transition: transform var(--t-press) var(--ease-out),
              background-color var(--t-fast) ease,
              border-color var(--t-fast) ease,
              color var(--t-fast) ease;
}
.chip .sub { font-size: 13px; color: var(--ink-2); font-weight: 400; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--inverse); }
.chip.on .sub { color: var(--inverse); opacity: 0.62; }
.chip.add { color: var(--blue); background: transparent; border-color: var(--hair); }
.chip:active { transform: scale(0.97); }
.chip .badge { font-size: 13px; color: var(--ink-3); }
.chip.on .badge { color: var(--inverse); opacity: 0.62; }

.text-input {
  width: 100%; height: 50px; border-radius: var(--r-md);
  border: 1px solid var(--hair); background: var(--surface);
  padding: 0 14px; font-size: 17px; outline: none;
  transition: border-color var(--t-fast) var(--ease-out);
}
.text-input:focus { border-color: var(--blue); }
.num-input {
  font-size: 30px; height: 66px; text-align: center; font-weight: 500;
  letter-spacing: -0.02em; direction: ltr;
}
.num-input::placeholder { font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.hint { font-size: 14px; color: var(--ink-2); margin: 8px 4px 0; text-align: center; }
.hint.err { color: var(--neg); }
.field-row { display: flex; align-items: center; gap: 10px; }
.mini-btn {
  color: var(--blue); font-size: 15px; font-weight: 450; padding: 10px;
  white-space: nowrap; border-radius: var(--r-sm);
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-fast) ease;
}
.mini-btn:active { transform: scale(0.97); background: var(--fill-2); }
.mini-btn.block { display: block; width: 100%; text-align: center; margin-top: 12px; }
.unit-tag { font-size: 16px; color: var(--ink-3); flex-shrink: 0; min-width: 40px; }
.preview {
  margin-top: 18px; background: var(--fill-2); border-radius: var(--r-md);
  padding: 14px 16px; text-align: center;
}
.preview .l { font-size: 13px; color: var(--ink-2); }
.preview .v { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }

/* ===== سوئیچ و سگمنت ===== */
.switch { position: relative; width: 50px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span {
  position: absolute; inset: 0; background: var(--fill); border-radius: 30px;
  transition: background-color var(--t-fast) var(--ease-out);
}
.switch span::after {
  content: ""; position: absolute; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; top: 2px; right: 2px; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform var(--t-fast) var(--ease-out);
}
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(-20px); }

.segmented {
  display: flex; background: var(--fill-2); border-radius: var(--r-sm); padding: 2px;
}
.segmented button {
  padding: 7px 13px; border-radius: 8px; font-size: 14px; font-weight: 450; color: var(--ink-2);
  transition: transform var(--t-press) var(--ease-out),
              background-color var(--t-fast) ease, color var(--t-fast) ease;
}
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.segmented button:active { transform: scale(0.96); }

.rate-input {
  width: 148px; height: 40px; text-align: end; font-size: 16px;
  border-radius: var(--r-sm); background: var(--fill-2); border: 1px solid transparent;
  padding: 0 10px; outline: none; direction: ltr;
  transition: border-color var(--t-fast) var(--ease-out);
}
.rate-input:focus { border-color: var(--blue); background: var(--surface); }

/* ===== تاریخچه ===== */
.hist-date { font-size: 13px; color: var(--ink-3); margin: 24px 4px 8px; }
.tx-kind {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 500; flex-shrink: 0;
  background: var(--fill);
}
.tx-kind.buy  { color: var(--pos); }
.tx-kind.sell { color: var(--neg); }
.tx-kind.move { color: var(--warn); font-size: 14px; }

/* ===== پیام ===== */
.alert-wrap {
  position: fixed; inset: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  background: var(--scrim); padding: 24px;
}
.alert {
  background: var(--surface); border: 1px solid var(--hair-soft);
  border-radius: var(--r-lg); width: 100%; max-width: 290px;
  text-align: center; overflow: hidden;
  /* مودال لنگر ندارد، پس از مرکز باز می‌شود */
  transform-origin: center;
}
.alert h3 { margin: 22px 18px 6px; font-size: 17px; font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; }
.alert p { margin: 0 18px 18px; font-size: 15px; color: var(--ink-2); white-space: pre-line; line-height: 1.5; }
.alert-btns { display: flex; border-top: 1px solid var(--hair-soft); }
.alert-btns button {
  flex: 1; height: 48px; font-size: 16px; color: var(--blue);
  transition: background-color var(--t-fast) ease;
}
.alert-btns button + button { border-inline-start: 1px solid var(--hair-soft); }
.alert-btns button.bold { font-weight: 500; }
.alert-btns button.red { color: var(--neg); }
.alert-btns button:active { background: var(--press); }
.alert input.text-input {
  width: calc(100% - 36px); margin: 0 18px 18px; height: 46px; font-size: 16px;
  background: var(--fill-2);
}

.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom));
  transform: translateX(-50%);
  background: var(--ink); color: var(--bg);
  padding: 10px 18px; border-radius: 999px; font-size: 15px; z-index: 40;
  white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis;
}

/* ===== فرم مرحله‌به‌مرحله ===== */
.wiz-dots { display: flex; justify-content: center; gap: 6px; padding: 14px 0 22px; }
.wiz-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--fill);
  transition: background-color var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out);
}
.wiz-dot.done { background: var(--ink-3); }
.wiz-dot.on { background: var(--ink); transform: scale(1.4); }
.wiz-q {
  font-size: 22px; font-weight: 600; text-align: center;
  margin: 0 6px 8px; line-height: 1.25; letter-spacing: -0.015em;
}
.wiz-hint { font-size: 15px; color: var(--ink-2); text-align: center; margin: 0 6px 4px; line-height: 1.45; }
.wiz-body { margin-top: 22px; min-height: 116px; }
.wiz-chips { justify-content: center; }
.chip.big { min-height: 52px; font-size: 17px; padding: 10px 18px; }
.chip.big .sub { font-size: 13px; margin-inline-start: 4px; }
.chip .tick { font-size: 15px; color: var(--ink-3); margin-inline-end: 3px; }
.chip.on .tick { color: var(--inverse); }
.wiz-nav { display: flex; gap: 10px; margin-top: 28px; }
.wiz-nav .btn { flex: 1; height: 54px; font-size: 17px; }
.wiz-nav .btn-secondary { flex: 0 0 32%; }
.wiz-note {
  text-align: center; font-size: 16px; color: var(--ink-2);
  margin-top: 14px; min-height: 1.5em; font-weight: 450;
}
.wiz-note.err { color: var(--neg); }

/* ===== اشاره‌گر دقیق (دسکتاپ) ===== */
@media (hover: hover) and (pointer: fine) {
  .row-btn:hover        { background: var(--fill-2); }
  .action-btn:hover     { background: var(--fill-2); }
  .chip:hover           { border-color: var(--ink-3); }
  .chip.on:hover        { border-color: var(--ink); }
  .icon-btn:hover       { background: var(--fill-2); color: var(--ink); }
  .alert-btns button:hover { background: var(--fill-2); }
  .mini-btn:hover       { background: var(--fill-2); }
  .rates-line:hover     { background: var(--fill); }
  .tab:hover            { color: var(--ink-2); }
  .tab.on:hover         { color: var(--blue); }
}

/* ===== شفافیت کم‌تر ===== */
@media (prefers-reduced-transparency: reduce) {
  .tabbar, .nav-header {
    background: var(--bg);
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
}

/* ===== کنتراست بالا ===== */
@media (prefers-contrast: more) {
  :root { --hair: rgba(0,0,0,0.5); --hair-soft: rgba(0,0,0,0.35); --ink-2: #3a3a3c; --ink-3: #5a5a5e; }
  :root[data-theme="dark"], :root:not([data-theme="light"]) {
    --hair: rgba(255,255,255,0.55); --hair-soft: rgba(255,255,255,0.4);
  }
  .card, .chip, .action-btn { border-width: 1px; }
}

/* ===== حرکت کم‌تر =====
   جابه‌جایی حذف می‌شود، اما فیدبک محو/رنگ می‌ماند. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn, .chip, .row-btn, .action-btn, .tab, .icon-btn,
  .mini-btn, .rates-line, .back-btn, .sheet-cancel, .sheet-done, .link-btn,
  .segmented button {
    transition: background-color 120ms ease, color 120ms ease, opacity 120ms ease !important;
  }
  .btn:active, .chip:active, .row-btn:active, .action-btn:active, .tab:active,
  .icon-btn:active, .mini-btn:active, .rates-line:active, .back-btn:active,
  .sheet-cancel:active, .sheet-done:active, .link-btn:active, .segmented button:active {
    transform: none;
    opacity: 0.6;
  }
  .detail { transition: opacity 150ms ease !important; transform: none !important; opacity: 0; }
  .detail.show { opacity: 1; }
  .sheet  { transition: opacity 150ms ease !important; transform: none !important; opacity: 0; }
  .sheet-wrap.show .sheet { opacity: 1; }
  .rates-line.spin .refresh-ico { animation: none; }
  .wiz-dot.on { transform: none; }
}
