:root {
  color-scheme: light;
  --bg: #f3f0e8;
  --paper: #fffcf7;
  --ink: #1c1915;
  --muted: #6d675e;
  --line: #e3ddd2;
  --busy: #0e6b45;
  --track: #e7e1d6;
  --free: #8a8378;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 "Segoe UI", system-ui, sans-serif;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 20px 8px;
}

.brand {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--busy);
  font-weight: 700;
}

h1 {
  margin: 4px 0 8px;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 650;
}

.lede {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
}

.periods {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.periods button {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}

.periods button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 20px 48px;
}

.summary {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.summary strong {
  font-size: 40px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.summary p, .status, .city-meta, .club-meta, .court-meta {
  margin: 0;
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.filters button {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  cursor: pointer;
}

.filters button[aria-pressed="true"] {
  background: var(--busy);
  color: white;
  border-color: var(--busy);
}

.city {
  margin-top: 22px;
}

.city-head, .club-head, .court-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.city h2, .club h3 {
  margin: 0;
  font-size: 22px;
}

.club {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 10px;
}

.club h3 { font-size: 18px; }

.court {
  margin-top: 12px;
}

.court button.court-head {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.bar {
  height: 8px;
  background: var(--track);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--busy);
}

.slots {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.slots li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.busy { color: var(--busy); font-weight: 650; }
.free { color: var(--free); }

.status { padding: 24px 0; }

@media (max-width: 720px) {
  .top { flex-direction: column; align-items: flex-start; }
  h1 { font-size: 28px; }
  .summary { flex-direction: column; }
  .summary strong { font-size: 34px; }
}
