/* iPad chat composer clearance: keep the field above the gesture edge.
   The composer already owns env(safe-area-inset-bottom) as padding, so
   moving its anchor must not add that same inset a second time. */
@media (min-width:701px) and (max-width:1366px) and (min-height:600px) and (any-pointer:coarse) {
  .pc-message-area > .pc-compose { bottom:20px; }
  .pc-message-area > .pc-scroll-to-bottom {
    bottom:calc(var(--pc-compose-inset,84px) + 32px);
  }
}


/* Tablet bottom dock: the parent app shell already reserves the OS safe area.
   Lift only interactive tabs, not the whole page or the chat room. */
@media (min-width:701px) and (max-width:1366px) and (min-height:600px) and (any-pointer:coarse) {
  .mobile-app-shell > .mobile-app-footer { padding-bottom:24px; }
}


/* On iPad, toolbar touch targets stay clear of the system gesture edge.
   Full-screen embedded memo owns one bottom inset; ordinary small windows
   intentionally keep their compact 44px toolbar. */
@media (min-width:701px) and (max-width:1366px) and (min-height:600px) and (any-pointer:coarse) {
  .app-shell > .app-root.app-memo-pad .memo-detail-toolbar,
  .embedded-app-window[data-window-mode="solo"] .app-root.app-memo-pad .memo-detail-toolbar {
    --memo-ipad-bottom: max(20px, env(safe-area-inset-bottom, 0px));
    height:calc(44px + var(--memo-ipad-bottom));
    min-height:calc(44px + var(--memo-ipad-bottom));
    padding-bottom:calc(1px + var(--memo-ipad-bottom));
  }
}

/* iPad global embedded launcher edge clearance */
@media (min-width:701px) and (max-width:1366px) and (min-height:600px) and (any-pointer:coarse) {
  .admin-global-embedded-connect { bottom:calc(28px + env(safe-area-inset-bottom, 0px)); }
}

/* iPad embedded launch button edge clearance */
@media (min-width:701px) and (max-width:1366px) and (min-height:600px) and (any-pointer:coarse) {
  .pc-embedded-layer--global .pc-embedded-global-launch { bottom:calc(28px + env(safe-area-inset-bottom, 0px)); }
}
