/* 手机端沿用正式站内容，按触屏阅读和操作重新排布。 */
@media (max-width: 760px) {
  .site-header .nav-toggle {
    width: 44px;
    height: 44px;
  }

  .site-header .nav-links {
    max-height: min(75vh, 580px);
    max-height: min(75dvh, 580px);
    overscroll-behavior-y: contain;
    padding: 10px 12px 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .site-header .nav-links > a,
  .site-header .nav-item > .nav-link-btn,
  .site-header .nav-dropdown a {
    min-height: 44px;
    align-items: center;
  }

  /* 手机首屏把医院实景和常用入口上下排开。 */
  #home-hero .hero-slider {
    --mobile-hero-photo-height: clamp(250px, 72vw, 390px);
  }

  #home-hero .hero-slides {
    height: var(--mobile-hero-photo-height);
    min-height: 0;
  }

  #home-hero .hero-slide::after {
    background: none;
  }

  #home-hero .hero-ui {
    inset: calc(var(--mobile-hero-photo-height) - 44px) 12px auto auto;
  }

  #home-hero .campus-caption {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: none;
    padding: 23px 16px 24px;
    border-radius: 0;
    background: #f3f8fc;
  }

  #home-hero .campus-caption h1 {
    font-size: clamp(24px, 7vw, 34px);
    line-height: 1.25;
  }

  #home-hero .campus-caption h1 span {
    display: inline;
  }

  #home-hero .campus-caption p,
  #home-hero .campus-caption .campus-guide {
    margin-top: 8px;
    padding: 0;
    font-size: 14px;
    letter-spacing: 0;
  }

  #home-hero .campus-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 14px;
  }

  #home-hero .campus-actions a {
    min-height: 46px;
    padding: 6px 4px;
    text-align: center;
  }

  /* 同一份实时排班在手机上逐日向下阅读。 */
  body[data-page="appointment"] .wb .days {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  body[data-page="appointment"] .wb .day {
    display: flex;
    align-items: stretch;
    gap: 4px;
    overflow: visible;
    padding: 4px;
  }

  body[data-page="appointment"] .wb-date {
    display: grid;
    flex: 0 0 44px;
    align-content: center;
    padding: 0 3px 0 0;
    margin: 0;
    border: 0;
    border-inline-end: 1px solid #e2eaf3;
    text-align: center;
  }

  body[data-page="appointment"] .wb .day button {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 46px;
    margin: 0;
    overflow-wrap: anywhere;
  }

  body[data-page="appointment"] .wb-schedule-note::after {
    content: none;
  }

  body[data-page="appointment"] .wb .day .slot-empty:disabled {
    color: #55667a;
  }

  #book-dept button,
  .wb-week-tabs button,
  .tuina-dates button,
  #tuina-duration button,
  .tuina-refresh,
  .hm-env-tab,
  .doc-dialog-book-link,
  .medicine-tools button {
    min-height: 44px;
  }

  #tuina-dates {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    padding-inline: 0;
  }

  .wb .patient-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  :is(#book-form, #ward-visit, #career-form) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
  #drug-name,
  .doctor-search {
    min-height: 46px;
    max-width: 100%;
    font-size: 16px;
  }

  .booking-consent {
    min-height: 44px;
  }

  .booking-consent input {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
  }

  .booking-actions,
  .ward-visit-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  #book-submit,
  #ward-visit button[type="submit"],
  #career-form button[type="submit"] {
    width: 100%;
    min-height: 48px;
  }

  .doc-profile-overlay .doc-profile-close {
    inset-block-start: 8px;
    inset-inline-end: 8px;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 380px) {
  #home-hero .campus-actions a {
    font-size: 14px;
  }

  .wb-doctor-heading .wb-subtle {
    font-size: 13px;
  }
}
