/* St. John Almanac: the living island, the Places layer. Tokens only; every class is the layer's own (places-). */

/* The layer's box over the scene: pins a reader presses are buttons in it, placed on each draw. */
.places-box { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.places-box > * { pointer-events: auto; }
.places-pin, .places-many { position: absolute; left: 0; top: 0; margin: 0; padding: 0; cursor: pointer; font: 700 0.78rem/1 var(--text); font-variant-numeric: lining-nums; color: var(--on-forest); background: var(--forest); border: 2px solid var(--on-forest); box-shadow: 0 1px 5px rgba(var(--photo-shade), 0.55); }
.places-pin { width: 1.625rem; height: 1.625rem; border-radius: 50%; display: grid; place-items: center; }
.places-pin[hidden], .places-many[hidden] { display: none; }
/* Several places too close to draw apart: one block with all their numbers, lying over all their spots. */
.places-many { display: grid; place-items: center; border-radius: 0.55rem; }
.places-pin:hover, .places-many:hover, .places-pin[aria-pressed="true"], .places-many.is-on { background: var(--gold-bright); color: var(--forest); border-color: var(--forest); }
.places-many.is-on span:not(.is-on) { opacity: 0.55; }
.places-pin:focus-visible, .places-many:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 2px; }
/* A pin's name: on hover, on focus, and while it is the chosen one. */
.places-pin::after { content: attr(data-name); position: absolute; left: 50%; bottom: calc(100% + 0.4rem); transform: translateX(-50%); white-space: nowrap; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; padding: 0.25rem 0.55rem; border-radius: 999px; font: 600 0.8125rem/1.2 var(--text); color: var(--on-forest); background: var(--forest); box-shadow: 0 1px 6px rgba(var(--photo-shade), 0.4); display: none; pointer-events: none; }
.places-pin:hover::after, .places-pin:focus-visible::after, .places-pin[aria-pressed="true"]::after { display: block; }
.places-pin:hover, .places-pin:focus-visible, .places-pin[aria-pressed="true"] { z-index: 1; }
@media (pointer: coarse) { .places-pin { width: 1.75rem; height: 1.75rem; } }

/* A block pressed: the short list of its places, at the foot of the scene. */
.places-pick { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.7rem max(0.75rem, var(--gutter-l, 0.75rem)); background: var(--sheet); border-top: 1px solid var(--rule); font: 400 0.86rem/1.3 var(--text); color: var(--ink); max-height: 70%; overflow-y: auto; }
.places-pick[hidden] { display: none; }
.places-pick > p { flex-basis: 100%; margin: 0; color: var(--ink-soft); }
.places-pick-one { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; padding: 0.4rem 0.8rem 0.4rem 0.5rem; border-radius: 999px; border: 1px solid var(--rule); background: var(--land); color: var(--ink); font: 600 0.86rem/1.2 var(--text); cursor: pointer; text-align: left; }
.places-pick-one b, .places-n { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 0.3rem; border-radius: 999px; background: var(--press); color: var(--on-press); font: 700 0.8rem/1 var(--text); font-variant-numeric: lining-nums; }
.places-pick-shut { margin-left: auto; min-height: 2.75rem; padding: 0.4rem 0.8rem; border: 0; background: none; color: var(--accent); font: 600 0.86rem/1 var(--text); cursor: pointer; text-decoration: underline; }
.places-pick-one:focus-visible, .places-pick-shut:focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 2px; }
/* On a phone the scene is small: the short list is one row that slides sideways, so the island stays in sight. */
@media (max-width: 40rem) {
  .places-pick { flex-wrap: nowrap; overflow-x: auto; padding-block: 0.5rem; scrollbar-width: thin; }
  .places-pick > p { display: none; }
  .places-pick-one, .places-pick-shut { flex: none; white-space: nowrap; }
}
.li-bare .places-box { display: none !important; }

/* Under the line of time: every place by its number, and the chosen place's card. */
.places-ctl { display: flex; flex-direction: column; gap: 0.9rem; width: 100%; min-width: 0; }
.places-ctl-row { display: flex; flex-wrap: wrap; gap: 0.6rem 0.9rem; align-items: end; }
.places-ctl-place { flex: 1 1 14rem; max-width: 26rem; }
.places-ctl-set { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.places-off { margin: 0; font-size: 0.86rem; line-height: 1.4; color: var(--ink-soft); }
.places-off[hidden] { display: none; }
.places-card { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--land-edge); border-radius: 12px; overflow: hidden; background: var(--land); color: var(--ink); }
.places-card[hidden] { display: none; }
@media (min-width: 44rem) { .places-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); } }
.places-card-pic { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.places-card-pic img { display: block; width: 100%; height: 100%; min-height: 11rem; max-height: 20rem; object-fit: cover; }
.places-card-pic figcaption { padding: 0.3rem 0.7rem; font: 400 0.68rem/1.35 var(--text); color: var(--ink-soft); }
.places-card-in { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.9rem 1rem 1rem; min-width: 0; }
.places-card-in > * { margin: 0; }
.places-card-in h3 { display: flex; align-items: center; gap: 0.5rem; font-family: var(--display); font-size: 1.3rem; font-weight: 600; line-height: 1.2; }
.places-card-sub { color: var(--ink-soft); font-size: 0.92rem; }
.places-card-go { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.3rem; }
.places-card-go a:not(.button) { color: var(--accent); font-weight: 600; }
