/* City discovery */
.hero-city-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  margin-left: 16px;
  color: #fffdf7;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #fffdf79c;
  text-underline-offset: 4px;
}
.hero-city-link:hover { text-decoration-color: currentColor; }
.city-jumps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 19px;
}
.city-jumps > span, .city-jumps a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}
.city-jumps > span { margin-right: 5px; color: var(--muted); }
.city-jumps a {
  min-height: 30px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: #405647;
  background: #f5f5ee;
}
.city-jumps .all-cities { color: #97442c; border-color: transparent; background: transparent; font-weight: 600; }
.city-jumps a:hover { border-color: #aab8a7; background: #edf0e6; }
.data-warning {
  margin: 16px var(--edge);
  padding: 12px 16px;
  border: 1px solid #dbbd92;
  border-radius: 6px;
  color: #704d26;
  background: #fbf1df;
  font-size: 13px;
}
.container .data-warning { margin-inline: 0; }
.data-warning a, .data-warning button { text-decoration: underline; text-underline-offset: 2px; }
.cities-tools, .city-tools, .local-detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cities-tools { width: fit-content; max-width: 100%; margin-bottom: 28px; }
.cities-tools .region-field { margin-left: 0; height: 39px; background: #fffefa; }
.cities-tools .search-field, .city-tools .search-field { min-width: 0; }
.city-part + .city-part { margin-top: 35px; }
.city-part h2, .city-tools h2, .visit-card h2, .arrival-panel h2 {
  font-size: clamp(28px, 2.5vw, 38px);
  line-height: 1.14;
  letter-spacing: -.045em;
}
.city-part h2 { margin-bottom: 12px; }
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 215px), 1fr));
  gap: 8px;
}
.city-grid > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffefa;
}
.city-grid > a:hover { border-color: #9da995; background: #f2f4ea; }
.city-grid strong, .city-venue-row strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.city-grid small, .city-venue-row small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.city-number { display: inline-flex; align-items: center; gap: 4px; color: #526350; font-size: 12px; font-variant-numeric: tabular-nums; flex: none; }
.city-main, .local-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 65px);
  align-items: start;
}
.city-map-frame {
  min-width: 0;
  border: 1px solid #c9d4c6;
  border-radius: 9px;
  isolation: isolate;
  overflow: hidden;
  background: #dae8e5;
}
.city-main > .city-map-frame { position: sticky; top: 18px; }
.city-map, .court-detail-map { width: 100%; position: relative; }
.city-map { height: clamp(420px, 59vh, 630px); }
.court-detail-map { height: clamp(320px, 35vw, 510px); }
.city-profile > .gd-path, .local-detail > .gd-path { padding-top: 0; color: var(--muted); }
.city-profile > .gd-path span { color: var(--ink); }
.city-tools { justify-content: space-between; margin-bottom: 12px; }
.city-tools .search-field { width: min(54%, 236px); flex: 0 1 236px; }
.city-rows { border-top: 1px solid var(--line); }
.city-venue-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 4px 13px 0;
  border-bottom: 1px solid var(--line);
}
.city-venue-row > svg { color: #798572; }
.city-venue-row:hover strong { color: var(--orange); }
.listed-court-icon {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #52765e;
  background: #e9eee2;
}
.pick .listed-court-icon { width: clamp(76px, 7.4vw, 120px); height: clamp(62px, 5.65vw, 90px); border-radius: 5px; }
.pick .listed-court-icon svg { width: 27px; height: 27px; }

/* Individual source records */
.local-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: clamp(15px, 1.7vw, 24px);
  min-width: 0;
}
.local-heading, .local-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.local-kind { display: inline-flex; align-items: center; gap: 6px; color: #83503c; font: 700 10px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.local-save { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: #fffefa; }
.local-save:hover, .detail-save:hover { background: #e9ede4; }
.local-card h3 { margin: 10px 0 8px; overflow-wrap: anywhere; }
.local-card .geo { font-size: 12px; }
.local-facts { display: flex; flex-wrap: wrap; gap: 5px; margin: 14px 0 18px; }
.local-facts:empty { margin: 8px 0; }
.local-facts span { padding: 3px 7px; background: #eef1e7; color: #4b614d; border-radius: 4px; font-size: 11px; overflow-wrap: anywhere; }
.local-card-bottom { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.local-card-bottom small { color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.local-card-bottom a { display: grid; flex: none; width: 31px; height: 31px; place-items: center; border-radius: 50%; color: #93432d; }
.local-card-bottom a:hover { background: #f5e8dd; }
.local-detail-head { justify-content: space-between; align-items: flex-start; margin-bottom: 26px; }
.local-detail-head > div, .local-detail-grid > * { min-width: 0; }
.local-detail-head h1 {
  max-width: 24ch;
  overflow-wrap: anywhere;
  font-size: clamp(42px, 5.1vw, 78px);
  line-height: 1.04;
  letter-spacing: -.048em;
  margin: 9px 0 13px;
}
.local-detail-head .geo { font-size: 14px; }
.detail-save {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 41px;
  padding: 8px 14px;
  background: #fffefa;
  border: 1px solid #ccd0c4;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}
.local-detail-head .detail-save { margin-top: 13px; }
.local-detail-grid { grid-template-columns: minmax(0, 1.55fr) minmax(260px, .85fr); }
.visit-card {
  padding: clamp(19px, 2.4vw, 32px);
  border: 1px solid #d8dccf;
  border-radius: 9px;
  background: #f1f2e9;
}
.visit-card dl { margin: 18px 0; }
.visit-card dl > div { margin: 0; padding: 10px 0; border-bottom: 1px solid #d8dccf; }
.visit-card dt { color: #566254; font-size: 11px; font-weight: 600; }
.visit-card dd { margin: 2px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.source-link, .venue-source > a { display: inline-flex; align-items: center; gap: 5px; color: #9e462e; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.source-link:hover, .venue-source > a:hover { text-decoration: underline; text-underline-offset: 3px; }
.visit-card > .source-link, .venue-source > a { display: flex; width: fit-content; max-width: 100%; padding-block: 4px; }
.venue-source { border-top: 1px solid #d1d6c9; padding-top: 16px; margin-top: 21px; }
.venue-source h3 { margin-bottom: 5px; font: 600 14px/1.4 var(--sans); }
.arrival-panel { margin-top: 24px; }
.arrival-panel p { margin: 9px 0 12px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.route-options, .source-downloads { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.route-options .source-link { min-height: 34px; }
.page-controls { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; margin: 25px 0 0; }
.page-controls button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 7px 12px; border: 1px solid #d1d7c9; border-radius: 5px; font-size: 12px; font-weight: 600; background: #fffefa; }
.page-controls button:hover:enabled { background: #edf0e6; }
.page-controls button:disabled { color: #838b80; background: #f0f1ea; }
.page-controls > span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.source-page > p { max-width: 74ch; color: var(--muted); line-height: 1.6; }
.source-page .intro { margin-bottom: 14px; }
.source-downloads { margin: 22px 0 35px; }
.credits-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.credits-list article { padding: 19px; background: #fffefa; border: 1px solid var(--line); border-radius: 8px; }
.credits-list h2 { font-size: 24px; letter-spacing: -.035em; line-height: 1.15; }
.credits-list p { line-height: 1.7; margin-top: 8px; color: var(--muted); }

@media (max-width: 820px) {
  .city-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
  .city-tools { flex-wrap: wrap; gap: 8px; }
  .city-tools .search-field { flex: 1; min-width: min(155px, 100%); }
  .city-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 174px), 1fr)); }
}
@media (max-width: 680px) {
  .city-main, .local-detail-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .city-main > .city-map-frame { position: relative; top: auto; }
  .city-map { height: clamp(270px, 64vw, 365px); }
  .court-detail-map { height: clamp(245px, 61vw, 340px); }
  .local-detail-head { flex-wrap: wrap; gap: 10px; }
  .local-detail-head .detail-save { margin-top: 0; }
  .city-jumps { gap: 5px; }
  .city-jumps > span { flex-basis: 100%; }
  .city-tools .search-field { flex: 0 1 65%; min-width: 0; }
  .cities-tools { width: 100%; gap: 8px; }
  .cities-tools .search-field { width: 100%; flex: 1; }
  .cities-tools .region-field select { width: 88px; }
  .city-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .city-grid > a { gap: 5px; padding: 10px; }
  .city-grid strong { font-size: 14px; }
  .city-grid small { font-size: 11px; }
  .city-part + .city-part { margin-top: 26px; }
  .footer-inner nav { flex-wrap: wrap; row-gap: 8px; }
}
@media (max-width: 540px) {
  .mast .main-nav { justify-content: space-between; gap: clamp(7px, 3.5vw, 22px); }
  .mast .main-nav a { min-height: 38px; }
  .mast .main-nav { height: 38px; }
  .hero-city-link { font-size: 12px; margin-left: 10px; }
  .city-index > h1, .city-profile > h1 { font-size: clamp(40px, 10vw, 49px); letter-spacing: -.05em; overflow-wrap: anywhere; }
  .local-detail-head h1 { font-size: clamp(38px, 9vw, 49px); }
  .page-controls { gap: 8px; }
  .page-controls button { padding-inline: 9px; }
  .listed-court-icon { width: 32px; height: 32px; }
  .city-venue-row { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 9px; }
  .pick .listed-court-icon { width: 81px; height: 63px; }
  .footer-inner nav { column-gap: 13px; }
}
@media (max-width: 365px) {
  .hero-city-link { margin-left: 5px; }
  .city-grid > a { padding-inline: 8px; }
  .city-number { gap: 2px; }
  .page-controls { gap: 6px; }
}
