/* Festwatch design system — "calm data resource" chrome.
   Neutral, trust-forward, accessibility floor baked in (16px+ body, 7:1 on data).
   Brand accent is intentionally restrained; genre hubs re-skin --accent only.
   Both themes are first-class. Status colours are semantic, separate from --accent. */

:root {
  /* neutrals — warm paper with a faint ink bias (chosen, not defaulted) */
  --paper: #f5f4f1;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #1b1c1a;
  --ink-soft: #4c4e49;
  --ink-faint: #75776f;
  --line: #e2e0da;
  --line-strong: #cbc9c1;

  /* brand accent (hub-reskinnable) — calm teal = fresh/live/trust */
  --accent: #0f6d63;
  --accent-ink: #0b4f47;
  --accent-soft: #e3efec;

  /* semantic status (never the accent) */
  --ok: #1c7a4d;        /* confirmed */
  --ok-soft: #e2f0e7;
  --soon: #12736a;      /* announced / expected */
  --warn: #9a6a13;      /* tba */
  --warn-soft: #f4ecda;
  --quiet: #6b6d66;     /* silent / hiatus / postponed */
  --dead: #a8432f;      /* cancelled / defunct */
  --dead-soft: #f1e2dd;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(20,22,18,.05), 0 4px 14px rgba(20,22,18,.05);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

  --maxw: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12130f;
    --surface: #191b16;
    --surface-2: #1f211b;
    --ink: #ecebe4;
    --ink-soft: #b0b2a9;
    --ink-faint: #82857b;
    --line: #2c2e27;
    --line-strong: #3b3e35;
    --accent: #4fc4b4;
    --accent-ink: #7ad6c8;
    --accent-soft: #14261f;
    --ok: #56c281; --ok-soft: #14251a;
    --soon: #4fc4b4;
    --warn: #d6a94e; --warn-soft: #2a2213;
    --quiet: #9a9c92;
    --dead: #e0836c; --dead-soft: #2a1712;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.28);
  }
}
:root[data-theme="dark"] {
  --paper: #12130f; --surface: #191b16; --surface-2: #1f211b;
  --ink: #ecebe4; --ink-soft: #b0b2a9; --ink-faint: #82857b; --line: #2c2e27; --line-strong: #3b3e35;
  --accent: #4fc4b4; --accent-ink: #7ad6c8; --accent-soft: #14261f;
  --ok: #56c281; --ok-soft: #14251a; --soon: #4fc4b4; --warn: #d6a94e; --warn-soft: #2a2213;
  --quiet: #9a9c92; --dead: #e0836c; --dead-soft: #2a1712;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.28);
}
:root[data-theme="light"] {
  --paper: #f5f4f1; --surface: #ffffff; --surface-2: #faf9f6;
  --ink: #1b1c1a; --ink-soft: #4c4e49; --ink-faint: #75776f; --line: #e2e0da; --line-strong: #cbc9c1;
  --accent: #0f6d63; --accent-ink: #0b4f47; --accent-soft: #e3efec;
  --ok: #1c7a4d; --ok-soft: #e2f0e7; --soon: #12736a; --warn: #9a6a13; --warn-soft: #f4ecda;
  --quiet: #6b6d66; --dead: #a8432f; --dead-soft: #f1e2dd;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;            /* accessibility floor */
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---- header ---- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .container { display: flex; align-items: center; gap: 12px; height: 62px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -.01em; color: var(--ink); display: flex; align-items: center; gap: 9px; }
.brand .mark { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search { flex: 1 1 auto; min-width: 0; max-width: 460px; margin-right: auto; }
.search input { width: 100%; height: 38px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); border-radius: 21px; padding: 0 16px; font: inherit; font-size: 14px; }
.search input::placeholder { color: var(--ink-faint); }
.icon-btn { height: 38px; padding: 0 15px; border-radius: 21px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-soft); font: inherit; font-size: 14px; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.ham span { display: block; width: 17px; height: 2px; background: currentColor; border-radius: 2px; }
.menu { border-top: 1px solid var(--line); background: var(--surface); }
.menu-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 9px clamp(16px,4vw,32px); }
.menu-inner a, .menu-btn { font-size: 14px; color: var(--ink-soft); padding: 7px 12px; border-radius: 8px; background: none; border: none; font: inherit; cursor: pointer; text-decoration: none; }
.menu-inner a:hover, .menu-btn:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.menu-sep { flex: 1 1 auto; }

/* ---- hero / page intro ---- */
.intro { padding: clamp(26px, 5vw, 48px) 0 20px; }
.intro h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 5vw, 40px); line-height: 1.06; margin: 0 0 10px; letter-spacing: -.01em; text-wrap: balance; }
.intro p { margin: 0; color: var(--ink-soft); max-width: 60ch; font-size: 17px; }
.trust-line { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: var(--ink-soft); font-family: var(--mono); }
.trust-line .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* ---- filter bar ---- */
.filters { position: sticky; top: 60px; z-index: 15; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 8px 0 22px; box-shadow: var(--shadow); }
.filters-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field { display: inline-flex; flex-direction: column; gap: 3px; }
.field label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-faint); padding-left: 2px; }
.field select, .field input {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line-strong); border-radius: 8px; height: 36px; padding: 0 10px; min-width: 118px;
}
.chip-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 20px; height: 36px; padding: 0 13px; cursor: pointer; user-select: none; align-self: flex-end; }
.chip-toggle input { accent-color: var(--accent); width: 15px; height: 15px; }
.chip-toggle[data-on="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.filters-meta { margin-left: auto; align-self: flex-end; font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }
.filters-meta b { color: var(--accent-ink); }

/* ---- result grid + card ---- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding-bottom: 60px; }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px 14px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card h3 { font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.005em; }
.card h3 a { color: var(--ink); }
.card .place { font-size: 13.5px; color: var(--ink-faint); margin-top: 2px; }
.card .dates { font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 3px 9px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft); white-space: nowrap; }
.chip.price { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.card .genres { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--ink-faint); text-transform: uppercase; }
/* festival tile artwork — the festival's own promo art, pinned bottom-right at a
   uniform size; the lower text rows reserve space so they flow to its left. */
.card-art { position: absolute; right: 14px; bottom: 14px; width: 76px; height: 76px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(0,0,0,.14); background: var(--gcol, var(--line)); }
.card.has-art { min-height: 128px; }
.card.has-art .dates, .card.has-art .chips, .card.has-art .genres { padding-right: 96px; }

/* status pill (semantic) */
.status { font-size: 11.5px; font-weight: 600; padding: 3px 9px 3px 8px; border-radius: 20px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; letter-spacing: .01em; }
.status .d { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.status.confirmed { color: var(--ok); background: var(--ok-soft); }
.status.announced, .status.expected { color: var(--soon); background: var(--accent-soft); }
.status.tba { color: var(--warn); background: var(--warn-soft); }
.status.silent, .status.hiatus, .status.postponed { color: var(--quiet); background: var(--surface-2); }
.status.cancelled, .status.defunct { color: var(--dead); background: var(--dead-soft); }

/* save (heart) */
.save { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-faint); cursor: pointer; display: grid; place-items: center; font-size: 15px; line-height: 1; }
.save[aria-pressed="true"] { color: var(--dead); border-color: var(--dead); background: var(--dead-soft); }

/* ---- festival page ---- */
.fest-hero { padding: clamp(22px,4vw,38px) 0 8px; border-bottom: 1px solid var(--line); }
.fest-hero .kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
.fest-hero h1 { font-family: var(--serif); font-size: clamp(30px,6vw,50px); font-weight: 600; margin: 6px 0 10px; line-height: 1.02; letter-spacing: -.015em; }
.fest-hero .meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: var(--ink-soft); font-size: 16px; }
.answer-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.answer-chips .chip { font-size: 13px; padding: 5px 12px; background: var(--surface); }
.fest-body { display: grid; grid-template-columns: 1fr; gap: 26px; padding: 26px 0 70px; }
@media (min-width: 860px) { .fest-body { grid-template-columns: minmax(0,1fr) 300px; } }
.sect { border-top: 1px solid var(--line); padding-top: 18px; }
.sect:first-child { border-top: none; padding-top: 0; }
.sect h2 { font-family: var(--serif); font-size: 21px; font-weight: 600; margin: 0 0 12px; }
.aside { display: flex; flex-direction: column; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.panel h3 { font-size: 13px; font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 600; height: 44px; padding: 0 16px; border-radius: 9px; border: 1px solid transparent; cursor: pointer; width: 100%; }
.btn-primary { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn-primary, .btn-primary { color: #fff; }
.btn-ghost { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }
.btn + .btn { margin-top: 8px; }

/* trust block */
.trust { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.trust .row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.trust .row:last-child { border-bottom: none; }
.trust .row .k { color: var(--ink-faint); }
.trust .row .v { color: var(--ink-soft); text-align: right; font-variant-numeric: tabular-nums; }
.verified { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); }

/* embedded audio */
.embed { display: block; width: 100%; border: 0; border-radius: var(--radius); }
.listen { font-size: 15px; color: var(--ink-soft); margin: 0; }
.panel-note { font-size: 14px; color: var(--ink-soft); line-height: 1.45; margin: 0 0 10px; }

/* empty / null-honest */
.unknown { color: var(--ink-faint); font-style: italic; }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding: 26px 0 50px; color: var(--ink-faint); font-size: 13px; }
.site-foot .container { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }

/* onboarding modal */
.modal-scrim { position: fixed; inset: 0; background: rgba(15,16,14,.5); display: none; place-items: center; z-index: 50; padding: 20px; }
.modal-scrim[data-open="true"] { display: grid; }
.modal { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); max-width: 460px; width: 100%; padding: 22px 22px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal h2 { font-family: var(--serif); font-size: 23px; margin: 0 0 4px; }
.modal p { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 16px; }
.modal .q { font-size: 13px; font-family: var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-faint); margin: 14px 0 7px; }
.opts { display: flex; flex-wrap: wrap; gap: 7px; }
.opt { font-size: 13.5px; padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-soft); cursor: pointer; }
.opt[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }

/* related / "you might also like" */
.related { border-top: 1px solid var(--line); padding: 24px 0 60px; }
.related h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0 0 14px; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.rel-card { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; text-decoration: none; box-shadow: var(--shadow); }
.rel-card:hover { border-color: var(--accent); text-decoration: none; }
.rel-name { font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.rel-place { font-size: 12.5px; color: var(--ink-faint); }
.rel-dates { font-size: 13px; color: var(--ink-soft); }
.rel-card .status { align-self: flex-start; margin-top: 4px; }

/* assistant panel */
.bot-panel { position: fixed; right: 16px; bottom: 16px; width: min(360px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.25); padding: 16px; z-index: 40; }
.bot-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bot-head b { font-family: var(--serif); font-size: 17px; }
.bot-panel .x { background: none; border: none; font-size: 22px; line-height: 1; color: var(--ink-faint); cursor: pointer; }
.bot-hi { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 12px; }
.bot-form { display: flex; gap: 8px; }
.bot-form input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); border-radius: 9px; padding: 0 12px; font: inherit; font-size: 14px; }
.bot-form .btn { width: auto; padding: 0 16px; height: 40px; }
.bot-note { font-size: 13px; color: var(--accent-ink); margin: 10px 0 0; }

/* login modal */
.modal input[type="email"] { width: 100%; height: 42px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); border-radius: 9px; padding: 0 12px; font: inherit; font-size: 15px; }
.login-note { font-size: 12.5px; color: var(--ink-faint); margin: 14px 0 0; line-height: 1.5; }

/* forms (alerts, missing, login) */
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack input[type="email"], .missing-form input { width: 100%; height: 42px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); border-radius: 9px; padding: 0 12px; font: inherit; font-size: 15px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-done { color: var(--accent-ink); font-size: 14px; margin: 4px 0 0; }

/* map embed */
.embed.map { height: 300px; }

/* browse hub */
.browse { border-top: 1px solid var(--line); padding: 24px 0 8px; }
.browse h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0 0 14px; }
.browse-group { margin-bottom: 16px; }
.browse-group h3 { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 8px; }
.browse .links { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.browse .links a { font-size: 13.5px; color: var(--ink-soft); background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 10px; text-decoration: none; }
.browse .links a:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }

/* missing a festival */
.missing { border-top: 1px solid var(--line); padding: 24px 0 60px; }
.missing h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0 0 6px; }
.missing p { color: var(--ink-soft); margin: 0 0 14px; }
.missing-form { display: flex; flex-wrap: wrap; gap: 8px; max-width: 520px; }
.missing-form input { flex: 1 1 100%; }
.missing-form .btn { width: auto; }

/* date views (calendar / list / map) */
.views { display: flex; gap: 4px; margin: 8px 0 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 4px; width: fit-content; }
.view-tab { font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-soft); background: none; border: none; border-radius: 7px; padding: 8px 18px; cursor: pointer; }
.view-tab[aria-pressed="true"] { background: var(--surface); color: var(--accent-ink); box-shadow: var(--shadow); }
.view-pane { padding-bottom: 60px; }

.cal-block { margin-bottom: 28px; }
.cal-block h3 { font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 0 0 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); text-align: center; padding: 2px 0; }
.cal-cell { min-height: 88px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.cal-cell.empty { background: transparent; border: none; min-height: 0; }
.cal-cell.has { border-color: var(--line-strong); }
.cal-day { font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.cal-fest { font-size: 12px; line-height: 1.25; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; text-decoration: none; display: flex; align-items: center; gap: 5px; }
.cal-fest::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.cal-fest.s-confirmed::before { background: var(--ok); }
.cal-fest.s-cancelled::before, .cal-fest.s-defunct::before { background: var(--dead); }
.cal-fest.s-tba::before, .cal-fest.s-silent::before, .cal-fest.s-hiatus::before { background: var(--quiet); }
.cal-fest:hover { border-color: var(--accent); text-decoration: none; }
.cal-fest small { color: var(--ink-faint); }
.cal-loose { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 620px) { .cal-grid { gap: 3px; } .cal-cell { min-height: 64px; padding: 4px; } .cal-fest { font-size: 10.5px; } }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.datelist { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 660px; }
.datelist th { text-align: left; font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-faint); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.datelist td { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: middle; }
.datelist tr:last-child td { border-bottom: none; }
.datelist td a { color: var(--ink); font-weight: 600; }

.month-map { height: 520px; border: 1px solid var(--line); border-radius: 10px; }
.minimap { height: 300px; border: 1px solid var(--line); border-radius: var(--radius); position: relative; }

/* stylised, theme-aware map tiles (muted in light, dark in dark) */
.leaflet-tile { filter: grayscale(.62) saturate(.8) contrast(.9) brightness(1.04); }
@media (prefers-color-scheme: dark) { .leaflet-tile { filter: invert(.92) hue-rotate(180deg) grayscale(.45) brightness(.95) contrast(.9); } }
:root[data-theme="light"] .leaflet-tile { filter: grayscale(.62) saturate(.8) contrast(.9) brightness(1.04); }
:root[data-theme="dark"] .leaflet-tile { filter: invert(.92) hue-rotate(180deg) grayscale(.45) brightness(.95) contrast(.9); }
/* genre tint on single-genre maps (festival pages set --map-gcol); tints tiles, not markers */
.minimap::after { content: ""; position: absolute; inset: 0; z-index: 300; pointer-events: none; background: var(--map-gcol, transparent); opacity: .16; mix-blend-mode: multiply; border-radius: var(--radius); }
.leaflet-popup-content a { color: var(--accent-ink); font-weight: 600; }
.leaflet-popup-content { font-family: var(--sans); }

/* Go button */
.chip-toggle.go { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.chip-toggle.go:hover { background: var(--accent-ink); }

/* calendar: solid for confirmed, washed out for to-be-confirmed */
.cal-fest.s-confirmed { background: var(--accent-soft); border-color: var(--accent); opacity: 1; }
.cal-fest:not(.s-confirmed) { opacity: .5; }

/* date-grouped list */
.day-head { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); border-bottom: 1px solid var(--line-strong); padding: 20px 2px 8px; margin: 0; }
.drow { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--line); text-decoration: none; }
.drow:hover { background: var(--surface-2); text-decoration: none; }
.drow-mono { width: 52px; height: 52px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--serif); font-size: 22px; font-weight: 600; display: grid; place-items: center; flex: none; }
.drow-main { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.drow-name { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.drow-place { font-size: 13px; color: var(--ink-faint); }
.drow-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.mini { font-size: 11px; padding: 2px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft); }
.drow-chev { color: var(--ink-faint); font-size: 22px; flex: none; }

/* map popup: bigger summary tile */
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); box-shadow: 0 8px 30px rgba(0,0,0,.22); }
.leaflet-popup-content { margin: 0; }
.pop { padding: 13px 15px; font-family: var(--sans); }
.pop-name { font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--ink); display: block; text-decoration: none; line-height: 1.2; }
.pop-name:hover { text-decoration: underline; }
.pop-meta { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.pop-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 6px; }
.pop-chips span { font-size: 11px; padding: 2px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft); }
.pop-link { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent-ink); }

/* genre colour on card edge */
.card { border-top: 3px solid var(--gcol, var(--accent)); }
/* genre colour on calendar dots + list tiles */
.cal-fest::before,
.cal-fest.s-confirmed::before, .cal-fest.s-announced::before, .cal-fest.s-expected::before,
.cal-fest.s-tba::before, .cal-fest.s-silent::before, .cal-fest.s-hiatus::before,
.cal-fest.s-postponed::before, .cal-fest.s-cancelled::before, .cal-fest.s-defunct::before { background: var(--gcol, var(--accent)); }
.drow-mono { background: color-mix(in srgb, var(--gcol, var(--accent)) 16%, var(--surface-2)); color: var(--gcol, var(--accent-ink)); }

/* hero photo slider (genre-coloured panels + overlay until licensed photos land) */
.hero { position: relative; overflow: hidden; border-radius: 14px; margin: 12px 0 8px; height: clamp(220px, 34vw, 380px); }
.hero-track { display: flex; height: 100%; transition: transform .6s cubic-bezier(.4, 0, .2, 1); }
.slide { position: relative; min-width: 100%; height: 100%; display: flex; align-items: flex-end; text-decoration: none; overflow: hidden; background: linear-gradient(150deg, var(--gcol) 0%, #14140f 125%); }
.slide:hover { text-decoration: none; }
/* Real photo sits behind the overlay; .slide-overlay multiply-tints it to --gcol.
   No photo yet (thin coverage on long-tail festivals) → the gradient background
   above shows through instead, so every slide still reads as "on-brand" for its genre. */
.slide-media { position: absolute; inset: 0; z-index: 0; display: block; }
.slide-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide-overlay { position: absolute; inset: 0; z-index: 1; background: var(--gcol); opacity: .34; mix-blend-mode: multiply; }
.slide-body { position: relative; z-index: 2; padding: clamp(20px, 4vw, 40px); color: #fff; }
.slide-eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.slide-title { font-family: var(--serif); font-size: clamp(26px, 5vw, 46px); font-weight: 600; line-height: 1.02; margin: 6px 0 4px; text-shadow: 0 2px 24px rgba(0, 0, 0, .45); }
.slide-sub { font-size: 15px; opacity: .95; text-shadow: 0 1px 12px rgba(0, 0, 0, .45); }
.slide-credit { position: absolute; z-index: 3; right: 10px; bottom: 8px; font-size: 10px; line-height: 1.3; color: rgba(255, 255, 255, .78); text-shadow: 0 1px 6px rgba(0, 0, 0, .65); pointer-events: none; max-width: 60%; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(0, 0, 0, .35); color: #fff; font-size: 22px; cursor: pointer; display: grid; place-items: center; z-index: 2; }
.hero-nav.prev { left: 12px; } .hero-nav.next { right: 12px; }
.hero-nav:hover { background: rgba(0, 0, 0, .55); }
.hero-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; z-index: 2; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255, 255, 255, .5); cursor: pointer; padding: 0; transition: width .3s, background .3s; }
.hero-dot[aria-current="true"] { background: #fff; width: 22px; border-radius: 4px; }

/* location autocomplete */
.locpick { position: relative; display: inline-flex; }
.locinput { height: 36px; border: 1px solid var(--accent); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 0 12px; font: inherit; font-size: 14px; min-width: 220px; }
.locmenu { position: absolute; top: 40px; left: 0; z-index: 30; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: var(--shadow); min-width: 260px; max-width: 360px; overflow: hidden; }
.locitem { display: block; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--line); font: inherit; font-size: 13px; color: var(--ink-soft); padding: 9px 12px; cursor: pointer; }
.locitem:last-child { border-bottom: none; }
.locitem:hover { background: var(--surface-2); color: var(--ink); }
.locitem.muted { color: var(--ink-faint); cursor: default; }

/* ticket popup */
.tk-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.tk-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 9px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; }
.tk-row:hover { border-color: var(--accent); text-decoration: none; }
.tk-row.official { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.tk-tag { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.tk-row.official .tk-tag { color: var(--accent-ink); }

/* list row dates + not-confirmed sash */
.drow { position: relative; overflow: hidden; }
.drow-dates { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; margin-top: 1px; }
.drow-sash { position: absolute; top: 13px; right: -42px; transform: rotate(45deg); background: var(--warn); color: #fff; font-family: var(--mono); font-size: 9px; letter-spacing: .09em; text-transform: uppercase; font-weight: 700; padding: 3px 44px; z-index: 1; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.drow.tbc { background: color-mix(in srgb, var(--warn) 5%, transparent); }

/* venue links on festival pages */
.venue-list { display: flex; flex-wrap: wrap; gap: 8px; }
.venue-link { font-size: 14px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.venue-link:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }

/* pricing guide box */
.pb-year { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--warn); font-weight: 600; }
.pb-amount { font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--ink); margin: 4px 0; }
.pb-amount span { font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--ink-faint); }
.pb-amount.unknown { font-size: 16px; }
.pb-basis { font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
.pb-guide { font-size: 11.5px; color: var(--ink-faint); line-height: 1.4; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }

/* per-theme wordmark logo */
.brand { display: flex; align-items: center; }
.brand .logo { height: 26px; width: auto; display: block; }
.logo-on-dark { display: none; }
@media (prefers-color-scheme: dark) { .logo-on-light { display: none; } .logo-on-dark { display: block; } }
:root[data-theme="light"] .logo-on-light { display: block; }
:root[data-theme="light"] .logo-on-dark { display: none; }
:root[data-theme="dark"] .logo-on-light { display: none; }
:root[data-theme="dark"] .logo-on-dark { display: block; }
@media (max-width: 520px) { .brand .logo { height: 22px; } }

/* wordmark backlit on the hero slides — white logo, top-right, ~half the slide height */
.slide-logo { position: absolute; top: clamp(12px, 4%, 26px); right: clamp(14px, 4%, 30px); height: 48%; max-width: 56%; width: auto; object-fit: contain; object-position: top right; z-index: 2; opacity: .96; pointer-events: none; filter: drop-shadow(0 2px 14px rgba(0,0,0,.35)); }
@media (max-width: 640px) { .slide-logo { height: 34%; max-width: 62%; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
