:root {
  color-scheme: light;
  --page: #f4f4ec;
  --card: #fffef9;
  --ink: #142a21;
  --muted: #53655d;
  --line: #dbe0d4;
  --green: #234d3b;
  --pine: #142f24;
  --lime: #d9f77f;
  --error: #8f311d;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--page); font: 15px/1.55 var(--sans); }
h1, h2, p { margin: 0; }
button, input, select { font: inherit; }
button, a, select, input[type="checkbox"] { cursor: pointer; }
button:disabled, input:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 3px solid #527a43; outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }

.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; white-space: nowrap; }
.brand, nav a { color: var(--ink); text-decoration: none; }
.brand-mark { width: 29px; height: 29px; border-radius: 50%; background: var(--green); position: relative; overflow: hidden; }
.brand-mark::after { content: ""; position: absolute; inset: -4px 3px; border-inline: 1px solid var(--lime); border-radius: 50%; transform: rotate(38deg); }
nav { display: flex; gap: clamp(8px, 3vw, 27px); align-items: center; }
nav a { min-height: 44px; display: grid; align-items: center; padding-inline: 5px; white-space: nowrap; font-size: 13px; }
nav a:hover { text-decoration: underline; }

.hero { position: relative; isolation: isolate; min-height: 240px; display: flex; align-items: center; overflow: hidden; background: var(--pine); color: #f8ffed; border-radius: 22px; padding: clamp(24px, 6vw, 56px); }
.hero-copy { z-index: 1; }
.location { color: var(--lime); font-size: 14px; letter-spacing: .13em; }
h1 { font-size: clamp(35px, 6vw, 62px); letter-spacing: -.055em; font-weight: 800; line-height: 1.14; margin: 13px 0 15px; }
.hero-meta { color: #c8dacb; font-size: 15px; }
.hero-meta span { color: #799982; margin-inline: 9px; }
.court-art { position: absolute; right: 5%; top: -28%; width: 39%; height: 155%; border: 1px solid #8aaa886e; background: #295641; transform: rotate(-16deg); }
.court-art::before, .court-art::after, .court-art i, .court-art b, .court-art em { content: ""; position: absolute; border: 1px solid #b5d0a57a; }
.court-art::before { inset: 12% 9%; }
.court-art::after { inset: 30% 17%; }
.court-art i { top: 50%; width: 100%; border-width: 1px 0 0; }
.court-art b { inset: 0 17%; border-width: 0 1px; }
.court-art em { inset: 30% 50%; border-width: 0 1px 0 0; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 304px; align-items: start; gap: 18px; margin-top: 20px; }
.panel { min-width: 0; padding: clamp(16px, 3vw, 24px); background: var(--card); border: 1px solid var(--line); border-radius: 17px; scroll-margin-top: 16px; }
.section-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
h2 { font-size: 21px; line-height: 1.3; letter-spacing: -.035em; }
.muted { color: var(--muted); font-size: 13px; }
.section-head .muted { margin-top: 6px; }
.button { min-height: 44px; padding: 8px 14px; border-radius: 9px; border: 1px solid transparent; font-weight: 650; white-space: nowrap; transition: background-color .15s; }
.primary { color: #fff; background: var(--green); }
.primary:not(:disabled):hover { background: #183e2e; }
.secondary { color: var(--ink); background: #eff3e6; border-color: var(--line); }
.secondary:not(:disabled):hover { background: #e1ead7; }

.filters { margin: 22px 0 20px; }
.filter-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
label, legend { font-weight: 650; font-size: 13px; }
label input, label select { display: block; width: 100%; margin-top: 5px; }
input[type="time"], input[type="password"], select { min-height: 44px; min-width: 0; padding: 6px 9px; color: var(--ink); background: #f9faf5; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; }
.court-filter { padding: 0; margin: 15px 0 0; border: 0; min-width: 0; }
.court-filter legend { padding: 0; margin-bottom: 6px; }
.court-options { display: flex; flex-wrap: wrap; gap: 7px; }
.court-options button { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf7; color: var(--ink); padding-inline: 11px; font-weight: 620; }
.court-options button:hover { border-color: var(--green); }
.court-options [aria-pressed="true"] { color: var(--pine); border-color: #74964b; background: #e9f5d7; }

.result-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; border-top: 1px solid var(--line); padding-top: 14px; font-weight: 700; }
.result-heading span:last-child { color: var(--muted); font-size: 12px; font-weight: 400; }
.day { margin-top: 14px; }
.day h3 { margin: 0 0 4px; color: var(--muted); font-size: 13px; font-weight: 650; }
.slots { list-style: none; margin: 0; padding: 0; }
.slot { display: grid; align-items: center; grid-template-columns: minmax(100px, 1fr) minmax(65px, .55fr) auto; gap: 7px; min-height: 49px; border-bottom: 1px solid var(--line); }
.slot:last-child { border-bottom: 0; }
.slot-time { font-weight: 730; font-variant-numeric: tabular-nums; white-space: nowrap; }
.slot-quota { padding: 3px 8px; color: #244428; background: #e9f1db; border-radius: 6px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.empty { color: var(--muted); padding: 25px 0 18px; }
.notice { margin-top: 12px; padding: 9px 10px; background: #edf3e4; color: var(--pine); border-radius: 7px; font-size: 13px; }
.notice.error { background: #fbede7; color: var(--error); }

.notifications .section-head { align-items: center; }
.notifications > .muted { margin-top: 9px; }
.passcode { display: block; margin-top: 20px; margin-bottom: 5px; }
#bark-token { width: 100%; }
.state { color: var(--muted); font-size: 12px; white-space: nowrap; }
.notification-actions { display: grid; gap: 8px; margin-top: 12px; }
.watch { border-top: 1px solid var(--line); margin-top: 19px; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.watch p { margin-top: 3px; }
.watch input { flex: 0 0 auto; accent-color: var(--green); width: 22px; height: 22px; margin: 10px; }
label[for="watch"] { display: flex; align-items: center; min-height: 29px; cursor: pointer; }
.footer { color: var(--muted); font-size: 12px; padding-block: 24px; }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 30px); }
  .site-header { min-height: 64px; }
  .hero { min-height: 192px; }
  .court-art { right: -12%; width: 56%; opacity: .65; }
  .layout { grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
}
@media (max-width: 410px) {
  .filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-fields label:first-child { grid-column: 1 / -1; }
  .site-header a { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
