.mobile-home {
  display: none;
}

.mobile-home-quick-menu {
  display: none;
}

@media (max-width: 800px) {
  body:has(.mobile-home):has(.mobile-home-quick-menu) {
    --mobile-home-quick-menu-height: 96px;
    padding-bottom: calc(var(--mobile-home-quick-menu-height) + env(safe-area-inset-bottom));
  }

  .mobile-home-quick-menu {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1100;
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: 0 -8px 24px rgba(4, 16, 29, 0.14);
  }

  .mobile-home-quick-menu__item {
    display: flex;
    min-width: 0;
    min-height: calc(var(--mobile-home-quick-menu-height) + env(safe-area-inset-bottom));
    padding: 10px 5px calc(8px + env(safe-area-inset-bottom));
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #ffffff;
    font-size: clamp(15px, 4.1vw, 17px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.035em;
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: filter 160ms ease, transform 160ms ease;
  }

  .mobile-home-quick-menu__item--phone {
    background: #0b1d30;
  }

  .mobile-home-quick-menu__item--kakao {
    background: #ffe500;
    color: #07182a;
  }

  .mobile-home-quick-menu__item--private {
    background: #c39760;
  }

  .mobile-home-quick-menu__icon {
    display: block;
    width: 48px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: contain;
  }

  .mobile-home-quick-menu__item--phone .mobile-home-quick-menu__icon,
  .mobile-home-quick-menu__item--private .mobile-home-quick-menu__icon {
    filter: brightness(0) invert(1);
  }

  .mobile-home-quick-menu__item:hover {
    filter: brightness(0.96);
  }

  .mobile-home-quick-menu__item:active {
    transform: translateY(1px);
    filter: brightness(0.91);
  }

  .mobile-home-quick-menu__item:focus-visible {
    z-index: 1;
    outline: 3px solid #ffffff;
    outline-offset: -5px;
  }

  .mobile-home-quick-menu__item--kakao:focus-visible {
    outline-color: #07182a;
  }

  .pc-home > .pc-home-hero,
  .pc-home > .pc-home-section:not(.pc-home-faq):not(.pc-home-contact) {
    display: none;
  }

  .mobile-home {
    display: block;
    width: 100%;
    background: #ffffff;
  }

  .mobile-home-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: #07101a;
    color: #ffffff;
    isolation: isolate;
  }

  .mobile-home-hero__media,
  .mobile-home-hero__media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
  }

  .mobile-home-hero__media img {
    object-fit: cover;
    object-position: 52% center;
  }

  .mobile-home-hero__shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
      linear-gradient(180deg, rgba(3, 10, 18, 0.04) 0%, rgba(3, 10, 18, 0.1) 34%, rgba(3, 10, 18, 0.72) 68%, rgba(3, 10, 18, 0.96) 100%),
      linear-gradient(90deg, rgba(3, 10, 18, 0.34) 0%, rgba(3, 10, 18, 0.08) 76%);
    pointer-events: none;
  }

  .mobile-home-hero__content {
    position: relative;
    z-index: 2;
    display: flex;
    width: 100%;
    height: 100%;
    padding: max(26px, env(safe-area-inset-top)) 24px calc(max(34px, env(safe-area-inset-bottom)) + var(--mobile-home-quick-menu-height, 0px));
    align-items: flex-end;
  }

  .mobile-home-hero__copy {
    width: min(100%, 480px);
    text-shadow: 0 3px 20px rgba(0, 0, 0, 0.4);
  }

  .mobile-home-hero__copy h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(32px, 9.45vw, 44px);
    font-weight: 800;
    line-height: 1.23;
    letter-spacing: -0.052em;
    word-break: keep-all;
  }

  .mobile-home-hero__topics {
    display: grid;
    gap: 2px;
    margin: clamp(22px, 4.5vh, 38px) 0 0;
    color: #d29b56;
    font-size: clamp(16px, 4.65vw, 21px);
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: -0.035em;
  }

  .mobile-home-hero__description {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(13px, 3.75vw, 17px);
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: -0.025em;
    word-break: keep-all;
  }

  .mobile-home-hero__cta {
    display: inline-flex;
    min-width: 190px;
    min-height: 58px;
    margin-top: clamp(24px, 4.6vh, 40px);
    padding: 0 30px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    appearance: none;
    background: #c89552;
    color: #ffffff;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    text-shadow: none;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
    cursor: default;
    opacity: 1;
  }

  .mobile-home-image-section,
  .mobile-home-image-section picture,
  .mobile-home-image-section img {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .mobile-home-image-section {
    background: #ffffff;
  }

  .mobile-home-image-section--navy {
    background: #142840;
  }

  .mobile-home-image-section--review {
    background: #f7f2ec;
  }

  .mobile-home-image-section--dark {
    background: #07101a;
  }

  .mobile-home-image-section img {
    height: auto;
  }

  .mobile-home-video {
    overflow: hidden;
    padding: 4px 0 68px;
    background: #ffffff;
  }

  .mobile-home-video__toolbar {
    display: flex;
    padding: 8px 24px 26px;
    justify-content: center;
  }

  .mobile-home-video__toolbar .pc-home-youtube-more {
    width: auto;
    min-width: 230px;
    min-height: 58px;
    padding: 0 25px;
    gap: 15px;
    font-size: 16px;
  }

  .mobile-home-video__toolbar .pc-home-youtube-more__icon {
    width: 34px;
    height: 25px;
  }

  .mobile-home-video__rail {
    display: flex;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 24px 14px;
    gap: 14px;
    scroll-padding-left: 24px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-home-video__rail::-webkit-scrollbar {
    display: none;
  }

  .mobile-home-video__rail .pc-home-video-card {
    width: auto;
    min-width: 0;
    flex: 0 0 calc(100vw - 76px);
    border-radius: 13px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .mobile-home-video__rail .pc-home-video-card__play {
    width: 54px;
    height: 54px;
  }

  .mobile-home-review-carousel {
    overflow: hidden;
    padding: 4px 0 72px;
    background: #f7f2ec;
  }

  .mobile-home-review-carousel__viewport {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 52px 14px;
    scroll-padding-inline: 52px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-home-review-carousel__viewport::-webkit-scrollbar {
    display: none;
  }

  .mobile-home-review-carousel__viewport:focus-visible {
    outline: 3px solid #b88548;
    outline-offset: -3px;
  }

  .mobile-home-review-carousel__track {
    display: flex;
    width: max-content;
    gap: 12px;
  }

  .mobile-home-review-carousel__slide {
    width: calc(100vw - 104px);
    flex: 0 0 calc(100vw - 104px);
    margin: 0;
    overflow: hidden;
    aspect-ratio: 377 / 488;
    border: 1px solid rgba(20, 40, 64, 0.1);
    border-radius: 7px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(20, 40, 64, 0.1);
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  .mobile-home-review-carousel__slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-home-review-carousel__controls {
    display: grid;
    padding: 20px 52px 0;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 16px;
  }

  .mobile-home-review-carousel__button {
    display: grid;
    width: 48px;
    height: 48px;
    padding: 0 0 2px;
    place-items: center;
    border: 1px solid rgba(20, 40, 64, 0.28);
    border-radius: 50%;
    appearance: none;
    background: rgba(255, 255, 255, 0.82);
    color: #142840;
    font: inherit;
    font-size: 24px;
    font-weight: 500;
    line-height: 1;
    box-shadow: 0 8px 20px rgba(20, 40, 64, 0.08);
    cursor: pointer;
    transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease, transform 180ms ease;
  }

  .mobile-home-review-carousel__button:active {
    transform: scale(0.96);
  }

  .mobile-home-review-carousel__button:focus-visible {
    outline: 3px solid #b88548;
    outline-offset: 3px;
  }

  .mobile-home-review-carousel__navigation {
    display: grid;
    min-width: 0;
    justify-items: center;
    gap: 9px;
  }

  .mobile-home-review-carousel__status {
    color: #142840;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.08em;
  }

  .mobile-home-review-carousel__dots {
    display: flex;
    width: 100%;
    max-width: 124px;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }

  .mobile-home-review-carousel__dot {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 999px;
    appearance: none;
    background: rgba(20, 40, 64, 0.22);
    cursor: pointer;
    transition: width 180ms ease, background-color 180ms ease;
  }

  .mobile-home-review-carousel__dot.is-active {
    width: 20px;
    background: #b88548;
  }

  .mobile-home-review-carousel__dot:focus-visible {
    outline: 2px solid #142840;
    outline-offset: 3px;
  }

  .pc-home-contact__grid {
    grid-template-areas:
      "doctor"
      "consultation"
      "information"
      "map";
  }
}

@media (max-width: 800px) and (max-height: 680px) {
  .mobile-home-hero__content {
    padding-right: 20px;
    padding-bottom: calc(max(22px, env(safe-area-inset-bottom)) + var(--mobile-home-quick-menu-height, 0px));
    padding-left: 20px;
  }

  .mobile-home-hero__copy h1 {
    font-size: clamp(29px, 8.6vw, 37px);
  }

  .mobile-home-hero__topics {
    margin-top: 16px;
    font-size: clamp(15px, 4.2vw, 18px);
  }

  .mobile-home-hero__description {
    margin-top: 7px;
    font-size: clamp(12px, 3.5vw, 15px);
  }

  .mobile-home-hero__cta {
    min-width: 176px;
    min-height: 52px;
    margin-top: 18px;
    font-size: 15px;
  }
}

@media (max-width: 360px) {
  body:has(.mobile-home):has(.mobile-home-quick-menu) {
    --mobile-home-quick-menu-height: 88px;
  }

  .mobile-home-quick-menu__item {
    gap: 3px;
    padding-top: 8px;
    font-size: 15px;
  }

  .mobile-home-quick-menu__icon {
    width: 44px;
    height: 38px;
    flex-basis: 38px;
  }

  .mobile-home-video__toolbar {
    padding-right: 20px;
    padding-left: 20px;
  }

  .mobile-home-video__toolbar .pc-home-youtube-more {
    min-width: 218px;
    min-height: 54px;
    font-size: 15px;
  }

  .mobile-home-video__rail {
    padding-right: 20px;
    padding-left: 20px;
    scroll-padding-left: 20px;
  }

  .mobile-home-video__rail .pc-home-video-card {
    flex-basis: calc(100vw - 68px);
  }

  .mobile-home-review-carousel__viewport {
    padding-right: 46px;
    padding-left: 46px;
    scroll-padding-inline: 46px;
  }

  .mobile-home-review-carousel__slide {
    width: calc(100vw - 92px);
    flex-basis: calc(100vw - 92px);
  }

  .mobile-home-review-carousel__controls {
    padding-right: 40px;
    padding-left: 40px;
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    gap: 12px;
  }

  .mobile-home-review-carousel__button {
    width: 46px;
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-home-hero {
    scroll-behavior: auto;
  }

  .mobile-home-review-carousel__button,
  .mobile-home-review-carousel__dot {
    transition: none;
  }
}
