:root {
  color-scheme: light dark;
  --bg: #f8faf7;
  --card: #ffffff;
  --text: #33383d;
  --heading: #12304a;
  --muted: #6b7278;
  --accent: #2f8f7e;      /* seafoam, darkened slightly for text/icon contrast on light bg */
  --accent-bg: #65c9b8;   /* seafoam, full brightness for fills/tags */
  --accent-contrast: #0b241c;
  --danger: #b3452f;
  --border: #e4e7e2;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1d1f;
    --card: #262a2d;
    --text: #eef1ee;
    --heading: #f8faf7;
    --muted: #a2a9a6;
    --accent: #7ad6c6;
    --accent-bg: #3c7c70;
    --accent-contrast: #eafbf7;
    --border: #383d40;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 680px; margin: 0 auto; padding: 1rem 1.25rem 2rem; }

h1 {
  font-family: var(--serif);
  color: var(--heading);
  font-size: 2rem;
  line-height: 1.15;
  margin: 0.25rem 0 0.4rem;
  letter-spacing: -0.01em;
}
.tagline {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 0.35rem;
  max-width: 46ch;
}
.meta-links { font-size: 0.9rem; color: var(--muted); margin: 0 0 1.75rem; }
.meta-links a { color: var(--accent); font-weight: 600; }

h2.day-heading {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--heading);
  margin: 1.25rem 0 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--accent-bg);
  display: inline-block;
}
h2.day-heading:first-child { margin-top: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
  box-shadow: 0 1px 2px rgba(18, 48, 74, 0.04);
}
.card .title { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; color: var(--heading); margin: 0 0 0.2rem; }
.card .meta { color: var(--muted); font-size: 0.9rem; margin: 0.1rem 0; }
.card .desc { margin: 0.4rem 0 0; font-size: 0.92rem; }

.tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--accent-contrast);
  margin-right: 0.25rem;
}

button, .btn {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.65rem 1.1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  min-height: 44px;
}
button.primary, .btn.primary { background: var(--heading); color: var(--bg); border-color: var(--heading); }
button.danger, .btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
button:disabled { opacity: 0.6; cursor: default; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.btn.ghost { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.55); backdrop-filter: blur(2px); }

input, textarea, select {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.65rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  margin-bottom: 0.6rem;
}
label { font-size: 0.85rem; color: var(--muted); }
.checkbox-row {
  display: flex;
  gap: 0.4rem 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}
.checkbox-row label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--text);
}
.checkbox-row input[type="checkbox"] { width: auto; margin: 0; }
.row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.row > * { flex: 1; }

.thumb-picker { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }
.thumb-swatch {
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 600;
  cursor: pointer;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb-swatch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-swatch.active { border-color: var(--accent); }
.empty { color: var(--muted); text-align: center; padding: 2.5rem 0; font-size: 0.98rem; }
.section {
  border-top: 1px solid var(--border);
  margin-top: 1.75rem;
  padding-top: 1.25rem;
}
a { color: var(--accent); }
.footnote { color: var(--muted); font-size: 0.82rem; margin-top: 1.5rem; padding-top: 0.85rem; border-top: 1px solid var(--border); }

.tab-bar {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin: 0.5rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
}
.tab-btn {
  flex: none;
  background: transparent;
  border: none;
  min-height: auto;
  padding: 0.5rem 0.2rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  border-radius: 0;
  white-space: nowrap;
}
.tab-btn.active { color: var(--heading); border-bottom-color: var(--accent-bg); }
.tab-panel[hidden] { display: none; }

/* ---- Site header + hero (public calendar page only) ---- */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); position: relative; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.brand { text-decoration: none; line-height: 1.1; display: block; }
.brand-word { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--heading); }
.brand-loop { color: var(--accent); }
.brand-city { display: block; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.14em; color: var(--accent); text-transform: uppercase; margin-top: -0.1rem; }
.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.header-tagline { flex: 1; color: var(--muted); font-size: 0.8rem; text-align: center; margin: 0; padding: 0 0.75rem; }
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; row-gap: 0.3rem; }
  .header-tagline { order: 3; flex: 1 1 100%; font-size: 0.72rem; padding: 0; }
}
.ios-hint { color: var(--muted); font-size: 0.8rem; text-align: center; margin: 0; padding: 0 1rem 0.5rem; }

.header-install {
  min-height: 36px;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.icon-btn {
  min-height: 36px;
  width: 36px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.icon-btn span { display: block; width: 16px; height: 2px; background: var(--heading); border-radius: 1px; transition: transform 0.15s, opacity 0.15s; }
.icon-btn.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.icon-btn.open span:nth-child(2) { opacity: 0; }
.icon-btn.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.menu-wrap { position: relative; }
.menu-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(18, 48, 74, 0.15);
  min-width: 12rem;
  padding: 0.4rem;
  z-index: 20;
}
.menu-dropdown a {
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.menu-dropdown a:hover { background: var(--bg); color: var(--accent); }

.hero {
  position: relative;
  background-image: url("/images/hero1.png");
  background-size: cover;
  background-position: center bottom;
  background-color: var(--heading);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18,48,74,0.55) 0%, rgba(18,48,74,0.72) 100%);
}
.hero-inner { position: relative; padding-top: 2rem; padding-bottom: 1.75rem; }
.hero-title {
  font-family: var(--serif);
  color: #fff;
  font-size: 2.2rem;
  line-height: 1.06;
  margin: 0 0 0.6rem;
  letter-spacing: -0.01em;
}
.hero-title .script {
  font-family: "Caveat", var(--serif);
  color: var(--accent-bg);
  font-size: 1.35em;
  font-weight: 600;
  line-height: 1;
}
.hero-sub { color: #f0f3f1; font-size: 1rem; max-width: 40ch; margin: 0 0 1.1rem; }
.hero-ctas .btn { flex: none; }

@media (min-width: 640px) {
  .hero-title { font-size: 3rem; }
}

/* ---- Disclaimer bar: dismissible, shown above the filters until closed ---- */
.disclaimer-bar[hidden] { display: none; }
.disclaimer-bar {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: rgba(101, 201, 184, 0.12);
  border: 1px solid rgba(101, 201, 184, 0.35);
  border-radius: 12px;
  padding: 0.65rem 0.7rem 0.65rem 0.85rem;
  margin: 0 0 1rem;
}
.disclaimer-bar p { margin: 0; font-size: 0.82rem; color: var(--text); line-height: 1.45; }
.disclaimer-close {
  flex: none;
  min-height: auto;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.disclaimer-close:hover { color: var(--text); background: rgba(101, 201, 184, 0.18); }

/* ---- Filters bar: contained toolbar for category pills + area select ---- */
.filters-bar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.55rem 0.65rem;
  margin: 0 0 1rem;
}
.filters-row { display: flex; align-items: center; gap: 0.6rem; margin: 0; }
.filters-row .tab-bar { margin: 0; padding-bottom: 0; border-bottom: none; }
.filters-row select {
  width: auto;
  flex: none;
  margin-bottom: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.9rem;
  max-width: 11rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}
.category-select-mobile { display: none; }

/* Below this width the pill row gets cramped -- collapse categories into a
   dropdown like the area filter instead of a tiny horizontal scroller. */
@media (max-width: 560px) {
  #categoryTabs { display: none; }
  .category-select-mobile { display: block; flex: 1; max-width: none; }
  .filters-row select { max-width: none; flex: 1; }
}

/* ---- Pill-style category filters (public calendar only) ---- */
.pill-tabs { border-bottom: none; gap: 0.5rem; }
.pill-tabs .tab-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  background: var(--card);
  color: var(--text);
  font-size: 0.9rem;
}
.pill-tabs .tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- Day-jump nav: anchors to a day heading, not a filter ---- */
.day-nav { margin: 0 0 0.75rem; }
.day-nav .tab-btn {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
}
.day-nav .tab-btn:hover { color: var(--accent); border-color: var(--accent); }
.day-nav .tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- Card thumbnail ---- */
.card-body { display: flex; gap: 0.9rem; }
.card-thumb { flex: none; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--border); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-content { flex: 1; min-width: 0; }

/* ---- Card action row: Interested + calendar links + report ---- */
.card-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.65rem; }
.btn-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.btn-pill:disabled { opacity: 0.65; cursor: default; }

/* Interested is the primary action -- solid, distinct from the utility pills. */
.btn-pill.interested-btn { background: var(--heading); color: #fff; border-color: var(--heading); }
.btn-pill.interested-btn.marked { background: var(--accent); border-color: var(--accent); }

/* Calendar links + report are secondary/utility -- lighter, same family, smaller visual weight. */
.btn-pill.cal-link { background: var(--bg); color: var(--accent); border-color: var(--accent-bg); }
.btn-pill.flag-toggle { background: transparent; color: var(--muted); border-color: var(--border); font-weight: 500; }

.interest-count { display: block; margin-top: 0.35rem; }

/* Below the cramped-pills breakpoint, keep the action pills on one line and
   let it scroll horizontally instead of wrapping into ragged rows -- same
   pattern as the category tabs and day-nav. */
@media (max-width: 560px) {
  .card-actions { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.15rem; }
  .card-actions .btn-pill { flex: none; }
}
