/* Viewport workspace; the resource reader owns desktop vertical scrolling. */
.resource-scroll { min-width: 0; }
.facet-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 10px 0; border-bottom: 1px solid var(--line); min-height: 40px; }
.facet-label, .facet-hint { font-size: 10px; color: #8b967e; line-height: 1.7; }
.facet-label { margin-right: 6px; }
.facet-filters button { background: transparent; color: #89947b; font-size: 10px; padding: 4px 7px; border: 1px solid transparent; border-radius: 4px; }
.facet-filters button small { margin-left: 4px; color: #9daa8f; font-size: 9px; }
.facet-filters button.active { color: #426346; background: #e7eddd; border-color: #cbd8bd; }
.facet-filters button:hover { background: #eaf0e0; }
.source-tag { padding: 2px 5px; background: #f6f0e1; border-radius: 3px; color: #9d8558; }
.resource-card { scroll-margin-top: 12px; }
.resource-card.focused:before { content: '当前查看'; }
.map-canvas { position: absolute; inset: 0; min-width: 0; }
#map { overflow: hidden; }
.map-links { position: absolute; top: 10px; bottom: 10px; width: 21%; max-width: 200px; overflow: hidden; z-index: 1; }
.map-links-left { left: 16px; }
.map-links-right { right: 16px; }
.map-link-group { margin-bottom: 12px; padding: 10px; background: #f9faf3d9; border: 1px solid #dce4d1; border-radius: 7px; overflow: hidden; }
.map-link-heading { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--link-accent); margin: 0 0 5px; font-weight: 500; }
.map-link-heading small { font-size: 9px; font-weight: 400; opacity: .7; }
.map-resource-link { display: flex; align-items: center; gap: 4px; min-width: 0; height: 29px; font-size: 11px; color: #63795a; border-bottom: 1px solid #e7ecdf; }
.map-resource-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.map-resource-link small { font-size: 8px; color: #a18b61; flex-shrink: 0; }
.map-resource-link:hover, .map-resource-link[aria-current] { color: #214c36; background: #e4ecd9; }
.map-link-overflow { font-size: 9px; color: #9da68f; margin-top: 7px; line-height: 1.5; }
.map-stage.county-view .map-canvas { inset-inline: 23%; }
@media (min-width: 901px) {
  html, body { height: 100%; overflow: hidden; }
  body { display: flex; flex-direction: column; height: 100dvh; }
  .site-header { height: 64px; min-height: 64px; padding-inline: 28px; }
  .brand { font-size: 22px; }
  .brand-seal { height: 37px; width: 36px; font-size: 25px; }
  main { width: 100%; max-width: 1920px; flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 28px; }
  .intro { flex-shrink: 0; padding: 14px 0 13px; }
  .intro > div:first-child { display: flex; align-items: baseline; gap: 20px; }
  .intro .eyebrow, .intro-copy { display: none; }
  h1 { font-size: 25px; letter-spacing: 1px; white-space: nowrap; }
  .intro-stat { flex-direction: row; align-items: baseline; gap: 13px; font-size: 10px; }
  .intro-stat strong { font-size: 27px; }
  .intro-stat strong span { font-size: 10px; }
  .explore-bar { flex-shrink: 0; padding: 9px 15px; margin-bottom: 15px; }
  .workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(355px, 1fr); gap: 22px; align-items: stretch; }
  .map-panel { position: relative; top: 0; height: 100%; min-height: 0; display: flex; flex-direction: column; }
  .map-toolbar { flex-shrink: 0; padding: 15px 20px 0; }
  .map-heading { flex-shrink: 0; margin: 17px 22px 0; }
  .map-heading h2 { font-size: 27px; }
  .map-heading .eyebrow { margin-bottom: 5px; }
  .map-stage { flex: 1; min-height: 0; aspect-ratio: auto; margin: 0; }
  .map-bottom { flex-shrink: 0; padding: 0 20px 10px; }
  .map-caption { flex-shrink: 0; margin: 0 20px; padding: 9px 0; }
  .resource-panel { height: 100%; min-height: 0; overflow: hidden; display: flex; flex-direction: column; padding: 2px 0 0; }
  .resource-heading, .region-description, .category-tabs, .facet-filters, .active-search { flex-shrink: 0; }
  .resource-heading h2 { font-size: 24px; }
  .region-description { margin: 10px 0 12px; font-size: 11px; }
  .category-tabs { padding-bottom: 9px; gap: 3px; }
  .category-tabs button { font-size: 11px; padding: 7px 8px; }
  .resource-scroll { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior-y: contain; padding: 0 10px 12px 4px; scrollbar-width: thin; scrollbar-color: #bccbb0 transparent; scrollbar-gutter: stable; }
  .resource-card { padding: 16px; }
  .card-description { font-size: 12px; }
  .card-meta, .location { font-size: 10px; }
  .list-summary { margin-top: 12px; }
  footer { flex-shrink: 0; margin: 0; border: 0; padding: 9px 0; font-size: 8px; }
  .suggestions { max-height: min(480px, 65dvh); }
}
@media (min-width: 901px) and (max-height: 750px) {
  .site-header { height: 54px; min-height: 54px; }
  .intro { padding: 8px 0; }
  h1 { font-size: 22px; }
  .explore-bar { padding-block: 6px; margin-bottom: 10px; }
  .map-toolbar { padding-top: 11px; }
  .map-heading { margin-top: 10px; }
  .map-heading h2 { font-size: 23px; }
  .map-caption { padding-block: 6px; }
  .region-description { margin-block: 8px; }
  footer { padding-block: 6px; }
}
@media (max-width: 900px) {
  .workspace { display: flex; flex-direction: column; }
  .map-panel { position: relative; top: 0; width: 100%; }
  .resource-panel { width: 100%; }
  .map-stage { aspect-ratio: 760/650; }
  .map-links { display: none; }
  .map-stage.county-view .map-canvas { inset: 0; }
  .resource-scroll { overflow: visible; }
}

/* Map-first composition: all controls and reading content live in the right rail. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.overview-stat { display: flex; align-items: baseline; gap: 12px; padding: 0 0 12px; font-size: 10px; color: #8b957f; white-space: nowrap; }
.overview-stat strong { font: 27px Georgia, serif; color: var(--green); }
.overview-stat strong span { font: 11px "Microsoft YaHei", sans-serif; }
.resource-panel .explore-bar { display: grid; grid-template-columns: 1fr 1fr 32px; gap: 8px; padding: 9px 10px; margin: 0 0 12px; border-radius: 7px; box-shadow: none; flex-shrink: 0; }
.resource-panel .search-wrap { grid-column: 1 / -1; border-bottom: 1px solid var(--line); padding-bottom: 6px; min-width: 0; }
.resource-panel input[type=search] { font-size: 12px; padding: 6px 2px; }
.resource-panel .search-symbol { font-size: 25px; }
.resource-panel .select-wrap { min-width: 0; padding: 0; border: 0; }
.resource-panel select { max-width: none; width: 100%; font-size: 12px; padding-block: 3px; }
.resource-panel .reset-button { padding: 1px 7px; font-size: 21px; background: transparent; }
.resource-panel .suggestions { left: -10px; top: calc(100% + 2px); width: calc(100% + 20px); }
.resource-panel .map-toolbar { display: flex; justify-content: space-between; padding: 0; gap: 8px; margin: 0 0 14px; min-height: 24px; }
.region-actions { display: flex; align-items: center; flex-shrink: 0; gap: 5px; }
.region-actions button { padding: 4px 6px; background: transparent; color: #7c8d70; font-size: 10px; border: 0; }
.region-actions button:hover { background: #e7eedf; border-radius: 4px; }
.resource-heading { margin-bottom: 14px; }
.resource-heading .eyebrow, .collection-label { display: none; }
.map-credit { position: absolute; bottom: 12px; left: 17px; pointer-events: none; font: 10px Georgia, serif; color: #849578; }
.map-credit span { font: 8px "Microsoft YaHei", sans-serif; margin-left: 10px; opacity: .8; }
.map-panel { isolation: isolate; }
.map-stage { --rail-width: clamp(125px, 16%, 175px); }
.map-links { width: var(--rail-width); max-width: none; top: 22px; bottom: 35px; }
.map-links-left { left: 12px; }
.map-links-right { right: 12px; }
.map-stage.county-view .map-canvas { inset-inline: calc(var(--rail-width) + 24px); }
@media (min-width: 901px) {
  main { padding: 12px 16px 14px; max-width: none; }
  .workspace { grid-template-columns: minmax(0, 1fr) clamp(355px, 28vw, 440px); gap: 20px; }
  .map-panel { border-radius: 9px; }
  .map-stage { height: 100%; min-height: 0; margin: 0; }
  .resource-panel { padding: 1px 1px 0 0; }
  .overview-stat { flex-shrink: 0; }
  .resource-panel .map-toolbar { flex-shrink: 0; }
  .resource-heading h2 { font-size: 24px; }
  .category-tabs { gap: 2px; justify-content: space-between; }
  .category-tabs button { padding: 7px 5px; font-size: 10px; }
  .category-tabs button small { font-size: 9px; }
  .resource-scroll { padding-left: 3px; }
}
@media (min-width: 901px) and (max-height: 750px) {
  .site-header { height: 64px; min-height: 64px; }
  .overview-stat { padding-bottom: 8px; }
  .resource-panel .explore-bar { margin-bottom: 8px; padding-block: 6px; }
  .resource-panel .map-toolbar, .resource-heading { margin-bottom: 10px; }
}
@media (max-width: 900px) {
  main { padding: 12px; }
  .workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .resource-panel { display: contents; }
  .overview-stat { grid-row: 1; padding: 0; }
  .resource-panel .explore-bar { grid-row: 2; margin: 0; }
  .map-panel { grid-row: 3; }
  .map-stage { height: clamp(340px, 52dvh, 500px); min-height: 0; aspect-ratio: auto; margin: 0; }
  .map-stage.county-view .map-canvas { inset: 0; }
  .resource-panel .map-toolbar { grid-row: 4; margin: 0; }
  .resource-heading { grid-row: 5; margin: 0; }
  .category-tabs { grid-row: 6; }
  .facet-filters { grid-row: 7; }
  .active-search { grid-row: 8; margin: 0; }
  .resource-scroll { grid-row: 9; }
}
