





#job-toast { bottom: calc(80px + var(--sab)); }


#polar-sheet { padding: var(--sat) var(--sar) var(--sab) var(--sal); }


#plan-hint {
  position: absolute;
  top: var(--room-top);
  left: calc(12px + var(--sal));
  right: calc(64px + var(--sar));
  max-width: 460px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  border-radius: var(--radius-card);
  background: var(--bg);
  box-shadow: var(--card-shadow);
  font-size: 15px;
}
#plan-hint p { flex: 1; margin: 0; font-weight: 600; color: var(--ink); }



@media (pointer: coarse) {

  :root :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
    font-size: 16px;
  }




  :root :is(button, select, .get-app, .to-boat),
  :root input:is([type="text"], [type="password"], [type="datetime-local"]):not(.wp-grid input) {
    min-height: 44px;
  }

  .get-app { display: inline-flex; align-items: center; }


  button, a, summary, label, select, input { touch-action: manipulation; }

  .round, #map-controls button, #drawer-close { width: 44px; height: 44px; }
  .to-boat { min-width: 44px; }
  #drawer-close, .signout { flex: none; }
  #map-controls .map-pill { height: 44px; }

  #layer-panel { width: 48px; padding: 4px 0; border-radius: 24px; gap: 0; }
  #layer-pick, #streaks-toggle { width: 44px; min-height: 44px; }
  #layer-pick { padding: 4px 0; }
  #layer-picker button { min-height: 44px; }
  #layer-picker { right: calc(67px + var(--sar)); }

  .tl-play, .tl-speed-step, .tl-step { width: 44px; height: 44px; }
  .tl-row, .tl-speed { height: 48px; }
  #timeline:not([hidden]) ~ .map-credits { bottom: calc(76px + var(--tl-extra, 0px) + var(--sab)); }

  #partial-bar .partial-close { min-width: 44px; margin: -10px -4px -10px 0; }
  #locate-box .locate-close { min-width: 44px; min-height: 44px; margin: -10px -4px -10px 0; }

  #run-box #run-cancel { margin: -13px 0; }




  .faces { position: relative; isolation: isolate; padding: 0 3px; border: none; }
  .faces::before {
    content: "";
    position: absolute;
    inset: 3px 0;
    z-index: -1;
    border-radius: var(--pill);
    background: var(--bg-soft);
  }
  .faces button {
    min-height: 44px;
    border: 6px solid transparent;
    border-width: 6px 0;
    border-radius: 16px / 22px;
    background-clip: padding-box;
  }
  .faces button { position: relative; }


  .tl-track { height: 44px; }
  #job-toast-close, .polar-close { min-width: 44px; }
  details > summary { min-height: 44px; }
  .motor-box > summary { align-items: center; }

  .checks label, .motor-row:has(> input[type="checkbox"]), .motor-check { min-height: 44px; }
  .checks { gap: 0 10px; }

  #tabs button { min-height: 44px; }

  #route-list .more-link { min-height: 44px; min-width: 44px; padding: 0 6px; margin: -14px -6px; vertical-align: middle; }

  #route-list .route-toggle { width: 44px; height: 44px; }
  #route-list button.route-open { min-height: 44px; }
  #route-list .route-details { padding-left: 48px; }

  #appbar-title.renamable { position: relative; }
  #appbar-title.renamable::after { content: ""; position: absolute; inset: -12px 0; }
  .signout { min-height: 44px; }
  #pdf-menu button { min-height: 44px; }








  .pt-tools { gap: 0; }
  .pt-tools button { width: 44px; height: 44px; }
  .pt-pause button { min-height: 44px; }
  #route-form .pt-hours { font-size: 16px; min-height: 44px; }
  .pt-row { grid-template-columns: 18px minmax(211px, 1fr) auto; column-gap: 2px; }
  #route-form .pt-input { font-size: 16px; padding-left: 8px; padding-right: 8px; }
  .pt-list { overflow-x: auto; padding: 4px; margin: -4px; overscroll-behavior-x: contain; }
}

@media (pointer: coarse) and (max-width: 389px) {
  #route-form { padding-left: 8px; padding-right: 8px; }
}



@media (max-width: 600px), (pointer: coarse) and (max-height: 500px) {




  #appbar:not([hidden]) ~ #map-controls {
    top: calc(var(--bar-h) + 12px);
    right: calc(11px + var(--sar));
    bottom: calc(112px + var(--tl-extra, 0px) + var(--sab));
    left: calc(12px + var(--sal));
    pointer-events: none;
  }
  #map-controls > * { pointer-events: auto; }
  #my-position { display: block; }

  main:has(> #panel.open) .map-credits { left: calc(8px + var(--sal)); }
  #map-controls .map-pill { position: absolute; left: 0; bottom: 0; }
  #map-controls #edit-route { bottom: 52px; }
  #map-controls #move-points { bottom: 104px; }
  #map-controls #watch-route { bottom: 156px; }



  #map-pane:has(#move-bar:not([hidden]), #area-bar:not([hidden])) .map-pill { display: none; }



  #move-bar, #area-bar, #field-note, #here-note, #obs-note, #ascat-note, #lightning-note, #locate-box {
    max-height: calc(100% - var(--room-top) - 112px - var(--sab));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #locate-box .locate-close { min-width: 44px; min-height: 44px; margin: -10px -4px -10px 0; }


  #partial-bar {
    max-height: min(40%, calc(100% - var(--room-top) - 112px - 200px - 8px - var(--tl-extra, 0px) - var(--sab)));
  }

  .brand { gap: 10px; }
  .brand h1 { font-size: 21px; white-space: nowrap; }
  .signout { white-space: nowrap; }

  #appbar {
    gap: 8px;
    padding-right: calc(12px + var(--sar));
  }
  .faces button { padding-left: 12px; padding-right: 12px; }
  #appbar-pdf { padding: 0 12px; }
  #appbar-title { font-size: 15px; }
}



@media (max-width: 600px) {
  #appbar { flex-wrap: wrap; row-gap: 2px; padding-bottom: 6px; }
  #appbar .appbar-text { order: 3; flex: 1 0 100%; text-align: left; padding: 0 4px; }
  #appbar .faces { margin-left: auto; }
}



@media (pointer: coarse) and (max-height: 500px) {



  #partial-bar {
    left: calc(204px + var(--sal));
    right: calc(64px + var(--sar));
    max-width: none;
    max-height: min(40%, calc(100% - var(--room-top) - max(112px + var(--tl-extra, 0px) + var(--sab), var(--key-clear, 0px)) - 8px));
  }
  #layer-picker {
    max-height: calc(100% - 92px - var(--tl-extra, 0px) - var(--bar-h) - 12px - var(--sab));
    overflow-y: auto;
    flex-wrap: nowrap;
  }
  #layer-picker button { flex: none; }


  #my-position { position: absolute; top: 0; left: 0; }


  #sat-button { position: absolute; top: 0; right: 52px; }
  #weather-button { position: absolute; top: 48px; right: 52px; }
  #credits-open { position: absolute; top: 96px; right: 52px; }

  #fit-route { position: absolute; top: 144px; right: 52px; }
}

@media (max-width: 600px) {

  #panel {
    width: 100%;
    border-right: none;
    padding-left: calc(16px + var(--sal));
    padding-right: calc(16px + var(--sar));
  }


  #appbar .appbar-text { min-width: 40px; }



  .tl-row { gap: 4px; padding: 0 calc(8px + var(--sar)) 0 calc(8px + var(--sal)); }
  .tl-time { width: 52px; min-width: 0; font-size: 13px; line-height: 16px; }

  .dt-setting { grid-template-columns: 124px 1fr; }


  #grib-loading { max-width: calc(100% - 32px); }





  #run-box, #trip-box {
    left: calc(16px + var(--sal));
    right: calc(64px + var(--sar));
    width: auto;
    transform: none;
    padding: 14px 16px;
  }
  #run-box .run-clockrow { flex-wrap: wrap; column-gap: 10px; row-gap: 0; }
  #run-box #run-clock { white-space: nowrap; }
}
