/* ==========================================================================
   Story (#story). Prefix: st-
   Desktop (>= 1024px): pinned stage, chapter column + Zimam panel + rope + Bonat phone.
   Below 1024px: still pinned, stacked (panel, vertical rope, phone, bottom sheet).
   Reduced motion: five static chapter blocks cloned by js/s-story.js.
   Default CSS = the FINAL state of every chapter. JS sets the starting states.
   ========================================================================== */

.st { padding-block-end: 0; }
.st-head { margin-block-end: clamp(12px, 2vw, 28px); }
.st-head__sub { max-width: 40rem; }

/* ---------- Pin + frame ---------- */
.st-pin { height: 100vh; height: 100svh; min-height: 600px; overflow-x: clip; }
.st-pin.gridpaper::before {
  -webkit-mask-image: radial-gradient(64% 62% at 60% 52%, #000 25%, transparent 82%);
  mask-image: radial-gradient(64% 62% at 60% 52%, #000 25%, transparent 82%);
}
.st-frame {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  column-gap: clamp(28px, 4.2vw, 72px);
  padding-block: calc(var(--nav-h) + 14px) 14px;
}

/* ---------- Chapter text ---------- */
.st-text { grid-column: 1; grid-row: 1; align-self: center; position: relative; z-index: 4; }
.st-chs { display: grid; }
.st-ch { grid-area: 1 / 1; align-self: center; }
.st-ch__num {
  display: inline-flex; align-items: baseline; gap: 7px;
  direction: ltr; unicode-bidi: isolate;
  font-family: "Inter", sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: var(--z-blue);
}
.st-ch__num::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; align-self: center; }
.st-ch__of { color: var(--g-400); font-weight: 500; }
[dir="rtl"] .st-ch__num::before { order: 2; }
.st-ch__title {
  margin-block: 14px 18px;
  font-family: var(--font-display); font-weight: 650;
  font-size: clamp(2rem, 1.05rem + 1.5vw, 2.875rem);
  line-height: 1.04; letter-spacing: -.026em;
  color: var(--ink);
  text-wrap: balance;
}
.st-ch__body { font-size: 1.0625rem; line-height: 1.62; color: var(--g-700); text-wrap: pretty; max-width: 30em; }
:lang(ar) .st-ch__title { font-weight: 700; letter-spacing: 0; line-height: 1.34; margin-block: 12px 14px; }
:lang(ar) .st-ch__body { line-height: 1.9; }

/* ---------- Stage ---------- */
.st-stage {
  grid-column: 2; grid-row: 1;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(72px, .55fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
}
.st-slot { position: relative; min-width: 0; min-height: 0; }
.st-slot--z { grid-column: 1; grid-row: 1; z-index: 2; }
.st-slot--b { grid-column: 3; grid-row: 1; z-index: 3; }
.st-zwrap, .st-bwrap {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(var(--s, 1));
  transform-origin: 50% 50%;
}
.st-zwrap { width: 440px; top: 48%; }
.st-bwrap { width: 300px; }
.st-zbox, .st-bbox { position: relative; }

/* Device captions */
.st-cap { display: flex; align-items: center; gap: 8px; margin-block-end: 12px; font-size: 13px; line-height: 1.2; color: var(--g-500); white-space: nowrap; }
.st-cap b { color: var(--ink); font-weight: 600; }
.st-cap b::after { content: "·"; margin-inline-start: 8px; color: var(--g-300); font-weight: 400; }
.st-cap__mark { width: 20px; height: 20px; }
.st-cap__bmark { width: 12px; height: 20px; color: var(--b-plum); }
.st-cap--b { justify-content: center; }

/* ---------- The rope ---------- */
.st-rope { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.st-rope path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.st-rope__shade { stroke: transparent; }
.st-rope__line { stroke: transparent; stroke-width: 2; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.st-rope__twist { stroke: #BDBDC4; stroke-width: 2; stroke-dasharray: 5 9; }
.st-rope__knot { stroke: #BDBDC4; stroke-width: 2; stroke-dasharray: 1 1; stroke-dashoffset: 0; opacity: 0; }

.st-ring {
  position: absolute; z-index: 5;
  width: 12px; height: 12px; margin: -6px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid #C9C9CF;
  box-shadow: none;
  scale: calc(max(.8, var(--s, 1)) / var(--s, 1));
}
.st-ring--z { inset-inline-end: 0; top: 55.5%; }
.st-ring--b { inset-inline-start: 0; top: 47%; }

/* Gift that travels along the rope */
.st-gift { position: absolute; left: 0; top: 0; z-index: 8; width: 92px; visibility: hidden; pointer-events: none; }
.st-gift__ill { width: 100%; filter: drop-shadow(0 10px 10px rgba(40, 20, 10, .16)); }

/* ---------- Margin notes ---------- */
.st-note {
  --ns: max(.84, min(1, var(--s, 1)));
  position: absolute; z-index: 7;
  display: flex; flex-direction: column; gap: 0;
  margin: 0;
  white-space: nowrap;
  pointer-events: none;
  visibility: hidden;
  scale: calc(var(--ns) / var(--s, 1));
}
.st-note__t { display: block; line-height: 1; }
.st-note--z { color: var(--z-blue); }
.st-note--b { color: var(--b-violet); }
.st-note__arw { width: 54px; height: 37px; overflow: visible; flex: none; }
.st-note__arw path { fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
:lang(ar) .st-note { font-size: 17px; }
:lang(ar) .st-note__t { line-height: 1.5; }

/* Panel side (outside the panel's end edge, in the rope gap) */
.st-note--1 { inset-inline-start: calc(100% + 26px); top: 196px; align-items: flex-start; }
.st-note--1 .st-note__arw { margin-inline-start: -30px; margin-block-start: 2px; }
.st-note--3 { inset-inline-start: calc(100% + 24px); top: 404px; flex-direction: column-reverse; align-items: flex-start; }
.st-note--3 .st-note__arw { margin-inline-start: -34px; margin-block-end: 2px; }
.st-note--5 { inset-inline-start: calc(100% + 30px); top: 92px; align-items: flex-start; }
.st-note--5 .st-note__arw { margin-inline-start: -46px; margin-block-start: 2px; }
/* Phone side (outside the phone's start edge) */
.st-note--2 { inset-inline-end: calc(100% + 14px); top: 132px; align-items: flex-end; }
.st-note--4 { inset-inline-end: calc(100% + 14px); top: 352px; flex-direction: column-reverse; align-items: flex-end; }

/* ---------- Stickers ---------- */
.st-stk {
  position: absolute; z-index: 6;
  width: var(--size, 110px);
  visibility: hidden;
  pointer-events: none;
  filter: drop-shadow(0 8px 10px rgba(40, 20, 10, .14));
  scale: calc(max(.62, var(--s, 1)) / var(--s, 1));
}
.st-stk--clock { --size: 112px; bottom: 64px; inset-inline-start: -64px; rotate: -5deg; }
[dir="rtl"] .st-stk--clock { rotate: 5deg; scale: calc(-1 * max(.62, var(--s, 1)) / var(--s, 1)) calc(max(.62, var(--s, 1)) / var(--s, 1)); }
.st-stk--welcome { --size: 124px; top: 176px; inset-inline-start: -150px; rotate: -4deg; }
.st-stk--heart { --size: 96px; top: 378px; inset-inline-start: -128px; rotate: 6deg; }

/* ==========================================================================
   Zimam panel (design size 440px wide, scaled to fit by JS)
   ========================================================================== */
.st-panel {
  --st-row: 54px;
  position: relative;
  width: 440px;
  background: #fff;
  border: 1px solid var(--g-150);
  border-radius: 20px;
  box-shadow: var(--sh-card), 0 1px 2px rgba(16, 24, 40, .04);
  overflow: hidden;
}
.st-bar { display: flex; align-items: center; gap: 8px; height: 50px; padding-inline: 14px; border-block-end: 1px solid var(--g-150); background: #fff; }
.st-bar__mark { width: 22px; height: 22px; }
.st-bar__store { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-bar__chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding-inline: 9px; border: 1px solid var(--g-200); border-radius: 8px; font-size: 12px; font-weight: 500; color: var(--g-700); white-space: nowrap; }
.st-bar__chip .ico { width: 14px; height: 14px; color: var(--g-500); vertical-align: 0; }
.st-bar__caret { width: 11px !important; height: 11px !important; }
.st-scenes { display: grid; padding: 12px; background: var(--g-50); }
.st-scene { grid-area: 1 / 1; display: grid; gap: 10px; align-content: start; min-width: 0; }
.st-scene + .st-scene { visibility: hidden; }
.st-card { border-radius: 14px; }
.st-card .zcard__head { padding: 11px 14px; }
.st-card .zcard__title { font-size: 14px; }
.st-card .zcard__title .ico { width: 18px; height: 18px; vertical-align: 0; }
.st-card .zcard__btn { font-size: 11.5px; }

/* Shared */
.st-av {
  position: relative; flex: none;
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--av, var(--g-100)); color: var(--avi, var(--g-700));
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
:lang(ar) .st-av { font-size: 14px; letter-spacing: 0; }
.st-av--sara { --av: var(--z-blue); --avi: #fff; }
.st-chip { padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.st-chip--gold { background: #FFF6E0; color: #A16207; }
.st-chip--ok { background: var(--up-bg); color: #15803D; }

/* Scene 1: customers */
.st-kpis { display: grid; grid-template-columns: 1fr 1.3fr; border-block-end: 1px solid var(--g-150); }
.st-kpi { display: grid; gap: 4px; align-content: start; padding: 12px 14px; }
.st-kpi + .st-kpi { border-inline-start: 1px solid var(--g-150); }
.st-kpi__row { display: flex; align-items: center; gap: 8px; }
.st-kpi__v { font-size: 26px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.st-kpi__sub { font-size: 12px; color: var(--g-500); }
.st-regbar { height: 6px; margin-block-start: 4px; }
.st-list { padding: 10px 6px 6px; }
.st-list__head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 6px; font-size: 12px; font-weight: 500; color: var(--g-500); }
.st-live { display: inline-flex; align-items: center; gap: 6px; color: var(--up); font-weight: 600; }
.st-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px var(--up-bg); }
.st-list__clip { height: calc(var(--st-row) * 4); overflow: hidden; }
.st-row { position: relative; display: flex; align-items: center; gap: 10px; height: var(--st-row); padding-inline: 8px; border-radius: 10px; }
.st-row + .st-row::before { content: ""; position: absolute; inset-inline: 52px 8px; top: 0; height: 1px; background: var(--g-150); }
.st-row--sara { background: var(--z-blue-50); box-shadow: inset 0 0 0 1px var(--z-blue-100); }
.st-row--sara + .st-row::before { display: none; }
.st-row__flash { position: absolute; inset: 0; border-radius: inherit; background: var(--z-blue-100); opacity: 0; }
.st-row > :not(.st-row__flash) { position: relative; }
.st-row__who { display: grid; flex: 1; min-width: 0; line-height: 1.32; }
.st-row__who b { font-size: 14px; font-weight: 600; }
.st-row__who small { font-size: 12px; color: var(--g-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-row__end { display: grid; justify-items: end; line-height: 1.32; font-size: 14px; font-weight: 600; }
.st-pts { font-size: 12px; font-weight: 600; color: #15803D; }

/* Scene 2: retention */
.st-ret { display: grid; justify-items: center; gap: 2px; padding: 20px 14px 16px; }
.st-ret__big { display: flex; align-items: flex-start; gap: 8px; }
.st-ret__big .zmetric { font-size: 54px; }
.st-ret__delta { margin-block-start: 12px; }
.st-ret__sub { font-size: 12.5px; }
.st-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block-start: 1px solid var(--g-150); }
.st-trio > div { display: grid; gap: 2px; padding: 10px 14px 12px; min-width: 0; }
.st-trio > div + div { border-inline-start: 1px solid var(--g-150); }
.st-trio .zlabel { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-trio b { display: flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 500; letter-spacing: -.02em; }
.st-smart { border-radius: 0; }
.st-smart__txt { display: grid; gap: 3px; }
.st-smart__link { justify-self: start; }
.st-urgent { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.st-urgent__ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--down-bg); color: var(--down); }
.st-urgent__ico .ico { width: 19px; height: 19px; vertical-align: 0; }
.st-urgent__txt { display: grid; flex: 1; min-width: 0; line-height: 1.35; }
.st-urgent__txt b { font-size: 13px; font-weight: 600; text-wrap: balance; }
.st-urgent__txt small { font-size: 12px; color: var(--g-500); }
.st-stack { display: flex; flex: none; }
.st-av--xs { width: 28px; height: 28px; font-size: 9.5px; box-shadow: 0 0 0 2px #fff; }
:lang(ar) .st-av--xs { font-size: 12px; }
.st-stack .st-av--xs + .st-av--xs { margin-inline-start: -7px; }
.st-av--more { --av: var(--g-100); --avi: var(--g-600); font-variant-numeric: tabular-nums; }

/* Scene 3: send gift */
.st-tag { padding: 3px 10px; border-radius: 99px; background: var(--z-blue-50); color: var(--z-blue-700); font-size: 12px; font-weight: 600; white-space: nowrap; }
.st-form { display: grid; gap: 12px; padding: 14px; }
.st-field { display: grid; gap: 6px; }
.st-field__label { font-size: 13px; font-weight: 500; }
.st-input { display: flex; align-items: center; gap: 8px; height: 42px; padding-inline: 12px; border: 1px solid var(--g-200); border-radius: 10px; background: #fff; font-size: 14px; }
.st-input .ico { width: 17px; height: 17px; color: var(--g-500); vertical-align: 0; }
.st-input__v { flex: 1; min-width: 0; }
.st-input__n { padding: 1px 9px; border-radius: 99px; background: var(--z-blue-50); color: var(--z-blue); font-size: 12px; font-weight: 600; }
.st-input__caret { width: 14px !important; height: 14px !important; }
.st-input--ro { justify-content: space-between; background: var(--g-50); }
.st-input__amt { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.st-input__hint { font-size: 12px; color: var(--g-500); white-space: nowrap; }
.st-field__hint { font-size: 12px; color: var(--g-500); }
.st-send__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 14px; border-block-start: 1px solid var(--g-150); }
.st-ghost { display: inline-flex; align-items: center; height: 38px; padding-inline: 14px; border: 1px solid var(--g-200); border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--g-700); }
.st-sendbtn { position: relative; display: inline-grid; height: 38px; }
.st-tap { position: absolute; z-index: 2; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px; border-radius: 50%; border: 2px solid var(--z-blue); opacity: 0; pointer-events: none; }
.st-sendbtn__a, .st-sendbtn__b {
  grid-area: 1 / 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding-inline: 16px; border-radius: 10px;
  color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.st-sendbtn .ico { width: 16px; height: 16px; vertical-align: 0; }
[dir="rtl"] .st-sendbtn__a .ico { transform: scaleX(-1); }
.st-sendbtn__a { background: var(--z-blue); box-shadow: 0 4px 12px rgba(51, 92, 255, .28); opacity: 0; }
.st-sendbtn__b { background: var(--up); }

/* Scene 4: campaign result */
.st-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: var(--up-bg); color: #15803D; font-size: 12px; font-weight: 600; }
.st-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-camp { display: grid; gap: 12px; padding: 18px 14px 14px; }
.st-camp__big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.st-camp__big .zmetric { font-size: 48px; }
.st-camp__of { font-size: 15px; font-weight: 500; color: var(--g-600); }
.st-camp__pct { align-self: center; }
.st-camp__bar { position: relative; display: block; height: 8px; border-radius: 99px; background: var(--g-150); overflow: hidden; }
.st-camp__bar i { position: absolute; inset-block: 0; inset-inline-start: 0; width: 55%; border-radius: inherit; background: var(--up); transform-origin: 0 50%; }
[dir="rtl"] .st-camp__bar i { transform-origin: 100% 50%; }
.st-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 14px 14px; }
.st-tile { display: grid; gap: 4px; align-content: start; padding: 10px 12px; border: 1px solid var(--g-150); border-radius: 12px; background: var(--g-50); min-width: 0; }
.st-tile b { font-size: 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.st-tile--hi { background: var(--up-bg); border-color: transparent; }
.st-tile--hi .zlabel { color: #15803D; }
.st-tile b.st-tile__x { font-size: 15px; color: #14532D; }
.st-spark { position: relative; padding: 0 14px 24px; }
.st-spark__svg { display: block; width: 100%; height: 64px; overflow: visible; }
[dir="rtl"] .st-spark__svg { transform: scaleX(-1); }
.st-spark__area { fill: rgba(22, 163, 74, .09); }
.st-spark__line { fill: none; stroke: var(--up); stroke-width: 2.2; stroke-linecap: round; }
.st-spark__l, .st-spark__r { position: absolute; bottom: 4px; font-size: 11px; color: var(--g-500); }
.st-spark__l { inset-inline-start: 14px; }
.st-spark__r { inset-inline-end: 14px; }
.st-okstrip { font-size: 13px; }

/* Scene 5: profile */
.st-prof { display: flex; align-items: center; gap: 12px; padding: 16px 14px 14px; }
.st-av--lg { width: 52px; height: 52px; font-size: 17px; }
:lang(ar) .st-av--lg { font-size: 22px; }
.st-prof__who { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.st-prof__who b { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.st-prof__who small { font-size: 12px; color: var(--g-500); }
.st-gold { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px 5px 9px; border-radius: 99px; background: #FFF6E0; color: #A16207; font-size: 12.5px; font-weight: 700; box-shadow: inset 0 0 0 1px #F5DFA0; }
[dir="rtl"] .st-gold { padding: 5px 9px 5px 12px; }
.st-gold .ico { width: 16px; height: 16px; color: var(--b-gold); vertical-align: 0; }
.st-pstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--g-150); }
.st-pstats > div { display: grid; gap: 2px; padding: 10px 14px 12px; min-width: 0; }
.st-pstats > div + div { border-inline-start: 1px solid var(--g-150); }
.st-pstats b { font-size: 20px; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; }
.st-stars5 { display: inline-flex; align-items: center; gap: 1px; color: var(--b-gold); }
.st-stars5 .ico { width: 15px; height: 15px; vertical-align: 0; }
.st-pstats .st-stars5 { height: 26px; }
.st-stars5--sm .ico { width: 13px; height: 13px; }
.st-hist { padding: 14px 14px 2px; }
.st-hist__dots { position: relative; display: flex; align-items: center; justify-content: space-between; height: 16px; }
.st-hist__dots::before { content: ""; position: absolute; inset-inline: 4px; top: 50%; height: 2px; margin-top: -1px; background: var(--g-150); }
.st-hist__dots i { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--z-blue); box-shadow: 0 0 0 2px #fff; }
.st-hist__dots i.is-gift { width: 14px; height: 14px; background: var(--b-peach-600); }
.st-hist__dots i.is-last { width: 14px; height: 14px; background: var(--b-gold); }
.st-hist__lbl { display: flex; justify-content: space-between; margin-block-start: 6px; font-size: 11px; color: var(--g-500); }
.st-hist { position: relative; padding-block-start: 30px; }
.st-hist__tag { position: absolute; top: 8px; inset-inline-start: calc(31px + (100% - 176px) / 13); padding: 1px 7px; border-radius: 99px; background: #FDEDE6; color: #B4532F; font-size: 10.5px; font-weight: 600; white-space: nowrap; translate: -50% 0; }
[dir="rtl"] .st-hist__tag { translate: 50% 0; }
.st-review { display: grid; gap: 4px; margin: 12px 14px 0; padding: 11px 14px 12px; border-radius: 12px; background: var(--g-50); border: 1px solid var(--g-150); }
.st-review__q { font-size: 14px; font-weight: 500; line-height: 1.45; quotes: "\201C" "\201D"; }
:lang(ar) .st-review__q { quotes: "\00AB" "\00BB"; }
.st-review__meta { font-size: 12px; color: var(--g-500); }
.st-sat { display: flex; align-items: center; gap: 8px; padding: 12px 14px 14px; font-size: 13px; color: var(--g-600); }
.st-sat .ico { width: 18px; height: 18px; color: var(--up); vertical-align: 0; }
.st-sat b { margin-inline-start: auto; color: var(--ink); font-weight: 600; direction: ltr; }

/* ==========================================================================
   Bonat phone (app canvas designed at 375 x 842, scaled into the 300px phone)
   ========================================================================== */
.st-phone { --pw: 300px; }
.st-app { position: absolute; left: 0; top: 0; width: 375px; height: 842px; overflow: hidden; transform: scale(.7488); transform-origin: 0 0; background: var(--b-app-bg); font-size: 15px; }
.st-scr { position: absolute; inset: 0; isolation: isolate; }
.st-scr:not(.st-scr1) { visibility: hidden; }
.st-app .ico { vertical-align: 0; }

.st-sbar { position: absolute; z-index: 20; top: 0; left: 0; right: 0; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 8px 30px 0 44px; direction: ltr; color: #111; font-family: "Inter", sans-serif; pointer-events: none; }
.st-sbar b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.st-sbar__ico { display: flex; align-items: center; gap: 6px; }
.st-sbar__ico svg { height: 12px; width: auto; fill: currentColor; }
.st-homebar { position: absolute; z-index: 20; bottom: 9px; left: 50%; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: currentColor; color: #111; opacity: .9; }

/* Store logo (Hayl Roastery) */
.st-logo { position: absolute; top: -42px; inset-inline-start: 20px; display: grid; place-content: center; justify-items: center; width: 78px; height: 78px; border-radius: 18px; background: #1F3A2C; border: 3px solid #fff; box-shadow: 0 6px 14px rgba(0, 0, 0, .12); color: #F2E6D3; line-height: 1; }
.st-logo b { font-family: var(--font-display); font-weight: 900; font-size: 17px; letter-spacing: .06em; }
.st-logo small { margin-top: 3px; font-family: "IBM Plex Sans Arabic", sans-serif; font-weight: 700; font-size: 14px; }
.st-logo--sm { position: static; flex: none; width: 54px; height: 54px; border-radius: 14px; border-width: 2px; box-shadow: none; }
.st-logo--sm b { font-size: 12px; }
.st-logo--sm small { font-size: 11px; }
.st-logo--xs { position: static; flex: none; width: 42px; height: 42px; border-radius: 11px; border-width: 2px; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.st-logo--xs b { font-size: 10px; }
.st-logo--xs small { font-size: 9px; margin-top: 1px; }

/* S1: store page */
.st-s1__hero { position: absolute; inset-inline: 0; top: 0; height: 236px; overflow: hidden; background: #F5E2D2; }
.st-s1__hero::before { content: ""; position: absolute; width: 230px; height: 230px; border-radius: 50%; top: 30px; inset-inline-end: -10px; background: #F9EDE3; }
.st-s1__cup { position: absolute; width: 150px; top: 52px; inset-inline-end: 44px; rotate: 6deg; }
.st-s1__sheet { position: absolute; inset-inline: 0; top: 196px; bottom: 0; padding: 50px 20px 0; background: #fff; border-radius: 28px 28px 0 0; }
.st-s1__name { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.st-s1__name h4 { font-size: 27px; color: #111; }
.st-s1__pts { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 700; white-space: nowrap; }
.st-coin { margin-inline-end: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--b-gold); box-shadow: inset 0 0 0 2px #C98A06, inset 0 0 0 4px #FFD66B; }
.st-s1__chips { display: flex; gap: 8px; margin-block: 10px 16px; }
.st-bchip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding-inline: 9px; border-radius: 7px; background: #F3F3F3; font-size: 13px; font-weight: 600; color: #4A4A4A; }
.st-bchip .ico { width: 14px; height: 14px; }
.st-bchip--loc { background: #FFF2DB; color: #C26A00; }
.st-skip { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 16px; background: #F3F3F3; border: 1px solid #E7E7E7; }
.st-skip__ico { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #2A1046; }
.st-skip__ico .ico { width: 20px; height: 20px; }
.st-skip__txt { display: grid; flex: 1; line-height: 1.2; }
.st-skip__txt b { font-size: 21px; color: #111; }
.st-skip__txt small { font-size: 14px; color: #666; margin-top: 2px; }
.st-skip__go { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #E3E3E3; }
.st-skip__go .ico { width: 16px; height: 16px; }
.st-wallet { display: flex; align-items: center; gap: 12px; margin-block-start: 14px; padding: 14px 16px; border-radius: 18px; background: #EFE5FA; border: 1.5px solid var(--b-lilac); }
.st-wallet__ill { width: 76px; flex: none; }
.st-wallet__main { display: grid; gap: 4px; flex: 1; min-width: 0; }
.st-wallet__pill { justify-self: start; padding: 2px 8px; border-radius: 6px; background: rgba(42, 16, 70, .08); color: var(--b-plum); font-size: 12px; font-weight: 700; }
.st-wallet__big { display: flex; align-items: baseline; gap: 5px; color: #111; }
.st-wallet__big b { font-size: 40px; line-height: 1; }
.st-wallet__big > span { font-size: 15px; font-weight: 700; color: #555; }
.st-wallet__bar { display: block; height: 6px; border-radius: 99px; background: rgba(42, 16, 70, .12); overflow: hidden; }
.st-wallet__bar i { display: block; width: 12%; height: 100%; border-radius: inherit; background: var(--b-plum); transform-origin: 0 50%; }
[dir="rtl"] .st-wallet__bar i { transform-origin: 100% 50%; }
.st-wallet small { font-size: 12px; color: #4A4A4A; }
.st-s1__deals { margin-block: 20px 12px; font-size: 19px; color: #111; }
:lang(en) .st-s1__deals { text-transform: uppercase; }
.st-item { display: flex; align-items: center; gap: 12px; }
.st-item__img { display: grid; place-items: center; flex: none; width: 66px; height: 66px; border-radius: 14px; background: var(--b-peach); color: var(--b-plum); }
.st-item__img .ico { width: 30px; height: 30px; }
.st-item__txt { display: grid; flex: 1; line-height: 1.25; }
.st-item__txt small { font-size: 12px; color: #666; }
.st-item__txt b { font-size: 19px; color: #111; }
.st-item__txt .amt { font-size: 16px; font-weight: 700; justify-self: start; }
.st-item__add { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #F0F0F0; }
.st-item__add .ico { width: 14px; height: 14px; }
.st-toast { position: absolute; z-index: 5; inset-inline: 0; bottom: 0; display: flex; align-items: center; gap: 14px; padding: 22px 22px 42px; background: #fff; border-radius: 28px 28px 0 0; box-shadow: 0 -14px 34px rgba(17, 10, 30, .16); }
.st-toast__coin { width: 78px; flex: none; }
.st-toast__txt { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.st-toast__txt > small { font-size: 16px; font-weight: 700; color: #1E9E6E; }
.st-toast__txt > b { font-size: 31px; color: #111; margin-block: 1px 3px; }
.st-toast__txt > span { font-size: 13px; color: #6B6B6B; }
.st-toast__x { position: absolute; top: 18px; inset-inline-end: 18px; color: #9A9A9A; }
.st-toast__x .ico { width: 18px; height: 18px; }

/* S2: three quiet weeks */
.st-scr2 { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding-bottom: 30px; background: rgba(20, 10, 34, .975); color: #fff; text-align: center; }
.st-days__lbl { font-size: 17px; font-weight: 600; opacity: .72; }
.st-days__n { font-family: var(--font-display); font-weight: 900; font-size: 152px; line-height: .92; letter-spacing: -.02em; }
.st-days__grid { display: grid; grid-template-columns: repeat(7, 26px); gap: 8px; margin-block: 18px 12px; }
.st-days__grid i { width: 26px; height: 26px; border-radius: 8px; background: var(--b-peach); }
.st-days__sub { font-size: 15px; opacity: .6; }

/* S3: lock screen */
.st-scr3 { background: var(--b-plum); color: #fff; text-align: center; overflow: hidden; }
.st-lock__wm { position: absolute; z-index: 0; width: 64px; height: 107px; left: 50%; bottom: 168px; margin-left: -32px; color: var(--b-plum-700); }
.st-lock__day { position: absolute; z-index: 1; top: 96px; inset-inline: 0; font-size: 21px; font-weight: 600; opacity: .86; }
.st-lock__time { position: absolute; z-index: 1; top: 120px; inset-inline: 0; font-family: var(--font-display); font-weight: 700; font-size: 104px; line-height: 1; direction: ltr; }
.st-notif { position: absolute; z-index: 2; top: 286px; inset-inline: 12px; display: flex; align-items: flex-start; gap: 13px; padding: 16px 16px 17px; background: rgba(255, 255, 255, .94); color: #111; border-radius: 24px; text-align: start; box-shadow: 0 12px 30px rgba(0, 0, 0, .28); }
.st-notif__app { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--b-plum); color: #fff; }
.st-notif__mark { width: 14px; height: 24px; }
.st-notif__body { display: grid; flex: 1; min-width: 0; gap: 2px; font-size: 16.5px; line-height: 1.32; }
.st-notif__top { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; letter-spacing: .03em; color: #6B6B6B; }
.st-notif__body b { font-size: 18px; font-weight: 800; line-height: 1.25; }
.st-lock__btn { position: absolute; z-index: 1; bottom: 50px; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.st-lock__btn .ico { width: 24px; height: 24px; }
.st-lock__btn--a { left: 46px; }
.st-lock__btn--b { right: 46px; }

/* S4 / S5 shared app header */
.st-scr4, .st-scr5 { padding: 64px 18px 0; background: #F3F3F3; }
.st-hdr { display: flex; align-items: center; gap: 10px; height: 44px; margin-block-end: 12px; color: #111; }
.st-hdr .ico { width: 22px; height: 22px; }
.st-hdr b { font-size: 21px; }
.st-hdr__help { margin-inline-start: auto; }

/* S4: my code */
.st-gcard { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: #1F3A2C; color: #F2E6D3; }
.st-gcard__txt { display: grid; flex: 1; min-width: 0; line-height: 1.2; }
.st-gcard__txt small { font-size: 13px; opacity: .78; }
.st-gcard__txt b { font-size: 22px; margin-top: 3px; }
.st-gcard__free { padding: 4px 11px; border-radius: 8px; background: var(--b-peach); color: var(--b-plum); font-size: 13px; font-weight: 800; }
.st-qr { position: relative; display: grid; justify-items: center; gap: 14px; margin-block-start: 14px; padding: 26px 18px 24px; border-radius: 22px; background: #fff; }
.st-qr__code { position: relative; width: 236px; height: 236px; padding: 12px; border-radius: 18px; border: 1.5px dashed #D6D6D6; }
.st-qr__svg { display: block; width: 100%; height: 100%; color: #111; }
.st-qr__scan { position: absolute; inset-inline: 8px; top: 8px; height: 3px; border-radius: 3px; background: #16A34A; opacity: 0; }
.st-qr > small { font-size: 14px; color: #666; }
.st-qr__done { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 20px; border-radius: inherit; background: rgba(255, 255, 255, .97); text-align: center; }
.st-qr__check { color: #16A34A; }
.st-qr__check .ico { width: 78px; height: 78px; }
.st-qr__done b { font-size: 28px; color: #111; }
.st-qr__done > span { font-size: 15px; color: #555; }
.st-valid { display: flex; align-items: center; gap: 8px; margin-block-start: 12px; padding: 13px 14px; border-radius: 16px; background: #fff; font-size: 14px; font-weight: 600; color: #333; }
.st-valid .ico { width: 18px; height: 18px; color: #C26A00; flex: none; }
.st-qr__meta { margin-top: 8px; padding: 4px 12px; border-radius: 99px; background: #F3F3F3; font-size: 12px; font-weight: 700; color: #555; }

/* S5: pickup */
.st-ostore { display: flex; align-items: center; gap: 10px; margin-block-end: 12px; }
.st-ostore > b { flex: 1; font-size: 22px; color: #111; }
.st-ostore > small { font-size: 13px; font-weight: 700; color: #777; }
.st-order { display: grid; justify-items: center; gap: 12px; padding: 18px 16px 20px; border-radius: 22px; background: #fff; text-align: center; }
.st-order__bell { width: 96px; transform-origin: 50% 15%; }
.st-order__st { display: grid; }
.st-order__a, .st-order__b { grid-area: 1 / 1; display: grid; justify-items: center; gap: 4px; }
.st-order__a { opacity: 0; }
.st-order__st b { display: inline-flex; align-items: center; gap: 8px; font-size: 25px; color: #111; }
.st-order__st b::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #16A34A; }
.st-order__a b::before { background: #E19C14; }
.st-order__st span > span { max-width: 300px; font-size: 15px; line-height: 1.35; color: #555; text-wrap: balance; }
.st-steps { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; margin-block-start: 4px; }
.st-steps__line { position: absolute; top: 6px; inset-inline: 10%; height: 2px; background: #E5E5E5; }
.st-steps__line i { display: block; width: 75%; height: 100%; background: var(--b-plum); transform-origin: 0 50%; }
[dir="rtl"] .st-steps__line i { transform-origin: 100% 50%; }
.st-step { position: relative; display: grid; justify-items: center; gap: 6px; }
.st-step::before { content: ""; position: absolute; top: 0; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px #D4D4D4; }
.st-step i { position: relative; width: 14px; height: 14px; border-radius: 50%; }
.st-step.is-done i { background: var(--b-plum); }
.st-step--ready.is-done i { background: #16A34A; box-shadow: 0 0 0 4px rgba(22, 163, 74, .18); }
.st-step small { font-size: 11px; font-weight: 700; color: #777; white-space: nowrap; }
.st-step--ready small { color: #15803D; }
.st-here { margin-block-start: 2px; padding: 9px 16px; border-radius: 9px; background: var(--b-plum); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .03em; }
:lang(en) .st-here { text-transform: uppercase; }
.st-rate { position: absolute; z-index: 4; inset-inline: 0; bottom: 0; display: grid; justify-items: center; gap: 12px; padding: 22px 22px 40px; background: #fff; border-radius: 28px 28px 0 0; box-shadow: 0 -14px 34px rgba(17, 10, 30, .16); text-align: center; }
.st-rate > b { font-size: 21px; color: #111; }
.st-rate__stars { display: flex; gap: 8px; }
.st-rate__stars i { display: grid; color: var(--b-gold); }
.st-rate__stars .ico { width: 34px; height: 34px; }
.st-rate__txt { width: 100%; padding: 12px 14px; border-radius: 12px; background: #F5F5F5; font-size: 15px; text-align: start; color: #222; }
.st-rate__btn { width: 100%; padding: 13px; border-radius: 12px; background: var(--b-plum); color: #fff; font-size: 15px; font-weight: 800; }

/* ---------- Chapter rail ---------- */
.st-rail { grid-column: 1 / -1; grid-row: 2; position: relative; z-index: 5; padding-block-start: 8px; }
.st-rail__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(8px, 1.3vw, 20px); }
.st-rail__btn {
  display: grid; gap: 9px; width: 100%;
  padding: 8px 0 4px;
  text-align: start;
  font-size: 13px; font-weight: 500; line-height: 1.3;
  color: var(--g-500);
  transition: color var(--t-base) var(--ease-out);
}
.st-rail__bar { position: relative; display: block; height: 3px; border-radius: 3px; background: var(--g-200); overflow: hidden; }
.st-rail__bar i { position: absolute; inset: 0; border-radius: inherit; background: var(--z-blue); transform: scaleX(0); transform-origin: 0 50%; }
[dir="rtl"] .st-rail__bar i { transform-origin: 100% 50%; }
.st-rail__lbl { display: flex; gap: 8px; min-width: 0; }
.st-rail__n { font-family: "Inter", sans-serif; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--g-400); transition: color var(--t-base); }
.st-rail__t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-rail__btn:hover, .st-rail__btn.is-on { color: var(--ink); }
.st-rail__btn.is-on .st-rail__n { color: var(--z-blue); }
:lang(ar) .st-rail__btn { font-size: 13.5px; }

/* ---------- Outro ---------- */
.st-outro { display: grid; justify-items: center; text-align: center; padding-block: clamp(80px, 11vw, 170px) var(--section-y); }
.st-outro__line { max-width: 14.5em; font-size: clamp(2.25rem, 1.1rem + 3.7vw, 4.75rem); }
.st-outro__ul { width: min(320px, 62%); height: 24px; margin-block-start: clamp(14px, 1.6vw, 22px); overflow: visible; }
.st-outro__ul path { fill: none; stroke: var(--z-blue); stroke-width: 3; stroke-linecap: round; }
.st-outro__ul path + path { stroke: var(--b-violet); stroke-width: 2.4; }

/* ==========================================================================
   Tablet and phone (< 1024px): pinned, stacked
   ========================================================================== */
@media (max-width: 1023px) {
  .st-pin { min-height: 0; }
  .st-frame {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    row-gap: 10px;
    padding-block: calc(var(--nav-h) + 4px) 12px;
  }
  .st-rail { grid-column: 1; grid-row: 1; padding-block-start: 0; }
  .st-rail__list { gap: 6px; }
  .st-rail__btn { gap: 4px; padding: 6px 0 2px; font-size: 11px; }
  .st-rail__t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .st-stage {
    grid-column: 1; grid-row: 2;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(28px, 44px) minmax(0, 1.15fr);
  }
  .st-slot--z { grid-column: 1; grid-row: 1; }
  .st-slot--b { grid-column: 1; grid-row: 3; }
  .st-zwrap { top: auto; bottom: 0; transform: translate(-50%, 0) scale(var(--s, 1)); transform-origin: 50% 100%; }
  .st-bwrap { top: 0; transform: translate(-50%, 0) scale(var(--s, 1)); transform-origin: 50% 0; }
  .st-x { display: none !important; }
  .st-cap { display: none; }
  .st-bar { display: none; }
  .st-panel { border-radius: 18px; }
  .st-scenes { padding: 8px; }
  .st-list__clip { height: calc(var(--st-row) * 3); }
  .st-ring--z { top: 100%; inset-inline-end: auto; inset-inline-start: 24%; }
  .st-ring--b { top: 26%; }
  .st-gift { width: 62px; }
  .st-text {
    grid-column: 1; grid-row: 3; align-self: stretch;
    padding: 12px 16px 14px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--g-150);
    box-shadow: var(--sh-pop);
  }
  .st-ch { align-self: start; }
  .st-ch__num { font-size: 11px; }
  .st-ch__title { margin-block: 4px 5px; font-size: clamp(1.1875rem, .95rem + 1.2vw, 1.75rem); }
  .st-ch__body { font-size: clamp(.875rem, .82rem + .25vw, 1rem); line-height: 1.48; max-width: none; }
  :lang(ar) .st-ch__title { margin-block: 4px 4px; line-height: 1.4; }
  :lang(ar) .st-ch__body { line-height: 1.75; }

  /* Notes: panel notes hang below the panel at its end side; phone notes sit beside the phone. */
  .st-note--1, .st-note--3, .st-note--5 { top: calc(100% + 6px); inset-inline-start: auto; inset-inline-end: 4%; flex-direction: column-reverse; align-items: flex-end; transform-origin: 100% 0; }
  [dir="rtl"] .st-note--1, [dir="rtl"] .st-note--3, [dir="rtl"] .st-note--5 { transform-origin: 0 0; }
  .st-note--1 .st-note__arw, .st-note--3 .st-note__arw, .st-note--5 .st-note__arw { margin: 0; rotate: -100deg; width: 40px; height: 30px; }
  .st-note--2 { top: 30%; inset-inline-end: auto; inset-inline-start: calc(100% + 12px); align-items: flex-start; transform-origin: 0 0; }
  .st-note--4 { top: 56%; inset-inline-end: auto; inset-inline-start: calc(100% + 12px); align-items: flex-start; transform-origin: 0 0; }
  .st-note--2 .st-note__arw, .st-note--4 .st-note__arw { scale: -1 1; }
  [dir="rtl"] .st-note--2, [dir="rtl"] .st-note--4 { transform-origin: 100% 0; }
}
@media (max-width: 1023px) and (min-width: 640px) {
  .st-frame { padding-block-end: 20px; }
  .st-text { padding: 18px 24px 20px; }
}

/* ==========================================================================
   Reduced motion: static chapter blocks (built from the live markup)
   ========================================================================== */
.st--static .st-pin { display: none; }
.st-static { display: grid; gap: clamp(64px, 8vw, 128px); }
.st-static[hidden] { display: none; }
.st-sblock { display: grid; grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); column-gap: clamp(28px, 4.2vw, 72px); align-items: center; }
.st-sblock .st-text { grid-column: 1; grid-row: 1; }
.st-sblock .st-ch { grid-area: auto; }
.st-stage--static { grid-column: 2; grid-row: 1; height: clamp(520px, 50vw, 700px); }
@media (max-width: 1023px) {
  .st-sblock { grid-template-columns: minmax(0, 1fr); row-gap: 20px; }
  .st-sblock .st-text { grid-row: 1; padding: 0; border: 0; background: none; box-shadow: none; }
  .st-sblock .st-ch__title { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem); }
  .st-sblock .st-ch__body { font-size: 1rem; }
  .st-stage--static { grid-column: 1; grid-row: 2; height: clamp(560px, 150vw, 760px); }
}
.st-stage--static .st-scene,
.st-stage--static .st-scr,
.st-stage--static .st-note,
.st-stage--static .st-stk { visibility: hidden; }
.st-stage--static[data-show="1"] .st-scene[data-scene="1"],
.st-stage--static[data-show="2"] .st-scene[data-scene="2"],
.st-stage--static[data-show="3"] .st-scene[data-scene="3"],
.st-stage--static[data-show="4"] .st-scene[data-scene="4"],
.st-stage--static[data-show="5"] .st-scene[data-scene="5"],
.st-stage--static[data-show="1"] .st-scr1,
.st-stage--static[data-show="2"] .st-scr2,
.st-stage--static[data-show="3"] .st-scr3,
.st-stage--static[data-show="4"] .st-scr4,
.st-stage--static[data-show="5"] .st-scr5,
.st-stage--static[data-show="1"] .st-note--1,
.st-stage--static[data-show="2"] .st-note--2,
.st-stage--static[data-show="3"] .st-note--3,
.st-stage--static[data-show="4"] .st-note--4,
.st-stage--static[data-show="5"] .st-note--5,
.st-stage--static[data-show="2"] .st-stk--clock,
.st-stage--static[data-show="4"] .st-stk--welcome,
.st-stage--static[data-show="5"] .st-stk--heart,
.st-stage--static[data-show="3"] .st-gift { visibility: visible; }
.st-stage--static[data-show="2"] .st-scr1 { visibility: hidden; }
.st-stage--static[data-show="2"] .st-sbar,
.st-stage--static[data-show="3"] .st-sbar,
.st-stage--static[data-show="2"] .st-homebar,
.st-stage--static[data-show="3"] .st-homebar { color: #fff; }

/* Bidi helpers */
.st-ltr { display: inline-block; direction: ltr; unicode-bidi: isolate; }
.st-av--more { direction: ltr; }
