/* KSK Designer 1.1.67 — ensure every mobile editing action stays reachable.
   Quick edit grows after selecting image tools; keep the container inside the
   visible viewport and allow its CONTENT to scroll instead of clipping it. */
@media (max-width:850px) {
  .kskd-mobile-dock:not([hidden]),
  html > .kskd-mobile-dock.kskd-viewport-portal:not([hidden]) {
    display:flex!important;
    flex-direction:column!important;
    height:auto!important;
    max-height:min(76dvh,var(--kskd-quick-visible-height,calc(100dvh - 20px)))!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  .kskd-mobile-dock:not([hidden]) > .kskd-mobile-dock-header {
    flex:0 0 auto!important;
  }
  .kskd-mobile-dock:not([hidden]) > .kskd-mobile-dock-body,
  .kskd-mobile-dock.kskd-editing-image:not([hidden]) > .kskd-mobile-dock-body {
    display:block;
    flex:1 1 auto!important;
    min-height:0!important;
    max-height:none!important;
    height:auto!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior-y:contain!important;
    touch-action:auto!important;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
    padding-bottom:max(17px,env(safe-area-inset-bottom,0px))!important;
  }
  .kskd-mobile-dock.is-minimized > .kskd-mobile-dock-body {
    display:none!important;
  }
  .kskd-mobile-dock .kskd-mobile-image-extended,
  .kskd-mobile-dock .kskd-image-extended,
  .kskd-mobile-dock .kskd-edit-tool-block {
    min-width:0!important;
  }
  .kskd-mobile-dock .kskd-image-tool-action,
  .kskd-mobile-dock .kskd-bg-choice-input,
  .kskd-mobile-dock .kskd-edit-tool-block > summary {
    scroll-margin-block:12px;
  }
  /* The add-image/text/ready-graphics drawers share the viewport but have a
     separate scroller. Clamp even short-screen and open-keyboard scenarios. */
  .kskd-mobile-sheet:not([hidden]) {
    min-height:0!important;
    max-height:min(57svh,var(--kskd-sheet-available-height,calc(100dvh - 20px)))!important;
  }
  .kskd-mobile-sheet:not([hidden]) > .kskd-mobile-sheet-content {
    min-height:0!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
  }
  /* A product switch can also open on a device with the browser toolbar
     expanded: keep the product choices inside the internal scroll region. */
  .kskd-switch-card {overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
}
@media (max-width:850px) {
  /* The share-link dialog previously had no inner height limit. A long link
     or enlarged phone text can otherwise push its bottom buttons offscreen. */
  .kskd-share-url-modal {
    box-sizing:border-box!important;
    overflow-y:auto!important;
    overscroll-behavior-y:contain!important;
    -webkit-overflow-scrolling:touch;
  }
  .kskd-share-url-card {
    box-sizing:border-box!important;
    max-height:calc(100dvh - 32px)!important;
    min-height:0!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
  }
  /* A guide bubble can grow when its custom title or description is long. */
  .kskd-guide-bubble:not([hidden]) {
    max-height:min(76dvh,calc(100dvh - 20px))!important;
    overflow-y:auto!important;
    overscroll-behavior-y:contain!important;
    -webkit-overflow-scrolling:touch;
  }
}
