/* Palimpsest - Then: the old maps over the Places map (js/owners-then.js): Sanborn sheets and USGS topos. Bottom right, above
   the credit line; with Then on, the years (where more than one is in view) sit above the button, one line: on a narrow
   screen it slides sideways rather than stack up over the map. Out of the way while a place's card is open. */
.ow-then { position: absolute; z-index: 2; right: var(--s-3); bottom: calc(var(--s-3) + 1.15rem); display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-2); pointer-events: none; max-width: calc(100% - 7.5rem); }
.ow-then[hidden], .ow-then-years[hidden] { display: none; }
.ow-then > * { pointer-events: auto; }
.ow-then-btn { min-height: var(--tap); min-width: var(--tap); padding: 0 1rem; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--glass-strong); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); color: var(--ink); font: inherit; font-size: var(--t-small); font-weight: 600; box-shadow: var(--shadow); transition: background var(--med) var(--ease), color var(--fast), border-color var(--fast); }
.ow-then-btn[aria-pressed="true"] { background: var(--on); color: var(--on-ink); border-color: var(--on); }
.ow-then-years { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; max-width: 100%; padding: 3px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--glass-strong); -webkit-backdrop-filter: blur(var(--blur)); backdrop-filter: blur(var(--blur)); box-shadow: var(--shadow); }
.ow-then-years button { flex: none; min-height: var(--tap); min-width: var(--tap); padding: 0 .7rem; white-space: nowrap; border-radius: var(--r-pill); font-size: var(--t-small); font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink-2); transition: color var(--fast), background var(--med) var(--ease); }
.ow-then-years button[aria-pressed="true"] { color: var(--ink); background: color-mix(in srgb, var(--ink) 12%, transparent); }
.ow-mapbox:has(.ow-card:not([hidden])) .ow-then { display: none; }
@media (max-width: 720px) {
  .ow-then { right: var(--s-2); bottom: calc(var(--s-2) + 1.15rem); max-width: calc(100% - 2 * var(--s-2)); }      /* the years may use the map's width: four topo years fit on a 390 px phone (QA 11-16: 1983 was cut off) */
  .ow-then-years { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .ow-then-years::-webkit-scrollbar { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ow-then-btn, .ow-then-years button { transition: none; } }
