:root {
  --bg: #0a0a0a;
  --panel: #141414;
  --panel-2: #1c1c1c;
  --text: #f2f2f2;
  --muted: #8a8a8a;
  --gold: #C9A227;
  --available: #2d5f3f;
  --busy: #8b1a1a;
  --past: #262626;
  --border: #2a2a2a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 300;
  min-height: 100vh;
  padding-bottom: 4rem;
}

.hero {
  background: linear-gradient(180deg, #000 0%, #0a0a0a 100%);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}
.hero-inner { max-width: 900px; margin: 0 auto; }
.brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.tagline {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.updated {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.legend {
  max-width: 1100px;
  margin: 1.8rem auto 1rem;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.legend-item { display: flex; align-items: center; gap: 0.5rem; }
.swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}
.swatch.available { background: var(--available); }
.swatch.busy { background: var(--busy); }
.swatch.past { background: var(--past); }

main {
  max-width: 1100px;
  margin: 1rem auto;
  padding: 0 1rem;
}

.loading {
  text-align: center;
  padding: 4rem 0;
  color: var(--muted);
}

.month {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem;
  margin-bottom: 1.2rem;
}
.month-header {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 1rem;
  text-align: center;
}
.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}
.weekday {
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  padding: 0.3rem 0;
}
.days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.day {
  aspect-ratio: 1;
  background: var(--panel-2);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text);
  position: relative;
  cursor: default;
  transition: transform 0.1s ease;
}
.day.empty { visibility: hidden; }
.day.available { background: var(--available); }
.day.busy { background: var(--busy); }
.day.past { background: var(--past); color: var(--muted); opacity: 0.5; }
.day.today { outline: 2px solid var(--gold); outline-offset: -2px; }
.day .num { font-weight: 500; }
.day .dot {
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
}

.notes {
  max-width: 900px;
  margin: 2.5rem auto 0;
  padding: 1.8rem 1.5rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.notes h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}
.notes ul { list-style: none; }
.notes li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  line-height: 1.5;
  color: #d4d4d4;
}
.notes li:last-child { border-bottom: none; }
.notes strong { color: var(--gold); font-weight: 500; }

footer {
  max-width: 900px;
  margin: 2rem auto 0;
  padding: 0 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--gold); }
footer > div { padding: 0.3rem 0; }

.event-detail {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.event-detail.hidden { display: none; }
.event-detail-inner {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  position: relative;
}
.close {
  position: absolute;
  top: 0.5rem;
  right: 0.8rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}
.close:hover { color: var(--text); }
#ed-date {
  font-family: 'Cormorant Garamond', serif;
  color: var(--gold);
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}
#ed-body { font-size: 0.9rem; line-height: 1.6; }
#ed-body .ev {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
#ed-body .ev:last-child { border-bottom: none; }
#ed-body .ev-title { font-weight: 500; color: var(--text); }
#ed-body .ev-time { color: var(--muted); font-size: 0.8rem; }

@media (max-width: 640px) {
  .brand { font-size: 1.6rem; letter-spacing: 0.25em; }
  .tagline { font-size: 0.7rem; }
  .day { font-size: 0.7rem; }
  .month { padding: 0.8rem; }
  .month-header { font-size: 1.2rem; }
  .legend { gap: 0.6rem; font-size: 0.7rem; }
}
