/* ==========================================================================
   market-guide theme — "{city}'s Complete Farmers Markets Guide".
   Ported from the approved "Orlando Market Board" concept: citrus / leaf /
   berry palette, Bebas Neue + Zilla Slab + Caveat, striped market awnings,
   bunting and a night-market scene (all inline SVG), day rail, filter chips,
   timeline, quick-reference table and a pick popover that every market,
   hall and dated event opens.
   ========================================================================== */

:root {
  --ground: #F2F1E6;
  --surface: #FFFFFF;
  --surface-2: #FBFAF3;
  --ink: #22261F;
  --ink-soft: #5B5A45;
  --ink-faint: #7C7960;
  --line: #DAD5BE;
  --line-strong: #C4BE9F;
  --citrus: #D9720A;
  --citrus-ink: #7A3F05;
  --leaf: #3E6B3F;
  --leaf-ink: #28492A;
  --berry: #9C3B49;
  --berry-ink: #6E2530;
  --sky: #2F6F8F;
  --gold: #E0A526;
  --sun: #F2C14E;
  --sun-ink: #6B4C0E;
  --shadow: 0 1px 0 rgba(34, 38, 31, 0.05), 0 8px 20px -14px rgba(34, 38, 31, 0.35);
  --radius: 3px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.mg-pop-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--ground);
  background-image: radial-gradient(color-mix(in srgb, var(--line-strong) 55%, transparent) 1px, transparent 1.4px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: 'Zilla Slab', Georgia, 'Times New Roman', serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display {
  font-family: 'Bebas Neue', 'Arial Narrow', sans-serif;
  letter-spacing: 0.02em;
  text-wrap: balance;
  font-weight: 400;
  line-height: 0.95;
}
a { color: inherit; }
::selection { background: var(--sun); color: var(--sun-ink); }
:focus-visible { outline: 2px solid var(--citrus); outline-offset: 2px; }
button { font: inherit; color: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mg-skip { position: absolute; left: -999px; top: 0; z-index: 500; background: var(--ink); color: var(--ground); padding: 8px 14px; }
.mg-skip:focus { left: 8px; top: 8px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ============ Masthead + bunting ============ */
.masthead { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.masthead-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; flex-wrap: wrap; gap: 8px 20px; }
.crumbs { font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--citrus); }
.crumbs span { margin: 0 8px; }
.crumbs b { color: var(--ink); }
.back { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ink-soft); }
.bunting { display: block; width: 100%; height: 38px; background: var(--surface-2); border-bottom: 1px solid var(--line); }

/* ============ Day rail + filters ============ */
.rail-shell { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); }
.rail-row { display: flex; align-items: center; gap: 12px; }
.rail-row .stamp { position: relative; z-index: 2; margin: 6px 4px -84px 0; } /* hangs below the bar so the bar keeps its height */
@media (max-width: 899px) { .rail-row .stamp { display: none; } }
.rail-row .rail { flex: 1 1 auto; min-width: 0; }
.rail { position: relative; padding: 14px 0 10px; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-line { position: absolute; left: 24px; right: 24px; top: 34px; height: 2px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 10px); z-index: 0; }
.tag {
  position: relative; z-index: 1; flex: 0 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 14px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 2px;
  cursor: pointer; color: var(--ink-soft);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.tag::before { content: ""; position: absolute; top: -5px; left: 50%; transform: translateX(-50%); width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.tag .d { font-family: 'Bebas Neue', sans-serif; font-size: 19px; letter-spacing: 0.04em; color: var(--ink); }
.tag .n { font-size: 12px; letter-spacing: 0.02em; }
.day-note { margin: 0 0 10px; font-size: 14px; color: var(--ink-soft); }
.day-note button { all: unset; cursor: pointer; font-weight: 700; color: var(--leaf-ink); border-bottom: 1px solid var(--line-strong); }
.day-note button:focus-visible { outline: 2px solid var(--citrus); outline-offset: 2px; }
.tag[aria-pressed="true"] { background: var(--leaf); border-color: var(--leaf); }
.tag[aria-pressed="true"] .d, .tag[aria-pressed="true"] .n { color: #F5F6EC; }
.tag[aria-pressed="true"]::before { background: var(--citrus); }
.tag[aria-current="date"] .d::after { content: ""; display: block; height: 3px; margin-top: 2px; background: var(--citrus); border-radius: 2px; }
.tag:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 16px; }
.chip { font-size: 12.5px; letter-spacing: 0.03em; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 20px; background: transparent; color: var(--ink-soft); cursor: pointer; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }

/* ============ Hero board ============ */
.hero { padding: 34px 0 10px; }
.board { background: var(--ink); color: var(--ground); border-radius: 4px; padding: 28px 28px 24px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.board::after { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 200px at 90% -20%, color-mix(in srgb, var(--citrus) 30%, transparent), transparent 70%); pointer-events: none; }
.board-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: nowrap; position: relative; z-index: 1; }
.board-top > div:first-child { flex: 1 1 auto; min-width: 0; }
.board .kick { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--sun); margin-bottom: 8px; }
.board h1 { font-size: clamp(36px, 6.4vw, 64px); margin: 0 0 8px; color: var(--ground); }
.board h1 em { font-style: normal; color: var(--citrus); }
.board .sub { font-size: 18px; color: color-mix(in srgb, var(--ground) 75%, transparent); max-width: 56ch; margin: 0; }
.stamp {
  flex: 0 0 auto; width: 152px; height: 152px; border: 3px solid var(--citrus); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; text-align: center; transform: rotate(-8deg);
  color: var(--citrus); font-family: 'Bebas Neue', sans-serif; font-size: 24px; letter-spacing: 0.06em; line-height: 1.15; padding: 8px;
  background: #fff; box-shadow: 0 6px 14px -8px rgba(34, 38, 31, 0.5);
}
.today { position: relative; z-index: 1; margin-top: 22px; border-top: 1px dashed color-mix(in srgb, var(--ground) 30%, transparent); padding-top: 16px; }
.today-label { font-family: 'Bebas Neue', sans-serif; font-size: 26px; letter-spacing: 0.04em; color: var(--sun); margin: 0 0 2px; }
.today-list { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.today-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: color-mix(in srgb, var(--ground) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--ground) 18%, transparent);
  border-radius: 3px; padding: 12px 14px; color: var(--ground);
}
.today-item:hover { background: color-mix(in srgb, var(--ground) 14%, transparent); }
.today-item .t-name { font-weight: 700; font-size: 15px; }
.today-item .t-time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--sun); margin-top: 2px; }
.today-empty { margin: 8px 0 0; font-size: 14px; color: color-mix(in srgb, var(--ground) 70%, transparent); font-style: italic; }
.today-empty b { color: var(--sun); font-style: normal; }

/* ============ Stats + intro ============ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; margin: 22px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.stats > div { background: var(--surface); padding: 14px 16px; }
.stats dt { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.stats dd { margin: 2px 0 0; font-family: 'Bebas Neue', sans-serif; font-size: 38px; line-height: 1; letter-spacing: 0.02em; text-shadow: 2px 2px 0 color-mix(in srgb, currentColor 14%, transparent); }
.stats dd.stat-date { font-size: 24px; padding-top: 9px; color: var(--ink); text-shadow: none; }
.intro { padding: 26px 0 0; }
.intro p { margin: 0 0 12px; font-size: 16.5px; line-height: 1.6; color: var(--ink-soft); }
.intro a { color: var(--leaf-ink); }
.intro p:last-child { font-family: 'Caveat', cursive; font-size: 22px; color: var(--citrus-ink); }
.byline { font-size: 13px; color: var(--ink-faint); margin: 8px 0 0; }

/* ============ Day sections + cards ============ */
.day-section { padding: 30px 0 6px; scroll-margin-top: 150px; }
.day-head { position: relative; display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.day-head h2 { font-size: 32px; margin: 0; }
.day-count { font-weight: 600; font-size: 12.5px; color: var(--ink-faint); letter-spacing: 0.03em; text-transform: uppercase; }
.day-art { margin-left: auto; align-self: center; width: 120px; height: 36px; }
.day-gap { padding: 14px 0 2px; }
.day-gap .day-head { border-bottom: 1px dashed var(--line); padding-bottom: 6px; margin-bottom: 8px; }
.day-gap h2 { font-size: 22px; color: var(--ink-faint); letter-spacing: 0.04em; }
.day-gap .desc { font-size: 16px; margin: 0; color: var(--ink-soft); }
.day-gap .hand { font-family: 'Caveat', cursive; font-size: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding-bottom: 8px; }
.card {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 16px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; cursor: pointer;
  transition: transform .15s ease;
}
.card:hover { transform: translateY(-3px); }
.card::after { content: ""; position: absolute; right: -18px; bottom: -18px; width: 84px; height: 84px; border-radius: 50%; background: color-mix(in srgb, var(--c) 9%, transparent); pointer-events: none; }
.awning { display: block; margin: -16px -16px 4px; width: calc(100% + 32px); height: 26px; }
.card-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.card-ico { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 20%, transparent); color: var(--c); border: 2px solid var(--c); }
.card-ico svg { width: 22px; height: 22px; }
.card-name { flex: 1; margin: 0; font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 21px; letter-spacing: 0.01em; line-height: 1.05; }
.card-open { all: unset; cursor: pointer; }
.card-open:focus-visible { outline: 2px solid var(--citrus); outline-offset: 2px; }
.card-open:hover { color: var(--citrus-ink); }
.badge { flex: 0 0 auto; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
.badge.weekly { background: color-mix(in srgb, var(--leaf) 16%, transparent); color: var(--leaf-ink); }
.badge.evening { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink-soft); }
.badge.nonprofit { background: color-mix(in srgb, var(--sun) 40%, transparent); color: var(--sun-ink); }
.badge.hall { background: color-mix(in srgb, var(--citrus) 18%, transparent); color: var(--citrus-ink); }
.badge.popup { background: color-mix(in srgb, var(--berry) 18%, transparent); color: var(--berry-ink); }
.badge.fair { background: color-mix(in srgb, var(--sky) 18%, transparent); color: var(--sky); }
.meta-row { font-size: 13.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.meta-row .place { color: var(--ink); }
.card p.desc { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.aside { font-family: 'Caveat', cursive; font-size: 17px; color: var(--citrus-ink); line-height: 1.2; }
.card-links, .tl-links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; font-weight: 600; }
.card-links { margin-top: auto; padding-top: 8px; }
.tl-links { margin-top: 8px; }
.card-links a, .tl-links a { color: var(--leaf-ink); text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; }

/* ============ Always-open ribbon ============ */
.ribbon-section { padding: 34px 0 6px; }
.ribbon { border: 1px dashed var(--line-strong); border-radius: 4px; padding: 18px 20px; display: grid; gap: 16px; grid-template-columns: 1fr; background: linear-gradient(135deg, color-mix(in srgb, var(--sun) 16%, transparent), transparent 55%); }
@media (min-width: 720px) { .ribbon { grid-template-columns: 220px 1fr; align-items: center; } }
.ribbon h2 { font-size: 26px; margin: 0 0 2px; }
.ribbon .tiny { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); font-weight: 600; }
.ribbon .lead { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-soft); }
.hall-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.hall-card { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--citrus); border-radius: 3px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.hall-card:hover { border-color: var(--citrus); }
.hall-card .card-name { font-size: 18px; flex: none; }
.hall-card p.desc { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ============ Timeline ============ */
.timeline-section { padding: 40px 0 10px; }
.section-head { margin-bottom: 18px; }
.section-head h2 { font-size: 34px; margin: 0 0 4px; }
.section-head .sub { font-size: 18px; color: var(--ink-soft); max-width: 60ch; margin: 0; }
/* Cards alternate either side of a centred line. Floats let each right-hand
   card start beside (and overlap vertically with) the left-hand one, which
   shortens the list; months clear them and sit on the line. */
.timeline { position: relative; padding: 4px 0; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--line-strong); }
.timeline::after { content: ""; display: block; clear: both; }
.tl-month { clear: both; position: relative; width: max-content; margin: 8px auto 14px; padding: 4px 16px; background: var(--citrus); color: #fff; border-radius: 20px; box-shadow: 0 2px 0 var(--citrus-ink); font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 20px; letter-spacing: 0.06em; line-height: 1.1; z-index: 1; }
.tl-item { position: relative; width: calc(50% - 30px); margin: 0 0 14px; padding: 12px 16px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; box-shadow: var(--shadow); cursor: pointer; }
.tl-item[data-side="l"] { float: left; clear: left; }
.tl-item[data-side="r"] { float: right; clear: right; margin-top: 34px; }
.tl-item::before { content: ""; position: absolute; top: 16px; width: 13px; height: 13px; border-radius: 50%; background: var(--citrus); border: 2px solid var(--surface); box-shadow: 0 0 0 2px var(--citrus); }
.tl-item[data-side="l"]::before { right: -37px; }
.tl-item[data-side="r"]::before { left: -37px; }
.tl-item::after { content: ""; position: absolute; top: 21px; width: 22px; border-top: 2px solid var(--line-strong); }
.tl-item[data-side="l"]::after { right: -24px; }
.tl-item[data-side="r"]::after { left: -24px; }
.tl-item[data-type="fair"]::before { background: var(--sky); box-shadow: 0 0 0 2px var(--sky); }
.tl-item[data-type="popup"]::before { background: var(--berry); box-shadow: 0 0 0 2px var(--berry); }
.tl-top { display: flex; align-items: flex-start; gap: 14px; }
.tl-head { flex: 1 1 auto; min-width: 0; }
.tl-photo { flex: 0 0 auto; display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 3px; background: var(--line); }
.tl-date { display: inline-block; background: var(--ink); color: var(--ground); padding: 2px 8px; border-radius: 2px; font-family: 'Bebas Neue', sans-serif; font-size: 14px; letter-spacing: 0.05em; margin-bottom: 4px; }
.tl-name { font-size: 18px; font-weight: 600; line-height: 1.25; margin: 0 0 4px; }
.tl-name .card-open:hover { color: var(--citrus-ink); }
.tl-name .badge { margin-left: 6px; vertical-align: middle; }
.tl-desc { font-size: 16px; color: var(--ink-soft); }
.tl-about { margin-top: 12px; }
@media (max-width: 479px) { .tl-top { flex-direction: column; } }
.tl-note { font-size: 14px; color: var(--ink-faint); font-style: italic; }
.holiday-note { clear: both; font-size: 13.5px; color: var(--ink-faint); font-style: italic; margin: 14px 0 0; max-width: 66ch; }
@media (max-width: 719px) {
  .timeline { padding-left: 26px; }
  .timeline::before { left: 6px; margin-left: 0; }
  .tl-month { margin: 8px 0 12px; }
  .tl-item, .tl-item[data-side="l"], .tl-item[data-side="r"] { float: none; width: auto; margin: 0 0 12px; text-align: left; }
  .tl-item[data-side="l"]::before, .tl-item[data-side="r"]::before { left: -27px; right: auto; }
  .tl-item::after { display: none; }
}

/* ============ Quick reference ============ */
.ref-section { padding: 40px 0 10px; }
.ref-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); }
.ref { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.ref th { text-align: left; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); padding: 10px 14px; border-bottom: 2px solid var(--ink); background: var(--surface-2); font-weight: 600; }
.ref td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ref tr[data-pick] { cursor: pointer; }
.ref tr[data-pick]:hover td { background: var(--surface-2); }
.ref td:first-child { color: var(--ink); font-weight: 600; }
.ref tr:last-child td { border-bottom: 0; }

/* ============ FAQ ============ */
.faq-section { padding: 40px 0 10px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; padding: 14px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 600; font-size: 18px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .mark { font-family: 'Bebas Neue', sans-serif; font-size: 20px; color: var(--citrus); transition: transform .18s ease; }
.faq-item[open] .mark { transform: rotate(45deg); }
.faq-item p { margin: 0 0 16px; font-size: 18px; color: var(--ink-soft); max-width: 66ch; }

/* ============ Newsletter + more guides + footer ============ */
.news { margin-top: 40px; background: var(--leaf); color: #F5F6EC; border-radius: 4px; padding: 24px 26px; display: grid; gap: 16px; align-items: center; }
@media (min-width: 720px) { .news { grid-template-columns: 1fr 1fr; } }
.news-title { font-size: 30px; margin: 0 0 4px; }
.news p { margin: 0; font-size: 14.5px; opacity: .9; }
.news-row { display: flex; gap: 8px; flex-wrap: wrap; }
.news input { flex: 1 1 200px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 3px; font: inherit; }
.news label { display: block; font-size: 12px; margin-bottom: 4px; letter-spacing: .08em; text-transform: uppercase; }
.news-msg { margin-top: 8px; font-size: 14px; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 3px; background: var(--citrus); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; }
.btn-soft { background: color-mix(in srgb, var(--leaf) 14%, transparent); color: var(--leaf-ink); }
.more-guides { max-width: 1080px; margin: 0 auto; padding: 48px 24px 24px; }
.more-guides-weekend-line { margin: 0 0 18px; font-size: 15px; color: var(--ink-soft); }
.more-guides-label { margin-bottom: 14px; font-family: 'Bebas Neue', sans-serif; font-size: 30px; letter-spacing: .02em; }
.more-guides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.more-guide-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; text-decoration: none; box-shadow: var(--shadow); }
.more-guide-icon { flex: 0 0 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--citrus) 16%, transparent); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.more-guide-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.more-guide-kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--citrus-ink); }
.more-guide-title { font-family: 'Bebas Neue', sans-serif; font-size: 22px; line-height: 1.1; }
.more-guide-arrow { color: var(--leaf); font-weight: 700; }
footer { padding: 36px 0 60px; border-top: 1px solid var(--line); margin-top: 24px; }
.fine { font-size: 16px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 14px; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: 3px; width: 100%; }
.foot-line { font-size: 12.5px; color: var(--ink-faint); }
.top-btn { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: var(--ground); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.top-btn[hidden] { display: none; }

/* ============ Pick popover ============ */
.mg-pop { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; padding: 20px; }
.mg-pop[hidden] { display: none; }
.mg-pop-backdrop { position: absolute; inset: 0; background: rgba(21, 22, 15, 0.62); backdrop-filter: blur(3px); }
.mg-pop-dialog { position: relative; width: min(760px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: 4px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); overflow: hidden; animation: mg-rise .18s ease; }
@keyframes mg-rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.mg-pop-dialog:focus { outline: none; }
.mg-pop-close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.mg-pop-scroll { overflow-y: auto; flex: 1 1 auto; }
.mg-pop-dialog.has-photo { width: min(920px, 100%); }
.mg-pop-layout.has-photo { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 100%; }
.mg-pop-main { min-width: 0; }
.mg-pop-photo { position: relative; margin: 0; background: var(--line); min-height: 320px; }
.mg-pop-photo { background: linear-gradient(100deg, var(--line) 30%, color-mix(in srgb, var(--line) 55%, #fff) 50%, var(--line) 70%) 0 0 / 200% 100%; animation: mg-shimmer 1.2s linear infinite; }
.mg-pop-photo { overflow: hidden; }
.mg-pop-photo img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block; opacity: 0; transition: opacity .2s ease; }
.mg-pop-photo img.is-loaded { opacity: 1; }
/* Whatever the photo does not fill is covered by a blurred, faded copy of it. */
.mg-pop-photo .mg-pop-photo-bg { z-index: 0; object-fit: cover; filter: blur(22px) saturate(1.15); transform: scale(1.18); }
.mg-pop-photo .mg-pop-photo-bg.is-loaded { opacity: .7; }
@keyframes mg-shimmer { to { background-position: -200% 0; } }
.mg-pop-art { position: relative; background: color-mix(in srgb, var(--c) 14%, var(--surface)); padding: 0 0 18px; overflow: hidden; }
.mg-pop-art .awning { margin: 0 0 14px; width: 100%; height: 26px; }
.mg-pop-art-row { display: flex; align-items: center; gap: 16px; padding: 0 30px; }
.mg-pop-ico { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--c); border: 3px solid var(--c); }
.mg-pop-ico svg { width: 38px; height: 38px; }
.mg-pop-kick { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--c); padding-right: 52px; }
.mg-pop-title { margin: 4px 0 0; font-size: 36px; line-height: 1; padding-right: 52px; }
.mg-pop-body { padding: 20px 30px 8px; display: flex; flex-direction: column; gap: 14px; }
.mg-pop-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.mg-fact { border: 1px solid var(--line); border-top: 2px dashed var(--line-strong); border-radius: 3px; padding: 10px 12px; background: var(--surface-2); }
.mg-fact span { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink-faint); }
.mg-fact b { display: block; font-size: 16px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.mg-pop-copy, .mg-pop-copy p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--ink-soft); }
.mg-pop-copy p + p { margin-top: 10px; }
.mg-pop-aside { font-family: 'Caveat', cursive; font-size: 20px; color: var(--citrus-ink); }
.mg-pop-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.mg-pop-nav { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 18px; background: var(--surface-2); border-top: 1px solid var(--line); }
.mg-pop-step { min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--leaf) 14%, transparent); color: var(--leaf-ink); font-weight: 700; font-size: 14px; cursor: pointer; }
.mg-pop-count { font-size: 13px; font-weight: 600; color: var(--ink-faint); }

@media (max-width: 719px) {
  .wrap, .more-guides { padding-left: 16px; padding-right: 16px; }
  .board { padding: 20px 18px 18px; }
    .day-art { display: none; }
  .mg-pop { padding: 0; align-items: flex-end; }
  .mg-pop-dialog { width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .mg-pop-art-row, .mg-pop-body { padding-left: 18px; padding-right: 18px; }
  .mg-pop-layout.has-photo { display: block; }
  .mg-pop-photo { min-height: 0; height: 200px; }
  .mg-pop-title { font-size: 28px; }
  .mg-pop-step-label { display: none; }
}

/* ============ Map ============ */
.map-section { padding: 40px 0 10px; scroll-margin-top: 150px; }
.map-frame { position: relative; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.map-canvas { width: 100%; height: 460px; background: color-mix(in srgb, var(--leaf) 8%, var(--surface-2)); }
.map-legend { list-style: none; margin: 0; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 13px; color: var(--ink-soft); }
.map-legend li { display: inline-flex; align-items: center; gap: 6px; }
.map-legend span { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); }
@media (max-width: 719px) { .map-canvas { height: 340px; } }

/* Quick-reference row headers read as text, not column headings. */
.ref tbody th { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; color: var(--ink); background: transparent; border-bottom: 1px solid var(--line); padding: 10px 14px; }
.ref tbody tr:last-child th { border-bottom: 0; }
.ref tbody .card-open { font-weight: 600; }
.sources-section { max-width: 1080px; margin: 40px auto 0; padding: 0 24px; }
.sources-section .section-head { margin-bottom: 8px; }
.sources-box p { margin: 0; }
.source-details { margin-top: 12px; }
.source-details summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--leaf-ink); }
.source-details summary:focus-visible { outline: 2px solid var(--leaf-ink); outline-offset: 3px; }
.source-count { font-weight: 400; color: var(--ink-faint); }
.source-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.source-list a { color: var(--leaf-ink); text-decoration: underline; text-underline-offset: 2px; }
