/* Market Directory theme: Salt & Light Christmas Market (colors + fonts pulled from the printed directory) */
:root {
  --cream: #FBF6EC;
  --cream-2: #F4ECDC;
  --paper: #FFFDF8;
  --red: #B81D28;
  --red-dark: #8E1520;
  --green: #2E5A2C;
  --green-2: #3E7A3A;
  --green-dark: #1E3D1D;
  --gold: #C9A24A;
  --ink: #2A2623;
  --muted: #6E655C;
  --line: #E6DCCB;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(42, 38, 35, .06), 0 8px 24px rgba(42, 38, 35, .08);
  --script: 'Dancing Script', cursive;
  --display: 'Cinzel', Georgia, serif;
  --body: 'Lato', system-ui, -apple-system, Segoe UI, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--body); color: var(--ink); background: var(--cream);
  line-height: 1.5; font-size: 16px; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--green); }
button, input, textarea, select { font: inherit; color: inherit; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(720px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* ---------- Header ---------- */
.site-head { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.site-head::after { /* thin red + green ribbon like the printed piece */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, var(--red) 0 50%, var(--green) 50% 100%);
}
.head-row { display: flex; align-items: center; gap: 16px; padding: 18px 0 22px; }
.host-logo { width: 74px; height: auto; flex: none; }
.head-title { flex: 1; min-width: 0; }
.head-title a { text-decoration: none; color: inherit; }
.script { font-family: var(--script); font-weight: 700; color: var(--red); line-height: 1; }
.head-title .script { font-size: clamp(34px, 6vw, 56px); display: block; }
.kicker { font-family: var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--green); font-size: 13px; font-weight: 600; margin-top: 4px; }
.holly { width: 70px; flex: none; }
.head-row.compact { padding: 12px 0 16px; }
.head-row.compact .host-logo { width: 54px; }
.head-row.compact .script { font-size: 34px; }
.head-row.compact .holly { width: 48px; }
@media (max-width: 520px) {
  .head-row { gap: 12px; padding: 14px 0 18px; }
  .host-logo { width: 58px; }
  .holly { width: 46px; }
  .kicker { font-size: 11px; letter-spacing: .12em; }
  .head-row.compact .host-logo { width: 46px; }
  .head-row.compact .script { font-size: 30px; }
  .head-row.compact .holly { display: none; }
  .hero h1 { font-size: 19px; letter-spacing: .03em; }
  .band h2 { font-size: 16px; letter-spacing: .1em; }
}

/* ---------- Hero ---------- */
.hero { padding: 28px 0 8px; text-align: center; }
.hero h1 { font-family: var(--display); font-size: clamp(20px, 3.4vw, 28px); letter-spacing: .06em; margin: 0 0 6px; color: var(--green-dark); }
.hero p { margin: 0; color: var(--muted); }
.event-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin-top: 12px; font-weight: 700; color: var(--ink); }
.event-meta span { display: inline-flex; align-items: center; gap: 6px; }
.event-meta svg { width: 18px; height: 18px; color: var(--red); }
.tagline-strip { font-family: var(--display); letter-spacing: .14em; font-weight: 700; font-size: 13px; color: var(--green-dark); margin-top: 14px; }
.tagline-strip .heart { color: var(--red); }

/* ---------- Toolbar ---------- */
.toolbar { position: sticky; top: 0; z-index: 20; background: rgba(251, 246, 236, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 12px 0; }
.search { position: relative; }
.search input {
  width: 100%; padding: 13px 16px 13px 44px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font-size: 16px; box-shadow: inset 0 1px 2px rgba(0,0,0,.03);
}
.search input:focus { border-color: var(--green-2); outline: none; box-shadow: 0 0 0 4px rgba(62,122,58,.15); }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); }
.tabs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700;
  font-size: 14px; cursor: pointer; color: var(--muted); white-space: nowrap;
}
.tab[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.tab.fav[aria-pressed="true"] { background: var(--red); border-color: var(--red); }
.tab .count { opacity: .75; font-weight: 400; margin-left: 4px; }

/* ---------- Sections ---------- */
.section { margin: 26px 0 8px; }
.band {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px;
  color: #fff; border-radius: 10px; padding: 10px 16px; margin-bottom: 16px;
}
.band.shop { background: var(--red); }
.band.services { background: var(--green); }
.band.favs { background: linear-gradient(90deg, var(--red), var(--red-dark)); }
.band h2 { font-family: var(--display); letter-spacing: .14em; margin: 0; font-size: 19px; }
.band small { opacity: .9; font-size: 14px; }

/* ---------- Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr 1fr; gap: 12px; } }
.card {
  position: relative; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; border: 1px solid var(--line);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(42,38,35,.06), 0 14px 32px rgba(42,38,35,.12); }
.card > a { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex: 1; }
.thumb { aspect-ratio: 4 / 3; background: var(--cream-2); position: relative; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .logo-only { object-fit: contain; padding: 14%; background: #fff; }
.monogram {
  width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--script); font-weight: 700;
  font-size: 54px; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.12);
}
.monogram.shop { background: radial-gradient(circle at 30% 25%, #d4454f, var(--red) 55%, var(--red-dark)); }
.monogram.services { background: radial-gradient(circle at 30% 25%, #4f8f4a, var(--green) 55%, var(--green-dark)); }
.monogram::before { /* tiny snow dots */
  content: ""; position: absolute; inset: 0; opacity: .25;
  background-image: radial-gradient(#fff 1px, transparent 1.5px); background-size: 18px 18px;
}
.card-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.card h3 { font-size: 16px; line-height: 1.25; margin: 0; padding-right: 30px; }
.card .sub { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--cream-2); color: var(--green-dark); }
.badge.booth { background: #FDEBEC; color: var(--red-dark); }
.heart-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.95); box-shadow: 0 2px 8px rgba(0,0,0,.15); display: grid; place-items: center; cursor: pointer;
  transition: transform .12s ease;
}
.heart-btn:active { transform: scale(.9); }
.heart-btn svg { width: 22px; height: 22px; color: var(--red); }
.heart-btn[aria-pressed="false"] svg path { fill: none; }
.heart-btn[aria-pressed="true"] svg path { fill: currentColor; }
.heart-btn.pop { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.25); } }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); background: var(--paper); border: 1.5px dashed var(--line); border-radius: var(--radius); }
.empty strong { display: block; color: var(--ink); font-size: 18px; margin-bottom: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 12px 20px;
  font-weight: 700; border: 2px solid transparent; cursor: pointer; text-decoration: none; font-size: 15px; line-height: 1.2;
  transition: background .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--green-2); }
.btn-small { padding: 7px 13px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link-btn { background: none; border: none; color: var(--green); font-weight: 700; cursor: pointer; text-decoration: underline; padding: 0; }

/* ---------- Footer ---------- */
.site-foot { margin-top: 48px; background: var(--green-dark); color: #E9E2D2; padding: 30px 0 24px; text-align: center; }
.site-foot .script { color: #fff; font-size: 30px; }
.site-foot p { margin: 6px 0; }
.site-foot a { color: #fff; }
.foot-cta { margin: 14px 0 18px; }
.credit { font-size: 12px; opacity: .65; margin-top: 18px !important; }

/* ---------- Vendor page ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; margin: 18px 0 0; font-weight: 700; text-decoration: none; }
.vhead { display: flex; gap: 18px; align-items: center; margin: 18px 0 8px; }
.vlogo { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; flex: none; background: #fff; box-shadow: var(--shadow); border: 3px solid #fff; }
.vlogo img { width: 100%; height: 100%; object-fit: cover; }
.vlogo .monogram { font-size: 40px; position: relative; }
.vhead h1 { margin: 0; font-size: clamp(24px, 5vw, 34px); line-height: 1.15; }
.vhead .who { color: var(--muted); margin-top: 2px; }
.vactions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 6px; }
.vtagline { font-size: 19px; font-weight: 700; color: var(--green-dark); margin: 16px 0 6px; }
.vbio { white-space: pre-line; font-size: 17px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 18px 0; box-shadow: var(--shadow); }
.panel h2 { font-family: var(--display); font-size: 16px; letter-spacing: .12em; color: var(--green-dark); margin: 0 0 12px; }
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.links a {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line);
  text-decoration: none; color: var(--ink); font-weight: 700; overflow: hidden;
}
.links a:hover { border-color: var(--green-2); }
.links a svg { width: 22px; height: 22px; flex: none; color: var(--red); }
.links a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.gallery button { border: none; padding: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; aspect-ratio: 1; background: var(--cream-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.gallery button:hover img { transform: scale(1.04); }
.claim-note { text-align: center; color: var(--muted); font-size: 14px; margin: 26px 0; }

.lightbox { position: fixed; inset: 0; background: rgba(20, 16, 14, .92); z-index: 50; display: grid; place-items: center; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 86vh; max-width: 100%; border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox button { position: absolute; background: rgba(255,255,255,.14); color: #fff; border: none; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 26px; display: grid; place-items: center; }
.lightbox .close { top: 16px; right: 16px; }
.lightbox .prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox .next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- Forms ---------- */
.card-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin: 28px 0; }
.card-form h1 { font-family: var(--display); color: var(--green-dark); font-size: 24px; letter-spacing: .04em; margin: 0 0 6px; }
.field { margin: 14px 0; }
.field label, .label { display: block; font-weight: 700; margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.field input[type=text], .field input[type=email], .field input[type=url], .field input[type=tel], .field textarea, .field select, input.input {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-size: 16px;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, input.input:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 4px rgba(62,122,58,.15); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
.code-input { font-size: 32px !important; letter-spacing: .5em; text-align: center; font-weight: 700; padding: 14px !important; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); flex: none; }
.msg { padding: 12px 14px; border-radius: 12px; margin: 12px 0; font-weight: 700; }
.msg.error { background: #FDEBEC; color: var(--red-dark); }
.msg.ok { background: #E8F2E6; color: var(--green-dark); }
.msg[hidden] { display: none; }
.counter { font-size: 12px; color: var(--muted); text-align: right; }

.editor-section { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; box-shadow: var(--shadow); }
.editor-section h2 { font-family: var(--display); font-size: 16px; letter-spacing: .12em; color: var(--green-dark); margin: 0 0 4px; }
.editor-section > p { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.logo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.logo-preview { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--cream-2); border: 3px solid #fff; box-shadow: var(--shadow); flex: none; }
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 10px; }
.photo-tile { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--cream-2); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile .tools { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; gap: 6px; justify-content: space-between; }
.photo-tile .tools button { border: none; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 700; cursor: pointer; background: rgba(255,255,255,.95); }
.photo-tile .cover-tag { position: absolute; top: 6px; left: 6px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.add-tile { aspect-ratio: 1; border-radius: 12px; border: 2px dashed var(--line); display: grid; place-items: center; text-align: center; cursor: pointer; color: var(--muted); font-weight: 700; background: #fff; padding: 10px; }
.add-tile:hover { border-color: var(--green-2); color: var(--green); }
.add-tile input { display: none; }
.savebar { position: sticky; bottom: 0; z-index: 15; background: rgba(251,246,236,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 12px 0; }
.savebar .wrap, .savebar .narrow { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.savebar .status { color: var(--muted); font-size: 14px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 0; }
.topbar .who { color: var(--muted); font-size: 14px; }
.extra-link { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-bottom: 8px; }

/* ---------- Admin ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 28px; color: var(--green-dark); }
.stat span { color: var(--muted); font-size: 13px; }
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-family: var(--display); font-size: 12px; letter-spacing: .1em; color: var(--green-dark); background: var(--cream-2); position: sticky; top: 0; }
td input.input { padding: 6px 8px; font-size: 13px; border-radius: 8px; min-width: 200px; }
.pill { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill.yes { background: #E8F2E6; color: var(--green-dark); }
.pill.inv { background: #FFF4DC; color: #7A5A10; }
.pill.no { background: #F1ECE4; color: var(--muted); }
.pill.hid { background: #FDEBEC; color: var(--red-dark); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }

/* ---------- Snow (decorative, off for reduced motion) ---------- */
.snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.snow i { position: absolute; top: -10px; width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .8; box-shadow: 0 0 2px rgba(0,0,0,.08); animation: fall linear infinite; }
@keyframes fall { to { transform: translate3d(var(--drift, 20px), 105vh, 0); } }
@media (prefers-reduced-motion: reduce) { .snow { display: none; } .card, .heart-btn, .gallery img { transition: none; } }
.site-head, main, .toolbar, .site-foot { position: relative; z-index: 1; }
.toolbar { position: sticky; z-index: 20; }

/* ---------- Print (booth sign) ---------- */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
}

/* =========================================================
   Festive layer: string lights, ornaments, gift tags,
   Gift Finder chips, specials, My Market List, Surprise me
   ========================================================= */

/* ---------- String lights ---------- */
.lights { position: absolute; top: 0; left: 0; right: 0; height: 34px; pointer-events: none; z-index: 2; }
.lights .wire { position: absolute; inset: 0 0 auto 0; width: 100%; height: 30px; }
.lights .wire path { fill: none; stroke: #2b3a2a; stroke-width: 2; vector-effect: non-scaling-stroke; }
.bulb {
  position: absolute; top: 11px; width: 10px; height: 15px; margin-left: -5px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  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% { box-shadow: 0 0 10px 3px var(--glow); opacity: 1; }
  50% { box-shadow: 0 0 2px 0 var(--glow); opacity: .55; }
}
.site-head.festive .head-row { padding-top: 40px; }
@media (prefers-reduced-motion: reduce) { .bulb { animation: none; box-shadow: 0 0 6px 2px var(--glow); } }

/* ---------- Ornaments (vendors with no photo yet) ---------- */
.ornament-wrap {
  width: 100%; height: 100%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 50% 120%, rgba(201,162,74,.25), transparent 60%), var(--cream-2);
}
.ornament-wrap::before { /* the hanging string */
  content: ""; position: absolute; top: 0; left: 50%; width: 1.5px; height: 18%; background: var(--gold);
}
.ornament {
  position: relative; width: 46%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; margin-top: 8%;
  box-shadow: inset -8px -10px 18px rgba(0,0,0,.25), inset 8px 8px 16px rgba(255,255,255,.25), 0 6px 14px rgba(0,0,0,.15);
}
.ornament-wrap.shop .ornament { background: radial-gradient(circle at 32% 28%, #e45560, var(--red) 52%, var(--red-dark)); }
.ornament-wrap.services .ornament { background: radial-gradient(circle at 32% 28%, #5da657, var(--green) 52%, var(--green-dark)); }
.ornament::after { /* shine */
  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: 26%; height: 12%;
  background: linear-gradient(90deg, #a8842e, #e7c86e, #a8842e); border-radius: 3px 3px 1px 1px;
}
.ornament .ini { font-family: var(--script); font-weight: 700; color: #fff; font-size: clamp(24px, 9vw, 44px); text-shadow: 0 2px 0 rgba(0,0,0,.18); position: relative; z-index: 1; }
.ornament-wrap.round { background: none; }
.ornament-wrap.round::before { display: none; }
.ornament-wrap.round .ornament { width: 100%; margin: 0; }
.ornament-wrap.round .cap { display: none; }
.ornament-wrap.round .ini { font-size: 38px; }

/* ---------- Gift-tag cards ---------- */
.card::before { /* tag hole */
  content: ""; position: absolute; top: 12px; left: 12px; z-index: 3; width: 14px; height: 14px; border-radius: 50%;
  background: var(--cream); box-shadow: inset 0 1px 2px rgba(0,0,0,.25), 0 0 0 3px rgba(255,255,255,.85);
}
.card::after { /* little twine loop */
  content: ""; position: absolute; top: -10px; left: 7px; z-index: 3; width: 24px; height: 26px; border: 2px solid #b08b4f;
  border-bottom: none; border-radius: 50% 50% 0 0; transform: rotate(-20deg); opacity: .85;
}
.card { overflow: visible; }
.card > a { border-radius: var(--radius); overflow: hidden; }
.thumb .tags-mini { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 4px; }
.thumb .tags-mini span { background: rgba(255,255,255,.92); border-radius: 999px; font-size: 13px; width: 26px; height: 26px; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.ribbon {
  position: absolute; right: -6px; bottom: 12px; z-index: 2; background: var(--red); color: #fff; font-weight: 700; font-size: 12px;
  padding: 5px 12px 5px 10px; border-radius: 4px 0 0 4px; box-shadow: 0 2px 6px rgba(0,0,0,.2); letter-spacing: .02em;
}
.ribbon::after { content: ""; position: absolute; right: 0; bottom: -6px; border: 3px solid var(--red-dark); border-right-color: transparent; border-bottom-color: transparent; }
.special-line { font-size: 13px; font-weight: 700; color: var(--red-dark); display: flex; gap: 6px; align-items: flex-start; }

/* ---------- Gift Finder chips ---------- */
.chips { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1.5px dashed #cdbb98; background: #FFFDF6; border-radius: 10px; padding: 6px 12px; font-size: 14px;
  cursor: pointer; white-space: nowrap; font-weight: 700; color: var(--ink);
}
.chip[aria-pressed="true"] { background: var(--gold); border: 1.5px solid #a8842e; color: #2a1f05; }
.chip.special-chip[aria-pressed="true"] { background: var(--red); border-color: var(--red-dark); color: #fff; }
.chip-label { font-family: var(--display); font-size: 11px; letter-spacing: .14em; color: var(--muted); margin: 10px 0 -4px; font-weight: 700; }

/* ---------- Hero actions ---------- */
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.list-pill { position: relative; }
.list-pill .n { background: #fff; color: var(--red); border-radius: 999px; padding: 0 7px; font-size: 13px; margin-left: 2px; }

/* ---------- My Market List ---------- */
.list-head { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.list-head h2 { font-family: var(--script); color: var(--red); font-size: 34px; margin: 0; line-height: 1.1; }
.progress { height: 12px; border-radius: 999px; background: var(--cream-2); overflow: hidden; margin: 10px 0 6px; }
.progress > span { display: block; height: 100%; background: repeating-linear-gradient(45deg, var(--red) 0 10px, #fff 10px 14px, var(--green) 14px 24px, #fff 24px 28px); transition: width .4s ease; }
.list-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.list-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.list-item.done { opacity: .72; }
.list-item.done .li-name { text-decoration: line-through; text-decoration-color: var(--red); }
.li-thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--cream-2); }
.li-thumb img { width: 100%; height: 100%; object-fit: cover; }
.li-thumb .ornament-wrap .ini { font-size: 18px; }
.li-name { font-weight: 700; color: var(--ink); text-decoration: none; display: block; line-height: 1.25; }
.li-meta { font-size: 13px; color: var(--muted); }
.li-note { width: 100%; margin-top: 6px; border: 1.5px dashed var(--line); border-radius: 10px; padding: 7px 10px; font-size: 15px; background: #fff; }
.li-note:focus { outline: none; border-style: solid; border-color: var(--green-2); }
.li-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.visit-btn { border: 2px solid var(--green); background: #fff; color: var(--green); border-radius: 999px; padding: 6px 10px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.visit-btn[aria-pressed="true"] { background: var(--green); color: #fff; }
.remove-btn { border: none; background: none; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; }
.shared-banner { background: #FFF4DC; border: 1.5px dashed var(--gold); border-radius: 14px; padding: 14px; margin: 16px 0 0; display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.shared-banner strong { display: block; }

/* ---------- Surprise me ---------- */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(30, 24, 20, .6); display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--paper); border-radius: 22px; width: min(380px, 100%); padding: 26px 22px 22px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35); position: relative; }
.modal-card .x { position: absolute; top: 10px; right: 12px; border: none; background: none; font-size: 26px; cursor: pointer; color: var(--muted); }
.big-ornament { width: 150px; height: 170px; margin: 0 auto 8px; transform-origin: 50% 0; }
.big-ornament.shake { animation: swing .9s ease-in-out; }
@keyframes swing { 0% { transform: rotate(0); } 20% { transform: rotate(18deg); } 40% { transform: rotate(-14deg); } 60% { transform: rotate(9deg); } 80% { transform: rotate(-4deg); } 100% { transform: rotate(0); } }
.surprise-result h3 { margin: 6px 0 2px; font-size: 22px; }
.surprise-result p { margin: 0 0 12px; color: var(--muted); }
.surprise-result .actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .big-ornament.shake { animation: none; } }

/* ---------- Editor: gift tag picker ---------- */
.tag-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag-picker label { cursor: pointer; }
.tag-picker input { position: absolute; opacity: 0; pointer-events: none; }
.tag-picker span { display: inline-block; border: 1.5px dashed #cdbb98; background: #FFFDF6; border-radius: 10px; padding: 7px 12px; font-weight: 700; font-size: 14px; }
.tag-picker input:checked + span { background: var(--gold); border: 1.5px solid #a8842e; }
.tag-picker input:focus-visible + span { outline: 3px solid var(--green-2); outline-offset: 2px; }
.vtags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.vtags a { text-decoration: none; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 10px; border: 1.5px dashed #cdbb98; background: #FFFDF6; color: var(--ink); }
.special-box { background: linear-gradient(135deg, #FDEBEC, #FFF6F0); border: 1.5px solid #f3c2c6; border-radius: 14px; padding: 12px 14px; margin: 14px 0; font-weight: 700; color: var(--red-dark); display: flex; gap: 10px; align-items: center; }
.special-box b { font-family: var(--display); letter-spacing: .1em; font-size: 12px; display: block; color: var(--red); }

/* ---------- Vendor search suggestions ---------- */
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; list-style: none; margin: 0; padding: 6px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 16px; box-shadow: 0 14px 34px rgba(42,38,35,.18); max-height: 60vh; overflow-y: auto;
}
.suggest[hidden] { display: none; }
.suggest a { display: block; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.suggest a b { display: block; }
.suggest a small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest li.active a, .suggest a:hover { background: var(--cream-2); }
.suggest .none { padding: 10px 12px; color: var(--muted); font-size: 14px; }
.admin-search { max-width: 360px; margin: 10px 0; }

.big-ornament .ornament-wrap { background: none; }
.mini-tags { font-size: 15px; letter-spacing: 2px; margin-top: 2px; }
@media (max-width: 520px) { .toolbar { position: relative; } }
