.gem-viewer { container-type:inline-size; }
.gem-intro { padding:clamp(12px,2vw,24px) clamp(12px,2vw,24px) 0; background:var(--surface); }
.gem-intro h2 { margin:0; font:620 clamp(1.2rem,1rem + 1cqi,1.65rem)/1.15 var(--display); letter-spacing:-.035em; }
.gem-intro p { margin:.3rem 0 0; font:.88rem/1.45 var(--sans); color:var(--ink2); }
.gem-desk { display:grid; grid-template-columns:minmax(264px,.78fr) minmax(0,2fr); gap:clamp(16px,3vw,40px); padding:clamp(12px,2vw,24px); background:var(--surface); align-items:start; }
.gem-desk [hidden],.gem-ready .gem-group-single { display:none; }

/* A street plan with labels attached to the surveyed positions. */
.gem-choices { min-width:0; }
.gem-atlas-heading { display:flex; align-items:baseline; justify-content:space-between; min-height:20px; gap:10px; margin-bottom:8px; }
.gem-atlas-heading h3,.gem-caption h3 { margin:0; font:610 1.03rem/1.2 var(--sans); letter-spacing:-.025em; color:var(--ink); }
.gem-map {
  --map-land:light-dark(#f2f1e9,#202727); --map-green:light-dark(#dae2cc,#2c3d36);
  --map-building:light-dark(#dfded5,#2c3435); --map-outline:light-dark(#d6d4c9,#333c3d);
  --map-street:light-dark(#fffdf6,#41494a); --map-avenue:light-dark(#fffdf6,#4b5150);
  --map-ink:light-dark(#353d39,#edf1eb); --map-selected:light-dark(#714a00,#ffcb56);
  --map-halo:light-dark(#f4f3eb,#222929);
  position:relative; isolation:isolate; aspect-ratio:360/198; border:1px solid var(--line); background:var(--map-land);
}
.gem-map-base { display:block; width:100%; height:100%; }
.gem-pin {
  position:absolute; top:var(--y); left:var(--x); transform:translate(-4px,-50%); z-index:1;
  display:inline-flex; align-items:center; min-height:44px; padding:0; border:0;
  background:transparent; color:var(--map-ink); cursor:pointer;
  font:550 .76rem/1.15 var(--sans); white-space:nowrap;
}
.gem-pin:is([data-gem-pin="hotel-de-ville"],[data-gem-pin="grand-chene"]) { flex-direction:row-reverse; transform:translate(calc(-100% + 4px),-50%); }
.gem-pin i { flex:none; width:8px; height:8px; box-sizing:border-box; border-radius:50%; border:1.5px solid var(--map-ink); background:var(--map-land); box-shadow:0 0 0 1.5px var(--map-halo); }
.gem-pin::after { content:""; order:1; width:clamp(7px,1cqi,12px); height:1px; background:currentColor; opacity:.65; }
.gem-pin span { order:2; padding:2px 3px; text-shadow:0 1px 2px var(--map-halo),0 -1px 2px var(--map-halo),1px 0 2px var(--map-halo),-1px 0 2px var(--map-halo); }
.gem-pin[aria-pressed="true"] { color:var(--map-selected); }
.gem-pin[aria-pressed="true"] i { background:#f7bb39; border-color:var(--map-selected); box-shadow:0 0 0 2px var(--map-land),0 0 0 3px var(--map-selected); }
.gem-pin[aria-pressed="true"] span { font-weight:720; }
.gem-pin:hover span,.gem-pin:focus-visible span { text-decoration:underline; text-underline-offset:.2em; }
.gem-pin:focus-visible { outline:2px solid var(--focus); outline-offset:1px; }
.gem-map-source { font:450 .64rem/1.3 var(--sans); color:var(--ink2); text-decoration:underline; text-decoration-color:var(--axis); text-underline-offset:.17em; white-space:nowrap; }
.gem-map-source:hover { text-decoration:underline; }

/* Only locations with alternative continuations need a selector. The ordinary
   film links remain visible at every location until the viewer is initialized. */
.gem-sheet { display:flex; flex-wrap:wrap; gap:0 14px; padding:0; margin:2px 0 0; list-style:none; }
.gem-take { position:relative; display:inline-flex; align-items:center; min-height:44px; padding:0 1px; color:var(--ink2); text-decoration:none; font:540 .8rem/1.2 var(--sans); }
.gem-take[aria-current] { color:var(--ink); }
.gem-take[aria-current]::after { content:""; position:absolute; inset:auto 0 4px; height:2px; background:var(--cat); }
.gem-take:focus-visible,.gem-take:hover { text-decoration:underline; text-underline-offset:.2em; }

.gem-study { min-width:0; width:100%; max-width:660px; justify-self:center; }
.gem-label { display:flex; align-items:center; min-height:20px; margin:0 0 8px; color:var(--ink2); font:600 .69rem/1.35 var(--mono); letter-spacing:.055em; text-transform:uppercase; }
.gem-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(6px,1.2vw,16px); }
.gem-pair figure { margin:0; min-width:0; }
.gem-frame { display:grid; place-items:center; aspect-ratio:7/4; width:100%; overflow:hidden; background:#191c1d; }
.gem-frame img,.gem-frame video { display:block; width:100%; height:100%; max-height:100%; object-fit:contain; min-height:0; }
.gem-caption { display:flex; align-items:start; justify-content:space-between; gap:14px; padding:12px 0 4px; }
.gem-caption [data-gem-caption] { margin:4px 0 0; color:var(--ink2); font:440 .88rem/1.45 var(--sans); }
.gem-play { flex:none; display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:44px; min-width:74px; border:1px solid var(--axis); padding:0 10px; color:var(--ink); background:var(--plane); font:570 .8rem var(--sans); cursor:pointer; }
.gem-play::before { content:""; width:0; height:0; border:solid transparent; border-width:4px 0 4px 7px; border-left-color:currentColor; }
.gem-play[data-playing]::before { width:6px; height:9px; box-sizing:border-box; border:0; border-inline:2px solid currentColor; }
.gem-credit { display:block; margin:6px 0 0; color:var(--ink2); font:400 .72rem/1.45 var(--sans); overflow-wrap:anywhere; }
.gem-credit a { text-decoration:underline; text-underline-offset:.2em; }
@container (max-width:740px) {
  .gem-desk { grid-template-columns:264px minmax(0,1fr); gap:16px; padding:12px; }
  .gem-study { max-width:none; }
}
@container (max-width:579px) {
  .gem-desk { grid-template-columns:minmax(0,1fr); }
}
@container (max-width:465px) {
  .gem-desk { padding:10px; gap:14px; }
  .gem-atlas-heading { margin-bottom:8px; }
  .gem-label { font-size:.64rem; letter-spacing:.025em; }
  .gem-pair { gap:5px; }
  .gem-frame { aspect-ratio:4/3; }
  .gem-caption { gap:8px; padding-top:10px; }
  .gem-play { min-width:60px; padding:0 5px; }
}
