.lib-reader {
  max-width: 1120px;
  margin: 0 auto;
  padding-bottom: 12px;
  overflow-wrap: anywhere;
  word-break: keep-all;
  color: var(--ink);
}
.lib-reader[hidden], .lib-reader [hidden] { display: none !important; }
.lib-reader h1, .lib-reader h2, .lib-reader h3, .lib-reader p, .lib-reader figure { margin: 0; }
.lib-reader a { text-underline-offset: .18em; }
.lib-header { padding: 14px 0 19px; }
.lib-share { display:grid; justify-items:start; padding:8px 0; }
.lib-share-button { font-size: .86rem; min-height: 44px; padding: 4px 12px; }
.lib-status { font-size: .82rem; color: var(--green); }
.lib-share-address { width: 100%; padding: 4px; min-width: 100px; font: inherit; }
.lib-header h1 { font-size: clamp(1.85rem,4vw,3.05rem); line-height: 1.22; letter-spacing: -.05em; }
.lib-lead { max-width: 65ch; color: #375648; font-size: clamp(1rem,1.8vw,1.2rem); padding-top: 8px; }
.lib-tabs { display: flex; align-items: stretch; gap: 0; border-bottom: 1px solid #a9bdad; margin-bottom: 18px; }
.lib-tabs a { display: block; position: relative; min-height: 48px; padding: 10px clamp(15px,3vw,35px); font-weight: 630; color: #41584c; text-decoration: none; }
.lib-tabs a[aria-current] { color: #163f2e; }
.lib-tabs a[aria-current]::after { content: ''; position: absolute; bottom: -1px; height: 3px; background: #275d45; left: 0; right: 0; }
.lib-tabs a:hover { background: #edf2e8; }
.lib-reading, .lib-mapview { display: grid; gap: 18px; }
.lib-columns { display: grid; grid-template-columns: minmax(0,2fr) minmax(190px,1fr); gap: clamp(20px,5vw,65px); }
.lib-primary, .lib-side { min-width: 0; }
.lib-side { border-left: 1px solid var(--line); padding-left: clamp(20px,3vw,35px); }
.lib-visual { min-width: 0; }
.lib-section { padding: 2px 0 18px; }
.lib-section h2 { font-size: clamp(1.16rem,2vw,1.45rem); letter-spacing: -.03em; line-height: 1.42; margin-bottom: 5px; }
.lib-section h3 { font-size: 1rem; margin: 10px 0 3px; }
.lib-section p { max-width: 68ch; line-height: 1.7; }
.lib-formation p { font-size: 1.05rem; }
.lib-chooser { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 13px; margin: 3px 0 12px; }
.lib-chooser label { font-size: .9rem; font-weight: 650; }
.lib-chooser select {
  min-height: 45px; max-width: 100%; min-width: 0; padding: 6px 10px;
  font: inherit; font-weight: 630; color: var(--green); background: #fff;
  border: 1px solid #9fb3a4; border-radius: 5px;
}
.lib-case { padding: 19px clamp(14px,2.5vw,25px); border-left: 4px solid #527865; background: #edf2e9; }
.lib-case .lib-place-region, .lib-mapnotes .lib-place-region { color: #495e50; font-size: .9rem; }
.lib-case-note { margin-top: 12px; }
.lib-formref { display: inline-block; font-size: .9rem; color: #285940; font-weight: 700; margin-bottom: 4px; }
.lib-citation { display: inline-block; max-width: 100%; line-height: 1.51; font-size: .92rem; margin: 5px 0 1px; }
.lib-case .lib-locator,.lib-materials .lib-locator { color: var(--muted); margin-top: 9px; font-size: .91rem; }
.lib-materials { margin-top: 21px; }
.lib-materials ol { margin: 8px 0 0; padding-left: 1.55em; }
.lib-materials li { padding: 2px 0 12px 4px; }
.lib-materials li + li { border-top: 1px solid var(--line); padding-top: 12px; }
.lib-materials .lib-citation { font-weight: 700; font-size: 1rem; }
.lib-org { color: #4e6253; font-size: .84rem; display: block; margin: 2px 0 4px; }
.lib-related ul,.lib-curriculum ul { list-style: none; margin: 0; padding: 0; }
.lib-related a { display: inline-flex; align-items: center; padding: 4px 0; min-height: 40px; }
.lib-action { display: inline-flex; min-height: 44px; align-items: center; margin: 8px 0; padding: 8px 16px; width: fit-content; border-radius: 5px; background: var(--green); color: #fff; text-decoration: none; font-weight: 650; }
.lib-action:hover { background: #143d2b; }
.lib-curriculum { margin-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
.lib-curriculum summary { cursor: pointer; padding: 12px 0; min-height: 44px; width: fit-content; font-weight: 610; }
.lib-curriculum li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; padding: 3px 0; }
.lib-curriculum li span { font-size: .91rem; }
.lib-teaching-use { margin: .75rem 0; line-height: 1.65; }
.lib-teaching-use strong { display: block; }
.lib-mapgrid { display: grid; grid-template-columns: minmax(0,1.8fr) minmax(190px,1fr); align-items: start; gap: clamp(18px,3vw,36px); }
.lib-mapgrid:has(.lib-mapnotes:only-child) { grid-template-columns: minmax(0,1fr); }
.lib-map { background: #fff; border: 1px solid #c2d0c5; border-radius: 7px; overflow: hidden; }
.lib-mapimage { position: relative; }
.lib-mapimage img { display: block; width: 100%; height: auto; }
.lib-pin { position: absolute; transform: translate(-50%,-50%); width: 13px; height: 13px; background: #733b12; border: 3px solid #fff; border-radius: 50%; outline: 1.5px solid #49331b; }
.lib-mapcredit { font-size: .81rem; padding: 5px 10px; }
.lib-mapnotes .lib-coordinates { margin-top: 5px; font-size: .95rem; font-variant-numeric: tabular-nums; color: #365643; }
.lib-mapnotes .lib-action { display: flex; }
.lib-check { max-width: 760px; padding: 20px clamp(14px,3vw,32px) 22px; background: #fff; border: 1px solid var(--line); border-top: 3px solid #3f6b51; border-radius: 5px; }
.lib-check h2 { max-width: 48ch; margin-bottom: 16px; }
.lib-check label { display: block; margin: 4px 0 6px; font-size: .92rem; color: var(--muted); }
.lib-check textarea { display: block; width: 100%; resize: vertical; min-height: 80px; border: 1px solid #a0b2a4; border-radius: 5px; padding: 8px 12px; font: inherit; color: var(--ink); }
.lib-check-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.lib-check-actions button, .lib-check-actions a { min-height: 44px; }
.lib-check-actions a { display: inline-flex; align-items: center; font-size: .92rem; }
.lib-answer { margin-top: 14px; background: var(--soft); padding: 12px 16px; }
.lib-answer h3 { margin: 0 0 4px; }
.lib-scenes { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.lib-scene { min-width: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; text-decoration: none; background: #fff; }
.lib-scene img { width: 100%; aspect-ratio: 2.2; object-fit: cover; display: block; }
.lib-scene span { display: flex; align-items: center; min-height: 44px; padding: 6px 12px; font-weight: 650; }
.lib-contents { display: grid; list-style: none; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 28px; margin: 0; padding: 0; }
.lib-listlink { display: flex; flex-direction: column; gap: 2px; text-decoration: none; min-height: 54px; border-top: 1px solid var(--line); padding: 10px 5px; }
.lib-listlink:hover strong,.lib-scene:hover span { text-decoration: underline; }
.lib-listlink span { color: var(--muted); font-size: .93rem; }
@media (max-width: 730px) {
  .lib-columns,.lib-mapgrid { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .lib-side { border: 0; padding: 0; }
  .lib-section { padding-bottom: 14px; }
  .lib-case { padding: 13px; }
  .lib-chooser { margin: 8px 0 12px; }
  .lib-chooser select { flex: 1 1 170px; }
  .lib-scenes { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .lib-tabs { margin-bottom: 12px; }
  .lib-tabs a { text-align: center; flex: 1; padding-inline: 5px; }
  .lib-header { padding-top: 6px; }
  .lib-share-button { font-size: .81rem; padding-inline: 7px; }
}
@media (max-width: 520px) { .lib-contents { grid-template-columns: minmax(0,1fr); } }
@media print {
  .lib-crumb, .lib-share, .lib-tabs, .lib-check-actions, .lib-reader .lib-action { display: none; }
  .lib-columns,.lib-mapgrid { display: block; }
  .lib-side { border: 0; padding: 0; }
}

.lib-reader .lib-header { padding:16px 0 10px; }
.lib-header .lib-lead { padding-top:3px; }
.lib-reader .lib-picture-modes { margin:0 0 14px; }
.lib-reader .lib-picture-modes a { background:transparent; color:#3e5849; padding:3px 9px; border:0; min-height:44px; }
.lib-reader .lib-picture-modes [aria-current=true] { color:#204d38; background:#e8eee4; }
.lib-reader .lib-share { margin:8px 0; }
.lib-reader .lib-share-button { padding-inline:10px; font-size:.92rem; }
.results-more { min-height:44px; margin-block:8px; }

.world-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; align-items: start; }
.world-group { min-width: 0; margin: 0; }
.world-group .lib-contents { display: grid; grid-template-columns: minmax(0,1fr); gap: 5px; }
.world-overview { max-width: 72ch; margin: 0; line-height: 1.65; white-space: pre-line; }
.world-reading-board { border:1px solid var(--line); border-radius:5px; padding:8px 12px; background:#fbfcf7; }
.world-reading-board summary { color:#294d3b; font-weight:680; cursor:pointer; min-height:32px; padding-block:4px; }
.world-reading-board h3 { margin:12px 0 6px; font-size:1rem; line-height:1.4; }
.world-reading-board .plate-gallery { grid-template-columns:repeat(auto-fit,minmax(min(150px,100%),1fr)); }
.world-figure-title { margin: 4px 0 0; line-height: 1.4; }
.world-case-image { margin: 12px 0 16px; }
.world-case-image img { display: block; width: 100%; height: auto; border-radius: 4px; border: 1px solid var(--line); }
.world-case-image figcaption { display: grid; gap: 3px; margin-top: 6px; font-size: .875rem; line-height: 1.5; }
@media (max-width: 700px) {
  .world-groups { grid-template-columns: minmax(0,1fr); gap: 12px; }
}
