/* ==========================================================
   Mini App — warm paper, deep ink, "secure" green.
   Story: no username/password — you verify your own account.
   ========================================================== */
:root {
  --bg: #f4f1ea;
  --bg-2: #ebe6da;
  --surface: #ffffff;
  --ink: #12211b;
  --ink-2: #1d3029;
  --ink-soft: #3a4a43;
  --mute: #6e756f;
  --line: rgba(18, 33, 27, .12);
  --acc: #0e9f6a;
  --acc-deep: #087a50;
  --acc-ink: #ffffff;
  --lime: #d6f46b;
  --bad: #e0483c;
  --warn: #e7a325;
  --radius: 22px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .9, .25, 1);
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: var(--bg); color: var(--ink);
  font: 400 15px/1.8 "Vazirmatn", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; letter-spacing: .02em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 16px;
  background: var(--bg); transition: opacity .5s var(--ease), visibility .5s;
}
.splash.gone { opacity: 0; visibility: hidden; }
.splash p { color: var(--mute); margin: 0; font-size: 13px; text-align: center; padding: 0 24px; }
.splash-lock { color: var(--ink); }
.splash-lock .shackle { transform-origin: 32px 21px; animation: unlock 1.4s var(--ease) infinite; }
@keyframes unlock { 0%, 30% { transform: none; } 60%, 80% { transform: translateY(-4px) rotate(18deg); } 100% { transform: none; } }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; font-size: 17px; text-decoration: none; letter-spacing: -.02em; }
.brand::before {
  content: ""; width: 26px; height: 26px; border-radius: 8px; flex: none;
  background: var(--ink) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3 5 6v5c0 4.5 3 8.3 7 10 4-1.7 7-5.5 7-10V6z' fill='none' stroke='%23d6f46b' stroke-width='2.2' stroke-linejoin='round'/><path d='m9 12 2 2 4-4' fill='none' stroke='%23d6f46b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/16px no-repeat;
}
.topnav { display: flex; gap: 8px; }
.pill {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px;
  border-radius: 99px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-size: 13px; font-weight: 700;
}
.pill.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill i { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--acc); color: #fff; font-size: 11px; display: grid; place-items: center; }

main { padding: 0 16px calc(104px + var(--safe-b)); max-width: 560px; margin: 0 auto; }
.view { animation: viewIn .45s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } }

/* ---------- hero ---------- */
.hero { position: relative; padding: 14px 0 8px; display: flex; flex-direction: column; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 5px 14px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 700; margin-bottom: 18px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 0 rgba(14,159,106,.6); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px rgba(14,159,106,0); } 100% { box-shadow: 0 0 0 0 rgba(14,159,106,0); } }
.hero-title { margin: 0; font-weight: 900; font-size: clamp(28px, 8.4vw, 46px); line-height: 1.25; letter-spacing: -.03em; white-space: pre-line; text-wrap: balance; }
.hero-title .hl { position: relative; z-index: 0; padding: 0 .08em; box-decoration-break: clone; -webkit-box-decoration-break: clone;
  background: linear-gradient(transparent 58%, var(--lime) 58%, var(--lime) 92%, transparent 92%); }
.hero-title .w { display: inline-block; opacity: 0; transform: translateY(.5em); animation: word .7s var(--ease) forwards; }
@keyframes word { to { opacity: 1; transform: none; } }
.hero-sub { color: var(--ink-soft); margin: 14px 0 22px; max-width: none; font-size: 15px; line-height: 1.85; text-wrap: pretty; }


.cta {
  position: relative; align-self: center; display: inline-flex; align-items: center; gap: 12px;
  height: 54px; padding-inline: 7px 24px; margin: 4px 0 48px; border-radius: 99px;
  background: var(--lime); color: var(--ink); text-decoration: none; font-weight: 800; font-size: 15.5px;
  overflow: hidden; isolation: isolate;
  box-shadow: 0 0 0 1.5px var(--ink) inset, 0 12px 28px -12px rgba(18,33,27,.55);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  animation: ctaGlow 2.4s var(--ease) infinite;
}
.cta span { white-space: nowrap; }
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%);
  animation: sheen 3.2s var(--ease) infinite;
}
@keyframes sheen { 60%, 100% { transform: translateX(120%); } }
@keyframes ctaGlow {
  0%   { box-shadow: 0 0 0 1.5px var(--ink) inset, 0 12px 28px -12px rgba(18,33,27,.55), 0 0 0 0 rgba(181,210,74,.7); }
  70%, 100% { box-shadow: 0 0 0 1.5px var(--ink) inset, 0 12px 28px -12px rgba(18,33,27,.55), 0 0 0 14px rgba(181,210,74,0); }
}
.cta svg { order: -1; flex: none; width: 40px; height: 40px; padding: 10px; border-radius: 50%;
  background: var(--ink); color: var(--lime); animation: nudge 1.6s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateY(3px); } }
.cta:hover { transform: translateY(-1px); }
.cta:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) { .cta, .cta::before, .cta svg { animation: none; } }

/* ---------- ticker ---------- */
.ticker { margin: 40px -16px 0; background: var(--ink); color: var(--bg); overflow: hidden; padding: 10px 0; }
.ticker-track { display: flex; width: max-content; gap: 26px; font-weight: 800; font-size: 15px; white-space: nowrap; animation: marquee 26s linear infinite; }
.ticker-track span::after { content: "●"; margin-inline-start: 26px; color: var(--lime); font-size: 9px; vertical-align: middle; }
@keyframes marquee { to { transform: translateX(50%); } }

/* ---------- blocks ---------- */
.block { margin-top: 56px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: 13px; font-weight: 800; color: var(--mute); }
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* us vs them */
.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vs-col { border-radius: var(--radius); padding: 16px 14px; }
.vs-col h3 { margin: 0 0 10px; font-size: 17px; font-weight: 900; }
.vs-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vs-col li { position: relative; padding-inline-start: 24px; font-size: 13.5px; line-height: 1.65; }
.vs-col li::before { position: absolute; inset-inline-start: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.them { background: var(--bg-2); color: var(--ink-soft); }
.them h3 { color: var(--mute); }
.them li::before { content: "✕"; background: rgba(224,72,60,.14); color: var(--bad); }
.us { background: var(--ink); color: #e8efe9; }
.us h3 { color: var(--lime); }
.us li::before { content: "✓"; background: var(--lime); color: var(--ink); }

/* flow */
.flow { list-style: none; margin: 0; padding: 0; }
.flow li { position: relative; display: flex; gap: 16px; padding-bottom: 22px; }
.flow li::after { content: ""; position: absolute; inset-inline-start: 21px; top: 46px; bottom: 2px; width: 2px; background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 11px); }
.flow li.last::after { display: none; }
.flow em {
  flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-style: normal;
  font-weight: 900; font-size: 19px; background: var(--surface); border: 1px solid var(--line);
}
.flow li.last em { background: var(--acc); color: #fff; border-color: var(--acc); }
.flow h3 { margin: 6px 0 2px; font-size: 17px; font-weight: 900; }
.flow p { margin: 0; color: var(--ink-soft); font-size: 14px; }

/* forever */
.forever { position: relative; overflow: hidden; text-align: center; background: var(--acc); color: #fff; border-radius: 28px; padding: 30px 20px 28px; }
.forever::before { content: ""; position: absolute; inset: -40% -30% auto auto; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(rgba(214,244,107,.45), transparent 65%); }
.fv-face { position: relative; width: 92px; height: 92px; margin: 0 auto 14px; color: #fff; overflow: hidden; border-radius: 12px; }
.fv-face svg { width: 100%; height: 100%; }
.fv-scan { position: absolute; inset-inline: 8px; height: 3px; top: 10%; background: var(--lime); border-radius: 2px; box-shadow: 0 0 14px 2px var(--lime); animation: fscan 2.4s ease-in-out infinite alternate; }
@keyframes fscan { to { top: 86%; } }
.forever h2 { position: relative; margin: 0 0 10px; font-size: 24px; font-weight: 900; line-height: 1.4; }
.forever p { position: relative; margin: 0; font-size: 14.5px; color: rgba(255,255,255,.9); }

/* feature rail */

/* ---------- order form ---------- */
.paper { background: var(--surface); color: var(--ink); padding: 22px 18px 20px; border-radius: 26px; border: 1px solid var(--line); box-shadow: 0 24px 50px -30px rgba(18,33,27,.35); }
.paper-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-weight: 900; font-size: 18px; }
.paper-head .mono { font-size: 12px; color: var(--mute); font-weight: 500; }
fieldset { border: 0; margin: 22px 0 0; padding: 0; min-width: 0; }
.paper-head + fieldset { margin-top: 18px; }
legend { padding: 0; margin-bottom: 10px; font-weight: 800; font-size: 14px; display: flex; align-items: center; gap: 8px; }
legend b { font: 700 11px "JetBrains Mono"; background: var(--ink); color: var(--lime); padding: 2px 6px; border-radius: 5px; }
legend small { color: var(--mute); font-weight: 400; }

.product { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--bg); }
.product img, .product .ph { width: 52px; height: 52px; border-radius: 13px; object-fit: cover; flex: none; }
.product .ph { display: grid; place-items: center; background: var(--ink); color: var(--lime); font-size: 24px; font-weight: 900; }
.product .meta { flex: 1; min-width: 0; }
.product b { display: block; font-weight: 800; }
.product small { color: var(--mute); font-size: 12px; display: block; line-height: 1.5; }
.product .price { font-weight: 900; white-space: nowrap; font-size: 14px; }
.product .price small { display: inline; }
.product-one { margin-top: 16px; }

.safe-note { display: flex; align-items: center; gap: 6px; margin: -4px 0 4px; font-size: 12.5px; font-weight: 700; color: var(--acc-deep); }
.safe-note svg { flex: none; }

/* floating-label fields */
.field { position: relative; display: block; margin-bottom: 12px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px;
  padding: 22px 14px 8px; outline: none; transition: border-color .2s, box-shadow .2s; resize: none; font-size: 16px; color: var(--ink);
  appearance: none;
}
.field input[dir="ltr"] { text-align: right; }
.field span { position: absolute; right: 15px; top: 15px; font-size: 14px; color: var(--mute); pointer-events: none; transition: all .18s var(--ease); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--acc); box-shadow: 0 0 0 4px rgba(14,159,106,.12); }
.field input:not(:placeholder-shown) + span, .field textarea:not(:placeholder-shown) + span,
.field input:focus + span, .field textarea:focus + span, .field select + span { top: 6px; font-size: 11px; font-weight: 700; }
.combo input { padding-left: 34px; }
.combo::after { content: ""; position: absolute; left: 15px; top: 24px; width: 7px; height: 7px; border: solid var(--mute); border-width: 0 0 2px 2px; transform: rotate(-45deg); pointer-events: none; }
.combo-list {
  position: absolute; z-index: 30; top: calc(100% + 6px); inset-inline: 0; max-height: 240px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 6px;
  box-shadow: 0 18px 40px -16px rgba(18,33,27,.35); animation: viewIn .18s var(--ease);
}
.combo-opt { padding: 10px 12px; border-radius: 10px; font-size: 14.5px; cursor: pointer; }
.combo-opt:hover, .combo-opt.act { background: var(--bg); }
.combo-opt.on { background: rgba(14,159,106,.12); color: var(--acc-deep); font-weight: 800; }
.combo-empty { padding: 10px 12px; font-size: 13px; color: var(--mute); }
.field.bad input, .field.bad textarea { border-color: var(--bad); animation: shake .35s; }
@keyframes shake { 25%{transform:translateX(5px)} 75%{transform:translateX(-5px)} }

.tear { height: 1px; margin: 22px 0 16px; background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px); }
.gets { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.gets li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-soft); }
.gets li::before { content: "✓"; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(14,159,106,.13); color: var(--acc-deep); font-size: 11px; font-weight: 900; }
.sum { margin: 0; }
.sum div { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; }
.sum dt { color: var(--mute); }
.sum dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.disc { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.disc .field { flex: 1; margin: 0; }
.disc input { text-transform: uppercase; letter-spacing: 1px; }
.disc .btn { height: 50px; flex: none; background: transparent; color: var(--ink); border: 1px solid var(--line); }
.disc.on input { border-color: var(--acc); }
.disc-msg { font-size: 13px; font-weight: 700; min-height: 1em; margin: 6px 2px 0; color: #d64545; }
.disc-msg.ok { color: var(--acc); }
.sum .total { border-top: 1px solid var(--line); padding-top: 12px; }
.sum .total dt { color: var(--ink); font-weight: 800; }
.sum .total dd { font-size: 24px; font-weight: 900; }
.form-error { margin: 8px 0; color: var(--bad); font-weight: 700; font-size: 13px; }
.form-error:empty { margin: 0; }
#submit { margin-top: 14px; }

/* ---------- buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 99px; height: 50px; padding: 0 22px; font-weight: 800; text-decoration: none; transition: transform .15s var(--ease), opacity .2s; overflow: hidden; }
.btn:active { transform: scale(.97); }
.btn.big { width: 100%; height: 58px; font-size: 16px; }
.btn.primary { background: var(--ink); color: var(--bg); }
.view:not([data-view="home"]) .btn.primary { background: var(--acc); color: var(--acc-ink); }
.btn.outline { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn.link { background: none; color: var(--mute); height: 44px; width: 100%; font-weight: 500; font-size: 13px; }
.btn.small { height: 36px; padding: 0 14px; font-size: 12px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.loading span { opacity: 0; }
.btn.loading::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.closed { padding: 16px; border-radius: 16px; background: rgba(224,72,60,.1); border: 1px solid rgba(224,72,60,.35); color: #a8281e; margin-bottom: 14px; font-weight: 700; }

/* ---------- faq ---------- */
details { border-bottom: 1px solid var(--line); }
summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 0; font-weight: 700; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-size: 18px; transition: transform .3s var(--ease), background .2s; }
details[open] summary::after { transform: rotate(45deg); background: var(--ink); color: var(--lime); border-color: var(--ink); }
details p { margin: 0 0 16px; color: var(--ink-soft); }
.support { margin-top: 18px; color: var(--mute); font-size: 13px; }
.support a { color: var(--acc-deep); font-weight: 800; }
.foot { margin-top: 48px; text-align: center; color: var(--mute); font-size: 12px; }

/* ---------- pay view ---------- */
.steps { list-style: none; display: flex; padding: 0; margin: 8px 0 26px; counter-reset: s; }
.steps li { flex: 1; position: relative; text-align: center; font-size: 11px; color: var(--mute); padding-top: 34px; line-height: 1.4; }
.steps li::before { counter-increment: s; content: counter(s, persian); position: absolute; top: 0; right: 50%; transform: translateX(50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); font-weight: 800; font-size: 12px; color: var(--mute); z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li.done::before { content: "✓"; background: var(--acc); color: #fff; border-color: var(--acc); }
.steps li.done::after { background: var(--acc); }
.steps li.now { color: var(--ink); font-weight: 800; }
.steps li.now::before { background: var(--ink); color: var(--lime); border-color: var(--ink); box-shadow: 0 0 0 5px rgba(18,33,27,.08); }

.pay-amount { text-align: center; }
.pay-amount small { color: var(--mute); }
.amount { display: block; margin: 2px auto 0; background: none; border: 0; font-weight: 900; font-size: clamp(36px, 11vw, 52px); letter-spacing: -.03em; line-height: 1.25; }
.amount em { font-style: normal; font-size: .38em; color: var(--mute); font-weight: 500; margin-inline-start: 6px; letter-spacing: 0; }
.hint { color: var(--mute); font-size: 12px; }

.card-scene { perspective: 900px; margin: 26px 0 22px; }
.bank-card {
  position: relative; aspect-ratio: 1.586; border-radius: 22px; padding: 22px; overflow: hidden; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between; color: #fff;
  background: linear-gradient(135deg, #1d3029 0%, #0d1814 60%, #0f3a2a 100%);
  box-shadow: 0 30px 60px -24px rgba(8,60,40,.65), inset 0 1px 0 rgba(255,255,255,.16);
  transform-style: preserve-3d; transition: transform .12s linear; user-select: none; animation: cardIn .9s var(--ease);
}
@keyframes cardIn { from { transform: rotateX(30deg) translateY(30px); opacity: 0; } }
.holo {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; opacity: .7;
  background: linear-gradient(115deg, transparent 22%, rgba(214,244,107,.55) 40%, rgba(14,159,106,.6) 52%, transparent 70%);
  background-size: 250% 250%; background-position: var(--hx, 50%) var(--hy, 50%);
}
.bc-top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 15px; }
.chip { width: 44px; color: var(--lime); }
.bc-number { font-size: clamp(19px, 6.4vw, 26px); font-weight: 700; display: flex; justify-content: space-between; }
.bc-bottom { display: flex; justify-content: space-between; align-items: flex-end; font-size: 13px; }
.bc-tap { font-size: 11px; padding: 4px 10px; border-radius: 99px; background: rgba(255,255,255,.14); }
.bank-card.copied { animation: pulse .5s var(--ease); }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(14,159,106,.35), 0 30px 60px -24px rgba(8,60,40,.65); } }

.timer { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 26px; }
.timer svg { width: 40px; height: 40px; transform: rotate(-90deg); flex: none; }
.timer circle { fill: none; stroke: var(--bg-2); stroke-width: 4; }
.timer #timer-ring { stroke: var(--acc); stroke-linecap: round; stroke-dasharray: 100.5; transition: stroke-dashoffset 1s linear, stroke .3s; }
.timer small { display: block; color: var(--mute); font-size: 12px; line-height: 1.3; }
.timer b { font-size: 18px; }
.timer.low #timer-ring { stroke: var(--bad); }

.upload h3 { margin: 0 0 12px; font-size: 20px; font-weight: 900; }
.viewfinder { position: relative; display: grid; place-items: center; min-height: 190px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; overflow: hidden; cursor: pointer; }
.viewfinder img { width: 100%; max-height: 360px; object-fit: contain; display: block; }
.vf-empty { display: grid; justify-items: center; gap: 10px; color: var(--mute); font-size: 13px; }
.corner { position: absolute; width: 26px; height: 26px; border: 3px solid var(--acc); z-index: 2; transition: all .3s var(--ease); }
.corner.tl { top: 12px; right: 12px; border-width: 3px 3px 0 0; border-radius: 0 10px 0 0; }
.corner.tr { top: 12px; left: 12px; border-width: 3px 0 0 3px; border-radius: 10px 0 0 0; }
.corner.bl { bottom: 12px; right: 12px; border-width: 0 3px 3px 0; border-radius: 0 0 10px 0; }
.corner.br { bottom: 12px; left: 12px; border-width: 0 0 3px 3px; border-radius: 0 0 0 10px; }
.viewfinder:active .corner { transform: scale(.85); }

/* ---------- order detail ---------- */
.status-hero { text-align: center; padding: 16px 0 10px; }
.scan { position: relative; width: 150px; height: 190px; margin: 6px auto 20px; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.scan img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.3); }
.scan::after { content: ""; position: absolute; inset-inline: 0; height: 40%; top: -40%; background: linear-gradient(transparent, rgba(14,159,106,.4), transparent); border-bottom: 2px solid var(--acc); animation: scan 2.2s ease-in-out infinite; }
@keyframes scan { to { top: 100%; } }
.big-ic { width: 88px; height: 88px; margin: 4px auto 18px; border-radius: 28px; display: grid; place-items: center; font-size: 42px; background: var(--surface); border: 1px solid var(--line); animation: pop .6s var(--ease); }
@keyframes pop { from { transform: scale(.3) rotate(-20deg); opacity: 0; } }
.status-hero h2 { margin: 0; font-weight: 900; font-size: 25px; }
.status-hero p { margin: 6px auto 0; color: var(--ink-soft); max-width: 34ch; }
.code-tag { display: inline-block; margin-top: 12px; padding: 4px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }

.guide-card { display: flex; gap: 12px; align-items: flex-start; background: var(--ink); color: #e8efe9; border-radius: var(--radius); padding: 16px; margin: 18px 0 4px; text-align: right; }
.guide-card .gi { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--lime); color: var(--ink); font-size: 20px; }
.guide-card b { display: block; color: #fff; margin-bottom: 2px; }
.guide-card p { margin: 0; font-size: 13.5px; color: #c4d0c8; }

.timeline { list-style: none; padding: 0; margin: 26px 0; }
.timeline li { position: relative; padding: 0 30px 22px 0; }
.timeline li::before { content: ""; position: absolute; right: 6px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 4px rgba(14,159,106,.15); }
.timeline li::after { content: ""; position: absolute; right: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.future::before { background: var(--bg); box-shadow: none; border: 2px solid #c3c6bf; }
.timeline li.future { color: #9a9f99; }
.timeline li.bad::before { background: var(--bad); box-shadow: 0 0 0 4px rgba(224,72,60,.15); }
.timeline b { display: block; font-weight: 700; }
.timeline small { color: var(--mute); font-size: 12px; }

.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.info-card h4 { margin: 0 0 8px; font-size: 13px; color: var(--mute); font-weight: 700; }
.info-card .row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 14px; }
.info-card .row span:first-child { color: var(--mute); }
.info-card p { margin: 0; white-space: pre-line; font-size: 14px; }
.reject-box { padding: 14px 16px; border-radius: 16px; background: rgba(224,72,60,.1); border: 1px solid rgba(224,72,60,.3); color: #a8281e; margin: 0 0 16px; font-size: 14px; }

/* ---------- order tickets ---------- */
.page-title { font-weight: 900; font-size: 32px; letter-spacing: -.03em; margin: 12px 0 20px; }
.tickets { display: grid; gap: 10px; }
.ticket {
  --c: var(--mute);
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px 18px 16px 18px; text-decoration: none; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; animation: viewIn .5s var(--ease) backwards;
}
.ticket::before { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.ticket .t-title { font-weight: 800; }
.ticket .t-code { font-size: 12px; color: var(--mute); }
.ticket .t-sum { font-weight: 900; text-align: left; }
.ticket .t-status { justify-self: start; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 99px; color: #fff; background: var(--c); }
.ticket .t-date { font-size: 12px; color: var(--mute); text-align: left; }
.s-awaiting_payment { --c: #9aa09a; } .s-pending_review { --c: var(--warn); } .s-paid { --c: var(--acc); }
.s-processing { --c: #2f8fd0; } .s-shipped { --c: var(--ink-2); } .s-delivered { --c: var(--acc-deep); }
.s-canceled { --c: var(--bad); } .s-refunded { --c: #8a8f89; }
.empty { text-align: center; padding: 50px 20px; color: var(--mute); }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 80; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translate(-50%, 160%);
  padding: 12px 20px; border-radius: 99px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .4s var(--ease); white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0); }
.toast.err { background: var(--bad); color: #fff; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .hero-title .w { opacity: 1; transform: none; }
}


/* ==========================================================
   Card info, shipping address, addresses, profile, tab bar
   ========================================================== */
.ship-chip { font-size: 12px; font-weight: 700; color: var(--acc-deep); background: rgba(14,159,106,.12); padding: 4px 12px; border-radius: 99px; }
.ship-inline { background: linear-gradient(transparent 60%, var(--lime) 60%); font-weight: 800; }
.fs-hint { margin: -4px 0 14px; font-size: 13px; color: var(--mute); line-height: 1.7; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
@media (max-width: 360px) { .grid2 { grid-template-columns: 1fr; } }

/* photo upload, styled like the other .field inputs */
.photo-drop { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 14px; margin-bottom: 12px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.photo-drop:active, .photo-drop:focus-within { border-color: var(--acc); box-shadow: 0 0 0 4px rgba(14,159,106,.12); }
.photo-drop.bad { border-color: var(--bad); animation: shake .35s; }
.pd-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.pd-txt b { font-size: 14px; font-weight: 400; color: var(--mute); }
.pd-txt small { color: var(--mute); font-size: 11.5px; opacity: .8; }
.photo-drop.has .pd-txt b { color: var(--ink); }
.pd-ic { order: 2; flex: none; display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: 10px;
  background: var(--bg); color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.pd-ic svg { width: 16px; height: 16px; }
.photo-drop.has .pd-ic { color: var(--acc-deep); }

.field.select select { cursor: pointer; background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='m7 10 5 5 5-5' fill='none' stroke='%236e756f' stroke-width='2' stroke-linecap='round'/></svg>") left 12px center/18px no-repeat; }
.field.select select:invalid { color: transparent; }
.field.select select:invalid + span { top: 15px; font-size: 14px; font-weight: 400; }
.field.date input { min-height: 56px; text-align: right; }
.field.date span { top: 6px; font-size: 11px; font-weight: 700; }

.addr-pick { display: grid; gap: 8px; margin-bottom: 12px; }
.addr-pick:empty { display: none; }
.addr-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; background: var(--surface); }
.addr-opt input { margin-top: 5px; accent-color: var(--acc); }
.addr-opt b { display: block; font-size: 14px; }
.addr-opt small { color: var(--mute); font-size: 12.5px; line-height: 1.6; display: block; }
.addr-opt:has(input:checked) { border-color: var(--acc); background: rgba(14,159,106,.06); }
.eta { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--ink); color: #e8efe9; font-size: 13px; }
.eta b { color: var(--lime); }
.eta:empty { display: none; }

/* addresses page */
.addr-list { display: grid; gap: 10px; margin-bottom: 14px; }
.addr-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.addr-card header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.addr-card header b { font-size: 15px; }
.addr-card .def { font-size: 11px; font-weight: 800; padding: 1px 9px; border-radius: 99px; background: var(--lime); color: var(--ink); }
.addr-card p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; }
.addr-card .eta-s { font-size: 12px; color: var(--acc-deep); font-weight: 700; }
.addr-card .acts { display: flex; gap: 16px; margin-top: 8px; font-size: 13px; font-weight: 700; }
.addr-card .acts button { background: none; border: 0; padding: 0; color: var(--acc-deep); }
.addr-card .acts button.del { color: var(--bad); }
.addr-form { margin-top: 14px; }
.x { background: none; border: 0; font-size: 16px; color: var(--mute); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 4px; }
.check input { accent-color: var(--acc); width: 18px; height: 18px; }

/* profile */
.prof-head { display: flex; align-items: center; gap: 14px; background: var(--ink); color: #e8efe9; border-radius: var(--radius); padding: 18px; }
.prof-av { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--lime); color: var(--ink); font-weight: 900; font-size: 22px; }
.prof-head b { display: block; font-size: 17px; }
.prof-head small { color: rgba(232,239,233,.6); direction: ltr; display: inline-block; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 8px; text-align: center; }
.stats b { display: block; font-size: 20px; font-weight: 900; }
.stats small { color: var(--mute); font-size: 12px; }
.menu { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.menu a, .menu div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; text-decoration: none; font-size: 14px; }
.menu > * + * { border-top: 1px solid var(--line); }
.menu small { color: var(--mute); }

/* bottom tab bar */
.tabbar {
  position: fixed; z-index: 45; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b));
  width: min(calc(100% - 24px), 520px); display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px; border-radius: 22px; background: color-mix(in srgb, var(--ink) 94%, transparent); backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px -14px rgba(18,33,27,.65);
}
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 5px; border-radius: 16px;
  text-decoration: none; color: rgba(232,239,233,.55); font-size: 11px; font-weight: 700; transition: color .2s, background .25s var(--ease); }
.tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--ink); background: var(--lime); }
.tabbar a:active { transform: scale(.94); }
.tabbar i { position: absolute; top: 3px; inset-inline-start: calc(50% + 6px); font-style: normal; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--acc); color: #fff; font-size: 10.5px; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--ink); }
.tabbar i[hidden], .tabbar i:empty { display: none; }
.toast { bottom: calc(96px + var(--safe-b)) !important; opacity: 0; visibility: hidden;
  transition: transform .4s var(--ease), opacity .25s, visibility .25s; }
.toast.show { opacity: 1; visibility: visible; }

/* ---------- printed card preview: ISO ID-1 (85.6 × 54 mm), scales with its own width ---------- */
.idcard {
  container-type: inline-size; position: relative; overflow: hidden; direction: ltr;
  width: 100%; max-width: 380px; margin: 0 auto 14px; aspect-ratio: 85.6 / 54; border-radius: 12px;
  display: flex; flex-direction: column; color: #1b2b25;
  background:
    radial-gradient(60% 80% at 100% 100%, rgba(14,159,106,.14), transparent 70%),
    radial-gradient(50% 70% at 0 0, rgba(214,244,107,.35), transparent 70%),
    repeating-radial-gradient(circle at 78% 40%, transparent 0 5px, rgba(14,159,106,.07) 5px 6px),
    linear-gradient(160deg, #fdfcf8, #f1efe6);
  border: 1px solid rgba(18,33,27,.12);
  box-shadow: 0 1px 0 #fff inset, 0 20px 40px -24px rgba(18,33,27,.45), 0 2px 6px -2px rgba(18,33,27,.12);
}
.ic-head { display: flex; align-items: center; gap: 2.6cqw; padding: 3.6cqw 4.6cqw 2.4cqw; border-bottom: .3cqw solid rgba(14,159,106,.35); }
.ic-logo { width: 7.4cqw; height: 7.4cqw; border-radius: 2cqw; background: var(--ink); display: grid; place-items: center; flex: none; }
.ic-logo svg { width: 60%; height: 60%; fill: none; stroke: var(--lime); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ic-title { display: flex; flex-direction: column; line-height: 1.15; flex: 1; font-family: "JetBrains Mono", monospace; }
.ic-title b { font-size: 3.6cqw; letter-spacing: .14em; color: var(--ink); }
.ic-title small { font-size: 2.1cqw; letter-spacing: .2em; color: var(--acc-deep); }
.ic-chip { width: 10cqw; height: 7.6cqw; border-radius: 1.6cqw; flex: none;
  background: linear-gradient(135deg, #f1dd97, #c7a54e 55%, #e8cf7c);
  box-shadow: inset 0 0 0 .3cqw rgba(120,90,20,.35); }
.ic-body { flex: 1; display: flex; gap: 4cqw; padding: 3.4cqw 4.6cqw 0; min-height: 0; }
.ic-photo { flex: none; width: 23cqw; height: 30.6cqw; border-radius: 2cqw; overflow: hidden;
  display: grid; place-items: center; background: rgba(18,33,27,.05); border: .35cqw dashed rgba(18,33,27,.25); }
.ic-photo svg { width: 55%; fill: none; stroke: rgba(18,33,27,.35); stroke-width: 1.5; stroke-linecap: round; }
.ic-photo.has { border: .35cqw solid #fff; box-shadow: 0 0 0 .3cqw rgba(18,33,27,.15); }
.ic-photo img { width: 100%; height: 100%; object-fit: cover; }
.idcard dl { margin: 0; flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 1.6cqw 3cqw; }
.idcard dl > div { width: 100%; min-width: 0; }
.idcard dl > .half { width: calc(50% - 1.5cqw); }
.idcard dt { font: 500 2cqw/1.2 "JetBrains Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: #7c857f; }
.idcard dd { margin: .3cqw 0 0; font: 700 3.5cqw/1.2 "Vazirmatn", "JetBrains Mono", sans-serif; text-transform: uppercase; letter-spacing: .03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.ic-mrz { padding: 0 4.6cqw 3cqw; font: 500 2.9cqw/1 "JetBrains Mono", monospace; letter-spacing: .22em; color: rgba(18,33,27,.42); white-space: nowrap; overflow: hidden; }

/* ---------- why us: numbered bento ---------- */
.why { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; counter-reset: why; }
.feat { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; min-height: 150px;
  padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.feat .n { position: absolute; top: 10px; inset-inline-end: 14px; font-size: 40px; font-weight: 700; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.2px rgba(18,33,27,.16); }
.feat .ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; background: var(--bg); margin-bottom: auto; }
.feat h3 { margin: 14px 0 0; font-size: 15px; font-weight: 900; line-height: 1.5; }
.feat p { margin: 0; color: var(--mute); font-size: 12.5px; line-height: 1.7; }
.feat.lead { grid-column: 1 / -1; min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 14px;
  background: var(--ink); color: #e8efe9; border-color: var(--ink); padding: 20px 18px; }
.feat.lead .ic { background: var(--lime); margin: 0; width: 52px; height: 52px; font-size: 25px; }
.feat.lead h3 { margin: 0; font-size: 18px; flex: 1; }
.feat.lead p { flex-basis: 100%; color: rgba(232,239,233,.7); font-size: 13.5px; }
.feat.lead .n { -webkit-text-stroke-color: rgba(214,244,107,.35); font-size: 54px; }
.feat:nth-child(3n+2):not(.lead) { background: color-mix(in srgb, var(--lime) 28%, var(--surface)); border-color: transparent; }

/* ---------- line icons (replace emoji) ---------- */
svg.i { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feat .ic svg.i { width: 22px; height: 22px; color: var(--ink); }
.feat.lead .ic svg.i { width: 26px; height: 26px; }
.big-ic svg.i { width: 34px; height: 34px; stroke-width: 1.6; }
.big-ic { display: grid; place-items: center; }
.big-ic.s-paid, .big-ic.s-delivered { color: var(--acc-deep); }
.big-ic.s-canceled { color: var(--bad); }
.menu span { display: inline-flex; align-items: center; gap: 10px; }
.menu span svg.i { color: var(--acc-deep); }
.menu .chev { color: var(--mute); width: 18px; height: 18px; }
.eta svg.i { color: var(--lime); }
.eta-s { display: inline-flex; align-items: center; gap: 5px; }
.ph svg.i { width: 24px; height: 24px; }
