/* Street art map. Colours come from the theme's tokens, so the dark theme (data-theme="dark") needs no rules of its own here. */
.stc-map { --m-ink: var(--wp--preset--color--ink, #111); --m-ink-2: var(--wp--preset--color--ink-2, #55555a); --m-ink-3: var(--wp--preset--color--ink-3, #8a8a8a);
	--m-line: var(--wp--preset--color--hairline, #e5e5ea); --m-line-2: var(--wp--preset--color--hairline-dark, #d2d2d7);
	--m-bg: var(--wp--preset--color--canvas, #fff); --m-subtle: var(--wp--preset--color--canvas-subtle, #f5f5f7);
	color: var(--m-ink); padding-bottom: 48px; }
.stc-map * { box-sizing: border-box; }
.stc-map { padding-bottom: 0; }
.stc-map__head { padding: 16px 0 4px; }
.stc-map__head h1 { margin: 0; font-family: var(--wp--preset--font-family--cindie-mono, monospace); font-weight: 400; letter-spacing: 0; line-height: 1.15; font-size: min(1.375rem, calc((100vw - 2rem) / 14)); overflow-wrap: normal; }

/* Full width, as tall as the screen under the header: side panel (title, filters, list) on the left, map filling the rest.
   The panel can be hidden. On a phone: title and filters, then the map, then the list. */
.stc-map__app { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "panel" "stage"; padding-inline: var(--wp--custom--gutter, 16px); gap: 12px; padding-block: 8px 24px; }
.stc-map__panel { grid-area: panel; display: contents; }
.stc-map__head { grid-area: auto; }
.stc-map__stage { grid-area: stage; height: clamp(300px, 52dvh, 480px); border: 1px solid var(--m-line); border-radius: 16px; overflow: hidden; }
.stc-map__toggle { display: none; }
.stc-map__filters { display: grid; gap: 10px; }
.stc-map__filters > .stc-map__row:nth-child(2) { order: -1; } /* artist search first */
.stc-map__list { max-height: 60dvh; border: 1px solid var(--m-line); border-radius: 16px; }
.stc-map__panel > * { order: 0; }
.stc-map__app { display: flex; flex-direction: column; }
.stc-map__app .stc-map__stage { order: 1; }
.stc-map__app .stc-map__panel { display: contents; }
.stc-map__app .stc-map__head, .stc-map__app .stc-map__filters { order: 0; }
.stc-map__app .stc-map__bar, .stc-map__app .stc-map__list, .stc-map__app .stc-map__none { order: 2; }
@media (max-width: 899px) { .stc-pop__img { height: 110px; } }
@media (min-width: 900px) {
	.stc-map__app { --m-header: 61px; display: grid; grid-template-columns: 320px minmax(0, 1fr); grid-template-areas: "panel stage"; gap: 0; padding: 0; height: max(560px, calc(100dvh - var(--m-header))); }
	.stc-map.is-collapsed .stc-map__app { grid-template-columns: 0 minmax(0, 1fr); }
	.stc-map__app .stc-map__panel { display: flex; flex-direction: column; gap: 10px; min-height: 0; padding: 10px 16px 0; background: var(--m-bg); border-right: 1px solid var(--m-line); overflow: hidden; }
	.stc-map.is-collapsed .stc-map__app .stc-map__panel { display: none; }
	.stc-map__app .stc-map__panel > * { order: 0; }
	.stc-map__stage { height: auto; border: 0; border-radius: 0; }
	.stc-map__list { flex: 1 1 auto; max-height: none; border: 0; border-top: 1px solid var(--m-line); margin-inline: -16px; }
	.stc-map__none { margin: 0; }
	.stc-map__chips { flex-wrap: wrap; overflow: visible; }
	.stc-map__toggle { display: grid; place-items: center; position: absolute; z-index: 5; top: 50%; left: 320px; transform: translateY(-50%); width: 24px; height: 48px; padding: 0; border: 1px solid var(--m-line-2); border-left: 0; border-radius: 0 10px 10px 0; background: var(--m-bg); color: var(--m-ink); font-size: 20px; line-height: 1; cursor: pointer; }
	.stc-map.is-collapsed .stc-map__app .stc-map__toggle { left: 0; }
	.stc-map__toggle:focus-visible { outline: 2px solid var(--m-ink); outline-offset: 2px; }
}

.stc-map__row { display: grid; gap: 6px; }
.stc-map__lab { font-size: var(--wp--preset--font-size--xs, 0.75rem); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--m-ink-2); }
.stc-map__chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.stc-map__chips::-webkit-scrollbar { display: none; }
.stc-chip { flex: 0 0 auto; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--m-line-2); background: var(--m-bg); color: var(--m-ink); font: inherit; font-size: var(--wp--preset--font-size--small, 0.875rem); font-weight: 500; cursor: pointer; white-space: nowrap; }
.stc-chip:hover { border-color: var(--m-ink); }
.stc-chip[aria-pressed="true"], .stc-chip--on { background: var(--m-ink); border-color: var(--m-ink); color: var(--m-bg); }
.stc-chip:focus-visible, .stc-map__open:focus-visible, .stc-map__item:focus-visible, .stc-map input:focus-visible { outline: 2px solid var(--m-ink); outline-offset: 2px; }
.stc-map__artist { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stc-map__artist input[type="text"] { min-height: 44px; width: 100%; padding: 0 16px; border: 1px solid var(--m-line-2); border-radius: 999px; background: var(--m-bg); color: var(--m-ink); font: inherit; font-size: 1rem; }
.stc-map__picked { display: contents; }
.stc-map__gone { display: inline-flex; gap: 8px; align-items: center; min-height: 36px; font-size: var(--wp--preset--font-size--small, 0.875rem); color: var(--m-ink-2); cursor: pointer; }
.stc-map__gone input { width: 18px; height: 18px; accent-color: var(--m-ink); }
.stc-map__count { margin: 0; font-size: var(--wp--preset--font-size--small, 0.875rem); color: var(--m-ink-2); }

.stc-map__stage { position: relative; background: var(--m-subtle); min-height: 0; }
.stc-map .stc-map__canvas { position: absolute; inset: 0; width: 100%; height: 100%; } /* MapLibre's own CSS sets position: relative on its container; this is more specific */
.stc-map__fail { display: grid; place-content: center; padding: 24px; text-align: center; color: var(--m-ink-2); }
.stc-map__cover { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; background: var(--m-subtle); }
.stc-map__cover[hidden] { display: none; }
.stc-map__cover p { margin: 0; max-width: 24rem; color: var(--m-ink-2); }
.stc-map__open { min-height: 48px; padding: 0 28px; border-radius: 999px; border: 0; background: var(--m-ink); color: var(--m-bg); font: inherit; font-weight: 600; cursor: pointer; }
.stc-map__open:disabled { opacity: 0.6; cursor: progress; }
.stc-map__list { list-style: none; margin: 0; padding: 0; overflow-y: auto; border-top: 1px solid var(--m-line); min-height: 0; }
.stc-map__list li[hidden] { display: none; }
.stc-map__list li + li { border-top: 1px solid var(--m-line); }
.stc-map__item { display: grid; width: 100%; gap: 2px; padding: 12px 16px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; min-height: 56px; }
.stc-map__item:hover { background: var(--m-subtle); }
.stc-map__t { font-weight: 600; }
.stc-map__m { font-size: var(--wp--preset--font-size--small, 0.875rem); color: var(--m-ink-2); }
.stc-map__tag { justify-self: start; margin-top: 4px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--m-line-2); font-size: var(--wp--preset--font-size--xs, 0.75rem); color: var(--m-ink-2); }
.stc-map__none { margin: 0; padding: 16px; color: var(--m-ink-2); }
.stc-map__privacy { margin: 16px 0 0; font-size: var(--wp--preset--font-size--small, 0.875rem); color: var(--m-ink-2); max-width: 44rem; }

/* Popup: MapLibre draws its own white box; the theme tokens recolour it so dark mode matches. */
.stc-popup .maplibregl-popup-content { padding: 0; border-radius: 14px; background: var(--wp--preset--color--canvas, #fff); color: var(--wp--preset--color--ink, #111); overflow: hidden; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25); }
.stc-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip, .stc-popup.maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .stc-popup.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: var(--wp--preset--color--canvas, #fff); }
.stc-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .stc-popup.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .stc-popup.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: var(--wp--preset--color--canvas, #fff); }
.stc-popup.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: var(--wp--preset--color--canvas, #fff); }
.stc-popup.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: var(--wp--preset--color--canvas, #fff); }
.stc-popup .maplibregl-popup-close-button { width: 36px; height: 36px; font-size: 22px; color: #fff; text-shadow: 0 0 4px rgba(0, 0, 0, 0.6); background: transparent; }
.stc-pop { padding-bottom: 14px; }
.stc-pop__img { display: block; width: 100%; height: 150px; object-fit: cover; background: var(--wp--preset--color--canvas-subtle, #f5f5f7); }
.stc-pop > :not(.stc-pop__img) { margin: 0; padding: 0 16px; }
.stc-pop__t { font-size: 1.0625rem; line-height: 1.25; padding-top: 12px !important; }
.stc-pop__a, .stc-pop__m, .stc-pop__s { font-size: 0.875rem; color: var(--wp--preset--color--ink-2, #55555a); }
.stc-pop__a { padding-top: 4px !important; }
.stc-pop__tag { padding-top: 6px !important; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--wp--preset--color--ink-3, #8a8a8a); }
.stc-pop__x { font-size: 0.9375rem; padding-top: 8px !important; }
.stc-pop a { color: inherit; text-underline-offset: 2px; }
.maplibregl-ctrl-attrib { font-size: 11px; }
/* Quiet credit: no white pill in the dark theme, muted text, small "i" button. The credit itself stays. */
.stc-map .maplibregl-ctrl-attrib.maplibregl-ctrl { background: color-mix(in srgb, var(--m-bg) 62%, transparent); color: var(--m-ink-3); }
.stc-map .maplibregl-ctrl-attrib a { color: inherit; }
.stc-map__credit { margin: 0; padding: 6px 0 10px; font-size: 11px; line-height: 1.4; color: var(--m-ink-3); opacity: 0.8; }
.stc-map__credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
html[data-theme="dark"] .stc-map .maplibregl-ctrl-attrib-button { filter: invert(1); opacity: 0.7; }
.stc-popup .maplibregl-popup-content :focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* The page template's main is narrowed to the site column by the theme; the map page uses the whole width. */
.wp-site-blocks main.stc-map-page > *, .wp-site-blocks main.stc-map-page .wp-block-post-content, .wp-site-blocks main.stc-map-page .wp-block-post-content > * { width: 100%; max-width: none; margin-inline: 0; }
.stc-map-page .stc-map__privacy { padding-inline: var(--wp--custom--gutter, 16px); }

/* Panel structure: title, then one filter card with a labelled group each (artist, year, status), then the list with its count. */
.stc-map__head { padding: 6px 0 2px; }
.stc-map__filters { gap: 0; border: 1px solid var(--m-line); border-radius: 14px; background: var(--m-subtle); }
.stc-map__filters > * { padding: 10px 12px; }
.stc-map__filters > * + * { border-top: 1px solid var(--m-line); }
.stc-map__row { display: grid; gap: 6px; }
.stc-map__lab { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--m-ink-3); }
.stc-chip { min-height: 30px; padding: 0 12px; font-size: 0.8125rem; }
.stc-map__chips { gap: 6px; padding: 0 2px 2px; }
.stc-map__artist input[type="text"] { min-height: 38px; font-size: 0.9375rem; padding: 0 14px; }
.stc-map__picked { display: contents; }
/* Status switch */
.stc-map__gone { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 0; font-size: 0.875rem; color: var(--m-ink); cursor: pointer; flex-direction: row-reverse; }
.stc-map__gone input { appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 36px; height: 20px; margin: 0; border-radius: 999px; background: var(--m-line-2); position: relative; cursor: pointer; transition: background 150ms ease; }
.stc-map__gone input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--m-bg); transition: transform 150ms ease; }
.stc-map__gone input:checked { background: var(--m-ink); }
.stc-map__gone input:checked::after { transform: translateX(16px); }
/* List header and rows */
.stc-map__bar { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 2px 0; }
.stc-map__count { font-size: 0.8125rem; font-weight: 600; color: var(--m-ink); }
.stc-map__item { padding: 9px 16px; min-height: 48px; gap: 0; }
.stc-map__t { font-size: 0.9375rem; line-height: 1.3; }
.stc-map__m { font-size: 0.8125rem; }
.stc-map__tag { margin-top: 2px; }

.stc-pop__more { display: block; margin: 8px 16px 0; min-height: 28px; padding: 0 12px; border: 1px solid var(--wp--preset--color--hairline-dark, #d2d2d7); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: 0.75rem; font-weight: 600; cursor: pointer; }
.stc-pop__more:hover { background: var(--wp--preset--color--ink, #111); color: var(--wp--preset--color--canvas, #fff); }
.stc-card { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 0; border-radius: 16px; overflow: auto; background: var(--wp--preset--color--canvas, #fff); color: var(--wp--preset--color--ink, #111); }
.stc-card::backdrop { background: rgba(0, 0, 0, 0.55); }
.stc-card__img { display: block; width: 100%; max-height: 50dvh; object-fit: cover; background: var(--wp--preset--color--canvas-subtle, #f5f5f7); }
.stc-card__body { padding: 20px 24px 24px; display: grid; gap: 8px; }
.stc-card__body > * { margin: 0; }
.stc-card__t { font-size: 1.375rem; line-height: 1.2; }
.stc-card__a, .stc-card__m, .stc-card__s { color: var(--wp--preset--color--ink-2, #55555a); }
.stc-card__x2 { line-height: 1.55; white-space: pre-line; } /* Blank lines between the paragraphs of the story stay. */
.stc-card a { color: inherit; text-underline-offset: 2px; }
.stc-card__x { position: absolute; top: 8px; right: 8px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.stc-card__x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Keep it light: no card, no extra borders, one scroll area (the whole panel). */
.stc-map__filters { border: 0; background: none; border-radius: 0; gap: 14px; }
.stc-map__filters > * { padding: 0; }
.stc-map__filters > * + * { border-top: 0; }
.stc-map__bar { padding: 2px 0 0; }
.stc-map__list { border: 0; border-radius: 0; overflow: visible; max-height: none; }
.stc-map__list li + li { border-top: 1px solid var(--m-line); }
.stc-map__item { padding-inline: 0; }
@media (min-width: 900px) {
	.stc-map__app .stc-map__panel { overflow-y: auto; padding-bottom: 16px; scrollbar-width: thin; scrollbar-color: var(--m-line-2) transparent; }
	.stc-map__list { flex: 0 0 auto; margin-inline: 0; border-top: 0; }
}
@media (max-width: 899px) { .stc-map__list { max-height: none; } }
html.stc-card-open { overflow: hidden; }
.stc-card { overscroll-behavior: contain; }
/* The popup rule above zeroes margins of its children; the button needs its own spacing back, more specific than that rule. */
.stc-pop > button.stc-pop__more { display: inline-block; width: auto; margin: 8px 0 0 16px; padding: 0 12px; height: 28px; min-height: 0; line-height: 26px; font-size: 0.75rem; font-weight: 600; border-radius: 999px; box-sizing: border-box; }
.stc-card__copy { justify-self: start; margin-top: 8px; min-height: 30px; padding: 0 14px; border: 1px solid var(--wp--preset--color--hairline-dark, #d2d2d7); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: 0.8125rem; font-weight: 600; cursor: pointer; }

/* Phone: the app fills the screen under the header. Map and list are two views, switched from a bar at the bottom. */
.stc-map__tabs { display: none; }
@media (max-width: 899px) {
	.stc-map .stc-map__app { display: block; position: relative; height: calc(100dvh - 61px); min-height: 480px; padding: 0; overflow: hidden; }
	.stc-map .stc-map__stage { position: absolute; inset: 0; height: auto; border: 0; border-radius: 0; }
	.stc-map .stc-map__panel { display: block; position: absolute; inset: 0; z-index: 3; overflow-y: auto; padding: 8px var(--wp--custom--gutter, 16px) 96px; background: var(--m-bg); }
	.stc-map .stc-map__panel > * { margin-bottom: 14px; }
	.stc-map[data-view="map"] .stc-map__panel { display: none; }
	.stc-map .stc-map__list { max-height: none; margin-bottom: 0; }
	.stc-map__tabs { display: flex; position: absolute; z-index: 4; left: 50%; bottom: 20px; transform: translateX(-50%); padding: 4px; gap: 2px; border-radius: 999px; background: var(--m-ink); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); }
	.stc-map__tabs button { min-height: 40px; min-width: 88px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: var(--m-bg); font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; opacity: 0.7; }
	.stc-map__tabs button[aria-pressed="true"] { background: var(--m-bg); color: var(--m-ink); opacity: 1; }
	.stc-map__tabs button:focus-visible { outline: 2px solid var(--m-bg); outline-offset: 2px; }
	.stc-map .maplibregl-ctrl-bottom-right { bottom: 76px; }
}

/* Phone, map view: keep the title as a banner over the map. It is text that paints early, so the largest paint is not the late map attribution (mobile LCP). */
@media (max-width: 899px) {
	.stc-map[data-view="map"] .stc-map__app .stc-map__panel { display: block; inset: 0 0 auto 0; z-index: 3; height: auto; overflow: visible; padding: 0; background: transparent; pointer-events: none; }
	.stc-map[data-view="map"] .stc-map__panel > :not(.stc-map__head) { display: none; }
	.stc-map[data-view="map"] .stc-map__head { margin: 0; padding: 10px var(--wp--custom--gutter, 16px); background: color-mix(in srgb, var(--m-bg) 88%, transparent); }
	.stc-map[data-view="map"] .stc-map__head h1 { font-size: min(1.125rem, calc((100vw - 2rem) / 18)); }
	.stc-map[data-view="map"] .maplibregl-ctrl-top-right { top: 54px; }
}
