.filter-row,
.pager,
.chapter-grid,
.atlas-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-row {
  margin: -5px 0 16px;
}
.filter-row select,
.atlas-filters select,
.atlas-filters input {
  min-height: 39px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: #fffefa;
  color: var(--ink);
  font: inherit;
  padding: 4px 9px;
}
.filter-row select,
.filter-row a {
  font-size: 14px;
}
.filter-row a {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--teal);
  font-weight: 700;
}
.chapter-grid {
  margin: 16px 0 20px;
}
.chapter-grid a {
  min-width: 27%;
  text-align: center;
  flex: 1;
  border: 1px solid #bbcab9;
  background: #f7f9ef;
  border-radius: 5px;
  padding: 6px 3px;
  font-size: 14px;
}
.rail-link + .rail-link {
  margin-top: 14px;
}
.text-card {
  min-height: 94px;
  border-left: 3px solid #8ab3a2;
}
.text-card .card-copy {
  padding: 13px 17px;
}
.pager {
  justify-content: center;
  padding-top: 14px;
  color: var(--muted);
  font-size: 14px;
}
.pager button,
.map-tools button {
  border: 1px solid var(--line);
  background: #fffdf4;
  border-radius: 5px;
  min-height: 36px;
  padding: 4px 13px;
  color: var(--teal);
}
.pager button:disabled {
  opacity: 0.4;
  cursor: default;
}
.check-date {
  color: var(--muted);
  font-size: 13px;
  margin-top: 9px;
}
.flow-section {
  padding: 24px 0 5px;
}
.flow-section h2,
.map-list h2,
#map-info h2 {
  font-size: 21px;
  margin-bottom: 11px;
}
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 10px;
}
.group-grid a {
  display: flex;
  gap: 11px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffefa;
}
.group-grid a b,
.group-grid a small {
  display: block;
}
.group-grid small {
  color: var(--muted);
  margin-top: 3px;
}
.atlas-page {
  padding: 27px 0 45px;
}
.atlas-page h1 {
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.05em;
}
.atlas-page .lead {
  margin-top: 4px;
}
.atlas-filters {
  margin: 17px 0 16px;
}
.atlas-filters label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 13px;
}
.atlas-filters input,
.atlas-filters select {
  min-width: 0;
  max-width: 100%;
  font-size: 16px;
}
.atlas-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(235px, 1fr);
  gap: 24px;
}
.map-stage {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid #93b0a8;
  background: #8ecbd0;
}
.map-stage canvas {
  display: block;
  width: 100%;
  height: min(60vh, 560px);
  touch-action: none;
  cursor: crosshair;
}
.map-tools {
  position: absolute;
  right: 8px;
  top: 8px;
  display: flex;
  gap: 4px;
}
.map-tools button {
  min-width: 34px;
  padding: 3px 7px;
  font-size: 16px;
  box-shadow: 0 1px 6px #3452;
}
.map-list {
  padding: 14px;
  background: #eaf0e5;
  border: 1px solid var(--line);
  border-radius: 6px;
  align-self: start;
  min-width: 0;
}
.pin-link {
  display: block;
  padding: 6px 3px;
  border-top: 1px solid #c9d5c8;
  overflow-wrap: anywhere;
}
.pin-link b {
  font-size: 14px;
}
.pin-link small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.pin-link[aria-current] {
  color: #8a3b24;
  background: #fcf3df;
}
.map-credit {
  font-size: 13px;
  color: var(--muted);
  margin-top: 19px;
}
.map-credit a {
  color: var(--teal);
  text-decoration: underline;
}
#map-info {
  padding: 14px 0 9px;
}
#map-info p {
  color: var(--muted);
  font-size: 14px;
}
#map-info .jump-links {
  margin-top: 7px;
}
@media (max-width: 700px) {
  .filters {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
  }
  .filters button {
    justify-content: center;
  }
  .text-card {
    display: flex;
    align-items: center;
    padding: 0;
  }
  .text-card .card-copy {
    display: flex;
    flex: 1;
    padding: 12px 14px;
  }
  .text-card .card-open {
    display: flex;
    align-items: center;
    padding: 0 8px;
  }
  .text-card .brief {
    margin-top: 3px;
  }
  .filter-row {
    gap: 6px;
  }
  .filter-row select {
    padding: 4px;
    font-size: 13px;
  }
  .atlas-layout {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .map-list {
    width: 100%;
  }
  .map-stage canvas {
    height: min(43vh, 355px);
  }
  .atlas-filters label {
    max-width: 63%;
  }
  .atlas-filters {
    flex-wrap: nowrap;
  }
  .filters button {
    padding-inline: 2px;
    gap: 3px;
  }
  .atlas-page .lead {
    font-size: 15px;
  }
}
@media (max-width: 370px) {
  .filters button {
    padding-inline: 7px;
  }
  .filters button svg {
    display: none;
  }
  .atlas-filters input,
  .atlas-filters select {
    font-size: 15px;
  }
}
.atlas-visit-filter {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  margin: 0 0 .5rem;
  cursor: pointer;
}
.atlas-visit-filter input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--teal, #17635b);
}
