.route-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  column-gap: clamp(18px, 2.6vw, 40px);
}
.map-layers {
  justify-self: start;
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--fine);
  background: var(--tone);
  margin-bottom: 3px;
}
.map-layers a {
  min-height: 35px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 4px clamp(10px, 1.1vw, 17px);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.map-layers a[aria-current] {
  color: var(--paper);
  background: var(--ink);
}
.map-layers .ico { font-size: 16px; }
.stop-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0 16px; }
.stop-links > a + a { color: var(--muted); }
.footprints { border: 1px solid var(--fine); background: var(--sheet); }
.foot-areas {
  display: flex;
  gap: clamp(4px, 1.6vw, 26px);
  padding-inline: clamp(12px, 2vw, 31px);
  border-bottom: 1px solid var(--fine);
}
.foot-areas a {
  position: relative;
  white-space: nowrap;
  font-size: 13px;
  letter-spacing: .03em;
  padding: 14px clamp(5px, .6vw, 10px) 13px;
  color: var(--muted);
}
.foot-areas a:hover, .foot-areas a[aria-current] { color: var(--accent); }
.foot-areas a[aria-current]::after {
  content: "";
  position: absolute;
  height: 2px;
  background: currentColor;
  bottom: -1px;
  inset-inline: 0;
}
.foot-spread { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); }
.foot-map-pane {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--fine);
}
.foot-map-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex: 1;
  min-height: clamp(355px, 32vw, 495px);
  background: #eee7d9;
}
#street-sheet { position: absolute; inset: 0; z-index: 0; background: #eee7d9; font-family: var(--sans); }
#street-sheet .leaflet-image-layer { max-width: none; }
#street-sheet:focus-visible { outline: 2px solid #92472e; outline-offset: -3px; }
.foot-map-tools {
  position: absolute;
  z-index: 1;
  display: flex;
  flex-direction: column;
  right: 14px;
  top: 14px;
  border: 1px solid #bcb8a6;
  background: #fffaf0;
  color: #314134;
  box-shadow: 0 2px 6px #40442d1c;
}
.foot-map-tools button { width: 34px; height: 35px; display: grid; place-items: center; font-size: 17px; }
.foot-map-tools button + button { border-top: 1px solid #ded8c9; }
.foot-map-tools button:hover:enabled { color: #92462b; background: #f3ebd9; }
.foot-marker {
  display: grid;
  place-items: center;
  color: #52372b;
  font: 600 12px/1 var(--mono);
}
.foot-marker > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1.5px solid #91492f;
  background: #fff9e9;
  border-radius: 50%;
  box-shadow: 0 1px 5px #544f3a4a;
}
.foot-marker[aria-pressed="true"] > span {
  width: 30px;
  height: 30px;
  border: 2px solid #fff7e9;
  outline: 1px solid #a34528;
  color: #fffaf0;
  background: #9e452d;
}
.foot-marker:focus-visible { outline: 2px solid #71391f; border-radius: 50%; }
.foot-tooltip.leaflet-tooltip {
  padding: 3px 7px;
  color: #423b2f;
  background: #fff9e9f5;
  border: 1px solid #c2b49e;
  border-radius: 1px;
  font: 600 12px/1.4 var(--sans);
  box-shadow: 0 1px 4px #5648341f;
  pointer-events: none;
}
.foot-tooltip.leaflet-tooltip-top::before { display: none; }
.foot-attribution {
  position: absolute;
  bottom: 0;
  right: 0;
  max-width: 85%;
  z-index: 1;
  padding: 2px 5px;
  background: #fff9ebeb;
  color: #4e5447;
  font: 10px/1.25 var(--sans);
}
.foot-attribution a:hover { text-decoration: underline; }
#street-sheet .leaflet-control-scale { margin: 0 0 9px 10px; }
#street-sheet .leaflet-control-scale-line {
  color: #444e43;
  border-color: #5e6758;
  background: #fdf8e9d9;
  font: 10px/1.22 var(--mono);
  text-shadow: none;
}
.foot-sidebar {
  container-type: inline-size;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: clamp(20px, 2.15vw, 33px);
}
.foot-heading h3 {
  display: flex;
  gap: 6px 12px;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: clamp(24px, 2.3vw, 35px);
  line-height: 1.25;
}
.foot-heading h3 em { color: var(--muted); font: italic .82em/1.1 var(--serif); }
#foot-dateline, .foot-meta {
  margin-top: 7px;
  font: 11px/1.5 var(--sans);
  color: var(--muted);
  letter-spacing: .035em;
}
#foot-dateline span { font-family: var(--mono); }
.foot-register {
  overflow-y: auto;
  max-height: clamp(176px, 15vw, 222px);
  border-top: 1px solid var(--fine);
  border-bottom: 1px solid var(--fine);
  scrollbar-color: var(--fine) transparent;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.foot-row {
  width: 100%;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto 13px;
  align-items: center;
  gap: 10px;
  padding: 8px 5px 8px 0;
  min-height: 44px;
  text-align: start;
  color: var(--ink);
  font-size: 14px;
}
.foot-row + .foot-row { border-top: 1px solid var(--soft); }
.foot-num {
  display: grid; place-items: center;
  width: 25px; height: 25px;
  border: 1px solid var(--fine);
  border-radius: 50%;
  color: var(--muted); font: 11px/1 var(--mono);
}
.foot-row small { font: 11px var(--sans); color: var(--muted); }
.foot-row > .ico { font-size: 13px; color: var(--muted); }
.foot-row[aria-pressed="true"], .foot-row:hover { color: var(--accent); }
.foot-row[aria-pressed="true"] .foot-num { background: var(--accent); color: var(--sheet); border-color: var(--accent); }
.foot-row:focus-visible { outline-offset: -2px; }
.foot-card-inner { display: flex; gap: clamp(12px, 1.25vw, 20px); align-items: center; min-height: 118px; }
.foot-photo {
  flex: 0 0 clamp(72px, 6.7vw, 96px);
  align-self: center;
  background: var(--tone);
  border: 1px solid var(--fine);
  padding: 3px 3px 0;
}
.foot-photo img { width: 100%; height: clamp(81px, 7vw, 104px); object-fit: cover; }
.foot-photo > span { color: var(--muted); font: 9px/18px var(--mono); letter-spacing: .05em; }
.foot-card-copy { flex: 1; min-width: 0; }
.foot-card .foot-meta { margin: 0 0 4px; }
.foot-card h4 { font-size: clamp(16px, 1.22vw, 20px); line-height: 1.45; }
.foot-italian { margin-top: 2px; color: var(--muted); font: italic 17px/1.12 var(--serif); }
.foot-card .ink-link { margin-top: 5px; min-height: 32px; color: var(--accent); font-size: 13px; }
.foot-entries-place { color: var(--muted); font: italic 24px/1.2 var(--serif); margin-bottom: 13px; }
.foot-reading {
  display: flex;
  width: 100%;
  text-align: start;
  gap: 9px;
  align-items: baseline;
  margin-top: 12px;
  padding-block: 9px 0;
  border-top: 1px solid var(--soft);
  color: var(--ink);
  font-size: 13px;
}
.foot-reading small { flex: none; font-size: 11px; color: var(--muted); }
.foot-reading .ico { margin-left: auto; align-self: center; flex: none; color: var(--accent); }
.foot-reading:hover span { color: var(--accent); }
#reader[data-kind="foot-records"] { max-width: min(780px, 94vw); }

@container (min-width: 365px) {
  .foot-register.many-places {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
    max-height: none;
  }
  .many-places .foot-row {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    column-gap: 6px;
  }
  .many-places .foot-row:nth-child(2) { border-top: 0; }
  .many-places .foot-row > .ico { display: none; }
}
@media (max-width: 900px) {
  .foot-spread { grid-template-columns: minmax(0, 1.24fr) minmax(270px, 1fr); }
  .foot-sidebar { padding: 17px; gap: 13px; }
  .foot-heading h3 em { font-size: 21px; }
  .foot-map-frame { min-height: 335px; }
}
@media (max-width: 680px) {
  .route-head { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 6px; }
  .route-head > .ink-link { grid-row: 1; grid-column: 2; }
  .map-layers { grid-row: 2; grid-column: 1 / -1; margin: 0; }
  .map-layers a { min-height: 34px; }
  .foot-areas { gap: 3px; flex-wrap: wrap; padding: 4px 8px; align-items: center; }
  .foot-areas a { padding: 8px 6px; font-size: 12px; }
  .foot-areas a[aria-current]::after { bottom: 1px; }
  .foot-spread { display: flex; flex-direction: column; }
  .foot-map-pane { border-right: 0; border-bottom: 1px solid var(--fine); }
  .foot-map-frame { flex: auto; min-height: 0; aspect-ratio: 1.37; }
  .foot-map-tools { top: 8px; right: 8px; }
  .foot-map-tools button { width: 31px; height: 32px; }
  .foot-attribution { font-size: 9px; }
  #street-sheet .leaflet-control-scale { margin: 0 0 5px 5px; }
  .foot-sidebar { padding: 17px; }
  .foot-row { min-height: 44px; }
  .foot-register { max-height: none; order: 2; }
  .foot-card { order: 1; }
  .foot-card-inner { min-height: 93px; }
  .foot-card .ink-link { min-height: 36px; }
}
@media (max-width: 390px) {
  .brand > small { display: none; }
  .foot-areas { gap: 1px; }
  .foot-areas a { padding-inline: 5px; }
}

