:root {
  --paper: #f3efe6;
  --card: #fbf9f4;
  --card-2: #efebe2;
  --ink: #121212;
  --on-ink: #f3efe6;
  --muted: #5f5a52;
  --line: rgba(18, 18, 18, .14);
  --signal: #ff5a1f;
  --verified: #1d9bf0;
  --ages: #1d4ed8;
  --ok: #1f7a45;
  --warn: #9a6a00;
  --bad: #b00020;
  --radius: 18px;
  --display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #111110;
  --card: #1b1a18;
  --card-2: #23211e;
  --ink: #f1ece2;
  --on-ink: #111110;
  --muted: #a8a194;
  --line: rgba(241, 236, 226, .14);
  --ages: #7aa7ff;
  --ok: #5cc98a;
  --warn: #e0b84f;
  --bad: #ff6b7d;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 var(--display); font-stretch: 100%; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: .95; font-stretch: 75%; font-weight: 850; letter-spacing: -.01em; text-transform: uppercase; }
h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h3 { font-size: 1.35rem; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }

.kicker { font: 500 .72rem/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.kicker a { text-decoration: none; }
.kicker a:hover { color: var(--signal); }
.muted { color: var(--muted); }
.small { font-size: .85rem; color: var(--muted); }

/* verified badge: blue circle with a white star */
.vbadge { width: .78em; height: .78em; margin-left: .25em; vertical-align: -.06em; flex: none; }
.vbadge circle { fill: var(--verified); }
.vbadge path { fill: #fff; }
h1 .vbadge { width: .42em; height: .42em; margin-left: .18em; }
body:not(.page-home) .home-only { display: none; }
.inline-form .btn { white-space: nowrap; }
.verified-inline::before { content: ''; display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--verified); vertical-align: -2px; }
.x { color: var(--muted); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font: 850 1.5rem/1 var(--display); font-stretch: 80%; letter-spacing: -.02em; }
.brand b { color: var(--signal); font-weight: inherit; }
.pin { width: 18px; height: 24px; }
.pin path { fill: var(--signal); }
.pin circle { fill: var(--ink); }
.top nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 28px); }
.top nav a { text-decoration: none; font: 500 .78rem/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.top nav a:hover { color: var(--signal); }
.theme-btn { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: none; display: grid; place-items: center; }
.theme-btn svg { width: 16px; height: 16px; fill: var(--ink); }

/* ---------- happening now ---------- */
.now-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px clamp(16px, 4vw, 48px); background: var(--signal); color: #fff; font-size: .95rem; }
.now-bar b { font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.now-bar .linkish { background: none; border: 0; padding: 0; color: #fff; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.now-bar .more { font-weight: 600; opacity: .9; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- hero ---------- */
main { padding: 0 clamp(16px, 4vw, 48px); max-width: 1320px; margin: 0 auto; }
.hero {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: clamp(24px, 4vw, 56px);
  align-items: end; padding: clamp(40px, 8vw, 96px) 0 clamp(36px, 5vw, 64px);
  border-bottom: 2px solid var(--ink);
}
.hero h1 { font-size: clamp(3.6rem, 11vw, 9.5rem); font-stretch: 62%; line-height: .84; margin: 14px 0 22px; }
.hero h1 span { color: var(--signal); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 40ch; }

.profile h1 { font-size: clamp(3rem, 8vw, 6.5rem); margin: 0; display: flex; align-items: center; flex-wrap: wrap; }
.profile-head { display: flex; align-items: center; gap: 20px; margin: 16px 0 20px; }
.profile .lead { margin-bottom: 14px; }
.offerings { margin: 0 0 8px; padding-left: 18px; }
.address { margin: 10px 0 6px; font-weight: 600; }
.venue-map { height: 340px; border-radius: var(--radius); border: 1px solid var(--line); }

.next-up { background: var(--ink); color: var(--on-ink); border-radius: var(--radius); padding: 22px 22px 24px; }
.next-up .kicker, .next-up .muted { color: color-mix(in srgb, var(--on-ink) 65%, transparent); }
.next-body { margin-top: 14px; }
.next-when { font: 500 .85rem/1.3 var(--mono); color: var(--signal); }
.next-title { font: 850 2rem/0.95 var(--display); font-stretch: 70%; text-transform: uppercase; margin: 8px 0 10px; }
.next-up button.linkish { background: none; border: 0; padding: 0; text-align: left; color: inherit; }
.next-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; opacity: .85; }
.next-venue { margin-top: 14px; font-size: .9rem; opacity: .85; }

.hero-event { display: block; padding-top: clamp(24px, 4vw, 48px); }
.event-page { max-width: 760px; background: var(--card); border-radius: 22px; overflow: hidden; border: 1px solid var(--line); }
.event-page h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.event-page .dlg-poster { max-height: 70vh; }

/* ---------- logos ---------- */
.logo { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; flex: none; overflow: hidden; border: 1px solid var(--line); padding: 6px; }
.logo img { width: 100%; height: 100%; object-fit: contain; }
.logo.big { width: 112px; height: 112px; border-radius: 22px; padding: 10px; }
.logo-text { background: var(--c); color: #fff; font: 850 1.4rem/1 var(--display); font-stretch: 70%; }
.logo-text.big { font-size: 2.6rem; }
.logo-text.stripe { background: repeating-linear-gradient(135deg, var(--c) 0 10px, #121212 10px 20px); }

/* ---------- blocks ---------- */
.block { padding: clamp(40px, 6vw, 72px) 0; border-bottom: 1px solid var(--line); }
.block-head { display: flex; align-items: end; justify-content: space-between; gap: 16px 30px; flex-wrap: wrap; margin-bottom: 22px; }
.block-head .muted { max-width: 46ch; }
.sub-head { margin: 40px 0 16px; font-size: 1.6rem; }

.view-toggle, .when-tabs { display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; padding: 3px; flex-wrap: wrap; }
.view-toggle button, .when-tabs button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; font: 500 .78rem/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.view-toggle button[aria-pressed="true"], .when-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.when-tabs { border-width: 1.5px; border-color: var(--line); margin-bottom: 16px; }

.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 14px; margin-bottom: 28px; }
.sel { display: grid; gap: 4px; min-width: 150px; }
.sel span { font: 500 .66rem/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.sel select, .sel input { padding: 8px 10px; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.sel select { cursor: pointer; }
.sel.search { min-width: min(250px, 100%); }
.sel.search input { cursor: text; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; padding-bottom: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--verified); }
.reset { border: 0; background: none; text-decoration: underline; color: var(--muted); padding-bottom: 8px; }

.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--c, var(--ink)); flex: none; display: inline-block; }
.dot.stripe { background: repeating-linear-gradient(135deg, var(--c) 0 3px, #121212 3px 6px); }

/* ---------- agenda ---------- */
.agenda { display: grid; gap: 4px; }
.day { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); }
.day:first-child { border-top: 0; }
.day-label { font-stretch: 75%; text-transform: uppercase; }
.day-label b { display: block; font-size: 1.9rem; line-height: .9; font-weight: 850; }
.day-label span { font: 500 .75rem/1.4 var(--mono); letter-spacing: .1em; color: var(--muted); }
.day.is-today .day-label b { color: var(--signal); }
.day-events { display: grid; gap: 8px; }

.ev {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  width: 100%; text-align: left; border: 0; background: var(--card);
  border-radius: 12px; padding: 14px 18px 14px 24px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ev::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 7px; background: var(--c, var(--ink)); }
.ev.stripe::before { background: repeating-linear-gradient(180deg, var(--c) 0 8px, #121212 8px 16px); }
.ev:hover { transform: translateX(3px); box-shadow: 0 8px 24px rgba(0, 0, 0, .1); }
.ev-time { font: 500 .85rem/1.3 var(--mono); }
.ev-title { font-weight: 750; font-size: 1.08rem; line-height: 1.2; }
.ev-sub { font-size: .87rem; color: var(--muted); }
.ev-sub a { text-decoration: none; }
.ev.private { background: repeating-linear-gradient(135deg, var(--card) 0 10px, var(--card-2) 10px 20px); }
.ev.is-cancelled .ev-title, .ev.is-cancelled .ev-time { text-decoration: line-through; opacity: .6; }
.ev-cancel { display: block; color: var(--bad); font-size: .85rem; font-weight: 600; }

.badge { display: inline-block; font: 500 .66rem/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; padding: 5px 8px; border-radius: 6px; border: 1px solid currentColor; white-space: nowrap; }
.badge.private { color: var(--ink); }
.badge.draft { color: var(--warn); border-style: dashed; }
.badge.tba { color: var(--signal); }
.badge.registering { color: var(--ok); }
.badge.limited { color: var(--warn); }
.badge.soldout, .badge.cancelled { color: var(--bad); }
.badge.ages { color: var(--ages); }
.badge.access { color: var(--ok); border-style: dotted; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badges.left { justify-content: flex-start; }
.badges:empty { display: none; }

.empty { padding: 30px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }
.more-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- month ---------- */
.month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.month-head h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--ink); background: none; font-size: 1.1rem; line-height: 1; }
.icon-btn:hover { background: var(--ink); color: var(--on-ink); }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-left: 1px solid var(--line); }
.dow { font: 500 .7rem/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; padding: 10px 8px; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cell { min-height: 112px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cell.out { background: color-mix(in srgb, var(--ink) 3%, transparent); color: var(--muted); }
.cell-num { font: 500 .8rem/1 var(--mono); padding: 3px 4px; align-self: flex-start; border-radius: 6px; }
.cell.today .cell-num { background: var(--signal); color: #fff; }
.pill { display: block; width: 100%; border: 0; text-align: left; font-size: .76rem; font-weight: 650; line-height: 1.2; padding: 4px 6px; border-radius: 6px; background: var(--c); color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pill.private { background: repeating-linear-gradient(135deg, var(--c) 0 6px, color-mix(in srgb, var(--c) 70%, #000) 6px 12px); }
.pill.is-cancelled { text-decoration: line-through; opacity: .45; }

/* ---------- map ---------- */
.map { height: 520px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card-2); z-index: 0; }
.map-note { margin-top: 10px; }
.map-pin svg { width: 26px; height: 34px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.map-pin path { fill: var(--signal); }
.map-pin circle { fill: #121212; }
.pop ul { margin: 8px 0 4px; padding-left: 16px; }
.pop li { margin-bottom: 4px; }
:root[data-theme="dark"] .leaflet-tile { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); }
.leaflet-container { font: inherit; }

/* ---------- cards ---------- */
.coming-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.host-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.venue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.host-tag { display: inline-flex; align-items: center; gap: 7px; font: 500 .72rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .08em; flex-wrap: wrap; }
.card h3 { font-size: 1.5rem; }
.card .when { font: 500 .85rem/1.4 var(--mono); }
.poster-slot {
  aspect-ratio: 4 / 3; display: grid; place-items: center; text-align: center; padding: 20px;
  background: repeating-linear-gradient(135deg, var(--c) 0 14px, color-mix(in srgb, var(--c) 82%, #000) 14px 28px);
  color: #fff; font: 850 1.6rem/0.95 var(--display); font-stretch: 65%; text-transform: uppercase;
}
.poster-slot small { display: block; font: 500 .7rem/1.4 var(--mono); letter-spacing: .12em; margin-top: 8px; opacity: .85; }
.poster { aspect-ratio: 4 / 3; object-fit: cover; object-position: top; width: 100%; background: #000; }
.poster.poster-portrait { object-position: center; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }

.host-card { border-top: 8px solid var(--c); }
.host-card.stripe { border-top: 0; }
.host-card.stripe::before { content: ''; height: 8px; background: repeating-linear-gradient(135deg, var(--c) 0 10px, #121212 10px 20px); }
.host-head { display: flex; align-items: center; gap: 14px; }
.host-head h3 { display: flex; align-items: center; }
.host-kind { font: 500 .7rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.host-count { font: 500 .76rem/1.3 var(--mono); color: var(--muted); }

.venue-card { display: grid; gap: 4px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; }
.venue-card b { font-size: 1.1rem; }
.venue-card:hover { border-color: var(--ink); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; border: 2px solid var(--ink); background: none; text-decoration: none; font-weight: 700; font-size: .9rem; }
.btn:hover { background: var(--ink); color: var(--on-ink); }
.btn-solid { background: var(--ink); color: var(--on-ink); }
.btn-solid:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn-ghost { border-color: transparent; text-decoration: underline; }
.btn[aria-pressed="true"] { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }

/* ---------- diary ---------- */
.diary details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.diary summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 24px; cursor: pointer; list-style: none; }
.diary summary::-webkit-details-marker { display: none; }
.diary summary h2 { font-size: clamp(1.5rem, 3vw, 2.3rem); margin-top: 8px; }
.open-label { font: 500 .78rem/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; border: 2px solid var(--ink); border-radius: 999px; padding: 9px 16px; white-space: nowrap; }
details[open] .open-label { background: var(--ink); color: var(--on-ink); }
.diary-frame { padding: 0 12px 12px; }
.diary-frame iframe { display: block; width: 100%; height: 700px; border: 0; border-radius: 12px; background: #fff; }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 16px; }
.form-grid.one { grid-template-columns: 1fr; margin-top: 6px; }
.form-grid label { display: grid; gap: 6px; font: 500 .7rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.form-grid label .small { text-transform: none; letter-spacing: 0; font-family: var(--display); }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.form-msg { max-width: 50ch; }
.inline-form { display: flex; gap: 8px; margin: 14px 0 8px; }
.inline-form input { border-radius: 999px; }

/* ---------- subscribe ---------- */
.subscribe-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h3 { margin-bottom: 10px; }
.feed-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.feed-list a { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
pre { margin: 14px 0; padding: 14px; background: #121212; color: #f3efe6; border-radius: 12px; overflow-x: auto; font: 400 .78rem/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; }

.foot { max-width: 1320px; margin: 0 auto; padding: 36px clamp(16px, 4vw, 48px) 60px; display: grid; gap: 6px; }

/* ---------- dialog ---------- */
dialog { width: min(580px, calc(100% - 24px)); border: 0; border-radius: 22px; padding: 0; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); }
dialog .close { position: absolute; top: 14px; right: 14px; background: var(--card); z-index: 2; }
.dlg-band { height: 12px; background: var(--c); }
.dlg-band.stripe { background: repeating-linear-gradient(135deg, var(--c) 0 12px, #121212 12px 24px); }
.dlg-poster { display: block; width: 100%; max-height: 52vh; object-fit: contain; background: #000; }
.dlg-inner { padding: 24px 26px 26px; display: grid; gap: 14px; }
.dlg-inner h2 { font-size: clamp(1.9rem, 5vw, 2.6rem); padding-right: 40px; }
.facts { display: grid; grid-template-columns: 90px 1fr; gap: 6px 14px; margin: 0; font-size: .95rem; }
.facts dt { font: 500 .7rem/1.9 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.facts dd { margin: 0; }
.facts a { text-underline-offset: 2px; }

.noscript { padding: 20px; text-align: center; }

/* ---------- embed mode (?embed=1) ---------- */
body.embed .top, body.embed .now-bar, body.embed .hero, body.embed #coming, body.embed #hosts, body.embed .diary,
body.embed #list-event, body.embed #subscribe, body.embed .foot { display: none !important; }
body.embed .block { border: 0; padding: 16px 0; }
body.embed main { padding: 0 12px; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .nav-extra { display: none; }
  .day { grid-template-columns: 1fr; gap: 10px; }
  .day-label b { display: inline; margin-right: 8px; font-size: 1.5rem; }
  .ev { grid-template-columns: 1fr; gap: 4px; }
  .badges { justify-content: flex-start; }
  .poster-slot { aspect-ratio: 16 / 7; }
  .cell { min-height: 74px; padding: 3px; }
  .pill { font-size: 0; height: 8px; padding: 0; border-radius: 4px; }
  .dow { padding: 8px 4px; font-size: .62rem; letter-spacing: .04em; }
  .sel { min-width: calc(50% - 7px); flex: 1; }
  .map { height: 400px; }
  .profile-head { gap: 14px; }
  .logo.big { width: 84px; height: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ev { transition: none; }
  .live-dot { animation: none; }
}
