:root {
  color-scheme: light;
  --navy: #12253d;
  --ink: #15263a;
  --muted: #526176;
  --surface: #fff;
  --background: #f6f7f5;
  --border: #dce1e6;
  --orange: #923800;
  --blue: #144f8c;
  --focus: #9e4900;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--background);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
p, h1, h2, h3 { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.shell { max-width: 1240px; width: calc(100% - 64px); margin-inline: auto; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 5; padding: 12px 16px; color: var(--ink); background: var(--surface); }
.skip-link:focus { top: 12px; }

.hero { background: var(--navy); color: #fff; }
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 10px;
  border-bottom: 1px solid #ffffff29;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-title {
  font-size: clamp(1.875rem, 4.8vw, 4.25rem);
  font-style: italic;
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.brand-photo {
  width: 54px;
  height: 54px;
  flex: none;
  border: 1px solid #ffffff4d;
  border-radius: 50%;
  object-fit: cover;
}
.region { color: #dce6f3; font-size: .875rem; }
.hero-body { position: relative; overflow: hidden; padding: 36px 0 38px; }
.hero-body > div:first-child { position: relative; z-index: 1; }
.hero-body h2 { font-size: clamp(1.375rem, 3vw, 2.625rem); line-height: 1.15; letter-spacing: -.035em; }
.hero p { max-width: 44rem; margin-top: 13px; color: #dce6f3; font-size: clamp(1rem, 2vw, 1.15rem); }
.field {
  width: 330px;
  height: 230px;
  position: absolute;
  right: 1%;
  top: 90px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  color: #8ca0b83d;
  pointer-events: none;
}
.field::before, .field::after {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.field::after { width: 263px; height: 263px; opacity: .65; }
.diamond {
  position: relative;
  width: 120px;
  height: 120px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  border-radius: 3px;
}
.diamond i { position: absolute; width: 9px; height: 9px; border: 1px solid #edb48eaa; background: var(--navy); border-radius: 2px; }
.diamond i:nth-child(1) { top: -5px; left: -5px; }
.diamond i:nth-child(2) { top: -5px; right: -5px; }
.diamond i:nth-child(3) { bottom: -5px; left: -5px; }
.diamond i:nth-child(4) { bottom: -5px; right: -5px; background: #edb48e; }
.mound { position: absolute; width: 25px; height: 25px; border: 1px solid currentColor; border-radius: 50%; }

.camp-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.camp-gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #e4e8ed;
}
.camp-gallery .sportsmanship-photo { object-position: center 54%; }
.camp-gallery .teammates-photo { object-position: left center; }
.camp-gallery .infield-photo { object-position: center 48%; }

.filters {
  position: relative;
  z-index: 2;
  margin-top: 20px;
  padding: 22px 25px 24px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: 0 7px 20px #15263a0b;
}
.sport-filters { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.sport-filters legend, .filter-grid label, .date-field { padding: 0; font-size: .87rem; font-weight: 710; }
.sport-options { display: flex; width: fit-content; max-width: 100%; flex-wrap: wrap; gap: 4px; background: #eef1f4; border-radius: 11px; padding: 4px; margin-top: 7px; }
.sport-options label { display: flex; position: relative; cursor: pointer; }
.sport-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sport-options span { display: grid; place-items: center; min-height: 42px; min-width: 105px; padding: 6px 16px; border-radius: 8px; font-size: .9rem; font-weight: 700; }
.sport-options span:hover { background: #e2e8ed; }
.sport-options input:checked + span { background: var(--navy); color: #fff; }
.sport-options input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.filter-grid { display: grid; grid-template-columns: 1.1fr .62fr 1.3fr 1.22fr 1fr 1fr 1fr; gap: 12px; align-items: end; }
.filter-grid label, .date-field { display: grid; min-width: 0; gap: 6px; }
.filter-grid select, .date-trigger {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #c8d0d9;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 450;
  font-size: .9rem;
}
.date-trigger { display: flex; align-items: center; justify-content: space-between; gap: 6px; text-align: left; color: var(--muted); }
.date-trigger.has-date { color: var(--ink); }
.date-trigger:hover { background: #f4f6f8; }
.date-trigger.invalid-date { border-color: #951e2d; }
.calendar-icon { position: relative; flex: 0 0 16px; height: 15px; border: 1.5px solid currentColor; border-radius: 3px; }
.calendar-icon::before { content: ""; position: absolute; inset: 3px 0 auto; border-top: 1.5px solid; }
.calendar-icon::after { content: ""; position: absolute; top: -3px; left: 3px; width: 7px; height: 4px; border-inline: 1.5px solid; }
.reset { min-height: 44px; padding: 8px 13px; border: 1px solid #c8d0d9; border-radius: 8px; background: #fff; color: var(--ink); font-size: .88rem; font-weight: 700; }
.reset:hover { background: #eef1f4; }
.date-error, .date-summary { margin-top: 12px; font-size: .9rem; }
.date-error { color: #951e2d; }
.date-summary { color: var(--muted); }

.date-picker {
  width: min(23rem, calc(100% - 24px));
  max-width: none;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 16px 48px #12253d40;
}
.date-picker::backdrop { background: #12253d70; }
.date-picker-header, .date-picker-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.date-picker-header h2 { font-size: 1.125rem; line-height: 1.25; }
.date-picker-nav { margin: 6px 0 10px; font-weight: 700; text-align: center; }
.date-picker button {
  min-height: 42px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--navy);
  font-weight: 650;
}
.date-picker button:hover:not(:disabled) { background: #eef1f4; }
.date-picker-nav button, .date-picker-close { flex: 0 0 44px; font-size: 1.45rem; line-height: 1; }
.date-picker-weekdays, .date-picker-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.date-picker-weekdays { color: var(--muted); font-size: .8rem; font-weight: 650; }
.date-picker-days button[aria-current="date"] { border-color: var(--blue); }
.date-picker-days button[aria-pressed="true"] { color: #fff; background: var(--navy); }
.date-picker-days button[aria-pressed="true"]:hover { background: #294665; }
.date-picker .date-picker-clear { margin-top: 8px; padding-inline: 10px; font-size: .9rem; }
.date-picker-clear:disabled { color: var(--muted); opacity: .55; cursor: default; }

.results-section { padding-top: 30px; }
.results-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.results-section h2 { font-size: clamp(1.2rem, 3vw, 1.5rem); line-height: 1.25; letter-spacing: -.025em; }
#result-count, #possible > p { font-size: .9rem; color: var(--muted); }
#possible { padding-top: 25px; }
#possible > p { margin: 6px 0 14px; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag { display: inline-flex; border-radius: 5px; padding: 3px 8px; font-size: .75rem; font-weight: 750; color: #34475b; background: #edf1f4; }
.tag.softball { background: #fff0e4; color: var(--orange); }
.tag.baseball { background: #e9f2ff; color: var(--blue); }
.card h3 { font-size: 1.17rem; line-height: 1.26; letter-spacing: -.018em; overflow-wrap: anywhere; }
.organizer { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.facts, .more-facts { display: grid; gap: 5px; margin: 15px 0; font-size: .88rem; }
.facts > div, .more-facts > div { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 5px; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.registration {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: .82rem;
  font-weight: 650;
  color: #754507;
  background: #fff6e7;
  padding: 7px 9px;
  border-radius: 6px;
}
.registration::before {
  content: "";
  flex: 0 0 7px;
  height: 7px;
  margin-top: .45em;
  border-radius: 50%;
  background: currentColor;
}
.registration.open { color: #175e46; background: #e8f6ee; }
.registration.appointment, .registration.closed { color: var(--muted); background: #f0f2f4; }

.card-actions { margin-top: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; }
.action, summary { min-height: 44px; display: inline-flex; align-items: center; font-size: .85rem; font-weight: 700; }
.action { color: var(--navy); border-radius: 7px; text-underline-offset: 3px; }
.action.primary { padding: 6px 12px; color: #fff; background: var(--navy); text-decoration: none; }
.action.primary:hover { background: #294665; }
.external-icon { position: relative; width: 10px; height: 10px; margin-left: 6px; }
.external-icon::before { content: ""; position: absolute; top: 1px; right: 1px; width: 6px; height: 6px; border-top: 1px solid; border-right: 1px solid; }
.external-icon::after { content: ""; position: absolute; top: 4px; right: 0; width: 10px; border-top: 1px solid; transform: rotate(-45deg); }
.card details { border-top: 1px solid var(--border); margin-top: 8px; }
summary { width: fit-content; color: var(--muted); cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; margin-left: 7px; font-size: 1rem; }
details[open] summary::after { content: "−"; }
summary:hover { color: var(--ink); }
.more-facts { margin: 0 0 8px; }
.card details p { margin-bottom: 5px; font-size: .88rem; }
.empty { grid-column: 1 / -1; padding: 22px; border: 1px dashed #adb8c4; border-radius: 12px; background: white; }
.empty p + p { margin-top: 5px; color: var(--muted); }
footer { margin-top: 32px; border-top: 1px solid var(--border); padding: 18px 0 24px; color: var(--muted); font-size: .83rem; }

@media (max-width: 1150px) {
  .filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .reset { justify-self: start; }
}
@media (max-width: 1040px) {
  .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 690px) {
  .shell { width: calc(100% - 36px); }
  .hero-body { padding: 28px 0 29px; }
  .masthead { gap: 8px; }
  .brand { gap: 9px; }
  .brand-photo { width: 42px; height: 42px; }
  .field { display: none; }
  .camp-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
  .filters { margin-top: 14px; padding: 17px; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .filter-grid select { font-size: 1rem; }
  .sport-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
  .sport-options span { width: 100%; min-width: 0; padding: 6px 4px; white-space: nowrap; }
  .card-grid { grid-template-columns: 1fr; gap: 12px; }
  .results-header { flex-wrap: wrap; gap: 3px 12px; }
}
@media (max-width: 480px) {
  .masthead { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .region { margin-inline-start: 51px; }
}
@media (max-width: 365px) {
  .filter-grid { grid-template-columns: 1.25fr .75fr; }
  .filter-grid .date-field,
  .filter-grid label:has(select[name=state], select[name=county], select[name=city]) { grid-column: 1 / -1; }
}


.search-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.search-button { justify-content: center; min-width: 110px; border: 0; cursor: pointer; }
.search-button:disabled { opacity: .55; cursor: wait; }
.edit-search { margin-top: 12px; }
