/* 1023px 이하 — 고정 상담 띠·퀵메뉴·푸터 */
@media all and (max-width: 1023px) {

  /* ── 오른쪽 세로 바로가기 ─────────────────────────────
     본문과 진료시간표를 덮는다. 폰에서는 숨기고
     같은 경로를 아래 상담 띠와 푸터 채널 줄로 옮긴다. */
  aside.quick_menu {
    display: none !important;
  }

  /* ── 하단 고정 상담 띠 ───────────────────────────────*/
  html.ss-mbar-on body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .ss-mbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 990;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #1f1f1f;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
  }
  .ss-mbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 44px;
    height: 60px;
    color: #fff !important;
    text-decoration: none !important;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.12);
  }
  .ss-mbar a + a {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
  }
  .ss-mbar a:last-child {
    background: #558ed5;
    border-left: 0;
  }
  .ss-mbar svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
  }
  .ss-mbar span {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.03em;
    white-space: nowrap;
  }

  /* ── 푸터 — 한 단으로 ────────────────────────────────*/
  footer.position-relative {
    padding-top: 40px !important;
    padding-bottom: 32px !important;
  }
  footer.position-relative > .container > .d-flex {
    flex-direction: column !important;
    gap: 28px;
  }
  footer .container .info,
  footer .container .timeAndNumber {
    width: 100% !important;
    max-width: none !important;
  }
  footer .container .info > img {
    width: 170px !important;
    height: auto;
    margin-bottom: 18px !important;
  }
  footer .container .info .adress p {
    font-size: 14px !important;
    line-height: 1.7 !important;
    margin-bottom: 4px;
    word-break: keep-all;
  }

  /* 로그인·회원가입 — 연결 대상이 없는 링크와 투명 버튼 */
  footer .container .log,
  footer.position-relative > div.position-absolute {
    display: none !important;
  }

  /* 약관 줄 — 글자 겹침을 풀어 세로로 */
  footer .container .info .wrap {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    margin-top: 16px !important;
  }
  footer .container .info .wrap div {
    flex-wrap: wrap;
    gap: 4px 12px !important;
  }
  footer .container .info .wrap a {
    padding: 0 !important;
  }
  footer .container .info .wrap p {
    font-size: 13px !important;
    line-height: 1.6 !important;
    margin: 0;
  }

  /* 상담 번호·진료시간 */
  footer .container .timeAndNumber h2 {
    font-size: 28px !important;
    line-height: 1.3 !important;
    white-space: nowrap;
    margin: 6px 0 18px !important;
  }
  footer .container .timeAndNumber h2 a.ss-tel {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: inherit !important;
    text-decoration: none !important;
  }
  footer .container .timeAndNumber ul {
    padding: 0;
    margin: 0;
  }
  footer .container .timeAndNumber ul li {
    margin-bottom: 10px !important;
  }
  footer .container .timeAndNumber ul li p {
    font-size: 15px !important;
    gap: 16px !important;
    margin: 0;
    white-space: nowrap;
  }
  footer .container .timeAndNumber ul li span {
    width: auto !important;
    min-width: 64px;
    font-size: 15px !important;
    white-space: nowrap;
  }

  /* 채널 줄 — 바로가기에 있던 블로그·인스타그램·지식인·유튜브 */
  .ss-fchan {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
  }
  .ss-fchan a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
  }
  footer .container .info .ss-fchan img {
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
  }

  /* 푸터 약관 링크 터치 높이 */
  footer .wrap > div > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}
