@font-face {
  font-family: Manrope;
  src: url('./assets/fonts/Manrope-variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
:root {
  color-scheme: light;
  --map-layout: desktop;
  --header-top: max(20px, env(safe-area-inset-top));
  --ink: #20332e;
  --muted: #60716b;
  --paper: #fffefa;
  --line: #dde3dd;
  --pine: #244d40;
  --mist: #f0f3ed;
  --accent: #bc653b;
  --shadow: 0 8px 30px #18382b14, 0 1px 4px #18382b0a;
  --ease: cubic-bezier(.23,1,.32,1);
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { background: #e4eae0; color: var(--ink); }
button, a { font: inherit; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
button, a, summary { touch-action: manipulation; }
:is(button,a,summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.map-shell, .map-stage { width: 100%; height: 100dvh; min-height: 0; }
.map-stage { position: relative; overflow: hidden; }
#map { position: absolute; inset: 0; }
.topbar {
  --fir-width: 124px;
  --header-cream: #fff5e7;
  --header-muted: #f1d9cb;
  position: absolute; z-index: 4; top: var(--header-top); left: max(20px, env(safe-area-inset-left));
  display: flex; align-items: center; gap: 26px; padding: 10px calc(var(--fir-width) + 8px) 10px 12px;
  border: 1px solid #f6d5bf40; border-radius: 20px; box-shadow: var(--shadow);
  background-color: #751e30;
  background-image:
    url('./assets/knitted-firs.svg'),
    linear-gradient(115deg, #4f0f225c, transparent 65%),
    linear-gradient(120deg, transparent 38%, #fff3e50e 44% 52%, transparent 58%),
    linear-gradient(60deg, transparent 38%, #22071238 44% 52%, transparent 58%);
  background-position: var(--fir-position, right bottom), center, 0 0, 3px 0;
  background-size: var(--fir-width) auto, 100% 100%, 6px 5px, 6px 5px;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
}
/* Hug the red edge; only the leading strand bends clear of the brand. */
.topbar-garland {
  position: absolute;
  left: -8px;
  top: -14px;
  width: calc(100vw - max(20px, env(safe-area-inset-left)) + 7px);
  height: 78px;
  overflow: hidden;
  pointer-events: none;
}
.garland-curl { position: absolute; left: 0; top: 0; width: 24px; height: 78px; }
.garland-strand {
  position: absolute;
  left: 27px;
  top: 0;
  width: calc(100% - 27px);
  height: 46px;
}
.garland-cord { fill: none; stroke: #35431c; stroke-width: 2.2; stroke-linecap: round; }
.garland-socket { fill: #35431c; stroke: #1e2c13; stroke-width: .5; }
.garland-glass { fill: color-mix(in srgb, currentColor 55%, #fff); stroke: #25321d; stroke-width: .65; opacity: 1; }
.garland-highlight { fill: none; stroke: #fff; stroke-width: 1; stroke-linecap: round; opacity: .8; }
.garland-lamp--red { color: #f34255; }
.garland-lamp--pink { color: #f06ab7; }
.garland-lamp--yellow { color: #ffdc43; }
.garland-lamp--teal { color: #29cbd1; }
.garland-lamp--green { color: #70cd58; }
.garland-lamp--purple { color: #b279ed; }
.garland-lamp-glow { opacity: .85; }
.garland-lamp-glow > path { fill: color-mix(in srgb, currentColor 55%, #fff); }
.garland-phase-1 { --lamp-duration: 2.8s; --lamp-delay: -.6s; }
.garland-phase-2 { --lamp-duration: 2.4s; --lamp-delay: -1.7s; }
.garland-phase-3 { --lamp-duration: 3.1s; --lamp-delay: -1.2s; }
.garland-phase-4 { --lamp-duration: 2.6s; --lamp-delay: -.3s; }
.garland-phase-5 { --lamp-duration: 3.4s; --lamp-delay: -2.1s; }
.garland-phase-6 { --lamp-duration: 2.9s; --lamp-delay: -.9s; }
/* Bright colored glass stays lit while its soft light gently breathes. */
@media (prefers-reduced-motion: no-preference) {
  .garland-lamp-glow { animation: garland-twinkle var(--lamp-duration) ease var(--lamp-delay) infinite alternate; }
}
@keyframes garland-twinkle { from { opacity: .55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .topbar-garland *, .topbar-garland *::after { animation: none; }
}
@media (max-width: 1000px), (max-height: 500px) and (min-width: 500px) {
  .topbar-garland { width: calc(100% + 8px); }
}
/* Original compact decoration: thin ribbons and tiny glints. */
.topbar-garland-simple {
  display: none;
  --garland-amber: #e6a448;
  --garland-teal: #73c6b7;
  --garland-cream: #f9ddb0;
  --garland-rose: #e58a9d;
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.topbar-garland-simple svg { display: block; margin-left: 50px; width: calc(100% - 50px); height: 5px; fill: none; stroke: #2f171d; stroke-width: 1px; }
/* Full-width colored light on the wire, not just on individual bulbs. */
.topbar-garland-simple .garland-ribbon { stroke-width:1.4px; opacity:.55; }
.topbar-garland-simple .garland-ribbon--warm { stroke:#edc17b; filter:drop-shadow(0 0 2px #e6a448); }
.topbar-garland-simple .garland-ribbon--cool { stroke:#91d5ca; filter:drop-shadow(0 0 2px #73c6b7); opacity:.12; }
@media (prefers-reduced-motion: no-preference) {
  .garland-ribbon--warm { animation:garland-ribbon-glow 7.6s ease -1.7s infinite alternate; }
  .garland-ribbon--cool { animation:garland-ribbon-glow 9.1s ease -6.2s infinite alternate-reverse; }
}
@keyframes garland-ribbon-glow { from { opacity:.12; } to { opacity:.7; } }
.topbar-garland-simple-lights {
  position: absolute;
  inset: 1px 18% auto;
  display: flex;
  justify-content: space-between;
}
.topbar-bulb {
  position: relative;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--bulb-color);
  box-shadow: 0 0 2px 1px #ffffffb3, 0 0 5px 2px var(--bulb-color), 0 0 9px 3px var(--bulb-color);
  opacity: 1;
}
.topbar-bulb::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--bulb-next);
  box-shadow: 0 0 2px 1px #ffffffb3, 0 0 5px 2px var(--bulb-next), 0 0 9px 3px var(--bulb-next);
  opacity: 0;
}
.topbar-bulb:nth-child(4n + 1) { --bulb-color: var(--garland-amber); --bulb-next: var(--garland-rose); }
.topbar-bulb:nth-child(4n + 2) { --bulb-color: var(--garland-teal); --bulb-next: var(--garland-cream); }
.topbar-bulb:nth-child(4n + 3) { --bulb-color: var(--garland-cream); --bulb-next: var(--garland-amber); }
.topbar-bulb:nth-child(4n) { --bulb-color: var(--garland-rose); --bulb-next: var(--garland-teal); }
@media (max-width: 1000px), (max-height: 500px) and (min-width: 500px) {
  .topbar-bulb--desktop { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .topbar-bulb::after { animation: garland-color var(--bulb-interval) ease var(--bulb-phase) infinite alternate; }
  /* Independent intervals and starting phases avoid a left-to-right chase. */
  .topbar-bulb:nth-child(1) { --bulb-interval: 7.6s; --bulb-phase: -1.7s; }
  .topbar-bulb:nth-child(2) { --bulb-interval: 6.6s; --bulb-phase: -4.9s; }
  .topbar-bulb:nth-child(3) { --bulb-interval: 8.4s; --bulb-phase: -3.4s; }
  .topbar-bulb:nth-child(4) { --bulb-interval: 6.2s; --bulb-phase: -.5s; }
  .topbar-bulb:nth-child(5) { --bulb-interval: 9.1s; --bulb-phase: -6.2s; }
  .topbar-bulb:nth-child(6) { --bulb-interval: 7.1s; --bulb-phase: -1.1s; }
  .topbar-bulb:nth-child(7) { --bulb-interval: 8.7s; --bulb-phase: -5.5s; }
  .topbar-bulb:nth-child(8) { --bulb-interval: 7.8s; --bulb-phase: -2.7s; }
}
@keyframes garland-color {
  0%, 40% { opacity: 0; }
  60%, 100% { opacity: .88; }
}
@media (max-width: 1000px), (max-height: 500px) and (min-width: 500px) {
  .topbar-garland { display: none; }
  .topbar-garland .garland-lamp-glow { animation: none; }
  .topbar-garland-simple { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar-garland-simple *, .topbar-garland-simple *::after { animation: none; }
}
.brand { display: flex; align-items: center; gap: 11px; color: var(--header-cream); text-decoration: none; min-height: 44px; height: 44px; }
.brand:focus-visible { outline-color: var(--header-cream); outline-offset: 2px; border-radius: 8px; }
.brand-mark { display: block; width: 34px; height: 54px; flex-shrink: 0; padding: 0; border: 0; border-radius: 0; background: transparent; object-fit: contain; }
.brand h1 { font-size: 20px; letter-spacing: -.7px; line-height: 1.2; margin: 0; font-weight: 800; }
.brand small { display: block; margin-top: 4px; color: var(--header-muted); font-size: 11px; font-weight: 500; }
.prototype-badge { padding-left: 22px; border-left: 1px solid #f1d9cb52; color: var(--header-muted); font-size: 12px; white-space: nowrap; }
.map-intro { position: absolute; z-index: 1; bottom: 27px; left: 22px; display: flex; gap: 16px; padding: 9px 14px; border: 1px solid #ffffffa6; border-radius: 24px; background: var(--paper); color: var(--muted); font-size: 11px; box-shadow: var(--shadow); }
.country-chooser { position: absolute; z-index: 3; left: max(20px, env(safe-area-inset-left)); top: calc(var(--header-top) + 82px); width: 350px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.country-chooser button { min-height: 44px; }
.country-chooser-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; border: 0; padding: 16px 18px; color: var(--ink); background: var(--paper); text-align: left; }
.country-chooser-toggle strong { font-size: 17px; font-weight: 800; letter-spacing: -.35px; }
.country-chooser-toggle small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.disclosure-arrow { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: var(--mist); color: var(--pine); transform-origin: 50% 50%; transition: transform 180ms var(--ease); }
.disclosure-arrow svg { display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.country-chooser-toggle[aria-expanded='true'] .disclosure-arrow { transform: rotate(180deg); }
#country-chooser-content { max-height: calc(100dvh - 235px); overflow-y: auto; overscroll-behavior: contain; scroll-padding: 12px 0 76px; border-top: 1px solid var(--line); }
.country-chooser-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; }
.country-chooser-heading p { font-size: 12px; color: var(--muted); line-height: 1.45; }
#all-countries { flex-shrink: 0; border: 0; background: transparent; color: var(--pine); font-size: 12px; font-weight: 700; padding: 8px 10px; border-radius: 10px; }
#all-countries[aria-pressed='true'] { background: var(--mist); }
.country-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 0 14px 16px; }
.country-options button { display: flex; align-items: center; gap: 5px; padding: 9px 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-align: left; font-size: 12px; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease; }
.country-check { width: 12px; flex-shrink: 0; opacity: 0; }
.country-option-count { margin-left: auto; color: var(--muted); font-size: 11px; }
.country-options button[aria-pressed='true'] { background: var(--pine); color: white; border-color: var(--pine); }
.country-options button[aria-pressed='true'] .country-check { opacity: 1; }
.country-options button[aria-pressed='true'] .country-option-count { color: #e2ebe6; }
.country-chooser :is(button,summary):focus-visible { outline-offset: -3px; }
.market-list { border-top: 1px solid var(--line); }
.list-heading { display: flex; align-items: center; gap: 10px; padding: 12px 16px; min-height: 48px; list-style: none; cursor: pointer; font-size: 12px; font-weight: 700; }
.list-heading::-webkit-details-marker { display: none; }
.list-heading::before { content: '+'; font-size: 20px; color: var(--pine); }
.market-list[open] .list-heading::before { content: '−'; }
#list-count { margin-left: auto; padding: 4px 7px; background: var(--mist); border-radius: 8px; font-size: 11px; }
.list-items { max-height: 230px; overflow-y: auto; overscroll-behavior: contain; }
.market-list button { width: 100%; display: block; text-align: left; padding: 14px 16px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); }
.market-list strong { display: block; font-size: 14px; font-weight: 700; line-height: 1.5; }
.market-list small { display: block; font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.market-list button.is-active { background: var(--mist); box-shadow: inset 3px 0 var(--pine); }
.country-chooser-footer { position: sticky; bottom: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--paper); }
#filter-result { font-size: 12px; color: var(--muted); }
#countries-done { background: var(--pine); border: 0; border-radius: 12px; color: white; padding: 10px 24px; font-weight: 700; }
.market-panel { position: absolute; z-index: 3; right: max(20px, env(safe-area-inset-right)); top: max(20px, env(safe-area-inset-top)); width: 380px; max-height: calc(100dvh - 65px); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateX(20px); transition: transform 200ms var(--ease), opacity 160ms ease; pointer-events: none; }
.market-panel.is-visible.is-suspended { visibility: hidden; opacity: 0; pointer-events: none; }
.market-panel.is-visible { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.panel-heading { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; padding: 10px 12px 0 20px; }
.eyebrow { margin: 0; font-size: 10px; letter-spacing: .12em; color: var(--muted); font-weight: 800; }
.icon-button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--mist); color: var(--ink); font-size: 28px; line-height: 1; }
.market-card { padding: 2px 20px 0; overflow-y: auto; overscroll-behavior: contain; scroll-padding: 12px; }
.original-name { margin: 0 0 6px; color: var(--pine); font-size: 12px; line-height: 1.4; font-weight: 700; }
.market-card h2 { margin: 0 0 16px; font-size: 23px; letter-spacing: -.75px; font-weight: 800; line-height: 1.25; text-wrap: balance; }
.details { display: grid; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.detail { display: grid; grid-template-columns: 20px 1fr; gap: 9px; font-size: 13px; line-height: 1.5; }
.detail-icon { color: var(--pine); text-align: center; font-size: 16px; }
.detail-label { display: block; color: var(--muted); font-size: 10px; margin-bottom: 2px; }
.description { margin: 12px 0 16px; font-size: 14px; line-height: 1.65; color: #455950; }
.event-notice { margin: 8px 0; border-left: 3px solid var(--accent); padding: 8px 12px; font-size: 13px; line-height: 1.5; background: #f9efe6; }
#card-details-toggle { min-height: 44px; border: 0; border-radius: 10px; padding: 8px 0; font-size: 13px; color: var(--pine); font-weight: 700; background: transparent; text-align: left; }
.actions { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 0 18px; background: var(--paper); border-top: 1px solid var(--line); }
.action { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 8px; border-radius: 12px; text-decoration: none; font-size: 12px; line-height: 1.4; font-weight: 800; text-align: center; }
.action-primary { background: var(--pine); color: white; }
.action-secondary { border: 1px solid var(--line); background: var(--mist); color: var(--pine); }
.maplibregl-ctrl-top-right { top: 94px; right: 10px; }
.maplibregl-ctrl-group { border-radius: 14px !important; box-shadow: var(--shadow) !important; overflow: hidden; }
.maplibregl-ctrl-group button { width: 44px !important; height: 44px !important; }
.map-stage:has(.market-panel.is-visible) .maplibregl-ctrl-top-right { right: 410px; }
.maplibregl-ctrl-attrib { font-family: inherit; font-size: 10px; }
@media (hover: hover) and (pointer: fine) {
  .country-options button:hover:not([aria-pressed='true']), .market-list button:hover, .icon-button:hover { background: var(--mist); border-color: #aebdb3; }
  .action-primary:hover, #countries-done:hover { background: #163b2f; }
  .action-secondary:hover { border-color: var(--pine); }
}
@media (max-width: 1000px) {
  :root { --map-layout: sheet; --header-top: max(12px, env(safe-area-inset-top)); }
  .topbar { --fir-width: clamp(68px, calc(44vw - 72px), 124px); top: var(--header-top); left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); padding: 9px calc(var(--fir-width) + 4px) 9px 12px; border-radius: 18px; }
  .brand h1 { font-size: 19px; }
  .brand small { font-size: 10px; }
  .brand-mark { width: 34px; height: 54px; }
  .prototype-badge { display: none; }
  .country-chooser { top: calc(var(--header-top) + 76px); left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); width: auto; border-radius: 17px; }
  .country-chooser-toggle { padding: 12px 16px; }
  .country-chooser-toggle strong { font-size: 15px; }
  .country-chooser-toggle small { font-size: 11px; }
  #country-chooser-content { max-height: calc(100dvh - 205px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .map-intro { left: 12px; bottom: max(28px, env(safe-area-inset-bottom)); gap: 12px; padding: 8px 12px; font-size: 10px; }
  .market-panel { top: auto; bottom: max(26px, env(safe-area-inset-bottom)); right: 12px; left: 12px; width: auto; max-height: 48dvh; border-radius: 22px; transform: translateY(16px); }
  .market-panel.is-expanded { max-height: calc(100dvh - 240px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .market-panel.is-visible.is-suspended { visibility: hidden; opacity: 0; pointer-events: none; }
  .panel-heading { padding-top: 5px; }
  .market-card { padding: 0 16px; }
  .market-card h2 { font-size: 20px; letter-spacing: -.5px; margin-bottom: 10px; }
  .details { gap: 10px; }
  .actions { padding-bottom: 12px; }
  .maplibregl-ctrl-top-right, .map-stage:has(.market-panel.is-visible) .maplibregl-ctrl-top-right { top: calc(var(--header-top) + 162px); right: 2px; }
  .map-stage:has(.market-panel.is-visible) .maplibregl-ctrl-top-right { top: calc(var(--header-top) + 142px); }
  .map-stage:has(.market-panel.is-visible) .maplibregl-ctrl-group { display: flex; }
  .map-stage:has(.market-panel.is-visible) .maplibregl-ctrl-group button + button { border-top: 0; border-left: 1px solid var(--line); }
  .map-stage:has(.market-panel.is-visible) .map-intro, .map-stage:has(#country-chooser-toggle[aria-expanded='true']) .map-intro { visibility: hidden; }
}
@media (max-height: 500px) and (min-width: 500px) {
  :root { --map-layout: landscape; }
  .topbar { --fir-width: clamp(31px, calc(13vw - 34px), 62px); --fir-position: right 2px bottom 6px; top: var(--header-top); left: 12px; right: auto; max-width: 42vw; padding: 6px calc(var(--fir-width) + 6px) 6px 10px; }
  .prototype-badge, .brand small, .map-intro { display: none; }
  .brand h1 { font-size: clamp(15px, calc(5vw - 10px), 18px); }
  .brand-mark { width: 26px; height: 44px; }
  .country-chooser { top: calc(var(--header-top) + 68px); left: 12px; right: auto; width: min(290px, 42vw); }
  .country-chooser-toggle { padding: 10px 14px; }
  #country-chooser-content { max-height: calc(100dvh - 170px); }
  .country-options { grid-template-columns: 1fr; }
  .market-panel, .market-panel.is-expanded { top: 12px; bottom: auto; left: auto; right: 12px; width: min(340px, 52vw); max-height: calc(100dvh - 38px); }
  .market-card h2 { font-size: 20px; }
  .maplibregl-ctrl-top-right, .map-stage:has(.market-panel.is-visible) .maplibregl-ctrl-top-right { top: auto; bottom: 25px; left: 2px; right: auto; }
  .map-stage:has(.market-panel.is-visible) .maplibregl-ctrl-group { display: block; }
  .map-stage:has(.market-panel.is-visible) .maplibregl-ctrl-group button + button { border-left: 0; border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

.guide-label { display: inline-block; margin: 0 0 7px; padding: 4px 8px; border-radius: 7px; background: var(--mist); color: var(--pine); font-size: 10px; font-weight: 700; line-height: 1.4; }
.market-list .guide-label { margin: 5px 0 0; }
.guide-legend { display: flex; align-items: center; gap: 8px; margin: 12px 16px 0; color: var(--muted); font-size: 11px; }
.guide-legend img { width: 28px; height: 28px; object-fit: contain; padding: 5px; border: 2px solid var(--pine); border-radius: 50%; background: var(--paper); }

.official-links { display: flex; flex-wrap: wrap; gap: 4px 12px; padding-top: 8px; }
.official-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0; color: var(--pine); font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.editorial-label { display: inline-block; margin: 0 0 7px; padding: 4px 8px; border-radius: 7px; background: #f7e9ca; color: #644b20; font-size: 10px; font-weight: 700; line-height: 1.4; }
.market-list .editorial-label { margin: 5px 0 0; }
.editorial-legend { display: flex; align-items: center; gap: 12px; margin: 12px 20px 0; color: var(--muted); font-size: 11px; }
.editorial-key { width: 16px; height: 16px; margin: 4px; transform: rotate(45deg); border: 2px solid var(--paper); background: #d7a84b; }

/* Collection and country controls share one predictable selection state. */
.collection-options { display: grid; gap: 8px; padding: 14px 14px 4px; }
.collection-options button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font-size: 12px; font-weight: 700; text-align: left; transition: background-color 160ms var(--ease), border-color 160ms var(--ease); }
.collection-options button[aria-pressed='true'] { background: var(--mist); border-color: var(--pine); }
.collection-options img { width: 28px; height: 28px; object-fit: contain; padding: 0; border: 0; border-radius: 0; background: transparent; }
.collection-check { margin-left: auto; opacity: 0; }
.collection-options [aria-pressed='true'] .collection-check { opacity: 1; }
.unusual-label { display:inline-block; margin:0 0 7px; padding:4px 8px; border-radius:7px; background:#f1e8f0; color:#65445d; font-size:10px; font-weight:700; line-height:1.4; }
.market-list .unusual-label { margin:5px 0 0; }
.collection-labels { display:flex; flex-wrap:wrap; align-items:flex-start; gap:4px; }
.collection-labels p { margin:0; }
.collection-options img.unusual-key { padding:0; border:0; background:transparent; }
.market-panel.has-photo .market-card > .collection-labels { position:absolute; top:16px; left:16px; z-index:2; max-width:calc(100% - 88px); }
.market-panel.has-photo .collection-labels p { box-shadow:0 2px 8px #102c3520; }
.country-flag { width: 24px; height: 18px; flex: 0 0 24px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px #20332e1a; }
.country-options button { gap: 7px; }
.empty-results { margin: 10px 16px 16px; color: var(--muted); font-size: 13px; line-height: 1.6; }
#reset-filters { margin-left: auto; border: 0; padding: 8px; background: transparent; color: var(--pine); font-size: 12px; }

/* The card heading keeps the disclosure reachable even in short landscapes. */
.panel-heading { display: grid; grid-template-columns: 1fr 44px; gap: 6px 8px; padding: 8px 16px 10px; }
#card-details-toggle { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 14px; background: var(--mist); border: 1px solid var(--line); border-radius: 12px; transition: background-color 180ms var(--ease), border-color 180ms var(--ease); }
#card-details-toggle[aria-expanded='true'] { background: #e1ebe3; border-color: #9aac9f; }
#card-details-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; flex-shrink: 0; transition: transform 180ms var(--ease); }
#card-details-toggle[aria-expanded='true'] svg { transform: rotate(180deg); }
.keyboard-motion #card-details-toggle, .keyboard-motion #card-details-toggle svg { transition: none; }
.detail { align-items: start; }
.detail-icon { display: grid; place-items: center; width: 20px; height: 20px; }
.detail-icon svg { width: 19px; height: 19px; }
.collection-options img.editorial-key { width: 28px; height: 28px; padding: 0; margin: 0; border: 0; background: transparent; border-radius: 0; transform: none; }
.guide-label::before, .editorial-label::before, .unusual-label::before { content: ''; display: inline-block; width: 16px; height: 16px; margin-right: 4px; vertical-align: -4px; background: center / contain no-repeat; }
@media (max-height: 500px) and (min-width: 500px) { .panel-heading { padding: 4px 12px 8px; gap: 2px; } }

.approved-description .description { white-space: pre-wrap; }
.market-photo { margin: 12px 0 18px; }
.photo-frame { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: var(--mist); }
.photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-frame { position:relative; }
.photo-frame img[hidden],.photo-fallback[hidden] { display:none; }
.photo-fallback { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:20px; color:var(--ink); background:var(--mist); text-align:center; }
.photo-fallback p { margin:0; }
.photo-retry { min-height:44px; padding:10px 16px; border:1px solid var(--pine); border-radius:10px; background:var(--paper); color:var(--pine); font:inherit; font-weight:700; cursor:pointer; }
.photo-retry:disabled { opacity:.6; cursor:wait; }
.photo-credit { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; margin-top: 6px; font-size: 10px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.photo-credit > span { width: 100%; }
.photo-credit a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-underline-offset: 3px; }
.city-products { margin: 18px 0; padding-top: 16px; border-top: 1px solid var(--line); }
.city-products h3 { margin: 0 0 5px; font-size: 16px; letter-spacing: -.3px; }
.city-products > p { margin: 0 0 12px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.city-product { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 14px; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; background: var(--paper); }
.city-product img { width: 72px; height: 104px; object-fit: contain; }
.city-product strong { display: block; font-size: 13px; line-height: 1.5; }
.product-cta { display: block; margin-top: 10px; color: var(--pine); font-size: 11px; line-height: 1.5; font-weight: 700; }
@media (hover: hover) and (pointer: fine) { .city-product:hover { border-color: var(--pine); background: var(--mist); } }

/* Eligible photos are a first-view preview, never gated by prose disclosure. */
.market-panel.has-photo .panel-heading { position: absolute; top: 8px; right: 8px; z-index: 3; display: block; padding: 0; }
.market-panel.has-photo .panel-heading .eyebrow { display: none; }
.market-panel.has-photo .market-card > .guide-label, .market-panel.has-photo .market-card > .editorial-label { position: absolute; top: 16px; left: 16px; z-index: 2; max-width: calc(100% - 88px); box-shadow: 0 2px 8px #102c3520; }
.market-panel.has-photo #close-card { background: #fff; box-shadow: 0 2px 12px #102c3540; }
.market-panel.has-photo .market-card { padding-top: 0; }
.market-panel.has-photo .market-photo { margin: 0 -20px 14px; }
.market-panel.has-photo .photo-frame { border-radius: 0; }
.market-panel.has-photo #card-details-toggle { margin: 4px 0 12px; }
.photo-credit { display: block; margin: 0; padding: 6px 20px; background: var(--paper); font-size: 11px; }
.photo-credit summary { display: flex; align-items: center; min-height: 44px; padding-right: 12px; cursor: pointer; color: var(--pine); font-weight: 600; }
.photo-credit summary::after { content: '+'; margin-left: auto; padding-left: 8px; font-size: 18px; }
.photo-credit details[open] summary::after { content: '−'; }
.photo-credit-details { display: flex; flex-wrap: wrap; gap: 0 8px; padding-bottom: 8px; }
.photo-credit-details > span { width: 100%; }
@media (max-width: 1000px) {
  .market-panel.has-photo, .market-panel.has-photo.is-expanded { left: auto; width: min(420px, calc(100% - 24px)); max-height: calc(100dvh - 265px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .market-panel.has-photo .market-photo { margin-left: -16px; margin-right: -16px; }
  .photo-credit { padding-left: 16px; padding-right: 16px; }
}
@media (max-height: 500px) and (min-width: 500px) {
  .market-panel.has-photo, .market-panel.has-photo.is-expanded { width: min(340px, 52vw); max-height: calc(100dvh - 38px); }
}

.photo-required-credit { font-size: 12px; line-height: 1.5; color: var(--ink); }
.photo-required-credit a { color: var(--pine); }

/* Native attribution remains available; only its native compact state folds. */
.maplibregl-ctrl-bottom-right:has(.maplibregl-ctrl-attrib) { bottom: env(safe-area-inset-bottom, 0px); }
.maplibregl-ctrl-attrib.maplibregl-compact {
  min-width: 44px; min-height: 44px; box-sizing: border-box; margin: 0;
  padding: 0; border-radius: 12px 0 0 0; background: transparent;
}
.maplibregl-ctrl-attrib.maplibregl-compact-show {
  max-width: calc(100vw - 12px); padding: 0 44px 0 0;
}
.maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-button {
  width: 44px; height: 44px; right: 0; top: auto; bottom: 0;
  background-position: center; background-repeat: no-repeat; background-size: 24px 24px;
  background-color: #fff; border-radius: 12px 0 0 0;
}
.maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-inner {
  line-height: 12px; padding: 2px 8px; background: #fff; border-radius: 12px 0 0 0;
  transform: translateY(calc(44px - 100%));
}

.programme-venues { margin: 12px 0; border-top: 1px solid var(--line); padding-top: 12px; }
.programme-venues summary { cursor: pointer; font-size: 12px; font-weight: 700; line-height: 1.5; }
.programme-venues p { color: var(--muted); font-size: 11px; margin: 8px 0; }
.programme-venues ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; padding: 0; list-style: none; }
.programme-venues button { width: 100%; min-height: 44px; padding: 8px; text-align: left; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); color: var(--pine); font: inherit; font-size: 12px; cursor: pointer; }
.programme-venues button:hover { border-color: var(--pine); }

/* A transparent rail groups two independent surfaces without overlaying either. */
.market-rail { position: absolute; z-index: 3; top: max(20px, env(safe-area-inset-top)); right: max(20px, env(safe-area-inset-right)); width: 380px; max-height: calc(100dvh - 65px); display: flex; flex-direction: column; gap: 24px; pointer-events: none; }
.market-rail > .market-panel { position: relative; inset: auto; width: 100%; max-height: none; min-height: 0; flex: 0 1 auto; }
.market-rail .market-card { min-height: 0; }
.market-rail:has(.market-panel.is-suspended) > .city-guide-offer { visibility: hidden; pointer-events: none; }
/* The guide is a sibling below the main surface, never part of its footer. */
.city-guide-offer { flex: 0 0 auto; min-height: 0; margin: 0; padding: 12px 16px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); pointer-events: auto; }
.city-guide-offer[hidden] { display: none; }
.city-guide-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.city-guide-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.city-guide-close { flex-shrink: 0; display: grid; place-items: center; width: 44px; height: 44px; margin: -10px -12px -4px 0; border: 0; border-radius: 12px; color: var(--pine); background: transparent; font-size: 23px; }
.city-guide-products { display: flex; overflow-x: auto; gap: 12px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.city-guide-product { display: flex; flex: 0 0 100%; align-items: center; gap: 12px; min-width: 0; color: var(--ink); text-decoration: none; scroll-snap-align: start; }
.city-guide-product img { flex-shrink: 0; width: 52px; height: 72px; object-fit: contain; border-radius: 3px; }
.city-guide-product > span { min-width: 0; display: grid; gap: 5px; }
.city-guide-product strong { font-size: 13px; line-height: 1.35; }
.city-guide-cta { display: inline-flex; align-items: center; min-height: 32px; gap: 5px; font-size: 12px; font-weight: 700; color: var(--pine); text-decoration: underline; text-underline-offset: 3px; }
.city-guide-product:focus-visible, .city-guide-close:focus-visible { outline: 2px solid var(--pine); outline-offset: -2px; }
@media (prefers-reduced-motion: no-preference) {
  .city-guide-offer { opacity: 1; transform: translateY(0); transition: opacity 180ms var(--ease), transform 180ms var(--ease); }
  @starting-style { .city-guide-offer { opacity: 0; transform: translateY(6px); } }
}
@media (hover: hover) and (pointer: fine) {
  .city-guide-close:hover { background: #dce5db; }
  .city-guide-product:hover .city-guide-cta { text-decoration-thickness: 2px; }
}
@media (max-width: 1000px), (max-height: 500px) and (min-width: 500px) {
  .market-rail { top: auto; bottom: max(26px, env(safe-area-inset-bottom)); right: 12px; left: auto; width: min(420px, calc(100% - 24px)); max-height: calc(100dvh - 265px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); gap: 16px; }
  .market-rail > .market-panel, .market-rail > .market-panel.has-photo, .market-rail > .market-panel.is-expanded { position: relative; inset: auto; width: 100%; max-height: none; }
  .city-guide-offer { padding: 8px 12px 10px; border-radius: 16px; }
  .city-guide-product img { width: 40px; height: 55px; }
  .city-guide-product strong { font-size: 12px; }
  .city-guide-heading p { font-size: 10px; }
  .city-guide-cta { font-size: 11px; }
}
.city-guide-offer.has-multiple .city-guide-product { flex-basis: 90%; }

@media (max-height: 500px) and (min-width: 500px) {
  .market-rail { top: 12px; bottom: auto; width: min(340px, 52vw); max-height: calc(100dvh - 38px); }
}

/* A direct mobile product card keeps one cover, title and link, without a disclosure. */
@media (max-width: 1000px), (max-height: 500px) and (min-width: 500px) {
  .market-rail { max-height: calc(100dvh - 330px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .market-rail > .market-panel > .actions { flex-shrink: 0; position: relative; margin: 0 16px; padding: 10px 0 12px; }
  .city-guide-offer { position: relative; padding: 10px 48px 10px 12px; }
  .city-guide-heading { position: absolute; top: 2px; right: 2px; }
  .city-guide-heading p { display: none; }
  .city-guide-heading .city-guide-close { margin: 0; }
  .city-guide-products { align-items: stretch; }
  .city-guide-product { min-height: 55px; }
}
@media (max-height: 500px) and (min-width: 500px) {
  .market-rail { max-height: calc(100dvh - 38px); }
}

.guide-label::before { background-image: url('./assets/category-guide-felt-santa.png'); }
.editorial-label::before { background-image: url('./assets/category-main-felt-star.png'); }
.unusual-label::before { background-image: url('./assets/category-unusual-ufo-reindeer.png'); }
