/* =====================================================================
   Pandilila — mobile-first stylesheet
   Built light on purpose: most Zambian traffic is phones on mobile data.
   No frameworks, no web fonts, one file.
   ===================================================================== */

:root{
  /* ---- Brand: the Pandilila gradient ------------------------------------
     Coral → pink → orchid → violet → blue (18 Oct 2026). Semantic names on
     purpose: to rebrand the whole site, change the values below and nothing
     else in this file needs touching. */
  --brand-900:#1e1238;   /* deep plum-ink: footer, dark surfaces            */
  --brand:#7436e6;       /* violet: links, prices, active states            */
  --brand-600:#8341ef;   /* brighter violet: hover, focus rings             */
  --brand-tint:#f3eefe;  /* pale violet wash: badges, success, callouts     */
  --brand-ink:#4a1fa0;   /* readable violet for text on the tint            */
  --brand-line:#dccffc;  /* border that belongs to the tint                 */

  --accent:#ff5c4d;      /* coral: caution, secondary emphasis              */
  --accent-tint:#fff0ec;
  --accent-ink:#a6311f;
  --accent-line:#ffd3ca;

  /* The gradient itself, bright, for surfaces that carry no text: the thin
     strips on the header and footer, the logo. White text at its coral end
     measures only 3.05:1. */
  --grad:linear-gradient(90deg,#ff5c4d 0%,#ec489a 26%,#b944c6 50%,#8341ef 74%,#4067f9 100%);
  /* The same five colours, each deepened just enough for white text to clear
     4.5:1 everywhere along it (worst 4.53, at the pink). Used under text: the
     hero banners. Deepened rather than shaded with a dark overlay: an overlay
     turned the coral end brick-brown. */
  --grad-deep:linear-gradient(100deg,#d83a2a 0%,#d6337f 28%,#a535b5 52%,#7436e6 76%,#3f5ff0 100%);
  /* Buttons use the violet → blue half: white labels clear 4.5:1 end to end. */
  --grad-btn:linear-gradient(90deg,#7436e6,#4067f9);
  --grad-btn-hover:linear-gradient(90deg,#6a2fd8,#3459e8);
  --star:#f5a700;        /* ratings stay gold: everybody reads them that way */

  --ink:#0f1320;
  --ink-2:#39415a;
  --muted:#676e86;   /* nudged darker: 4.77:1 on the page background, clears WCAG AA */
  --line:#e2e5f0;
  --line-2:#f0f2f8;
  --surface:#fff;
  --bg:#f7f8fc;

  --red:#c02b2b;
  --red-50:#fdecec;
  --red-line:#f3c7c7;
  --red-ink:#8f1f1f;

  --r-sm:8px; --r:12px; --r-lg:18px;
  --sh-1:0 1px 2px rgba(16,20,40,.06), 0 1px 3px rgba(16,20,40,.05);
  --sh-2:0 4px 16px rgba(16,20,40,.09);
  --wrap:1120px;
}

*,*::before,*::after{box-sizing:border-box}
/* The browser's own [hidden]{display:none} is a plain element rule, so ANY
   later class that sets display beats it. .region-modal is display:grid, so
   the closed modal never left the screen and its full-viewport backdrop ate
   every click on the page. One !important here and the hidden attribute
   means hidden for every panel we toggle, now and later. */
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font:15px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
img{max-width:100%;display:block}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4{line-height:1.25;margin:0 0 .5em;letter-spacing:-.01em}
h1{font-size:26px}h2{font-size:20px}h3{font-size:17px}h4{font-size:14px}
p{margin:0 0 1em}
.muted{color:var(--muted)}
.wrap{max-width:var(--wrap);margin:0 auto;padding:0 16px;width:100%}
.skip-link{position:absolute;left:-9999px}
.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;border:0}
.skip-link:focus{left:8px;top:8px;background:#fff;padding:8px 12px;z-index:100;border-radius:6px}

/* ------------------------------------------------------------- header */
.site-header{background:var(--surface);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:40}
/* The house gradient, once, as a thin strip along the top of every page. */
.site-header::before{content:'';display:block;height:3px;background:var(--grad)}

/* --- top utility bar --- */
.utility-bar{border-bottom:1px solid var(--line-2);background:var(--bg)}
.utility-inner{display:flex;align-items:center;gap:14px;min-height:40px;flex-wrap:wrap}
.utility-links{display:none;gap:16px}
.utility-links a{color:var(--ink-2);font-size:13px}
.utility-actions{display:flex;align-items:center;gap:10px;margin-left:auto;flex-wrap:wrap}
.u-link{display:inline-flex;align-items:center;gap:6px;color:var(--ink-2);font-size:13px;
  font-weight:500;white-space:nowrap;position:relative;padding:4px 0}
.u-link:hover{color:var(--brand);text-decoration:none}

/* --- main row --- */
.header-main{padding:10px 0}
.header-inner{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.brand{display:flex;align-items:center;gap:8px;color:var(--ink);flex:0 0 auto}
.brand:hover{text-decoration:none}
.brand-name{font-weight:700;font-size:19px;letter-spacing:-.02em}
.brand-footer .brand-name{color:#fff}

.cat-button{
  display:inline-flex;align-items:center;gap:8px;background:var(--brand);color:#fff;
  border:0;border-radius:var(--r);padding:11px 16px;font-size:14.5px;font-weight:600;
  font-family:inherit;cursor:pointer;white-space:nowrap
}
.cat-button:hover{background:var(--brand-600)}
.cat-button.is-open{background:var(--brand-900)}

.header-search{order:3;flex:1 1 100%;display:flex;position:relative}
.search-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none}
.header-search input{
  width:100%;padding:11px 14px 11px 40px;border:2px solid var(--brand);
  border-radius:var(--r) 0 0 var(--r);font-size:15px;background:#fff;color:var(--ink);
  font-family:inherit
}
.header-search input:focus{outline:none;border-color:var(--brand-600)}
.header-search button{
  border:2px solid var(--brand);background:var(--brand);color:#fff;border-radius:0 var(--r) var(--r) 0;
  padding:0 20px;font-size:14.5px;font-weight:600;font-family:inherit;cursor:pointer;white-space:nowrap
}
.header-search button:hover{background:var(--brand-600);border-color:var(--brand-600)}

.region-button{
  display:inline-flex;align-items:center;gap:6px;background:none;border:0;color:var(--ink-2);
  font-size:14px;font-weight:500;font-family:inherit;cursor:pointer;padding:8px 4px;white-space:nowrap
}
.region-button:hover{color:var(--brand)}
.region-button svg{color:var(--brand)}
/* Under ~430px the brand, the categories button and the region chip could not
   share a line, so the region dropped onto a row of its own and cost about
   60px of a 667px screen. Shrinking the categories button to its icon buys
   that row back. The button keeps its aria-label, so nothing is lost to a
   screen reader. */
@media (max-width:429px){
  .cat-button{padding:11px 13px}
  .cat-button > span{
    position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
    clip:rect(0 0 0 0);white-space:nowrap;border:0
  }
  .region-button{padding:8px 4px;font-size:13.5px}
  .header-inner{gap:8px}
}

.pill{background:var(--red);color:#fff;border-radius:999px;font-size:11px;padding:1px 6px;margin-left:2px}
.avatar{width:30px;height:30px;border-radius:50%;background:var(--brand);color:#fff;
  display:grid;place-items:center;font-weight:700;font-size:13px}
.menu{position:relative}
.menu summary{list-style:none;cursor:pointer}
.menu summary::-webkit-details-marker{display:none}
.menu-panel{
  position:absolute;right:0;top:calc(100% + 8px);background:#fff;border:1px solid var(--line);
  border-radius:var(--r);box-shadow:var(--sh-2);min-width:235px;padding:6px;z-index:50
}
.menu-panel a{display:block;padding:9px 10px;border-radius:var(--r-sm);color:var(--ink-2);font-size:14px}
.menu-panel a:hover{background:var(--bg);text-decoration:none}
.menu-cta{color:var(--brand)!important;font-weight:600}
.menu-head{padding:10px;border-bottom:1px solid var(--line-2);margin-bottom:4px;display:grid;gap:6px;justify-items:start}

/* ---------------------------------------------------------- mega menu */
.megamenu{
  position:absolute;left:0;right:0;top:100%;background:#fff;border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);box-shadow:var(--sh-2);z-index:45;max-height:78vh;overflow:auto
}
.megamenu-inner{display:grid;gap:0;padding:14px 16px}
.mm-rail{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.mm-rail-item{
  width:100%;display:flex;align-items:center;gap:10px;background:none;border:0;
  padding:10px 12px;border-radius:var(--r-sm);font:inherit;font-size:14.5px;color:var(--ink);
  cursor:pointer;text-align:left
}
.mm-rail-item:hover,.mm-rail-item.is-active{background:var(--bg)}
.mm-rail-item.is-active{font-weight:600}
.mm-icon{display:grid;place-items:center;width:24px;height:24px;color:var(--brand);flex:none}
.mm-icon svg{width:20px;height:20px}
.mm-chevron{margin-left:auto;color:var(--muted)}
.mm-panels{padding-top:10px}
.mm-panel{display:none}
.mm-panel.is-active{display:block}
.mm-panel-head{display:inline-flex;gap:6px;font-size:17px;font-weight:700;color:var(--ink);margin-bottom:10px}
.mm-panel-head span{color:var(--muted)}
.mm-sublist{list-style:none;margin:0;padding:0;columns:1;gap:24px}
.mm-sublist li{break-inside:avoid;margin-bottom:8px}
.mm-sublist a{color:var(--ink-2);font-size:14px}
.mm-sublist a:hover{color:var(--brand)}
/* Sits under the sticky header (z-index 40) and over everything else, so the
   open menu reads as the only live thing on screen. */
.page-scrim{position:fixed;inset:0;background:rgba(15,19,32,.38);z-index:39}

/* ------------------------------------------------------- region picker */
body.modal-open{overflow:hidden}
.region-modal{position:fixed;inset:0;z-index:80;display:grid;place-items:start center;padding:6vh 16px 16px}
.region-backdrop{position:fixed;inset:0;background:rgba(15,19,32,.45)}
.region-dialog{
  position:relative;background:#fff;border-radius:var(--r-lg);box-shadow:var(--sh-2);
  width:100%;max-width:620px;padding:24px;max-height:82vh;display:flex;flex-direction:column
}
.region-dialog h2{font-size:26px;margin:0 0 16px}
.region-close{
  position:absolute;top:12px;right:14px;background:none;border:0;font-size:30px;line-height:1;
  color:var(--muted);cursor:pointer;padding:4px 8px
}
.region-close:hover{color:var(--ink)}
.region-search{
  width:100%;padding:13px 16px;border:2px solid var(--brand);border-radius:var(--r);
  font-size:15px;font-family:inherit;background:var(--bg);margin-bottom:12px
}
.region-search:focus{outline:none;background:#fff}
.region-results{overflow:auto;flex:1;margin:0 -8px;padding:0 8px}
.region-group{border-bottom:1px solid var(--line-2);padding-bottom:6px;margin-bottom:6px}
.region-option{display:block;padding:11px 12px;border-radius:var(--r-sm);color:var(--ink);font-size:15px}
.region-option:hover{background:var(--brand-tint);text-decoration:none}
.region-province{font-weight:600}
.region-town{padding-left:26px;color:var(--ink-2);font-size:14.5px}
.region-all{font-weight:600;margin-bottom:6px}
.region-empty{color:var(--muted);padding:16px 12px;margin:0}
/* On a laptop the whole country should be visible at once — one 67-row
   column means scrolling past six provinces to reach Mongu. */
@media (min-width:900px){
  .region-modal{padding:4vh 16px 16px}
  .region-dialog{max-width:940px;max-height:88vh}
  .region-results{columns:3;column-gap:24px}
  .region-group{break-inside:avoid;border-bottom:0;padding-bottom:0;margin-bottom:14px}
  .region-option{padding:5px 10px;font-size:14.5px}
  .region-town{padding-left:22px;font-size:14px}
}
@media (min-width:1240px){
  .region-dialog{max-width:1120px}
  .region-results{columns:4}
}

/* ------------------------------------------------------- strips/flash */
.strip{font-size:14px;padding:9px 0}
.strip a{font-weight:600;text-decoration:underline}
.strip-warn{background:var(--accent-tint);color:var(--accent-ink)}
.strip-warn a{color:var(--accent-ink)}
.strip-info{background:var(--brand-tint);color:var(--brand-ink)}
.strip-info a{color:var(--brand-ink)}
.flashes{padding-top:14px;display:grid;gap:8px}
.flash{padding:11px 14px;border-radius:var(--r);font-size:14px;border:1px solid}
.flash-success{background:var(--brand-tint);border-color:var(--brand-line);color:var(--brand-ink)}
.flash-error{background:var(--red-50);border-color:var(--red-line);color:var(--red-ink)}
.flash-info{background:var(--accent-tint);border-color:var(--accent-line);color:var(--accent-ink)}

/* ------------------------------------------------------------ buttons */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  padding:11px 18px;border-radius:var(--r);border:1px solid transparent;
  font-size:15px;font-weight:600;cursor:pointer;text-align:center;
  transition:background .12s,border-color .12s,transform .06s
}
.btn:hover{text-decoration:none}
.btn:active{transform:translateY(1px)}
.btn-primary{background:var(--brand);background-image:var(--grad-btn);color:#fff;border-color:transparent}
.btn-primary:hover{background-image:var(--grad-btn-hover)}
.btn-ghost{background:#fff;border-color:var(--line);color:var(--ink-2)}
.btn-ghost:hover{border-color:var(--muted)}
.btn-danger{background:#fff;border-color:var(--red-line);color:var(--red)}
.btn-danger:hover{background:var(--red-50)}
.btn-amber{background:var(--accent);color:#2b0a06}
.btn-sm{padding:8px 14px;font-size:14px}
.btn-lg{padding:14px 22px;font-size:16px;width:100%}
.btn[disabled]{opacity:.5;pointer-events:none}

/* ------------------------------------------------------------- badges */
.badge{
  display:inline-flex;align-items:center;gap:5px;padding:3px 9px;border-radius:999px;
  font-size:12px;font-weight:600;line-height:1.5;white-space:nowrap;border:1px solid
}
.badge-verified{background:var(--brand-tint);color:var(--brand-ink);border-color:var(--brand-line)}
.badge-phone{background:var(--accent-tint);color:var(--accent-ink);border-color:var(--accent-line)}
.badge-none{background:#f1f4f5;color:var(--muted);border-color:var(--line)}
.badge-lg{font-size:13px;padding:5px 12px}
.tag{
  display:inline-block;padding:3px 9px;border-radius:999px;background:var(--line-2);
  color:var(--ink-2);font-size:12px;font-weight:600
}
.tag-pending{background:var(--accent-tint);color:var(--accent-ink)}
.tag-active{background:var(--brand-tint);color:var(--brand-ink)}
.tag-sold{background:#eceff0;color:var(--muted)}
.tag-removed,.tag-rejected{background:var(--red-50);color:var(--red-ink)}
.tag-warn{background:var(--accent-tint);color:var(--accent-ink)}

/* --------------------------------------------------------------- hero */
/* The deck stacks every slide into one grid cell, so the band takes the height
   of the tallest message and never jumps as it turns over. Inactive slides are
   hidden with visibility, not display: that keeps them out of the reading order
   and out of the tab order while still holding the box open. */
.hero-deck{position:relative}
.hero-stack{display:grid}
.hero{
  grid-area:1/1;background:var(--grad-deep);color:#fff;
  padding:34px 0 30px;opacity:0;visibility:hidden;transition:opacity .4s ease
}
.hero.is-current{opacity:1;visibility:visible}
.is-rotating .hero{padding-bottom:40px}
@media (prefers-reduced-motion:reduce){.hero{transition:none}}
.hero-amber{background:linear-gradient(115deg,#d83a2a,#d6337f)}
.hero-green{background:linear-gradient(115deg,#7436e6,#3f5ff0)}
.hero-plum{background:linear-gradient(115deg,#d6337f,#7436e6)}
.hero .hero-title{font-size:27px;max-width:19ch;margin-bottom:10px;line-height:1.16;font-weight:700}
/* Full white: at 92% the pink end of the gradient drops to 4.05:1. */
.hero p{color:#fff;max-width:52ch;margin-bottom:18px}
.hero-cta{margin:16px 0 0}
.btn-hero{background:#fff;border-color:#fff;color:var(--brand-ink);font-weight:600}
.btn-hero:hover{background:var(--brand-tint)}
.hero-dots{position:absolute;left:0;right:0;bottom:13px;display:flex;justify-content:center;gap:8px}
.hero-dot{
  width:9px;height:9px;padding:0;border:0;border-radius:999px;cursor:pointer;
  background:rgba(255,255,255,.42);transition:background .2s,width .2s
}
.hero-dot:hover{background:rgba(255,255,255,.7)}
.hero-dot.is-current{background:#fff;width:24px}
/* On a phone the hero used to fill the whole first screen, so the first thing
   a shopper saw was a sales pitch and no goods. Tighter type and padding put
   the category tiles back above the fold on a 667px screen. */
@media (max-width:539px){
  .hero{padding:20px 0 18px}
  .is-rotating .hero{padding-bottom:34px}
  .hero .hero-title{font-size:22px;max-width:24ch;margin-bottom:8px}
  .hero p{font-size:14px;margin-bottom:13px}
  .hero-points li{padding:5px 11px;font-size:12.5px}
  .hero-cta{margin-top:13px}
}
.hero-points{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:0}
.hero-points li{
  display:flex;align-items:center;gap:7px;background:rgba(23,10,48,.22);
  padding:7px 13px;border-radius:999px;font-size:13px;font-weight:500
}
.hero-points svg{color:#ffd3ca;flex:none}

/* --------------------------------------- a photo behind the words (028)
   The photo fills the banner, and a shade in the banner's own colours sits
   over it: each stop darkened with 35% of the plum ink, laid at 82%. White
   words on it stay above 5:1 even where the photo underneath is pure white,
   the worst case, checked stop by stop. On a computer the words take the
   left side, so the shade fades out to the right and the photo shows there.
   On a phone the words take the whole width, so the photo becomes a strip
   across the top (--strip) that fades into the shade the words sit on.
   Slides share one height, so each one's words sit in the middle of it: a
   colour-only banner next to a photo one is not left with a gap underneath. */
.hero{position:relative;display:grid;align-content:center}
.hero.has-photo{isolation:isolate;overflow:hidden;background:#1e1238;
  --strip:200px;padding-top:calc(var(--strip) + 16px)}
.hero-photo{
  position:absolute;top:0;left:0;width:100%;height:var(--strip);object-fit:cover;z-index:-2;
  -webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 48px),transparent);
          mask-image:linear-gradient(180deg,#000 calc(100% - 48px),transparent)
}
.hero-shade{
  position:absolute;inset:0;z-index:-1;opacity:.82;
  background:linear-gradient(100deg,#972c2f,#962766 30%,#762989 55%,#5629a9 78%,#3344b0);
  -webkit-mask-image:linear-gradient(180deg,rgba(0,0,0,.08) 0,rgba(0,0,0,.08) calc(var(--strip) - 72px),#000 var(--strip));
          mask-image:linear-gradient(180deg,rgba(0,0,0,.08) 0,rgba(0,0,0,.08) calc(var(--strip) - 72px),#000 var(--strip))
}
.hero-amber .hero-shade{background:linear-gradient(115deg,#972c2f,#962766)}
.hero-green .hero-shade{background:linear-gradient(115deg,#5629a9,#3344b0)}
.hero-plum .hero-shade{background:linear-gradient(115deg,#962766,#5629a9)}
.hero.has-photo .hero-title,.hero.has-photo .wrap>p:not(.hero-cta){text-shadow:0 1px 2px rgba(15,8,30,.35)}
@media (max-width:539px){.hero.has-photo{--strip:40vw}}
@media (min-width:860px){
  .hero.has-photo{padding-top:52px}
  .hero-photo{height:100%;-webkit-mask-image:none;mask-image:none}
  /* Four long chips would run past the shade; keep them in its solid part. */
  .hero.has-photo .hero-points{max-width:660px}
  .hero-shade{
    -webkit-mask-image:linear-gradient(90deg,#000 0,#000 700px,rgba(0,0,0,.2) 960px,transparent 100%);
            mask-image:linear-gradient(90deg,#000 0,#000 700px,rgba(0,0,0,.2) 960px,transparent 100%)
  }
}
@media (min-width:1120px){
  /* The words end about 120px right of the middle once the page stops growing. */
  .hero-shade{
    -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(50% + 140px),rgba(0,0,0,.2) calc(50% + 300px),transparent 100%);
            mask-image:linear-gradient(90deg,#000 0,#000 calc(50% + 140px),rgba(0,0,0,.2) calc(50% + 300px),transparent 100%)
  }
}

/* Admin → Banners: the photo row */
.banner-photo-row{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:start;
  border-top:1px solid var(--line-2);padding-top:14px;margin-top:4px}
.banner-thumb{display:block;width:180px;max-width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:10px;
  border:1px solid var(--line)}
.banner-thumb-none{display:grid;place-items:center;color:#fff;font-size:13px;font-weight:600}
@media (min-width:860px){.banner-photo-row{grid-template-columns:180px minmax(0,1fr) 220px}}

/* A panel holds two shapes at once: bare links for a flat branch like Vehicles,
   and headed columns for a deep one like Electronics. The nested list must not
   inherit the panel's column count or the headings drift away from their own
   links. */
.mm-groups{display:grid;gap:14px;margin-top:12px}
.mm-group-head{display:block;font-weight:600;font-size:13.5px;color:var(--ink);margin-bottom:5px}
.mm-group .mm-sublist{columns:1}

/* ----------------------------------------------------------- category */
.cat-strip{display:flex;gap:8px;overflow-x:auto;padding:16px 0 4px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.cat-strip::-webkit-scrollbar{display:none}
.chip{
  flex:none;padding:8px 15px;border-radius:999px;background:#fff;border:1px solid var(--line);
  font-size:14px;font-weight:500;color:var(--ink-2)
}
.chip:hover{border-color:var(--brand-600);text-decoration:none}
.chip[aria-current="true"]{background:var(--brand);border-color:var(--brand);color:#fff}

/* -------------------------------------------------------------- cards */
.section{padding:22px 0 40px}
/* .section's shorthand was zeroing .wrap's side gutter, so every admin screen
   ran edge to edge on a phone. Keep the vertical rhythm, give the gutter back. */
.wrap.section{padding-left:16px;padding-right:16px}
.section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:14px}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.card{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  overflow:hidden;box-shadow:var(--sh-1);display:flex;flex-direction:column
}
.card:hover{text-decoration:none;border-color:#cdd8db;box-shadow:var(--sh-2)}
.card-media{position:relative;aspect-ratio:4/3;background:var(--line-2);overflow:hidden}
.card-media img{width:100%;height:100%;object-fit:cover}
.card-media .ph{width:100%;height:100%;display:grid;place-items:center;color:#b2b8cc}
.card-flag{position:absolute;top:8px;left:8px}
.card-body{padding:10px 12px 12px;display:flex;flex-direction:column;gap:4px;flex:1}
.card-title{font-size:14px;font-weight:600;color:var(--ink);margin:0;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.card-price{font-size:17px;font-weight:700;color:var(--brand);letter-spacing:-.02em}
.card-meta{font-size:12px;color:var(--muted);display:flex;gap:6px;align-items:center;margin-top:auto;padding-top:6px}
/* "Villa Elizabetta, Lusaka" in a card on a small phone: cut short, never wider than the card. */
.card-place{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.card-meta .dot{flex:none}
.dot::before{content:"·";margin-right:6px}

.empty{
  background:#fff;border:1px dashed var(--line);border-radius:var(--r-lg);
  padding:42px 22px;text-align:center;color:var(--muted)
}
.empty h3{color:var(--ink)}

/* ------------------------------------------------------------ filters */
.toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.toolbar select,.toolbar input{
  padding:9px 12px;border:1px solid var(--line);border-radius:var(--r-sm);
  background:#fff;font-size:14px;color:var(--ink-2);min-width:0
}
.result-count{font-size:14px;color:var(--muted);margin-left:auto}
.toolbar .num{width:110px}
@media (max-width:559px){
  /* On a phone the filter bar becomes a tidy two-column grid instead of
     a ragged wrapping row. */
  .toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .toolbar select,.toolbar input,.toolbar .btn{width:100%;min-width:0}
  .toolbar select[name="city"]{grid-column:1 / -1}
  .result-count{grid-column:1 / -1;margin-left:0;text-align:right}
}

/* -------------------------------------------------------------- forms */
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
  padding:20px;box-shadow:var(--sh-1)}
.panel + .panel{margin-top:16px}
.narrow{max-width:520px;margin:26px auto 46px}
.mid{max-width:760px;margin:26px auto 46px}
.field{margin-bottom:15px}
.field label{display:block;font-size:14px;font-weight:600;margin-bottom:5px;color:var(--ink-2)}
.field .hint{font-size:12.5px;color:var(--muted);margin-top:5px}
.field input[type=text],.field input[type=email],.field input[type=password],
.field input[type=tel],.field input[type=number],.field input[type=date],
.field input[type=url],.field input[type=file],.field select,.field textarea{
  width:100%;padding:11px 13px;border:1px solid var(--line);border-radius:var(--r-sm);
  font-size:15px;font-family:inherit;background:#fff;color:var(--ink)
}
.field textarea{min-height:130px;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus{
  outline:2px solid var(--brand-600);outline-offset:0;border-color:var(--brand-600)
}
.field-row{display:grid;gap:15px}
.check{display:flex;gap:9px;align-items:flex-start;font-size:14px;color:var(--ink-2)}
.check input{margin-top:3px;width:17px;height:17px;flex:none;accent-color:var(--brand)}
.err{color:var(--red);font-size:13px;margin-top:5px}
.form-foot{margin-top:18px;display:flex;flex-direction:column;gap:10px}
.aside-note{font-size:14px;color:var(--muted);text-align:center;margin-top:16px}

.otp-input{
  font-size:28px!important;letter-spacing:.4em;text-align:center;font-weight:700;
  font-variant-numeric:tabular-nums
}
.code-callout{
  background:var(--accent-tint);border:1px dashed var(--accent);border-radius:var(--r);
  padding:13px 16px;font-size:14px;margin-bottom:16px;color:var(--accent-ink)
}
.code-callout b{font-size:21px;letter-spacing:.22em;display:block;margin-top:5px;color:var(--accent-ink)}

/* --------------------------------------------------------- listing pg */
.listing-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;margin:20px 0 46px}
.gallery-main{
  background:#fff;border:1px solid var(--line);border-radius:var(--r);overflow:hidden;
  aspect-ratio:4/3;display:grid;place-items:center
}
.gallery-main img{width:100%;height:100%;object-fit:contain;background:#0d1214}
.gallery-thumbs{display:flex;gap:8px;margin-top:8px;overflow-x:auto;padding-bottom:4px}
.gallery-thumbs button{
  flex:none;width:66px;height:66px;padding:0;border:2px solid var(--line);border-radius:var(--r-sm);
  overflow:hidden;background:#fff;cursor:pointer
}
.gallery-thumbs button[aria-current="true"]{border-color:var(--brand)}
.gallery-thumbs img{width:100%;height:100%;object-fit:cover}

.price-big{font-size:30px;font-weight:800;color:var(--brand);letter-spacing:-.03em;margin:0}
.spec-list{list-style:none;padding:0;margin:16px 0;display:grid;gap:0;border-top:1px solid var(--line-2)}
.spec-list li{display:flex;justify-content:space-between;gap:16px;padding:9px 0;border-bottom:1px solid var(--line-2);font-size:14px}
.spec-list dt,.spec-list .k{color:var(--muted)}
.spec-list .v{font-weight:600;text-align:right;min-width:0;overflow-wrap:anywhere}

.seller-card{display:flex;gap:12px;align-items:flex-start}
.seller-av{width:46px;height:46px;border-radius:50%;background:var(--brand);color:#fff;
  display:grid;place-items:center;font-weight:700;font-size:19px;flex:none}
.seller-av.has-logo{border-radius:12px;background:#fff;border:1px solid var(--line);object-fit:contain}
.seller-av-link{flex:none}
.seller-av-link:hover{text-decoration:none}
.reveal-box{background:var(--brand-tint);border:1px solid var(--brand-line);border-radius:var(--r);padding:14px;text-align:center}
.reveal-num{font-size:22px;font-weight:700;letter-spacing:.02em;color:var(--brand-900);margin:2px 0 8px}
.safety{background:var(--accent-tint);border:1px solid var(--accent-line);border-radius:var(--r);padding:15px}
.safety h3{font-size:14px;margin-bottom:8px;color:var(--accent-ink)}
.safety ul{margin:0;padding-left:18px;font-size:13.5px;color:var(--accent-ink)}
.safety li{margin-bottom:5px}

/* -------------------------------------------------------------- steps */
.steps{list-style:none;counter-reset:s;padding:0;margin:0 0 20px;display:grid;gap:12px}
.steps li{counter-increment:s;display:flex;gap:12px;align-items:flex-start;font-size:14px;color:var(--ink-2)}
.steps li::before{
  content:counter(s);flex:none;width:26px;height:26px;border-radius:50%;
  background:var(--brand-tint);color:var(--brand);font-weight:700;font-size:13px;display:grid;place-items:center
}

/* ------------------------------------------------------------- tables */
.table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--r);background:#fff}
table{width:100%;border-collapse:collapse;font-size:14px;min-width:620px}
th{text-align:left;padding:11px 13px;background:var(--bg);color:var(--muted);
  font-size:12px;text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--line)}
td{padding:12px 13px;border-bottom:1px solid var(--line-2);vertical-align:middle}
tr:last-child td{border-bottom:0}
.kyc-doc{width:96px;height:70px;object-fit:cover;border-radius:var(--r-sm);border:1px solid var(--line);background:var(--line-2)}

.stat-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:22px}
.stat{background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:15px}
.stat .n{font-size:26px;font-weight:800;letter-spacing:-.03em;line-height:1.1}
.stat .l{font-size:12.5px;color:var(--muted);margin-top:3px}
.stat-alert .n{color:var(--red)}

/* --------------------------------------------------------- pagination */
.pager{display:flex;gap:6px;justify-content:center;margin-top:26px;flex-wrap:wrap}
.pager a,.pager span{
  min-width:38px;padding:8px 12px;border:1px solid var(--line);border-radius:var(--r-sm);
  background:#fff;text-align:center;font-size:14px;color:var(--ink-2)
}
.pager .on{background:var(--brand);border-color:var(--brand);color:#fff;font-weight:600}

/* -------------------------------------------------------------- misc */
.crumbs{font-size:13px;color:var(--muted);padding:14px 0 0}
.crumbs a{color:var(--muted)}
.divider{height:1px;background:var(--line-2);margin:18px 0}
.stack{display:grid;grid-template-columns:minmax(0,1fr);gap:14px}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.thumb-preview{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.thumb-preview img{width:74px;height:74px;object-fit:cover;border-radius:var(--r-sm);border:1px solid var(--line)}

/* ------------------------------------------------------ notifications */
.bell{position:relative;display:inline-flex;align-items:center;padding:4px}
.bell-count{
  position:absolute;top:-2px;right:-6px;min-width:17px;text-align:center;
  padding:1px 5px;font-size:10.5px;line-height:1.45
}

.notif-list{display:grid;gap:8px}
.notif{margin:0}
.notif-btn{
  width:100%;display:flex;gap:12px;align-items:flex-start;text-align:left;cursor:pointer;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:14px 15px;font:inherit;color:inherit;box-shadow:var(--sh-1)
}
.notif-btn:hover{border-color:#cdd5e6;box-shadow:var(--sh-2)}
.notif-unread .notif-btn{background:var(--brand-tint);border-color:var(--brand-line)}
.notif-icon{
  flex:none;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;
  background:var(--brand-tint);color:var(--brand-ink)
}
.notif-unread .notif-icon{background:#fff;color:var(--brand)}
.notif-text{display:grid;gap:3px;flex:1;min-width:0}
.notif-title{font-weight:600;font-size:14.5px;color:var(--ink)}
.notif-body{font-size:13.5px;color:var(--ink-2)}
.notif-meta{font-size:12px;color:var(--muted)}
.notif-dot{
  flex:none;width:9px;height:9px;border-radius:50%;background:var(--brand);margin-top:6px
}

/* ------------------------------------------------------------- wallet */
.balance-panel{text-align:center}
.balance-figure{
  font-size:40px;font-weight:800;letter-spacing:-.03em;color:var(--brand);
  margin:4px 0 6px;font-variant-numeric:tabular-nums
}
.amount-chips{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:10px}
.amount-chips .chip{cursor:pointer;font-weight:600;padding:7px 14px}
.amount-chips .chip:hover{border-color:var(--brand);color:var(--brand)}
.topup-pending{
  display:flex;gap:12px;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;
  padding:12px 0;border-bottom:1px solid var(--line-2)
}
.topup-pending:last-child{border-bottom:0;padding-bottom:0}
.topup-pending code{background:var(--bg);padding:1px 6px;border-radius:5px;font-size:12.5px}

.card-boost{
  position:absolute;top:8px;right:8px;background:var(--accent);color:#2b0a06;
  font-size:11px;font-weight:700;padding:3px 9px;border-radius:999px;letter-spacing:.02em
}
.boost-row{
  display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:10px;
  padding-top:10px;border-top:1px dashed var(--line)
}

/* ------------------------------------------------------- photo manager */
.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.photo-tile{position:relative;border:1px solid var(--line);border-radius:var(--r);overflow:hidden;background:var(--line-2)}
.photo-tile img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}
.photo-cover{
  position:absolute;top:7px;left:7px;background:var(--brand);color:#fff;
  font-size:11px;font-weight:700;padding:3px 9px;border-radius:999px
}
.photo-actions{display:flex;gap:6px;padding:8px;flex-wrap:wrap;background:#fff}
.photo-actions form{margin:0;flex:1}
.photo-actions .btn{width:100%;padding:6px 8px;font-size:12.5px}

/* ----------------------------------------------------------------- Q&A */
.qa-list{display:grid;gap:14px}
.qa{border:1px solid var(--line);border-radius:var(--r);padding:14px 15px;background:var(--surface)}
.qa-hidden{border-style:dashed;background:var(--accent-tint)}
.qa-q{font-size:14.5px}
.qa-a{
  margin-top:10px;padding-top:10px;padding-left:14px;
  border-top:1px solid var(--line-2);border-left:3px solid var(--brand);font-size:14.5px
}
.qa-answer{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.qa-answer input[type=text]{
  flex:1;min-width:180px;padding:9px 12px;border:1px solid var(--line);
  border-radius:var(--r-sm);font-size:14px;font-family:inherit
}

/* ------------------------------------------------- ratings and reviews */
.stars{display:inline-flex;gap:1px;line-height:1;vertical-align:middle}
.stars-sm{font-size:13px}
.stars-lg{font-size:18px}
.star-full{color:var(--star)}
.star-half{color:var(--star);opacity:.55}
.star-empty{color:var(--line)}
.rating-figure{font-weight:700;margin-left:6px;font-size:13.5px}
.rating-count{color:var(--muted);font-size:12.5px;margin-left:6px}
.rating-none{color:var(--muted);font-size:12.5px}
.seller-rating{margin-top:6px}
.card-rating{display:flex;align-items:center;gap:5px;font-size:11.5px;color:var(--muted)}

.review-list{display:grid;gap:14px}
.review{border:1px solid var(--line);border-radius:var(--r);padding:14px 16px;background:var(--surface)}
.review-hidden{border-style:dashed;background:var(--accent-tint)}
.review-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.review-reply{
  margin-top:10px;padding:10px 0 0 14px;
  border-top:1px solid var(--line-2);border-left:3px solid var(--brand);font-size:14.5px
}

/* radio stars, laid out right-to-left so hover fills the ones before it */
.star-picker{display:inline-flex;flex-direction:row-reverse;gap:4px}
.star-picker input{position:absolute;opacity:0;width:0;height:0}
.star-picker label{
  font-size:34px;line-height:1;color:var(--line);cursor:pointer;margin:0;
  transition:color .1s
}
.star-picker input:checked ~ label,
.star-picker label:hover,
.star-picker label:hover ~ label{color:var(--star)}
.star-picker input:focus-visible + label{outline:2px solid var(--brand-600);border-radius:4px}

/* ----------------------------------------------------------------- shop */
.shop-head{display:flex;gap:18px;align-items:flex-start;flex-wrap:wrap;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
  padding:22px;box-shadow:var(--sh-1)}
.shop-avatar{
  width:74px;height:74px;border-radius:var(--r);background:var(--brand);color:#fff;
  display:grid;place-items:center;font-weight:800;font-size:30px;flex:none
}
.shop-id{flex:1;min-width:240px}
.shop-id h1{margin:0 0 4px}
.shop-tagline{color:var(--ink-2);margin:0 0 10px;font-size:15px}
.shop-badges{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.shop-rating{margin-top:10px}

/* ------------------------------------------------------ category tiles */
.tile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0 6px}
.tile{
  display:flex;align-items:center;gap:10px;background:var(--bg);border:1px solid var(--line-2);
  border-radius:var(--r-lg);padding:16px;min-height:76px;color:var(--ink);font-weight:600;font-size:14.5px
}
.tile:hover{background:#fff;border-color:var(--brand-line);text-decoration:none;box-shadow:var(--sh-1)}
.tile-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:var(--r-sm);
  background:var(--brand-tint);color:var(--brand);flex:none}
.tile-icon svg{width:22px;height:22px}
.tile-count{display:block;font-weight:400;font-size:12.5px;color:var(--muted);margin-top:2px}
.tile-photo{
  width:52px;height:52px;flex:none;border-radius:var(--r-sm);object-fit:cover;background:var(--line-2)
}
.tile-has-photo{padding:12px 14px}
.tile-text{display:flex;flex-direction:column}

/* ------------------------------------------------------------- footer */
.site-footer{background:var(--brand-900);color:#c9beea;margin-top:auto;padding:36px 0 20px;font-size:14px;position:relative}
.site-footer::before{content:'';position:absolute;left:0;right:0;top:0;height:4px;background:var(--grad)}
.footer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.site-footer h4{color:#fff;font-size:13px;text-transform:uppercase;letter-spacing:.05em;margin-bottom:9px}
.site-footer a{display:block;color:#c9beea;margin-bottom:7px}
.site-footer a:hover{color:#fff}
.site-footer .muted{color:#a196cc}
.footer-base{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;
  border-top:1px solid rgba(255,255,255,.12);margin-top:24px;padding-top:16px;font-size:13px;color:#a196cc}

/* --------------------------------------------------------- breakpoints */
@media (min-width:560px){
  .grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .field-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stat-row{grid-template-columns:repeat(4,minmax(0,1fr))}
  .form-foot{flex-direction:row;justify-content:flex-end;align-items:center}
  .btn-lg{width:auto;min-width:190px}
  h1{font-size:30px}
  .hero .hero-title{font-size:34px}
}
@media (min-width:560px){
  .tile-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (min-width:860px){
  .utility-links{display:flex}
  .header-search{order:0;flex:1 1 auto;max-width:none;margin:0}
  .megamenu-inner{grid-template-columns:270px 1fr;gap:26px;padding:20px 16px 26px}
  .mm-rail{border-right:1px solid var(--line-2);padding-right:14px}
  .mm-panels{padding-top:0}
  .mm-sublist{columns:2}
  .mm-groups{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 22px}
  .tile-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .tile{min-height:92px;font-size:15px}
  .grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .listing-grid{grid-template-columns:minmax(0,1.55fr) minmax(320px,1fr);align-items:start}
  .footer-grid{grid-template-columns:2fr 1fr 1fr 1fr}
  .hero{padding:52px 0 46px}
}
@media (min-width:1080px){
  .mm-sublist{columns:3}
  .tile-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}


/* ==========================================================  admin panel */
/* Two labelled rows: the daily queues, then the set-up pages. A row wraps on
   a laptop. On a phone it stays one line you swipe along, where the half-cut
   tab at the edge shows there is more. Until 22 Oct this was one row of
   seventeen that scrolled with its scrollbar hidden, and Settings sat off the
   edge of a laptop screen with nothing to say it was there. */
.admin-nav{margin:0 0 18px;border-bottom:1px solid var(--line)}
/* position:relative so the hidden " waiting" inside a count belongs to the row:
   otherwise, on a phone, one on a tab scrolled out of sight stretched the page
   sideways and the browser zoomed the whole screen out to fit it. */
.admin-tabs{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:2px;padding:2px 0}
.admin-tabs + .admin-tabs{border-top:1px solid var(--line-2)}
.admin-tabs-label{
  flex:0 0 auto;min-width:92px;margin-right:6px;font-size:11px;font-weight:700;
  letter-spacing:.06em;text-transform:uppercase;color:var(--muted);white-space:nowrap
}
@media (max-width:640px){
  /* The fade at the right edge says the row goes on. The spacer at its end
     lets the last tab scroll clear of the fade. */
  .admin-tabs{flex-wrap:nowrap;overflow-x:auto;
    -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent);
            mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}
  .admin-tabs::after{content:"";flex:0 0 28px}
  .admin-tabs-label{min-width:0}
}
.admin-tab{
  padding:9px 10px;border-radius:var(--r-sm) var(--r-sm) 0 0;color:var(--ink-2);
  font-size:14px;font-weight:500;white-space:nowrap;border-bottom:2px solid transparent
}
.admin-tabs + .admin-tabs .admin-tab{padding:7px 10px;font-size:13px}
.admin-tab:hover{background:var(--bg);text-decoration:none}
.admin-tab.is-active{color:var(--brand);border-bottom-color:var(--brand);font-weight:600}

/* Overview cards that lead somewhere: the queue behind the number. */
a.stat{display:block;color:inherit;text-decoration:none;transition:border-color .15s,box-shadow .15s}
a.stat:hover{border-color:var(--brand-line);box-shadow:0 2px 10px rgba(116,54,230,.08);text-decoration:none}
a.stat .l::after{content:" →";color:var(--brand)}

/* A <label class="field"><span class="label"> reads better to a screen reader
   than a bare div, so the label styling has to reach the span too. */
.field .label{display:block;font-size:14px;font-weight:600;margin-bottom:5px;color:var(--ink-2)}
.row-fields{display:flex;flex-wrap:wrap;gap:12px;align-items:flex-end}
.row-fields .field{margin-bottom:0}
.field-grow{flex:1 1 220px;min-width:0}
.field-tiny{flex:0 0 86px}
.inline-form{display:inline-flex;gap:6px;align-items:center;margin:0}
.row-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;line-height:1.5}

.cat-block{margin-bottom:14px;padding:16px}
.cat-row{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:8px 0}
/* Cap the name box: left to grow it took the whole row and pushed the two
   checkboxes onto a line of their own, which read as if they belonged to the
   category underneath. */
.cat-row .field-grow{flex:1 1 200px;max-width:380px}
.cat-row .check{flex:0 0 auto}
.cat-row-parent{border-bottom:1px solid var(--line-2);padding-bottom:14px;margin-bottom:6px}
.cat-row-child{padding-left:8px}
.cat-branch{color:var(--muted);align-self:center}
.cat-meta{font-size:12.5px;color:var(--muted);align-self:center;white-space:nowrap}
.cat-thumb{
  width:52px;height:52px;flex:none;border-radius:var(--r-sm);overflow:hidden;
  background:var(--bg);display:grid;place-items:center
}
.cat-thumb img{width:100%;height:100%;object-fit:cover}
.cat-thumb-empty{color:var(--brand);display:grid;place-items:center}
.cat-thumb-empty svg{width:24px;height:24px}
.cat-thumb-sm{width:44px;height:44px;border-radius:var(--r-sm);object-fit:cover}

/* Follows you down a long form so "Save" is never a scroll away. */
.sticky-save{
  position:sticky;bottom:0;background:var(--surface);border-top:1px solid var(--line);
  padding:12px 0;margin-top:6px;z-index:20
}

/* Page bodies are typed into a text box, so the prose styles have to come
   from here rather than from classes the writer would have to remember. */
.prose h2{font-size:18px;margin:22px 0 8px}
.prose h3{font-size:16px;margin:18px 0 6px}
.prose p,.prose li{color:var(--ink-2);line-height:1.65}
.prose ul,.prose ol{padding-left:22px;margin:0 0 1em}
.prose li{margin-bottom:6px}
.prose a{color:var(--brand)}
.prose > :first-child{margin-top:0}

/* =====================================================  delivery & business */
.badge-delivery{background:#e7f6ee;color:#14663c;border-color:#bfe6d0}
.badge-business{background:var(--brand-tint);color:var(--brand-ink);border-color:var(--brand-line)}
.badge-open{background:#e7f6ee;color:#14663c;border-color:#bfe6d0}
.badge-shut{background:#f1f4f5;color:var(--muted);border-color:var(--line)}

/* The delivery panel on a listing. Green on purpose: it is the one part of the
   page that is good news, and it has to survive being skimmed. */
.delivery-box{
  background:#f2faf6;border:1px solid #bfe6d0;border-radius:var(--r);
  padding:13px 15px;margin:14px 0 4px;font-size:14px;color:var(--ink-2)
}
.delivery-box p{margin:0 0 7px}
.delivery-box p:last-child{margin-bottom:0}
.delivery-head{display:flex;align-items:center;gap:8px;color:#14663c;margin-bottom:7px}
.delivery-area{font-weight:600;color:var(--ink)}
/* Small, but never dropped: it is the sentence that keeps the site honest. */
.delivery-rule{font-size:12.5px;color:#14663c;border-top:1px solid #cdeadb;padding-top:7px}
.card-delivery{margin:6px 0 2px}

.toolbar-check{
  display:inline-flex;align-items:center;gap:7px;font-size:14px;color:var(--ink-2);
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:9px 13px;
  white-space:nowrap;cursor:pointer
}
.toolbar-check input{width:16px;height:16px;accent-color:var(--brand);margin:0}

.form-section{font-size:17px;margin:0 0 4px}

/* Opening hours. One row per day, and it has to stay usable on a phone, so the
   day label takes its own line below 520px rather than squeezing the times. */
.hours-grid{display:grid;gap:8px;margin-top:10px}
.hours-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.hours-day{flex:0 0 150px;margin:0}
.hours-row input[type=time]{
  padding:8px 10px;border:1px solid var(--line);border-radius:var(--r-sm);
  font:inherit;font-size:14px;background:var(--surface);color:var(--ink)
}
@media (max-width:519px){
  .hours-day{flex:1 1 100%}
  .hours-row{padding-bottom:8px;border-bottom:1px solid var(--line-2)}
}

.shop-hours{display:flex;align-items:center;gap:7px;margin:8px 0 0;font-size:13.5px;color:var(--ink-2)}
.shop-hours svg{color:var(--muted);flex:none}

/* ==============================================================  ordering */
.cart-button{
  display:inline-flex;align-items:center;gap:6px;background:var(--brand-tint);color:var(--brand-ink);
  border:1px solid var(--brand-line);border-radius:var(--r);padding:9px 12px;flex:none
}
.cart-button:hover{text-decoration:none;background:#e9e0fd}

.order-add{display:flex;gap:10px;align-items:stretch;margin:14px 0 4px}
.order-add input[type=number]{
  width:74px;padding:11px 10px;border:1px solid var(--line);border-radius:var(--r);
  font:inherit;font-size:16px;text-align:center;background:var(--surface);color:var(--ink)
}
.order-add .btn{flex:1}

.order-from{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}

.cart-line{
  display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line-2);flex-wrap:wrap
}
.cart-line:last-of-type{border-bottom:0}
.cart-line-main{flex:1 1 180px;min-width:0}
.cart-line-total{font-weight:600;white-space:nowrap}
.cart-line-gone{opacity:.6}
.cart-qty{margin:0}
.cart-qty input{
  width:66px;padding:8px;border:1px solid var(--line);border-radius:var(--r-sm);
  font:inherit;font-size:15px;text-align:center;background:var(--surface);color:var(--ink)
}

.totals{list-style:none;margin:14px 0 0;padding:0;font-size:14.5px}
.totals li{display:flex;justify-content:space-between;padding:5px 0;color:var(--ink-2)}
.totals-grand{
  border-top:1px solid var(--line);margin-top:6px;padding-top:11px!important;
  font-size:17px;font-weight:700;color:var(--ink)
}

/* Delivery or collection, as one control rather than two loose radios. */
.seg-choice{display:flex;gap:0;margin:4px 0 6px;border:1px solid var(--line);border-radius:var(--r);overflow:hidden}
.seg{flex:1;text-align:center;padding:11px 8px;font-size:14.5px;cursor:pointer;color:var(--ink-2);margin:0}
.seg input{position:absolute;opacity:0;pointer-events:none}
.seg.is-on{background:var(--brand);color:#fff;font-weight:600}

/* ---------------------------------------------------------- the tracker */
.track-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}

.track-steps{
  list-style:none;display:flex;margin:22px 0 4px;padding:0;counter-reset:step;gap:0
}
.track-step{flex:1;position:relative;text-align:center;font-size:12.5px;color:var(--muted);padding-top:26px}
/* the connecting line, drawn behind the dots */
.track-step::before{
  content:'';position:absolute;top:8px;left:-50%;width:100%;height:3px;background:var(--line);z-index:0
}
.track-step:first-child::before{display:none}
.track-step.is-done::before{background:var(--brand)}
.track-dot{
  position:absolute;top:2px;left:50%;transform:translateX(-50%);width:15px;height:15px;
  border-radius:50%;background:var(--line);z-index:1;border:3px solid var(--surface)
}
.track-step.is-done .track-dot{background:var(--brand)}
.track-step.is-now .track-dot{
  background:var(--brand);box-shadow:0 0 0 5px var(--brand-tint)
}
.track-step.is-done,.track-step.is-now{color:var(--ink)}
.track-step.is-now{font-weight:700}

.track-live{display:flex;align-items:center;gap:8px;font-size:13px;margin:16px 0 0}
.live-dot{
  width:8px;height:8px;border-radius:50%;background:#1aa564;flex:none;
  animation:live-pulse 2s ease-in-out infinite
}
@keyframes live-pulse{0%,100%{opacity:1}50%{opacity:.25}}
@media (prefers-reduced-motion:reduce){.live-dot{animation:none}}

.timeline{list-style:none;margin:10px 0 0;padding:0}
.timeline li{
  padding:9px 0 9px 18px;border-left:2px solid var(--line);position:relative;
  font-size:14px;color:var(--ink-2)
}
.timeline li::before{
  content:'';position:absolute;left:-5px;top:14px;width:8px;height:8px;border-radius:50%;background:var(--line)
}
.timeline li:first-child{border-left-color:var(--brand)}
.timeline li:first-child::before{background:var(--brand)}
.timeline strong{color:var(--ink);margin-right:6px}

/* ------------------------------------------------- the kitchen's screen */
.order-card{margin-bottom:14px}
.order-card.is-closed{opacity:.72}
.order-head{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.order-items{list-style:none;margin:0 0 12px;padding:0;font-size:15px}
.order-items li{padding:4px 0}
.order-items .q{font-weight:700;color:var(--brand);margin-right:4px}
.order-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.decline-reason{
  padding:9px 11px;border:1px solid var(--line);border-radius:var(--r-sm);
  font:inherit;font-size:14px;min-width:190px;background:var(--surface);color:var(--ink)
}
.order-row{display:flex;justify-content:space-between;align-items:center;gap:12px;color:var(--ink);margin-bottom:10px}
.order-row:hover{text-decoration:none;border-color:var(--brand-line)}
.order-row-right{display:flex;align-items:center;gap:6px 10px;flex-wrap:wrap;justify-content:flex-end;white-space:nowrap}
.order-row > div:first-child{min-width:0}
/* The reason box and Decline share a line, and shrink on a 320 phone. */
.decline-form{flex:1 1 250px;min-width:0}
.decline-form .decline-reason{flex:1 1 auto;min-width:0;width:100%}

@media (max-width:519px){
  .track-step{font-size:11px}
  .order-add .btn{font-size:15px}
}

/* ===========================================================  shopfront */
.shop-cover{max-height:280px;overflow:hidden;background:var(--brand-900)}
.shop-cover img{width:100%;height:280px;object-fit:cover;display:block}
@media (max-width:719px){
  .shop-cover,.shop-cover img{height:160px;max-height:160px}
}
.cover-preview{width:100%;max-height:200px;object-fit:cover;border-radius:var(--r);display:block}

/* ============================================================ the store (029)
   A shop page laid out like a brand store: the shop's banner, a store bar with
   its logo, name, trust line, Follow, Share and its own search, then tabs. */
/* The seller's own picture fills the width: 3:1 on a phone, 4:1 on a computer,
   never over 480px nor 45% of the screen's height. A banner made at 1920 x 480
   shows whole on a computer; a phone shows the middle three-quarters of its
   width, a big screen a little less of its top and bottom, so words belong in
   the middle 1440 x 360. A height, not aspect-ratio with max-height: the two
   together also cap the width. */
.store-banner{position:relative;overflow:hidden;background:var(--brand-900);height:min(33.333vw,40vh)}
.store-banner img{display:block;width:100%;height:100%;object-fit:cover}
.store-bar{background:var(--surface);border-bottom:1px solid var(--line);box-shadow:var(--sh-1)}
.store-top{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:16px 0 8px}
.store-brand{display:flex;gap:14px;align-items:center;min-width:0}
.store-logo{width:64px;height:64px;border-radius:16px;flex:none;background:var(--brand);color:#fff;
  display:grid;place-items:center;font-weight:800;font-size:26px}
img.store-logo{object-fit:cover}
.store-logo.has-logo{background:#fff;border:1px solid var(--line);object-fit:contain}
/* Over a banner the logo sits half on it, like a profile picture. */
.store-bar.has-banner .store-logo{margin-top:-30px;border:3px solid #fff;box-shadow:0 6px 18px rgba(15,8,30,.18)}
.store-id{min-width:0}
.store-name{font-size:22px;margin:0;line-height:1.2;overflow-wrap:anywhere}
.store-trust{display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center;margin-top:6px;font-size:13px}
.store-rating{color:inherit;display:inline-flex;flex-wrap:wrap;align-items:center;gap:4px 6px}
.store-rating:hover{text-decoration:none}
.store-real{margin:4px 0 0;font-size:12.5px;color:var(--muted)}
.store-where{margin:4px 0 0;font-size:12.5px;color:var(--muted);display:flex;align-items:center;gap:4px}
.store-where svg{flex:none;width:13px;height:13px}
.store-where a{color:inherit;text-decoration:underline;text-underline-offset:2px}
.store-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.store-follow{margin:0}
.store-followers{font-size:13px;color:var(--muted);white-space:nowrap}
.btn.is-following{color:var(--brand-ink);border-color:var(--brand-line);background:var(--brand-tint)}
.store-search{display:flex;align-items:center;gap:8px;min-width:0;background:#fff;
  border:1.5px solid var(--line);border-radius:12px;padding:4px 4px 4px 12px}
.store-search:focus-within{border-color:var(--brand)}
.store-search svg{color:var(--muted);flex:none}
.store-search input{flex:1;min-width:0;border:0;outline:0;background:transparent;font:inherit;font-size:15px;padding:8px 0}
.store-tabs{display:flex;gap:2px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;
  margin:0 -16px;padding:0 16px}
.store-tabs::-webkit-scrollbar{display:none}
.store-tab{flex:none;padding:12px 12px 10px;font-size:13px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;
  color:var(--ink-2);border-bottom:3px solid transparent;white-space:nowrap}
.store-tab:hover{color:var(--brand);text-decoration:none}
.store-tab.is-current{color:var(--brand-ink);border-bottom-color:var(--brand)}
.store-more{display:none}
/* On a phone, WhatsApp is the way to share; Copy link would take a row of its own. */
@media (max-width:539px){.store-actions [data-copy-link]{display:none}}
@media (min-width:860px){
  /* The name on the left; the buttons on the right with the shop's search
     under them, as wide as they are (and wide enough for "Search all <name>"),
     so the name keeps most of the row. */
  .store-top{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand actions" "brand search";
    align-items:center;gap:10px 24px;padding-top:18px}
  .store-brand{grid-area:brand}
  .store-actions{grid-area:actions;justify-content:flex-end}
  .store-search{grid-area:search;min-width:380px}
  .store-bar.has-banner .store-logo{width:84px;height:84px;margin-top:-44px}
  .store-name{font-size:26px}
  .store-tabs{overflow:visible;margin:0;padding:0;flex-wrap:wrap}
  .store-tab-extra{display:none}
  .store-tab-cat{max-width:170px;overflow:hidden;text-overflow:ellipsis}   /* the full name is its title */
  .store-more{display:block;position:relative}
  .store-more summary{list-style:none;cursor:pointer;padding:12px 12px 10px;font-size:13px;font-weight:600;
    letter-spacing:.05em;text-transform:uppercase;color:var(--ink-2);border-bottom:3px solid transparent}
  .store-more summary::-webkit-details-marker{display:none}
  .store-more summary::after{content:"▾";margin-left:6px}
  .store-more[open] summary{color:var(--brand)}
  .store-more-panel{position:absolute;top:100%;left:0;z-index:30;display:grid;min-width:220px;padding:6px;
    background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--sh-2)}
  .store-more-panel .store-tab{border-bottom:0;text-transform:none;letter-spacing:0;font-size:14px;
    padding:9px 12px;border-radius:8px;max-width:none}
  .store-more-panel .store-tab:hover{background:var(--bg)}
}
@media (min-width:860px){.store-banner{height:min(25vw,480px,45vh)}}
/* A small laptop has room for two category tabs; the 3rd and 4th go under More. */
@media (min-width:860px) and (max-width:1179px){
  .store-tab-wide{display:none}
  .store-more:has(.is-current) summary{color:var(--brand-ink);border-bottom-color:var(--brand)}
}
@media (min-width:1180px){
  .store-tab-mid,.store-more-mid{display:none}
  .store-more:has(.is-current:not(.store-tab-mid)) summary{color:var(--brand-ink);border-bottom-color:var(--brand)}
}

/* The promo picture. On a phone it is a card: the whole picture (uncropped,
   unless it is very tall), then the words on the plum ink below it. On a
   computer the words sit on the picture, over a shade of the plum ink at 86%
   that fades away from them (white on it is 12:1 even over a white photo). */
.store-promo{position:relative;display:block;overflow:hidden;isolation:isolate;margin:0 0 28px;color:#fff;
  border-radius:var(--r-lg);background:#1e1238}
.store-promo img{display:block;width:100%;height:auto;max-height:110vw;object-fit:cover}
.store-promo-words{display:grid;gap:14px;justify-items:start;padding:16px 18px 18px}
.store-promo-title{font-size:24px;font-weight:800;line-height:1.15;max-width:22ch;overflow-wrap:anywhere;
  text-shadow:0 1px 2px rgba(15,8,30,.35)}
.store-promo-button{display:inline-block;background:#fff;color:var(--brand-ink);font-weight:700;font-size:15px;
  padding:10px 18px;border-radius:10px}
.store-promo:hover{text-decoration:none}
.store-promo:hover .store-promo-button{background:var(--brand-tint)}
@media (min-width:860px){
  /* 5:2 as a least height, so a long headline makes it taller rather than being
     cut off (and not aspect-ratio with max-height, which narrowed it). */
  .store-promo{display:flex;align-items:center;min-height:calc((min(100vw, var(--wrap)) - 32px) * .4)}
  .store-promo img{position:absolute;inset:0;width:100%;height:100%;max-height:none;z-index:-2}
  .store-promo::after{content:"";position:absolute;inset:0;z-index:-1;
    background:linear-gradient(90deg,rgba(30,18,56,.86) 0,rgba(30,18,56,.86) 42%,rgba(30,18,56,0) 72%)}
  .store-promo-words{width:44%;padding:32px 40px}
  .store-promo-title{font-size:36px}
}

.store-body{padding-top:24px}
.store-list-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-bottom:14px}
.store-list-head h2{margin:0;font-size:20px;flex:1 1 auto}
.store-clear{font-size:14px}
.store-sort select{padding:8px 10px;border:1px solid var(--line);border-radius:8px;font:inherit;font-size:14px;background:#fff}
.store-section{margin-top:36px}
.store-section:first-child{margin-top:0}
.store-section h2{margin-bottom:8px}
.store-about .spec-list{max-width:560px;margin-top:14px}

/* The shop editor */
.shop-edit-banner{width:100%;height:auto;max-height:240px;object-fit:contain;border-radius:var(--r);display:block;background:var(--brand-900)}
.shop-edit-logo{width:96px;height:96px;border-radius:18px;object-fit:contain;border:1px solid var(--line);background:#fff;display:block}
.shop-edit-promo{width:100%;max-width:520px;aspect-ratio:12/5;object-fit:cover;border-radius:var(--r);display:block}

.shop-contact{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:12px;font-size:13.5px}

.shop-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;margin-top:14px}
.shop-gallery figure{margin:0}
.shop-gallery img{width:100%;height:150px;object-fit:cover;border-radius:var(--r);display:block}
.shop-gallery figcaption{font-size:12.5px;color:var(--muted);margin-top:5px}

.shop-gallery-edit{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;margin-top:10px}
.shop-gallery-edit figure{margin:0}
.shop-gallery-edit img{width:100%;height:110px;object-fit:cover;border-radius:var(--r-sm);display:block}
.shop-gallery-edit figcaption{font-size:12px;color:var(--muted);margin:4px 0}

.menu-section{
  font-size:19px;margin:26px 0 10px;padding-bottom:7px;border-bottom:2px solid var(--brand-line);
  color:var(--ink)
}

/* A card with its own button under it: the whole card is a link, so the
   button cannot live inside it — nesting a form in an anchor is invalid and
   browsers resolve it by dropping one of them. */
.card-wrap{display:flex;flex-direction:column}
.card-wrap .card{flex:1}
.card-order{margin-top:8px}
.card-order .btn{width:100%}


/* ------------------------------------------------- banners, jobs, boosts */
.banner-edit-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:12px}
.swatch{width:26px;height:26px;border-radius:7px;flex:none;border:1px solid rgba(0,0,0,.08)}
.swatch-blue{background:var(--grad-deep)}
.swatch-amber{background:linear-gradient(115deg,#d83a2a,#d6337f)}
.swatch-green{background:linear-gradient(115deg,#7436e6,#3f5ff0)}
.swatch-plum{background:linear-gradient(115deg,#d6337f,#7436e6)}

/* A salary is words, not a figure, so it must not inherit the tabular, heavy
   treatment a price gets — "Negotiable" set in price type reads as a number. */
.card-salary,.price-salary{font-size:17px;letter-spacing:0}
.price-salary{font-size:22px}
.job-fields{background:var(--brand-tint);border-color:var(--brand-line)}
.job-fields h2{font-size:17px;margin-bottom:4px}

/* The one line that turns a boost from a guess into a repeat purchase. */
.boost-effect{
  margin:8px 0 0;padding:9px 12px;border-radius:9px;background:var(--brand-tint);
  color:var(--brand-ink);font-size:13px;font-weight:500
}
/* How to pay a top-up by hand: one box per way, so a long account number
   wraps inside its own box instead of running into the next line. */
.pay-ways{list-style:none;padding:0;margin:4px 0 16px;display:grid;gap:8px}
.pay-ways li{display:flex;flex-direction:column;gap:2px;border:1px solid var(--brand-line);
  background:var(--brand-tint);border-radius:10px;padding:10px 12px;font-size:14px;overflow-wrap:anywhere}
.pay-ways strong{color:var(--brand-ink)}
.plan-panel .plan-live{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:0}
.cat-row-grandchild{padding-left:26px;opacity:.94}
.cat-row-grandchild .cat-branch{opacity:.55;letter-spacing:-3px}


/* --------------------------------------------- posting: pick a category first */
.pick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:20px}
@media (min-width:700px){.pick-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.pick-tile{
  display:flex;flex-direction:column;gap:6px;padding:16px 15px;border:1px solid var(--line);
  border-radius:14px;background:#fff;transition:border-color .15s,box-shadow .15s,transform .15s
}
.pick-tile:hover{border-color:var(--brand);box-shadow:0 6px 18px rgba(74,31,160,.10);transform:translateY(-1px)}
.pick-icon{display:flex;width:38px;height:38px;border-radius:10px;background:var(--brand-tint);
  align-items:center;justify-content:center;color:var(--brand-ink)}
.pick-icon svg{width:21px;height:21px}
.pick-name{font-weight:600;font-size:15.5px;color:var(--ink)}
.pick-sub{font-size:12.5px;color:var(--muted);line-height:1.35}

.sell-head{display:flex;align-items:center;gap:13px;margin:6px 0 18px}
.sell-head-icon{display:flex;width:44px;height:44px;border-radius:12px;background:var(--brand-tint);
  align-items:center;justify-content:center;color:var(--brand-ink);flex:none}
.sell-head-icon svg{width:24px;height:24px}

/* The per-category questions wrap rather than squeezing four boxes onto a row. */
.field-row-wrap{flex-wrap:wrap}
.field-attr{min-width:180px;flex:1 1 180px}
.toolbar-attrs{margin-top:-6px;background:var(--brand-tint);border-color:var(--brand-line)}
.toolbar-label{font-weight:600;font-size:13.5px;color:var(--brand-ink);align-self:center}
.strip{position:relative}
.strip-close{
  position:absolute;right:10px;top:50%;transform:translateY(-50%);border:0;background:none;
  font-size:21px;line-height:1;cursor:pointer;color:inherit;opacity:.5;padding:4px 8px
}
.strip-close:hover{opacity:1}
.field-block .cat-row{align-items:flex-start}

/* The moment after posting — the one time a seller is certainly looking. */
.just-posted{
  background:var(--brand-tint);border:1px solid var(--brand-line);border-radius:12px;
  padding:14px 15px;margin-bottom:14px
}
.just-posted strong{display:block;color:var(--brand-ink);font-size:15px;margin-bottom:4px}
.just-posted p{font-size:13.5px;color:var(--ink-2);margin:0 0 11px}
.just-posted .row{flex-wrap:wrap}

/* ------------------------------------------------------- Pandilila Check */
.check-offer{
  background:linear-gradient(160deg,var(--brand-tint),#fff);border:1px solid var(--brand-line);
  border-radius:13px;padding:15px;margin-bottom:14px
}
.check-offer-head{display:flex;align-items:center;gap:8px;color:var(--brand-ink);margin-bottom:6px}
.check-offer-head strong{font-size:15px}
.check-offer p{font-size:13.5px;color:var(--ink-2);margin:0 0 12px}
.check-offer .btn{width:100%;justify-content:center}
.check-offer-note{font-size:12px;color:var(--muted);margin:10px 0 0!important}

.check-item{display:flex;align-items:center;gap:14px}
.check-truth{background:#fbfbfd}
.check-list{margin:0;padding-left:18px;font-size:14px;line-height:1.65;color:var(--ink-2)}
.check-list li{margin-bottom:7px}
.check-list strong{color:var(--ink)}

.report-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.report-when{font-size:13px;margin:4px 0 12px}
.verdict-as_described{background:#e6f6ec;color:#12683a;border-color:#bfe6cd}
.verdict-minor_issues{background:var(--accent-tint);color:var(--accent-ink)}
.verdict-not_as_described{background:var(--red-50);color:var(--red-ink)}
.verdict-could_not_check{background:#eceff0;color:var(--muted)}

/* ------------------------------------------------------------- ID checks */
.tag-optional{background:var(--brand-tint);color:var(--brand-ink)}
.tag-passed{background:var(--brand-tint);color:var(--brand-ink)}
.tag-failed{background:var(--red-50);color:var(--red-ink)}
.tag-cancelled,.tag-requested{background:var(--line-2);color:var(--ink-2)}
.tag-scheduled{background:var(--accent-tint);color:var(--accent-ink)}

/* What the check gets you. The tick is the brand colour, not green: the
   badge it leads to is cobalt, and the two should read as the same thing. */
.perks{list-style:none;margin:14px 0 4px;padding:0;display:grid;gap:11px}
.perks li{display:flex;gap:10px;align-items:flex-start;font-size:14.5px;color:var(--ink)}
.perk-tick{
  flex:none;display:flex;width:24px;height:24px;border-radius:50%;background:var(--brand-tint);
  color:var(--brand);align-items:center;justify-content:center;margin-top:1px
}
.perk-detail{display:block;font-size:13.5px;color:var(--muted);margin-top:1px;font-weight:400}
.perks-compact{gap:7px;margin:10px 0}
.perks-compact li{font-size:14px;align-items:center}
.perks-compact .perk-tick{width:20px;height:20px}
.perks-compact .perk-tick svg{width:13px;height:13px}
.perks-center{display:flex;justify-content:center;text-align:left;margin-bottom:16px}

/* Kept / not kept, side by side where there is room. */
.kept-grid{display:grid;gap:12px;margin-top:6px}
@media (min-width:640px){.kept-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.kept{border-radius:var(--r);padding:14px 15px;border:1px solid var(--line)}
.kept h3{font-size:14px;margin:0 0 8px}
.kept ul{margin:0;padding-left:18px;font-size:13.5px;color:var(--ink-2)}
.kept li{margin-bottom:5px}
.kept-yes{background:var(--brand-tint);border-color:var(--brand-line)}
.kept-yes h3{color:var(--brand-ink)}
.kept-no{background:var(--surface)}

/* Video call or face to face: two big targets rather than a dropdown. */
.method-pick{border:0;padding:0;margin:0 0 6px;display:grid;gap:10px}
@media (min-width:640px){.method-pick{grid-template-columns:repeat(2,minmax(0,1fr))}}
.method-card{
  display:flex;gap:11px;align-items:flex-start;padding:14px;border:1px solid var(--line);
  border-radius:12px;background:var(--surface);cursor:pointer;transition:border-color .15s,box-shadow .15s
}
.method-card:hover{border-color:var(--brand-line)}
.method-card:has(input:checked){border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-tint)}
.method-card input{margin-top:3px;accent-color:var(--brand);width:17px;height:17px;flex:none}
.method-body{display:flex;flex-direction:column;gap:2px}
.method-body strong{font-size:15px;color:var(--ink)}
.method-where{font-size:12.5px;font-weight:600;color:var(--brand-ink)}
.method-blurb{font-size:13px;color:var(--muted);line-height:1.4}

.booked-when{font-size:20px;font-weight:700;color:var(--brand-ink);margin:6px 0 4px}
.plain-list{margin:0 0 6px;padding-left:18px;font-size:14px;color:var(--ink-2)}
.plain-list li{margin-bottom:4px}
.upload-route summary{cursor:pointer;list-style:revert}

/* A nudge beside a seller who has not done the check, and a quiet line
   under a seller who has. */
.seller-note{margin:8px 0 0;font-size:12.5px;line-height:1.45;color:var(--muted)}
.seller-note-ok{color:var(--brand-ink)}
.id-nudge{
  margin-top:14px;padding:12px 14px;border-radius:12px;border:1px dashed var(--brand-line);
  background:var(--surface);font-size:13.5px;color:var(--ink-2)
}
.id-nudge > strong{color:var(--brand-ink)}

/* The staff screen. */
.idc-rules{background:var(--accent-tint);border:1px solid var(--accent-line);border-radius:var(--r);
  padding:13px 15px;font-size:13.5px;color:var(--accent-ink);margin:10px 0 16px}
.idc-rules strong{display:block;margin-bottom:4px}
.idc-rules ul{margin:0;padding-left:18px}
.idc-card{margin-top:14px}
.idc-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;flex-wrap:wrap}
.idc-head h2{margin:0 0 3px;font-size:18px}
.idc-meta{margin:0;font-size:13px;color:var(--muted)}
.idc-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;align-items:flex-end}
.idc-actions .field{margin:0}
.idc-actions input[type=datetime-local],.idc-actions input[type=text]{
  height:36px;padding:0 10px;border:1px solid var(--line);border-radius:9px;background:var(--surface);
  font:inherit;font-size:13.5px;color:var(--ink)
}
.idc-actions input[type=text]{width:260px;min-width:0}
.idc-actions input:focus{outline:2px solid var(--brand-tint);border-color:var(--brand)}
.idc-record{margin-top:12px;border-top:1px solid var(--line);padding-top:12px}
.idc-record summary{cursor:pointer;font-weight:600;color:var(--brand-ink)}
.idc-ticks{display:grid;gap:7px;margin:12px 0}
.idc-ticks .check{font-size:13.5px}
.idc-find{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-end}
.idc-find .field{margin:0;flex:1 1 220px}

/* --------------------------------------------------- stolen-phone register */
.imei-tip{
  margin-top:14px;padding:12px 14px;border-radius:12px;background:var(--accent-tint);
  border:1px solid var(--accent-line);font-size:13.5px;color:var(--accent-ink);line-height:1.5
}
.imei-tip a{display:inline-block;margin-top:4px;font-weight:600}
.imei-check-form{display:flex;gap:8px;margin:14px 0 4px;flex-wrap:wrap}
.imei-check-form input{
  flex:1 1 220px;padding:12px 14px;border:1px solid var(--line);border-radius:var(--r-sm);
  font-size:18px;letter-spacing:.06em;font-family:inherit
}
.check-result{margin-top:16px;padding:16px 18px;border-radius:var(--r);border:1px solid}
.check-result h2{margin:0 0 6px;font-size:19px}
.check-result p{margin:0 0 8px;font-size:14.5px}
.check-result p:last-child{margin-bottom:0}
.check-ok{background:var(--brand-tint);border-color:var(--brand-line);color:var(--brand-ink)}
.check-bad{background:var(--red-50);border-color:var(--red-line);color:var(--red-ink)}

/* ------------------------------------------------------------- scam flags */
.flag-list{list-style:none;margin:6px 0 10px;padding:0;display:grid;gap:6px}
.flag-list li{padding:8px 11px;border-radius:9px;font-size:13.5px;border:1px solid}
.flag-list li span{display:block;font-size:12.5px;opacity:.9;margin-top:2px}
.flag-hold{background:var(--red-50);border-color:var(--red-line);color:var(--red-ink)}
.flag-note{background:var(--accent-tint);border-color:var(--accent-line);color:var(--accent-ink)}

/* ---------------------------------------------------------------- sharing */
.share-row{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 14px}
.btn-share{background:var(--brand);color:#fff;border-color:var(--brand)}
.btn-share:hover{background:var(--brand-ink);border-color:var(--brand-ink);color:#fff}
.btn-share svg{margin-right:2px}
.share-own{
  background:var(--surface);border:1px dashed var(--brand-line);border-radius:12px;
  padding:13px 14px;margin-bottom:14px
}
.share-own strong{display:block;color:var(--brand-ink);font-size:15px;margin-bottom:3px}
.share-own p{font-size:13px;color:var(--muted);margin:0}
.share-own .share-row{margin-bottom:0}

/* --------------------------------------------------------- saved searches */
.save-search{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:-4px 0 14px;font-size:13.5px}
.save-search-done{color:var(--brand-ink);font-weight:600}
.saved-list{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:10px}
.saved-list li{
  display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;
  padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface)
}
.saved-list li.is-paused{opacity:.65}
.saved-main{display:flex;flex-direction:column;gap:3px;min-width:0}
.saved-label{font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.saved-main .muted{font-size:12.5px}

/* ---------------------------------------------------------- sell it for me */
.mfs-card{margin-top:14px}
.mfs-state{margin-top:14px;font-size:14.5px;color:var(--ink-2)}
.mfs-state p{margin:0 0 8px}
.mfs-terms{
  white-space:pre-wrap;font:inherit;font-size:13.5px;line-height:1.55;color:var(--ink-2);
  background:var(--bg);border:1px solid var(--line);border-radius:var(--r);padding:12px 14px;margin:8px 0 0;
  overflow-wrap:anywhere
}
.mfs-more{margin-top:12px;border-top:1px solid var(--line-2);padding-top:10px}
.mfs-more summary{cursor:pointer;font-weight:600;color:var(--brand-ink);font-size:14px}
.mfs-receipt{
  margin-top:10px;background:var(--brand-tint);border:1px solid var(--brand-line);border-radius:var(--r);
  padding:11px 13px;font-size:13.5px;color:var(--brand-ink)
}
.mfs-receipt .muted{color:var(--brand-ink);opacity:.85}
.mfs-cost{
  background:var(--accent-tint);border:1px solid var(--accent-line);border-radius:var(--r);
  padding:12px 14px;color:var(--accent-ink);font-size:14px
}
.mfs-cost p{margin:4px 0 0}
.mfs-cost .muted{color:var(--accent-ink);opacity:.9}
.mfs-terms-box{
  background:var(--bg);border:1px solid var(--line);border-radius:var(--r);padding:12px 14px;
  margin:4px 0 14px;font-size:13.5px;color:var(--ink-2)
}
.mfs-terms-box ul{margin:6px 0 0;padding-left:18px}
.mfs-terms-box li{margin-bottom:4px}

/* the box on our own ads */
.mfs-box{
  background:var(--brand-tint);border:1px solid var(--brand-line);border-radius:12px;
  padding:13px 14px;margin:4px 0 14px;font-size:13.5px;color:var(--ink-2)
}
.mfs-box-head{display:flex;align-items:center;gap:8px;color:var(--brand-ink);margin-bottom:6px}
.mfs-box-head strong{font-size:15px}
.mfs-box p{margin:0 0 6px}
.mfs-box-note{white-space:pre-wrap;background:var(--surface);border-radius:var(--r-sm);padding:8px 10px;color:var(--ink)}
.mfs-box-inc{color:var(--muted)}
.mfs-box-rule{font-weight:600;color:var(--brand-ink);margin:8px 0 0!important}
.mfs-box-staff{background:var(--accent-tint);border-color:var(--accent-line);color:var(--accent-ink)}
.mfs-box-staff p{margin:4px 0 8px;font-size:13px}
.mfs-nudge{font-size:13.5px;color:var(--muted);margin:10px 0 12px}
.mfs-row-note{font-size:13px;margin:6px 0 0;color:var(--brand-ink)}
.mfs-row-nudge{font-size:13px;margin:6px 0 0;color:var(--muted)}
.card-managed{
  display:inline-block;font-size:11.5px;font-weight:700;color:var(--brand-ink);background:var(--brand-tint);
  border-radius:6px;padding:2px 7px;margin:2px 0 4px
}

/* our side */
.mfs-stats .stat .n{font-size:22px}
@media (min-width:860px){.mfs-stats{grid-template-columns:repeat(4,minmax(0,1fr))}}
.mfs-setup summary,#start summary{cursor:pointer}
.mfs-form{margin-top:12px;border-top:1px solid var(--line);padding-top:12px}
.mfs-form-head{font-weight:700;color:var(--ink);margin:0 0 10px}
.mfs-form-head .muted{font-weight:400;font-size:13px}
.mfs-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:0 12px}
.mfs-grid .field{margin-bottom:12px}
.mfs-inline{
  width:100%;padding:9px 12px;border:1px solid var(--line);border-radius:var(--r-sm);
  font:inherit;font-size:14px;margin-top:6px;background:var(--surface);color:var(--ink)
}
.mfs-inline:focus{outline:2px solid var(--brand-tint);border-color:var(--brand)}
/* A long check note reads better left to right than pushed against the edge. */
.mfs-admin .spec-list li{justify-content:flex-start}
.mfs-admin .spec-list .k{flex:0 0 104px}
.mfs-admin .spec-list .v{text-align:left;font-weight:500;overflow-wrap:anywhere;min-width:0}

/* =======================================================  alerts and feedback
   25 Oct. Every action should answer back: posted, saved, not posted and why.
   Everything here works without JavaScript too: without it, messages sit at
   the top of the page as they always did, and the server's box of problems
   still lists what is missing. */

/* ---- toasts: the messages a page arrives with (posted, saved, not saved).
   The class "js" is set in <head>, so they are laid out as toasts from the
   first frame instead of jumping there once the script runs. */
.js .flashes{
  position:fixed;z-index:90;top:12px;left:50%;transform:translateX(-50%);
  width:min(560px,calc(100% - 24px));max-width:none;margin:0;padding:0;
  display:grid;gap:8px;pointer-events:none
}
.js .flashes .flash{
  pointer-events:auto;position:relative;overflow:hidden;
  display:flex;align-items:flex-start;gap:10px;padding:12px 10px 12px 12px;
  border-radius:14px;font-size:14.5px;line-height:1.45;
  box-shadow:0 12px 32px rgba(16,20,40,.16),0 2px 6px rgba(16,20,40,.06);
  animation:toast-in .38s cubic-bezier(.2,.9,.3,1.15) both
}
.js .flashes .flash::before{
  content:"i";flex:none;display:grid;place-items:center;width:22px;height:22px;margin-top:-1px;
  border-radius:50%;background:var(--accent);color:#fff;font-weight:800;font-size:13px;line-height:1
}
.js .flashes .flash-success::before{content:"✓";background:var(--brand)}
.js .flashes .flash-error::before{content:"!";background:var(--red)}
.js .flashes .flash.is-leaving{animation:toast-out .26s ease forwards}
.toast-x{
  flex:none;margin:-4px -2px -4px auto;width:30px;height:30px;border:0;border-radius:8px;
  background:none;color:inherit;opacity:.55;font-size:20px;line-height:1;cursor:pointer
}
.toast-x:hover,.toast-x:focus-visible{opacity:1;background:rgba(16,20,40,.06)}
.toast-timer{position:absolute;left:0;bottom:0;height:3px;width:100%;background:currentColor;opacity:.22;
  transform-origin:left;animation:toast-timer 6s linear forwards}
.flash:hover .toast-timer,.flash:focus-within .toast-timer{animation-play-state:paused}
@keyframes toast-in{from{opacity:0;transform:translateY(-14px) scale(.97)}to{opacity:1;transform:none}}
@keyframes toast-out{to{opacity:0;transform:translateY(-10px) scale(.97)}}
@keyframes toast-timer{from{transform:scaleX(1)}to{transform:scaleX(0)}}

/* ---- the box at the top of a form that came back, or was stopped before
   sending: what was not done, and a link to each thing to fix. */
.form-problems{
  margin:0 0 16px;padding:14px 16px 12px;border:1px solid var(--red-line);border-left:4px solid var(--red);
  border-radius:var(--r);background:var(--red-50);color:var(--red-ink);box-shadow:var(--sh-1);
  animation:fp-in .45s ease both
}
/* Focus is moved here so a screen reader reads it out; the ring only shows for the keyboard. */
.form-problems:focus{outline:none}
.form-problems:focus-visible{outline:2px solid var(--red);outline-offset:2px}
.fp-title{display:flex;align-items:center;gap:9px;margin:0 0 3px;font-size:16px;font-weight:800}
.fp-title::before{
  content:"!";flex:none;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;
  background:var(--red);color:#fff;font-size:13px;line-height:1
}
.fp-lead{margin:0 0 6px 31px;font-size:13.5px}
.form-problems ul{margin:0 0 0 31px;padding-left:16px;font-size:14px}
.form-problems li{margin:3px 0}
.form-problems a{color:var(--red-ink);font-weight:700;text-decoration:underline;text-underline-offset:2px}
.fp-after{margin:8px 0 0 31px;font-size:13px;font-weight:600}
@keyframes fp-in{
  0%{opacity:0;transform:translateY(-6px)}
  45%{opacity:1;transform:translateX(5px)}
  65%{transform:translateX(-4px)}
  85%{transform:translateX(2px)}
  100%{transform:none}
}

/* ---- a field with a problem, from the server or from the check before
   sending. :has() needs no extra markup; .is-invalid is set by app.js. */
.field:has(.err) > label,.field.is-invalid > label{color:var(--red-ink)}
.field:has(.err) input:not([type=checkbox]):not([type=radio]),.field:has(.err) select,.field:has(.err) textarea,
.field.is-invalid input:not([type=checkbox]):not([type=radio]),.field.is-invalid select,.field.is-invalid textarea{
  border-color:var(--red);background:#fffafa
}
.field.is-flash{animation:field-flash 1.2s ease}
@keyframes field-flash{0%,100%{box-shadow:none}25%{box-shadow:0 0 0 6px var(--brand-tint)}}
.field{border-radius:var(--r-sm);transition:box-shadow .3s}

/* ---- "Ready to post?" — what is done and what is still missing. */
.ready-list{
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
  padding:14px 16px;box-shadow:var(--sh-1);transition:border-color .3s,background .3s
}
.ready-list.is-ready{border-color:var(--brand-line);background:var(--brand-tint)}
.ready-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.ready-head strong{font-size:15px;color:var(--ink)}
.ready-count{font-size:13px;color:var(--muted)}
.ready-list.is-ready .ready-count{color:var(--brand-ink);font-weight:700}
.ready-bar{height:6px;border-radius:99px;background:var(--line-2);margin:9px 0 11px;overflow:hidden}
.ready-bar span{display:block;height:100%;width:0;border-radius:inherit;background:var(--grad-btn);transition:width .4s ease}
.ready-items{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:7px 16px}
.ready-items a{display:flex;align-items:center;gap:8px;font-size:13.5px;color:var(--muted);text-decoration:none}
.ready-items a::before{
  content:"";flex:none;width:18px;height:18px;border-radius:50%;border:2px solid #c9cedd;background:#fff;
  transition:background-color .2s,border-color .2s
}
.ready-items a:hover{color:var(--ink)}
.ready-items .is-done a{color:var(--ink-2)}
.ready-items .is-done a::before{
  border-color:var(--brand);
  background:var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.6-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
  animation:tick-pop .3s ease
}
@keyframes tick-pop{0%{transform:scale(.6)}70%{transform:scale(1.18)}100%{transform:scale(1)}}

/* ---- a button that has been pressed and is waiting on the server. */
.btn.is-busy{opacity:.88}
.btn.is-busy::before{
  content:"";flex:none;width:16px;height:16px;border-radius:50%;
  border:2px solid currentColor;border-right-color:transparent;animation:spin .7s linear infinite
}
.btn.is-nudged{animation:nudge .4s ease}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes nudge{20%{transform:translateX(-6px)}40%{transform:translateX(6px)}60%{transform:translateX(-4px)}80%{transform:translateX(3px)}}
.busy-note{margin:0;font-size:13px;color:var(--muted);text-align:center}

/* ---- the feel of the thing: things react when touched. */
.btn{transition:background .15s,border-color .15s,box-shadow .2s,transform .08s,opacity .15s}
.btn-primary:hover{box-shadow:0 6px 18px rgba(116,54,230,.28)}
.btn-ghost:hover{box-shadow:var(--sh-1)}
.btn:active{transform:translateY(1px) scale(.985)}
.btn:focus-visible{outline:3px solid var(--brand-line);outline-offset:2px}
.card{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.card:hover{transform:translateY(-2px)}
.card:active{transform:translateY(0) scale(.995)}
.field input,.field select,.field textarea{transition:border-color .15s,box-shadow .15s,background-color .15s}
.field input:focus,.field select:focus,.field textarea:focus{box-shadow:0 0 0 4px var(--brand-tint)}
.chip{transition:background .15s,border-color .15s,color .15s,transform .08s}
.chip:active{transform:scale(.97)}
/* Clear of the sticky header when the page scrolls a box or a field into view.
   app.js measures the header, which is taller on a phone (two rows). */
.form-problems,.field{scroll-margin-top:calc(var(--header-h,110px) + 14px)}

/* On a laptop the form's foot is a row of buttons: the checklist and the
   "sending" note each take a whole row above them instead of squeezing in. */
@media (min-width:560px){
  .form-foot{flex-wrap:wrap}
  .form-foot .ready-list,.form-foot .busy-note{flex:1 1 100%}
}

/* ======================================================  fitting a phone (26 Oct)
   A page must never be wider than the phone it is on. When it is, the browser
   zooms the whole page out to fit, and everything turns tiny. Two things did it:

   1. Long words: a pasted link, a serial number, a title typed without spaces.
      They now wrap. "break-word" everywhere only breaks a word that would
      otherwise stick out; "anywhere" on the places members type into also lets
      the layout shrink around them.
   2. Grid columns of "1fr", which grow to fit their widest word. They are now
      "minmax(0,1fr)", which never grows past the space there is. */
body{overflow-wrap:break-word}
.card-title,.listing-title,.listing-text,.qa-q,.qa-a,.seller-card,.offer-message,.notif-body,.ml-title{overflow-wrap:anywhere}
.ml-title{min-width:0}
.grid > *,.stack > *,.listing-grid > *{min-width:0}

.listing-title{font-size:19px}
.listing-desc{margin-top:18px}
.listing-text{white-space:pre-wrap}

/* On a phone, the listing in the order a buyer needs it: the photos, then the
   price, title, seller and contact button, then the description, then the
   offer form and the safety notes. On a laptop it stays two columns. The two
   column wrappers step aside (display:contents) so their parts can be ordered
   as one list. */
@media (max-width:859px){
  .listing-grid{gap:16px}
  .listing-left,.listing-grid > .stack{display:contents}
  .listing-desc{margin-top:0;order:1}
  .listing-grid > .stack > :not(.listing-main){order:1}
  .listing-grid .panel + .panel{margin-top:0}
}

/* The smallest phones (320px wide). */
@media (max-width:559px){
  .toolbar-label{grid-column:1 / -1}
  .toolbar-check{white-space:normal;min-width:0}
  .idc-actions .inline-form{display:flex;flex-wrap:wrap;width:100%}
  .idc-actions .inline-form input{flex:1 1 160px}
}
.imei-check-form input{min-width:0}

/* The contact bar at the bottom of a listing on a phone: the price and the one
   thing a buyer came to do, always in reach. Tucked away while the seller's
   own box is on screen (app.js), and never shown on a laptop. */
.buy-bar,.buy-bar-space{display:none}
@media (max-width:859px){
  .buy-bar{
    display:flex;align-items:center;gap:12px;position:fixed;z-index:60;left:0;right:0;bottom:0;
    padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:var(--surface);
    border-top:1px solid var(--line);box-shadow:0 -8px 24px rgba(16,20,40,.10);
    transition:transform .25s ease
  }
  .buy-bar.is-tucked{transform:translateY(110%)}
  .buy-bar-price{min-width:0;flex:1;display:flex;flex-direction:column;line-height:1.3}
  .buy-bar-price strong{font-size:18px;font-weight:800;letter-spacing:-.02em;color:var(--brand);
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .buy-bar-price span{font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .buy-bar form{margin:0;flex:none}
  .buy-bar .btn{white-space:nowrap;padding:12px 16px;flex:none}
  .buy-bar-space{display:block;height:calc(74px + env(safe-area-inset-bottom))}
}

/* Shops you follow */
.follow-list{display:grid;gap:10px}
.follow-row{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-wrap:wrap;margin:0}
.follow-shop{display:flex;align-items:center;gap:12px;color:inherit;min-width:0;flex:1}
.follow-shop:hover{text-decoration:none}
.follow-shop .store-logo{width:52px;height:52px;font-size:21px;border-radius:14px}
.follow-id{display:grid;gap:2px;min-width:0;overflow-wrap:anywhere}
.follow-new{color:var(--brand-ink);font-weight:600}

/* ============================================================ exact locations (030)
   The area, the address and directions, and the pin, on Account, Sell and Edit;
   "Where it is" on an ad and "Find us" on a shop, each with Get directions. */
.loc-label{display:block;font-size:14px;font-weight:600;margin-bottom:5px;color:var(--ink-2)}
.field textarea.loc-addr{min-height:0;height:auto}
.loc-pin-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.loc-pin-row .btn svg,.where-go svg{vertical-align:-2px;margin-right:3px}
.loc-pin-status{font-size:13.5px;color:var(--ink-2)}
.loc-remove{background:none;border:0;padding:0;font:inherit;font-size:13.5px;color:var(--red);
  text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.field label.loc-or{margin-top:12px}
.loc-lead,.loc-public{font-size:12.5px;color:var(--muted);margin:-4px 0 15px}
.loc-more{border:1px solid var(--line);border-radius:var(--r);padding:0 14px;margin:0 0 15px;background:var(--surface)}
.loc-more summary{cursor:pointer;list-style:none;padding:12px 0;font-size:14px;font-weight:600;color:var(--ink-2)}
.loc-more summary::-webkit-details-marker{display:none}
.loc-more summary::before{content:"▸";display:inline-block;width:1.1em;color:var(--muted)}
.loc-more[open] summary::before{content:"▾"}
.loc-more summary .muted{font-weight:400}
.loc-more .loc-public{margin-top:-6px}
.where-box{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);
  padding:13px 15px;margin:14px 0 4px;font-size:14px;color:var(--ink-2)}
.where-head{display:flex;align-items:center;gap:8px;color:var(--brand-ink);margin-bottom:6px}
.where-place{font-weight:600;color:var(--ink);margin:0 0 4px}
.where-addr{margin:0 0 10px;overflow-wrap:anywhere}
.where-box > .btn{margin-top:2px}
.shop-find{max-width:560px;margin-top:18px}
.shop-find .shop-contact{margin-top:6px}

/* ============================================================ words banner (031)
   A shop banner the site draws from a colour, a headline, a line and a font,
   laid out like the front page's. The colours come from banner_palette():
   --sh-bg and --sh-bg2 the sweep, --sh-ink the words (white or black,
   whichever reads at 4.5:1 or better), --sh-shade the colour taken just far
   enough that over a photo, at 85%, the words still read. The fonts are open
   licence (assets/fonts/*-OFL.txt), cut down to Latin letters, 15-29 KB each,
   and only fetched by a page that uses them. */
@font-face{font-family:'Anton';src:url('../fonts/anton.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'DM Serif Display';src:url('../fonts/dm-serif-display.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Pacifico';src:url('../fonts/pacifico.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
.store-hero{position:relative;isolation:isolate;overflow:hidden;color:var(--sh-ink,#fff);
  background:linear-gradient(115deg,var(--sh-bg,#7436e6),var(--sh-bg2,#5629a9));padding:24px 0 44px}
/* A pale colour (white, cream) would melt into the page: a hairline marks where it ends. */
.store-hero.is-light{box-shadow:inset 0 -1px 0 rgba(15,8,30,.1)}
.store-hero-title{margin:0;font-size:26px;line-height:1.12;font-weight:800;letter-spacing:-.01em;max-width:20ch;overflow-wrap:anywhere}
.store-hero-text{margin:8px 0 0;font-size:15px;line-height:1.45;max-width:52ch;overflow-wrap:anywhere}
.font-street .store-hero-title{font-family:'Anton',Impact,'Arial Narrow',sans-serif;font-weight:400;
  text-transform:uppercase;letter-spacing:.01em;font-size:32px;line-height:1.04}
.font-classic .store-hero-title{font-family:'DM Serif Display',Georgia,'Times New Roman',serif;font-weight:400;letter-spacing:0;font-size:30px}
.font-script .store-hero-title{font-family:'Pacifico','Brush Script MT',cursive;font-weight:400;letter-spacing:0;font-size:26px;line-height:1.35}
/* A photo beside the words: a strip across the top on a phone, fading into
   the shade the words sit on; the right-hand side on a computer. */
.store-hero.has-photo{--strip:200px;padding-top:calc(var(--strip) + 14px);background:var(--sh-bg,#7436e6)}
.store-hero-photo{position:absolute;top:0;left:0;width:100%;height:var(--strip);object-fit:cover;z-index:-2;
  -webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 48px),transparent);
          mask-image:linear-gradient(180deg,#000 calc(100% - 48px),transparent)}
.store-hero-shade{position:absolute;inset:0;z-index:-1;background:var(--sh-shade,#3a1b73);opacity:.85;
  -webkit-mask-image:linear-gradient(180deg,rgba(0,0,0,.08) 0,rgba(0,0,0,.08) calc(var(--strip) - 72px),#000 var(--strip));
          mask-image:linear-gradient(180deg,rgba(0,0,0,.08) 0,rgba(0,0,0,.08) calc(var(--strip) - 72px),#000 var(--strip))}
@media (max-width:539px){.store-hero.has-photo{--strip:40vw}}
@media (min-width:860px){
  .store-hero{padding:46px 0 62px;display:grid;align-content:center}
  .store-hero.has-photo{min-height:min(25vw,320px)}
  .store-hero-title{font-size:40px}
  .font-street .store-hero-title{font-size:54px}
  .font-classic .store-hero-title{font-size:46px}
  .font-script .store-hero-title{font-size:40px}
  .store-hero-text{font-size:17px;margin-top:12px}
  .store-hero.has-photo{padding-top:46px}
  .store-hero-photo{height:100%;-webkit-mask-image:none;mask-image:none}
  /* Solid where the words are (they stop by the middle of the page, give or
     take), then fading out so the photo shows on the right. */
  .store-hero-shade{
    -webkit-mask-image:linear-gradient(90deg,#000 0,#000 calc(50% + 120px),rgba(0,0,0,.25) calc(50% + 300px),transparent 100%);
            mask-image:linear-gradient(90deg,#000 0,#000 calc(50% + 120px),rgba(0,0,0,.25) calc(50% + 300px),transparent 100%)}
  .store-hero.has-photo .store-hero-title,.store-hero.has-photo .store-hero-text{max-width:min(52ch,calc(50vw + 80px))}
}

/* The editor: the two kinds, the colours, the fonts, and how each will look. */
.banner-kinds{display:grid;gap:10px;margin:4px 0 16px}
.banner-kind{display:flex;gap:10px;align-items:flex-start;border:1.5px solid var(--line);border-radius:var(--r);
  padding:12px 14px;cursor:pointer;background:var(--surface)}
.banner-kind input{margin-top:3px;accent-color:var(--brand);width:17px;height:17px;flex:none}
.banner-kind strong{display:block;font-size:15px;color:var(--ink)}
.banner-kind small{display:block;font-size:13px;color:var(--muted);margin-top:2px}
.banner-kind:has(input:checked){border-color:var(--brand);background:var(--brand-tint)}
.banner-preview{border-radius:var(--r);overflow:hidden;margin:0 0 14px;border:1px solid var(--line)}
.banner-preview .store-hero{padding:22px 18px 24px}
.banner-preview .store-hero .wrap{padding:0}
.swatches{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.swatch{width:34px;height:34px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px var(--line);cursor:pointer;padding:0}
.swatch[aria-pressed="true"]{box-shadow:0 0 0 2px var(--brand)}
.swatches input[type=color]{width:46px;height:38px;padding:2px;border:1px solid var(--line);border-radius:10px;background:#fff;cursor:pointer}
fieldset.field{border:0;padding:0;margin:0 0 15px;min-width:0}
fieldset.field legend{padding:0}
.font-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.font-choice{position:relative;display:flex;flex-direction:column;gap:2px;border:1.5px solid var(--line);border-radius:var(--r-sm);
  padding:10px 12px;cursor:pointer;background:var(--surface);min-width:0}
.font-choice input{position:absolute;opacity:0;pointer-events:none}
.font-choice:has(input:checked){border-color:var(--brand);background:var(--brand-tint)}
.font-choice:focus-within{outline:2px solid var(--brand-600);outline-offset:1px}
.font-choice .font-sample{display:block;max-width:100%;font-size:22px;line-height:1.25;color:var(--ink);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.font-choice small{font-size:12.5px;color:var(--muted)}
.font-choice.font-street .font-sample{font-family:'Anton',Impact,sans-serif;text-transform:uppercase}
.font-choice.font-classic .font-sample{font-family:'DM Serif Display',Georgia,serif}
.font-choice.font-script .font-sample{font-family:'Pacifico',cursive;font-size:19px}
.font-choice.font-clean .font-sample{font-weight:800}
.crop-previews{display:grid;gap:12px;grid-template-columns:minmax(0,3fr) minmax(0,1.3fr);align-items:end;margin:6px 0 14px}
.crop-preview figcaption{font-size:12.5px;color:var(--muted);margin-top:4px}
.crop-preview div{border-radius:10px;overflow:hidden;background:var(--brand-900)}
.crop-preview img{display:block;width:100%;height:100%;object-fit:cover}
.crop-computer div{aspect-ratio:4/1}
.crop-phone div{aspect-ratio:3/1}
@media (max-width:539px){.crop-previews{grid-template-columns:1fr}.crop-phone{max-width:240px}}


/* ---------------------------------------------- several shops per seller (032)
   A person's profile lists their shops as cards; Account lists them with View
   and Edit; the shop editor switches between them; the Sell form asks which
   shop an ad goes into, or whether it is a usual listing. */
.store-real a{color:inherit;text-decoration:underline;text-decoration-color:var(--line);text-underline-offset:2px}
.store-real a:hover{color:var(--brand-ink)}
.profile-shops{margin-bottom:22px}
.shop-cards{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}
.shop-card{display:flex;align-items:center;gap:12px;padding:12px 14px;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh-1);color:inherit;min-width:0}
.shop-card:hover{text-decoration:none;border-color:var(--brand-line);box-shadow:var(--sh-2)}
.shop-card-logo,.my-shop-logo,.post-to-logo{width:48px;height:48px;border-radius:13px;flex:none;background:var(--brand);
  color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:19px}
img.shop-card-logo,img.my-shop-logo,img.post-to-logo{object-fit:contain;background:#fff;border:1px solid var(--line)}
.shop-card-text,.my-shop-text,.post-to-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.shop-card-text strong,.my-shop-text strong,.post-to-text strong{color:var(--ink);font-size:15px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shop-card-meta,.my-shop-text .muted,.post-to-text small{font-size:13px;color:var(--muted)}

.my-shops{list-style:none;margin:0 0 14px;padding:0;display:grid;gap:10px}
.my-shop{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--line);
  border-radius:var(--r);background:var(--surface);flex-wrap:wrap;min-width:0}
.my-shop-text{flex:1 1 160px;min-width:0}
.my-shop-actions{display:flex;gap:6px;flex:none}
.open-shop{margin-top:4px}
.open-shop .err{display:block}

.shop-switch{display:flex;gap:8px;overflow-x:auto;padding:2px 0 10px;margin:-4px 0 6px;scrollbar-width:thin}
.shop-switch a{flex:none;padding:7px 14px;border-radius:999px;background:#fff;border:1px solid var(--line);
  color:var(--ink-2);font-size:14px;font-weight:500;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shop-switch a:hover{text-decoration:none;border-color:var(--brand-line)}
.shop-switch a.is-current{background:var(--brand-tint);border-color:var(--brand);color:var(--brand-ink);font-weight:600}
.panel-quiet{background:transparent;box-shadow:none;border-style:dashed}

.post-to-choices{display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));margin-top:6px}
.field .post-to-choice{position:relative;display:flex;align-items:center;gap:10px;padding:9px 12px;cursor:pointer;
  border:1.5px solid var(--line);border-radius:var(--r);background:var(--surface);min-width:0;margin:0;
  font-size:inherit;font-weight:400;color:inherit}
.post-to-text small{white-space:normal}
.post-to-choice input{position:absolute;opacity:0;pointer-events:none}
.post-to-choice:has(input:checked){border-color:var(--brand);background:var(--brand-tint)}
.post-to-choice:focus-within{outline:2px solid var(--brand);outline-offset:1px}
.post-to-logo{width:38px;height:38px;border-radius:11px;font-size:16px}
.post-to-usual{background:var(--line-2);color:var(--ink-2)}

.seller-runby{font-size:12.5px;color:var(--muted)}
.seller-runby a{color:inherit;text-decoration:underline;text-decoration-color:var(--line)}
.ml-shop{margin:0 0 4px;font-size:12.5px;font-weight:600;color:var(--brand-ink)}
.order-shop{font-size:13px;color:var(--muted);margin-left:4px}
.menu-panel a.menu-shop{padding-left:22px;font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:280px}
/* Panels opened by a link to their id (#shops, #details, #where…) start below
   the sticky header, and a hint line in a panel reads as a hint. */
.panel[id]{scroll-margin-top:calc(var(--header-h,110px) + 14px)}
.panel > p.hint{font-size:13.5px;color:var(--muted)}

/* ------------------------------------- photos of the place, menus (033)
   Home: the menu as a card and a strip of the place. Tabs: a grid of the
   photos, the menu's pages and its PDF. A tap on any photo opens the viewer. */
.place-top{display:grid;gap:14px;margin:0 0 22px}
.menu-callout{display:flex;align-items:center;gap:14px;padding:14px 16px;background:var(--surface);
  border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--sh-1);color:inherit}
.menu-callout:hover{text-decoration:none;border-color:var(--brand-line);box-shadow:var(--sh-2)}
.menu-callout-icon{flex:none;width:44px;height:44px;border-radius:12px;display:grid;place-items:center;
  background:var(--brand-tint);color:var(--brand-ink)}
.menu-callout-text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.menu-callout-text strong{font-size:16px;color:var(--ink)}
.menu-callout-text span{font-size:13px;color:var(--muted)}
.menu-callout-go{flex:none;font-weight:600;color:var(--brand);font-size:14px}
@media (max-width:479px){.menu-callout-go{display:none}}

.place-strip-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px}
.place-strip-head h2{margin:0;font-size:20px}
.place-strip-head a{font-size:14px;font-weight:600;white-space:nowrap}
.place-strip-row{display:grid;grid-auto-flow:column;grid-auto-columns:46%;gap:10px;overflow-x:auto;
  scroll-snap-type:x mandatory;scrollbar-width:thin;padding-bottom:4px;-webkit-overflow-scrolling:touch}
.place-thumb{display:block;scroll-snap-align:start;border-radius:var(--r);overflow:hidden;background:var(--line-2);aspect-ratio:4/3}
.place-thumb img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s ease}
.place-thumb:hover img{transform:scale(1.03)}
@media (min-width:600px){.place-strip-row{grid-auto-columns:31%}}
@media (min-width:860px){.place-strip-row{grid-auto-flow:row;grid-template-columns:repeat(6,minmax(0,1fr));overflow:visible}}

.place-grid{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:6px}
@media (min-width:600px){.place-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (min-width:1000px){.place-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
.place-cell{margin:0}
.place-cell a{display:block;border-radius:var(--r);overflow:hidden;background:var(--line-2);aspect-ratio:4/3}
.place-cell img{width:100%;height:100%;object-fit:cover;display:block}
.place-cell figcaption{font-size:13px;color:var(--muted);margin-top:6px}

.menu-file{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 14px;margin:0 0 14px;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r)}
.menu-file-icon{flex:none;width:42px;height:42px;border-radius:10px;display:grid;place-items:center;
  background:#fdecec;color:#b42318;font-weight:800;font-size:12px;letter-spacing:.04em}
.menu-file-text{display:flex;flex-direction:column;gap:2px;flex:1;min-width:150px}
.menu-file-text strong{color:var(--ink)}
.menu-pdf{display:none}
@media (min-width:860px){.menu-pdf{display:block;width:100%;height:80vh;min-height:520px;border:1px solid var(--line);
  border-radius:var(--r);background:#fff;margin-bottom:18px}}
.menu-pages{display:grid;gap:18px;max-width:820px}
.menu-page{margin:0}
.menu-page figcaption{font-weight:700;color:var(--ink);margin-bottom:6px}
.menu-page a{display:block;border:1px solid var(--line);border-radius:var(--r);overflow:hidden;background:#fff;cursor:zoom-in}
.menu-page img{display:block;width:100%;height:auto}
.menu-order-note{margin-top:16px;color:var(--ink-2)}
.about-more{display:flex;gap:18px;flex-wrap:wrap;margin-top:18px;font-weight:600}

/* The editor: the photos as a grid of cards, each with its caption, its
   place in the order and Remove, saved together. */
.panel-sub{font-size:16px;margin:18px 0 6px}
.place-locked{padding:10px 12px;border-radius:var(--r-sm);background:var(--brand-tint);color:var(--brand-ink);font-size:14px}
.photo-edit-form{margin-top:10px}
.photo-edit-grid{display:grid;gap:14px 12px;grid-template-columns:repeat(auto-fill,minmax(min(150px,100%),1fr));margin-bottom:12px}
.photo-edit{margin:0;display:flex;flex-direction:column;gap:6px;min-width:0}
.photo-edit img{width:100%;max-width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--r-sm);display:block;background:var(--line-2)}
/* A page of a menu: upright, from the top, so its heading shows. */
.photo-edit-grid.is-pages img{aspect-ratio:3/4;object-position:top}
.photo-edit input[type=text]{width:100%;min-width:0;padding:7px 9px;border:1px solid var(--line);border-radius:var(--r-sm);font:inherit;font-size:13px}
.photo-edit-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 8px;font-size:12.5px;color:var(--ink-2)}
.photo-edit-row label{display:flex;align-items:center;gap:6px;margin:0;font-size:12.5px;font-weight:500;color:var(--ink-2)}
.photo-edit-row input[type=number]{display:inline-block;width:56px;padding:4px 6px;border:1px solid var(--line);border-radius:6px;
  font:inherit;font-size:13px}
.photo-edit-row input[type=checkbox]{width:16px;height:16px;margin:0;accent-color:var(--brand)}
.photo-add{margin-top:12px}
.file-warning{display:block;margin-top:6px;color:var(--red);font-size:13px;font-weight:600}

/* The viewer: one photo at a time over the page, full screen. */
html.viewer-open{overflow:hidden}
.viewer{position:fixed;inset:0;z-index:200;background:rgba(10,8,18,.97);display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;color:#fff;touch-action:pan-y pinch-zoom}
.viewer-bar{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;gap:12px}
.viewer-count{font-size:14px;opacity:.85}
.viewer-close{background:rgba(255,255,255,.12);border:0;color:#fff;width:44px;height:44px;border-radius:50%;
  font-size:26px;line-height:1;cursor:pointer}
/* The photo fits the space between the bar and the caption, whatever its shape:
   the rows are sized by the screen, never by the photo. */
.viewer-stage{position:relative;display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);place-items:center;
  min-height:0;overflow:hidden;padding:0 8px}
.viewer-stage img{max-width:100%;max-height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none}
.viewer-prev,.viewer-next{position:absolute;top:50%;transform:translateY(-50%);width:48px;height:48px;border-radius:50%;
  border:0;background:rgba(255,255,255,.14);color:#fff;font-size:28px;line-height:1;cursor:pointer}
.viewer-prev{left:10px}.viewer-next{right:10px}
.viewer-prev:hover,.viewer-next:hover,.viewer-close:hover{background:rgba(255,255,255,.24)}
.viewer-caption{min-height:44px;padding:10px 16px 16px;text-align:center;font-size:15px}
.viewer button:focus-visible{outline:2px solid #fff;outline-offset:2px}
@media (max-width:599px){.viewer-prev,.viewer-next{width:40px;height:40px;font-size:22px;background:rgba(255,255,255,.1)}}

/* ---------------------------------------------------- paying first (034) */
/* An ad: the seller's word on when the buyer pays. */
.delivery-pay{font-weight:600;color:var(--ink)}
/* The sell form and the shop editor: a choice of three, or two. */
.pay-when legend,.pay-first-choice legend{font-size:14px;font-weight:600;color:var(--ink-2);margin-bottom:6px}
.pay-when label.check,.pay-first-choice label.check{display:flex;font-weight:500;margin-bottom:6px}
/* The order page: where to send the money, and "I have paid". */
.pay-box{border:1.5px solid var(--brand);background:var(--brand-tint)}
.pay-box h2{margin-top:0}
.pay-to{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;margin:0 0 8px}
.pay-to strong{font-size:24px;letter-spacing:.5px;color:var(--ink)}
.pay-to span{font-weight:600;color:var(--ink-2)}
.pay-done{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;margin-top:6px}
.pay-done .field{flex:1 1 220px;margin:0;min-width:0}
.pay-done input{width:100%}
.badge-pay{background:#fff4d6;color:#7a4b00;border-color:#f3d27a}
/* The kitchen's screen: the customer says they paid. */
.pay-said{color:#14663c}

/* ---------------------------------------------------------------- chat (036)
   messages.php: the list of chats beside the open one on a computer; one or
   the other on a phone. The same chats as in the apps. */
.chat-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:16px;
  height:calc(100vh - 190px);min-height:500px}
.chat-list,.chat-thread{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);
  box-shadow:var(--sh-1);min-height:0}
.chat-list{overflow-y:auto;padding:6px}
.chat-list-title{font-size:20px;margin:10px 10px 8px}
.chat-item{display:flex;gap:10px;align-items:center;padding:10px;border-radius:var(--r);color:var(--ink-2)}
.chat-item:hover{background:var(--line-2);text-decoration:none}
.chat-item.is-on{background:var(--brand-tint)}
.chat-thumb{width:48px;height:48px;border-radius:10px;object-fit:cover;flex:none;background:var(--line-2)}
.chat-thumb-empty{display:block}
.chat-item-text{display:flex;flex-direction:column;min-width:0;flex:1;gap:1px}
.chat-item-top{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.chat-item-top strong{color:var(--ink);font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-item-top .muted{font-size:12px;flex:none}
.chat-item-ad,.chat-item-last{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-item-ad{color:var(--muted)}
.chat-item.is-unread .chat-item-last{color:var(--ink);font-weight:600}
.chat-item .pill{flex:none}

.chat-thread{display:flex;flex-direction:column;overflow:hidden;padding:0 0 12px}
.chat-pick{margin:auto;font-size:15px}
.chat-head{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line)}
.chat-head-text{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0;flex:1}
.chat-head-text strong{font-size:16px;color:var(--ink)}
.chat-head-ad{flex-basis:100%;font-size:13px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-back{display:none;font-size:30px;line-height:1;color:var(--ink-2);padding:0 6px 4px 0}
.chat-back:hover{text-decoration:none;color:var(--brand)}
.chat-messages{flex:1;overflow-y:auto;padding:14px 16px;display:flex;flex-direction:column;gap:8px;background:var(--bg)}
.chat-older{align-self:center;font-size:13px;margin-bottom:6px}
.chat-hello{text-align:center;font-size:14px;max-width:420px;margin:24px auto}
.bubble-row{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
.bubble-row.mine{align-items:flex-end}
.bubble{max-width:min(78%,520px);background:var(--surface);border:1px solid var(--line);
  border-radius:16px 16px 16px 4px;padding:8px 12px 6px;color:var(--ink);box-shadow:var(--sh-1)}
.bubble-row.mine .bubble{background:var(--brand);background-image:var(--grad-btn);border-color:transparent;color:#fff;
  border-radius:16px 16px 4px 16px}
.bubble p{margin:0;font-size:15px;line-height:1.45;overflow-wrap:anywhere}
.bubble-photo{display:block;margin:-2px -6px 6px;border-radius:12px;overflow:hidden;background:var(--line-2)}
.bubble-photo img{display:block;max-width:100%;height:auto;max-height:340px;object-fit:cover}
.bubble-time{display:block;font-size:11.5px;color:var(--muted);text-align:right;margin-top:3px}
.bubble-row.mine .bubble-time{color:rgba(255,255,255,.82)}
.chat-warning{max-width:min(78%,520px);margin:0;font-size:13px;line-height:1.4;background:var(--red-50);
  border:1px solid var(--red-line);color:var(--red-ink);border-radius:var(--r-sm);padding:7px 10px}
.chat-compose{display:flex;gap:8px;align-items:flex-end;padding:12px 16px 0;border-top:1px solid var(--line)}
.chat-compose textarea{flex:1;min-height:44px;max-height:160px;resize:vertical;padding:10px 12px;font:inherit;font-size:15px;
  border:1px solid var(--line);border-radius:var(--r);background:#fff;color:var(--ink)}
.chat-compose textarea:focus{outline:2px solid var(--brand-600);outline-offset:0;border-color:transparent}
.chat-compose .btn{flex:none;height:44px}
.chat-attach{flex:none;width:44px;height:44px;display:grid;place-items:center;border:1px solid var(--line);
  border-radius:var(--r);color:var(--ink-2);cursor:pointer;background:#fff;position:relative}
.chat-attach:hover{border-color:var(--brand-600);color:var(--brand)}
.chat-attach input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
.chat-attach:focus-within{outline:2px solid var(--brand-600)}
.chat-file-name{font-size:13px;margin:6px 16px 0}
.chat-report{margin:8px 16px 0;font-size:13px;color:var(--muted)}
.chat-report summary{cursor:pointer;width:max-content}
.chat-report-form{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.chat-report-form select,.chat-report-form input{padding:8px 10px;border:1px solid var(--line);border-radius:var(--r-sm);
  font:inherit;font-size:14px;background:#fff;min-width:0;flex:1 1 180px}
@media (max-width:759px){
  .chat-layout{display:block;height:auto;min-height:0}
  .chat-layout.has-thread .chat-list{display:none}
  .chat-layout:not(.has-thread) .chat-thread{display:none}
  .chat-thread{height:calc(100dvh - 150px);min-height:440px}
  .chat-back{display:block}
  .bubble,.chat-warning{max-width:86%}
}
.bubble-who{display:block;font-size:12px;font-weight:700;color:var(--brand-ink);margin-bottom:2px}
