:root {
  color-scheme: light;
  --paper: #faf6f0;
  --card: #fffdf9;
  --ink: #2b1e30;
  --muted: #635667;
  --plum: #4f2b58;
  --deep-plum: #351b40;
  --lavender: #eee5f1;
  --border: #e5d9e0;
  --display: Georgia, "Times New Roman", serif;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
.wrap { width: min(calc(100% - 56px), 1180px); margin-inline: auto; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #8a438e;
  outline-offset: 4px;
}
.skip-link {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 12px;
  transform: translateY(calc(-100% - 12px));
  padding: 12px 16px;
  background: var(--card);
  border-radius: 10px;
}
.skip-link:focus { transform: translateY(0); }
#events, #install { scroll-margin-top: 22px; }

.top {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}
.top-row, .foot-row, .foot-row nav, .top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.top-row, .foot-row { justify-content: space-between; }
.top-row { min-height: 76px; }
.brand { display: inline-flex; align-items: center; }
.brand img { object-fit: contain; }
.nav-link { font-size: .92rem; font-weight: 650; }
.nav-link, .foot-row a { text-decoration: none; }
.nav-link:hover, .foot-row a:hover { text-decoration: underline; text-underline-offset: .22em; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 32px;
  border: 1px solid #eadde3;
  border-radius: 30px;
  background: linear-gradient(135deg, #f6edf4 3%, #f8e9df 100%);
}
.hero-content {
  align-self: center;
  min-width: 0;
  padding: clamp(32px, 5.2vw, 72px);
}
.hero-art {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 386px;
  padding: clamp(20px, 4vw, 58px);
  overflow: hidden;
  background: radial-gradient(ellipse at 85% 0%, #6d4280 0%, #492753 55%, #351b40 100%);
}
.hero-art::before, .hero-art::after {
  position: absolute;
  width: 92%;
  aspect-ratio: 1;
  border: 1px solid #d2a9e536;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.hero-art::before { top: -44%; right: -15%; }
.hero-art::after { bottom: -53%; left: -18%; }
.hero-figures {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1220 / 625;
  overflow: hidden;
}
.hero-figures img {
  display: block;
  position: absolute;
  width: 245.902%;
  max-width: none;
  height: auto;
}
body[data-page="city"] .hero {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  border-color: #58345f;
  color: #fffaf5;
  background: radial-gradient(ellipse at 93% 0%, #975676, transparent 56%),
    linear-gradient(126deg, #351b40 15%, #502d5b 63%, #784765);
  box-shadow: 0 16px 38px #42244b1c;
}
body[data-page="city"] .hero-content { padding: clamp(32px, 5vw, 65px); }
body[data-page="city"] .hero-art {
  min-height: 330px;
  background: transparent;
}
body[data-page="city"] .hero-figures { transform: rotate(-5deg); }
body[data-page="city"] .hero h1 { font-size: clamp(3.1rem, 6.05vw, 5.85rem); }
body[data-page="city"] .hero .intro { color: #f3e5ee; }
body[data-page="city"] .hero .primary {
  color: var(--deep-plum);
  border-color: #fff2eb;
  background: #fff5ec;
}
body[data-page="city"] .hero .primary:hover { background: #ffeadb; }
body[data-page="city"] .hero .primary:focus-visible { outline-color: #fff5ec; }
.city-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--plum);
  font-size: .8rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.city-label::before {
  width: 9px;
  height: 9px;
  border: 2px solid #8a5380;
  border-radius: 50%;
  content: "";
}
body[data-page="city"] .city-label { color: #f9dbe6; }
body[data-page="city"] .city-label::before { border-color: #f3adc5; }
h1, h2 { font-family: var(--display); font-weight: 500; }
h1 {
  max-width: 14ch;
  font-size: clamp(3rem, 5.95vw, 5.65rem);
  line-height: .96;
  letter-spacing: -.065em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.9rem, 3.85vw, 3.05rem);
  line-height: 1.06;
  letter-spacing: -.046em;
}
h3 {
  font-size: clamp(1.18rem, 1.7vw, 1.45rem);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -.025em;
}
.intro {
  max-width: 35ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(1rem, 1.55vw, 1.2rem);
  line-height: 1.6;
}
.hero .actions { margin-top: 26px; }
.hero-meta { margin-top: 19px; }
.event-return {
  display: block;
  width: fit-content;
  margin-bottom: 20px;
  color: var(--plum);
  font-size: .92rem;
  font-weight: 650;
  text-underline-offset: .2em;
}
.event-description {
  margin-top: clamp(20px, 4vw, 38px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 4px 16px #42244b0c;
}
.event-description summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(17px, 3vw, 26px);
  border-radius: inherit;
  color: var(--deep-plum);
  font: 500 clamp(1.35rem, 3vw, 1.8rem) / 1.15 var(--display);
  list-style: none;
  cursor: pointer;
}
.event-description summary::-webkit-details-marker { display: none; }
.event-description summary::after {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  margin-right: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  content: "";
}
.event-description[open] summary::after { transform: translateY(3px) rotate(225deg); }
.event-description p {
  max-width: 77ch;
  padding: 0 clamp(17px, 3vw, 26px) clamp(18px, 3vw, 28px);
  color: var(--muted);
  line-height: 1.7;
  white-space: pre-line;
}
.event-description p a { color: var(--plum); text-underline-offset: .18em; }
body:not([data-page="city"]) .hero {
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
}
body:not([data-page="city"]) .hero h1 {
  max-width: 23ch;
  font-size: clamp(2.4rem, 4.55vw, 4.15rem);
  text-wrap: pretty;
}
body:not([data-page="city"]) .hero-art { min-height: 312px; }
body:not([data-page="city"]) .intro { max-width: 53ch; }

.results { margin-block: clamp(32px, 5vw, 64px); }
.results-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.results-heading::after {
  height: 1px;
  flex: 1;
  background: var(--border);
  content: "";
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.event-filters {
  order: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 8px;
  width: min(386px, 100%);
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px;
  background: var(--card);
  box-shadow: 0 4px 14px #42244b0c;
}
.city-picker, .day-picker { position: relative; min-width: 0; }
.city-trigger, .day-trigger {
  position: relative;
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 60px;
  padding: 8px 32px 8px 12px;
  border-radius: 14px;
  cursor: pointer;
  list-style: none;
}
.city-trigger { background: #f3e7ed; }
.day-trigger { background: #f6f0ed; }
.city-trigger::-webkit-details-marker, .day-trigger::-webkit-details-marker { display: none; }
.city-trigger:hover, .city-picker[open] .city-trigger { background: #ecd9e6; }
.day-trigger:hover, .day-picker[open] .day-trigger { background: #eee4e6; }
.city-trigger::after, .day-trigger::after {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 8px;
  height: 8px;
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  color: var(--plum);
  transform: translateY(-70%) rotate(45deg);
  content: "";
}
.city-picker[open] .city-trigger::after, .day-picker[open] .day-trigger::after {
  transform: translateY(-30%) rotate(225deg);
}
.filter-label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 650;
}
.filter-value {
  overflow: hidden;
  color: var(--deep-plum);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.city-popover, .day-popover {
  position: absolute;
  inset: calc(100% + 10px) auto auto 0;
  z-index: 4;
  width: max(100%, 252px);
  padding: 9px;
  border: 1px solid #e6d5e0;
  border-radius: 17px;
  background: var(--card);
  box-shadow: 0 14px 34px #351b4030;
}
.day-popover {
  inset: calc(100% + 10px) 0 auto auto;
  width: max(100%, 208px);
}
.city-popover input {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #faf4f6;
  color: var(--ink);
  font: inherit;
}
.city-options {
  max-height: min(280px, 42vh);
  margin-top: 6px;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
}
.city-options:empty { display: none; }
.city-option, .day-option, .day-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 8px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--plum);
  font: inherit;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.city-option:hover, .city-option:focus-visible,
.day-option:hover, .day-option:focus-visible, .day-custom:hover { background: #f7eef2; }
.city-option:focus-visible, .day-option:focus-visible { outline-offset: -3px; }
.city-option[aria-pressed="true"], .day-option[aria-pressed="true"] {
  background: #f1e2eb;
  font-weight: 700;
}
.city-option[aria-pressed="true"]::after, .day-option[aria-pressed="true"]::after {
  width: 10px;
  height: 6px;
  flex: 0 0 10px;
  margin-right: 2px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(-45deg);
  content: "";
}
.day-custom {
  position: relative;
  border-top: 1px solid var(--border);
  border-radius: 0 0 9px 9px;
  font-weight: 650;
}
.day-custom:focus-within { outline: 3px solid #8a438e; outline-offset: -3px; }
.day-custom::after {
  width: 13px;
  height: 12px;
  flex: 0 0 13px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  background: linear-gradient(currentColor, currentColor) 0 3px / 100% 1px no-repeat;
  content: "";
}
.day-custom input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  min-height: 44px;
  margin: 0;
  opacity: 0;
  font: inherit;
  cursor: pointer;
}
.day-custom input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.city-no-results { padding: 10px; color: var(--muted); font-size: .9rem; }
.city-status {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: .9rem;
}
.city-status button { margin-inline-start: .45em; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(295px, 100%), 1fr));
  gap: 16px;
}
.cards:empty { display: none; }
.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 15px;
  padding: clamp(18px, 2.2vw, 24px);
  border: 1px solid var(--border);
  border-radius: 23px;
  background: var(--card);
  box-shadow: 0 3px 10px #422a4510;
}
.event-card {
  position: relative;
  min-height: 188px;
  gap: 13px;
  background: linear-gradient(155deg, #f8eff3 0%, var(--card) 63%);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.event-card:focus-within, .event-card:hover {
  border-color: #cdaac9;
  box-shadow: 0 10px 22px #422a4515;
}
.event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.event-title-link { text-decoration: none; }
.event-title-link::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
}
.event-title-link:hover, .event-title-link:focus-visible {
  color: var(--plum);
  text-decoration: underline;
  text-underline-offset: .18em;
}
.event-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin-inline-start: auto;
}
.event-category {
  padding: 6px 9px;
  border: 1px solid #e7d5e0;
  border-radius: 8px;
  color: #694058;
  font-size: .82rem;
  font-weight: 650;
}
.event-date {
  display: inline-grid;
  justify-items: center;
  align-content: center;
  flex: 0 0 62px;
  min-height: 66px;
  padding: 7px;
  border-radius: 15px;
  color: #63384f;
  background: #f0dce6;
  line-height: 1;
}
.event-date-day { font: 500 1.95rem / 1 var(--display); }
.event-date-month { margin-top: 4px; font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.running, .event-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 9px;
  color: var(--plum);
  background: var(--lavender);
  font-size: .82rem;
  font-weight: 700;
}
.running { color: #28573b; background: #e7f0e8; }
.running::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}
.meta { display: grid; gap: 4px; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.meta-date { color: var(--ink); font-weight: 620; }
.card > .actions { margin-top: auto; padding-top: 4px; }
.groop-links {
  display: grid;
  gap: 6px;
  padding: 12px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}
.groop-link {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding-block: 4px;
  color: var(--plum);
  font-size: .88rem;
  font-weight: 680;
  text-decoration: underline;
  text-decoration-color: #c8b2cf;
  text-underline-offset: .21em;
}
.groop-link:hover { text-decoration-color: currentColor; }
#status:not(:empty) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 19px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  color: var(--muted);
  line-height: 1.54;
}
#status[data-state="error"] { background: #fff4eb; border-color: #eddbce; }
#status[data-state="loading"]::before {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border: 2px solid #ded0e3;
  border-top-color: var(--plum);
  border-radius: 50%;
  content: "";
  animation: turn .8s linear infinite;
}
#status[data-state="loading"] { justify-content: flex-start; }
.more-events {
  display: grid;
  justify-items: center;
  gap: 9px;
  margin-top: 23px;
}
.more-events p:empty { display: none; }
.more-events p { color: var(--muted); font-size: .9rem; text-align: center; }
.more-events button:disabled { opacity: .7; cursor: wait; }
@keyframes turn { to { transform: rotate(360deg); } }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  width: fit-content;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: .92rem;
  font-weight: 690;
  line-height: 1.35;
  text-decoration: none;
  cursor: pointer;
}
.primary { color: #fff; background: var(--plum); }
.primary:hover { background: var(--deep-plum); }
.secondary { color: var(--plum); border-color: #dac9dd; background: var(--card); }
.secondary:hover { background: var(--lavender); }
.hero .primary { min-height: 52px; padding-inline: 20px; }
.action-arrow { font-size: 1.05em; }
.copy-feedback:not(:empty) { flex-basis: 100%; color: var(--muted); font-size: .86rem; }
.copy-field {
  width: min(100%, 430px);
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--ink);
  background: var(--card);
  font: inherit;
}
.install {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 44px;
  padding: clamp(24px, 4.5vw, 54px);
  border-radius: 24px;
  color: #fffbf7;
  background: radial-gradient(ellipse at top right, #54345d, transparent 66%), var(--deep-plum);
}
.results[hidden] + .install { margin-top: clamp(24px, 4vw, 46px); }
.install h2 { font-size: clamp(1.85rem, 3.35vw, 2.8rem); }
.install p { max-width: 53ch; margin-top: 10px; color: #eee1ee; line-height: 1.6; }
.store { border-color: #b898be; color: #fffbf7; }
.store:hover { background: #704b7b; }
.store:focus-visible { outline-color: #fff0f3; outline-offset: 3px; }
.no-script { margin: 20px 0; color: var(--muted); }

footer { border-top: 1px solid var(--border); background: #f1e8ef; color: var(--muted); }
.foot-row { min-height: 70px; font-size: .89rem; }
.footer-brand { font-weight: 750; color: var(--plum); }

@media (max-width: 850px) {
  .hero-content { padding: 32px; }
  .hero-art { min-height: 340px; }
}
@media (max-width: 660px) {
  .wrap { width: calc(100% - 32px); }
  .top-row { min-height: 62px; }
  .top-nav { gap: 9px; }
  .top-download { display: none; }
  .brand img { width: 116px; height: 29px; }
  .nav-link { font-size: .83rem; }
  .hero, body[data-page="city"] .hero, body:not([data-page="city"]) .hero {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 18px;
    border-radius: 23px;
  }
  .hero-content { padding: 27px 24px 30px; }
  .hero-art { min-height: clamp(146px, 49vw, 280px); padding: 21px 27px; }
  body[data-page="city"] .hero h1 { font-size: clamp(2.85rem, 11vw, 4.65rem); }
  body[data-page="city"] .hero-content { padding: 27px 24px 12px; }
  body[data-page="city"] .hero-art { min-height: clamp(130px, 45vw, 250px); }
  body:not([data-page="city"]) .hero-art { display: none; }
  h1 { font-size: clamp(2.65rem, 10vw, 4.4rem); }
  .intro { margin-top: 15px; }
  .hero .actions { margin-top: 21px; }
  .results-heading:has(.event-filters:not([hidden])) {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
  }
  .results-heading:has(.event-filters:not([hidden]))::after { display: none; }
  .event-filters { width: 100%; }
  .install { margin-bottom: 30px; border-radius: 20px; }
}
@media (max-width: 355px) {
  .wrap { width: calc(100% - 24px); }
  .hero-content { padding-inline: 20px; }
  .foot-row nav { gap: 10px; }
  .event-filters { grid-template-columns: 1fr; }
  .city-popover, .day-popover { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
