.note-zoom {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f6f5ef;
  cursor: zoom-in;
}

/* The index and the full bar study share the document's single scroll surface. */
.atlas-reader { display: grid; grid-template-columns: clamp(13.5rem,19vw,16rem) minmax(0,1fr); align-items: start; gap: clamp(1.1rem,2.5vw,2.5rem); }
.atlas-reader .bar-menu { min-width: 0; }
.atlas-reader .catalogue-nav { display: grid; gap: .42rem; padding: 0 0 .7rem; }
.atlas-reader .catalogue-moves { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .2rem; }
.atlas-reader .catalogue-moves button { padding: .3rem .12rem; font-size: .79rem; }
.atlas-reader .catalogue-pages { display: grid; grid-template-columns: 2.1rem minmax(0,1fr) 2.1rem; gap: .25rem; }
.atlas-reader .catalogue-pages select { width: 100%; }
.atlas-reader .catalogue-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: .32rem; }
.atlas-reader .catalogue-card { display: grid; grid-template-columns: 36% minmax(0,1fr); align-items: center; min-height: 3.65rem; }
.atlas-reader .catalogue-card canvas { display: block; width: 100%; aspect-ratio: 8 / 5; height: auto; }
.atlas-reader .catalogue-card[aria-current="true"] { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue) inset; background: var(--tint); }
.atlas-reader .catalogue-caption { padding: .28rem .4rem; gap: .1rem; }
.atlas-reader .catalogue-caption span { font-size: .72rem; line-height: 1.2; }
.atlas-reader .catalogue-caption strong { font-size: .8rem; line-height: 1.2; }
.atlas-reader #bar-study { min-width: 0; height: auto; margin: 0; overflow: visible; padding: 0; border: 0; }
.atlas-reader #bar-study .article-head h3 { margin-block-start: .2rem; }
.atlas-reader #bar-study .bp-figures { gap: .6rem; }
.atlas-reader .study-nav a { scroll-margin-block: 3rem; }
#selected-bar-figure { margin: .75rem 0 1.3rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--sheet); }
#selected-bar-canvas { display: block; width: 100%; aspect-ratio: 8 / 5; height: auto; border-radius: 3px 3px 0 0; background: #11162b; }
#selected-bar-figure figcaption { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .2rem .6rem; padding: .45rem .75rem; color: var(--muted); font-size: .78rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.reader-actions { display: grid; justify-items: start; gap: .4rem; align-self: start; }
.reader-actions .text-link { font-size: .85rem; }
.room-reading { margin-block-start: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.room-reading h3 { margin: .2rem 0; }
.room-reading p { max-width: 80ch; margin: .4rem 0; }
.mobile-bar-picker { display: none; }
@media (max-width: 760px) {
  .atlas-reader { grid-template-columns: minmax(0,1fr); gap: .9rem; }
  .atlas-reader .catalogue-nav { grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: stretch; gap: .35rem; padding: 0; }
  .atlas-reader .catalogue-pages { margin: 0; }
  .atlas-reader .catalogue-pages button { min-width: 0; padding: .25rem; }
  .atlas-reader .catalogue-nav select { min-width: 0; padding: .25rem; }
  .mobile-bar-picker { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .15rem .35rem; margin-top: .35rem; }
  .mobile-bar-picker label { grid-column: 1 / -1; color: var(--muted); font-size: .76rem; }
  .mobile-bar-picker select, .mobile-bar-picker button { min-width: 0; min-height: 42px; border: 1px solid var(--line); border-radius: 3px; padding: .3rem .45rem; color: var(--ink); background: var(--paper); font: inherit; font-size: .81rem; }
  .mobile-bar-picker select { width: 100%; }
  .atlas-reader .catalogue-grid { display: none; margin-top: .35rem; }
  .atlas-reader .catalogue-grid.mobile-open { display: grid; }
  .atlas-reader .catalogue-card { grid-template-columns: 4.4rem minmax(0,1fr); min-height: 44px; }
  .atlas-reader .catalogue-card canvas { aspect-ratio: 8 / 5; }
  .atlas-reader .catalogue-caption { padding-inline: .6rem; }
  #selected-bar-figure { margin-block: .55rem .9rem; }
}
@media (max-width: 420px) {
  .atlas-reader .catalogue-nav { grid-template-columns: minmax(0,1fr); }
}
.note-zoom:hover, .note-zoom:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.plates figure:nth-child(2) .note-zoom { background: #0a1019; }
.more-field-notes { margin-top: clamp(2.5rem, 6vw, 5rem); }
.more-field-notes > h3 { font-size: clamp(1.45rem, 3.2vw, 2.1rem); margin: 0 0 1.3rem; }
#field-note-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.3rem 1.4rem; }
.score-note { margin: 0; min-width: 0; }
.score-note img { display: block; width: 100%; height: auto; aspect-ratio: 520 / 249; object-fit: contain; }
.score-note figcaption { display: grid; gap: .28rem; padding-top: .7rem; }
.score-note figcaption small { color: var(--muted); font-variant-numeric: tabular-nums; }
.score-note figcaption strong { font-size: 1.12rem; line-height: 1.25; }
.score-note figcaption p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.45; }
.score-note a, #plate-reading a { color: var(--blue); text-decoration: underline; text-underline-offset: .18em; justify-self: start; }
.score-note a { margin-top: .25rem; font-size: .9rem; }
html:has(#plate-viewer[open]) { overflow: hidden; }
#plate-viewer { box-sizing: border-box; width: min(73rem, calc(100vw - 2rem)); max-width: none; max-height: 94vh; max-height: 94dvh; margin: auto; padding: 0; border: 1px solid var(--rule); color: var(--ink); background: var(--paper); }
#plate-viewer[open] { display: flex; flex-direction: column; }
#plate-viewer::backdrop { background: rgba(8, 12, 21, .84); }
.plate-toolbar { position: relative; display: flex; flex: none; gap: .7rem; align-items: center; padding: .55rem .85rem; border-bottom: 1px solid var(--line); }
.plate-toolbar h3 { margin: 0 auto 0 0; font-size: clamp(1rem, 2vw, 1.4rem); line-height: 1.22; }
.plate-fit, .plate-close { border: 1px solid var(--line); background: var(--sheet); color: var(--ink); padding: .45rem .7rem; cursor: pointer; white-space: nowrap; min-height: 44px; }
.plate-close { min-width: 44px; font-size: 1.8rem; line-height: 1; padding: 0; }
.plate-scroll { overflow: auto; overscroll-behavior: contain; }
.plate-frame { overflow: auto; background: #f6f5ef; text-align: center; }
.plate-frame.dark { background: #0a1019; }
.plate-frame img { display: block; width: 100%; max-height: 64vh; max-height: 64dvh; object-fit: contain; margin: auto; }
.plate-frame.zoomed img { width: max(150%, 850px); max-width: none; max-height: none; }
#plate-reading { margin: 1rem auto 1.25rem; padding: 0 1.2rem; max-width: 77ch; }
#plate-reading p { margin: .35rem 0 .55rem; }
#plate-reading a + a { margin-left: 1rem; }
@media (max-width: 900px) {
  #field-note-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  #field-note-cards { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  #plate-viewer { width: calc(100vw - .6rem); max-height: 97dvh; }
  .plate-toolbar { gap: .4rem; padding: .35rem .4rem; }
  #plate-reading { padding: 0 .75rem; }
}
