@media (max-width: 800px), (max-width: 1100px) and (pointer: coarse),
  (max-width: 1100px) and (orientation: portrait) {
  body {
    display: block;
  }
  #board {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    aspect-ratio: auto;
    padding: 10px;
    overflow: visible;
    align-content: start;
  }
  #board > .field {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    min-height: 0;
  }
  [data-region="heading"] {
    grid-column: 1 / 5;
    grid-row: 1;
  }
  [data-region="status"] {
    grid-column: 5 / 7;
    grid-row: 1;
  }
  [data-region="user"] {
    grid-column: 1 / 7;
    grid-row: 2;
  }
  [data-region="updated"] {
    grid-column: 1 / 7;
    grid-row: 3;
  }
  [data-region="banner"] {
    grid-column: 1 / 7;
    grid-row: 4;
  }
  [data-region="search"] {
    grid-column: 1 / 7;
    grid-row: 5;
  }
  [data-region="list"] {
    grid-column: 1 / 7;
    grid-row: 6;
  }
  [data-region="rpm"] {
    grid-column: 1 / 4;
    grid-row: 7;
    aspect-ratio: 1;
  }
  [data-region="vacuum"] {
    grid-column: 4 / 7;
    grid-row: 7;
    aspect-ratio: 1;
  }
  [data-region="pump"] {
    grid-column: 1 / 7;
    grid-row: 8;
    max-height: 140px;
  }
  [data-region="rpmWindow"] {
    grid-column: 1 / 3;
    grid-row: 9;
  }
  [data-region="hoursWindow"] {
    grid-column: 3 / 5;
    grid-row: 9;
  }
  [data-region="vacuumWindow"] {
    grid-column: 5 / 7;
    grid-row: 9;
  }
  [data-region="fuel"] {
    grid-column: 1 / 3;
    grid-row: 10;
    min-height: 210px;
  }
  [data-region="water"] {
    grid-column: 3 / 5;
    grid-row: 10;
    min-height: 210px;
  }
  [data-region="throttle"] {
    grid-column: 5 / 7;
    grid-row: 10 / 12;
  }
  [data-region="fuelWindow"] {
    grid-column: 1 / 3;
    grid-row: 11;
  }
  [data-region="waterWindow"] {
    grid-column: 3 / 5;
    grid-row: 11;
  }
  [data-region="icons"] {
    grid-column: 1 / 7;
    grid-row: 12;
  }
  [data-region="remote"] {
    grid-column: 1 / 4;
    grid-row: 13;
    width: 100px;
    height: 100px;
    justify-self: center;
  }
  [data-region="inhibit"] {
    grid-column: 4 / 7;
    grid-row: 13;
    width: 100px;
    height: 100px;
    justify-self: center;
  }
  [data-region="map"] {
    grid-column: 1 / 7;
    grid-row: 14;
  }
  [data-region="brand"] {
    grid-column: 1 / 7;
    grid-row: 15;
    max-width: 100px;
    justify-self: center;
  }
  .heading-name {
    font-size: 19px;
    white-space: normal;
  }
  .heading-zone {
    font-size: 15px;
  }
  .heading-zone svg {
    flex-basis: 18px;
    height: 20px;
  }
  .status-pill,
  .status-pill.no-link {
    font-size: 13px;
    min-height: 36px;
    white-space: normal;
    text-align: center;
  }
  .status-pill .dot {
    flex-basis: 10px;
    height: 10px;
  }
  .user {
    font-size: 14px;
  }
  .user svg {
    width: 20px;
    height: 20px;
  }
  .updated {
    font-size: 12px;
  }
  .updated svg {
    width: 12px;
    height: 12px;
  }
  .banner {
    font-size: 14px;
    padding: 6px;
  }
  .search-field {
    min-height: 44px;
    padding: 6px;
    gap: 8px;
  }
  .search-field svg {
    width: 24px;
    height: 24px;
  }
  .search-field input {
    font-size: 16px;
  }
  .pump-list {
    flex-direction: row;
    overflow-x: auto;
    padding: 2px;
    gap: 6px;
  }
  .pump-card {
    flex-basis: 150px;
    min-height: 76px;
    padding: 8px 8px 8px 26px;
  }
  .pump-card .dot {
    width: 10px;
    height: 10px;
    top: 13px;
    left: 8px;
  }
  .pump-card strong {
    font-size: 19px;
  }
  .pump-card .pump-description,
  .pump-card .zone {
    font-size: 14px;
  }
  .pump-image {
    max-height: 140px;
  }
  .pump-placeholder {
    font-size: 11px;
  }
  .drum {
    min-height: 30px;
    padding: 2px;
    border-width: 2px;
  }
  .drum-tile {
    flex-basis: 13px;
    width: 13px;
    font-size: 20px;
  }
  .drum-tile.punctuation {
    flex-basis: 6px;
    width: 6px;
  }
  .drum-unit {
    min-width: 15px;
    font-size: 12px;
    padding: 0 2px;
  }
  .tube-heading {
    height: 36px;
    font-size: 15px;
    gap: 5px;
    padding: 4px;
  }
  .tube-heading svg {
    width: 25px;
    height: 25px;
  }
  .tube-heading span {
    max-width: none;
  }
  .tube-graph {
    height: calc(100% - 36px);
  }
  .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }
  .status-item {
    min-height: 44px;
    gap: 8px;
    border: 0;
  }
  .status-item svg {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
  }
  .status-copy strong {
    font-size: 15px;
  }
  .status-copy span {
    font-size: 13px;
  }
  .control-message {
    font-size: 11px;
  }
  .workspace {
    height: auto;
  }
  .workspace-toolbar {
    justify-content: stretch;
  }
  .workspace-toolbar button {
    flex: 1;
    min-height: 44px;
    font-size: 14px;
    padding: 6px;
  }
  .workspace-panels {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    overflow: visible;
  }
  .workspace-map {
    height: 240px;
  }
  .report {
    height: 400px;
    font-size: 14px;
    padding: 8px;
  }
  .report-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .report-legend {
    flex-direction: row;
    flex-wrap: wrap;
    border: 0;
    padding: 4px 0;
    overflow: visible;
  }
  .report-plot {
    min-height: 160px;
  }
  .report-parameter {
    min-height: 32px;
  }
  .report-parameter small {
    display: inline;
    margin-left: 4px;
  }
  .report-parameter strong {
    display: inline;
  }
  .report-parameter input {
    width: 18px;
    height: 18px;
  }
  .report-gap-note {
    display: block;
  }
  .report-unknown {
    display: block;
  }
  .report-footer {
    gap: 6px 12px;
  }
  .report button {
    min-height: 36px;
    min-width: 32px;
  }
  .report-time-controls {
    margin-left: 0;
  }
  .report-follow {
    margin-left: auto;
  }
  .report-navigator {
    height: 24px;
  }
  .report-range {
    font-size: 12px;
  }
  .report-tooltip {
    font-size: 12px;
    min-width: 190px;
    max-height: 220px;
    overflow: auto;
  }
  .report-tooltip small {
    font-size: 9px;
  }
  .map-marker {
    width: 38px;
    height: 50px;
  }
  .map-frame .leaflet-control-attribution {
    font-size: 10px;
  }
  .map-window-open {
    width: 36px;
    height: 36px;
    font-size: 26px;
    right: 10px;
    top: 10px;
  }
  .map-layers {
    height: 36px;
    left: 10px;
    top: 10px;
    padding: 0 8px;
    font-size: 15px;
  }
  .map-notice {
    top: 10px;
    padding: 6px 10px;
    font-size: 13px;
    max-width: 40%;
    text-align: center;
  }
  .map-frame .leaflet-control-zoom a {
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 26px;
  }
  .map-frame .leaflet-top .leaflet-control-zoom {
    margin-top: 52px;
  }
  .brand-name {
    font-size: 14px;
  }
  .brand-frame {
    min-height: 90px;
  }
}

@media (max-width: 800px), (max-width: 1100px) and (pointer: coarse),
  (max-width: 1100px) and (orientation: portrait) {
  [data-region="pump"] {
    max-height: 200px;
    padding-top: 50px;
  }
  .telemetry-indicators {
    bottom: auto;
    top: 0;
    font-size: 19px;
    gap: 24px;
  }
  .telemetry-label {
    font-size: 13px;
  }
  .telemetry-indicator {
    column-gap: 5px;
  }
  .telemetry-indicator svg {
    width: 25px;
    height: 25px;
  }
}

body {
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}
dialog[open] {
  max-height: calc(100dvh - 2rem - env(safe-area-inset-bottom));
  max-width: calc(100% - 2rem);
  overflow: auto;
  scroll-padding-block: 1rem;
}
@media (min-width: 601px) and (max-width: 1100px) and (orientation: landscape) {
  .workspace-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) and (orientation: portrait) {
  .report-footer {
    flex-wrap: wrap;
  }
}
