:root {
  --ivory: #faf7f0;
  --paper: #fffdf9;
  --green: #085041;
  --green-2: #0b6754;
  --green-soft: #eaf3ee;
  --coral: #ef6b54;
  --coral-dark: #de5a45;
  --ink: #243238;
  --muted: #68747a;
  --border: #ddd4c4;
  --info: #eaf5f7;
  --shadow: 0 6px 18px rgba(45, 54, 49, .05);
  --filter-black: #3a3a3a;
}

* { box-sizing: border-box; }
html { background: var(--ivory); }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
a { color: inherit; }

.page-shell {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: 24px 18px calc(42px + env(safe-area-inset-bottom));
}

.masthead {
  text-align: center;
  padding: 2px 6px 18px;
}
.brand-logo {
  display: block;
  width: 170px;
  max-width: 48vw;
  margin: 0 auto 12px;
}
.masthead h1 {
  margin: 0;
  color: var(--green);
  font-size: clamp(1.38rem, 4.1vw, 1.82rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
  font-weight: 800;
}
.subhead {
  max-width: 650px;
  margin: 8px auto 0;
  font-size: clamp(.8rem, 2.3vw, .92rem);
  line-height: 1.35;
}

.date-panel {
  background: rgba(255,255,255,.28);
  border-radius: 18px;
  padding: 14px 0 5px;
}
.date-panel h2 {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 1.15rem;
}
.date-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: stretch;
}
.date-field {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 8px 12px 7px;
  min-height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 1px 0 rgba(20,40,35,.02);
}
.date-field span {
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: 2px;
}
.date-field input {
  appearance: none;
  border: 0;
  outline: 0;
  width: 100%;
  min-width: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
}
.primary-action {
  border: 0;
  border-radius: 16px;
  background: var(--green);
  color: #fff;
  min-width: 140px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 700;
}
.primary-action:hover { background: var(--green-2); }
.result-count {
  min-height: 22px;
  margin: 8px 1px 0;
  color: var(--green);
  font-size: .92rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  overflow: visible;
  padding: 7px 0 14px;
}
.filter {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.filter:hover {
  border-color: var(--filter-black);
}
.filter.active {
  background: var(--filter-black);
  border-color: var(--filter-black);
  color: #fff;
}

.events-list {
  display: grid;
  gap: 12px;
}
.event-card {
  background: rgba(255,255,255,.76);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.event-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.event-title {
  margin: 0;
  color: var(--green);
  font-size: 1.35rem;
  line-height: 1.12;
  letter-spacing: -.012em;
}
.season-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: .73rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  max-width: 148px;
}
.event-meta {
  display: grid;
  gap: 5px;
  margin: 10px 0 9px;
}
.meta-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .92rem;
  line-height: 1.3;
}
.meta-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.meta-icon svg, .good-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.description {
  margin: 8px 0 12px;
  font-size: .96rem;
  line-height: 1.42;
}
.good-to-know {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 9px;
  align-items: start;
  background: var(--info);
  border-radius: 13px;
  padding: 11px 12px;
  margin-top: 8px;
}
.good-icon {
  width: 20px;
  height: 20px;
  color: var(--green);
  line-height: 1;
}
.good-copy strong {
  display: block;
  color: var(--green);
  font-size: .76rem;
  letter-spacing: .09em;
  margin-bottom: 2px;
}
.good-copy span {
  display: block;
  font-size: .89rem;
  line-height: 1.35;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.card-actions a,
.card-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 39px;
  border-radius: 999px;
  padding: 9px 15px;
  font-size: .88rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.ticket-link {
  background: var(--coral);
  border: 1px solid var(--coral);
  color: #fff;
}
.ticket-link:hover { background: var(--coral-dark); border-color: var(--coral-dark); }
.info-link,
.flyer-button {
  background: #fff;
  border: 1px solid var(--green);
  color: var(--green);
}
.info-link:hover,
.flyer-button:hover { background: var(--green-soft); }

.empty-state {
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 18px;
  padding: 28px 18px;
  background: rgba(255,255,255,.45);
}
.empty-state h2 { color: var(--green); margin: 0 0 6px; }
.empty-state p { margin: 0 0 16px; color: var(--muted); }
.secondary-action {
  border: 1px solid var(--green);
  background: #fff;
  color: var(--green);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.keep-planning {
  margin-top: 15px;
  display: grid;
  gap: 11px;
  padding: 15px;
  border-radius: 16px;
  background: #e8f3f3;
  color: var(--ink);
}
.keep-planning-copy { display: grid; gap: 3px; }
.keep-planning-copy strong { color: var(--green); font-size: 1rem; }
.keep-planning-copy span { font-size: .87rem; line-height: 1.35; }
.keep-planning-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.utility-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  padding: 9px 14px;
  font-size: .86rem;
  font-weight: 750;
  text-decoration: none;
}
.utility-link:hover { background: var(--green-soft); }
.affiliate-note {
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.3;
}

.flyer-modal {
  width: min(92vw, 640px);
  max-height: 90vh;
  border: 0;
  border-radius: 18px;
  padding: 12px;
  background: var(--paper);
  box-shadow: 0 18px 80px rgba(0,0,0,.35);
}
.flyer-modal::backdrop { background: rgba(13,22,20,.78); }
.flyer-modal img { display: block; max-width: 100%; max-height: 82vh; margin: auto; border-radius: 10px; }
.modal-close {
  position: absolute;
  right: 10px;
  top: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  color: #fff;
  background: rgba(0,0,0,.66);
  font-size: 1.45rem;
  cursor: pointer;
}

@media (max-width: 660px) {
  .page-shell { padding: 20px 16px 30px; }
  .brand-logo { width: 150px; margin-bottom: 10px; }
  .masthead { padding-bottom: 11px; }
  .masthead h1 { font-size: 1.32rem; }
  .subhead { font-size: .81rem; line-height: 1.3; }
  .date-grid { grid-template-columns: 1fr 1fr; }
  .primary-action { grid-column: 1 / -1; min-height: 48px; }
  .filter { padding: 9px 14px; font-size: .93rem; }
  .event-card { padding: 14px; }
  .event-title { font-size: 1.2rem; }
  .season-badge { max-width: 120px; font-size: .67rem; }
  .keep-planning-actions { flex-direction: column; }
  .utility-link { width: 100%; }
}

@media (max-width: 420px) {
  .page-shell { padding-left: 13px; padding-right: 13px; }
  .date-grid { gap: 8px; }
  .date-field { padding-left: 9px; padding-right: 9px; }
  .date-field input { font-size: .9rem; }
  .event-head { display: block; }
  .season-badge { display: inline-block; margin-top: 7px; }
  .card-actions a, .card-actions button { flex: 1 1 auto; }
}
