/* FaraShop — iOS / Telegram style. Brand: gold gradient on system greys. Font: Vazirmatn (OFL), self-hosted. */
@font-face { font-family: "Vazirmatn"; src: url("/assets/fonts/Vazirmatn.woff2") format("woff2-variations"), url("/assets/fonts/Vazirmatn.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --text: #000000;
  --hint: #8E8E93;
  --sep: rgba(60, 60, 67, .14);
  --fill: rgba(118, 118, 128, .12);
  --gold: #FFB020;
  --gold-grad: linear-gradient(135deg, #FFD65C 0%, #FFB020 45%, #FF8A00 100%);
  --on-gold: #1F1300;
  --gold-soft: rgba(255, 176, 32, .14);
  --green: #34C759;
  --red: #FF3B30;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);
  --font: "Vazirmatn", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Tahoma, sans-serif;
  --spring: cubic-bezier(.2, .9, .25, 1.15);
  --ease: cubic-bezier(.25, .8, .25, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --card: #1C1C1E; --text: #FFFFFF; --hint: #8E8E93;
    --sep: rgba(84, 84, 88, .6); --fill: rgba(118, 118, 128, .24); --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --card: #1C1C1E; --text: #FFFFFF; --hint: #8E8E93;
  --sep: rgba(84, 84, 88, .6); --fill: rgba(118, 118, 128, .24); --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body { -webkit-font-smoothing: antialiased; font-size: 16px; line-height: 1.5; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
a { color: inherit; }
.app { max-width: 520px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 16px calc(110px + env(safe-area-inset-bottom)); }
.tap { transition: transform .18s var(--ease), opacity .18s; }
.tap:active { transform: scale(.96); }

/* header */
.top { display: flex; align-items: center; gap: 10px; padding: 6px 2px 2px; animation: fade .5s var(--ease) both; }
.logo { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 4px 14px rgba(255, 138, 0, .35); }
.brand { display: flex; flex-direction: column; line-height: 1.25; flex: 1; }
.brand b { font-size: 17px; letter-spacing: -.2px; }
.brand span { font-size: 12.5px; color: var(--hint); }
.pill { background: var(--fill); padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }

/* hero */
.hero { text-align: center; padding: 14px 8px 18px; }
.hero-emoji { width: 112px; height: 112px; margin: 0 auto 6px; display: grid; place-items: center; font-size: 76px; animation: pop .7s var(--spring) both; filter: drop-shadow(0 10px 24px rgba(255, 176, 32, .35)); }
.hero h1 { margin: 0; font-size: 25px; font-weight: 800; letter-spacing: -.4px; animation: rise .5s var(--ease) .08s both; }
.hero p { margin: 4px 0 0; color: var(--hint); font-size: 15px; animation: rise .5s var(--ease) .14s both; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; animation: rise .5s var(--ease) .2s both; }
.chip-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--card); padding: 6px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }
.chip-badge i { font-style: normal; }

/* segmented control */
.segmented { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--fill); border-radius: 11px; padding: 2px; margin: 4px 0 18px; }
.seg-btn { position: relative; z-index: 1; padding: 8px 0; font-size: 15px; font-weight: 600; border-radius: 9px; transition: color .2s; }
.seg-thumb { position: absolute; top: 2px; bottom: 2px; right: 2px; width: calc(50% - 2px); background: var(--card); border-radius: 9px; box-shadow: 0 3px 8px rgba(0, 0, 0, .12), 0 0 1px rgba(0, 0, 0, .1); transition: transform .35s var(--spring); }
.segmented[data-p="premium"] .seg-thumb { transform: translateX(-100%); }

/* grouped lists */
.label { font-size: 13px; color: var(--hint); padding: 0 16px 6px; }
.foot { font-size: 12.5px; color: var(--hint); padding: 6px 16px 0; margin: 0 0 18px; }
.group { background: var(--card); border-radius: 14px; overflow: hidden; margin-bottom: 18px; box-shadow: var(--shadow); }
.group + .foot { margin-top: -12px; }
.row { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 16px; text-align: right; transition: background .15s; animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.row:not(:last-child)::after { content: ""; position: absolute; bottom: 0; left: 0; right: 56px; height: .5px; background: var(--sep); }
button.row:active { background: var(--fill); }
.row .ico { width: 32px; height: 32px; display: grid; place-items: center; font-size: 25px; flex: none; }
.row .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.row .txt b { font-size: 16px; font-weight: 600; }
.row .txt small { font-size: 12.5px; color: var(--hint); }
.row .price { font-weight: 700; font-size: 15px; white-space: nowrap; }
.row .price small { font-weight: 500; color: var(--hint); font-size: 12px; margin-right: 2px; }
.tag { display: inline-block; background: var(--gold-soft); color: #C77800; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px; margin-right: 6px; vertical-align: 2px; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--sep); flex: none; display: grid; place-items: center; transition: all .25s var(--spring); }
.row.on .radio { background: var(--gold-grad); border-color: transparent; transform: scale(1.08); }
.row.on .radio::after { content: ""; width: 9px; height: 5px; border: solid var(--on-gold); border-width: 0 0 2.2px 2.2px; transform: rotate(-45deg) translate(-1px, -1px); animation: pop .3s var(--spring); }
.row.skel { min-height: 54px; background: linear-gradient(90deg, transparent 0, var(--fill) 50%, transparent 100%) var(--card); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.custom-input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; font-weight: 600; text-align: right; padding: 0; }
.custom-input::placeholder { color: var(--hint); font-weight: 400; }

/* username field */
.field { display: flex; align-items: center; gap: 4px; padding: 6px 16px; min-height: 54px; }
.field .at { color: var(--hint); font-size: 17px; direction: ltr; }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 17px; text-align: left; padding: 8px 0; }
.mini { background: var(--gold-soft); color: #C77800; font-size: 13px; font-weight: 700; padding: 6px 11px; border-radius: 999px; white-space: nowrap; }
.rcpt { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: .5px solid var(--sep); animation: slide .35s var(--spring) both; font-size: 14.5px; }
.rcpt .av { width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--gold-grad); color: var(--on-gold); display: grid; place-items: center; font-weight: 800; overflow: hidden; }
.rcpt .av img { width: 100%; height: 100%; object-fit: cover; }
.rcpt .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rcpt .ok { color: var(--green); font-weight: 800; animation: pop .35s var(--spring); }
.rcpt.err { color: var(--red); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--fill); border-top-color: var(--gold); animation: spin .7s linear infinite; flex: none; }

/* bottom call to action */
.cta-wrap { position: fixed; inset: auto 0 0 0; padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 60%, transparent); z-index: 5; }
.cta-wrap.tg { display: none; }
.cta { display: block; width: 100%; max-width: 488px; margin: 0 auto; height: 52px; border-radius: 14px; background: var(--gold-grad); color: var(--on-gold); font-size: 17px; font-weight: 800; box-shadow: 0 8px 22px rgba(255, 138, 0, .35); }
.cta:disabled { opacity: .45; box-shadow: none; }
.cta.busy { color: transparent; position: relative; }
.cta.busy::after { content: ""; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(31, 19, 0, .25); border-top-color: var(--on-gold); animation: spin .7s linear infinite; }
.btn-plain { display: block; width: 100%; padding: 13px; margin-top: 8px; border-radius: 14px; font-weight: 600; color: var(--hint); }
.btn-plain.danger { color: var(--red); }

/* sheet */
.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 10; }
.backdrop.show { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--bg); border-radius: 22px 22px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .42s var(--spring); z-index: 11; }
.sheet.show { transform: translateY(0); }
.grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--fill); margin: 0 auto 6px; }
.sheet-close { position: absolute; top: 12px; left: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--fill); color: var(--hint); font-size: 14px; font-weight: 700; }
.sheet h2 { font-size: 21px; margin: 6px 0 2px; text-align: center; letter-spacing: -.3px; }
.sheet .sub { text-align: center; color: var(--hint); font-size: 14.5px; margin: 0 0 16px; }
.sheet .big-emoji { width: 96px; height: 96px; margin: 4px auto 0; display: grid; place-items: center; font-size: 64px; }
.amount { text-align: center; margin: 4px 0 14px; animation: rise .4s var(--ease) both; }
.amount small { display: block; color: var(--hint); font-size: 13px; }
.amount b { font-size: 36px; letter-spacing: -.5px; font-weight: 800; }
.amount span { color: var(--hint); font-size: 14px; }
.copy-row { display: flex; align-items: center; gap: 10px; padding: 12px 16px; position: relative; }
.copy-row:not(:last-child)::after { content: ""; position: absolute; bottom: 0; left: 0; right: 16px; height: .5px; background: var(--sep); }
.copy-row .k { color: var(--hint); font-size: 13px; width: 74px; flex: none; }
.copy-row .v { flex: 1; font-weight: 700; font-size: 16px; }
.copy-row .v.mono { direction: ltr; text-align: right; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.copy-btn { background: var(--gold-soft); color: #C77800; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; }
.note { background: var(--gold-soft); border-radius: 14px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; }
.note b { color: #C77800; }
.timer { text-align: center; color: var(--hint); font-size: 13px; margin: -6px 0 14px; font-variant-numeric: tabular-nums; }
.methods .row { min-height: 62px; }
.method-best { color: var(--green); font-size: 12px; font-weight: 700; }

/* status */
.pulse { position: relative; width: 120px; height: 120px; margin: 8px auto 4px; display: grid; place-items: center; }
.pulse::before, .pulse::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--gold-soft); animation: ring 2s var(--ease) infinite; }
.pulse::after { animation-delay: 1s; }
.pulse > div { position: relative; width: 84px; height: 84px; font-size: 56px; display: grid; place-items: center; }
.steps { display: flex; justify-content: space-between; gap: 6px; margin: 6px 0 16px; padding: 0 6px; }
.step { flex: 1; text-align: center; font-size: 12.5px; color: var(--hint); }
.step i { display: block; width: 26px; height: 26px; margin: 0 auto 4px; border-radius: 50%; background: var(--fill); font-style: normal; line-height: 26px; font-size: 13px; transition: all .3s var(--spring); }
.step.done { color: var(--text); font-weight: 600; }
.step.done i { background: var(--green); color: #fff; transform: scale(1.06); }
.step.now i { background: var(--gold-grad); color: var(--on-gold); animation: breathe 1.4s ease-in-out infinite; }
.speed { display: inline-flex; gap: 6px; align-items: center; background: var(--gold-soft); color: #C77800; font-weight: 800; padding: 6px 14px; border-radius: 999px; margin: 0 auto 16px; }
.center { text-align: center; }
.order-row .txt small { direction: rtl; }

/* toast + confetti */
.toast { position: fixed; top: calc(14px + env(safe-area-inset-top)); left: 50%; transform: translate(-50%, -140%); background: rgba(30, 30, 32, .92); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 20; transition: transform .4s var(--spring); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); white-space: nowrap; }
.toast.show { transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 30; }

/* footer + info pages */
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 13px; color: var(--hint); padding: 6px 0 0; }
.links a { text-decoration: none; color: var(--hint); }
.page .doc { max-width: 640px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 16px 40px; }
.doc-back { display: inline-block; color: #C77800; font-weight: 700; text-decoration: none; margin-bottom: 10px; }
.doc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.doc-head img { border-radius: 14px; }
.doc-head h1 { margin: 0; font-size: 24px; letter-spacing: -.3px; }
.doc-body { padding: 6px 18px; line-height: 1.9; font-size: 15px; }
.doc-body h3 { font-size: 16px; margin: 16px 0 2px; }
.doc-body ol { padding-right: 20px; }
.plain { list-style: none; padding: 0; }
.enamad { display: block; width: fit-content; margin: 16px auto 0; }
.copy { text-align: center; color: var(--hint); font-size: 12px; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.4); } 100% { opacity: 1; transform: scale(1); } }
@keyframes slide { from { opacity: 0; transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes ring { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes breathe { 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* login */
.login-pill { background: var(--gold-soft); color: #C77800; }
.login-pill.in { background: var(--fill); color: var(--text); display: inline-flex; align-items: center; gap: 6px; padding-right: 6px; }
.login-pill .av { width: 22px; height: 22px; border-radius: 50%; background: var(--gold-grad); color: var(--on-gold); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.top .pill + .pill { margin-right: -4px; }
.tg-link { display: grid; place-items: center; text-decoration: none; }
