/* 휴대폰 화면 정리(HY 2026-11-21): 컴퓨터 화면처럼 첫 화면에 글씨·해·앱 화면이 함께 보이게. */
@media (max-width: 760px) {
  /* 위쪽 메뉴: 두 줄이지만 얇게 */
  html:root { --header-height: 88px; }
  html body .nav { height: var(--header-height); min-height: 0; }
  html body .nav { padding-block: 6px 0; gap: 4px; }
  html body .nav .brand { font-size: 20px; }
  html body .nav .brand .mark { width: 26px; height: 26px; }
  html body .nav > .button.primary { min-height: 34px; padding: 6px 12px; font-size: 13px; }
  html body .nav nav { border-top: 0; }
  html body .nav nav a { min-height: 32px; padding-block: 2px; }

  /* 첫 화면: 한 화면 안에 */
  html body .hero, html body .hero .hero-layout { min-height: 0; }
  html body .hero .hero-layout { gap: 0; padding-bottom: 8px; }
  html body .hero .hero-copy { padding-top: 18px; }
  html body .hero .kicker { margin-bottom: 6px; }
  html body .hero h1 { font-size: 24px; line-height: 1.3; margin: 0; }
  html body .hero h1 em { margin-top: 2px; font-size: 68px; line-height: 1.05; }
  html body .hero .lead { font-size: 14.5px; line-height: 1.7; margin: 10px 0 0; max-width: none; }
  html body .hero .actions { flex-wrap: nowrap; gap: 8px; margin-top: 16px; }
  html body .hero .actions .button { flex: 1 1 0; min-width: 0; min-height: 42px; padding: 8px 10px; font-size: 13.5px; white-space: nowrap; justify-content: center; }
  html body .hero .platform { margin-top: 8px; font-size: 11px; }
  html body .hero .hero-art { min-height: 0; height: 290px; margin: 4px 0 0; }
  html body .hero .hero-art:has([data-summer-sun]) { margin-bottom: 0; }
  html body .hero .hero-phone { width: 132px; }
  html body .hero .art-tag { padding: 7px 10px; gap: 2px 8px; }
  html body .hero .art-tag b { font-size: 12px; }
  html body .hero .art-tag small { font-size: 10.5px; }
  html body .hero .hero-art > .summer-sun-toggle { bottom: 4px; }

  /* 기능 칸: 위쪽 빈 공간 없이 */
  html body .feature-section { min-height: 0; justify-content: flex-start; padding-top: 24px; }
}

/* 휴대폰: 한 화면에 한 페이지씩, 넘길 때 늘 페이지 맞춤(HY 2026-11-22) */
@media (max-width: 760px) {
  html { scroll-snap-type: y mandatory; scroll-behavior: auto; }
  html body main > section {
    height: calc(100svh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    min-height: 0;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  /* 마지막 칸(자주 묻는 질문 + 아래 안내)은 길어도 이어서 볼 수 있게 */
  html body main > section.closing-section { height: auto; min-height: calc(100dvh - var(--header-height)); overflow: visible; }
  /* 자주 묻는 질문: 집 그림이 질문 뒤에 겹쳐도 되니 아래 안내까지 한 화면에 */
  html body .closing-section { --faq-home-width: min(260px, calc(100vw - 32px)); padding-top: 20px; }
  html body .closing-section .faq-section { gap: 12px; margin-block: auto; } /* 남는 공간이 있으면 질문을 가운데쪽으로 */
  html body .closing-section .faq-section h2 { font-size: 28px; }
  html body .closing-section .faq-section > div > a { margin-top: 6px; }
  html body .closing-section .faq-ground { margin-top: 16px; }
  html body .closing-section .faq-home { opacity: .9; }
  html body .closing-section .faq-ground > .footer { padding-block: 16px; }
  @media (max-height: 680px) {
    html body .closing-section { padding-top: 12px; }
    html body .closing-section .faq-list summary { padding-block: 9px; }
    html body .closing-section .faq-ground > .footer { padding-block: 10px; }
  }

  /* 첫 화면: 남는 공간은 해·앱 그림이 채움 */
  html body .hero .hero-layout { height: 100%; grid-template-rows: auto minmax(0, 1fr); }
  html body .hero .hero-art { height: auto; min-height: 200px; }
  @media (max-height: 680px) { html body .hero .hero-phone { width: 112px; } html body .hero .hero-copy { padding-top: 12px; } }

  /* 기능 칸: 앱 화면 크기를 화면 높이에 맞춤 */
  html body .feature-section .feature-preview .phone { width: auto; justify-self: center; }
  html body .feature-section .feature-preview .phone img {
    width: auto;
    height: calc(100dvh - var(--header-height) - 310px);
    max-height: 520px;
    min-height: 220px;
  }

  /* 해달 이야기: 선택 목록 대신 좌우 버튼, 만화는 칸 안에서 스크롤 */
  html body .story-section { padding-bottom: 16px; }
  html body .story-section .story-layout { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  html body .story-section .story-copy h2 { font-size: 28px; }
  html body .story-section .story-intro { margin: 6px 0 0; font-size: 14px; }
  html body .story-section .story-choices,
  html body .story-section .story-hint { display: none; }
  html body .story-section .story-pager { display: grid; }
  /* 만화는 칸 안에 통째로 보이게(안쪽 스크롤 없음 → 위아래로 밀면 바로 페이지 넘어감) */
  html body .story-section .story-comic {
    flex: 1 1 auto; min-height: 0; width: 100%;
    display: flex; justify-content: center; align-items: flex-start; overflow: hidden;
  }
  html body .story-section .story-comic img { width: auto; max-width: 100%; height: auto; max-height: 100%; object-fit: contain; }
}
.story-pager { display: none; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: 8px; }
.story-pager button {
  width: 36px; height: 36px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel); font-size: 15px; font-weight: 800;
}
.story-pager p { margin: 0; text-align: center; line-height: 1.35; }
.story-pager p span { display: block; font-size: 11px; font-weight: 750; color: var(--teal); letter-spacing: .08em; }
.story-pager p b { display: block; font-size: 14px; }
