:root {
  --atlas: #0D4A37;
  --atlas-2: #13614A;
  --night: #062219;
  --night-2: #0A2E23;
  --mint: #3EE0A6;
  --mint-ink: #04291D;
  --sand: #E5B65C;
  --brick: #CF4A33;
  --ink: #10201A;
  --mist: #F1F5F2;
  --paper: #FFFFFF;
  --line: #DCE6E0;
  --muted: #5A6D65;
  --font: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --digits: "Readex Pro", "IBM Plex Sans Arabic", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 42% 38%, rgba(62,224,166,.10), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%233EE0A6' stroke-opacity='.06' stroke-width='1.1'%3E%3Cpath d='M32 10l6.4 15.6L54 32l-15.6 6.4L32 54l-6.4-15.6L10 32l15.6-6.4z'/%3E%3Cpath d='M16.4 16.4h31.2v31.2H16.4z' transform='rotate(45 32 32)'/%3E%3C/g%3E%3C/svg%3E"),
    var(--night);
}
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--sand); outline-offset: 2px; }
svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; stroke-width: 0; flex: none; }
svg [fill="none"], svg g[fill="none"] path { stroke-width: 2; }
.num { font-family: var(--digits); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

/* the PayDZ mark */
.logo { width: 44px; height: 44px; }
.logo rect { fill: var(--atlas); stroke: rgba(62,224,166,.35); stroke-width: 1.5; }
.logo g path { fill: none; stroke: var(--mint); stroke-width: 4.5; stroke-linecap: round; }
.logo circle { fill: var(--sand); }
.wordmark { font-family: var(--digits); font-weight: 700; letter-spacing: -.01em; }

/* ---------- page head ---------- */
.stage-head {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 28px 6px;
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--mist);
}
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand .wordmark { display: block; font-size: 24px; line-height: 1.1; }
.brand small { color: #9DB8AD; font-size: 13px; }
.guide { list-style: none; margin: 0 auto 0 0; padding: 0; display: flex; gap: 6px; counter-reset: g; }
.guide li {
  counter-increment: g;
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 16px;
  border-radius: 999px;
  font-size: 14px;
  color: #8FAA9F;
  background: rgba(255,255,255,.04);
  transition: background .3s, color .3s;
}
.guide li::before {
  content: counter(g);
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--digits); font-size: 12px; font-weight: 600;
  border: 1.5px solid currentColor;
}
.guide li[data-state="now"] { background: var(--mint); color: var(--mint-ink); font-weight: 600; box-shadow: 0 0 0 6px rgba(62,224,166,.12); }
.guide li[data-state="done"] { color: var(--mint); }
.guide li[data-state="done"]::before { content: "✓"; background: rgba(62,224,166,.15); border-color: transparent; }
.switch { display: none; background: rgba(255,255,255,.07); border-radius: 999px; padding: 4px; }
.switch button { border: 0; background: none; color: #CFE0D8; padding: 7px 16px; border-radius: 999px; font-size: 14px; }
.switch button[aria-pressed="true"] { background: var(--mint); color: var(--mint-ink); font-weight: 600; }

/* ---------- stage ---------- */
.stage {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 28px 56px;
  display: grid;
  grid-template-columns: auto minmax(280px, 330px);
  justify-content: center;
  align-items: start;
  gap: 52px;
}
.pair { position: relative; display: flex; gap: 72px; }
.device { display: grid; justify-items: center; align-content: start; gap: 12px; }
.device-label { margin: 0; color: #9DB8AD; font-size: 14px; }
.device-label b { color: var(--mist); font-weight: 600; margin-inline-end: 4px; }
.phone {
  position: relative;
  width: 372px;
  height: 772px;
  border-radius: 50px;
  padding: 11px;
  background: linear-gradient(160deg, #26302C, #141A18 60%);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.75), inset 0 0 0 1.5px #3A4641, inset 0 0 0 5px #0E1311;
  transition: transform .9s var(--ease);
  transform-origin: 50% 100%;
}
.phone::before { /* dynamic island */
  content: ""; position: absolute; z-index: 9; top: 22px; left: 50%; width: 96px; height: 26px;
  transform: translateX(-50%); border-radius: 20px; background: #050807;
}
.screen {
  position: relative;
  height: 100%;
  border-radius: 40px;
  overflow: hidden;
  background: var(--mist);
  display: flex;
  flex-direction: column;
  transition: background .4s;
}
.screen[data-tone="dark"] { background: var(--night); color: var(--mist); }

.grip {
  border: 1px dashed rgba(62,224,166,.55);
  background: rgba(62,224,166,.08);
  color: var(--mint);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  touch-action: none;
  cursor: grab;
  animation: nudge-x 1.6s var(--ease) infinite;
}
#devA .grip { --dx: -6px; } #devB .grip { --dx: 6px; }
.grip:active { cursor: grabbing; }

/* the tap: phones lean in and their tops meet */
.pair.touch #devA .phone { transform: translateX(-6px) rotate(-2.6deg); }
.pair.touch #devB .phone { transform: translateX(6px) rotate(2.6deg); }
.contact { position: absolute; top: 96px; left: 50%; width: 0; height: 0; pointer-events: none; z-index: 10; }
.contact i { position: absolute; left: -60px; top: -60px; width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--mint); opacity: 0; }
.pair.touch .contact i { animation: burst .9s var(--ease) .32s; }
.pair.touch .contact i:nth-child(2) { animation-delay: .42s; }
.pair.touch .contact i:nth-child(3) { animation-delay: .52s; border-color: var(--sand); }
.ghost { display: none; }

.sbar { display: flex; justify-content: space-between; align-items: center; padding: 15px 30px 6px; font-size: 13px; font-weight: 600; direction: ltr; flex: none; }
.sbar-r { display: flex; gap: 3px; align-items: flex-end; }
.sbar-r i { width: 3px; background: currentColor; border-radius: 1px; }
.sbar-r i:nth-child(1) { height: 5px; } .sbar-r i:nth-child(2) { height: 8px; } .sbar-r i:nth-child(3) { height: 11px; }
.sbar-r b { width: 23px; height: 11px; border: 1.5px solid currentColor; border-radius: 3.5px; margin-left: 6px; padding: 1px; background: linear-gradient(90deg, currentColor 72%, transparent 72%) content-box; }

.app { flex: 1; display: flex; flex-direction: column; padding: 10px 20px 20px; min-height: 0; position: relative; animation: enter .35s var(--ease); }

/* ---------- rail ---------- */
.rail {
  position: relative;
  margin-top: 36px;
  background: linear-gradient(180deg, rgba(13,74,55,.55), rgba(6,34,25,.85));
  border: 1px solid rgba(62,224,166,.16);
  border-radius: 24px;
  padding: 22px 20px;
  color: var(--mist);
}
.rail::before { /* the line from the phones to the server */
  content: ""; position: absolute; top: 100px; right: -53px; width: 52px; height: 2px;
  background: repeating-linear-gradient(90deg, rgba(62,224,166,.4) 0 6px, transparent 6px 12px);
}
.rail::after {
  content: ""; position: absolute; top: 96px; right: -53px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 14px var(--mint); opacity: 0;
}
.stage.verifying .rail::after { animation: packet 1.1s var(--ease) infinite; }
.stage.verifying .rail { box-shadow: 0 0 0 1px rgba(62,224,166,.5), 0 0 60px -10px rgba(62,224,166,.4); }
.rail-head { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.srv { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--sand); color: var(--mint-ink); font-weight: 700; font-size: 22px; flex: none; }
.rail h2 { margin: 0; font-size: 18px; line-height: 1.3; }
.rail-head small { display: flex; align-items: center; gap: 6px; color: #9DB8AD; font-size: 13px; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px rgba(62,224,166,.2); animation: blink 2s infinite; flex: none; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 42px 15px 0; }
.steps li::before {
  content: counter(s);
  position: absolute; right: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--digits); font-size: 13px; font-weight: 600;
  border: 1.5px solid rgba(207,224,216,.3); color: #CFE0D8;
  transition: background .3s, border-color .3s;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; right: 13.5px; top: 32px; bottom: 3px; width: 1.5px; background: rgba(207,224,216,.15); }
.steps li[data-state="done"]:not(:last-child)::after { background: var(--mint); }
.steps b { display: block; font-weight: 600; font-size: 15px; }
.steps span { display: block; font-size: 13px; color: #94B1A5; }
.steps li[data-state="active"]::before { border-color: var(--sand); color: var(--sand); animation: pulse 1s infinite; }
.steps li[data-state="done"]::before { content: "✓"; background: var(--mint); border-color: var(--mint); color: var(--mint-ink); }
.steps li[data-state="fail"]::before { content: "!"; background: var(--brick); border-color: var(--brick); color: #fff; }
.tap-btn {
  width: 100%; margin: 8px 0 18px; padding: 13px; border-radius: 16px; border: 0;
  background: var(--mint); color: var(--mint-ink); font-weight: 700; font-size: 16px;
  box-shadow: 0 10px 24px -10px rgba(62,224,166,.7);
}
.tap-btn:disabled { background: rgba(255,255,255,.06); color: #6F8A7F; box-shadow: none; }
.rail-sub { margin: 0 0 6px; font-size: 13px; color: #94B1A5; }
.payload {
  margin: 0 0 16px; padding: 12px 14px; border-radius: 14px; background: rgba(0,0,0,.28);
  font: 12px/1.55 ui-monospace, "SFMono-Regular", Menlo, monospace; color: #A8EBD1;
  white-space: pre-wrap; word-break: break-all; min-height: 44px;
}
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.log li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border-inline-start: 3px solid var(--mint); animation: enter .4s var(--ease); }
.log li.bad { border-color: var(--brick); }
.log li.empty { display: block; border: 0; color: #6F8A7F; font-size: 13px; }
.log b { font-size: 13px; font-weight: 600; }
.log span { grid-column: 1; font-size: 13px; color: #B9CEC4; }
.log time { grid-row: 1; grid-column: 2; font-size: 12px; color: #6F8A7F; }
.note { margin: 16px 0 0; font-size: 13px; color: #94B1A5; line-height: 1.75; }

/* ---------- shared app pieces ---------- */
.btn { border: 0; border-radius: 18px; padding: 15px; font-weight: 600; font-size: 16px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .12s, background .2s; }
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: var(--atlas); color: #fff; box-shadow: 0 12px 24px -14px rgba(13,74,55,.9); }
.btn.mint { background: var(--mint); color: var(--mint-ink); box-shadow: 0 12px 30px -10px rgba(62,224,166,.6); }
.btn.soft { background: var(--paper); color: var(--atlas); box-shadow: 0 0 0 1px var(--line); }
.btn.ghost { background: none; color: var(--muted); margin-top: 4px; padding: 10px; }
[data-tone="dark"] .btn.ghost { color: #9DB8AD; }
.icon-btn { border: 0; background: var(--paper); width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; box-shadow: 0 0 0 1px var(--line); }
[data-tone="dark"] .icon-btn { background: rgba(255,255,255,.08); box-shadow: none; color: var(--mist); }
.topbar { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; margin-bottom: 6px; }
.topbar h3 { margin: 0; text-align: center; font-size: 16px; font-weight: 600; }
.err { min-height: 22px; margin: 0; text-align: center; color: var(--brick); font-size: 14px; font-weight: 500; }
.hint { margin: 0 0 4px; text-align: center; font-size: 13px; color: var(--muted); }
.big-amt { margin: 0; display: flex; align-items: baseline; justify-content: center; gap: 8px; line-height: 1.15; }
.big-amt .num { font-size: 44px; font-weight: 700; letter-spacing: -.02em; }
.big-amt .cur { font-size: 20px; font-weight: 600; color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--sand); color: var(--mint-ink); display: grid; place-items: center; font-weight: 700; flex: none; }
.avatar.xl { width: 72px; height: 72px; font-size: 30px; margin: 0 auto 10px; box-shadow: 0 0 0 6px rgba(229,182,92,.18); }

.pad { direction: ltr; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: auto 0 12px; }
.pad button { border: 0; background: none; height: 54px; border-radius: 16px; font-family: var(--digits); font-size: 25px; font-weight: 500; display: grid; place-items: center; transition: background .15s; }
.pad button:active { background: var(--line); }

/* ---------- splash ---------- */
.splash { justify-content: center; align-items: center; gap: 10px; text-align: center; }
.splash .logo { width: 96px; height: 96px; animation: pop .6s var(--ease); }
.splash .logo g path { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .7s var(--ease) forwards; }
.splash .logo g path:nth-child(2) { animation-delay: .18s; }
.splash .logo g path:nth-child(3) { animation-delay: .36s; }
.splash .wordmark { font-size: 40px; margin-top: 8px; animation: enter .6s var(--ease) .4s both; }
.splash p { margin: 0; color: #9DB8AD; animation: enter .6s var(--ease) .6s both; }

/* ---------- login ---------- */
.login { padding: 0; }
.login-top {
  flex: 1; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; padding: 10px 20px 30px;
  background: radial-gradient(260px 200px at 50% 45%, rgba(62,224,166,.16), transparent 70%);
}
.login-top .logo { width: 72px; height: 72px; }
.login-top .wordmark { font-size: 34px; margin-top: 8px; }
.login-top p { margin: 0; color: #B9CEC4; }
.login-sheet { background: var(--mist); color: var(--ink); border-radius: 30px 30px 0 0; padding: 24px 22px 22px; display: grid; justify-items: center; gap: 10px; animation: rise .5s var(--ease); }
.field { width: 100%; }
.field > span:first-child { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.phone-in { display: flex; align-items: center; gap: 10px; background: var(--paper); border-radius: 16px; padding: 0 16px; box-shadow: 0 0 0 1px var(--line); direction: ltr; }
.phone-in bdi { font-weight: 600; color: var(--muted); }
.phone-in input { border: 0; outline: 0; background: none; font: inherit; font-family: var(--digits); font-size: 17px; padding: 13px 0; width: 100%; color: var(--ink); }
.phone-in:focus-within { box-shadow: 0 0 0 2px var(--atlas); }
.bio {
  position: relative; overflow: hidden; margin-top: 8px;
  width: 92px; height: 92px; border-radius: 28px; border: 0;
  background: var(--paper); color: var(--atlas);
  box-shadow: 0 0 0 1px var(--line), 0 14px 28px -16px rgba(13,74,55,.8);
  display: grid; place-items: center;
  animation: breathe 2.4s ease-in-out infinite;
}
.bio .fp { width: 56px; height: 56px; }
.bio .fp path { stroke-width: 2.4; }
.bio .scanline { position: absolute; left: 10px; right: 10px; height: 3px; top: 0; border-radius: 3px; background: var(--mint); box-shadow: 0 0 14px var(--mint); opacity: 0; }
.bio.scanning { animation: none; color: var(--mint-ink); background: #E3FAF0; box-shadow: 0 0 0 2px var(--mint); }
.bio.scanning .scanline { opacity: 1; animation: scan 1s ease-in-out infinite alternate; }
.bio-label { margin: 0; font-size: 14px; color: var(--muted); }
.link { border: 0; background: none; color: var(--atlas); font-weight: 600; font-size: 14px; padding: 6px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(13,74,55,.3); }

/* ---------- pin ---------- */
.pin-lock { margin: 14px auto 0; width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; background: #E3F1EA; color: var(--atlas); }
.pin-sub { text-align: center; margin: 12px 0 18px; font-size: 16px; }
.dots { display: flex; justify-content: center; gap: 18px; direction: ltr; }
.dots i { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--atlas); transition: background .12s, transform .12s; }
.dots i.on { background: var(--atlas); transform: scale(1.1); }
.dots.shake { animation: shake .35s; }
.pin-screen .err { margin-top: 12px; }

/* ---------- home ---------- */
.home { padding-bottom: 0; }
.home-top { display: flex; align-items: center; gap: 10px; }
.hello { margin: 0; flex: 1; display: grid; line-height: 1.35; }
.hello small { font-size: 13px; color: var(--muted); }
.hello b { font-size: 15px; font-weight: 600; }
.bal { margin: 14px 0; }
.bal > span { font-size: 14px; color: var(--muted); }
.bal-num { justify-content: flex-start; margin-top: 2px; }
.bal-num .num { font-size: 40px; }
.card-stage { perspective: 900px; flex: none; }
.card {
  --rx: 0deg; --ry: 0deg; --mx: 30%; --my: 20%;
  position: relative;
  border-radius: 22px;
  padding: 18px 20px 16px;
  color: #EAF3EE;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 64 64'%3E%3Cpath d='M32 10l6.4 15.6L54 32l-15.6 6.4L32 54l-6.4-15.6L10 32l15.6-6.4z' fill='none' stroke='%23E5B65C' stroke-opacity='.16' stroke-width='2.2'/%3E%3C/svg%3E") 0 0 / 34px,
    radial-gradient(120% 140% at 100% 0%, var(--atlas-2), var(--atlas) 45%, #08392A);
  box-shadow: 0 22px 34px -20px rgba(6,34,25,.9), inset 0 0 0 1px rgba(255,255,255,.07);
  display: grid; gap: 10px;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .25s ease-out;
  overflow: hidden;
}
.card-sheen { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255,255,255,.18), transparent 60%); mix-blend-mode: soft-light; }
.card-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; position: relative; }
.card-brand { font-family: var(--digits); font-weight: 700; font-size: 19px; }
.card-nfc svg { color: var(--mint); }
.chip { width: 44px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #F4D892, var(--sand) 50%, #B4852F); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); position: relative; }
.chip::after { content: ""; position: absolute; inset: 8px 10px; border: 1px solid rgba(0,0,0,.18); border-radius: 4px; }
.card-num { font-family: var(--digits); font-size: 18px; letter-spacing: .04em; text-align: left; position: relative; }
.card-foot { color: #CFE2D8; }
.txs-h { margin: 18px 0 4px; font-size: 16px; font-weight: 600; }
.txs { list-style: none; margin: 0 -20px; padding: 0 20px 118px; overflow-y: auto; flex: 1; scrollbar-width: none; }
.tx { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tx.fresh { animation: fresh 1.6s var(--ease); }
.tx-ico { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.tx.in .tx-ico { background: #DDF6EB; color: #10795A; }
.tx.out .tx-ico { background: #F8E6E1; color: var(--brick); }
.tx-ico svg { width: 19px; height: 19px; }
.tx-main { flex: 1; min-width: 0; display: grid; }
.tx-main b { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-main small { font-size: 13px; color: var(--muted); }
.tx-amt { font-weight: 600; font-size: 14px; white-space: nowrap; }
.tx.in .tx-amt { color: #10795A; }

.tabbar {
  position: absolute; inset: auto 0 0 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end;
  padding: 10px 14px 18px;
  background: var(--paper);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -10px 30px rgba(6,34,25,.08);
}
.tab { border: 0; background: none; display: grid; justify-items: center; gap: 2px; font-size: 13px; color: var(--muted); }
.tab.on { color: var(--atlas); font-weight: 600; }
.center-pair { display: flex; gap: 14px; margin-top: -38px; }
.fab { border: 0; background: none; display: grid; justify-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--atlas); position: relative; }
.fab svg { width: 60px; height: 60px; padding: 17px; border-radius: 50%; box-shadow: 0 0 0 6px var(--paper), 0 12px 22px -8px rgba(6,34,25,.6); transition: transform .15s; }
.fab:active svg { transform: scale(.94); }
.fab.qr svg { background: var(--atlas); color: #fff; }
.fab.nfc svg { background: var(--mint); color: var(--mint-ink); }
.fab.nfc svg [fill="none"] { stroke-width: 2.3; }
.fab.nudge::before { content: ""; position: absolute; top: 0; left: 50%; width: 60px; height: 60px; margin-left: -30px; border-radius: 50%; border: 2px solid var(--mint); animation: ripple 1.8s ease-out infinite; }

.scrim { position: absolute; inset: 0; background: rgba(6,34,25,.5); z-index: 4; animation: fade .2s; backdrop-filter: blur(2px); }
.sheet {
  position: absolute; inset: auto 0 0 0; z-index: 5;
  background: var(--paper); border-radius: 30px 30px 0 0;
  padding: 10px 20px 24px; display: grid; gap: 14px;
  animation: rise .34s var(--ease);
}
.grip-bar { justify-self: center; width: 44px; height: 5px; border-radius: 3px; background: var(--line); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet h3 { margin: 0; font-size: 19px; }
.nfc-on { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #10795A; background: #DDF6EB; padding: 4px 10px; border-radius: 999px; }
.nfc-on i { width: 7px; height: 7px; border-radius: 50%; background: #10B981; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt { border: 0; border-radius: 22px; padding: 16px 14px; display: grid; justify-items: start; gap: 2px; text-align: start; transition: transform .15s; }
.opt:active { transform: scale(.97); }
.opt b { font-size: 18px; margin-top: 18px; }
.opt small { font-size: 13px; line-height: 1.4; }
.opt-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.opt.send { background: var(--atlas); color: #fff; }
.opt.send small { color: #B9D6CA; }
.opt.send .opt-ico { background: rgba(255,255,255,.12); color: var(--mint); }
.opt.receive { background: #DDF6EB; color: var(--mint-ink); }
.opt.receive small { color: #2F6B57; }
.opt.receive .opt-ico { background: var(--mint); color: var(--mint-ink); }
.sheet-note { margin: 0; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--muted); }
.sheet-note svg { width: 18px; height: 18px; color: #10795A; }

/* ---------- amount ---------- */
.amt-label { text-align: center; margin: 10px 0 4px; color: var(--muted); font-size: 15px; }
.amt-big .num { font-size: 52px; }
.amt-big.empty .num { color: #B5C4BD; }
.amt-meta { text-align: center; margin: 0; font-size: 14px; color: var(--muted); }
.chips { display: flex; justify-content: center; gap: 8px; margin: 12px 0 0; direction: ltr; }
.chips button { border: 0; background: var(--paper); box-shadow: 0 0 0 1px var(--line); border-radius: 999px; padding: 5px 13px; font-family: var(--digits); font-size: 14px; }
.chips button[aria-pressed="true"] { background: var(--atlas); color: #fff; box-shadow: none; }

/* ---------- waiting (dark) ---------- */
.waiting { text-align: center; background: radial-gradient(300px 260px at 50% 28%, rgba(62,224,166,.14), transparent 70%); }
.waiting h2 { margin: 4px 0 6px; font-size: 21px; line-height: 1.45; }
.w-amt { margin: 0 auto; font-size: 16px; font-weight: 600; color: var(--mint-ink); background: var(--mint); padding: 4px 14px; border-radius: 999px; }
.w-sub { margin: 10px auto auto; font-size: 14px; color: #9DB8AD; max-width: 30ch; }
.w-timer { margin: 0 0 4px; font-size: 14px; color: #9DB8AD; }
.count { font-family: var(--digits); font-weight: 600; color: var(--mist); }
.radar { position: relative; width: 220px; height: 220px; margin: 18px auto 10px; display: grid; place-items: center; flex: none; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring-track { stroke: rgba(255,255,255,.08); }
.ring-left { stroke: var(--sand); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.radar i { position: absolute; inset: 18px; border-radius: 50%; border: 2px solid var(--mint); opacity: 0; animation: ring-out 2.4s infinite cubic-bezier(.2,.6,.3,1); }
.radar i:nth-of-type(2) { animation-delay: .8s; }
.radar i:nth-of-type(3) { animation-delay: 1.6s; }
.core { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; background: var(--atlas); color: var(--mint); box-shadow: 0 0 0 1px rgba(62,224,166,.4), 0 20px 40px -10px rgba(0,0,0,.6); position: relative; }
.radar.receive .core { background: var(--mint); color: var(--mint-ink); }
.core svg { width: 50px; height: 50px; }
.core svg [fill="none"] { stroke-width: 2.2; }
.sim { margin-top: 14px; }

/* ---------- ask / processing / result ---------- */
.ask, .processing, .result { justify-content: center; text-align: center; align-items: center; }
.ask-tag { display: flex; align-items: center; gap: 6px; margin: 0 0 18px; padding: 5px 12px; border-radius: 999px; background: #DDF6EB; color: #10795A; font-size: 13px; font-weight: 600; }
.ask-tag svg { width: 16px; height: 16px; }
.ask-who { margin: 0 0 4px; font-size: 16px; }
.ask .big-amt .num { font-size: 48px; }
.ask-sub { margin: 8px 0 26px; font-size: 14px; color: var(--muted); max-width: 30ch; }
.slider { --v: 0%; position: relative; width: 100%; height: 64px; border-radius: 22px; background: var(--atlas); overflow: hidden; display: block; flex: none; }
.slider-text { position: absolute; inset: 0; display: grid; place-items: center; color: #CFE2D8; font-weight: 600; pointer-events: none; animation: shimmer 2.2s ease-in-out infinite; }
.slider-fill { position: absolute; top: 0; bottom: 0; right: 0; width: calc(var(--v) * .82 + 56px); background: rgba(62,224,166,.3); border-radius: 22px; pointer-events: none; }
.slide { -webkit-appearance: none; appearance: none; position: absolute; inset: 4px; width: calc(100% - 8px); height: 56px; margin: 0; background: none; z-index: 2; cursor: grab; }
.slide::-webkit-slider-thumb { -webkit-appearance: none; width: 56px; height: 56px; border-radius: 18px; background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 6l-6 6 6 6' fill='none' stroke='%2304291D' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 24px no-repeat; box-shadow: 0 6px 14px rgba(0,0,0,.25); border: 0; }
.slide::-moz-range-thumb { width: 56px; height: 56px; border-radius: 18px; background: var(--mint); border: 0; }
.slide:focus-visible { outline: none; }
.slider:focus-within { outline: 3px solid var(--sand); outline-offset: 2px; }

.processing h2 { margin: 22px 0 4px; font-size: 19px; }
.processing p { margin: 0; color: var(--muted); font-size: 14px; max-width: 30ch; }
.avatar.wait { animation: breathe 1.6s ease-in-out infinite; }
.flow { display: flex; align-items: center; gap: 6px; direction: ltr; }
.node { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--paper); color: var(--atlas); box-shadow: 0 0 0 1px var(--line); }
.node.hub { background: var(--sand); color: var(--mint-ink); font-weight: 700; font-size: 22px; box-shadow: 0 0 0 6px rgba(229,182,92,.2); }
.lane { position: relative; width: 44px; height: 2px; background: var(--line); }
.lane i { position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); animation: lane 1s linear infinite; }
.lane + .node + .lane i { animation-delay: .5s; }

.result h2 { margin: 6px 0 2px; font-size: 22px; }
.tick { width: 76px; height: 76px; }
.tick circle { fill: var(--mint); stroke: none; transform-origin: center; animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
.tick path { fill: none; stroke: var(--mint-ink); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 44; stroke-dashoffset: 44; animation: draw .45s var(--ease) .3s forwards; }
.result .big-amt { margin-bottom: 14px; }
.result .big-amt .num { font-size: 38px; }
.ticket {
  position: relative; width: 100%;
  background: var(--paper); border-radius: 18px 18px 0 0; padding: 6px 16px 20px;
  text-align: start;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
  animation: print .7s var(--ease) .15s both;
}
.ticket-wrap { position: relative; width: 100%; margin: 0 0 18px; }
.ticket dl { margin: 0; }
.ticket div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.ticket div:last-child { border-bottom: 0; }
.ticket dt { color: var(--muted); }
.ticket dd { margin: 0; font-weight: 600; }
.stamp {
  position: absolute; left: 6px; top: -38px; transform: rotate(-12deg);
  display: grid; justify-items: center; line-height: 1.2;
  padding: 6px 12px; border: 2px solid #10795A; border-radius: 12px; color: #10795A; background: rgba(255,255,255,.85);
  font-weight: 700; font-size: 16px;
  animation: stamp .4s cubic-bezier(.2,1.6,.4,1) .8s both;
}
.stamp small { font-size: 12px; font-weight: 600; }
.res-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; width: 100%; }
.bad .res-ico { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: #F8E6E1; color: var(--brick); margin-bottom: 8px; animation: pop .45s cubic-bezier(.2,1.6,.4,1); }
.bad .res-ico svg { width: 34px; height: 34px; }
.res-why { margin: 6px 0 10px; font-size: 16px; max-width: 30ch; }
.res-safe { margin: 0 0 28px; display: flex; align-items: center; gap: 6px; font-size: 14px; color: #10795A; background: #DDF6EB; padding: 6px 12px; border-radius: 999px; }
.res-safe svg { width: 18px; height: 18px; }

/* ---------- client notes ---------- */
.notes-btn {
  display: flex; align-items: center; gap: 8px; flex: none;
  border: 0; border-radius: 999px; padding: 9px 16px 9px 18px;
  background: var(--sand); color: var(--mint-ink); font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 24px -12px rgba(229,182,92,.8);
}
.notes-btn svg { width: 18px; height: 18px; }
.notes-btn svg [fill="none"] { stroke-width: 2.2; }
.notes {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  border: 0; border-radius: 26px; padding: 0; color: var(--ink); background: var(--mist);
  box-shadow: 0 40px 90px rgba(0,0,0,.5);
}
.notes[open] { animation: enter .3s var(--ease); }
.notes::backdrop { background: rgba(6,34,25,.7); backdrop-filter: blur(3px); }
.notes form { display: grid; gap: 12px; padding: 22px 22px 24px; }
.notes-head { display: flex; align-items: center; justify-content: space-between; }
.notes h2 { margin: 0; font-size: 21px; }
.notes-x { border: 0; background: var(--paper); width: 38px; height: 38px; border-radius: 12px; font-size: 22px; line-height: 1; box-shadow: 0 0 0 1px var(--line); }
.notes-sub { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.75; }
.notes-field { display: grid; gap: 6px; }
.notes-field span { font-size: 14px; color: var(--muted); }
.notes-field input, .notes-field textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--paper);
  border: 0; border-radius: 16px; padding: 12px 14px; box-shadow: 0 0 0 1px var(--line); resize: vertical;
}
.notes-field textarea { min-height: 180px; line-height: 1.8; }
.notes-field input:focus, .notes-field textarea:focus { outline: none; box-shadow: 0 0 0 2px var(--atlas); }
.notes-status { margin: 0; min-height: 22px; font-size: 14px; color: var(--muted); }
.notes-status[data-tone="ok"] { color: #10795A; font-weight: 600; }
.notes-status[data-tone="bad"] { color: var(--brick); font-weight: 600; }
.notes-send { border: 0; border-radius: 18px; padding: 15px; background: var(--atlas); color: #fff; font-weight: 600; font-size: 16px; }
.notes-send:disabled { opacity: .6; }
.notes-sent { border-top: 1px dashed var(--line); padding-top: 12px; }
.notes-sent p { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.notes-sent ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 180px; overflow-y: auto; }
.notes-sent li { background: var(--paper); border-radius: 14px; padding: 10px 12px; box-shadow: 0 0 0 1px var(--line); font-size: 14px; white-space: pre-wrap; }
.notes-sent time { display: block; font-size: 12px; color: var(--muted); direction: ltr; text-align: right; }

/* ---------- toast ---------- */
.toast {
  position: fixed; inset: auto 16px 24px; margin: 0 auto; max-width: 440px; z-index: 50;
  background: var(--paper); color: var(--ink); border-radius: 16px; padding: 12px 18px; text-align: center; font-size: 14px; font-weight: 500;
  box-shadow: 0 18px 40px rgba(0,0,0,.4); animation: enter .3s var(--ease);
}

@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
@keyframes rise { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes ring-out { 0% { transform: scale(.55); opacity: .9; } 100% { transform: scale(1.15); opacity: 0; } }
@keyframes burst { 0% { transform: scale(.2); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes ripple { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(229,182,92,.2); } }
@keyframes blink { 50% { opacity: .4; } }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@keyframes breathe { 50% { transform: scale(1.04); } }
@keyframes scan { from { top: 10%; } to { top: 86%; } }
@keyframes nudge-x { 50% { transform: translateX(var(--dx)); } }
@keyframes packet { 0% { right: -53px; opacity: 0; } 20% { opacity: 1; } 100% { right: -6px; opacity: 0; } }
@keyframes lane { from { left: 0; } to { left: 36px; } }
@keyframes shimmer { 50% { opacity: .55; } }
@keyframes print { from { clip-path: inset(0 0 100% 0); transform: translateY(-10px); } to { clip-path: inset(0 0 0 0); } }
@keyframes stamp { from { transform: rotate(-12deg) scale(2); opacity: 0; } }
@keyframes fresh { 0% { background: rgba(62,224,166,.35); } 100% { background: transparent; } }
@keyframes ghost { 0% { transform: translateY(-110%); } 45%, 60% { transform: translateY(-58%); } 100% { transform: translateY(-110%); } }

/* ---------- one phone at a time below desktop ---------- */
@media (max-width: 1180px) {
  .stage-head { flex-wrap: wrap; gap: 14px 20px; }
  .guide { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .guide li { flex: none; }
  .switch { display: flex; }
  .notes-btn { margin-inline-start: auto; }
  .pair { gap: 0; }
  .stage[data-view="A"] #devB, .stage[data-view="B"] #devA, .contact, .grip { display: none; }
  .pair.touch #devA .phone, .pair.touch #devB .phone { transform: none; }
  .ghost {
    display: block; position: absolute; z-index: 8; top: 0; left: 12%; right: 12%; height: 46%;
    border-radius: 40px; transform: translateY(-110%);
    background: linear-gradient(180deg, #26302C, #141A18); box-shadow: 0 20px 40px rgba(0,0,0,.5), 0 0 0 2px rgba(62,224,166,.5);
  }
  .phone { overflow: hidden; }
  .pair.touch .ghost { animation: ghost 1s var(--ease); }
  .rail::before, .rail::after { display: none; }
}
@media (max-width: 760px) {
  .stage-head { padding: 14px 16px 2px; }
  .brand small { display: none; }
  .notes-btn { order: 4; width: 100%; justify-content: center; }
  .guide li:not([data-state="now"]) { font-size: 0; gap: 0; padding: 7px; }
  .guide li::before { font-size: 12px; }
  .stage { grid-template-columns: 1fr; padding: 10px 16px 32px; gap: 22px; }
  .device-label { display: none; }
  .device { gap: 0; }
  .phone { width: 100%; max-width: 420px; height: min(780px, calc(100svh - 120px)); min-height: 640px; padding: 8px; border-radius: 40px; }
  .phone::before { top: 18px; width: 84px; height: 22px; }
  .screen { border-radius: 33px; }
  .rail { margin-top: 0; }
  .rail .tap-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .splash .logo g path, .tick path { stroke-dashoffset: 0; }
}
