:root {
  --cat-music:     #6b2c91;
  --cat-theater:   #9b2318;
  --cat-film:      #16614a;
  --cat-sport:     #8a5400;
  --cat-festival:  #c44b1d;
  --cat-family:    #2d6b3f;
  --cat-culture:   #1e4a6e;
  --cat-comedy:    #b58400;

  /* Flyer-style accent colors (decoupled from category filters). */
  --cat-classical: #2f5d8a;
  --cat-club:      #6b2c91;
  --cat-arts:      #1e4a6e;
  --cat-literary:  #4a3618;

  --paper-cream:   #fffaf0;
  --paper-warm:    #faf3e3;
  --paper-tan:     #f5ead0;
  --paper-bone:    #fdfaf2;
  --ink:           #2a1a08;
  --ink-soft:      #4a3618;
  --ink-faint:     rgba(40, 25, 8, 0.55);
  --chrome-line:   rgba(42, 22, 5, 0.20);

  --font-typewriter: "Special Elite", "Courier New", monospace;
  --font-stencil:    "Bebas Neue", "Impact", sans-serif;

  /* Liquid Glass pin material — directional lighting from top-left so the
     disc reads as a 3D dome, not a flat colored circle. */
  --pin-disc-blur: blur(5px) saturate(1.55) brightness(0.97);
  --pin-disc-blur-sm: blur(4px) saturate(1.55) brightness(0.99);
  --pin-disc-shadow:
    inset 1.5px 1.5px 1.5px rgba(255, 255, 255, 0.55),
    inset -1px -1px 1.5px rgba(0, 0, 0, 0.18),
    0 0 0 0.5px rgba(0, 0, 0, 0.24),
    1.5px 2px 2.5px rgba(20, 12, 0, 0.30),
    3px 5px 9px rgba(20, 12, 0, 0.18);
  --pin-disc-shadow-sm:
    inset 1.2px 1.2px 1.2px rgba(255, 255, 255, 0.5),
    inset -0.8px -0.8px 1.2px rgba(0, 0, 0, 0.15),
    0 0 0 0.5px rgba(0, 0, 0, 0.22),
    1.2px 1.5px 2px rgba(20, 12, 0, 0.26),
    2.5px 4px 7px rgba(20, 12, 0, 0.15);
}

@supports (color: oklch(0.5 0.1 240)) {
  :root {
    --cat-music:     oklch(0.42 0.16 310);
    --cat-theater:   oklch(0.43 0.16 28);
    --cat-film:      oklch(0.48 0.09 165);
    --cat-sport:     oklch(0.55 0.10 70);
    --cat-festival:  oklch(0.58 0.18 38);
    --cat-family:    oklch(0.52 0.10 150);
    --cat-culture:   oklch(0.42 0.08 240);
    --cat-comedy:    oklch(0.65 0.16 85);

    --cat-classical: oklch(0.45 0.10 250);
    --cat-club:      oklch(0.42 0.16 310);
    --cat-arts:      oklch(0.42 0.08 240);
    --cat-literary:  oklch(0.40 0.04 70);
  }
}

body {
  background-color: #e8c8a8;
}

.page {
  max-width: 78rem;
}

.site-topbar { border-bottom-color: var(--chrome-line); }

.page-intro p { color: var(--ink-soft); }

/* ---------- Filter bar ---------- */

.filterbar {
  position: relative;
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-5) var(--space-4);
  background: linear-gradient(180deg, rgba(253, 250, 240, 0.94), rgba(250, 246, 232, 0.88));
  border: 1px solid rgba(60, 40, 15, 0.18);
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 2px 6px rgba(0,0,0,0.18),
    0 14px 30px rgba(0,0,0,0.12);
  transform: rotate(-0.3deg);
}

.filterbar::before,
.filterbar::after {
  content: "";
  position: absolute;
  top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  --pin: #d94f3d;
  background: color-mix(in oklab, var(--pin) 66%, transparent);
  backdrop-filter: var(--pin-disc-blur);
  -webkit-backdrop-filter: var(--pin-disc-blur);
  box-shadow: var(--pin-disc-shadow);
  z-index: 2;
}
.filterbar::before { left: 20px; }
.filterbar::after  { right: 20px; --pin: #2f5d8a; }

.filter-rows {
  display: grid;
  gap: var(--space-3);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

.filter-row .row-label {
  flex: 0 0 auto;
  min-width: 5.5rem;
  color: var(--ink-faint);
  font-family: var(--font-typewriter);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}

.seg {
  display: inline-flex;
  gap: 0;
  border: 1px solid rgba(60, 40, 15, 0.28);
  border-radius: 4px;
  overflow: hidden;
}

.seg button {
  padding: 7px 14px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-typewriter);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  border-right: 1px solid rgba(60, 40, 15, 0.18);
}

.seg button:last-child { border-right: 0; }

.seg button[aria-checked="true"] {
  background: var(--ink);
  color: #fff8e7;
}

.seg button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.pins {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-3);
  align-items: flex-start;
}

.filter-pin {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px 8px 4px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-typewriter);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform var(--motion-fast) ease;
}

.filter-pin::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--pin) 68%, transparent);
  backdrop-filter: var(--pin-disc-blur-sm);
  -webkit-backdrop-filter: var(--pin-disc-blur-sm);
  box-shadow: var(--pin-disc-shadow-sm);
  transition: transform var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.filter-pin:hover::before {
  transform: translateY(-1px);
}

.filter-pin[aria-pressed="true"]::before {
  transform: translateY(2px) scale(0.94);
  background: color-mix(in oklab, var(--pin) 82%, transparent);
  box-shadow:
    inset 0 0 0 0.5px color-mix(in oklab, var(--pin) 92%, white),
    inset 0 -1px 2px rgba(0, 0, 0, 0.30),
    inset 0 1px 1.5px rgba(0, 0, 0, 0.18),
    0 0 0 0.5px rgba(0, 0, 0, 0.22),
    0 0.5px 1px rgba(20, 12, 0, 0.45);
}

.filter-pin[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 700;
}

.filter-pin[aria-pressed="false"] {
  color: var(--ink-soft);
}

.filter-pin:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.filter-stamp {
  padding: 5px 12px;
  border: 2px solid #c44b1d;
  border-radius: 3px;
  background: transparent;
  color: #c44b1d;
  font-family: var(--font-stencil);
  font-size: 1rem;
  letter-spacing: 0.16em;
  transform: rotate(-2deg);
  transition: background var(--motion-fast) ease, color var(--motion-fast) ease;
}

.filter-stamp[aria-pressed="true"] {
  background: #c44b1d;
  color: #fff;
}

/* "★ cap de afiș" — a gold variant of the same stamp so it reads as
   headliner / top-of-the-bill without competing with GRATIS's red. */
.filter-stamp.is-featured {
  border-color: #a8780f;
  color: #a8780f;
}

.filter-stamp.is-featured[aria-pressed="true"] {
  background: #a8780f;
  color: #fff8e7;
}

.filter-reset {
  margin-left: auto;
  padding: 5px 10px;
  background: transparent;
  color: var(--ink-faint);
  font-family: var(--font-typewriter);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  border-bottom: 1px dashed rgba(40, 25, 8, 0.3);
}

.filter-reset:hover { color: var(--ink); }
.filter-reset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Day strips ---------- */

.board {
  margin-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.strip {
  position: relative;
  padding-top: 30px;
}

.strip-head {
  position: absolute;
  top: 0;
  left: var(--space-5);
  display: flex;
  align-items: stretch;
  gap: var(--space-3);
  z-index: 3;
}

.strip-tag {
  position: relative;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  gap: 0 10px;
  align-items: baseline;
  padding: 8px 14px 8px 14px;
  background: var(--paper-cream);
  color: var(--ink);
  border: 1px solid rgba(60, 40, 15, 0.18);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.65) inset,
    0 10px 16px rgba(0, 0, 0, 0.22),
    0 22px 36px rgba(0, 0, 0, 0.14),
    0 -2px 16px 2px rgba(47, 93, 138, 0.14);
  transform-origin: 50% -8px;
  transform: rotate(var(--tag-rot, -1.4deg));
}

.strip-tag::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  --pin: #2f5d8a;
  background: color-mix(in oklab, var(--pin) 66%, transparent);
  backdrop-filter: var(--pin-disc-blur-sm);
  -webkit-backdrop-filter: var(--pin-disc-blur-sm);
  box-shadow: var(--pin-disc-shadow-sm);
}

.strip-day {
  grid-column: 1;
  grid-row: 1 / 3;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 2.3rem;
  line-height: 0.95;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.strip-month {
  grid-column: 2;
  grid-row: 1;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.strip-weekday {
  grid-column: 2;
  grid-row: 2;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
}

.strip-relative {
  align-self: flex-end;
  padding-bottom: 6px;
  color: var(--ink-faint);
  font-family: var(--font-typewriter);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.strip-ribbon {
  position: absolute;
  top: -10px;
  right: -16px;
  padding: 4px 12px 5px;
  background: #c43e2f;
  color: #fff;
  font-family: var(--font-stencil);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  transform: rotate(8deg);
  box-shadow: 1px 2px 4px rgba(0,0,0,0.35);
  z-index: 4;
}

.strip-ribbon::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -10px;
  border: 10px solid transparent;
  border-left-color: #c43e2f;
  border-right: 0;
}

.strip[data-state="today"] .strip-tag {
  box-shadow:
    0 1px 0 rgba(255,255,255,0.65) inset,
    0 0 0 3px color-mix(in srgb, #c43e2f 18%, transparent),
    0 10px 20px rgba(0, 0, 0, 0.28),
    0 22px 36px rgba(0, 0, 0, 0.14),
    0 -2px 16px 2px rgba(47, 93, 138, 0.14);
}

.strip-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  grid-auto-rows: minmax(0, auto);
  grid-auto-flow: dense;
  align-items: start;
  gap: var(--space-5) var(--space-4);
  padding: 40px var(--space-2) var(--space-3);
  min-height: 200px;
}

.strip-empty {
  grid-column: 1 / -1;
  padding: var(--space-5);
  color: var(--ink-faint);
  font-family: var(--font-typewriter);
  font-size: 0.88rem;
  text-align: center;
}

/* ---------- Flyer base ---------- */

.flyer {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 20px;
  background: var(--paper-cream);
  color: var(--ink);
  text-decoration: none;
  transition:
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 240ms ease;
  transform: rotate(var(--rot, 0deg));
  transform-origin: 50% 8%;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.7) inset,
    0 12px 20px rgba(20, 12, 0, 0.22),
    0 26px 48px rgba(20, 12, 0, 0.16);
  container-type: inline-size;
}

.strip-board > .flyer.size-l { grid-column: span 2; }
.flyer.size-s { padding: 14px 14px 16px; }

.flyer:hover {
  transform: rotate(0deg) translateY(-4px) scale(1.015);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.75) inset,
    0 20px 30px rgba(20, 12, 0, 0.30),
    0 46px 70px rgba(20, 12, 0, 0.22);
  text-decoration: none;
  z-index: 5;
}

.flyer:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.flyer h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.005em;
}

.flyer .series-day {
  align-self: flex-start;
  margin-bottom: 2px;
  padding: 2px 8px;
  background: rgba(40, 25, 8, 0.08);
  border-radius: 2px;
  color: rgba(40, 25, 8, 0.75);
  font-family: var(--font-typewriter);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

/* Attachment: pin — Liquid Glass disc, color via --pin */
.flyer[data-attach="pin-red"]   { --pin: #d94f3d; }
.flyer[data-attach="pin-blue"]  { --pin: #2f5d8a; }
.flyer[data-attach="pin-gold"]  { --pin: #c79028; }
.flyer[data-attach="pin-green"] { --pin: #2f8a45; }
.flyer[data-attach="pin-black"] { --pin: #1a1a1a; }

.flyer[data-attach^="pin-"]::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--pin) 66%, transparent);
  backdrop-filter: var(--pin-disc-blur);
  -webkit-backdrop-filter: var(--pin-disc-blur);
  box-shadow: var(--pin-disc-shadow);
  z-index: 2;
  pointer-events: none;
}

/* Black is too dark to refract well — give it a smoky-glass treatment. */
.flyer[data-attach="pin-black"]::before {
  background: rgba(20, 18, 16, 0.62);
  backdrop-filter: blur(6px) saturate(0.65) brightness(0.78);
  -webkit-backdrop-filter: blur(6px) saturate(0.65) brightness(0.78);
  box-shadow:
    inset 0 1.5px 1.5px rgba(255, 255, 255, 0.18),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.10),
    inset 0 -1px 2px rgba(0, 0, 0, 0.4),
    0 0 0 0.5px rgba(0, 0, 0, 0.35),
    0 1px 1.5px rgba(0, 0, 0, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.28);
}

/* Attachment: tape */
.flyer[data-attach="tape-left"]::after,
.flyer[data-attach="tape-right"]::after {
  content: "";
  position: absolute;
  top: -10px;
  width: 72px;
  height: 22px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.55), rgba(255,255,255,0.22), rgba(255,255,255,0.55)),
    linear-gradient(180deg, rgba(220, 200, 140, 0.78), rgba(195, 175, 115, 0.82));
  box-shadow: 0 4px 6px rgba(0,0,0,0.18);
  mix-blend-mode: multiply;
  z-index: 2;
}
.flyer[data-attach="tape-left"]::after  { left: -14px; transform: rotate(-22deg); }
.flyer[data-attach="tape-right"]::after { right: -14px; transform: rotate(22deg); }

/* ---------- Custom flyer image (polaroid) ---------- */

/* Posters (theatre/opera afișe) already carry their own title + artwork, and
   text overlaid on the image is unreadable on bright posters. So the poster
   sits in the paper frame like a polaroid, with the caption printed on the
   cream below it — always legible, and the poster art stays uncovered. */

.flyer.flyer-image {
  padding: 12px 12px 14px;
  gap: 0;
  /* The polaroid frame is always cream paper with dark ink, independent of the
     inherited flyer-<style> class — club/festival/arts set dark backgrounds with
     white text that would otherwise make the caption printed below the poster
     unreadable. */
  background: var(--paper-cream);
  color: var(--ink);
}

.flyer-image .flyer-photo {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #1a1a1a;
  box-shadow:
    0 0 0 1px rgba(20, 12, 0, 0.10),
    0 2px 5px rgba(20, 12, 0, 0.22);
}

.flyer.flyer-image.size-s .flyer-photo { aspect-ratio: 4 / 5; }

/* Landscape posters (banners wider than tall) don't fit the portrait polaroid:
   a 3/4 cover-crop would slice the banner to a thin vertical strip. Instead give
   them a two-column span and let the image keep its natural ratio, uncropped.
   The .is-landscape class is added at runtime once the image's intrinsic
   dimensions are known (see applyPhotoOrientation). On a single-column grid the
   span clamps to 1, so it degrades cleanly on narrow viewports. */
.strip-board > .flyer.flyer-image.is-landscape { grid-column: span 2; }

.flyer.flyer-image.is-landscape .flyer-photo {
  aspect-ratio: auto;
  height: auto;
}

.flyer-image .flyer-photo-caption {
  display: block;
  padding: 11px 4px 1px;
}

.flyer-image .ph-title {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.12rem;
  line-height: 1.12;
  color: var(--ink);
}

.flyer-image .ph-meta {
  display: block;
  margin-top: 5px;
  font-family: var(--font-typewriter);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* Series badge stays pinned to the poster's top-left corner (inside the frame). */
.flyer-image .series-day {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  background: rgba(255, 247, 230, 0.92);
}

.flyer-image::after,
.flyer-image::before {
  /* keep pins/tape rendering on top of the image */
  z-index: 2;
}

/* ---------- Style: classical ---------- */

.flyer-classical {
  background: var(--paper-warm);
  padding: 22px 22px 18px;
  gap: 6px;
  text-align: center;
}

.flyer-classical .ornament {
  align-self: center;
  width: 60px;
  height: 14px;
  background:
    radial-gradient(circle at 50% 50%, var(--ink) 0 2px, transparent 3px),
    linear-gradient(90deg, transparent 0, var(--ink) 45%, var(--ink) 55%, transparent 100%);
  background-size: 14px 14px, 100% 1px;
  background-repeat: no-repeat;
  background-position: center, center;
}

.flyer-classical .ribbon {
  align-self: center;
  padding: 2px 10px;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.flyer-classical .title-block {
  padding: 8px 0 12px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  position: relative;
}

.flyer-classical .title-block::before,
.flyer-classical .title-block::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  height: 1px;
  background: var(--ink);
}
.flyer-classical .title-block::before { top: 3px; }
.flyer-classical .title-block::after  { bottom: 3px; }

.flyer-classical h3 {
  font-size: 1.75rem;
  color: var(--ink);
  line-height: 1.05;
}

.flyer-classical .opus-sub {
  margin-top: 4px;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
}

.flyer-classical .credits {
  color: var(--ink-soft);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  line-height: 1.55;
  text-transform: uppercase;
  font-weight: 500;
}

.flyer-classical .meta-row {
  display: flex;
  justify-content: space-between;
  padding-top: 6px;
  color: var(--ink);
  font-family: var(--font-typewriter);
  font-size: 0.78rem;
}

@container (max-width: 280px) {
  .flyer-classical h3 { font-size: 1.4rem; }
  .flyer-festival h3  { font-size: 1.5rem; }
  .flyer-club h3      { font-size: 1.75rem; }
  .flyer-theater h3   { font-size: 1.3rem; }
  .flyer-comedy h3    { font-size: 1.35rem; }
  .flyer-sport h3     { font-size: 1.25rem; }
  .flyer-film h3      { font-size: 1.25rem; }
  .flyer-literary h3  { font-size: 1.3rem; }
  .flyer-arts h3      { font-size: 1.2rem; }
  .flyer-family h3    { font-size: 1.2rem; }
  .flyer-note h3      { font-size: 1.15rem; }
}

/* ---------- Style: club ---------- */

.flyer-club {
  background: #0d0a18;
  color: #fff;
  padding: 22px 18px;
  gap: 10px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 14px 22px rgba(0, 0, 0, 0.45),
    0 30px 55px rgba(0, 0, 0, 0.35);
}

.flyer-club .glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 110%, rgba(255, 209, 64, 0.32), transparent 45%),
    radial-gradient(circle at 10% 0%, rgba(180, 70, 220, 0.38), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.flyer-club > * { position: relative; z-index: 1; }

.flyer-club .label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-typewriter);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.68);
}

.flyer-club .num {
  padding: 2px 8px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 2px;
}

.flyer-club h3 {
  font-family: var(--font-stencil);
  font-style: normal;
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fff;
}

.flyer-club h3 .b2b {
  display: inline-block;
  padding: 0 7px;
  margin: 0 2px;
  background: #ffd140;
  color: #0d0a18;
  transform: skew(-8deg);
}

.flyer-club .sub {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.05rem;
  color: rgba(255,255,255,0.92);
}

.flyer-club .info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 14px;
  font-family: var(--font-typewriter);
  font-size: 0.76rem;
  color: rgba(255,255,255,0.78);
  padding-top: 8px;
  margin-top: auto;
  border-top: 1px dashed rgba(255,255,255,0.2);
}

.flyer-club .info b { color: #fff; font-weight: 500; }

/* ---------- Style: theater ---------- */

.flyer-theater {
  background: var(--paper-tan);
  padding: 22px 20px 18px;
  font-family: var(--font-typewriter);
  gap: 8px;
  text-align: center;
}

.flyer-theater .header-line {
  letter-spacing: 0.28em;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--ink-soft);
  padding-bottom: 6px;
}

.flyer-theater h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--ink);
  padding: 4px 0;
}

.flyer-theater .author {
  font-size: 0.76rem;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
}

.flyer-theater .director,
.flyer-theater .cast {
  padding-top: 6px;
  border-top: 1px dashed var(--ink-soft);
  font-size: 0.72rem;
  color: var(--ink);
  line-height: 1.6;
  text-align: left;
}

.flyer-theater .when-bottom {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--ink-soft);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- Style: film (polaroid) ---------- */

.flyer-film {
  background: #fff;
  padding: 14px 14px 16px;
  gap: 8px;
}

.flyer-film .photo {
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 220, 160, 0.55), transparent 40%),
    linear-gradient(180deg, #2a2a3a 0%, #0a0a14 100%);
  position: relative;
  overflow: hidden;
}

.flyer-film .photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 68%, rgba(255, 230, 180, 0.35) 0 6%, transparent 14%),
    radial-gradient(circle at 50% 68%, #f0d28a 0 20px, transparent 22px),
    linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.6));
}

.flyer-film .photo::after {
  content: "";
  position: absolute;
  left: 35%;
  right: 35%;
  top: 70%;
  height: 38%;
  background: linear-gradient(180deg, rgba(40, 30, 20, 0.85), rgba(20, 15, 8, 1));
  clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
}

.flyer-film .caption {
  padding-top: 4px;
  display: grid;
  gap: 4px;
}

.flyer-film .badge {
  align-self: flex-start;
  padding: 2px 8px;
  border: 1px solid var(--cat-film);
  border-radius: var(--radius-pill);
  color: var(--cat-film);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flyer-film h3 {
  font-size: 1.5rem;
  color: var(--ink);
}

.flyer-film .meta {
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.flyer-film .meta b { color: var(--ink); font-weight: 600; }

.flyer-film .scribble {
  font-family: var(--font-typewriter);
  font-size: 0.72rem;
  color: var(--ink-soft);
}

/* ---------- Style: festival ---------- */

.flyer-festival {
  background: linear-gradient(155deg, #ff7a3d 0%, #d63c5e 55%, #6b1f6e 110%);
  color: #fff;
  padding: 22px 20px;
  gap: 8px;
}

.flyer-festival .hatch {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.07) 0 12px, transparent 12px 24px);
  pointer-events: none;
  z-index: 0;
}

.flyer-festival > * { position: relative; z-index: 1; }

.flyer-festival .eyebrow {
  font-family: var(--font-typewriter);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
}

.flyer-festival h3 {
  font-size: 1.9rem;
  max-width: 14ch;
  overflow-wrap: anywhere;
  color: #fff;
}

.flyer-festival .when {
  align-self: flex-start;
  padding: 4px 12px;
  background: #fff;
  color: #6b1f6e;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 1rem;
}

.flyer-festival .credits {
  color: rgba(255, 255, 255, 0.90);
  font-size: 0.82rem;
  line-height: 1.5;
}

.flyer-festival .where {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.25);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.88);
}

.flyer-festival .where b { color: #fff; }

/* ---------- Style: sport ---------- */

.flyer-sport {
  background: #fef9e8;
  padding: 18px 18px;
  gap: 8px;
}

.flyer-sport .stamp {
  position: absolute;
  top: 14px;
  right: 14px;
  transform: rotate(8deg);
  padding: 3px 10px;
  border: 2px solid #c44b1d;
  border-radius: 2px;
  color: #c44b1d;
  font-family: var(--font-stencil);
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  opacity: 0.88;
  z-index: 2;
}

.flyer-sport .tag {
  font-family: var(--font-stencil);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: #c44b1d;
}

.flyer-sport h3 {
  font-size: 1.5rem;
  color: var(--ink);
}

.flyer-sport h3 .vs {
  display: inline-block;
  font-style: normal;
  color: #c44b1d;
  padding: 0 4px;
}

.flyer-sport .meta-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  padding-top: 10px;
  margin-top: auto;
  border-top: 2px solid var(--ink);
  font-size: 0.78rem;
  color: var(--ink);
}

.flyer-sport .meta-grid b { font-weight: 700; }

/* ---------- Style: family (torn paper) ---------- */

/* clip-path lives on the inner .paper so the pin pseudo on .flyer is not clipped.
   Shadow uses filter: drop-shadow so it traces the torn-paper silhouette of .paper
   instead of the rectangular outer <a>. All of these are torn-paper-only: a family
   event WITH a poster renders as a .flyer-image polaroid (no .paper, rectangular
   frame), so it must keep the standard polaroid box-shadow and the standard pin
   offset (top: -9px) — the torn-paper top: 4px would sink the pin into the frame. */
.flyer-family:not(.flyer-image) {
  background: transparent;
  padding: 0;
  box-shadow: none;
  filter:
    drop-shadow(0 12px 14px rgba(20, 12, 0, 0.20))
    drop-shadow(0 26px 36px rgba(20, 12, 0, 0.14));
}

.flyer-family:not(.flyer-image)[data-attach^="pin-"]::before { top: 4px; }

.flyer-family:not(.flyer-image):hover {
  box-shadow: none;
  filter:
    drop-shadow(0 18px 20px rgba(20, 12, 0, 0.28))
    drop-shadow(0 40px 56px rgba(20, 12, 0, 0.20));
}

.flyer-family .paper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f2f8ee;
  padding: 20px 20px 18px;
  clip-path: polygon(
    0% 4%, 6% 0%, 18% 3%, 32% 0%, 46% 4%, 62% 1%, 78% 3%, 92% 0%, 100% 5%,
    100% 95%, 94% 100%, 80% 97%, 64% 100%, 48% 96%, 32% 100%, 18% 97%, 6% 100%, 0% 96%
  );
}

.flyer-family .cat-strip {
  align-self: flex-start;
  padding: 3px 10px;
  background: #2d6b3f;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.flyer-family h3 {
  font-size: 1.45rem;
  color: #1d4226;
}

.flyer-family .age {
  align-self: flex-start;
  padding: 1px 9px;
  border: 2px solid #2d6b3f;
  border-radius: 3px;
  color: #2d6b3f;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 0.92rem;
}

.flyer-family .meta {
  margin-top: auto;
  padding-top: 6px;
  font-size: 0.82rem;
  color: #4a5d4a;
}

.flyer-family .meta .time { color: #1d4226; }
.flyer-family .meta b { color: #1d4226; }

/* ---------- Style: arts (dark museum card) ---------- */

.flyer-arts {
  background: #1c1917;
  color: #f6f1e4;
  padding: 18px 18px;
  gap: 10px;
}

.flyer-arts .swatch {
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(ellipse at 60% 40%, #c79028 0 22%, transparent 24%),
    linear-gradient(135deg, #6b4a10 0%, #2a1a08 65%);
  border: 1px solid rgba(246, 241, 228, 0.15);
}

.flyer-arts .micro {
  font-family: var(--font-typewriter);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(246, 241, 228, 0.55);
}

.flyer-arts h3 {
  font-size: 1.4rem;
  color: #f6f1e4;
}

.flyer-arts .meta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.8rem;
  color: rgba(246, 241, 228, 0.62);
  border-top: 1px solid rgba(246, 241, 228, 0.12);
}

.flyer-arts .meta b { color: #f6f1e4; }
.flyer-arts .meta .time { color: #f6f1e4; }

/* ---------- Style: comedy ---------- */

.flyer-comedy {
  background: #ffd140;
  color: #1c1206;
  padding: 22px 20px;
  gap: 8px;
}

.flyer-comedy .eyebrow {
  font-family: var(--font-stencil);
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  color: #1c1206;
}

.flyer-comedy h3 {
  font-size: 1.65rem;
  max-width: 14ch;
  color: #1c1206;
}

.flyer-comedy .with {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1rem;
  color: #1c1206;
}

.flyer-comedy .comedy-strip {
  margin-top: auto;
  padding: 6px 0;
  border-top: 2px solid #1c1206;
  border-bottom: 2px solid #1c1206;
  font-family: var(--font-typewriter);
  font-size: 0.78rem;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Style: literary ---------- */

.flyer-literary {
  background: var(--paper-bone);
  padding: 20px 20px 18px;
  gap: 6px;
  border-left: 6px double var(--ink);
}

.flyer-literary .meta-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-typewriter);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.flyer-literary h3 {
  font-size: 1.55rem;
  color: var(--ink);
}

.flyer-literary .quote {
  padding: 8px 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--ink-soft);
  border-top: 1px solid #c8b88d;
  border-bottom: 1px solid #c8b88d;
}

.flyer-literary .where {
  margin-top: auto;
  padding-top: 6px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.flyer-literary .where b { color: var(--ink); }

/* ---------- Style: note (small handwritten) ---------- */

.flyer-note {
  background: #f4e6c4;
  padding: 14px 14px 12px;
  gap: 4px;
  font-family: var(--font-typewriter);
}

.flyer-note h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.35rem;
  color: var(--ink);
  line-height: 1.1;
}

.flyer-note .sub {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.25;
}

.flyer-note .deet {
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ---------- Empty / loading / error states ---------- */

.board-empty {
  display: flex;
  justify-content: center;
  padding: var(--space-8) 0;
}

.board-empty .note {
  transform: rotate(-2deg);
  padding: 16px 22px;
  background: var(--paper-tan);
  color: var(--ink);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.1rem;
  box-shadow: 0 8px 14px rgba(0,0,0,0.2);
  position: relative;
  max-width: 22rem;
  text-align: center;
}

.board-empty .note::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  --pin: #d94f3d;
  background: color-mix(in oklab, var(--pin) 68%, transparent);
  backdrop-filter: var(--pin-disc-blur-sm);
  -webkit-backdrop-filter: var(--pin-disc-blur-sm);
  box-shadow: var(--pin-disc-shadow-sm);
}

.board-skeleton {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-5) 0;
}

.board-skeleton .ph-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
  padding-top: 30px;
}

.board-skeleton .ph-flyer {
  height: 220px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 3px;
  box-shadow: 0 8px 14px rgba(0,0,0,0.15);
}

/* ---------- Footer ---------- */

footer.site-footer { color: var(--ink-soft); }
footer.site-footer::before { background-color: var(--ink-faint); }
footer.site-footer a:not(.contact-link) { color: var(--ink-soft); }
footer.site-footer a:not(.contact-link):hover { color: var(--ink); }

footer.site-footer .contact-link {
  border-color: rgba(42, 22, 5, 0.22);
  color: var(--ink-soft);
}
footer.site-footer .contact-link:hover {
  border-color: rgba(42, 22, 5, 0.55);
  color: var(--ink);
  background: rgba(42, 22, 5, 0.06);
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .strip-head { position: relative; left: 0; top: 0; padding-bottom: var(--space-3); }
  .strip { padding-top: 0; }
  .strip-tag { transform: rotate(-1.4deg); }
  .strip-board { padding-top: var(--space-3); grid-template-columns: 1fr; }
  .strip-board > .flyer.size-l,
  .strip-board > .flyer.flyer-image.is-landscape { grid-column: span 1; }
  .flyer-festival h3 { font-size: 1.6rem; }
  .flyer-club h3 { font-size: 1.85rem; }
}

@media (max-width: 420px) {
  .filterbar {
    padding-right: var(--space-4);
    padding-left: var(--space-4);
  }

  .filter-row .row-label {
    flex-basis: 100%;
    min-width: 0;
  }

  .seg {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .seg button {
    min-width: 0;
    padding-right: 4px;
    padding-left: 4px;
    font-size: 0.8rem;
    line-height: 1.2;
    white-space: normal;
  }

  .pins {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  .filter-pin {
    min-width: 0;
    padding-right: 0;
    padding-left: 0;
    white-space: nowrap;
  }
}

/* ---------- Print ---------- */

@media print {
  body { background: #fff; }
  .filterbar, .site-footer { display: none; }
  .board { gap: var(--space-5); }
  .strip-ribbon { display: none; }
  .strip-tag { transform: none; box-shadow: none; border: 1px solid #000; }
  .flyer {
    transform: none !important;
    box-shadow: none !important;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
  .flyer::before, .flyer::after { display: none !important; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .flyer:hover { transform: rotate(var(--rot, 0deg)) !important; }
}
