/* Event pages, modern look (public/m/*). Every color and font comes from the event's theme:
   functions/_lib/theme.js writes --primary, --accent, --highlight, --bg, --display, --body (and photos) into <head>.
   The classic Salt & Light look is public/assets/style.css and is not affected by this file. */
:root {
  --primary: #24403F; --on-primary: #fff;
  --accent: #E8592A; --on-accent: #fff;
  --highlight: #CFDCD1; --bg: #F5F5F3;
  --title: 'DM Serif Display', Georgia, serif;
  --display: 'DM Serif Display', Georgia, serif;
  --body: 'Figtree', system-ui, sans-serif;
  --ink: color-mix(in srgb, var(--primary) 55%, #141414);
  --muted: color-mix(in srgb, var(--primary) 35%, #7a7a7a);
  --line: color-mix(in srgb, var(--primary) 14%, #fff);
  --tint: color-mix(in srgb, var(--highlight) 28%, #fff);
  --card: #fff;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 20, 20, .05), 0 6px 18px rgba(20, 20, 20, .07);
  --sheet: var(--bg);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); overflow-x: hidden; }
a { color: inherit; }
img { max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
svg { width: 18px; height: 18px; flex: none; }

/* ---------- Blurred photo behind the whole page (theme background_image) ---------- */
.page-bg { display: none; }
html[data-bg] { --sheet: color-mix(in srgb, var(--bg) 86%, transparent); }
html[data-bg] body { background: var(--bg); }
html[data-bg] .page-bg {
  display: block; position: fixed; inset: calc(var(--bg-blur) * -3); z-index: -1;
  background: var(--bg-img) center / cover no-repeat;
  filter: blur(var(--bg-blur)) saturate(1.1);
  will-change: transform; transform: translateZ(0); /* own layer: blurred once, not on every scroll frame */
}
html[data-bg] .page-bg::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 18%, transparent); }
/* No hero photo: the event card turns to tinted glass so the blurred photo shows through. */
html[data-preset="simple"][data-bg]:not([data-hero]) .ev-hero { background: color-mix(in srgb, var(--primary) 84%, transparent); margin-top: 22px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 20px; border-radius: 999px; border: 0; font-weight: 700; font-size: 15px; text-decoration: none; line-height: 1.1; transition: transform .1s, filter .15s; }
.btn:active { transform: scale(.98); }
.btn:hover { filter: brightness(1.06); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-ghost { background: var(--card); color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-small { min-height: 38px; padding: 8px 15px; font-size: 14px; }
.btn .n { background: rgba(255, 255, 255, .95); color: var(--accent); border-radius: 999px; min-width: 24px; padding: 2px 7px; font-size: 13px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; text-decoration: underline; }

/* ---------- Event hero ---------- */
.ev-hero { position: relative; margin: 12px 12px 0; border-radius: 24px; overflow: hidden; min-height: 220px; display: flex; align-items: flex-end;
  background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow); }
html[data-hero] .ev-hero { color: #fff; background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, .35) 55%, rgba(0, 0, 0, .1)), var(--hero-img) center / cover no-repeat, var(--primary); min-height: 290px; }
.ev-hero-inner { position: relative; padding: 22px 20px 20px; width: 100%; }
.ev-logo { display: block; width: 68px; height: 68px; object-fit: contain; background: #fff; border-radius: 18px; padding: 8px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.ev-host { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.ev-name { margin: 0; font: 400 32px/1.06 var(--title); letter-spacing: -.005em; text-wrap: balance; }
.ev-name a { text-decoration: none; }
.ev-when, .ev-where { margin: 8px 0 0; font-weight: 700; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.ev-where { margin-top: 2px; font-weight: 400; opacity: .92; }

/* ---------- Main sheet ---------- */
.ev-main { position: relative; max-width: 1080px; margin: 0 auto; padding: 0 14px; }
html[data-bg] .ev-main { background: var(--sheet); border-radius: 24px; margin: 12px 12px 0; padding-bottom: 10px; }
.ev-intro { text-align: center; padding: 22px 6px 6px; }
.ev-headline { margin: 0; font: 400 25px/1.15 var(--display); color: var(--primary); text-wrap: balance; }
.ev-lede { margin: 8px auto 0; max-width: 34em; color: var(--muted); font-size: 15px; text-wrap: balance; }
.ev-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.ev-links a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--primary); font-size: 14px; font-weight: 700; text-decoration: none; }
.ev-links svg { width: 16px; height: 16px; }

/* ---------- Search, sections, Gift Finder ---------- */
.toolbar { position: sticky; top: 0; z-index: 20; margin: 14px -14px 0; padding: 10px 14px 8px; background: var(--sheet); }
html[data-bg] .toolbar { background: color-mix(in srgb, var(--bg) 97%, transparent); }
html[data-bg] .toolbar { border-radius: 0; }
.search { position: relative; display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 999px; padding: 0 16px; box-shadow: inset 0 0 0 1.5px var(--line), 0 2px 8px rgba(0, 0, 0, .04); color: var(--muted); }
.search:focus-within { box-shadow: inset 0 0 0 2px var(--primary); }
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 13px 0; font-size: 16px; outline: none; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: #fff; border-radius: 16px; box-shadow: 0 12px 32px rgba(0, 0, 0, .16); z-index: 30; max-height: 60vh; overflow: auto; }
.suggest a { display: block; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.suggest li.active a, .suggest a:hover { background: var(--tint); }
.suggest b { display: block; font-size: 15px; }
.suggest small { color: var(--muted); }
.suggest .none { padding: 10px 12px; color: var(--muted); font-size: 14px; }
.tabs, .chips { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; margin: 10px -14px 0; padding: 0 14px 2px; }
.tabs::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.tab, .chip { font-family: var(--body); flex: none; display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 999px; padding: 8px 14px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); font-weight: 700; font-size: 14px; white-space: nowrap; }
.tab .count { font-weight: 400; opacity: .7; }
.tab .count:empty { display: none; }
.tab[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.chips { margin-top: 8px; }
.chip { padding: 6px 12px; font-size: 13px; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--highlight); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--highlight) 70%, #000); color: #1d1d1b; }
.special-chip { color: var(--accent); }

/* ---------- Vendor rows ---------- */
#results { padding: 6px 0 24px; min-height: 40vh; }
.section { margin-top: 18px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 2px 10px; }
.sec-head h2 { margin: 0; font: 400 21px/1.2 var(--display); color: var(--primary); }
.sec-head small { color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; }
.grid { display: grid; gap: 14px; }
.card { position: relative; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .12s; }
.card:hover { transform: translateY(-1px); }
.card > a { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; padding: 16px 56px 16px 16px; text-decoration: none; color: inherit; min-height: 88px; }
.thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--tint); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mono { width: 100%; height: 100%; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font: 400 24px/1 var(--display); letter-spacing: .02em; }
.mono.services { background: color-mix(in srgb, var(--primary) 70%, var(--highlight)); }
.card h3 { margin: 0; font: 400 17.5px/1.25 var(--display); color: var(--primary); }
.card .sub { margin-top: 4px; font-size: 13.5px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card .pills { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.card .tag-pill { display: inline-block; padding: 1px 9px; border-radius: 999px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--muted) 35%, transparent); color: var(--muted); font-size: 12px; line-height: 1.6; white-space: nowrap; }
.card .booth { display: inline-block; line-height: 1.6; padding: 1px 9px; font-weight: 700; border-radius: 999px; background: color-mix(in srgb, var(--primary) 9%, transparent); font-size: 12px; opacity: 1; letter-spacing: .01em; }
.card .special-banner { grid-column: 1 / -1; margin: 2px -40px 0 0; display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: calc(var(--radius) * .6); background: color-mix(in srgb, var(--accent) 8%, var(--card)); color: color-mix(in srgb, var(--accent) 85%, #000); font-size: 13.5px; line-height: 1.35; }
.card .special-banner svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.card .special-banner b { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; opacity: .8; margin-bottom: 1px; }
.heart-btn { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: color-mix(in srgb, var(--accent) 55%, #bbb); display: grid; place-items: center; z-index: 2; }
.heart-btn svg { width: 22px; height: 22px; }
.heart-btn svg path { fill: transparent; }
.heart-btn[aria-pressed="true"] { color: var(--accent); }
.heart-btn[aria-pressed="true"] svg path { fill: currentColor; }
.heart-btn.pop svg { animation: pop .35s ease; }
.card .heart-btn { top: 27px; transform: none; }
.grid { align-items: start; }
.grid.masonry { grid-auto-rows: 1px; row-gap: 0; }
@keyframes pop { 50% { transform: scale(1.3); } }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; margin: 0; }
.empty strong { display: block; color: var(--primary); font: 400 21px/1.3 var(--display); margin-bottom: 4px; }

/* ---------- Shared list banner ---------- */
.shared-banner { margin-top: 16px; text-align: left; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; border-left: 4px solid var(--accent); font-size: 14px; }
.shared-banner strong { display: block; color: var(--primary); }

/* ---------- My Market List ---------- */
.list-head { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 10px; }
.list-head h2 { margin: 0 0 4px; font: 400 26px/1.15 var(--display); color: var(--primary); }
.list-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.progress { height: 10px; background: var(--tint); border-radius: 999px; overflow: hidden; margin: 12px 0 8px; }
.progress span { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width .3s; }
.list-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.list-item { display: grid; grid-template-columns: auto 52px 1fr; gap: 12px; align-items: start; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; margin-bottom: 8px; }
.list-item .visit-btn { width: 30px; height: 30px; margin-top: 11px; border-radius: 8px; border: 2px solid var(--line); background: #fff; padding: 0; display: grid; place-items: center; color: transparent; }
.list-item .visit-btn svg { width: 18px; height: 18px; }
.list-item.done .visit-btn { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.li-thumb { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; display: block; background: var(--tint); }
.li-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.li-name { display: block; font: 400 17px/1.2 var(--display); color: var(--primary); text-decoration: none; }
.list-item.done .li-name { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--primary) 50%, transparent); }
.list-item.done .li-thumb { opacity: .6; }
.li-meta { font-size: 13px; color: var(--muted); margin-top: 1px; }
.li-note { width: 100%; margin-top: 8px; border: 0; border-radius: 10px; padding: 8px 10px; background: color-mix(in srgb, var(--bg) 75%, #fff); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; }
.li-note:focus { outline: 2px solid var(--primary); background: #fff; }
.li-row { display: flex; justify-content: space-between; gap: 8px; align-items: start; }
.remove-btn { border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 600; padding: 2px 0; text-decoration: underline; flex: none; }

/* ---------- Bottom bar ---------- */
.list-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; gap: 8px; justify-content: center; padding: 18px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg) 92%, transparent) 40%); pointer-events: none; }
.list-bar .btn { pointer-events: auto; box-shadow: 0 6px 18px rgba(0, 0, 0, .16); }
.list-bar .list-pill { flex: 1; max-width: 420px; min-height: 52px; font-size: 16px; }
body.on-list .list-bar { display: none; }

/* ---------- Vendor call to action + footer ---------- */
.vendor-cta { text-align: center; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 18px; margin: 8px 0 18px; }
.vendor-cta h2 { margin: 0 0 6px; font: 400 22px/1.2 var(--display); color: var(--primary); }
.vendor-cta p { margin: 6px 0; color: var(--muted); font-size: 14.5px; }
.vendor-cta .small { font-size: 13px; }
.ev-foot { text-align: center; padding: 18px 16px 110px; font-size: 14px; color: var(--ink); }
html[data-bg] .ev-foot p { display: table; margin: 6px auto; padding: 4px 14px; border-radius: 14px; background: var(--sheet); }
.ev-foot p { margin: 4px 0; }
.ev-foot a { color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.ev-foot .credit { font-size: 13px; }
.credit { opacity: .8; }

/* ---------- Surprise Me ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(15, 15, 15, .55); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: min(380px, 100%); background: #fff; border-radius: 22px; padding: 28px 22px 22px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal .x { position: absolute; top: 8px; right: 10px; width: 40px; height: 40px; border: 0; background: none; font-size: 26px; color: var(--muted); }
.big-ornament { width: 120px; height: 120px; margin: 0 auto; border-radius: 24px; overflow: hidden; }
.big-ornament img { width: 100%; height: 100%; object-fit: cover; }
.big-ornament .mono { font-size: 42px; }
.big-ornament.shake { animation: shake .8s ease; }
@keyframes shake { 20% { transform: rotate(-8deg); } 40% { transform: rotate(7deg); } 60% { transform: rotate(-5deg); } 80% { transform: rotate(3deg); } }
.surprise-result h3 { margin: 14px 0 4px; font: 400 24px/1.2 var(--display); color: var(--primary); }
.surprise-result p { margin: 0; color: var(--muted); }
.surprise-result .actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }

/* ---------- Mini header (vendor + about pages) ---------- */
.mini-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--sheet); border-bottom: 3px solid var(--highlight); }
.mini-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.mini-brand img { width: 34px; height: 34px; object-fit: contain; border-radius: 50%; background: #fff; flex: none; }
.mini-brand span { font: 400 18px/1.15 var(--title); color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-back { flex: none; color: var(--accent); font-weight: 700; font-size: 14px; text-decoration: none; }
.narrow { max-width: 640px; }
.sub-page .ev-main { padding-top: 14px; }
html[data-bg] .sub-page .ev-main { padding: 14px 14px 10px; }

/* ---------- Vendor profile ---------- */
.v-photo { position: relative; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: var(--tint); box-shadow: var(--shadow); }
.v-photo button { all: unset; cursor: zoom-in; display: block; width: 100%; height: 100%; }
.v-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v-photo .count { position: absolute; right: 12px; bottom: 12px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.v-photo .mono { font-size: 64px; }
.v-photo.logo-only { aspect-ratio: auto; width: 132px; height: 132px; border-radius: 26px; }
.v-photo.logo-only .mono { font-size: 44px; }
.v-photo.logo-only img { object-fit: cover; }
.v-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.v-thumbs button { all: unset; cursor: zoom-in; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--tint); }
.v-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Vendor header: logo or initials beside the name; photos sit lower down as a small gallery */
.v-head { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: center; }
.v-avatar { width: 84px; height: 84px; border-radius: 20px; overflow: hidden; background: var(--tint); box-shadow: var(--shadow); }
.v-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v-avatar .mono { font-size: 30px; }
.v-avatar .ornament .ini { font-size: 18px; }
.v-head .v-pills { margin-top: 0; }
.v-head .v-name { margin-top: 6px; }
.v-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 640px; }
.v-gallery button { all: unset; cursor: zoom-in; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--tint); box-shadow: var(--shadow); }
.v-gallery button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.v-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.v-gallery button:hover img { transform: scale(1.04); }
@media (min-width: 720px) {
  .v-head { grid-template-columns: 112px 1fr; gap: 22px; }
  .v-avatar { width: 112px; height: 112px; border-radius: 24px; }
  .v-avatar .mono { font-size: 40px; }
  .v-gallery { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}
.v-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pill { display: inline-block; font-size: 12.5px; font-weight: 700; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); border-radius: 999px; padding: 4px 11px; color: var(--primary); }
.v-name { margin: 10px 0 0; font: 400 32px/1.08 var(--display); color: var(--primary); text-wrap: balance; }
.v-who { margin: 4px 0 0; color: var(--muted); }
.v-tagline { margin: 12px 0 0; font-size: 17px; font-weight: 600; color: var(--ink); }
.v-special { margin-top: 16px; background: var(--accent); color: var(--on-accent); border-radius: 14px; padding: 12px 16px; font-size: 15.5px; font-weight: 600; }
.v-special b { display: block; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; opacity: .85; margin-bottom: 2px; }
.v-bio { margin-top: 14px; white-space: pre-line; }
.v-label { margin: 22px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.v-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.v-tags a { font-size: 13.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--tint); text-decoration: none; color: var(--ink); }
.v-links { display: flex; flex-wrap: wrap; gap: 8px; }
.v-links a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--primary); color: var(--primary); font-weight: 700; font-size: 14px; text-decoration: none; background: var(--card); max-width: 100%; }
.v-links a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 22px; }
.v-actions .btn[aria-pressed="true"] { background: var(--card); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.v-actions .btn svg path { fill: transparent; }
.v-actions .btn[aria-pressed="true"] svg path { fill: currentColor; }
/* One small line, signed in or not, so it never competes with the profile */
.manage { margin: 28px 0 6px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; font-size: 13.5px; color: var(--muted); }
.manage a { color: var(--primary); font-weight: 700; }
.manage.mine { color: var(--ink); }
.v-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; color: var(--primary); font-weight: 700; font-size: 14.5px; text-decoration: none; }
.v-back svg { width: 16px; height: 16px; }
.v-back:hover { text-decoration: underline; }

/* ---------- About page ---------- */
.about-hero { text-align: center; padding: 8px 0 4px; }
.about-hero .kicker { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.about-hero h1 { margin: 6px 0 0; font: 400 34px/1.1 var(--display); color: var(--primary); }
.about-hero .tag { margin: 6px 0 0; color: var(--accent); font-weight: 700; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-top: 16px; }
.panel h2 { margin: 0 0 8px; font: 400 22px/1.2 var(--display); color: var(--primary); }
.facts { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.facts li { display: flex; gap: 10px; align-items: flex-start; }
.facts svg { color: var(--accent); margin-top: 3px; }
.facts a { color: var(--accent); font-weight: 700; }
.about-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 16px; }
.stat-link { display: block; text-decoration: none; background: var(--primary); color: var(--on-primary); border-radius: 14px; padding: 14px; text-align: center; }
.stat-link.alt { background: var(--accent); color: var(--on-accent); }
.stat-link b { display: block; font: 400 30px/1.1 var(--display); }
.stat-link span { font-size: 13px; font-weight: 700; }
.host { text-align: center; }
.host-big { width: 110px; height: 110px; object-fit: contain; border-radius: 50%; background: #fff; }
.join { display: grid; gap: 14px; justify-items: center; margin-top: 10px; }
.join-qr { display: flex; gap: 14px; align-items: center; }
.qr-box { width: 112px; height: 112px; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.qr-box svg { width: 100%; height: 100%; display: block; }
.join-qr p { margin: 0; text-align: left; font-weight: 700; font-size: 15px; }
.join-qr small { font-weight: 400; color: var(--muted); word-break: break-all; }
.about-cta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 22px 0 6px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .92); display: grid; place-items: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 8px; }
.lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; line-height: 1; }
.lightbox .close { top: 14px; right: 14px; }
.lightbox .prev { left: 10px; top: 50%; }
.lightbox .next { right: 10px; top: 50%; }

/* ---------- Bigger screens ---------- */
@media (min-width: 720px) {
  .ev-hero { max-width: 1080px; margin: 20px auto 0; min-height: 260px; }
  html[data-hero] .ev-hero { min-height: 340px; }
  .ev-hero-inner { padding: 32px 36px 30px; }
  .ev-name { font-size: 46px; }
  .ev-logo { width: 84px; height: 84px; }
  .ev-headline { font-size: 32px; }
  .ev-lede { max-width: 50em; }
  html[data-bg] .ev-main { margin: 16px auto 0; padding: 0 24px 14px; }
  .toolbar { margin: 18px -24px 0; padding: 12px 24px 10px; }
  .tabs, .chips { margin-left: 0; margin-right: 0; padding: 0 0 2px; flex-wrap: wrap; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 20px 24px; }
  .v-name { font-size: 40px; }
  html[data-bg] .sub-page .ev-main { margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =====================================================================
   Event-type presets (html[data-preset]). Each one gives the header its own
   decorations, type, and texture. The structure below the header stays the same.
   ===================================================================== */
.ev-kicker, .ev-ornament, .deco-top, .ev-intro-when, .ev-intro-where { display: none; }
.ev-intro-when { margin: 10px 0 0; font-weight: 700; font-size: 15px; color: var(--ink); }
.ev-intro-where { margin: 2px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- Shared masthead (every preset except "simple") ---------- */
html:not([data-preset="simple"]) .ev-hero {
  margin: 0; border-radius: 0; min-height: 0; display: block; box-shadow: none; position: relative;
  background: var(--mast-bg, #fff); color: var(--mast-ink, var(--ink));
}
html:not([data-preset="simple"])[data-hero] .ev-hero { min-height: 0; }
html:not([data-preset="simple"]) .ev-hero-inner {
  max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  padding: 42px 16px 22px;
}
html:not([data-preset="simple"]) .ev-logo { width: 64px; height: 64px; margin: 0; border-radius: 16px; padding: 6px; box-shadow: none; }
html:not([data-preset="simple"]) .ev-host { display: none; }
html:not([data-preset="simple"]) .ev-kicker { display: block; margin: 6px 0 0; font: 600 11.5px/1.3 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--mast-kicker, var(--primary)); }
html:not([data-preset="simple"]) .ev-when { margin-top: 8px; font-size: 13.5px; }
html:not([data-preset="simple"]) .ev-where { font-size: 13px; }
html:not([data-preset="simple"]) .ev-when, html:not([data-preset="simple"]) .ev-where { display: block; }
html:not([data-preset="simple"]) .ev-ornament { display: block; width: 60px; height: 46px; background: var(--ornament) center / contain no-repeat; align-self: start; margin-top: 4px; }
html:not([data-preset="simple"]) .ev-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--mast-rule, var(--primary)); }
html:not([data-preset="simple"]) .deco-top { display: block; position: absolute; top: 0; left: 0; right: 0; height: 40px; pointer-events: none; z-index: 2; overflow: hidden; }
.deco-top .wire { position: absolute; inset: 0 0 auto 0; width: 100%; height: 30px; }
.deco-top .wire path { fill: none; stroke: var(--wire, #2b3a2a); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
/* Photo behind the masthead: darkened so the title stays readable */
html:not([data-preset="simple"])[data-hero] .ev-hero { --mast-ink: #fff; --mast-kicker: #fff; background: linear-gradient(to bottom, rgba(0, 0, 0, .45), rgba(0, 0, 0, .7)), var(--hero-img) center / cover no-repeat; }
html:not([data-preset="simple"])[data-hero] .ev-hero-inner { padding-top: 64px; padding-bottom: 28px; }
html:not([data-preset="simple"])[data-hero] .ev-name { color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
html:not([data-preset="simple"]) .mini-head { padding-top: 30px; }
html:not([data-preset="simple"]) .mini-head .deco-top { height: 30px; }
@media (min-width: 720px) {
  html:not([data-preset="simple"]) .ev-hero { margin: 0; max-width: none; }
  html:not([data-preset="simple"]) .ev-hero-inner { padding: 50px 24px 30px; gap: 20px; }
  html:not([data-preset="simple"])[data-hero] .ev-hero-inner { padding: 90px 24px 40px; }
  html:not([data-preset="simple"]) .ev-logo { width: 88px; height: 88px; }
  html:not([data-preset="simple"]) .ev-ornament { width: 84px; height: 60px; }
  html:not([data-preset="simple"]) .ev-kicker { font-size: 13px; }
}

/* ---------- String lights (holiday) ---------- */
.bulb { position: absolute; top: 11px; width: 10px; height: 15px; margin-left: -5px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; box-shadow: 0 0 8px 2px var(--glow); animation: twinkle 2.4s ease-in-out infinite; }
.bulb::before { content: ""; position: absolute; top: -4px; left: 2px; width: 6px; height: 5px; background: #3b3b3b; border-radius: 2px; }
.bulb.r { background: #E8323F; --glow: rgba(232, 50, 63, .75); }
.bulb.g { background: #3FB34F; --glow: rgba(63, 179, 79, .75); }
.bulb.y { background: #F5C542; --glow: rgba(245, 197, 66, .8); }
.bulb.w { background: #FFF6D8; --glow: rgba(255, 240, 190, .9); }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.mini-head .bulb { top: 8px; transform: scale(.8); }

/* ---------- Snow (holiday) ---------- */
.snow { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; contain: strict; }
.snow i { position: absolute; top: -10px; border-radius: 50%; background: #fff; box-shadow: 0 0 2px rgba(0, 0, 0, .12); animation: fall linear infinite; will-change: transform; }
@keyframes fall { to { transform: translate3d(var(--drift, 20px), 105vh, 0); } }

/* ---------- Ornaments (holiday vendors without a logo) ---------- */
.ornament-wrap { width: 100%; height: 100%; display: grid; place-items: center; position: relative; background: radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--highlight) 30%, transparent), transparent 60%), color-mix(in srgb, var(--bg) 85%, var(--highlight)); }
.ornament-wrap::before { content: ""; position: absolute; top: 0; left: 50%; width: 1.5px; height: 18%; background: var(--highlight); }
.ornament { position: relative; width: 52%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; margin-top: 10%; box-shadow: inset -5px -7px 12px rgba(0, 0, 0, .25), inset 5px 5px 10px rgba(255, 255, 255, .25), 0 4px 10px rgba(0, 0, 0, .15); }
.ornament-wrap.shop .ornament { background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent) 52%, color-mix(in srgb, var(--accent) 70%, #000)); }
.ornament-wrap.services .ornament { background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--primary) 70%, #fff), var(--primary) 52%, color-mix(in srgb, var(--primary) 70%, #000)); }
.ornament::after { content: ""; position: absolute; top: 14%; left: 20%; width: 22%; height: 14%; border-radius: 50%; background: rgba(255, 255, 255, .45); transform: rotate(-30deg); }
.ornament .cap { position: absolute; top: -9%; left: 50%; transform: translateX(-50%); width: 28%; height: 12%; background: linear-gradient(90deg, #a8842e, #e7c86e, #a8842e); border-radius: 3px 3px 1px 1px; }
.ornament .ini { font: 700 clamp(16px, 5vw, 22px)/1 var(--title); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .2); position: relative; z-index: 1; }
.v-photo .ornament .ini, .big-ornament .ornament .ini { font-size: 40px; }

/* =========================== Holiday Market =========================== */
html[data-preset="holiday"] {
  --mast-bg: #FFFDF8; --mast-kicker: var(--primary); --wire: #2b3a2a;
  --mast-rule: linear-gradient(90deg, var(--accent) 0 50%, var(--primary) 50% 100%);
  --ornament: url("/assets/holly.svg");
}
html[data-preset="holiday"] .ev-logo { background: transparent; padding: 0; border-radius: 0; }
html[data-preset="holiday"] .ev-name { font: 700 40px/1 var(--title); color: var(--accent); letter-spacing: 0; }
html[data-preset="holiday"] .ev-kicker { font-family: 'Cinzel', Georgia, serif; }
html[data-preset="holiday"] .ev-headline { font-family: 'Cinzel', var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 20px; color: color-mix(in srgb, var(--primary) 80%, #000); }
html[data-preset="holiday"] .sec-head { background: var(--accent); color: var(--on-accent); border-radius: 14px; padding: 12px 16px; align-items: center; box-shadow: var(--shadow); }
html[data-preset="holiday"] .sec-head h2 { font-family: 'Cinzel', var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; font-size: 17px; color: inherit; }
html[data-preset="holiday"] .sec-head small { color: inherit; opacity: .85; }
html[data-preset="holiday"] .card { box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 14px rgba(0, 0, 0, .05), inset 0 0 0 1px color-mix(in srgb, var(--highlight) 30%, #fff); }
html[data-preset="holiday"] .card h3 { font: 700 16.5px/1.3 var(--body); letter-spacing: 0; color: color-mix(in srgb, var(--primary) 88%, #000); }
html[data-preset="holiday"] .thumb { border-radius: 12px; }
.card .ornament-wrap .ornament { width: 40%; margin-top: 12%; }
.card .ornament-wrap::before { height: 22%; }
.card .ornament .ini { font-size: 15px; }
html[data-preset="holiday"] .thumb img { border-radius: 50%; width: 80%; height: 80%; margin: 10%; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--highlight); }
html[data-preset="holiday"] .thumb:has(img) { background: color-mix(in srgb, var(--bg) 85%, var(--highlight)); }
html[data-preset="holiday"] .list-bar .btn-ghost { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 18px rgba(0, 0, 0, .16); }
html[data-preset="holiday"] .mini-head { background: #FFFDF8; border-bottom: 0; box-shadow: 0 4px 0 -1px var(--accent); }
html[data-preset="holiday"] .mini-brand span, html[data-preset="holiday"] .about-hero h1, html[data-preset="holiday"] .v-name { font-family: var(--title); font-weight: 700; color: var(--accent); }
html[data-preset="holiday"] .vendor-cta h2, html[data-preset="holiday"] .list-head h2 { font-family: var(--title); font-weight: 700; color: var(--accent); font-size: 30px; }
@media (min-width: 720px) { html[data-preset="holiday"] .ev-name { font-size: 64px; } html[data-preset="holiday"] .ev-headline { font-size: 26px; } }

/* =========================== Farmers Market =========================== */
html[data-preset="farmers"] {
  --kraft: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .24 0 0 0 0 .12 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  --chalk: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  --mast-bg: var(--kraft) , #D8BE95; --mast-ink: #3A2A1A; --mast-kicker: var(--primary); --wire: #6B4A2B;
  --mast-rule: repeating-linear-gradient(90deg, var(--accent) 0 14px, #FFF8EC 14px 28px);
  --ornament: url("/assets/deco/sprout.svg");
  --card: #FFFCF5;
}
html[data-preset="farmers"] body { background: var(--kraft), var(--bg); }
html[data-preset="farmers"] .ev-hero { background: var(--kraft), #D8BE95; }
html[data-preset="farmers"][data-hero] .ev-hero { background: linear-gradient(to bottom, rgba(40, 28, 14, .35), rgba(40, 28, 14, .72)), var(--hero-img) center / cover no-repeat; }
html[data-preset="farmers"][data-hero] { --mast-kicker: var(--highlight); --wire: #F3E6CF; }
html[data-preset="farmers"] .ev-name { font: 700 34px/1.05 var(--title); color: var(--primary); }
html[data-preset="farmers"] .ev-kicker { font-family: var(--body); }
html[data-preset="farmers"] .ev-headline { font: 700 34px/1.1 'Caveat', cursive; color: var(--accent); transform: rotate(-1.5deg); }
.flag { position: absolute; width: 22px; height: 26px; margin-left: -11px; clip-path: polygon(0 0, 100% 0, 50% 100%); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .08); }
.flag.f0 { background: var(--accent); } .flag.f1 { background: var(--highlight); } .flag.f2 { background: var(--primary); } .flag.f3 { background: #F7F1E3; }
.mini-head .flag { width: 15px; height: 18px; margin-left: -7px; }
/* Chalkboard signs for the sections, in a wood frame */
html[data-preset="farmers"] .sec-head { background: var(--chalk), #2C3A2E; border: 6px solid #9B6B43; border-radius: 8px; padding: 6px 14px 8px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3), 0 3px 8px rgba(0, 0, 0, .15); align-items: center; }
html[data-preset="farmers"] .sec-head h2 { font: 700 28px/1.1 'Caveat', cursive; color: #F5F1E6; }
html[data-preset="farmers"] .sec-head small { font: 700 15px/1 var(--body); color: var(--highlight); }
html[data-preset="farmers"] .card { border-radius: 10px; box-shadow: 0 1px 0 rgba(80, 55, 25, .15), 0 4px 12px rgba(80, 55, 25, .1); }
html[data-preset="farmers"] .card h3 { font-weight: 700; }
html[data-preset="farmers"] .card .booth { display: inline-block; padding: 0 7px; border: 1.5px dashed currentColor; border-radius: 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
html[data-preset="farmers"] .mono { background: var(--kraft), #C9A37A; color: #4A3320; font: 700 26px/1 'Caveat', cursive; box-shadow: inset 0 0 0 3px #C9A37A, inset 0 0 0 4.5px rgba(74, 51, 32, .45); }
html[data-preset="farmers"] .mini-head { background: var(--kraft), #D8BE95; border-bottom: 0; box-shadow: 0 5px 0 -1px var(--accent); }
html[data-preset="farmers"] .list-head h2, html[data-preset="farmers"] .vendor-cta h2 { font: 700 32px/1.1 'Caveat', cursive; color: var(--accent); }
@media (min-width: 720px) { html[data-preset="farmers"] .ev-name { font-size: 52px; } html[data-preset="farmers"] .ev-headline { font-size: 44px; } }

/* ============================ Pop-Up Night ============================ */
html[data-preset="popup"] {
  --ink: #F4EDE6; --muted: #B9AEBF; --card: rgba(255, 255, 255, .055); --line: rgba(226, 189, 122, .24); --tint: rgba(255, 255, 255, .07);
  --sheet: color-mix(in srgb, var(--bg) 94%, transparent);
  --mast-bg: radial-gradient(120% 140% at 50% 0%, color-mix(in srgb, var(--highlight) 55%, var(--bg)), var(--bg) 70%);
  --mast-ink: #F4EDE6; --mast-kicker: var(--primary); --wire: rgba(226, 189, 122, .55);
  --mast-rule: linear-gradient(var(--primary), var(--primary)) top / 100% 1px no-repeat, linear-gradient(var(--primary), var(--primary)) bottom / 100% 1px no-repeat;
  --ornament: url("/assets/deco/sparkle.svg");
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
html[data-preset="popup"] .ev-hero { background: var(--mast-bg); }
html[data-preset="popup"] .ev-hero::after { height: 5px; opacity: .8; }
html[data-preset="popup"] .ev-name { font: italic 500 44px/1 var(--title); color: #FFF7EC; letter-spacing: .005em; }
html[data-preset="popup"] .ev-kicker { font-family: var(--body); letter-spacing: .32em; font-weight: 600; }
html[data-preset="popup"] .ev-logo { background: transparent; box-shadow: 0 0 0 1px var(--line); }
html[data-preset="popup"] .ev-headline { font: italic 500 30px/1.15 var(--display); color: var(--primary); }
.spark { position: absolute; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #FFE7B0; box-shadow: 0 0 6px 2px rgba(255, 220, 150, .75); animation: sparkle 3s ease-in-out infinite; }
@keyframes sparkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .3; transform: scale(.6); } }
html[data-preset="popup"] .sec-head { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
html[data-preset="popup"] .sec-head h2 { font: italic 500 26px/1.1 var(--display); color: var(--primary); }
html[data-preset="popup"] .card { box-shadow: inset 0 0 0 1px var(--line); }
html[data-preset="popup"] .card h3, html[data-preset="popup"] .li-name, html[data-preset="popup"] .v-name, html[data-preset="popup"] .about-hero h1 { font-family: var(--display); font-weight: 600; color: #FFF7EC; }
html[data-preset="popup"] .card h3 { font-size: 20px; }
html[data-preset="popup"] .card .booth, html[data-preset="popup"] .pill { color: var(--primary); }
html[data-preset="popup"] .mono { background: transparent; color: var(--primary); font: italic 600 26px/1 var(--display); border-radius: 50%; box-shadow: inset 0 0 0 1px var(--primary); }
html[data-preset="popup"] .thumb { background: transparent; border-radius: 50%; }
html[data-preset="popup"] .search input, html[data-preset="popup"] .li-note { color: var(--ink); }
html[data-preset="popup"] .li-note { background: rgba(255, 255, 255, .06); }
html[data-preset="popup"] .suggest, html[data-preset="popup"] .modal-card { background: #241B2B; color: var(--ink); }
html[data-preset="popup"] .suggest a { color: var(--ink); }
html[data-preset="popup"] .btn-ghost { color: var(--primary); background: rgba(255, 255, 255, .06); }
html[data-preset="popup"] .list-bar { background: linear-gradient(to bottom, transparent, var(--bg) 45%); }
html[data-preset="popup"] .mini-head { background: var(--bg); border-bottom: 1px solid var(--line); }
html[data-preset="popup"] .mini-brand span { font-style: italic; color: #FFF7EC; }
html[data-preset="popup"] .list-item .visit-btn { background: transparent; border-color: var(--line); }
html[data-preset="popup"] .sec-head h2, html[data-preset="popup"] .list-head h2, html[data-preset="popup"] .vendor-cta h2, html[data-preset="popup"] .panel h2 { color: var(--primary); }
html[data-preset="popup"] .ev-links a, html[data-preset="popup"] .tab, html[data-preset="popup"] .chip { color: var(--ink); }
html[data-preset="popup"] .tab[aria-pressed="true"] { color: var(--on-primary); }
html[data-preset="popup"] .ev-foot a { color: var(--primary); }
@media (min-width: 720px) { html[data-preset="popup"] .ev-name { font-size: 68px; } html[data-preset="popup"] .ev-headline { font-size: 38px; } }

/* =========================== Corporate Expo =========================== */
html[data-preset="expo"] {
  --radius: 10px;
  --mast-bg: var(--primary); --mast-ink: var(--on-primary); --mast-kicker: var(--accent);
  --mast-rule: var(--accent);
  --shadow: 0 1px 2px rgba(15, 30, 60, .06);
}
html[data-preset="expo"] .ev-hero { background: linear-gradient(135deg, rgba(255, 255, 255, .07) 0 25%, transparent 25% 50%, rgba(255, 255, 255, .07) 50% 75%, transparent 75%) 0 0 / 36px 36px, var(--primary); }
html[data-preset="expo"][data-hero] .ev-hero { background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 94%, transparent) 30%, color-mix(in srgb, var(--primary) 55%, transparent)), var(--hero-img) center / cover no-repeat; }
html[data-preset="expo"] .ev-hero-inner { grid-template-columns: auto 1fr; padding-top: 26px; }
html[data-preset="expo"][data-hero] .ev-hero-inner { padding-top: 40px; }
html[data-preset="expo"] .ev-ornament { display: none; }
html[data-preset="expo"] .ev-logo { border-radius: 10px; }
html[data-preset="expo"] .ev-name { font: 700 28px/1.1 var(--title); color: #fff; letter-spacing: -.01em; }
html[data-preset="expo"] .ev-kicker { font-family: var(--body); font-weight: 700; letter-spacing: .16em; }
html[data-preset="expo"] .ev-headline { font: 700 22px/1.2 var(--display); letter-spacing: -.01em; }
html[data-preset="expo"] .sec-head { border-left: 4px solid var(--accent); padding-left: 10px; }
html[data-preset="expo"] .sec-head h2 { font: 700 14px/1.2 var(--display); text-transform: uppercase; letter-spacing: .12em; }
html[data-preset="expo"] .card { box-shadow: inset 0 0 0 1px var(--line); }
html[data-preset="expo"] .card h3 { font: 700 15.5px/1.25 var(--display); }
html[data-preset="expo"] .card .booth { display: inline-block; padding: 1px 8px; border-radius: 4px; background: var(--highlight); color: var(--primary); font-size: 12px; opacity: 1; }
html[data-preset="expo"] .thumb { border-radius: 8px; }
html[data-preset="expo"] .mono { font: 700 22px/1 var(--display); border-radius: 8px; }
html[data-preset="expo"] .tab, html[data-preset="expo"] .chip, html[data-preset="expo"] .btn, html[data-preset="expo"] .search { border-radius: 8px; }
html[data-preset="expo"] .mini-head { background: var(--primary); border-bottom: 3px solid var(--accent); }
html[data-preset="expo"] .mini-brand span { color: #fff; font-weight: 700; }
html[data-preset="expo"] .mini-back { color: #fff; }
@media (min-width: 720px) { html[data-preset="expo"] .ev-name { font-size: 44px; } }

/* Subtitles inherit the masthead colors */
html:not([data-preset="simple"]) .ev-when, html:not([data-preset="simple"]) .ev-where { color: var(--mast-ink, inherit); }
@media (prefers-reduced-motion: reduce) { .snow { display: none; } .bulb, .spark { animation: none; } }
html[data-preset="popup"] body { font-variant-numeric: lining-nums; }

/* Anything marked hidden stays hidden, even buttons and links styled to display. */
[hidden] { display: none !important; }

/* ---------- Phones: a calmer directory landing ----------
   Smaller header with the date and place on one line, a short headline with no extra paragraph,
   Event Page and About as small text links, and the section tabs plus Gift Finder in one scrolling row. */
@media (max-width: 719px) {
  html:not([data-preset="simple"]) .ev-hero-inner { padding: 36px 16px 16px; gap: 12px; }
  html:not([data-preset="simple"])[data-hero] .ev-hero-inner { padding: 50px 16px 18px; }
  html:not([data-preset="simple"]) .ev-logo { width: 52px; height: 52px; }
  html:not([data-preset="simple"]) .ev-ornament { width: 40px; height: 32px; }
  html:not([data-preset="simple"]) .ev-kicker { margin-top: 4px; font-size: 10.5px; }
  html:not([data-preset="simple"]) .ev-hero-inner { grid-template-columns: auto 1fr; position: relative; }
  html:not([data-preset="simple"]) .ev-ornament { position: absolute; top: 34px; right: 12px; margin: 0; }
  html:not([data-preset="simple"])[data-hero] .ev-ornament { top: 46px; }
  html:not([data-preset="simple"]) .ev-name { padding-right: 34px; }
  /* The date and place move down under the headline on phones */
  html:not([data-preset="simple"]) .ev-titles > .ev-when, html:not([data-preset="simple"]) .ev-titles > .ev-where { display: none; }
  html:not([data-preset="simple"]) .ev-intro-when, html:not([data-preset="simple"]) .ev-intro-where { display: block; }
  html[data-preset="holiday"] .ev-name { font-size: 32px; }
  html[data-preset="farmers"] .ev-name { font-size: 28px; }
  html[data-preset="popup"] .ev-name { font-size: 34px; }
  html[data-preset="expo"] .ev-name { font-size: 23px; }
  .ev-intro { padding: 14px 6px 2px; }
  .ev-headline { font-size: 18px; }
  html[data-preset="holiday"] .ev-headline { font-size: 15px; letter-spacing: .05em; }
  html[data-preset="farmers"] .ev-headline { font-size: 26px; }
  html[data-preset="popup"] .ev-headline { font-size: 22px; }
  .ev-lede { display: none; }
  .ev-links { gap: 4px 16px; margin-top: 6px; }
  .ev-links a { padding: 2px 0; background: none; box-shadow: none; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
  .ev-links svg { width: 14px; height: 14px; }
  html[data-bg] .ev-main { margin-top: 8px; }
  .filters { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; margin: 10px -14px 0; padding: 0 14px 2px; align-items: center; }
  .filters::-webkit-scrollbar { display: none; }
  .filters { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .filters .tabs, .filters .chips { display: contents; }
  .filters .chips::before { content: ""; flex: none; width: 1.5px; height: 22px; background: var(--line); margin: 0 3px; }
}

/* ---------- Vendor tiles: picture on top, three across on desktop ----------
   Two across on phones, three across from tablets up. Every tile in a row is the same height. */
.grid:has(> .tile) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
@media (min-width: 720px) { .grid:has(> .tile) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
.card.tile { display: flex; flex-direction: column; overflow: hidden; }
.card.tile:hover { transform: translateY(-2px); }
.card.tile > a { display: flex; flex-direction: column; align-items: stretch; flex: 1; padding: 0; min-height: 0; gap: 0; }
.card.tile .thumb { width: 100%; height: auto; aspect-ratio: 2 / 1; border-radius: 0; }
.card.tile .thumb > img { object-fit: contain; padding: 8%; background: #fff; }
.card.tile .thumb .mono { font-size: clamp(30px, 9vw, 46px); }
.card.tile .ornament-wrap .ornament { width: 27%; margin-top: 7%; }
.card.tile .ornament-wrap::before { height: 22%; }
.card.tile .ornament .ini { font-size: clamp(20px, 6vw, 30px); }
.card.tile .ornament-wrap.logo-orn .ornament { width: 36%; background: #fff; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--highlight), 0 8px 18px rgba(0, 0, 0, .16); }
.card.tile .ornament-wrap.logo-orn .ornament::after { display: none; }
.card.tile .ornament-wrap.logo-orn .ornament img { width: 100%; height: 100%; margin: 0; object-fit: cover; border-radius: 50%; box-shadow: none; }
.card.tile .ornament-wrap.logo-orn .cap { top: -11%; z-index: 1; }
.card.tile .special-strip { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .03em; }
.card.tile .special-strip svg { width: 13px; height: 13px; flex: none; }
.card.tile .tile-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card.tile h3 { padding-right: 0; }
.card.tile .sub { -webkit-line-clamp: 2; margin-top: 2px; }
.card.tile .pills { margin-top: 8px; gap: 6px; }
@media (min-width: 720px) { .grid:has(> .tile) { gap: 22px; } .card.tile .tile-body { padding: 14px 18px 18px; } .card.tile h3 { font-size: 18px; } }
.card.tile .tag-pill:not(.more) { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.card.tile .special-line { margin-top: 6px; font-size: 13px; font-weight: 700; line-height: 1.35; color: color-mix(in srgb, var(--accent) 85%, #000); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card.tile .heart-btn { top: 8px; right: 8px; width: 40px; height: 40px; background: color-mix(in srgb, var(--card) 92%, transparent); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.card.tile .heart-btn svg { width: 20px; height: 20px; }
@media (max-width: 719px) {
  .card.tile .tile-body { padding: 10px 11px 12px; }
  .card.tile h3 { font-size: 15px; }
  .card.tile .sub { font-size: 13px; }
  .card.tile .heart-btn { top: 6px; right: 6px; width: 36px; height: 36px; }
}
/* Phones show one tag and a count; wider screens show up to three */
.card.tile .tag-pill.phone-only { display: none; }
@media (max-width: 719px) {
  .card.tile .tag-pill.extra, .card.tile .tag-pill.wide-only { display: none; }
  .card.tile .tag-pill.phone-only { display: inline-block; }
}

/* Holiday bulb colors (steady per vendor, decorative only) */
.card.tile .ornament-wrap.b-red .ornament { background: radial-gradient(circle at 32% 28%, #e0545e, #b81f2c 52%, #7d1019); }
.card.tile .ornament-wrap.b-green .ornament { background: radial-gradient(circle at 32% 28%, #5f9a6a, #2b6339 52%, #173d22); }
.card.tile .ornament-wrap.b-gold .ornament { background: radial-gradient(circle at 32% 28%, #f3d98a, #c9992f 52%, #8a6416); }
.card.tile .ornament-wrap.b-blue .ornament { background: radial-gradient(circle at 32% 28%, #8fb0d4, #44709f 52%, #274a70); }
.card.tile .ornament-wrap.b-gold .ornament .ini { text-shadow: 0 1px 2px rgba(90, 60, 0, .45); }

/* Glisten: a soft light sweep across the bulb and a small sparkle */
.card.tile .glint { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; pointer-events: none; z-index: 2; }
.card.tile .glint i { position: absolute; top: -20%; left: 0; width: 38%; height: 140%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent); transform: translateX(-160%) rotate(20deg); opacity: 0; }
.card.tile .sparkle { position: absolute; top: 4%; right: -2%; width: 26%; height: 26%; fill: #fff; filter: drop-shadow(0 0 4px rgba(255, 240, 200, .9)); transform: scale(0) rotate(0deg); opacity: 0; z-index: 3; pointer-events: none; }
.card.tile .ornament.glisten .glint i { animation: glint-sweep 1.1s ease-in-out; }
.card.tile .ornament.glisten .sparkle { animation: sparkle-pop 1.2s ease-out .35s; }
@keyframes glint-sweep { 0% { opacity: 0; transform: translateX(-160%) rotate(20deg); } 20% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateX(320%) rotate(20deg); } }
@keyframes sparkle-pop { 0% { opacity: 0; transform: scale(0) rotate(0deg); } 35% { opacity: 1; transform: scale(1) rotate(45deg); } 100% { opacity: 0; transform: scale(.3) rotate(90deg); } }
@media (prefers-reduced-motion: reduce) { .card.tile .glint, .card.tile .sparkle { display: none; } }
/* Round monograms (Pop-Up Night) stay circles inside the wide tile picture */
.card.tile .thumb { display: grid; place-items: center; }
html[data-preset="popup"] .card.tile .thumb .mono { width: auto; height: 80%; aspect-ratio: 1; border-radius: 50%; }

/* =========================== Shopper options (functions/_lib/shopper.js) =========================== */
/* Keep Shopping (after the market): online links under each tile, and the next market date. */
.tile-shop { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px; }
.tile-shop a { font-size: 12.5px; font-weight: 700; padding: 7px 11px; border-radius: 999px; text-decoration: none;
  background: color-mix(in srgb, var(--primary) 9%, var(--card)); color: var(--primary); }
.tile-shop a:first-child { background: var(--primary); color: var(--on-primary); }
.li-shop { padding: 6px 0 2px; }
.list-item.ks { grid-template-columns: 52px 1fr; }
.next-market { display: inline-block; text-align: left; margin: 12px auto 4px; padding: 12px 18px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.next-market span { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.next-market b { display: block; font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--primary); line-height: 1.25; }

/* Happening Today (market day) */
.today-banner { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; margin: 12px auto 2px; padding: 9px 16px; border-radius: 999px;
  background: var(--primary); color: var(--on-primary); font-size: 14px; }
.today-banner b { letter-spacing: .04em; }
.today-banner span:not(.live-dot) { opacity: .9; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); animation: live-dot 1.6s ease-in-out infinite; }
@keyframes live-dot { 50% { opacity: .35; } }

/* My Market List: Walk in Booth Order */
.list-order { display: inline-flex; margin-top: 12px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line); overflow: hidden; max-width: 100%; }
.list-order button { border: 0; background: none; font: 700 13px/1.2 var(--body); padding: 9px 14px; color: var(--primary); cursor: pointer; }
.list-order button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }

/* Booth QR welcome on a vendor page */
.qr-welcome { margin: 4px 0 18px; padding: 18px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow), inset 0 0 0 2px var(--primary); animation: qr-in .3s ease-out; }
.qr-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.qr-welcome h2 { margin: 4px 0 6px; font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.15; color: var(--primary); }
.qr-welcome p { margin: 0 0 12px; font-size: 15px; }
.qr-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.qr-welcome .qr-small { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
@keyframes qr-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qr-welcome, .live-dot { animation: none; } }

/* Accepts (payments) */
.v-pays { margin: 16px 0 0; }
.v-pays b { display: block; margin-bottom: 8px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.v-pays ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.v-pays li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 9px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--primary); font-size: 14px; font-weight: 700; }
.v-pays svg { width: 20px; height: 20px; flex: none; }

/* ---------- "Save to your home screen" tip (assets/install-nudge.js), shown once after the first saved vendor ---------- */
.inst-tip {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60;
  max-width: 440px; margin: 0 auto; display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 40px 14px 14px; border-radius: 16px; background: #fff; color: #1D1D1B;
  box-shadow: 0 10px 30px rgba(0,0,0,.22), 0 0 0 1px rgba(0,0,0,.05);
  font-family: var(--body); opacity: 0; transform: translateY(16px); transition: opacity .25s ease, transform .25s ease;
}
.inst-tip.show { opacity: 1; transform: none; }
.inst-icon { width: 52px; height: 52px; border-radius: 12px; flex: none; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.inst-body { min-width: 0; }
.inst-title { margin: 0 0 3px; font-weight: 700; font-size: 1rem; line-height: 1.25; color: var(--primary); }
.inst-text, .inst-steps { margin: 0 0 8px; font-size: .9rem; line-height: 1.4; }
.inst-share { display: inline-flex; vertical-align: -3px; color: #0A7AFF; }
.inst-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inst-btn { border: 0; border-radius: 999px; padding: 9px 16px; font: 700 .9rem var(--body); background: var(--primary); color: var(--on-primary); cursor: pointer; }
.inst-later { border: 0; background: none; padding: 9px 4px; font: 600 .9rem var(--body); color: #555; cursor: pointer; }
.inst-x { position: absolute; top: 6px; right: 6px; width: 34px; height: 34px; border: 0; background: none; font-size: 1.4rem; line-height: 1; color: #666; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .inst-tip { transition: none; transform: none; } }
html[data-preset="popup"] .inst-tip { background: #251C2C; color: #F4EEF6; box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.08); }
html[data-preset="popup"] .inst-later, html[data-preset="popup"] .inst-x { color: #CFC4D4; }
html[data-preset="popup"] .inst-share { color: #6FB3FF; }
