/* Waffer — delivery-app structure, Waffer's own identity.
   Violet = actions, green = money saved, maroon = vouchers & offers. */
:root {
  --paper: #FFFFFF;
  --mist: #F2F0F7;
  --line: #E7E3EF;
  --ink: #1E1433;
  --ink-2: #4A4160;
  --muted: #7C748F;
  --violet: #5B2BE0;
  --violet-soft: #EEE8FD;
  --save: #0A9B63;
  --save-soft: #E2F5EC;
  --maroon: #8A1538;
  --maroon-soft: #F9E8EE;
  --warn: #B23A12;
  --warn-soft: #FCEDE6;
  --flash: #FF5C1A;
  --flash-deep: #C2380A;
  --flash-soft: #FFEDE3;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
  --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17112A; --mist: #0F0B1C; --line: #2B2342; --ink: #F3F0FA; --ink-2: #CFC8E0; --muted: #9A91B0;
    --violet: #9C7BFF; --violet-soft: #2A2050; --save: #3FD397; --save-soft: #133528;
    --maroon: #F07A9C; --maroon-soft: #3A1624; --warn: #FF9A70; --warn-soft: #3A1F14; color-scheme: dark;
    --flash: #FF7A3D; --flash-deep: #FF9A6A; --flash-soft: #3A1E10;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font: 15px/1.45 var(--body); background: var(--mist); color: var(--ink);
  padding-bottom: calc(150px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-radius: 8px; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20; background: var(--paper);
  padding: calc(10px + env(safe-area-inset-top)) 16px 12px;
  box-shadow: 0 1px 0 var(--line);
}
.top-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand .mark { width: 38px; height: 38px; border-radius: 11px; display: block; }
.brand .wm { height: 30px; width: auto; display: block; }
.loc {
  position: relative; display: flex; align-items: center; gap: 5px; cursor: pointer; min-width: 0;
  background: var(--violet-soft); color: var(--violet); border-radius: 999px; padding: 7px 10px 7px 9px;
  font-weight: 800; font-size: 14.5px; white-space: nowrap;
}
.loc svg { width: 17px; height: 17px; stroke-width: 2.4; }
.loc .chev { width: 15px; height: 15px; stroke-width: 2.8; }
.loc span { overflow: hidden; text-overflow: ellipsis; }
.loc select { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.live {
  border: 0; background: transparent; color: var(--save); font-weight: 700; font-size: 12px;
  padding: 8px 2px 0; display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.live.bad { color: var(--warn); }
.search {
  display: flex; align-items: center; gap: 10px; background: var(--mist); border-radius: 999px;
  padding: 0 16px; height: 46px; color: var(--muted);
}
.search input { border: 0; outline: 0; background: transparent; width: 100%; height: 100%; color: var(--ink); font-size: 15px; }
.search:focus-within { box-shadow: 0 0 0 2px var(--violet); }

.demo { background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 600; padding: 8px 16px; text-align: center; }

main { max-width: 640px; margin: 0 auto; }
section { margin-top: 14px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 16px; margin-bottom: 10px; }
.sec-head h2 { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.015em; margin: 0; }
.sec-head a, .sec-head span { font-size: 13px; font-weight: 700; color: var(--violet); }
.sec-head span { color: var(--muted); font-weight: 600; }

/* ---------- category tiles ---------- */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 16px 0; margin: 0; }
.cat {
  position: relative; overflow: hidden; border: 0; text-align: left; padding: 12px 12px 10px; height: 104px;
  border-radius: var(--r-lg); background: var(--paper); display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.cat b { font-family: var(--display); font-weight: 800; font-size: 16px; position: relative; }
.cat small { font-size: 11.5px; color: var(--muted); font-weight: 600; position: relative; }
.cat .emo { position: absolute; right: -4px; top: -2px; font-size: 42px; line-height: 1; transform: rotate(-8deg); }
.cat[aria-pressed="true"] { background: var(--violet); color: #fff; box-shadow: none; }
.cat[aria-pressed="true"] small { color: rgba(255,255,255,.8); }

/* ---------- rails ---------- */
.rail { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; flex: none; }

/* voucher tickets: the one bold thing */
.ticket {
  width: 268px; position: relative; display: grid; grid-template-columns: 1fr auto; align-items: stretch;
  background: var(--maroon); color: #fff; border-radius: var(--r-md); overflow: hidden; min-height: 108px;
  --notch: var(--mist);
}
.ticket.wide { width: auto; }
.ticket-main { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ticket-app { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; opacity: .9; }
.ticket-app i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); box-shadow: 0 0 0 1.5px rgba(255,255,255,.7); }
.ticket h3 { font-family: var(--display); font-weight: 800; font-size: 16px; line-height: 1.2; margin: 0; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ticket-seen { font-size: 11.5px; opacity: .75; margin-top: auto; }
.ticket-stub {
  border-left: 2px dashed rgba(255,255,255,.45); padding: 10px 12px; display: flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 6px; min-width: 96px; position: relative;
}
.ticket-stub::before, .ticket-stub::after {
  content: ""; position: absolute; left: -9px; width: 16px; height: 16px; border-radius: 50%; background: var(--notch);
}
.ticket-stub::before { top: -8px; } .ticket-stub::after { bottom: -8px; }
.code {
  font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: .04em; background: #fff; color: var(--maroon);
  border: 0; border-radius: 8px; padding: 6px 8px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copy-hint { font-size: 11px; opacity: .8; }
.ticket-pic { width: 64px; height: 84px; border-radius: 8px; object-fit: cover; object-position: top; border: 2px solid rgba(255,255,255,.6); }

/* ---------- store cards ---------- */
.list { display: grid; gap: 12px; padding: 0 16px; }
.store { display: block; background: var(--paper); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 1px 2px rgba(30,20,51,.06); }
.rail .store { width: 250px; }
.cover {
  position: relative; height: 128px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 75% 30%, hsl(var(--h) 85% 82%), hsl(var(--h) 70% 66%));
}
@media (prefers-color-scheme: dark) { .cover { background: radial-gradient(circle at 75% 30%, hsl(var(--h) 45% 38%), hsl(var(--h) 45% 24%)); } }
.rail .cover { height: 104px; }
.cover .emo { font-size: 64px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.18)); transform: rotate(-6deg); }
.cover .emo.b { position: absolute; font-size: 34px; opacity: .55; right: 12%; bottom: 8%; transform: rotate(14deg); }
.cover .emo.c { position: absolute; font-size: 26px; opacity: .45; left: 10%; top: 12%; transform: rotate(-18deg); }
.ribbon {
  position: absolute; left: 0; top: 12px; background: #8A1538; color: #fff; font-size: 12px; font-weight: 700;
  padding: 5px 10px 5px 12px; border-radius: 0 999px 999px 0; max-width: 85%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tag-sp { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.s-body { padding: 10px 14px 14px; position: relative; }
.logo {
  position: absolute; top: -26px; left: 14px; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--paper); color: hsl(var(--h) 60% 35%); font-family: var(--display); font-weight: 800; font-size: 18px;
  box-shadow: 0 2px 8px rgba(30,20,51,.14);
}
@media (prefers-color-scheme: dark) { .logo { color: hsl(var(--h) 70% 75%); } }
.s-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 22px; }
.s-title h3 { font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -.01em; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rating { display: flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 700; flex: none; }
.rating svg { width: 14px; height: 14px; fill: #F5B400; stroke: none; }
.cuisine { color: var(--muted); font-size: 13px; margin: 1px 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facts { display: flex; gap: 14px; font-size: 13px; color: var(--ink-2); font-weight: 600; margin-bottom: 10px; }
.facts span { display: flex; align-items: center; gap: 5px; }
.facts svg { width: 16px; height: 16px; color: var(--muted); }
.facts .free { color: var(--save); }

/* price race: every app's delivery fee, cheapest first */
.race { display: flex; gap: 6px; flex-wrap: wrap; }
.race span {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
  padding: 5px 9px; border-radius: 999px; background: var(--mist); color: var(--ink-2);
}
.race i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.race b { font-weight: 800; color: var(--ink); }
.race .win { background: var(--save); color: #fff; }
.race .win b { color: #fff; }
.race .win i { box-shadow: 0 0 0 1.5px #fff; }

/* ---------- store page ---------- */
.hero { position: relative; }
.hero .cover { height: 190px; }
.hero .cover .emo { font-size: 88px; }
.round {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--paper); display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(30,20,51,.15); color: var(--ink);
}
.hero .round { position: absolute; top: 12px; left: 12px; }
.info { background: var(--paper); border-radius: var(--r-lg) var(--r-lg) 0 0; margin-top: -22px; position: relative; padding: 16px 16px 6px; }
.info h1 { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -.02em; margin: 0; line-height: 1.1; }
.info .cuisine { margin: 4px 0 12px; }
.apps { display: grid; gap: 8px; margin-bottom: 10px; }
.app-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 12px;
  border-radius: var(--r-md); background: var(--mist); font-size: 13.5px;
}
.app-row .nm { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.app-row .nm i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.app-row .fee { font-weight: 800; font-family: var(--display); font-size: 15px; }
.app-row .fee.free { color: var(--save); }
.app-row .sub { color: var(--muted); font-size: 12px; text-align: right; }
.app-row .app-offer { grid-column: 1 / -1; color: var(--maroon); font-size: 12.5px; font-weight: 700; margin-top: -4px; }
.app-row.win { background: var(--save-soft); box-shadow: inset 0 0 0 1.5px var(--save); }

.menu { background: var(--paper); padding: 4px 16px 16px; }
.menu-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; }
.menu-head h2 { font-family: var(--display); font-size: 21px; font-weight: 800; margin: 0; }
.menu-head span { font-size: 12.5px; color: var(--muted); }
.legend { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--save); margin-right: 4px; }
.dish { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.menu-head + .dish { border-top: 0; }
.dish h3 { font-size: 15.5px; font-weight: 700; margin: 0 0 2px; }
.dish .size { color: var(--muted); font-size: 13px; font-weight: 500; }
.dish .from { font-family: var(--display); font-weight: 800; font-size: 16px; margin: 4px 0 8px; }
.dish .from s { font-family: var(--body); font-weight: 500; font-size: 13px; color: var(--muted); margin-left: 4px; }
.dish .from small { font-family: var(--body); font-size: 12px; color: var(--muted); font-weight: 600; margin-right: 4px; }
.mini { display: flex; flex-wrap: wrap; gap: 5px; }
.mini span { font-size: 12px; padding: 3px 8px; border-radius: 8px; background: var(--mist); color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; }
.mini i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.mini .best { background: var(--save-soft); color: var(--save); font-weight: 700; }
.mini .na { opacity: .55; text-decoration: line-through; }
.add-col { display: flex; align-items: flex-end; }
.add {
  width: 38px; height: 38px; border-radius: 12px; border: 0; background: var(--paper); color: var(--violet);
  box-shadow: inset 0 0 0 1.5px var(--line); display: grid; place-items: center;
}
.add svg { stroke-width: 2.6; }
.stepper { display: flex; align-items: center; background: var(--violet); color: #fff; border-radius: 12px; height: 38px; }
.stepper button { width: 34px; height: 38px; border: 0; background: transparent; color: #fff; display: grid; place-items: center; }
.stepper svg { width: 16px; height: 16px; stroke-width: 2.8; }
.stepper output { min-width: 18px; text-align: center; font-weight: 800; }

/* ---------- floating basket + nav ---------- */
.bar {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom));
  max-width: 616px; margin: 0 auto; border: 0; border-radius: 16px; background: var(--violet); color: #fff;
  display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; text-align: left;
  box-shadow: 0 10px 24px -8px rgba(91,43,224,.6);
}
.bar-count { min-width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-weight: 800; }
.bar-text { display: grid; flex: 1; line-height: 1.2; }
.bar-text small { opacity: .8; font-size: 12px; }
.bar-price { font-family: var(--display); font-weight: 800; font-size: 17px; }
.bar:disabled { opacity: .55; }
.nav {
  position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; background: var(--paper); box-shadow: 0 -1px 0 var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.nav a { display: grid; justify-items: center; gap: 2px; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 4px 0; position: relative; }
.nav a[aria-current="page"] { color: var(--violet); }
.nav a[aria-current="page"] svg { stroke-width: 2.4; }
.nav i { position: absolute; top: 0; left: calc(50% + 6px); background: var(--maroon); color: #fff; font-style: normal; font-size: 10px; font-weight: 800; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }

/* ---------- sheet (comparison) ---------- */
.sheet {
  border: 0; padding: 0; width: 100%; max-width: 640px; max-height: 90vh; margin: auto auto 0;
  border-radius: 24px 24px 0 0; background: var(--mist); color: var(--ink);
}
.sheet.small { max-height: 70vh; }
.sheet[open] { animation: up .28s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } }
.sheet::backdrop { background: rgba(20,12,36,.55); }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 8px auto 0; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px 6px; position: sticky; top: 0; background: var(--mist); z-index: 2; }
.sheet h2 { font-family: var(--display); font-weight: 800; font-size: 21px; margin: 0; }
.toggle { display: flex; gap: 10px; align-items: center; font-size: 13.5px; padding: 4px 16px 12px; color: var(--ink-2); }
.toggle input { width: 18px; height: 18px; accent-color: var(--violet); }
#quotes { padding: 0 16px; display: grid; gap: 10px; }
.winner { background: var(--paper); border-radius: var(--r-lg); padding: 16px; box-shadow: inset 0 0 0 2px var(--save); }
.winner .lead { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.winner .lead i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.winner .app { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -.02em; display: flex; justify-content: space-between; align-items: baseline; }
.winner .app span { font-size: 30px; }
.winner .app small { font-size: 14px; color: var(--muted); font-weight: 600; margin-right: 3px; }
.saved { display: inline-block; background: var(--save); color: #fff; font-weight: 800; font-size: 14px; padding: 5px 11px; border-radius: 999px; margin: 6px 0 4px; }
.quote { background: var(--paper); border-radius: var(--r-md); }
.quote summary { list-style: none; display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 14px; cursor: pointer; }
.quote summary::-webkit-details-marker { display: none; }
.quote .nm { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.quote .nm i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.quote .nm small { color: var(--muted); font-weight: 500; }
.quote .tot { font-family: var(--display); font-weight: 800; font-size: 18px; }
.quote .chev { color: var(--muted); transition: transform .2s; }
.quote[open] .chev { transform: rotate(180deg); }
.quote .flag { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--warn); margin-top: -6px; }
.quote.partial .tot { color: var(--muted); }
.q-body { padding: 0 14px 14px; }
.lines { display: grid; gap: 4px; font-size: 13.5px; margin: 0 0 12px; }
.lines div { display: flex; justify-content: space-between; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lines .disc { color: var(--save); font-weight: 600; }
.lines .sum { border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 2px; color: var(--ink); font-weight: 800; }
.warn { font-size: 12.5px; background: var(--warn-soft); color: var(--warn); padding: 7px 10px; border-radius: 10px; margin-bottom: 8px; }
.try { font-size: 12.5px; background: var(--maroon-soft); color: var(--maroon); border-radius: 10px; padding: 9px 10px; margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.try .code { background: var(--maroon); color: #fff; font-size: 13px; padding: 4px 8px; }
.try small { flex-basis: 100%; opacity: .85; }
.go {
  display: block; text-align: center; padding: 13px; border-radius: 12px; font-weight: 800;
  background: var(--c); color: var(--on, #fff);
}
.fine { font-size: 12px; color: var(--muted); padding: 12px 16px 28px; margin: 0; }

/* ---------- deals page ---------- */
.page-title { font-family: var(--display); font-weight: 800; font-size: 28px; letter-spacing: -.02em; margin: 18px 16px 4px; }
.page-sub { margin: 0 16px; color: var(--muted); font-size: 14px; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 14px 16px 2px; scrollbar-width: none; }
.filters button { flex: none; border: 0; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.filters button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.tickets { display: grid; gap: 10px; padding: 0 16px; }
.offer-list { background: var(--paper); margin: 0 16px; border-radius: var(--r-lg); padding: 2px 14px; }
.offer { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: center; }
.offer:first-child { border-top: 0; }
.offer.link { cursor: pointer; }
.pct {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--maroon-soft); color: var(--maroon);
  font-family: var(--display); font-weight: 800; font-size: 16px; position: relative;
}
.pct i { position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 4px; background: var(--c); box-shadow: 0 0 0 2px var(--paper); }
.offer h3 { margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.offer p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.offer .code { background: var(--maroon); color: #fff; font-size: 12.5px; padding: 3px 8px; margin-top: 6px; display: inline-block; }

/* ---------- misc ---------- */
.empty { text-align: center; color: var(--muted); padding: 48px 24px; }
.empty b { color: var(--ink); display: block; font-family: var(--display); font-size: 18px; margin-bottom: 6px; }
.empty code { background: var(--paper); padding: 2px 6px; border-radius: 6px; color: var(--ink); }
.skeleton { height: 220px; border-radius: var(--r-lg); margin: 0 16px 12px; background: linear-gradient(90deg, var(--paper), var(--line), var(--paper)); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.toast { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(150px + env(safe-area-inset-bottom)); background: var(--ink); color: var(--paper); padding: 9px 14px; border-radius: 12px; font-size: 13.5px; font-weight: 600; }
.status-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; background: var(--paper); margin: 0 16px 8px; padding: 12px 14px; border-radius: var(--r-md); font-size: 14px; }
.status-row i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.status-row b { font-weight: 700; }
.status-row .ok { color: var(--save); font-weight: 700; font-size: 13px; }
.status-row .no { color: var(--warn); font-weight: 700; font-size: 13px; }
.status-row .none { color: var(--muted); font-size: 13px; }
#statusBody { padding: 4px 0 24px; }
#statusBody p { margin: 4px 16px 12px; font-size: 13px; color: var(--muted); }

body.on-store .search, body.on-store .demo { display: none; }
body.on-store .top { padding-bottom: 8px; }
body.on-store .top-row { margin-bottom: 0; }

/* ---------- flash sales ---------- */
.sec-head h2 .bolt { width: 20px; height: 20px; fill: var(--flash); stroke: var(--flash); vertical-align: -3px; margin-right: 4px; }
.flash {
  width: 158px; background: var(--paper); border-radius: var(--r-md); padding: 10px 10px 0; display: flex; flex-direction: column;
  overflow: hidden; box-shadow: inset 0 0 0 1.5px var(--flash-soft);
}
.flash.wide { width: auto; }
.f-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.f-app { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); min-width: 0; }
.f-app i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); flex: none; }
.f-pct { background: var(--flash); color: #fff; font-family: var(--display); font-weight: 800; font-size: 13px; padding: 2px 7px; border-radius: 8px; }
.f-emo { font-size: 40px; text-align: center; padding: 6px 0 2px; }
.f-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; min-height: 35px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.f-price { font-family: var(--display); font-weight: 800; font-size: 17px; margin: 4px 0 8px; }
.f-price s { font-family: var(--body); font-weight: 500; font-size: 12.5px; color: var(--muted); margin-left: 5px; }
.f-clock {
  margin: auto -10px 0; background: var(--flash-soft); color: var(--flash-deep); font-weight: 700; font-size: 12px;
  padding: 6px 10px; font-variant-numeric: tabular-nums;
}
.f-clock.soon { background: var(--flash); color: #fff; }
.flash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 0 16px; }
.nudge {
  margin: 10px 16px 0; width: calc(100% - 32px); border: 1.5px dashed var(--flash); background: transparent; color: var(--flash-deep);
  border-radius: 12px; padding: 10px; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.nudge .bolt { width: 16px; height: 16px; fill: currentColor; }

/* ---------- settings ---------- */
body.on-settings .search, body.on-settings .live { display: none; }
.panel { background: var(--paper); margin: 14px 16px 0; border-radius: var(--r-lg); padding: 16px; display: grid; gap: 12px; }
.panel h2 { font-family: var(--display); font-weight: 800; font-size: 19px; margin: 0; }
.panel .status-row { margin: 0 0 6px; background: var(--mist); }
.panel #setStatus p { margin: 6px 0; font-size: 13px; color: var(--muted); }
.help { margin: -4px 0 0; color: var(--muted); font-size: 13.5px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field em { font-style: normal; color: var(--save); font-weight: 600; margin-left: 4px; }
.field input, .field select {
  height: 46px; border-radius: 12px; border: 1.5px solid transparent; background: var(--mist); padding: 0 12px; width: 100%;
  font-size: 15px; color: var(--ink);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--violet); }
.suffix { display: flex; align-items: center; gap: 8px; }
.suffix input { max-width: 110px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { border: 0; border-radius: 12px; height: 44px; padding: 0 16px; background: var(--violet); color: #fff; font-weight: 800; }
.btn.ghost { background: var(--violet-soft); color: var(--violet); }
.btn:disabled { opacity: .6; }
.result { font-size: 13.5px; border-radius: 12px; padding: 10px 12px; background: var(--mist); color: var(--ink-2); }
.result.ok { background: var(--save-soft); color: var(--save); font-weight: 600; }
.result.bad { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.apps-found { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.apps-found span { background: var(--paper); border-radius: 8px; padding: 3px 8px; font-weight: 700; }
.apps-found .ok { color: var(--save); } .apps-found .no { color: var(--warn); }
.steps { margin: 0; padding-left: 20px; font-size: 13.5px; color: var(--ink-2); display: grid; gap: 4px; }
.steps code, .help code { background: var(--mist); padding: 1px 5px; border-radius: 5px; }
.link { color: var(--violet); font-weight: 700; }
.logout { text-align: center; margin: 18px 0; }
.status-row.agent { grid-template-columns: auto 1fr auto; }
.status-row.agent small { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }
.status-row.agent i { border-radius: 50%; background: var(--muted); }
.status-row.agent.idle i, .status-row.agent.running i { background: var(--save); }
.status-row.agent.offline i, .status-row.agent.error i { background: var(--warn); }

/* ---------- phone screen ---------- */
.phone-head { display: flex; align-items: center; gap: 12px; margin: 16px 16px 0; }
.phone-head .round { flex: none; }
.pause { margin: 12px 16px 0; padding: 10px 12px; border-radius: 14px; background: var(--paper); display: flex; align-items: center; gap: 10px; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); }
.pause.on { background: var(--save-soft); color: var(--save); }
.btn.small { height: 36px; padding: 0 12px; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
a.btn { display: inline-flex; align-items: center; }
.phone-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 14px 16px 0; }
.phone-frame {
  position: relative; width: min(100%, 320px, 31vh); aspect-ratio: 1 / 2; background: #0B0816; border-radius: 26px; padding: 10px;
  box-shadow: 0 10px 30px -12px rgba(30,20,51,.5);
}
.phone-frame img { width: 100%; height: 100%; object-fit: contain; border-radius: 18px; display: block; touch-action: none; cursor: pointer; user-select: none; background: #1B1430; }
.scr-msg { position: absolute; inset: 10px; display: grid; place-items: center; text-align: center; color: #CFC8E0; font-size: 14px; padding: 20px; border-radius: 18px; }
.phone-keys { display: flex; gap: 8px; }
.key { width: 48px; height: 44px; border: 0; border-radius: 12px; background: var(--paper); color: var(--ink); display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line); }
.type-row { display: flex; gap: 8px; }
.type-row input { flex: 1; min-width: 0; height: 46px; border-radius: 12px; border: 1.5px solid transparent; background: var(--mist); padding: 0 12px; font-size: 15px; color: var(--ink); }
.type-row input:focus { outline: none; border-color: var(--violet); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); display: inline-block; }
.upload { display: block; position: relative; border: 1.5px dashed var(--violet); border-radius: 14px; padding: 16px; text-align: center; color: var(--violet); font-weight: 800; cursor: pointer; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.panel > * { min-width: 0; }
.type-row .btn { flex: none; }
.app-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-top: 8px; }
