/* Handwriting needs room at ordinary viewing distances, especially in the atlas. */
:root :is(#intro,.museum-ui,.overlay,.settings-card,.museum-settings-card,.curator-panel)
  :is(button:not(.board-item):not(.floating-photo):not(.earth-pin),select,
      input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),textarea){
  font-size:16px!important;line-height:1.35!important
}
:root :is(.museum-ui,.overlay,.settings-card,.museum-settings-card,.curator-panel)
  :is(.micro,.gentle-hint,.board-view-hint,.gallery-scroll-hint,.observer-chip,.board-index-heading){
  font-size:14px!important;line-height:1.5!important
}
:root :is(.overlay-head,.object-controls,.plaque-actions,.settings-body,.museum-settings-body,
  .earth-control-panel,.instrument-grid,.setting-row,.museum-setting){min-width:0}
:root :is(.settings-body,.museum-settings-body,.earth-control-panel,.curator-body){
  scroll-padding-block:16px;overflow-x:hidden
}
:root :is(.settings-card,.museum-settings-card) :is(input,select,textarea){
  min-width:0;max-width:100%
}

/* The visit details are content, rather than tiny interface chrome. */
:root #memoryPlaque .meta-grid{
  grid-template-columns:minmax(0,1fr) minmax(0,1.65fr)!important;gap:14px 16px!important
}
:root #memoryPlaque .meta-grid span{
  min-width:0;font-size:16px!important;line-height:1.45!important;
  color:#51483e!important;overflow-wrap:anywhere
}
:root #memoryPlaque .meta-grid span::before{
  font:400 13px/1.4 var(--font-interface)!important;letter-spacing:0!important;
  text-transform:none!important;color:#776958!important;margin-bottom:4px
}
:root #memoryPlaque #coords{grid-column:1/-1!important}
:root #memoryPlaque .plaque-actions button{
  font-size:16px!important;min-height:46px!important;padding:10px 8px!important;
  white-space:normal;overflow-wrap:anywhere
}
:root #memoryPlaque p{font-size:17px!important;line-height:1.55!important}
:root .museum-ui .brand strong{font-size:21px!important}

/* Earth controls stay readable without squeezing the three-dimensional view. */
:root #earthOverlay .earth-control-panel{padding:22px!important}
:root #earthOverlay .earth-control-panel h3{
  font-size:28px!important;line-height:1.25!important;overflow-wrap:anywhere
}
:root #earthOverlay .earth-control-panel :is(p,.earth-introduction){
  font-size:16px!important;line-height:1.6!important
}
:root #earthOverlay .earth-control-panel .instrument-btn{
  font-size:16px!important;line-height:1.35!important;min-height:48px!important;
  padding:10px 8px!important;white-space:normal!important;overflow-wrap:anywhere
}
:root #earthOverlay .earth-control-panel .earth-panel-label{
  font-size:14px!important;line-height:1.5!important;color:#c1cacc!important
}
:root #earthOverlay .earth-light-card{
  font-size:16px!important;line-height:1.6!important;color:#e1e1d6
}
:root #earthOverlay .earth-light-card small{
  font-size:14px!important;line-height:1.5!important;color:#bbc8cb
}
:root #earthOverlay :is(.earth-source-note,.earth-zoom-hint,#earthObserverStatus,
  #subsolar,#locationPhotoCount,.earth-tile-status){
  font-size:14px!important;line-height:1.55!important;color:#b9c6ca!important;
  overflow-wrap:anywhere
}
:root #earthOverlay .earth-place-badge span{font-size:17px!important;line-height:1.35!important}
:root #earthOverlay .earth-place-badge small{font-size:14px!important;line-height:1.45!important}
:root #earthStage .leaflet-control-attribution{
  font-size:12px!important;line-height:1.45!important;padding:3px 6px!important;
  max-width:100%;white-space:normal;overflow-wrap:anywhere
}
:root #earthStage .leaflet-control-scale-line{font-size:12px!important;line-height:1.4!important}
:root #earthStage .leaflet-tooltip{font-size:16px!important;line-height:1.4!important}
@media(min-width:761px){
  :root #earthOverlay .earth-layout{grid-template-columns:320px minmax(0,1fr)!important}
}
@media(min-width:761px) and (max-width:980px){
  :root #earthOverlay .earth-layout{grid-template-columns:300px minmax(0,1fr)!important}
}

/* Settings and sky sheets use the same comfortable reading scale. */
:root :is(#visualSettingsPanel,#museumSettingsPanel) :is(.setting-row,.museum-setting){
  font-size:16px!important;line-height:1.45!important
}
:root #visualSettingsPanel .setting-row{
  grid-template-columns:minmax(0,.95fr) minmax(0,1.15fr)!important;gap:14px!important
}
:root #visualSettingsPanel .setting-row>div{
  min-width:0;grid-template-columns:minmax(0,1fr) 48px!important
}
:root :is(#visualSettingsPanel,#museumSettingsPanel) :is(output,.settings-status,
  .settings-group-note,.museum-motion,.museum-performance){
  font-size:14px!important;line-height:1.5!important
}
:root #visualSettingsPanel :is(.settings-group summary,.settings-preview-head strong){
  font-size:16px!important;line-height:1.45!important
}
:root #visualSettingsPanel .settings-preview-head span{
  font-size:14px!important;line-height:1.5!important
}
:root :is(#visualSettingsPanel,#museumSettingsPanel) footer button{
  font-size:16px!important;min-height:46px!important;white-space:normal
}
:root #skyOverlay :is(.sky-switch,.sky-info-btn,.sky-text-btn,.sky-time-steps button,
  .sky-time-switch button,.sky-settings-button,.sky-search,.sky-sheet>summary,
  .sky-tier-title,.sky-tier>summary){font-size:16px!important;line-height:1.35!important}
:root #skyOverlay .sky-switch{min-height:44px!important}
:root #skyOverlay .sky-switch small{
  font-size:13px!important;line-height:1.4!important;white-space:normal
}
:root #skyOverlay :is(.sky-helper,.dso-legend,.doppler-legend,.sky-time-live,
  .sky-status p,.loading-note,.sky-plaque-coords,.object-science-note){
  font-size:14px!important;line-height:1.5!important
}
:root #skyOverlay .object-info-panel dl{font-size:16px!important;line-height:1.45!important}
:root #skyOverlay .sky-plaque-time{font-size:16px!important;line-height:1.45!important}
:root #skyOverlay .sky-plaque-kicker{font-size:14px!important;line-height:1.45!important}

@media(max-width:760px){
  :root #memoryPlaque .meta-grid{
    grid-template-columns:minmax(0,1fr) minmax(0,1.5fr)!important;
    gap:10px 12px!important;margin-top:14px!important
  }
  :root #memoryPlaque .meta-grid span{font-size:15px!important}
  :root #memoryPlaque .meta-grid span::before{font-size:13px!important}
  :root #memoryPlaque p{font-size:16px!important;line-height:1.5!important}
  :root .museum-ui .brand strong{font-size:19px!important}
  :root #earthOverlay .earth-control-panel{padding:16px!important}
  :root #earthOverlay .earth-control-panel h3{font-size:28px!important}
  :root #earthOverlay .earth-layer-grid,:root #earthOverlay .map-filter-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important
  }
  :root #earthOverlay .earth-layer-grid .instrument-btn{
    justify-content:center!important;gap:8px!important;padding:10px 8px!important
  }
  :root #earthOverlay .earth-action-grid{grid-template-columns:1fr!important}
  :root #earthOverlay .earth-control-panel .earth-source-note{font-size:13px!important}
  :root #skyOverlay .sky-time-switch button{
    height:auto!important;min-height:40px!important;padding:6px 9px!important;
    white-space:normal!important
  }
  :root #skyOverlay .sky-time-steps button{min-height:44px!important;font-size:16px!important}
}
@media(max-width:480px){
  :root #visualSettingsPanel .setting-row{grid-template-columns:minmax(0,1fr)!important;gap:7px!important}
  :root #visualSettingsPanel .setting-row.toggle-row{grid-template-columns:minmax(0,1fr) auto!important}
  :root #visualSettingsPanel :is(.settings-card header,.settings-body){padding-inline:16px!important}
  :root :is(#visualSettingsPanel,#museumSettingsPanel) footer button{flex:1 1 140px;min-width:0}
}
@media(max-width:420px){
  :root #earthOverlay :is(.globe-style-grid,.map-style-grid){
    grid-template-columns:repeat(2,minmax(0,1fr))!important
  }
  :root #earthOverlay :is(.globe-style-grid,.map-style-grid) button:last-child{
    grid-column:1/-1!important
  }
  :root #skyOverlay .sky-time-steps{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px!important
  }
  :root #skyOverlay .sky-time-steps .sky-time-play{grid-column:1/-1!important}
}
