/* =========================================================
   Iksir pharmacy pages (/ and /search)
   Arabic first (RTL), phone first, light on slow internet.
   Nothing loads from other sites. Purple is the one brand colour,
   the lime drop is a spark (the duty badge, "موجود", the drop).
   ========================================================= */

/* ---------- Fonts (served from this site) ---------- */
@font-face {
  font-family: "Readex Pro Arabic";
  src: url("/assets/fonts/ReadexPro-Arabic-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Readex Pro Arabic";
  src: url("/assets/fonts/ReadexPro-Arabic-600.woff2") format("woff2");
  font-weight: 500 600; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Readex Pro Arabic";
  src: url("/assets/fonts/ReadexPro-Arabic-700.woff2") format("woff2");
  font-weight: 700 900; font-style: normal; font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face { font-family: "Lato"; src: url("/assets/fonts/Lato-400.woff2") format("woff2"); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Lato"; src: url("/assets/fonts/Lato-700.woff2") format("woff2"); font-weight: 600 800; font-style: normal; font-display: swap; }

/* ---------- Tokens (from the Iksir brand book) ---------- */
:root {
  color-scheme: light dark;
  --brand: #5B2BB0; --brand-press: #46208A; --brand-tint: #F0EAFB; --brand-text: #5B2BB0; --on-brand: #FFFFFF; --brand-rgb: 91, 43, 176;
  --gem: #B4E05A; --gem-tint: #EEF8DA; --on-gem: #1D1530; --on-gem-tint: #3F5A0E; --gem-rgb: 180, 224, 90;
  --bg: #F6F4FA; --surface: #FFFFFF; --surface-2: #EFECF5; --ink: #1D1530; --muted: #6B6280; --faint: #857C99;
  --line: #E2DCEC; --line-strong: #8E85A3; --focus: #5B2BB0;
  --grey-tint: #EFECF5; --on-grey: #4E4663;
  --glass: rgba(255, 255, 255, .72); --glass-line: rgba(255, 255, 255, .8);
  --shadow-card: 0 1px 2px rgba(29, 21, 48, .05), 0 18px 44px -26px rgba(29, 21, 48, .35);
  --shadow-float: 0 1px 2px rgba(29, 21, 48, .06), 0 22px 48px -20px rgba(29, 21, 48, .42);

  --font: "Readex Pro Arabic", "Lato", Tahoma, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "Lato", "Readex Pro Arabic", system-ui, sans-serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --r-sm: 12px; --r-md: 16px; --r-lg: 24px; --r-pill: 999px; --tap: 48px;
  --wrap: 1120px; --gutter: 16px; --sec: 48px;
}
@media (min-width: 700px) { :root { --gutter: 28px; --sec: 72px; } }
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #A486E8; --brand-press: #BEA8F0; --brand-tint: #261A3D; --brand-text: #BEA8F0; --on-brand: #160B2B; --brand-rgb: 164, 134, 232;
    --gem: #C6EC74; --gem-tint: #263114; --on-gem: #160B2B; --on-gem-tint: #D3F08F; --gem-rgb: 198, 236, 116;
    --bg: #120D1C; --surface: #1C1529; --surface-2: #241C33; --ink: #EFEAF7; --muted: #ADA3C0; --faint: #8F85A3;
    --line: #30263F; --line-strong: #6A5F80; --focus: #C6EC74;
    --grey-tint: #2A2238; --on-grey: #C9C0D9;
    --glass: rgba(28, 21, 41, .78); --glass-line: rgba(255, 255, 255, .08);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .5); --shadow-float: 0 22px 48px -18px rgba(0, 0, 0, .85);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; background: var(--bg); scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-width: 320px; background: var(--bg); color: var(--ink);
  font: 400 16px/1.75 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.3; font-weight: 700; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--brand-text); text-decoration: none; }
button, input { font: inherit; color: inherit; }
button, a, [role="option"] { touch-action: manipulation; }
button, .btn, .chip { -webkit-user-select: none; user-select: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
::selection { background: rgba(var(--brand-rgb), .22); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.lat { font-family: var(--font-num); direction: ltr; unicode-bidi: isolate; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; inset-inline-start: 12px; top: -64px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }
.noscript { margin: 16px; padding: 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); text-align: center; }

/* Until the pharmacy's details are in, the sample words stay hidden (shown anyway after 2.5 s) */
.ik-wait [data-t] { visibility: hidden; animation: ik-show 0s 2.5s forwards; }
@keyframes ik-show { to { visibility: visible; } }

/* ---------- The mark (drawn inline so it follows light and dark) ---------- */
.mark { width: 24px; height: 30px; flex: none; }
.mark .flask { fill: none; stroke: var(--brand); stroke-width: 17; stroke-linecap: round; stroke-linejoin: round; }
.mark .drop { fill: var(--gem); }
.logo-plate { display: grid; place-items: center; flex: none; background: #FFFFFF; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.logo-plate img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap); padding: 0 22px; border: 1.5px solid transparent; border-radius: var(--r-pill);
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-align: center; cursor: pointer; white-space: nowrap;
  transition: transform .16s var(--ease-out), background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:active { transform: scale(.97); }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1.05rem; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 10px 22px -14px rgba(var(--brand-rgb), .9); }
.btn-line { background: var(--surface); color: var(--brand-text); border-color: var(--line); }
.btn-soft { background: var(--brand-tint); color: var(--brand-text); }
.btn-block { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--brand-press); }
  .btn-line:hover { border-color: var(--line-strong); }
  .btn-soft:hover { background: rgba(var(--brand-rgb), .18); }
}
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: var(--r-pill);
  background: var(--surface); color: var(--brand-text); border: 1.5px solid var(--line); cursor: pointer;
  transition: transform .16s var(--ease-out), border-color .2s ease;
}
.icon-btn:active { transform: scale(.94); }

/* ---------- Top bar ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--glass); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6); }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .top { background: var(--surface); } }
.top-in { display: flex; align-items: center; gap: 10px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; color: var(--ink); font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.brand .logo-plate { width: 36px; height: 36px; }
.brand-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-end { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.duty {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px 0 10px; border-radius: var(--r-pill);
  background: var(--gem); color: var(--on-gem); font-size: .85rem; font-weight: 600; white-space: nowrap;
}
.duty .ic { width: 16px; height: 16px; }
@media (max-width: 359px) { .duty-word { display: none; } .duty { padding: 0 9px; } }

/* ---------- Home: hero ---------- */
.hero { position: relative; isolation: isolate; padding: 28px 0 40px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--brand); opacity: .07;
  -webkit-mask: url("/assets/img/bubbles.svg") 0 0 / 112px 112px repeat; mask: url("/assets/img/bubbles.svg") 0 0 / 112px 112px repeat;
}
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 80px; z-index: -1; background: linear-gradient(to bottom, transparent, var(--bg)); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
.hero-copy { min-width: 0; }
.hero-badge { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 16px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-card); }
.hero-badge .mark { width: 34px; height: 42px; }
.hero-badge .logo-plate { width: 64px; height: 64px; border-radius: 22px; box-shadow: none; }
.hero h1 { font-size: clamp(1.85rem, 1.3rem + 2.6vw, 3rem); letter-spacing: 0; }
.hero-lead { margin-top: 8px; color: var(--muted); font-size: 1.05rem; max-width: 30em; text-wrap: pretty; }
.hero-duty { display: none; }
.hero-art { display: none; }
@media (min-width: 900px) {
  .hero { padding: 64px 0 48px; }
  .hero-in { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 56px; }
  .hero-art { display: grid; place-items: center; }
  .hero-art .disc { position: relative; display: grid; place-items: center; width: 300px; height: 300px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-float); }
  .hero-art .disc::before { content: ""; position: absolute; inset: -18px; border-radius: 50%; border: 1.5px dashed rgba(var(--brand-rgb), .25); }
  .hero-art .mark { width: 128px; height: 158px; }
  .hero-art .logo-plate { width: 180px; height: 180px; border-radius: 40px; box-shadow: none; }
  .hero-badge { display: none; }
}

/* the big search box */
.seek { position: relative; margin-top: 22px; max-width: 560px; }
.seek-box {
  display: flex; align-items: center; gap: 4px; min-height: 58px; padding: 5px; padding-inline-start: 16px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-card);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.seek-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .14), var(--shadow-card); }
.seek-box > .ic { color: var(--muted); width: 22px; height: 22px; }
.seek-input {
  flex: 1; min-width: 0; height: 46px; padding: 0 8px; border: 0; background: transparent; outline: 0;
  font-size: 1.08rem; color: var(--ink);
}
.seek-input::placeholder { color: var(--faint); opacity: 1; }
.seek-input::-webkit-search-cancel-button { display: none; }
.seek-go { min-height: 46px; padding: 0 20px; border-radius: 12px; }
.seek-clear { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 12px; cursor: pointer; }
.seek-hint { margin-top: 10px; color: var(--muted); font-size: .9rem; }
.cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; max-width: 560px; }
.cta-row .btn { min-width: 0; padding: 0 12px; }
@media (max-width: 359px) { .cta-row .btn { font-size: .95rem; gap: 6px; } }
.cta-row.one { grid-template-columns: 1fr; }

/* ---------- Sections ---------- */
.sec { padding: var(--sec) 0 0; }
.sec:last-of-type { padding-bottom: var(--sec); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.sec h2 { font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.9rem); }
.sub { margin-top: 4px; color: var(--muted); font-size: .98rem; text-wrap: pretty; }
.more { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 600; white-space: nowrap; }
.more .ic { width: 18px; height: 18px; }

/* category chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); font-size: .95rem; font-weight: 500; line-height: 1.3;
  white-space: nowrap; cursor: pointer; transition: transform .16s var(--ease-out), background-color .2s ease, border-color .2s ease, color .2s ease;
}
.chip:active { transform: scale(.97); }
.chip[aria-pressed="true"], .chip.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--line-strong); } .chip[aria-pressed="true"]:hover { border-color: var(--brand); } }

/* best sellers: a row you can swipe */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(196px, 46%); gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); padding: 4px var(--gutter) 18px; margin-inline: calc(-1 * var(--gutter)); scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
@media (min-width: 700px) { .rail { grid-auto-columns: 220px; } }
@media (min-width: 1100px) { .rail { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); overflow: visible; margin: 0; padding: 4px 0 0; } }
.pick {
  display: flex; flex-direction: column; gap: 6px; min-height: 132px; padding: 16px; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--ink);
  transition: transform .16s var(--ease-out), border-color .2s ease;
}
.pick:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) { .pick:hover { border-color: var(--line-strong); } }
.pick-name { font-weight: 700; font-size: 1.02rem; line-height: 1.4; }
.pick-meta { color: var(--muted); font-size: .88rem; line-height: 1.5; }
.pick .avail { margin-top: auto; align-self: flex-start; }
.best-note { display: flex; align-items: center; gap: 8px; margin-top: 6px; color: var(--muted); font-size: .9rem; font-weight: 500; }
.best-note .ic { width: 18px; height: 18px; color: var(--brand-text); }
@media (min-width: 1100px) { .best-note { margin-top: 14px; } }
.pick-rank { font-family: var(--font-num); font-weight: 700; color: var(--brand-text); font-size: .8rem; }

/* about + services, hours + place */
.cards2 { display: grid; gap: 14px; }
@media (min-width: 800px) { .cards2 { grid-template-columns: 1fr 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.12rem; }
.card h3 .ic { color: var(--brand-text); }
.card .text { margin-top: 10px; color: var(--ink); text-wrap: pretty; }
.card .muted { color: var(--muted); }
.services { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.services li { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px 0 12px; border-radius: var(--r-pill); background: var(--brand-tint); color: var(--brand-text); font-size: .92rem; font-weight: 500; }
.services .ic { width: 16px; height: 16px; }
.hours-big { margin-top: 10px; font-size: 1.15rem; font-weight: 600; }
.duty-line { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--gem-tint); color: var(--on-gem-tint); font-weight: 500; }
.duty-line .ic { flex: none; }
.place-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.place-btns .btn { flex: 1 1 140px; }

/* ---------- Footer ---------- */
.foot { margin-top: var(--sec); padding: 32px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { display: grid; gap: 18px; }
.foot .brand { font-size: 1rem; }
.foot-addr { color: var(--muted); font-size: .92rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 500; }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.ih { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); }
.ih svg { width: 30px; height: 18px; }
@media (min-width: 800px) { .foot-in { grid-template-columns: 1fr auto; align-items: center; } }

/* ---------- Bottom bar on phones (home) ---------- */
.dock {
  position: fixed; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
  display: flex; gap: 8px; padding: 8px; border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow-float);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .22s ease, transform .3s var(--ease-out);
}
.dock .btn { flex: 1; }
.dock.is-on { opacity: 1; transform: none; pointer-events: auto; }
@media (min-width: 800px) { .dock { display: none; } }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .dock { background: var(--surface); } }

/* ---------- Availability, prescription and category tags ---------- */
.avail, .tag {
  display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 10px; border-radius: var(--r-pill);
  font-size: .82rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.avail .ic, .tag .ic { width: 15px; height: 15px; stroke-width: 2.2; }
.avail.yes { background: var(--gem-tint); color: var(--on-gem-tint); }
.avail.yes::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gem); box-shadow: 0 0 0 2px rgba(var(--gem-rgb), .35); }
.avail.ask { background: var(--grey-tint); color: var(--on-grey); }
.tag { background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 500; }
.tag.rx { border-color: rgba(var(--brand-rgb), .4); color: var(--brand-text); background: var(--brand-tint); }

/* ---------- Skeletons while the list comes ---------- */
.sk { background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 45%, var(--surface-2) 65%); background-size: 300% 100%; border-radius: 8px; }
@media (prefers-reduced-motion: no-preference) { .sk { animation: sk 1.4s ease-in-out infinite; } }
@keyframes sk { from { background-position: 100% 0; } to { background-position: 0 0; } }
.sk-line { height: 14px; margin-top: 8px; }
.sk-line.w60 { width: 60%; } .sk-line.w40 { width: 40%; } .sk-line.w80 { width: 80%; }
.pick.is-sk, .item.is-sk { pointer-events: none; }

/* ---------- Calm messages (slow internet, nothing found) ---------- */
.msg { display: grid; justify-items: center; gap: 10px; padding: 28px 20px; text-align: center; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.msg-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-text); }
.msg-ic .ic { width: 24px; height: 24px; }
.msg h2, .msg h3 { font-size: 1.12rem; }
.msg p { color: var(--muted); max-width: 30em; text-wrap: pretty; }
.msg .btn { margin-top: 6px; }
.saved-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px; border-radius: var(--r-md); background: var(--surface-2); color: var(--muted); font-size: .88rem; }
.saved-note .ic { width: 18px; height: 18px; flex: none; }

/* =========================================================
   Search page
   ========================================================= */
.page-find .top { position: relative; }
.find-head { position: sticky; top: 0; z-index: 30; padding: 12px 0 10px; background: var(--bg); border-bottom: 1px solid transparent; transition: border-color .2s ease, box-shadow .2s ease; }
.find-head.is-stuck { border-bottom-color: var(--line); box-shadow: 0 8px 24px -20px rgba(29, 21, 48, .5); }
.find-head h1 { font-size: 1.25rem; margin-bottom: 10px; }
.find-head .seek { margin-top: 0; max-width: none; }
.find-head .seek-box { min-height: 56px; box-shadow: none; }
.chip-row { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; margin: 10px calc(-1 * var(--gutter)) 0; padding: 2px var(--gutter) 4px; scrollbar-width: none; scroll-padding-inline: var(--gutter); }
.chip-row::-webkit-scrollbar { display: none; }
.chip-row .chip { flex: none; min-height: 40px; padding: 0 14px; font-size: .9rem; }
@media (pointer: coarse) { .chip-row .chip { min-height: 44px; } }
@media (min-width: 900px) { .chip-row { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; } }

/* suggestions under the box */
.sugg {
  position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 50; padding: 6px; max-height: min(60vh, 380px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-float);
}
@media (prefers-reduced-motion: no-preference) { .sugg { animation: pop .16s var(--ease-out); } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.sugg li { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 12px; border-radius: 10px; cursor: pointer; }
.sugg li .ic { color: var(--muted); }
.sugg li[aria-selected="true"] { background: var(--brand-tint); }
.sugg li[aria-selected="true"] .ic { color: var(--brand-text); }
.sugg .s-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg .s-label mark { background: transparent; color: var(--brand-text); font-weight: 700; }
.sugg .s-kind { color: var(--faint); font-size: .8rem; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .sugg li:hover { background: var(--surface-2); } }

.results-wrap { padding: 8px 0 8px; min-height: 55vh; }
.page-find .foot { margin-top: 40px; padding: 4px 0 calc(64px + env(safe-area-inset-bottom)); }
.page-find .foot-bottom { border-top: 0; }
.res-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 8px 0 12px; }
.res-meta h2 { font-size: 1.05rem; font-weight: 600; }
.res-meta .updated { color: var(--faint); font-size: .82rem; }
.results { display: grid; gap: 10px; }
@media (min-width: 900px) { .results { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: no-preference) { .results.fade-in > li { animation: rise .26s var(--ease-out) both; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.item { display: grid; gap: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.item-top { display: flex; align-items: flex-start; gap: 12px; }
.item-main { flex: 1; min-width: 0; }
.item-name { font-size: 1.08rem; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.item-st { display: inline-block; max-width: 100%; white-space: nowrap; font-weight: 600; color: var(--brand-text); }
.item-form { font-weight: 400; color: var(--muted); font-size: .95rem; }
.item-sub { margin-top: 2px; color: var(--muted); font-size: .85rem; line-height: 1.55; overflow-wrap: anywhere; }
.item-sub .lat { color: var(--muted); }
.item-sub .dot { margin-inline: 6px; color: var(--faint); }
.item-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.item-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.price { font-family: var(--font-num); font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.price small { font-family: var(--font); font-weight: 500; font-size: .85rem; color: var(--muted); margin-inline-start: 4px; }
.item-foot .btn { margin-inline-start: auto; min-height: 44px; padding: 0 16px; font-size: .95rem; }
@media (max-width: 380px) { .item-foot .btn { width: 100%; margin-inline-start: 0; } }
.more-row { display: flex; justify-content: center; margin-top: 18px; }

.hint-empty { padding: 4px 0 18px; color: var(--muted); }

/* the fixed note on every results screen */
.note {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 35; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--glass); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .note { background: var(--surface); } }
.note p { display: flex; align-items: center; justify-content: center; gap: 8px; max-width: var(--wrap); margin-inline: auto; font-size: .92rem; font-weight: 500; color: var(--ink); }
.note .ic { color: var(--brand-text); width: 18px; height: 18px; }

/* ---------- Motion: the drop settles into the flask (home only, once) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .anim-drop .drop { transform-box: fill-box; transform-origin: 50% 100%; animation: drop-in .6s var(--ease-out) .15s both; }
  .anim-rise { animation: rise .42s var(--ease-out) both; }
}
@keyframes drop-in { from { opacity: 0; transform: translateY(-140%); } to { opacity: 1; transform: none; } }

@media print { .top, .dock, .note, .find-head .chip-row { display: none !important; } }
