/* Stöðvar list, owner filter and the Iceland mini-map. They stay inside the station panel. */
#stodvarControls{display:flex;flex-direction:column;gap:4px;margin:6px 0 4px}
.stodvar-chips{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;padding-bottom:1px}
.stodvar-chips::-webkit-scrollbar{display:none}
.stodvar-chips button{flex:0 0 auto;height:28px;min-height:28px;padding:0 9px;border:1px solid var(--line,#2c3c44);border-radius:999px;background:transparent;color:#d5e0e4;font-size:12px;font-weight:750}
.stodvar-chips button.is-on{background:rgba(67,214,207,.18);border-color:rgba(67,214,207,.7);color:#fff}
.stodvar-credit{margin:0;color:#8ea0a6;font-size:10px;line-height:1.3}
#stationBrowser #stationSort{display:none}
#stationList .stodvar-row{display:flex;flex-direction:column;align-items:stretch;gap:3px;width:100%;min-height:44px;height:auto;padding:7px 8px;text-align:left}
#stationList .stodvar-name{display:flex;justify-content:space-between;gap:8px;min-width:0}
#stationList .stodvar-name b{font-size:14px}
#stationList .stodvar-name small{color:#93a6ad;font-size:11px;white-space:nowrap}
#stationList .stodvar-metrics{display:flex;flex-wrap:wrap;gap:3px 8px}
#stationList .stodvar-metric{display:inline-flex;gap:3px;align-items:baseline}
#stationList .stodvar-metric small{color:#8ea0a8;font-size:10px;text-transform:uppercase;letter-spacing:.03em}
#stationList .stodvar-metric b{font-size:13px;font-weight:750}

#inspectSheet .station-card .sc-hero{display:grid;gap:10px;align-items:stretch;margin:2px 0 8px}
#inspectSheet .sc-dials{display:contents}
#inspectSheet .sc-compass,#inspectSheet .sc-minimap{margin:0;min-width:0;text-align:center}
#inspectSheet .sc-compass svg,#inspectSheet .sc-minimap svg{display:block;width:100%;height:auto;max-width:none;margin:0}
#inspectSheet .sc-minimap{scroll-margin:72px}
#inspectSheet .sc-minimap svg{background:#0c1c24;border:1px solid #2c3e46;border-radius:14px;pointer-events:auto}
#inspectSheet .sc-minimap .sea{fill:#12343c}
#inspectSheet .sc-minimap .land{fill:#1d4c43;stroke:#8fd0c4;stroke-width:2.4}
#inspectSheet .sc-minimap .here-halo{fill:rgba(255,211,106,.28);stroke:#ffd36a;stroke-width:3}
#inspectSheet .sc-minimap .here{fill:#ffd36a;stroke:#1a1204;stroke-width:3}
#inspectSheet .sc-compass figcaption,#inspectSheet .sc-minimap figcaption{margin-top:4px;font-size:12px;color:#d5e2e6}
#inspectSheet .station-card .sc-grid b{white-space:normal}

.sc-land-close{display:none}
.sc-screen{display:contents}
/* Portrait: two equal square tiles across the panel. The map drawing sits inside its square. */
@media (orientation: portrait) {
  #inspectSheet#inspectSheet .station-card .sc-hero{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  }
  #inspectSheet#inspectSheet .station-card .sc-grid{grid-column:1 / -1}
  #inspectSheet#inspectSheet .sc-compass svg,
  #inspectSheet#inspectSheet .sc-minimap svg{
    width:100%;
    height:auto;
    min-width:0;
    min-height:0;
    aspect-ratio:1;
  }
  /* The size row stays above the scrolling card, so the title cannot slide under it. */
  html body #inspectSheet#inspectSheet.station-card-sheet:not([hidden]){
    display:flex!important;flex-direction:column!important;overflow:hidden!important;
  }
  html body #inspectSheet#inspectSheet.station-card-sheet > .panel-size-controls{
    position:relative!important;top:auto!important;flex:0 0 auto!important;z-index:2;
  }
  html body #inspectSheet#inspectSheet.station-card-sheet > #inspectContent{
    flex:1 1 auto!important;min-height:0!important;height:auto!important;
    overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;touch-action:pan-y;
  }
  html body #inspectSheet#inspectSheet .station-card,
  html body #inspectSheet#inspectSheet .sc-hero,
  html body #inspectSheet#inspectSheet .sc-grid,
  html body #inspectSheet#inspectSheet .sc-panel{
    touch-action:pan-y;
  }
}

/* Landscape: the station list and the open station stay inside the screen, clear of the right column, and scroll inside. */
@media (orientation: landscape) and (max-height: 520px) {
html.atlas-phone-shell body.v9-map-first[data-phone-tab="stations"] #stationBrowser#stationBrowser#stationBrowser:not([hidden]){
  left:0!important;
  right:56px!important;
  top:auto!important;
  bottom:calc(var(--phone-tab-height,44px) + env(safe-area-inset-bottom,0px))!important;
  width:auto!important;
  max-width:none!important;
  max-height:min(54vh,calc(100% - 48px - var(--phone-tab-height,44px)))!important;
  overflow:auto!important;
  z-index:60!important;
}
html.atlas-phone-shell body.v9-map-first #inspectSheet#inspectSheet#inspectSheet.station-card-sheet:not([hidden]){
  position:fixed!important;
  left:4px!important;
  right:56px!important;
  top:42px!important;
  bottom:calc(var(--phone-tab-height,44px) + 2px)!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  height:auto!important;
  max-height:none!important;
  transform:none!important;
  overflow:hidden!important;
  z-index:80!important;
  display:flex!important;
  flex-direction:column!important;
  padding:2px 8px 0!important;
  box-sizing:border-box!important;
}
/* Same trick as the Vegir sheet: the size row is display:grid !important inline, so take it out of the flow. */
html.atlas-phone-shell body.v9-map-first #inspectSheet#inspectSheet#inspectSheet.station-card-sheet > .panel-size-controls{
  position:absolute!important;left:0!important;top:0!important;width:0!important;height:0!important;max-height:0!important;
  margin:0!important;padding:0!important;border:0!important;overflow:hidden!important;visibility:hidden!important;
  pointer-events:none!important;clip:rect(0,0,0,0)!important;
}
#inspectSheet#inspectSheet #inspectContent{
  display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:hidden;
}
#inspectSheet#inspectSheet .station-card{
  display:block;flex:1 1 auto;min-height:0;height:auto;
  overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;touch-action:pan-y;
}
#inspectSheet#inspectSheet .sc-screen{
  display:flex;flex-direction:column;height:100%;min-height:0;overflow:hidden;
}
#inspectSheet#inspectSheet .station-card .sc-head{
  display:flex;align-items:center;gap:6px;flex:0 0 auto;margin:0 0 2px;padding:0;min-width:0;min-height:24px;
}
#inspectSheet#inspectSheet .station-card .sc-kind{display:none}
#inspectSheet#inspectSheet .station-card .sc-head h2{
  flex:1 1 auto;margin:0;font-size:16px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
#inspectSheet#inspectSheet .station-card .sc-status{display:flex;align-items:center;gap:6px;flex:0 1 auto;min-width:0;margin:0}
#inspectSheet#inspectSheet .station-card .sc-status > span{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:42vw}
#inspectSheet#inspectSheet .station-card .sc-actions{display:none}
#inspectSheet#inspectSheet .sc-land-close{
  display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;margin-left:auto;
  border:0;border-radius:8px;background:rgba(130,170,177,.16);color:#fff;font-size:18px;line-height:1;
}
#inspectSheet#inspectSheet .station-card .sc-hero{
  flex:1 1 auto;min-height:0;height:auto;margin:0;overflow:hidden;
  grid-template-columns:max-content max-content minmax(0,1fr);
  grid-template-rows:minmax(0,1fr);
  align-items:stretch;align-content:stretch;gap:8px;
}
#inspectSheet#inspectSheet .sc-compass,
#inspectSheet#inspectSheet .sc-minimap{width:auto;height:100%;min-height:0;min-width:0;aspect-ratio:1}
#inspectSheet#inspectSheet .sc-compass figcaption,
#inspectSheet#inspectSheet .sc-minimap figcaption{display:none}
#inspectSheet#inspectSheet .sc-compass svg,
#inspectSheet#inspectSheet .sc-minimap svg{
  width:100%;height:100%;min-width:0;min-height:0;max-width:none;aspect-ratio:auto;
}
#inspectSheet#inspectSheet .station-card .sc-grid{
  grid-template-columns:1fr;align-content:start;align-self:start;gap:4px;
}
#inspectSheet#inspectSheet .station-card .sc-grid > div{padding:4px 6px}
#inspectSheet#inspectSheet .station-card .sc-tabs{
  flex:0 0 26px;height:26px;min-height:0;margin:2px 0 0;padding:0;overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap;
}
#inspectSheet#inspectSheet .station-card .sc-tabs button{min-height:24px;height:24px;padding:0 10px}
#inspectSheet#inspectSheet .station-card .sc-panel{display:block;touch-action:pan-y}
}
