/*
 * The Sloan's Lake Art Market — the Shop tab (issue #127; README.md → "The
 * Sloan's Lake Art Market"). Shared by the web app's Shop tab
 * (web/index.html, which supplies the colors below as its own variables)
 * and the iPhone and Android apps' Shop tab (web/market.html, html.market-app,
 * which brings its own), and My Shop's editor on the Members page
 * (.myshop-*). Everything is under .mkt / .myshop, so nothing leaks into the
 * pages around it.
 *
 * The look is an open-air market: pennant bunting over the Market, and every
 * shop a stall with a striped awning in one of six colors (the shop's own,
 * from its address) over its photo.
 */

/* ── Colors when the page brings none (web/market.html) ─────────────── */
html.market-app {
  --brand: #403728;
  --brand-solid: #403728;
  --bg: #f2f2f7;
  --bg-card: #ffffff;
  --bg-bar: rgba(249, 249, 249, 0.88);
  --text: #1c1c1e;
  --text-secondary: #6e6e73;
  --text-tertiary: #b0b0b5;
  --hairline: rgba(60, 60, 67, 0.29);
  --green: #248a3d;
  --red: #d70015;
  --focus: #0260E6;
  --hover-wash: rgba(120, 120, 128, 0.10);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  html.market-app {
    --brand: #d3bd93;
    --bg: #000000;
    --bg-card: #1c1c1e;
    --bg-bar: rgba(22, 22, 24, 0.88);
    --text: #f2f2f7;
    --text-secondary: #98989f;
    --text-tertiary: #56565c;
    --hairline: rgba(84, 84, 88, 0.65);
    --green: #30d158;
    --red: #ff453a;
    --focus: #409cff;
    --hover-wash: rgba(120, 120, 128, 0.18);
  }
}
html.market-app, html.market-app body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
html.market-app * { box-sizing: border-box; }
html.market-app :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ── The Market's own variables ─────────────────────────────────────── */
.mkt, .myshop {
  --mkt-display: var(--title-font, ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif);
  --mkt-cream: #fbf6ec;
  --mkt-radius: 16px;
  --mkt-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.07);
  --mkt-offer: #8a5a00;
  --mkt-offer-bg: #fff4d6;
}
@media (prefers-color-scheme: dark) {
  .mkt, .myshop {
    --mkt-cream: #2b2721;
    --mkt-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    --mkt-offer: #ffd27a;
    --mkt-offer-bg: rgba(255, 196, 77, 0.14);
  }
}
/* The six awnings (a stall, a shop's page, My Shop's card). */
[data-awning="0"] { --awning: #c8465a; }
[data-awning="1"] { --awning: #df9a2e; }
[data-awning="2"] { --awning: #23897d; }
[data-awning="3"] { --awning: #3b68a8; }
[data-awning="4"] { --awning: #855296; }
[data-awning="5"] { --awning: #5f8f45; }

.mkt { color: var(--text); }
/* Resets that every class below outranks (:where() counts for nothing). */
:where(.mkt, .myshop) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:where(.mkt) a { color: var(--brand); }
:where(.mkt) img { max-width: 100%; }
.mkt-col { max-width: 1080px; margin: 0 auto; padding: 0 16px 24px; }
.mkt-hidden { display: none !important; }
.mkt .visually-hidden, .myshop .visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* ── Bunting and the Market's heading ───────────────────────────────── */
.mkt-bunting {
  height: 30px; margin: 0 -16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='30' viewBox='0 0 192 30'%3E%3Cpath d='M0 3.5Q48 10 96 3.5T192 3.5' fill='none' stroke='%23a3906d' stroke-width='1.3'/%3E%3Cpath d='M5 4.6 22 6.6 13.5 25z' fill='%23c8465a'/%3E%3Cpath d='M37 7.2 54 7.8 45.5 27z' fill='%23df9a2e'/%3E%3Cpath d='M69 6.8 86 4.9 77.5 24.5z' fill='%2323897d'/%3E%3Cpath d='M101 4.6 118 6.6 109.5 25z' fill='%233b68a8'/%3E%3Cpath d='M133 7.2 150 7.8 141.5 27z' fill='%23855296'/%3E%3Cpath d='M165 6.8 182 4.9 173.5 24.5z' fill='%235f8f45'/%3E%3C/svg%3E") repeat-x 0 0 / 192px 30px;
  transform-origin: top center;
  animation: mkt-sway 6s ease-in-out infinite alternate;
}
@keyframes mkt-sway { from { transform: rotate(-0.25deg); } to { transform: rotate(0.25deg) translateY(1px); } }
.mkt-hero { text-align: center; padding: 6px 0 4px; }
.mkt-title {
  margin: 6px 0 6px; font-family: var(--mkt-display); font-weight: var(--title-weight, 400);
  font-size: clamp(28px, 7.4vw, 44px); line-height: 1.08; letter-spacing: 0.2px; color: var(--brand);
}
.mkt-intro { margin: 0 auto 14px; max-width: 620px; font-size: 15px; line-height: 1.5; color: var(--text-secondary); }

/* Search and Surprise Me */
.mkt-tools { display: flex; gap: 8px; align-items: center; max-width: 620px; margin: 0 auto 12px; }
.mkt-search { flex: 1; position: relative; }
.mkt-search svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--text-secondary); pointer-events: none; }
.mkt-search input {
  width: 100%; padding: 11px 14px 11px 40px; border-radius: 999px;
  border: 1px solid var(--hairline); background: var(--bg-card); color: var(--text);
  font: inherit; font-size: 16px; -webkit-appearance: none; appearance: none;
}
.mkt-search input::placeholder { color: var(--text-tertiary); }
.mkt-search input:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.mkt-surprise {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px;
  background: var(--brand-solid, var(--brand)); color: #fff !important; font-size: 15px; font-weight: 600; white-space: nowrap;
}
.mkt-surprise svg { width: 17px; height: 17px; }

/* Aisles and filters: chips in a row that scrolls sideways */
.mkt-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 8px; margin: 0 -16px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
}
.mkt-chips::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .mkt-chips { flex-wrap: wrap; justify-content: center; overflow: visible; } }
.mkt-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; scroll-snap-align: start;
  padding: 7px 13px; border-radius: 999px; font-size: 14px; font-weight: 600; white-space: nowrap;
  background: var(--bg-card); color: var(--text) !important; box-shadow: inset 0 0 0 1px var(--hairline);
}
.mkt-chip .mkt-count { font-weight: 500; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.mkt-chip[aria-pressed="true"] { background: var(--brand-solid, var(--brand)); color: #fff !important; box-shadow: none; }
.mkt-chip[aria-pressed="true"] .mkt-count { color: rgba(255, 255, 255, 0.8); }
.mkt-chips.mkt-filters .mkt-chip { font-weight: 500; font-size: 13px; padding: 6px 12px; }
.mkt-chip-icon { font-size: 15px; line-height: 1; }

/* ── The stalls ─────────────────────────────────────────────────────── */
.mkt-grid {
  display: grid; gap: 14px 12px; margin-top: 10px;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
}
@media (min-width: 700px) { .mkt-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px 18px; } }
.mkt-stall {
  position: relative; display: flex; flex-direction: column; text-align: left; text-decoration: none;
  background: var(--bg-card); border-radius: 6px 6px var(--mkt-radius) var(--mkt-radius);
  box-shadow: var(--mkt-shadow); color: var(--text) !important; min-width: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.mkt-awning {
  position: relative; z-index: 1; height: 20px; border-radius: 6px 6px 0 0;
  background: repeating-linear-gradient(90deg, var(--awning) 0 14px, var(--mkt-cream) 14px 28px);
}
.mkt-awning::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 7px;
  background:
    radial-gradient(circle at 7px 0, var(--awning) 7px, transparent 7.5px) 0 0 / 28px 7px repeat-x,
    radial-gradient(circle at 21px 0, var(--mkt-cream) 7px, transparent 7.5px) 0 0 / 28px 7px repeat-x;
}
.mkt-stall-photo {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--mkt-cream);
}
.mkt-stall-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mkt-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 44px; color: var(--awning);
  background: var(--mkt-cream); /* where color-mix() isn't known (Safari before 16.2) */
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.35) 0 18%, transparent 19%),
    linear-gradient(135deg, var(--mkt-cream), color-mix(in srgb, var(--awning) 14%, var(--mkt-cream)));
}
.mkt-placeholder .mkt-initial {
  font-family: var(--mkt-display); font-size: 46px; color: var(--awning); opacity: 0.85;
}
.mkt-stall-logo {
  position: absolute; z-index: 2; left: 10px; bottom: -18px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-card); box-shadow: 0 0 0 3px var(--bg-card), 0 2px 6px rgba(0, 0, 0, 0.2); overflow: hidden;
}
.mkt-stall-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mkt-stall-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.mkt-stall.has-logo .mkt-stall-body { padding-top: 24px; }
.mkt-stall-name { font-size: 16px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.mkt-stall-line {
  font-size: 13.5px; line-height: 1.35; color: var(--text-secondary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mkt-stall-meta { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: auto; padding-top: 6px; }
.mkt-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap;
  background: var(--hover-wash); color: var(--text-secondary);
}
.mkt-badge.offer { background: var(--mkt-offer-bg); color: var(--mkt-offer); }
.mkt-badge.open { color: var(--green); }
.mkt-badge.closed { color: var(--text-secondary); }
.mkt-badge.featured { background: var(--brand-solid, var(--brand)); color: #fff; }
.mkt-stall .mkt-badge.featured { position: absolute; z-index: 2; top: 28px; right: 8px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }

/* Shops still setting up: a short list after the stalls */
.mkt-more { margin-top: 28px; }
.mkt-more h2, .mkt-section-title {
  margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.4px;
}
.mkt-more p { margin: 0 0 10px; font-size: 13px; color: var(--text-secondary); }
.mkt-more-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mkt-more-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-decoration: none;
  background: var(--bg-card); color: var(--text) !important; min-width: 0;
}
.mkt-more-dot {
  flex: none; width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(90deg, var(--awning) 0 6px, var(--mkt-cream) 6px 12px); font-size: 0;
}
.mkt-more-item b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkt-more-item span { display: block; font-size: 12.5px; color: var(--text-secondary); }

/* States: loading, empty, nothing matches, couldn't load */
.mkt-state { text-align: center; padding: 48px 20px; color: var(--text-secondary); }
.mkt-state h2 { margin: 0 0 6px; color: var(--text); font-size: 19px; }
.mkt-state p { margin: 0 auto 14px; max-width: 420px; font-size: 15px; line-height: 1.45; }
.mkt-state .mkt-big { font-size: 46px; line-height: 1; margin-bottom: 10px; }
.mkt-spinner {
  width: 28px; height: 28px; margin: 0 auto; border-radius: 50%;
  border: 3px solid var(--hairline); border-top-color: var(--brand); animation: mkt-spin 0.8s linear infinite;
}
@keyframes mkt-spin { to { transform: rotate(360deg); } }
.mkt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none;
  padding: 11px 20px; border-radius: 999px; font-size: 16px; font-weight: 600;
  background: var(--brand-solid, var(--brand)); color: #fff !important;
}
.mkt-btn.secondary { background: var(--hover-wash); color: var(--brand) !important; }
.mkt-btn svg { width: 18px; height: 18px; }

/* Become a Partner */
.mkt-invite {
  margin-top: 30px; padding: 22px 20px; border-radius: var(--mkt-radius); text-align: center;
  background: var(--bg-card); box-shadow: var(--mkt-shadow); position: relative; overflow: hidden;
}
.mkt-invite::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px;
  background: repeating-linear-gradient(90deg, #c8465a 0 24px, #df9a2e 24px 48px, #23897d 48px 72px, #3b68a8 72px 96px, #855296 96px 120px, #5f8f45 120px 144px);
}
.mkt-invite h2 { margin: 6px 0 6px; font-family: var(--mkt-display); font-weight: var(--title-weight, 400); font-size: 22px; color: var(--brand); }
.mkt-invite p { margin: 0 auto 14px; max-width: 520px; font-size: 15px; line-height: 1.5; color: var(--text-secondary); }

/* ── A shop's page ──────────────────────────────────────────────────── */
.mkt-shop { max-width: 760px; margin: 0 auto; }
.mkt-back {
  display: inline-flex; align-items: center; gap: 4px; margin: 12px 0 10px -4px; padding: 6px 8px 6px 4px;
  border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--brand) !important; text-decoration: none;
}
.mkt-back svg { width: 18px; height: 18px; }
.mkt-cover {
  position: relative; border-radius: var(--mkt-radius); overflow: hidden; background: var(--mkt-cream);
  aspect-ratio: 16 / 9; box-shadow: var(--mkt-shadow);
}
.mkt-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mkt-cover.is-awning { aspect-ratio: auto; height: 92px; border-radius: 8px 8px var(--mkt-radius) var(--mkt-radius); overflow: visible; box-shadow: none; background: none; }
.mkt-cover.is-awning .mkt-awning { height: 64px; border-radius: 8px 8px 0 0; }
.mkt-cover.is-awning .mkt-awning::after { height: 12px; background:
  radial-gradient(circle at 12px 0, var(--awning) 12px, transparent 12.5px) 0 0 / 48px 12px repeat-x,
  radial-gradient(circle at 36px 0, var(--mkt-cream) 12px, transparent 12.5px) 0 0 / 48px 12px repeat-x; }
.mkt-cover.is-awning .mkt-awning { background: repeating-linear-gradient(90deg, var(--awning) 0 24px, var(--mkt-cream) 24px 48px); }
.mkt-shop-head { position: relative; padding: 0 2px; }
.mkt-shop-logo {
  width: 84px; height: 84px; border-radius: 50%; overflow: hidden; margin: -44px 0 0 14px; position: relative; z-index: 2;
  background: var(--bg-card); box-shadow: 0 0 0 4px var(--bg), 0 3px 10px rgba(0, 0, 0, 0.18);
}
.mkt-shop-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mkt-cover.is-awning + .mkt-shop-head .mkt-shop-logo { margin-top: -20px; }
.mkt-shop-name {
  margin: 12px 0 4px; font-family: var(--mkt-display); font-weight: var(--title-weight, 400);
  font-size: clamp(26px, 6.6vw, 38px); line-height: 1.1; overflow-wrap: anywhere;
}
.mkt-shop-line { margin: 0 0 10px; font-size: 17px; line-height: 1.4; color: var(--text-secondary); }
.mkt-shop-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.mkt-shop-badges .mkt-badge { font-size: 13px; padding: 3px 10px; }

.mkt-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 16px; }
.mkt-actions .mkt-btn { flex: 1 1 100%; }
@media (min-width: 560px) { .mkt-actions .mkt-btn { flex: 0 1 auto; } }
.mkt-action {
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; padding: 8px 6px;
  border-radius: 12px; font-size: 12.5px; font-weight: 600; text-decoration: none; color: var(--brand) !important;
  background: var(--bg-card); box-shadow: var(--mkt-shadow);
}
.mkt-action svg { width: 21px; height: 21px; }

.mkt-card {
  background: var(--bg-card); border-radius: var(--mkt-radius); padding: 16px; margin: 0 0 14px;
  box-shadow: var(--mkt-shadow);
}
.mkt-card h2 { margin: 0 0 10px; font-size: 17px; }
.mkt-text { margin: 0; font-size: 15.5px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }

/* The members' offer, as a ticket */
.mkt-ticket {
  position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 0 0 14px;
  border-radius: 14px; background: var(--mkt-offer-bg); color: var(--text);
  border: 1.5px dashed var(--mkt-offer);
  border: 1.5px dashed color-mix(in srgb, var(--mkt-offer) 55%, transparent);
}
.mkt-ticket-icon { flex: none; font-size: 26px; line-height: 1; }
.mkt-ticket b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--mkt-offer); }
.mkt-ticket p { margin: 3px 0 0; font-size: 15.5px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.mkt-ticket small { display: block; margin-top: 5px; font-size: 13px; color: var(--text-secondary); }

/* Gallery: photos in a row that scrolls sideways */
.mkt-gallery { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: thin; }
.mkt-gallery button { flex: none; width: min(70vw, 280px); aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; scroll-snap-align: start; background: var(--mkt-cream); }
.mkt-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* What's in the shop */
.mkt-items { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 700px) { .mkt-items { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
.mkt-item {
  display: flex; flex-direction: column; text-align: left; border-radius: 12px; overflow: hidden; min-width: 0;
  background: var(--bg); box-shadow: inset 0 0 0 1px var(--hairline); color: var(--text) !important;
}
.mkt-item-photo { position: relative; aspect-ratio: 1 / 1; background: var(--mkt-cream); overflow: hidden; }
.mkt-item-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mkt-item-photo .mkt-placeholder { font-size: 34px; }
.mkt-item-body { padding: 9px 10px 11px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.mkt-item-title { font-size: 14.5px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.mkt-item-price { font-size: 14px; font-weight: 600; color: var(--brand); }
.mkt-item-about { font-size: 13px; line-height: 1.4; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mkt-item .mkt-badge { align-self: flex-start; margin-top: 4px; }
.mkt-item.sold-out .mkt-item-photo img { filter: grayscale(0.7); opacity: 0.7; }

.mkt-ways { display: flex; flex-wrap: wrap; gap: 8px; }
.mkt-way { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font-size: 14px; background: var(--hover-wash); }
.mkt-way-icon { font-size: 15px; line-height: 1; }

.mkt-hours { width: 100%; border-collapse: collapse; font-size: 15px; }
.mkt-hours th { text-align: left; font-weight: 500; color: var(--text-secondary); padding: 5px 12px 5px 0; white-space: nowrap; width: 1%; }
.mkt-hours td { padding: 5px 0; font-variant-numeric: tabular-nums; }
.mkt-hours tr.today th, .mkt-hours tr.today td { color: var(--text); font-weight: 700; }
.mkt-hours-note { margin: 10px 0 0; font-size: 14px; line-height: 1.45; color: var(--text-secondary); white-space: pre-line; }
.mkt-find p { margin: 0 0 8px; font-size: 15.5px; line-height: 1.45; overflow-wrap: anywhere; }
.mkt-find .mkt-muted, .mkt-muted { color: var(--text-secondary); font-size: 14px; }
.mkt-links { display: flex; flex-wrap: wrap; gap: 8px; }
.mkt-link {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; text-decoration: none;
  font-size: 14.5px; font-weight: 600; background: var(--hover-wash); color: var(--brand) !important; max-width: 100%;
}
.mkt-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mkt-link svg { width: 16px; height: 16px; flex: none; }
.mkt-since { text-align: center; margin: 18px 0 6px; font-size: 13.5px; color: var(--text-secondary); }
.mkt-since svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; color: var(--brand); }
.mkt-nearby { margin-top: 22px; }
.mkt-nearby .mkt-grid { margin-top: 8px; }

/* Photos and items, larger, over the page */
.mkt-lightbox {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 18px;
  background: rgba(0, 0, 0, 0.82); animation: mkt-fade 0.18s ease-out;
}
.mkt-lightbox-inner { position: relative; max-width: min(880px, 100%); max-height: 100%; display: flex; flex-direction: column; gap: 10px; }
.mkt-lightbox img { max-width: 100%; max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px); object-fit: contain; border-radius: 10px; align-self: center; }
.mkt-lightbox-text { color: #fff; text-align: center; font-size: 15px; line-height: 1.45; max-height: 30vh; overflow: auto; white-space: pre-line; }
.mkt-lightbox-text b { display: block; font-size: 18px; }
.mkt-lightbox-text .mkt-item-price { color: #ffd27a; }
.mkt-lightbox-close {
  position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16); color: #fff !important; font-size: 15px; font-weight: 600;
}
.mkt-lightbox .mkt-btn { align-self: center; }
@keyframes mkt-fade { from { opacity: 0; } to { opacity: 1; } }

.mkt-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90;
  padding: 11px 16px; border-radius: 12px; font-size: 14px; max-width: 90%;
  background: var(--bg-card); color: var(--text); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

@media (hover: hover) and (pointer: fine) {
  .mkt-stall:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 10px 24px rgba(0, 0, 0, 0.12); }
  .mkt-chip:hover:not([aria-pressed="true"]), .mkt-more-item:hover, .mkt-link:hover, .mkt-back:hover { background: var(--hover-wash); }
  .mkt-btn:hover, .mkt-surprise:hover, .mkt-action:hover { opacity: 0.88; }
  .mkt-item:hover { box-shadow: inset 0 0 0 1px var(--brand); }
}
@media (prefers-reduced-motion: reduce) {
  .mkt-bunting { animation: none; }
  .mkt-stall { transition: none; }
  .mkt-lightbox { animation: none; }
  .mkt-spinner { animation-duration: 2s; }
}

/* ── My Shop (the Members page) ─────────────────────────────────────── */
.myshop { color: var(--text); }
.myshop-card { position: relative; overflow: hidden; padding: 0 !important; }
.myshop-card .mkt-awning { border-radius: 0; height: 16px; }
.myshop-card .mkt-awning::after { height: 6px; background:
  radial-gradient(circle at 7px 0, var(--awning) 7px, transparent 7.5px) 0 0 / 28px 6px repeat-x,
  radial-gradient(circle at 21px 0, var(--mkt-cream) 7px, transparent 7.5px) 0 0 / 28px 6px repeat-x; }
.myshop-card-body { padding: 18px 16px 16px; }
.myshop-head { display: flex; gap: 12px; align-items: center; margin: 0 0 10px; }
.myshop-thumb { flex: none; width: 54px; height: 54px; border-radius: 12px; overflow: hidden; background: var(--mkt-cream); display: flex; align-items: center; justify-content: center; font-family: var(--mkt-display); font-size: 26px; color: var(--awning); }
.myshop-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.myshop-eyebrow { margin: 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); }
.myshop-name { margin: 1px 0 0; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.myshop-status { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; font-size: 14.5px; line-height: 1.4; }
.myshop-status svg { flex: none; width: 17px; height: 17px; margin-top: 1px; }
.myshop-status.open { color: var(--green); }
.myshop-status.hidden, .myshop-status.closed { color: var(--red); }
.myshop-status.unlisted { color: var(--text-secondary); }
.myshop-status small { display: block; color: var(--text-secondary); font-size: 13.5px; margin-top: 2px; }
.myshop-intro { margin: 0 0 12px; font-size: 14.5px; line-height: 1.45; color: var(--text-secondary); white-space: pre-line; }
.myshop-checks { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.myshop-checks li { display: flex; gap: 8px; align-items: center; font-size: 14.5px; }
.myshop-checks svg { flex: none; width: 18px; height: 18px; }
.myshop-checks li.done { color: var(--text-secondary); }
.myshop-checks li.done svg { color: var(--green); }
.myshop-checks li:not(.done) svg { color: var(--text-tertiary); }
.myshop-progress { height: 6px; border-radius: 999px; background: var(--hover-wash); overflow: hidden; margin: 0 0 12px; }
.myshop-progress span { display: block; height: 100%; border-radius: 999px; background: var(--green); }
.myshop-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.myshop-buttons > * { flex: 1 1 160px; }
.myshop .mkt-btn { width: 100%; }

/* The editor: a sheet over the page */
/* Over the page and its tab bar, under its dialogs and toasts (the web app's: 50 and 60; the Office's toast: 40). */
.myshop-sheet {
  position: fixed; inset: 0; z-index: 45; display: flex; align-items: stretch; justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}
.myshop-sheet.myshop-over { z-index: 46; }
.office-page .myshop-sheet { z-index: 35; }
.office-page .myshop-sheet.myshop-over { z-index: 36; }
@media (min-width: 760px) { .myshop-sheet { padding: 24px; align-items: center; } }
.myshop-panel {
  width: 100%; max-width: 760px; background: var(--bg); display: flex; flex-direction: column;
  max-height: 100%; animation: mkt-up 0.22s ease-out;
}
@media (min-width: 760px) { .myshop-panel { border-radius: 16px; max-height: min(920px, 100%); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); overflow: hidden; } }
@keyframes mkt-up { from { transform: translateY(30px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.myshop-bar {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px;
  padding: env(safe-area-inset-top) 6px 0; background: var(--bg-bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--hairline);
}
@media (min-width: 760px) { .myshop-bar { padding-top: 0; } }
.myshop-bar h2 { margin: 0; font-size: 17px; text-align: center; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.myshop-bar button { padding: 10px 12px; font-size: 16px; color: var(--brand); border-radius: 10px; }
.myshop-bar .myshop-save { font-weight: 700; }
.myshop-bar button[disabled] { opacity: 0.45; cursor: default; }
.myshop-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px calc(28px + env(safe-area-inset-bottom)); }
.myshop-error {
  margin: 0 0 14px; padding: 11px 14px; border-radius: 12px; font-size: 15px; line-height: 1.4;
  background: var(--hover-wash);
  background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red);
}
.myshop-section { margin: 0 0 18px; }
.myshop-section > h3 { margin: 0 0 3px; padding: 0 4px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-secondary); }
.myshop-section > p.myshop-hint { margin: 0 0 8px; padding: 0 4px; font-size: 13.5px; line-height: 1.4; color: var(--text-secondary); }
.myshop-box { background: var(--bg-card); border-radius: 12px; overflow: hidden; }
.myshop-field { display: block; padding: 9px 14px 9px; }
.myshop-field + .myshop-field, .myshop-box > * + * { border-top: 0.5px solid var(--hairline); }
.myshop-field > span { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 1px; }
.myshop-field input, .myshop-field textarea, .myshop-field select {
  width: 100%; border: 0; background: none; color: var(--text); font: inherit; font-size: 16px; padding: 3px 0; outline: none;
}
.myshop-field textarea { resize: vertical; min-height: 92px; line-height: 1.45; }
.myshop-field select { -webkit-appearance: none; appearance: none; background: none; }
.myshop-field:focus-within { box-shadow: inset 0 0 0 2px var(--focus); }
.myshop-field input::placeholder, .myshop-field textarea::placeholder { color: var(--text-tertiary); }
.myshop-field small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.35; }
.myshop-prefix { display: flex; align-items: baseline; gap: 0; }
.myshop-prefix em { font-style: normal; color: var(--text-secondary); white-space: nowrap; font-size: 15px; }
.myshop-check { display: flex; align-items: center; gap: 10px; padding: 11px 14px; font-size: 15.5px; cursor: pointer; }
.myshop-check input { width: 20px; height: 20px; flex: none; accent-color: var(--brand-solid, var(--brand)); }
.myshop-ways { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.myshop-ways .myshop-check { border-top: 0.5px solid var(--hairline); }
.myshop-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; font-size: 15.5px; }
.myshop-switch input { width: 22px; height: 22px; accent-color: var(--brand-solid, var(--brand)); flex: none; }

/* Photos in the editor */
.myshop-cover { position: relative; aspect-ratio: 16 / 9; background: var(--mkt-cream); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.myshop-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.myshop-photo-row { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.myshop-logo { flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--mkt-cream); display: flex; align-items: center; justify-content: center; font-family: var(--mkt-display); font-size: 28px; color: var(--text-tertiary); }
.myshop-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.myshop-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.myshop-mini {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--hover-wash); color: var(--brand); cursor: pointer;
}
.myshop-mini.danger { color: var(--red); }
.myshop-mini[disabled], .myshop-mini.busy { opacity: 0.55; cursor: default; }
.myshop-mini svg { width: 15px; height: 15px; }
.myshop-cover .myshop-photo-actions { position: absolute; right: 10px; bottom: 10px; }
.myshop-cover .myshop-mini { background: rgba(0, 0, 0, 0.55); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.myshop-cover-empty { text-align: center; color: var(--text-secondary); font-size: 14px; padding: 12px; }
.myshop-gallery { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); padding: 12px 14px; }
.myshop-gallery figure { position: relative; margin: 0; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: var(--mkt-cream); }
.myshop-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.myshop-gallery figure button {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.6); color: #fff; display: flex; align-items: center; justify-content: center;
}
.myshop-gallery figure button svg { width: 13px; height: 13px; }
.myshop-add-tile {
  aspect-ratio: 1 / 1; border-radius: 10px; border: 1.5px dashed var(--hairline); color: var(--brand);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.myshop-add-tile svg { width: 22px; height: 22px; }
.myshop-note { padding: 10px 14px; font-size: 13.5px; line-height: 1.4; color: var(--text-secondary); }

/* Items in the editor */
.myshop-items { display: grid; gap: 10px; }
.myshop-item { background: var(--bg-card); border-radius: 12px; overflow: hidden; }
.myshop-item-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.myshop-item-thumb { flex: none; width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--mkt-cream); display: flex; align-items: center; justify-content: center; color: var(--text-tertiary); }
.myshop-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.myshop-item-thumb svg { width: 22px; height: 22px; }
.myshop-item-head b { flex: 1; min-width: 0; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.myshop-item-head b span { display: block; font-weight: 500; font-size: 13.5px; color: var(--text-secondary); }
.myshop-icon-btn { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--brand); flex: none; }
.myshop-icon-btn svg { width: 18px; height: 18px; }
.myshop-icon-btn[disabled] { opacity: 0.3; cursor: default; }
.myshop-icon-btn.danger { color: var(--red); }
.myshop-item-body { border-top: 0.5px solid var(--hairline); }
.myshop-item-photo { display: flex; gap: 10px; align-items: center; padding: 10px 14px; }
.myshop-add {
  display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; padding: 13px; border-radius: 12px;
  border: 1.5px dashed var(--hairline); color: var(--brand); font-size: 15.5px; font-weight: 600; background: none; cursor: pointer;
}
.myshop-add svg { width: 18px; height: 18px; }

/* Hours in the editor */
.myshop-day { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 9px 14px; }
.myshop-day + .myshop-day { border-top: 0.5px solid var(--hairline); }
.myshop-day > label:first-child { display: flex; align-items: center; gap: 8px; width: 72px; font-size: 15px; font-weight: 600; cursor: pointer; }
.myshop-day input[type="checkbox"] { width: 19px; height: 19px; accent-color: var(--brand-solid, var(--brand)); }
.myshop-ranges { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.myshop-range { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-secondary); }
.myshop-range input {
  flex: 1 1 0; min-width: 0; max-width: 10.5em;
  border: 1px solid var(--hairline); border-radius: 8px; background: var(--bg); color: var(--text);
  font: inherit; font-size: 15px; padding: 5px 4px;
}
.myshop-range .myshop-icon-btn { width: 30px; height: 30px; }
.myshop-closed-word { font-size: 14.5px; color: var(--text-secondary); }
.myshop-day .myshop-mini { padding: 4px 9px; font-size: 13px; }
.myshop-links .myshop-link { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; align-items: end; }
.myshop-links .myshop-link .myshop-field { border-top: 0; }
.myshop-links .myshop-link + .myshop-link { border-top: 0.5px solid var(--hairline); }
.myshop-links .myshop-link .myshop-icon-btn { margin: 0 6px 6px; }
@media (max-width: 480px) {
  .myshop-links .myshop-link { grid-template-columns: minmax(0, 1fr) auto; }
  .myshop-links .myshop-link .myshop-field:nth-child(2) { grid-column: 1 / 2; grid-row: 2; border-top: 0.5px solid var(--hairline); }
  .myshop-links .myshop-link .myshop-icon-btn { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}
.myshop-preview-panel { background: var(--bg); }
.myshop-preview-panel .myshop-scroll { padding-left: 0; padding-right: 0; }

@media (hover: hover) and (pointer: fine) {
  .myshop-mini:hover:not([disabled]), .myshop-icon-btn:hover:not([disabled]), .myshop-add:hover, .myshop-add-tile:hover { background: var(--hover-wash); }
  .myshop-bar button:hover:not([disabled]) { opacity: 0.7; }
}
@media (prefers-reduced-motion: reduce) {
  .myshop-panel { animation: none; }
}
