/* Gowedy — shared base + components, T15 app style (white, airy, photo-first; colours = tokens.css).
   Components: icon, buttons, chips/category pills, badges, photo card + rails, app header (pill search), phone tab bar,
   form fields, calendar, pick tray, date picker. Page layout lives in each page's own css. */
@import url("fonts.css");
*{box-sizing:border-box;margin:0}
html{-webkit-text-size-adjust:100%}
body{background:var(--paper);color:var(--ink);font:400 16px/1.6 var(--ui);-webkit-font-smoothing:antialiased}
h1,h2,h3,.name,.price{font-family:var(--display);font-weight:600;line-height:1.3}
h1{font-size:26px} h2{font-size:21px} h3{font-size:17px}
@media (min-width:900px){h1{font-size:32px} h2{font-size:24px}}
a{color:var(--ink)}
img{display:block;max-width:100%}
button,select,input{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--ink);outline-offset:2px}
.wrap{max-width:1280px;margin:0 auto;padding:0 var(--gut)}
.muted{color:var(--ink-2);font-size:15px}
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}   /* visually hidden, read by screen readers */
.small{font-size:13px}
[hidden]{display:none!important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* icons: Lucide sprite (P.icon) + 3 own brand marks */
.i,.i-sm{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.i-sm{width:16px;height:16px}
.brand-i{width:18px;height:18px;fill:currentColor;flex:none}

/* buttons: one strong accent; quiet = outline */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 22px;border-radius:12px;
  border:0;font:600 16px/1 var(--ui);cursor:pointer;text-decoration:none;color:var(--on-dark);
  background:linear-gradient(100deg,var(--accent),var(--accent-2))}
.btn svg{width:18px;height:18px;flex:none}
.btn:active{transform:scale(.98)}
.b-line{background:var(--line)} .b-fb{background:var(--fb)} .b-rose{background:linear-gradient(100deg,var(--accent),var(--accent-2))}
.b-danger{background:var(--err)}
.b-quiet{background:var(--surface);color:var(--ink);border:1px solid var(--ink)}
.b-sm{min-height:44px;padding:0 14px;font-size:15px}
.linkish{background:none;border:0;padding:0;color:var(--ink);text-decoration:underline;cursor:pointer;font-weight:600;min-height:44px}

/* chips + category pills (horizontal scroll row) */
.chip{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 16px;border-radius:var(--r-pill);border:1px solid var(--rule);
  background:var(--surface);font-size:15px;white-space:nowrap;cursor:pointer;text-decoration:none;color:inherit}
.chip[aria-pressed=true]{border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink);font-weight:600}
.cats{display:flex;gap:10px;overflow-x:auto;padding:6px var(--gut) 10px;margin:0 calc(-1 * var(--gut));scrollbar-width:none}
.cats::-webkit-scrollbar{display:none}
.cats .chip{box-shadow:var(--shade-sm);border-color:transparent;min-height:44px}
.cats .chip .i{color:var(--ink-2)}
.cats .chip[aria-pressed=true]{box-shadow:inset 0 0 0 1.5px var(--ink)}
.cats .chip[aria-pressed=true] .i{color:var(--accent)}
.stylerow{align-items:center}
.vstyles{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:4px 0}
.vstyles .chip{min-height:32px;padding:0 12px;font-size:14px}
.stylerow-h{flex:none;font-weight:600;font-size:15px;white-space:nowrap}

/* badges */
.badge{display:inline-flex;align-items:center;gap:5px;padding:2px 10px;border-radius:var(--r-pill);font-size:13px;font-weight:500;line-height:1.6;white-space:nowrap}
.badge svg{width:14px;height:14px}
.badge.founding{background:var(--rose-50);color:var(--accent-ink)}
.verified{background:var(--leaf-50);color:var(--ink)}
.verified.special{background:var(--ink);color:var(--on-dark)}
.fresh{background:var(--fresh-bg);color:var(--fresh)} .mid{background:var(--mid-bg);color:var(--mid)}
.old{background:var(--old-bg);color:var(--old)}
.unverified{background:var(--old-bg);color:var(--old)}
.free{background:var(--fresh-bg);color:var(--fresh)}
.dot{width:7px;height:7px;border-radius:50%;background:currentColor;flex:none}
.trend{background:var(--marigold-50);color:var(--marigold-ink)}
.stars{font-size:15px;color:var(--ink-2)} .stars b{color:var(--ink)}
.proof{font-size:13px;color:var(--accent-ink)}

/* photo + placeholder art (shops without photos) */
.card{background:var(--surface);border:1px solid var(--rule);border-radius:var(--r-card)}
.ph{aspect-ratio:4/3;border-radius:12px;position:relative;overflow:hidden;background:var(--soft)}
.ph svg{position:absolute;inset:0;width:100%;height:100%}
img.photo{width:100%;height:100%;object-fit:cover;background:var(--soft)}
.a-gold{fill:var(--art-gold)} .a-leaf{fill:var(--art-leaf)} .a-ink{fill:var(--art-ink)} .a-rose{fill:var(--art-rose)}
.s-gold{stroke:var(--art-gold)}

/* photo card (P.pcard): big rounded photo, ♥ corner, chip on the photo, text under it */
.pc{position:relative;display:grid;gap:8px;min-width:0;align-content:start}
.pc-ph{position:relative;display:block;aspect-ratio:1/1;border-radius:var(--r-card);overflow:hidden;background:var(--soft)}
.pc-ph .ph{position:absolute;inset:0;aspect-ratio:auto;border-radius:0}
.pc.faded .pc-ph{filter:saturate(.35);opacity:.85}
.pc-chip{position:absolute;top:12px;left:12px;display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:var(--r-pill);
  background:var(--glass);color:var(--ink);font-size:13px;font-weight:600;box-shadow:var(--shade-sm)}
.pc-chip .i{width:14px;height:14px}
.fav{position:absolute;top:8px;right:8px;width:44px;height:44px;display:grid;place-items:center;border:0;background:none;cursor:pointer;
  color:var(--on-dark);padding:0}
.fav svg{width:26px;height:26px;fill:var(--fav-fill);stroke:var(--on-dark);stroke-width:2}
.fav[aria-pressed=true] svg{fill:var(--accent)}
.pc-txt{display:grid;gap:1px;min-width:0;font-size:15px;line-height:1.45}
.pc-top{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
.pc-txt .name{font:600 16px/1.4 var(--ui);color:var(--ink);text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pc-txt .name::after{content:"";position:absolute;inset:0;z-index:0}           /* whole card clickable */
.pc .fav,.pc .cmp,.pc-chip{z-index:1}
.pc-rate{display:inline-flex;align-items:center;gap:3px;white-space:nowrap;font-weight:500}
.pc-rate svg{width:13px;height:13px;fill:var(--star);stroke:none}
.pc-sub{color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pc-price b{font-weight:600}
.pc-price small{color:var(--ink-2)}
.pc-badges{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
.pc .cmp{position:relative;justify-self:start}
.dist-km{color:var(--ink);font-weight:500}

/* rails: section head + horizontal scroll row of photo cards */
.rail-sec{margin-top:28px}
.rail-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.rail-head h2{font-size:21px}
.go-all{display:inline-flex;align-items:center;gap:4px;min-height:36px;padding:0 12px;border-radius:var(--r-pill);background:var(--soft);color:var(--ink);font-size:14px;font-weight:600;text-decoration:none;white-space:nowrap;flex:none}
.rail{display:grid;grid-auto-flow:column;grid-auto-columns:68%;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;list-style:none;
  padding:0 var(--gut) 8px;margin:0 calc(-1 * var(--gut));scroll-padding:0 var(--gut);scrollbar-width:none}
.rail::-webkit-scrollbar{display:none}
.rail>li{scroll-snap-align:start;min-width:0;display:grid}
@media (min-width:640px){.rail{grid-auto-columns:40%}}
@media (min-width:900px){
  .rail{grid-auto-columns:calc((100% - 4*18px)/5);gap:18px}         /* % = the row's content box */
  .rail-head h2{font-size:24px}
  .list .rail,.vmain .rail{grid-auto-columns:calc((100% - 2*18px)/3)}
}

/* app header: pill search (mobile = one big pill; desktop = brand · 4-part pill · links) */
.apphead{position:sticky;top:0;z-index:28;background:var(--paper);border-bottom:1px solid transparent}
.apphead.scrolled,.apphead.line{border-bottom-color:var(--rule)}
.apphead-in{display:flex;align-items:center;gap:16px;padding-top:12px;padding-bottom:12px}
.brand{display:inline-flex;flex:none}
.brand img{display:block;width:auto;height:32px}
.pill{flex:1;display:flex;align-items:center;gap:12px;min-height:56px;padding:6px 8px 6px 20px;border-radius:var(--r-pill);border:1px solid var(--rule);
  background:var(--surface);box-shadow:var(--shade);text-decoration:none;color:var(--ink);cursor:pointer;text-align:left;min-width:0}
.pill-txt{display:grid;min-width:0;line-height:1.3;flex:1}
.pill-txt b{font-weight:600}
.pill-txt small{font-size:13px;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pill-seg{display:none}
.pill-lead{width:22px;height:22px}
.pill-go{display:none;place-items:center;width:42px;height:42px;border-radius:50%;flex:none;color:var(--on-dark);background:linear-gradient(100deg,var(--accent),var(--accent-2))}
.pill-go svg{width:18px;height:18px;stroke-width:2.6}
.topnav{display:none}
@media (min-width:900px){
  .brand img{height:30px}
  .pill{flex:0 1 640px;margin:0 auto;padding:6px 6px 6px 8px;gap:0;min-height:60px}
  .pill-txt,.pill-lead{display:none}
  .pill-go{display:grid}
  .pill-seg{display:grid;flex:1;min-width:0;padding:4px 18px;line-height:1.35;border-right:1px solid var(--rule)}
  .pill-seg:nth-last-child(2){border-right:0}
  .pill-seg small{font-size:12px;font-weight:600;color:var(--ink)}
  .pill-seg span{font-size:14px;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .pill-go{width:46px;height:46px;margin-left:4px}
  .topnav{display:flex;align-items:center;gap:2px;white-space:nowrap}
  .topnav a{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;border-radius:var(--r-pill);text-decoration:none;font-size:15px;font-weight:500}
  .topnav a:hover,.topnav a[aria-current=page]{background:var(--soft)}
  .topnav b{font-size:12px;min-width:20px;height:20px;border-radius:10px;display:inline-grid;place-items:center;background:var(--accent);color:var(--on-dark)}
  .topnav b:empty,.topnav b[data-n="0"]{display:none}
}

/* phone bottom tab bar */
.tabbar{position:fixed;z-index:27;left:0;right:0;bottom:0;display:grid;grid-template-columns:repeat(4,1fr);height:calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom:env(safe-area-inset-bottom);background:var(--paper);border-top:1px solid var(--rule)}
.tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:12px;color:var(--ink-2);text-decoration:none}
.tabbar .i{width:24px;height:24px;stroke-width:1.8}
.tabbar a[aria-current=page]{color:var(--accent);font-weight:600}
@media (min-width:900px){.tabbar{display:none}}

/* simple back link (forms, legal) */
.back{font-size:15px;text-decoration:none;min-height:44px;display:inline-flex;align-items:center;gap:6px}

/* our event-system block (accent, once per page) */
.promo{border-radius:var(--r-card);background:var(--rose-50);padding:20px;display:grid;gap:12px}
.promo h3{color:var(--accent-ink);font-size:20px}
.promo.quiet{margin-top:20px;padding:16px;background:var(--soft)}
.promo.quiet h3{font-size:17px;color:var(--ink)}
.b-rose-line{color:var(--accent-ink);border-color:var(--accent-ink);justify-self:start}

/* month calendar (vendor availability + date picker) */
.cal{min-width:0}
.cal-title{font:600 16px/1.4 var(--ui);text-align:center;margin-bottom:6px}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;text-align:center}
.cal-wd{font-size:12px;color:var(--ink-2)}
.cal-d{display:grid;place-items:center;min-height:38px;border-radius:50%;font-size:15px;border:0;background:none;padding:0}
button.cal-d{cursor:pointer}
button.cal-d:hover{box-shadow:inset 0 0 0 1px var(--ink)}
.cal-d.past{color:var(--past)}
.cal-d.open{background:var(--fresh-bg);color:var(--fresh);font-weight:500}
.cal-d.busy{color:var(--past);text-decoration:line-through}
.cal-d.sel{background:var(--ink)!important;color:var(--on-dark)!important;font-weight:600}

/* form fields, close button, sheet head, dialogs */
.fld{display:grid;gap:4px}
.fld small{font-size:13px;color:var(--ink-2)}
.fld select,.fld input{min-height:50px;border:1px solid var(--rule);border-radius:12px;padding:0 14px;background:var(--surface);width:100%}
.fld select:focus,.fld input:focus{border-color:var(--ink)}
.fld select:disabled{opacity:.5}
textarea{font:inherit;border:1px solid var(--rule);border-radius:12px;padding:10px 14px;width:100%}
.sheet-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.x{width:44px;height:44px;border:0;border-radius:50%;background:var(--soft);cursor:pointer;font-size:17px;flex:none;display:grid;place-items:center}
dialog::backdrop{background:var(--scrim)}

/* picked shops tray (search, saved, SEO): compare 2–4 / quote 1–5. .compare-tray = the same tray in the frozen proto/ */
.cmp{display:flex;align-items:center;gap:6px;min-height:40px;font-size:14px;color:var(--ink-2);cursor:pointer}
.cmp input{width:18px;height:18px;accent-color:var(--accent)}
.pick-tray,.compare-tray{position:fixed;left:12px;right:12px;bottom:calc(var(--tab-h) + 12px + env(safe-area-inset-bottom));z-index:26;display:flex;
  justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px 12px;background:var(--surface);border-radius:var(--r-card);
  padding:8px 8px 8px 16px;box-shadow:var(--shade)}
.pick-go{display:flex;gap:8px}
.pick-tray .off{opacity:.45}
body:has(#pickTray:not([hidden]),#compareTray:not([hidden])) .foot{padding-bottom:140px}
@media (min-width:900px){.pick-tray,.compare-tray{left:auto;right:32px;bottom:24px;width:420px}}

/* Thai date picker (static/datepick.js) on every date field */
.datefld{position:relative}
.datebtn{min-height:50px;border:1px solid var(--rule);border-radius:12px;padding:0 14px;background:var(--surface);width:100%;text-align:left;
  cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.datebtn.empty{color:var(--ink-2)}
.datepop{padding:12px;display:grid;gap:8px;margin-top:4px;background:var(--surface)}
.datepop .cal-grid [role=row]{display:contents}
.datepop .cal-d{width:100%;min-height:40px}
.datepop button.cal-d:disabled{background:none;color:var(--past);cursor:default}
.datepop .cal-d.today{box-shadow:inset 0 0 0 1.5px var(--ink)}
.datepop .dp-help{font-size:12px;color:var(--ink-2)}
.cal-nav{display:grid;grid-template-columns:44px 1fr 44px;align-items:start;gap:4px}
.cal-nav .x:disabled{opacity:.3;cursor:default}
@media (min-width:900px){.datepop{position:absolute;top:100%;left:0;z-index:40;width:340px;box-shadow:var(--shade)}}
/* T22 event-system hook (notebook + e-card) */
.evhook{display:grid;grid-template-columns:auto 1fr;gap:10px 12px;align-items:center;padding:14px 16px;border-radius:18px;background:var(--surface);border:1px solid var(--rule)}
.evhook > span .i{color:var(--accent)}
.evhook p{margin:2px 0 0}
.evhook .btn{grid-column:1 / -1;justify-self:start}
.apayline{padding:10px 14px;border-radius:12px;background:var(--marigold-50);color:var(--marigold-ink);font-size:14px;margin:0}
/* empty state picture (T23, graphics.html empty_art) */
.empty-art{display:block;width:120px;height:auto;margin:0 auto 8px;border-radius:24px}
/* founding seats line (T39, parts.html founding_offer): /for-shops hero + shop signup box */
.fo-line{display:flex;gap:8px;align-items:flex-start;margin:10px 0;padding:10px 14px;border-radius:12px;background:var(--marigold-50);color:var(--marigold-ink);line-height:1.45}
.fo-line .i-sm{flex:none;margin-top:4px;color:var(--marigold)}
.fo-line small{display:block;font-weight:400;opacity:.9}
.fo-line.full{background:var(--rose-50);color:var(--ink)}
