/* Preserve the university palette in browsers that offer automatic darkening. */
:root { color-scheme: only light; }
.floor-number, .floor-tabs b { white-space: nowrap; }
.map-surface { position: relative; isolation: isolate; color-scheme: only light; }
.map-raster { display: block; width: 100%; height: auto; background: #fff; }
.map-surface .region-map-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-raster, .region-map-svg { color-scheme: only light; forced-color-adjust: none; }
.map-load-error { padding: 12px; font-size: 1rem; }
.map-load-error[hidden] { display: none; }
.map-legend { margin: 14px 0 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.map-legend h4 { margin: 0 0 10px; font-size: 1rem; line-height: 1.5; }
.map-legend ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px 12px; }
.map-legend li { display: flex; align-items: center; gap: 8px; font-size: .875rem; line-height: 1.5; }
.map-legend canvas { display: block; width: 32px; height: 32px; flex: 0 0 32px; background: #fff; border: 1px solid #e1e6e8; color-scheme: only light; forced-color-adjust: none; }

@media (max-width: 1000px) { .map-legend ul { grid-template-columns: repeat(2,minmax(0,1fr)); } }

@media (max-width: 720px) {
  html { scroll-padding-top: 90px; }
  .site-header { position: relative; }
  .header-inner { min-height: 64px; padding: 10px 16px; gap: 12px; }
  .brand img { width: 118px; }
  .header-title { font-size: 1rem; }
  .header-title span { font-size: .8125rem; }
  .hero-photo { height: clamp(140px, 43vw, 200px); }
  .hero-photo img { object-position: center 70%; }
  .photo-caption { bottom: 8px; right: 10px; font-size: .75rem; padding: 3px 7px; }
  .hero-copy { padding: 18px 16px 20px; }
  .hero .eyebrow, .hero .text-link { display: none; }
  .hero h1 { font-size: 1.7rem; line-height: 1.45; margin-bottom: 8px; letter-spacing: -.04em; }
  .hero h1 br { display: none; }
  .hero p { font-size: 1rem; line-height: 1.65; }
  .section { margin: 0 16px; padding: 30px 0; }
  .section-heading { margin-bottom: 16px; }
  .explore { padding: 22px 0 28px; }
  .explore .eyebrow, .explore .section-heading p { display: none; }
  .explore h2 { font-size: 1.1875rem; letter-spacing: 0; }
  .entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .entry { display: flex; padding: 16px 8px 12px; min-width: 0; border-top-width: 3px; }
  .entry h3 { font-size: 1rem; margin: 0; line-height: 1.5; }
  .entry-kicker, .entry p, .floor-mini, .image-entry img, .learning-words { display: none; }
  .entry-action { font-size: .875rem; line-height: 1.4; gap: 4px; padding-top: 10px; }
  .entry-action b { font-size: 1rem; }
  .story { gap: 22px; }
  .story-image { height: 230px; }
  .story-copy h2 { font-size: 1.65rem; margin-bottom: 16px; }
  .story-copy p { margin-bottom: 14px; }
  .parent-section { padding-top: 20px; }
  .parent-section h2 { font-size: 1.5rem; }
  .page-intro { margin: 0 16px; padding: 16px 0 22px; }
  .breadcrumb { margin-bottom: 12px; font-size: .875rem; }
  .page-intro .eyebrow { display: none; }
  .page-intro h1 { font-size: 1.6rem; margin-bottom: 10px; }
  .page-intro h1 br { display: none; }
  .page-intro > p { font-size: 1rem; line-height: 1.65; }
  .floor-section { padding-top: 0; }
  .floor-tabs { top: 0; padding: 6px 0; margin-bottom: 16px; gap: 5px; }
  .floor-tabs button { padding: 8px 2px; gap: 3px; min-height: 64px; }
  .floor-tabs b { font-size: 1.25rem; }
  .floor-tabs span { font-size: .875rem; line-height: 1.4; }
  .floor-intro { padding: 18px 14px; gap: 14px; margin-bottom: 22px; }
  .floor-number { font-size: 2.2rem; min-width: 48px; }
  .floor-intro .eyebrow { display: none; }
  .floor-intro h2 { font-size: 1.4rem; margin-bottom: 8px; }
  .floor-intro p { font-size: 1rem; line-height: 1.65; }
  .chinese-map { padding: 16px 10px; margin: 0 0 24px; }
  .map-heading h3 { font-size: 1.25rem; }
  .map-heading .eyebrow { display: none; }
  .map-instruction { font-size: .875rem; margin: 10px 0 14px; }
  .map-explorer { display: flex; flex-direction: column; gap: 20px; }
  .map-scroll { height: auto; aspect-ratio: 1000 / 1160; max-height: 480px; max-height: min(65svh, 480px); }
  .map-canvas { padding: 4px; }
  .map-toolbar { padding: 6px; gap: 6px; }
  .map-symbols { font-size: .8125rem; line-height: 1.6; padding: 10px 0; }
  .collection-card { padding: 18px; }
  .collection-section h2 { font-size: 1.4rem; }
  .collection-section { margin-bottom: 26px; }
  .mobile-nav { padding: 4px 8px calc(4px + env(safe-area-inset-bottom)); }
  .mobile-nav a { min-height: 48px; gap: 3px; }
  .mobile-nav a span { font-size: 1.2rem; }
  .site-footer { padding: 28px 16px calc(90px + env(safe-area-inset-bottom)); }
}
