@font-face {
  font-family: "Noto Kufi Arabic";
  src: url("/fonts/NotoKufiArabic-v1.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/fonts/Sora-v1.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* tokens: Mahally's rhythm (warm ground, pills, soft low shadows) in SoukArz cedar green */
:root {
  --cedar: #1e6b47;
  --cedar-dark: #154d33;
  --cedar-soft: #e7f1ec;
  --bg: #fbf7f2;
  --surface: #ffffff;
  --ink: #2d2d2d;
  --ink-2: #55575d;
  --muted: #848a98;
  --line: #e3e3ea;
  --fill: #efeff2;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lift: 0 18px 40px -16px rgba(30, 107, 71, 0.35);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
/* hidden means gone, whatever display a class gives the element (the success card was pushed 2,225 px down by a
   form that was hidden but still laid out as a grid) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Kufi Arabic", "Sora", system-ui, sans-serif;
  line-height: 1.6;
}
main { max-width: 720px; margin: 0 auto; padding: 12px 16px 24px; }
a { color: var(--cedar); }
h2 { font-size: 1.05rem; margin: 0 0 12px; }

/* every state change eases */
a, button, .chip, .card, input {
  transition: background-color 0.45s var(--ease-io), color 0.45s var(--ease-io), border-color 0.45s var(--ease-io),
    box-shadow 0.6s var(--ease), transform 0.6s var(--ease);
}

/* header: one row at any phone width; the category is named next to the brand */
.top { position: sticky; top: 0; z-index: 30; transition: transform 0.45s var(--ease-io); background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 16px; box-shadow: 0 4px 14px -10px rgba(0, 0, 0, 0.25); }
html { scroll-padding-top: 72px; }
.top.away { transform: translateY(-110%); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); max-width: 720px; margin: 0 auto; }
.brand b { display: block; color: var(--cedar); font-size: 1.15rem; line-height: 1.2; }
.brand small { display: block; color: var(--muted); font-size: 0.75rem; white-space: nowrap; }

/* the 4-minute card: first thing on the page, and once more lower down */
.hook { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-radius: 24px; padding: 18px; margin: 4px 0 16px; }
.hook h2 { margin: 0 0 2px; font-size: 1.15rem; }
.hook p { margin: 0; font-size: 0.85rem; }
.hook.first { background: linear-gradient(135deg, var(--cedar), var(--cedar-dark)); color: #fff; box-shadow: var(--shadow-lift); animation: rise 1.2s var(--ease) both; }
.hook.first p { opacity: 0.95; }
.hook .cod { display: block; font-size: 0.72rem; opacity: 0.7; }
/* the fee credit: the card's full width, exactly two lines (each line kept whole; the size follows the screen width) */
.hook.first { flex-direction: column; align-items: stretch; gap: 10px; }
.hook.first h2 { margin: 0; white-space: nowrap; font-size: min(1.25rem, 4.6vw); }
.hook.first > div p { white-space: nowrap; font-size: min(0.95rem, 3.6vw); }
.hook.first .cod { display: inline; font-size: 0.85em; }
.hook.first .btn { text-align: center; padding-block: 12px; }
.hook .credit { margin: 0; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.16); font-size: min(0.9rem, 3vw); line-height: 1.6; opacity: 1; }
.hook .credit span { display: block; white-space: nowrap; }
.hook.second { background: var(--cedar-soft); color: var(--ink); margin-top: 28px; }
.btn { flex: none; white-space: nowrap; background: #fff; color: var(--cedar); font-weight: 700; text-decoration: none; padding: 10px 18px; border-radius: 9999px; box-shadow: var(--shadow); }
.hook.second .btn { background: var(--cedar); color: #fff; }
.btn:active { transform: scale(0.97); }

/* search */
.search { display: flex; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 9999px; padding: 6px; box-shadow: var(--shadow); }
.search:focus-within { border-color: var(--cedar); box-shadow: 0 0 0 3px var(--cedar-soft); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; padding: 6px 12px; color: var(--ink); }
.search button { border: 0; border-radius: 9999px; background: var(--cedar); color: #fff; font: inherit; font-weight: 700; padding: 6px 18px; cursor: pointer; }

/* sector chips: one swipeable row */
.chips { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 16px; padding: 12px 0 4px; margin: 0 -16px; padding-inline: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: start; white-space: nowrap; text-decoration: none; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 9999px; padding: 6px 14px; font-size: 0.85rem; }
.chip.on { background: var(--cedar); border-color: var(--cedar); color: #fff; }

.block { margin-top: 20px; }
.count { display: inline-block; min-width: 1.6em; text-align: center; font-size: 0.8rem; background: var(--fill); color: var(--ink-2); border-radius: 9999px; padding: 0 8px; margin-inline-start: 4px; }
.empty { color: var(--muted); }

/* featured: logo cards in a swipeable row */
.row { list-style: none; margin: 0 -16px; padding: 0 16px 6px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: 16px; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row li { flex: none; scroll-snap-align: start; }
.mini { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 84px; text-decoration: none; color: var(--ink); font-size: 0.78rem; text-align: center; }
.logo { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 9999px; font-size: 1.5rem; font-weight: 700; box-shadow: var(--shadow); }

/* store cards: two columns on a phone, three on a wide screen */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; height: 100%; background: var(--surface); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.card:active { transform: scale(0.98); }
.cover { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; font-size: 2.4rem; font-weight: 700; }
.badge { position: absolute; inset-block-start: 8px; inset-inline-start: 8px; background: rgba(255, 255, 255, 0.92); color: var(--ink-2); font-size: 0.7rem; font-weight: 600; border-radius: 9999px; padding: 1px 8px; }
.info { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.name { font-weight: 700; font-size: 0.95rem; line-height: 1.4; }
.meta { color: var(--muted); font-size: 0.75rem; }
.price { color: var(--cedar); font-size: 0.8rem; font-weight: 600; margin-top: 2px; }
.hit { color: var(--ink-2); font-size: 0.75rem; background: var(--fill); border-radius: 8px; padding: 2px 8px; margin-top: 4px; align-self: flex-start; }

/* sector tints for covers and logos, until stores have photos (stage 3) */
.tint-0 { background: #eef0ee; color: #55575d; }
.tint-1 { background: #f6e6ea; color: #8a3a52; }
.tint-2 { background: #fbecd9; color: #8f5216; }
.tint-3 { background: #e9f0dc; color: #4d6420; }
.tint-4 { background: #f3e6f1; color: #7a3c70; }
.tint-5 { background: #f5efd8; color: #7b6418; }
.tint-6 { background: #f2e4da; color: #85492a; }
.tint-7 { background: #e3eef8; color: #2f5d86; }
.tint-8 { background: #e6e9f2; color: #3d4a6b; }
.tint-9 { background: #ece8df; color: #5f5440; }
.tint-10 { background: #fde8e3; color: #a2402c; }
.tint-11 { background: #e0f2ec; color: #1e6b47; }
.tint-12 { background: #ebe7f5; color: #4f3f86; }

.foot { max-width: 720px; margin: 0 auto; padding: 16px 16px 40px; color: var(--muted); font-size: 0.75rem; border-top: 1px solid var(--line); }
.foot p { margin: 0 0 4px; }

/* store page (stage 6 replaces this) */
.store h1 { color: var(--cedar); margin-bottom: 0; }
.store .meta { margin-top: 0; }
.note { background: var(--fill); color: var(--ink-2); border-radius: 12px; padding: 8px 12px; font-size: 0.85rem; }
.products { list-style: none; padding: 0; display: grid; gap: 8px; }
.products li { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow); }
.products b { color: var(--cedar); white-space: nowrap; }
.products img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; flex: none; }
.products li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.products small { color: var(--muted); overflow-wrap: anywhere; }
.pay-line { display: flex; gap: 8px; }
.pay-line span { background: var(--cedar); color: #fff; font-weight: 700; font-size: 0.8rem; border-radius: 9999px; padding: 2px 12px; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dash h1 { margin-top: 8px; }
.dash-done { background: var(--cedar); color: #fff; font-weight: 700; border-radius: 12px; padding: 12px 16px; }
.dash-store { display: flex; flex-direction: column; gap: 2px; }
.dash-store a { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }

/* photo upload: the signup screen's two photo fields, the QR panel (computers only), and the phone page */
.upload-screen h1 { font-size: 1.3rem; margin: 8px 0 4px; }
.upload-screen .note { color: var(--ink-2); margin: 0 0 16px; }
.field { background: var(--surface); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; border: 2px dashed transparent; }
.field.over { border-color: var(--cedar); background: var(--cedar-soft); }
.field h2 small { color: var(--muted); font-weight: 400; font-size: 0.75rem; margin-inline-start: 6px; }
.logo-row { display: flex; align-items: center; gap: 16px; }
.logo-slot { position: relative; width: 88px; height: 88px; flex: none; border-radius: 9999px; overflow: hidden; background: var(--fill); display: grid; place-items: center; }
.logo-slot img { width: 100%; height: 100%; object-fit: cover; }
.logo-slot .placeholder { color: var(--muted); font-size: 0.7rem; text-align: center; padding: 8px; }
.pick { display: inline-block; cursor: pointer; background: var(--cedar-soft); color: var(--cedar); font-weight: 700; border-radius: 9999px; padding: 8px 18px; white-space: nowrap; }
.pick.wide { display: block; text-align: center; margin-top: 12px; }
.hint { color: var(--muted); font-size: 0.8rem; text-align: center; margin: 8px 0 0; }
.desktop-only { display: none; }
@media (hover: hover) and (pointer: fine) { .desktop-only { display: block; } }

/* the photos: a grid of squares; tap one to see it large, drag ⋮⋮ to reorder; the first is the primary photo */
.strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.strip li { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--fill); }
.strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip .thumb { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.strip li.is-cover { outline: 3px solid var(--cedar); outline-offset: -3px; }
.cover-tag { display: none; position: absolute; inset-block-end: 6px; inset-inline-start: 6px; background: var(--cedar); color: #fff; font-size: 0.7rem; border-radius: 9999px; padding: 0 8px; pointer-events: none; }
.is-cover .cover-tag { display: block; }
.handle { position: absolute; inset-block-start: 4px; inset-inline-end: 4px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9999px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 0.9rem; letter-spacing: -2px; cursor: grab; touch-action: none; user-select: none; }
.strip li.lifted { opacity: 0.3; }
/* a photo on its way: dimmed, with a small bar at the bottom — moving stripes while it waits, the real % once sending */
.strip li.pending img, .logo-slot li.pending img { opacity: 0.45; filter: saturate(0.6); }
.logo-slot li.pending { list-style: none; position: absolute; inset: 0; }
.logo-slot li.pending img { width: 100%; height: 100%; object-fit: cover; }
.up { position: absolute; inset-inline: 6px; inset-block-end: 6px; display: grid; gap: 3px; }
.up-label { justify-self: center; font-size: 0.68rem; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.55); border-radius: 9999px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.up-bar { display: block; height: 6px; border-radius: 9999px; background: rgba(255, 255, 255, 0.7); overflow: hidden; }
.up-bar i { display: block; height: 100%; border-radius: inherit; background: var(--cedar); transform: scaleX(0); transform-origin: right; transition: transform 0.25s linear; }
[dir="ltr"] .up-bar i { transform-origin: left; }
.queued .up-bar i { transform: none !important; background: repeating-linear-gradient(-45deg, rgba(30, 107, 71, 0.55) 0 6px, rgba(30, 107, 71, 0.2) 6px 12px); background-size: 34px 100%; animation: waiting 1s linear infinite; }
@keyframes waiting { to { background-position: 34px 0; } }
.ghost { position: fixed; z-index: 70; list-style: none; border-radius: 12px; overflow: hidden; pointer-events: none; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.5); transform: scale(1.06); }
.ghost img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ghost .handle, .ghost .cover-tag { display: none; }
.strip li.leaving { animation: swap-out 0.45s var(--ease-io) both; pointer-events: none; }

.live { color: var(--cedar) !important; }

.error { display: none; background: #fdecec; color: #b3261e; border-radius: 12px; padding: 10px 14px; font-size: 0.9rem; }
.error.on { display: block; animation: xfade 0.5s var(--ease) both; }

.phone .act { margin-bottom: 12px; }
.phone .act.big { min-height: 64px; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.phone .act.big svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* the one-screen signup: form, then the preview (beside it on a computer) */
.signup { max-width: 1020px; }
.signup-layout { display: grid; gap: 16px; }
@media (min-width: 900px) {
  .signup-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .side { position: sticky; top: 64px; display: grid; gap: 16px; }
}
.f { margin-bottom: 14px; }
.f:last-child { margin-bottom: 0; }
.f > label, .f > label:not(.act) { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.req { color: #b3261e; margin-inline-start: 2px; }
.opt { color: var(--muted); font-weight: 400; }
.f-hint { margin: 0 0 6px; color: var(--muted); font-size: 0.78rem; }
.f input, .f select { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; padding: 10px 14px; outline: 0; }
.f input:focus, .f select:focus { border-color: var(--cedar); box-shadow: 0 0 0 3px var(--cedar-soft); }
.f input[aria-invalid="true"], .f select[aria-invalid="true"] { border-color: #b3261e; }
.f-ok { margin: 6px 0 0; min-height: 0; color: var(--cedar); font-size: 0.82rem; font-weight: 700; }
.f-ok:empty { display: none; }
.f-ok.bad { color: #b3261e; font-weight: 600; }
.f-err { display: none; margin: 6px 0 0; color: #b3261e; font-size: 0.82rem; }
.f-err.on { display: block; animation: xfade 0.4s var(--ease) both; }
/* a prefix or suffix glued to the box: +961, $, .soukarz.com */
.tel, .slug { display: flex; align-items: stretch; direction: ltr; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.tel:focus-within, .slug:focus-within { border-color: var(--cedar); box-shadow: 0 0 0 3px var(--cedar-soft); }
.tel > span, .slug > span { display: grid; place-items: center; padding: 0 12px; background: var(--fill); color: var(--ink-2); font-size: 0.9rem; white-space: nowrap; }
.tel input, .slug input { border: 0; border-radius: 0; min-width: 0; flex: 1; box-shadow: none !important; }
.slug > span { font-size: 0.8rem; }
.slug-status { min-height: 1.4em; margin: 6px 0 0; font-size: 0.82rem; color: var(--muted); overflow-wrap: anywhere; }
.slug-status.ok { color: var(--cedar); font-weight: 700; }
.slug-status.bad { color: #b3261e; }
.warn { margin: 4px 0 0; font-size: 0.78rem; color: #8f5216; background: #fbecd9; border-radius: 8px; padding: 6px 10px; }
.pick { display: inline-flex; }
.logo-row .pick { flex: none; }
.create { width: 100%; margin-top: 8px; }

/* "you can change this later" on every field except the address */
.later { display: inline-block; margin-inline-start: 8px; font-size: 0.68rem; font-weight: 600; color: var(--cedar); background: var(--cedar-soft); border-radius: 9999px; padding: 1px 8px; vertical-align: middle; }
.f textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; padding: 10px 14px; outline: 0; resize: vertical; min-height: 88px; }
.f textarea:focus { border-color: var(--cedar); box-shadow: 0 0 0 3px var(--cedar-soft); }

/* the sector lookup: a list inside the page that narrows as the seller types */
.combo { position: relative; }
.combo-list { position: absolute; z-index: 20; inset-inline: 0; top: calc(100% + 4px); max-height: 260px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.3); animation: xfade 0.25s var(--ease) both; }
.combo-list li { padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.combo-list li.on, .combo-list li:hover { background: var(--cedar-soft); color: var(--cedar-dark); }
.combo-list li[aria-selected="true"] { font-weight: 700; }
.combo-list li.none { color: var(--muted); cursor: default; background: none; }

/* camera + gallery side by side; the camera button only where there is a camera worth opening (a phone) */
.pick-pair { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-pair.wide { margin-top: 12px; }
.pick-pair.wide .act { flex: 1; }
.pick-pair svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.phone-only { display: none !important; }
@media (hover: none) and (pointer: coarse) { .phone-only { display: inline-flex !important; } }

/* segmented choices: the dashboard language at the top, and the payment methods */
.lang-pick { background: var(--surface); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.lang-label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; }
.lang-pick .f-hint { margin: 8px 0 0; }
.seg { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: var(--fill); }
.seg-opt { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 10px; border-radius: 10px; text-align: center; text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 0.92rem; cursor: pointer; }
.seg-opt.on { background: var(--surface); color: var(--cedar); box-shadow: var(--shadow); }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-opt:focus-within { outline: 2px solid var(--cedar); outline-offset: 1px; }
/* payment methods: two pills, each on or off by itself (Sami: "frame each word by itself as a clear pill") */
.pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pill { position: relative; display: flex; align-items: center; justify-content: center; white-space: nowrap; min-width: 0; font-size: 0.9rem; min-height: 48px; padding: 10px; border: 0; border-radius: 9999px; background: var(--fill); color: var(--ink-2); font-weight: 700; cursor: pointer; user-select: none; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill.on { background: var(--cedar); color: #fff; }
.pill:has(input:focus-visible) { outline: 2px solid var(--cedar); outline-offset: 2px; } /* keyboard only, never on a tap */

/* the Whish number opens only when Whish is one of the payment methods */
.fold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--ease-io); }
.fold.open { grid-template-rows: 1fr; }
.fold > div { overflow: hidden; min-height: 0; }
.fold > div > * { opacity: 0; transition: opacity 0.4s var(--ease-io); }
.fold.open > div > * { opacity: 1; transition-delay: 0.2s; }
.fold.open > div > .f { margin-top: 14px; }

/* the corner timer: a green circle for the 4 minutes (what is left of them), white bold time; then red, counting up.
   Opposite the scroll circle. "Yes, you can!" flashes four times beside it when the seller starts. */
.pie { position: fixed; z-index: 40; inset-inline-start: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); width: 60px; height: 60px; border-radius: 9999px; display: grid; place-items: center; background: var(--cedar); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22); transition: opacity 0.45s var(--ease-io), transform 0.45s var(--ease-io), background-color 0.6s var(--ease-io); }
.pie::before { content: ""; position: absolute; inset: 9px; border-radius: inherit; background: var(--cedar-dark); }
.pie.over { background: #c62828; }
.pie.over::before { background: #9e1f1f; }
.pie-text { position: relative; direction: ltr; unicode-bidi: isolate; color: #fff; font-family: "Sora", sans-serif; font-weight: 800; font-size: 0.9rem; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pie.over .pie-text { font-size: 0.8rem; }
.pie.gone { opacity: 0; transform: scale(0.6); pointer-events: none; }
.cheer-bubble { position: absolute; inset-inline-start: calc(100% + 10px); white-space: nowrap; background: var(--cedar); color: #fff; font-weight: 800; font-size: 0.95rem; border-radius: 9999px; padding: 8px 14px; box-shadow: var(--shadow-lift); opacity: 0; pointer-events: none; }
.pie.cheer .cheer-bubble { animation: cheer 0.7s var(--ease-io) 4; }
@keyframes cheer { 0%, 100% { opacity: 0; transform: scale(0.94); } 40%, 60% { opacity: 1; transform: scale(1); } }

/* the field the gentle guide brought into view glows once */
.f.nudge, section.field .f.nudge { animation: nudge 1.8s var(--ease-io) both; border-radius: 12px; }
@keyframes nudge { 0% { box-shadow: 0 0 0 0 rgba(30, 107, 71, 0); } 30% { box-shadow: 0 0 0 6px rgba(30, 107, 71, 0.25); } 100% { box-shadow: 0 0 0 0 rgba(30, 107, 71, 0); } }
.activate { display: flex; gap: 6px; margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; background: #fbecd9; color: #8f5216; font-size: 0.82rem; font-weight: 600; }

/* never public, never shared: under the seller's own name, mobile and email */
.private { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 0.78rem; font-weight: 600; color: var(--cedar-dark); }
.private svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.privacy { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; background: var(--cedar-soft); color: var(--cedar-dark); font-weight: 700; font-size: 0.85rem; }
.privacy svg { flex: none; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* "welcome back, let's continue where you left off" */
.welcome { display: flex; flex-direction: column; gap: 2px; background: var(--cedar); color: #fff; border-radius: 16px; padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--shadow-lift); }
.welcome span { opacity: 0.9; font-size: 0.9rem; }
.welcome.leaving { animation: swap-out 0.45s var(--ease-io) both; }

/* the permanent address, confirmed once */
.confirm { text-align: center; }
.confirm p { margin: 0; color: var(--ink-2); font-size: 0.9rem; }
.confirm .addr { font-family: "Sora", sans-serif; font-weight: 700; color: var(--cedar); font-size: 1.05rem; background: var(--cedar-soft); border-radius: 10px; padding: 10px; width: 100%; overflow-wrap: anywhere; }
.confirm .crop-foot .act { white-space: normal; }

/* "we made it easy for you": the QR card, inside the product photos, only while they are on screen (computers only) */
.qr-fold { display: none; }
@media (hover: hover) and (pointer: fine) { .qr-fold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--ease-io); } }
.qr-fold.attn { grid-template-rows: 1fr; }
.qr-fold > div { overflow: hidden; min-height: 0; }
.qr-card { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 12px; border-radius: 16px; background: var(--cedar-soft); opacity: 0; transform: translateY(-8px); transition: opacity 0.45s var(--ease-io), transform 0.6s var(--ease); }
.qr-fold.attn .qr-card { opacity: 1; transform: none; transition-delay: 0.2s; }
.qr-card[hidden] { display: none; }
.qr-card .qr svg { width: 128px; height: 128px; display: block; border-radius: 8px; background: #fff; }
.qr-words b { display: block; color: var(--cedar-dark); font-size: 1rem; }
.qr-words p { margin: 4px 0 6px; color: var(--ink-2); font-size: 0.85rem; }

/* the live preview: a store card as a buyer will see it; whatever is typed wraps instead of overflowing */
.preview { background: var(--surface); border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.pv-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.pv-nav { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface); box-shadow: 0 6px 14px -6px rgba(30, 107, 71, 0.45); min-width: 0; }
.pv-logo { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9999px; background: var(--cedar-soft); color: var(--cedar); font-size: 0.75rem; font-weight: 700; overflow: hidden; }
.pv-logo img { width: 100%; height: 100%; object-fit: cover; }
.pv-name { display: block; font-size: 0.85rem; overflow-wrap: anywhere; min-width: 0; }
.pv-stage { padding: 18px 22px 10px; background: var(--bg); }
.pv-cover { aspect-ratio: 1; max-width: 230px; margin: 0 auto; border-radius: 14px; overflow: hidden; background: var(--fill); display: grid; place-items: center; border: 1px solid rgba(21, 77, 51, 0.35); box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.7), 0 16px 32px -12px rgba(0, 0, 0, 0.4); }
.pv-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-empty { color: var(--muted); font-size: 0.8rem; }
.pv-url { display: block; color: var(--muted); font-size: 0.72rem; overflow-wrap: anywhere; text-align: start; margin-bottom: 4px; }
.pv-body { padding: 8px 12px 14px; }
.pv-title { margin: 0; overflow-wrap: anywhere; }
.pv-desc { margin: 2px 0 0; color: var(--ink-2); font-size: 0.8rem; overflow-wrap: anywhere; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pv-price { margin: 2px 0 8px; color: var(--cedar); font-weight: 700; font-family: "Sora", sans-serif; text-align: end; }
.pv-pay { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.pv-pay span { font-size: 0.72rem; border-radius: 9999px; padding: 2px 10px; background: var(--fill); color: var(--ink-2); }
.pv-pay span { background: var(--cedar); color: #fff; font-weight: 700; } /* every chosen method green; one not chosen is not shown */

/* zoom and crop: Shapelab's Cropper — a 280 px square, a slider, Cancel / Use this photo, in a card over the page */
html.editing { overflow: hidden; }
.crop-bg { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(20, 30, 25, 0.6); overflow-y: auto; animation: xfade 0.3s var(--ease) both; }
.crop-card { display: grid; gap: 12px; justify-items: center; background: var(--surface); border-radius: 16px; padding: 18px; width: min(320px, 100%); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.45); }
.crop-title { font-size: 1.05rem; }
.crop-box { position: relative; overflow: hidden; border-radius: 10px; width: 280px; height: 280px; background: #000; cursor: grab; touch-action: none; }
.crop-box.round { border-radius: 50%; }
.crop-box img { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.crop-card input[type="range"] { width: 280px; accent-color: var(--cedar); }
.crop-hint { margin: 0; color: var(--muted); font-size: 0.75rem; text-align: center; }
.crop-err { margin: 0; color: #b3261e; font-size: 0.85rem; text-align: center; }
.crop-foot { display: flex; gap: 10px; width: 280px; }
.crop-foot .act { flex: 1; padding-inline: 10px; white-space: nowrap; font-size: 0.95rem; }

/* the store is live: the success card, then confetti */
.made { max-width: 520px; margin: 8px auto 24px; background: var(--surface); border-radius: 24px; padding: 22px 18px; box-shadow: var(--shadow-lift); text-align: center; }
.made h1 { color: var(--cedar); margin: 0 0 4px; }
.made-took { margin: 0 0 14px; color: var(--ink-2); }
.made-url { display: block; font-family: "Sora", sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--cedar); background: var(--cedar-soft); border-radius: 12px; padding: 12px; text-decoration: none; overflow-wrap: anywhere; }
.made-actions { display: grid; gap: 10px; margin: 14px 0; }
.made-qr { display: flex; align-items: center; gap: 14px; text-align: start; background: var(--fill); border-radius: 16px; padding: 12px; }
.made-qr .qr svg { width: 120px; height: 120px; display: block; background: #fff; border-radius: 8px; }
.made-qr p { margin: 0; font-size: 0.85rem; color: var(--ink-2); }
.made-mail { margin: 14px 0 0; font-size: 0.9rem; color: #8f5216; background: #fbecd9; border-radius: 12px; padding: 10px 12px; }
.confetti { position: fixed; inset: 0; z-index: 80; pointer-events: none; width: 100vw; height: 100vh; }

/* the photo viewer */
.viewer { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: #111; color: #fff; animation: xfade 0.3s var(--ease) both; }
.vw-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; }
.vw-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 8px; }
.vw-stage img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; border-radius: 8px; }
.vw-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
.vw-actions .act { min-height: 48px; }
.vw-actions .vw-delete { color: #b3261e; }
.vw-actions [hidden] { display: none; }

/* buttons, Shapelab's way: at least 48 px tall, a visible edge, the main one filled */
.act { text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 20px; background: var(--surface); color: var(--cedar); font: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.act:active { transform: scale(0.98); }
.act:disabled { opacity: 0.6; cursor: default; }
.act.primary { color: #fff; border-color: var(--cedar-dark); background: linear-gradient(#24804f, var(--cedar)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 12px 26px -10px rgba(30, 107, 71, 0.6); }

/* the phone page (Shapelab's invoice-phone layout): one big camera button with the % inside, smaller choices under it */
.phone .act.off { opacity: 0.4; pointer-events: none; }
.phone.busy label { pointer-events: none; }
.phone.busy .act { opacity: 0.5; }
.ok-line { color: var(--cedar); font-weight: 700; min-height: 1.6em; margin: 0 0 12px; }
.phone-live { margin-top: 8px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 9999px; background: #2e8b5f; margin-inline-end: 8px; animation: pulse 1.6s var(--ease-io) infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.live-bar { height: 6px; border-radius: 9999px; background: var(--fill); overflow: hidden; }
.live-bar i { display: block; height: 100%; width: 0; background: var(--cedar); border-radius: inherit; transition: width 0.3s linear; }

/* upload toasts: a true byte meter that turns green when the photo has arrived */
.toasts { position: fixed; z-index: 50; inset-inline: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { width: min(420px, 100%); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 10px 14px 12px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3); animation: rise 0.7s var(--ease) both; transition: background-color 0.45s var(--ease-io), color 0.45s var(--ease-io); }
.toast-row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.85rem; margin-bottom: 6px; }
.toast-pct { font-family: "Sora", sans-serif; font-variant-numeric: tabular-nums; color: var(--cedar); }
.toast-bar { height: 6px; border-radius: 9999px; background: var(--fill); overflow: hidden; }
.toast-bar span { display: block; height: 100%; background: linear-gradient(90deg, #2e8b5f, var(--cedar)); border-radius: inherit; transform: scaleX(0); transform-origin: right; transition: transform 0.25s linear; }
.toast.ok { background: #1e8a52; color: #fff; }
.toast.ok .toast-pct { color: #fff; }
.toast.ok .toast-bar { background: rgba(255, 255, 255, 0.3); }
.toast.ok .toast-bar span { background: #fff; }
.toast.bad { background: #b3261e; color: #fff; }
.toast.bad .toast-pct { color: #fff; }
.toast.out { animation: swap-out 0.45s var(--ease-io) both; }

/* scroll-progress button (the standing default for long pages) */
.to-top { position: fixed; z-index: 40; inset-inline-end: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); width: 44px; height: 44px; display: grid; place-items: center; border: 0; padding: 0; border-radius: 9999px; background: var(--surface); color: var(--ink-2); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity 0.3s var(--ease-io), transform 0.3s var(--ease-io); cursor: pointer; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top .ring { position: absolute; inset: 0; transform: rotate(-90deg); overflow: visible; }
.to-top .track { fill: none; stroke: var(--line); stroke-width: 2.5; }
.to-top .fill { fill: none; stroke: var(--cedar); stroke-width: 2.5; stroke-linecap: round; } /* no transition: it tracks the thumb */
.to-top .arrow { position: relative; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* motion: entrances rise, the outgoing results sink first */
@keyframes rise { 0% { opacity: 0; transform: translateY(28px) scale(0.99); } 55% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes xfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes swap-out { to { opacity: 0; transform: translateY(14px) scale(0.995); } }
.rise-1 { animation: rise 1.2s var(--ease) both; }
.rise-2 { animation: rise 1.2s var(--ease) 0.12s both; }
.rise-3 { animation: rise 1.2s var(--ease) 0.24s both; }
.swap-out { animation: swap-out 0.45s var(--ease-io) both; pointer-events: none; }
.swap-in { animation: xfade 0.7s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* the store (Stage 6): photos, price, the cash-on-delivery order form, SoukArz support */
.shop-head { display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; }
.shop-head h1 { margin: 0; font-size: 1.3rem; }
.shop-logo { flex: none; width: 52px; height: 52px; border-radius: 14px; object-fit: cover; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.3rem; box-shadow: var(--shadow); }
.gallery { margin: 0 -16px; }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; border: 0; padding: 0; background: var(--fill); aspect-ratio: 1; cursor: zoom-in; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (min-width: 720px) { .gallery { margin: 0; } .slide { border-radius: 16px; overflow: hidden; } }
.dots { display: flex; justify-content: center; gap: 6px; padding: 8px 0 0; }
.dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background 0.3s var(--ease-io), transform 0.3s var(--ease); }
.dots span.on { background: var(--cedar); transform: scale(1.25); }
.zoom { border: 0; padding: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.92); }
.zoom[open] { display: grid; place-items: center; animation: xfade 0.3s var(--ease) both; }
.zoom img { max-width: 100%; max-height: 100%; object-fit: contain; }
.zoom-x { position: fixed; inset-block-start: 12px; inset-inline-end: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.9); font-size: 1.1rem; cursor: pointer; }
.p-title { margin: 14px 0 2px; font-size: 1.15rem; }
.p-price { margin: 0 0 8px; }
.p-price b, .total b { color: var(--cedar); font-size: 1.35rem; }
.p-price small, .total small, .o-sum small { color: var(--muted); font-size: 0.8rem; }
.p-desc { white-space: pre-line; color: var(--ink-2); overflow-wrap: anywhere; }
.order { margin-top: 16px; }
.order h2 { margin: 0 0 12px; font-size: 1.1rem; }
.f textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem; padding: 10px 14px; outline: 0; resize: vertical; }
.f textarea:focus { border-color: var(--cedar); box-shadow: 0 0 0 3px var(--cedar-soft); }
.f textarea[aria-invalid="true"] { border-color: #b3261e; }
.qty { display: flex; align-items: stretch; gap: 8px; max-width: 200px; direction: ltr; }
.qty input { text-align: center; }
.qty-btn { flex: none; width: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--cedar); font-size: 1.4rem; font-weight: 700; cursor: pointer; }
.qty-btn:active { transform: scale(0.95); }
.total { margin: 12px 0; }
.order .act { width: 100%; }
.shop-foot { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.85rem; }
.shop-foot p { margin: 0 0 6px; }
.shop-foot a { color: var(--cedar); }
.o-sum p { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); }
.o-sum p:last-child { border-bottom: 0; }
.o-sum span { color: var(--muted); }
.o-sum b { text-align: end; }
/* the seller's orders */
.orders { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.o-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 0.9rem; }
.o-card.new { border-color: var(--cedar); background: var(--cedar-soft); }
.o-card p { margin: 0 0 4px; overflow-wrap: anywhere; }
.o-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.o-top small { color: var(--muted); margin-inline-start: auto; }
.o-status { font-size: 0.75rem; font-weight: 700; border-radius: 9999px; padding: 1px 10px; background: var(--fill); color: var(--ink-2); }
.o-card.new .o-status { background: var(--cedar); color: #fff; }
.o-card a { color: var(--cedar); }
.o-acts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; margin-top: 8px; }
.o-acts .act { min-height: 44px; padding: 8px 12px; font-size: 0.9rem; }
.o-acts .o-cancel { grid-column: 1 / -1; color: #b3261e; box-shadow: none; border-color: transparent; background: none; min-height: 36px; }
/* Stage 7: the payment choice on a store (no script: the checked pill shows its own hint) */
.pay-pick { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.pay-pick legend { padding: 0; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
.pay-pick .pill:has(input:checked) { background: var(--cedar); color: #fff; }
.pay-pick .f-hint { margin: 8px 0 0; }
.pay-pick:not(:has(input[value="whish"]:checked)) [data-pay="whish"], .pay-pick:has(input[value="whish"]:checked) [data-pay="cod"] { display: none; }
/* the buyer pays by Whish */
.whish-pay ol { margin: 0 0 12px; padding-inline-start: 20px; line-height: 1.9; }
.whish-pay b { color: var(--cedar); }
.whish-pay .act { width: 100%; margin-top: 10px; }
.whish-pay input[type="file"] { padding: 10px; }
/* the seller checks a Whish payment */
.o-proof { display: block; margin: 8px 0; }
.o-proof img { display: block; max-width: 100%; max-height: 320px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.o-warn { color: #b3261e; font-weight: 700; }
.o-check { background: #fbecd9; color: #8f5216; border-radius: 10px; padding: 8px 10px; font-weight: 700; }
.o-reject { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 8px; }
.o-reject select { min-height: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 0.9rem; padding: 6px 10px; }
.o-reject .o-cancel { grid-column: auto; color: #b3261e; }
/* the fee ledger */
.fee-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 8px; }
.fee-sum span { display: flex; flex-direction: column; gap: 2px; background: var(--fill); border-radius: 12px; padding: 8px 10px; color: var(--muted); font-size: 0.8rem; }
.fee-sum b { color: var(--ink); font-size: 1.1rem; }
.fees { list-style: none; padding: 0; margin: 0; font-size: 0.85rem; }
.fees li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.fees li:last-child { border-bottom: 0; }
.fees small { color: var(--muted); }
.shop-foot .support { margin-top: 10px; }
