/* 공간브릿지 P0: 사용자의 직접 스크롤을 기본값으로 유지한다. */
html {
  scroll-behavior: auto !important;
  scroll-padding-top: 96px;
}

html,
body {
  /* clip blocks horizontal painting without turning body into a scroll container. */
  overflow-x: clip !important;
}

button,
a,
[role="button"],
.chip,
.card,
.summary-trigger,
.service-choice,
summary {
  touch-action: manipulation;
}

section,
.anchor-target,
h2,
h3,
[data-scroll-target],
#quote-title,
#condition-title,
#helper-title,
#lf-error-links {
  scroll-margin-top: 96px;
}

body.modal-open,
body.sb56-modal-open,
body.sbgc-sheet-open {
  overflow: hidden !important;
  /* overflow locks the background; keep browser zoom gestures available. */
  touch-action: auto;
  overscroll-behavior: none;
}

#helper-dialog {
  max-height: 100dvh;
  overflow: hidden;
  flex-direction: column;
}

#helper-dialog[open],
#helper-dialog.sb142-dialog-fallback {
  display: flex;
}

#helper-dialog .dialog-body,
#helper-dialog .helper-body,
body.sb56-modal-open .sb46-sheet,
.sbgc-form {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y pinch-zoom;
}

@media (max-width: 1040px) {
  .sbgc-panel {
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .sbgc-form {
    flex: 1 1 auto;
  }
}

@media (max-width: 640px) {
  html {
    scroll-padding-top: 80px;
  }

  section,
  .anchor-target,
  h2,
  h3,
  [data-scroll-target],
  #quote-title,
  #condition-title,
  #helper-title,
  #lf-error-links {
    scroll-margin-top: 80px;
  }
}
