/* AstroSaju 사이트 시안 v2.2 (site2.css) — 제품 styles.css 뒤에 얹는다.
   v2.2 — GPT 사이트 2차 감사(2026-09-26) 반영: T-01 · T-02(예시 초점 · 복귀 · 로딩, site2.js 와 함께), T-03(첫 화면 · 막대 높이 고정 해제),
   T-04(입력 구역 간격을 margin 으로), T-05(공개 예시 표시), T-06(이어보기 먼저), T-07(소개 제목 한 단 낮춤), 덜어내기(카드 금색 · 지도 면 한 겹). 고친 자리마다 「v2.2」 주석.
   v2 는 v1.1 처럼 원래 화면 위에 모양만 입히지 않고 화면 뼈대를 새로 짰다(v2/index.template.html).
   v2.1 — 배치만 고쳤다: 두 계산 지도를 입력 구역 뒤 제 구역(.s2-proof)으로 옮기고, 무료 · 유료 · 내 정보 범위 세 카드는 첫 입력 앞에 한 줄로. 고친 자리마다 「v2.1」 주석.
   지킨 것: 네이비 · 화이트 · 샴페인 골드, 온보딩의 첨성대 그림, 입력 폼(#birthForm)의 마크업 · 동작 전부, app.js 가 찾는 id · 자리.
   원칙: 보이는 건 애플, 만지는 건 웹, 품질은 애플 기준. 금색은 행동(단추) · 현재 상태 · 사주 체계 표지에만.
   0. 바탕 · 폭 · 상태(온보딩 · 주문 · 리포트 경로, 결과가 열린 때)
   1. 위 막대
   2. 첫 화면 — 첨성대 사진
   3. 이어보기 · 소개 카드(세 카드 — 첫 입력 앞) · 두 계산 지도(v2.1: 입력 구역 뒤 .s2-proof)
   4. 입력 구역 — 두 칸(왼쪽 설명 · 사주단자 카드, 오른쪽 폼)
   5. 입력 폼 속 — v1.1 에서 검증한 규칙을 그대로 옮겼다(「v1.1」 주석 유지)
   6. 단추 · 고급 관법 설정 · 안내 · 서고 불러오기
   7. 바닥글 · 주문 상태 · 서고 · 접힌 폼
   8. 초점 · 동작 줄이기 · 고대비 · 인쇄 */

:root {
  --s-bg: #0a101c;
  --s-group: #1f2a40;         /* 폼 묶음 면 */
  --s-group-hi: #243049;      /* 누를 때 */
  --s2-tile: #141d31;         /* 소개 카드 면 */
  --s2-tile-2: #111a2c;
  --s-label: #f3f5fa;
  --s-body: #d3d9e4;
  --s-label-2: #aab4c5;
  --s-label-3: #9ca8bd;
  --s-fill: rgba(214, 222, 238, .08);
  --s-fill-2: rgba(214, 222, 238, .13);
  --s-sep: rgba(214, 222, 238, .1);
  --s-gold: #d5b681;
  --s-gold-hi: #e2c79a;
  --s-on-gold: #10182a;
  --s-focus: rgba(226, 199, 154, .75);
  --s-danger: #ff453a;
  --s-danger-text: #ff8a80;
  --s-astro: #a9bde3;         /* 천궁도 축 · 표지 — 점성술은 은청, 사주는 금 */
  --s-r-in: 12px;
  --s-r-card: 20px;
  --s-ease: cubic-bezier(.2, .8, .2, 1);
  --s-font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --s-serif: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", "Batang", serif;
  --s2-max: 1120px;
  --s2-gut: 20px;
  --s2-bar-h: 52px;
  --s-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='14' viewBox='0 0 8 14'%3E%3Cpath d='M1 1l6 6-6 6' fill='none' stroke='%237d899e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --s-chev-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23aab4c5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --s-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='5.2' fill='none' stroke='%239ca8bd' stroke-width='1.7'/%3E%3Cpath d='M11 11l3.4 3.4' stroke='%239ca8bd' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E");
  --s-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.3l2.7 2.7L11.2 4.4' fill='none' stroke='%2310182a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (min-width: 720px) { :root { --s2-gut: 32px; } }
@media (min-width: 1024px) { :root { --s2-gut: 40px; } }

@media screen {
  /* ==========================================================================
     0. 바탕 · 폭 · 상태
     ========================================================================== */
  html body { background: var(--s-bg); }
  /* 첫 화면 상태(결과 · 예시 리포트가 열리지 않은 때) — 입력 구역이 두 칸을 쓰도록 본문 폭을 넓힌다.
     결과나 예시 리포트가 열리면 이 규칙이 빠져 제품의 폭(720px · 유료 리더 1180px)이 그대로 돌아온다 */
  html:not(:has(#result:not([hidden]))) body main.wrap {
    max-width: calc(var(--s2-max) + 2 * var(--s2-gut));
    padding-left: var(--s2-gut);
    padding-right: var(--s2-gut);
  }
  /* 위 막대가 붙어 있는 동안 앵커 이동 · 제품의 scrollIntoView 가 막대 아래에 멈추게 */
  html:not(:has(#result:not([hidden]))) { scroll-padding-top: calc(var(--s2-bar-h) + 12px); }
  /* v2.2 — 붙어 있는 막대 안의 단추는 늘 화면 맨 위(위 여백 64px 안쪽)에 있어서, 초점이 가면 크롬이 「가려졌다」고 보고 페이지를
     크게 끌어올렸다(1440 에서 900 → 444px). 막대 안 단추만 그 여백을 상쇄한다 — 화면 모양은 그대로(검사 중 찾음) */
  html:not(:has(#result:not([hidden]))) body .s2-bar :is(a, button) { scroll-margin-top: calc(-1 * (var(--s2-bar-h) + 12px)); }
  /* 온보딩이 떠 있는 동안에는 뒤 화면을 읽기 · 초점 대상에서도 뺀다(제품이 .wrap 에 하는 것과 같게) */
  html[data-onboarding-pending="true"] body :is(.s2-bar, .s2-top) { visibility: hidden; }
  /* 주문 · 리포트 경로 — 그 목적으로 온 방문이라 사진 첫 화면과 소개를 접는다 */
  html:is([data-order-route="true"], [data-s2-route="report"]) body .s2-top { display: none; }
  /* v2.1 — 입력 구역 뒤의 두 계산 지도도 같은 경로에서 접고, 결과 · 예시 리포트가 열린 동안에도 접는다(제품 폭 720px 안에 끼지 않게 · 결과 앞뒤를 가리지 않게) */
  html:is([data-order-route="true"], [data-s2-route="report"]) body .s2-proof,
  html:has(#result:not([hidden])) body .s2-proof { display: none; }

  /* ==========================================================================
     1. 위 막대 — 첫 화면 위에서는 투명, 내려가면 유리. 결과가 열리면 붙지 않는다(리포트의 도구 막대와 겹치지 않게)
     ========================================================================== */
  /* v2.2 — 높이를 고정하지 않는다(글자를 크게 키우면 줄을 바꿔 늘어난다 · T-03). 평소에는 52px */
  html body .s2-bar {
    position: sticky;
    top: 0;
    z-index: 60;
    min-height: var(--s2-bar-h);
    font-family: var(--s-font);
  }
  html:has(#result:not([hidden])) body .s2-bar { position: relative; }
  html body .s2-bar::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(10, 16, 28, .82);
    -webkit-backdrop-filter: saturate(1.6) blur(20px);
    backdrop-filter: saturate(1.6) blur(20px);
    box-shadow: inset 0 -1px 0 var(--s-sep);
    transition: opacity .2s ease;
  }
  html body .s2-bar.is-top::before { opacity: 0; }
  html body .s2-bar-in {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 12px;
    min-height: var(--s2-bar-h);
    max-width: calc(var(--s2-max) + 2 * var(--s2-gut));
    margin: 0 auto;
    padding: 0 var(--s2-gut);
  }
  html body .s2-wordmark {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--s-label);
    font-size: 15px;
    font-weight: 650;
    letter-spacing: .2em;
    text-decoration: none;
    white-space: nowrap;
  }
  html body .s2-wordmark .s2-dot { margin: 0 .08em; color: var(--s-gold); }
  html body .s2-bar-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; margin-left: auto; }
  html body .s2-bar-link {
    min-height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    background: none;
    color: var(--s-label-2);
    font: 600 14px/1 var(--s-font);
    cursor: pointer;
    transition: color .16s ease;
  }
  html body .s2-bar-link:hover { color: var(--s-label); }
  /* 금색 알약은 막대 안에서 30px 높이로 보이고, 누르는 자리는 44px */
  html body .s2-bar-cta {
    position: relative;
    z-index: 0;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    color: var(--s-on-gold);
    font: 700 14px/1 var(--s-font);
    text-decoration: none;
    white-space: nowrap;
  }
  html body .s2-bar-cta::before {
    content: "";
    position: absolute;
    inset: 7px 0;
    z-index: -1;
    border-radius: 999px;
    background: var(--s-gold);
    transition: background-color .16s ease;
  }
  html body .s2-bar-cta:hover::before { background: var(--s-gold-hi); }
  @media (max-width: 479px) { html body .s2-bar-link { display: none; } }

  /* ==========================================================================
     2. 첫 화면 — 899px 이하: 사진이 화면 전체(글은 하늘, 단추는 땅 위). 900px 이상: 왼쪽 글 · 오른쪽 사진 창
     ========================================================================== */
  /* v2.2 — 높이를 고정하지 않고 최소 높이만 준다. 글자가 커지면 첫 화면이 늘어나 단추가 잘리지 않는다(T-03).
     평소 390 × 844 에서 684px(v2.1 은 780) — 다음 구역 제목이 첫 화면 아래에 걸린다 */
  html body .s2-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    margin-top: calc(-1 * var(--s2-bar-h));
    height: auto;
    min-height: clamp(560px, calc(100svh - 160px), 700px);
    max-height: none;
    overflow: hidden;
    color: var(--s-label);
    font-family: var(--s-font);
  }
  html body .s2-hero-in {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: calc(var(--s2-bar-h) + 28px) var(--s2-gut) 28px;
    text-align: center;
  }
  html body .s2-hero-copy { max-width: 34em; }
  html body .s2-hero-kicker {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .01em;
    color: var(--s-label-2);
  }
  html body .s2-hero-title {
    margin: 10px 0 0;
    font-family: var(--s-font);
    font-size: clamp(36px, 10.5vw, 48px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.035em;
    color: var(--s-label);
    word-break: keep-all;
  }
  html body .s2-hero-lede {
    margin: 14px auto 0;
    font-size: 17px;
    line-height: 1.55;
    letter-spacing: -0.01em;
    color: var(--s-body);
    word-break: keep-all;
  }
  html body .s2-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 24px;
  }
  html body .s2-hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--s-label-2);
  }
  html body .s2-hero-meta::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  html body .s2-hero-meta .v0-badge {
    display: inline;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    color: inherit !important;
    font: inherit !important;
    letter-spacing: 0 !important;
  }
  html body .s2-hero-media { position: absolute; inset: 0; z-index: -1; }
  html body .s2-hero-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 62% 50%;   /* 폰은 높이에 맞춰 위아래가 잘리지 않고, 태블릿은 하늘 20% ~ 땅 80% 가 보인다 */
  }
  /* 사진 위 글자를 받치는 그늘 — 위(막대 · 제목) 옅게, 아래(단추)는 짙게 해서 바탕색으로 잇는다 */
  html body .s2-hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 16, 28, .6) 0, rgba(10, 16, 28, .18) 30%, rgba(10, 16, 28, 0) 46%, rgba(10, 16, 28, .22) 64%, rgba(10, 16, 28, .8) 84%, var(--s-bg) 100%);
  }
  /* 단추 — 금색 캡슐(시작) · 유리 캡슐(예시) */
  html body .s2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    min-height: 50px;
    margin: 0;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    font-family: var(--s-font);
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.01em;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .16s ease, transform .16s var(--s-ease);
  }
  html body .s2-btn:active { transform: scale(.98); }
  html body .s2-btn-gold { background: var(--s-gold); color: var(--s-on-gold); }
  html body .s2-btn-gold:hover { background: var(--s-gold-hi); }
  html body .s2-btn-glass {
    background: rgba(255, 255, 255, .14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    backdrop-filter: blur(20px) saturate(1.5);
    color: var(--s-label);
  }
  html body .s2-btn-glass:hover { background: rgba(255, 255, 255, .2); }
  /* v2.2 — 「리포트 예시」를 불러오는 동안(T-02): 누른 단추의 글자를 「불러오는 중…」으로 바꿔 보인다.
     단추의 이름(화면 읽기)은 그대로 두고 모양만 겹쳐 그린다 — 읽기에는 #s2Status 줄이 알린다. 폼의 제품 단추도 같은 모양(제품이 disabled 로 두는 동안) */
  html body [data-s2-sample][aria-busy="true"],
  html body #birthForm #sampleReportBtn:disabled { position: relative; color: transparent !important; cursor: progress; }
  html body [data-s2-sample][aria-busy="true"]::after,
  html body #birthForm #sampleReportBtn:disabled::after {
    content: "불러오는 중…";
    position: absolute;
    inset: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: var(--s-label);
    font: inherit;
    letter-spacing: inherit;
    white-space: nowrap;
    pointer-events: none;
  }
  /* 화면에는 없고 읽기에만 있는 줄 */
  html body .s2-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  /* v2.2 — 세로 태블릿(600–899px)은 사진이 폭에 맞춰 크게 그려져 700px 첫 화면으로는 첨성대가 단추 뒤로 숨었다(768 × 1024 에서 29%만 보임).
     최대 높이를 900px 로 두고 사진의 아래쪽을 더 보여 첨성대가 단추 위에 오게 한다(잰 세로 태블릿 6 크기 모두 100% 보임 · 글 대비 최소 7.9 — 글자를 지운 화면의 실제 픽셀, evidence/hero-tuning) */
  @media (min-width: 600px) and (max-width: 899px) and (orientation: portrait) {
    html body .s2-hero { min-height: clamp(560px, calc(100svh - 160px), 900px); }
    html body .s2-hero-img { object-position: 62% 66%; }
  }
  /* v2.2 — 예시가 열리면 초점이 예시 안내로 온다(T-01) — 키보드로 왔을 때 보이는 표시 */
  html body #result .sample-v12-notice { border-radius: 16px; }
  html body #result .sample-v12-notice:focus { outline: none; }
  html body #result .sample-v12-notice:focus-visible { outline: 2px solid var(--s-gold-hi); outline-offset: 4px; }

  html body .s2-hero-media > picture { display: contents; }

  /* 시안(2026-09-27) — 900px 이상: 홈 전용 가로 사진(첨성대, 오른쪽 3분의 1)을 첫 화면 전체에 깔고 글을 왼쪽 하늘 위에 둔다.
     전(v2.2)의 「글 왼쪽 · 사진 창 오른쪽」 두 칸을 대신한다. 왼쪽 · 아래 그늘로 글 대비를 받치고 아래는 바탕색으로 잇는다 */
  @media (min-width: 900px) {
    html body .s2-hero {
      display: flex;
      align-items: center;
      height: auto;
      min-height: clamp(620px, calc(100svh - 20px), 900px);
      max-height: none;
      padding: calc(var(--s2-bar-h) + 40px) var(--s2-gut) 96px;
    }
    html body .s2-hero::before { content: none; }
    html body .s2-hero::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 180px;
      z-index: -1;
      background: linear-gradient(180deg, rgba(10, 16, 28, 0), var(--s-bg));
    }
    html body .s2-hero-in {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      width: 100%;
      max-width: var(--s2-max);
      margin: 0 auto;
      padding: 0;
      text-align: left;
    }
    html body .s2-hero-copy { max-width: 36rem; }
    html body .s2-hero-kicker { font-size: 17px; }
    html body .s2-hero-title { font-size: clamp(52px, 5.2vw, 76px); line-height: 1.06; }
    html body .s2-hero-lede { margin: 20px 0 0; font-size: 19px; max-width: 26em; }
    html body .s2-hero-actions { justify-content: flex-start; margin: 0; padding-top: 36px; }
    html body .s2-hero-meta { margin-top: 18px; }
    html body .s2-hero-media {
      position: absolute;
      inset: 0;
      z-index: -1;
      overflow: hidden;
    }
    html body .s2-hero-img { object-fit: cover; object-position: 68% 58%; }
    html body .s2-hero-media::after {
      background:
        linear-gradient(90deg, rgba(10, 16, 28, .78) 0%, rgba(10, 16, 28, .55) 30%, rgba(10, 16, 28, .15) 52%, rgba(10, 16, 28, 0) 64%),
        linear-gradient(180deg, rgba(10, 16, 28, .45) 0, rgba(10, 16, 28, 0) 22%);
    }
  }

  /* ==========================================================================
     3. 이어보기 · 소개 카드
     ========================================================================== */
  /* v2.2 — 이어보기는 막대 바로 다음, 첫 화면 앞(T-06). 이미 보관한 리포트가 있는 사람의 가장 흔한 목적이 먼저 온다.
     이때 첫 화면은 막대 밑으로 파고들지 않고(이어보기 카드가 사이에 있다), 폰에서는 짧은 변형(창 높이에 맞춰 440–600px) */
  html body #returningResume:not([hidden]) {
    max-width: calc(var(--s2-max) + 2 * var(--s2-gut));
    margin: 0 auto;
    padding: 12px var(--s2-gut) 0;
    font-family: var(--s-font);
  }
  html body #returningResume:not([hidden]) + .s2-hero { margin-top: 0; }
  /* 짧은 변형의 높이 · 사진 자리 — GPT 안(최소 440px 고정)대로면 첨성대가 단추 뒤로 숨었다(390 × 844 에서 17%만 보임).
     창 높이에 맞춰 440–600px 로 두고, 사진을 위로 올려 잡아 첨성대가 소개 글과 단추 사이에 오게 한다. 그만큼 소개 글이 노을 쪽에 가까워져
     글 뒤 그늘을 조금 진하게 했다(글자를 지운 화면의 실제 픽셀로 잰 최소 대비 — 흔한 폰 8.6 이상, 320 × 640 에서 5.1) */
  @media (max-width: 899px) {
    html body #returningResume:not([hidden]) + .s2-hero { min-height: clamp(440px, calc(100svh - 260px), 600px); }
    html body #returningResume:not([hidden]) + .s2-hero .s2-hero-in { padding-top: 28px; }
    html body #returningResume:not([hidden]) + .s2-hero .s2-hero-img { object-position: 62% 75%; }
    html body #returningResume:not([hidden]) + .s2-hero .s2-hero-media::after {
      background: linear-gradient(180deg, rgba(10, 16, 28, .66) 0, rgba(10, 16, 28, .5) 38%, rgba(10, 16, 28, .16) 52%, rgba(10, 16, 28, 0) 58%, rgba(10, 16, 28, .22) 70%, rgba(10, 16, 28, .8) 87%, var(--s-bg) 100%);
    }
  }
  @media (min-width: 900px) {
    html body #returningResume:not([hidden]) + .s2-hero { padding-top: 48px; }
  }
  /* 시안(2026-09-27) — 세로 폰(599px 이하)은 폰용으로 따로 뽑은 세로 사진(2823 × 5016 → 780 · 1170). 첨성대가 사진 높이 50.3–75.4%, 위 절반은 별이 드문 남색 하늘.
     글은 하늘 위, 탑은 글과 단추 사이. 그늘은 글 뒤와 맨 아래만 — 탑에는 걸지 않는다.
     사진이 첫 화면보다 긴 만큼(낮은 폰 · 짧은 첫 화면) 가운데 맞춤으로 위아래를 같이 잘라 탑을 글과 단추 사이에 둔다 */
  @media (max-width: 599px) and (orientation: portrait) {
    html body .s2-hero-img { object-position: 50% 50%; }
    html body .s2-hero-media::after {
      background: linear-gradient(180deg, rgba(10, 16, 28, .55) 0, rgba(10, 16, 28, .25) 28%, rgba(10, 16, 28, 0) 42%, rgba(10, 16, 28, 0) 78%, rgba(10, 16, 28, .72) 91%, var(--s-bg) 100%);
    }
    html body #returningResume:not([hidden]) + .s2-hero .s2-hero-img { object-position: 50% 50%; }
    html body #returningResume:not([hidden]) + .s2-hero .s2-hero-media::after {
      background: linear-gradient(180deg, rgba(10, 16, 28, .6) 0, rgba(10, 16, 28, .3) 30%, rgba(10, 16, 28, 0) 40%, rgba(10, 16, 28, 0) 78%, rgba(10, 16, 28, .72) 91%, var(--s-bg) 100%);
    }
  }
  html body #returningResume .returning-resume-button {
    display: grid;
    gap: 2px;
    width: 100%;
    min-height: 64px;
    margin: 0;
    padding: 16px 44px 16px 16px;
    border: 0;
    border-radius: 20px;
    background: var(--s-group) var(--s-chev) right 18px center / 8px 14px no-repeat;
    color: var(--s-label);
    font-family: var(--s-font);
    text-align: left;
    cursor: pointer;
  }
  html body #returningResume .returning-resume-button:hover { background-color: var(--s-group-hi); }
  html body #returningResume .returning-resume-button span { color: var(--s-gold); font-size: 13px; font-weight: 700; }
  html body #returningResume .returning-resume-button b { margin: 0; color: var(--s-label); font-size: 16px; font-weight: 650; }
  html body #returningResume .returning-resume-button small { margin: 0; color: var(--s-label-3); font-size: 13px; }
  html body #returningResume > p {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 0;
    padding: 12px 12px 12px 18px;
    border-radius: 20px;
    background: var(--s-group);
    color: var(--s-label);
    font-size: 15px;
    font-weight: 600;
  }
  html body #returningResume > p button {
    min-height: 44px;
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--s-fill-2);
    color: var(--s-label);
    font: 600 15px/1 var(--s-font);
    cursor: pointer;
  }

  html body .s2-bento {
    max-width: calc(var(--s2-max) + 2 * var(--s2-gut));
    margin: 0 auto;
    padding: 40px var(--s2-gut) 0;
    font-family: var(--s-font);
  }
  html body .s2-head { max-width: 760px; }
  html body .s2-eyebrow { margin: 0; font-size: 14px; font-weight: 600; color: var(--s-label-2); }
  /* v2.2 — 소개 · 지도 제목을 한 단 낮춘다(폰 24px · PC 32px). 첫 화면 제목과 겹쳐 「두 번째 첫 화면」처럼 보였다(T-07) */
  html body .s2-h2 {
    margin: 8px 0 0;
    font-family: var(--s-font);
    font-size: clamp(24px, 3.2vw, 32px);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.025em;
    color: var(--s-label);
    word-break: keep-all;
  }
  html body .s2-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 24px;
  }
  html body .s2-tile {
    margin: 0;
    padding: 20px;
    border-radius: 24px;
    background: linear-gradient(180deg, var(--s2-tile), var(--s2-tile-2));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
    color: var(--s-label-2);
  }
  html body .s2-tile-title {
    margin: 0;
    font-family: var(--s-font);
    font-size: 17px;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: var(--s-label);
  }
  html body .s2-tile p { margin: 6px 0 0; font-size: 15px; line-height: 1.55; color: var(--s-label-2); word-break: keep-all; }
  html body .s2-tile p strong { color: var(--s-label); font-weight: 600; }
  /* v2.1 — align-content: start. 세 카드가 가장 긴 카드 높이로 늘 때 남는 높이가 아이콘과 글 사이로 들어가 제목 높이가 카드마다 달랐다(v2 의 720–1023px 에도 있던 것) */
  html body .s2-tile-text { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 14px; align-items: start; align-content: start; }
  html body .s2-ico { display: block; width: 28px; height: 28px; color: var(--s-label-2); }
  html body .s2-ico svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

  /* 두 계산 지도 — 공개 예시(sample-reader-report-current.json)의 명식 · 천궁도를 제품 그리기 함수로 그린다(site2.js) */
  html body .s2-tile-head { display: flex; flex-direction: column; gap: 4px; }
  /* v2.2 — 그림 칸의 면(바탕 · 테두리)을 걷었다. 바깥 카드 · 그림 칸 · 기둥 면이 세 겹으로 겹쳐 무거웠다(GPT Q7) */
  /* 명식은 천궁도보다 낮다 — 두 칸이 나란할 때 남는 높이의 가운데에 둔다 */
  /* 불러오는 동안의 자리 — 크기를 미리 잡아 두어 그려진 뒤 아래가 밀리지 않는다 */
  /* v2.2 — 그림 이름 옆 「공개 예시」 표지(T-05) */
  /* v2.2 — 공개 예시 안내는 그림 위, 읽히는 크기로(T-05) */
  html body .s2-chip {
    min-height: 44px;
    margin: 0;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--s-fill-2);
    color: var(--s-label);
    font: 600 15px/1 var(--s-font);
    cursor: pointer;
    transition: background-color .16s ease;
  }
  html body .s2-chip:hover { background: rgba(214, 222, 238, .2); }

  /* 명식 — 제품 그리기(.report-birthmap-*)의 크기만 카드에 맞춘다. 숨은 장간 줄은 미리 보기에서 뺀다 */
  /* 기둥이 좁을 때(한 기둥 60px 안팎) — 「나」 표시가 「일주」 글자를 덮지 않게 모서리 밖으로 */
  @media (max-width: 399px) {
  }
  @media (min-width: 560px) {
  }
  /* 천궁도 — 밤 바탕의 색(좌표 · 각도는 그대로). 축과 표지는 은청, 하우스 번호는 미리 보기에서 뺀다 */

  /* 좁은 화면(719px 이하) — 세 카드는 설정 앱 목록처럼 한 묶음(왼쪽을 들인 구분선) */
  @media (max-width: 719px) {
    html body .s2-grid { row-gap: 0; }
    html body .s2-tile-text { position: relative; padding: 15px 16px; border-radius: 0; background: var(--s2-tile); box-shadow: none; }
    html body .s2-tile-text:first-child { border-radius: 20px 20px 0 0; }   /* v2.1 — 지도 카드가 빠져 세 카드가 묶음의 처음부터 */
    html body .s2-tile-text:last-child { border-radius: 0 0 20px 20px; }
    html body .s2-tile-text + .s2-tile-text::before { content: ""; position: absolute; top: 0; left: 58px; right: 0; height: 1px; background: var(--s-sep); }
    html body .s2-tile-text p { font-size: 14px; }
  }
  @media (min-width: 560px) {
  }
  @media (min-width: 720px) {
    html body .s2-bento { padding-top: 64px; }
    html body .s2-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
    html body .s2-tile { padding: 24px; }
    html body .s2-tile-text { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
  }
  /* v2.1 — 1024px 이상에서도 세 카드는 한 줄 세 칸(v2 의 「지도 2/3 + 세 카드 세로 1/3」은 지도가 빠져 없앴다) */
  @media (min-width: 1024px) {
    html body .s2-bento { padding-top: 24px; }
  }

  /* v2.1 — 두 계산 지도: 입력 구역 뒤 제 구역. 첫 화면 상태의 본문 폭(1120px)을 다 쓰고, 그림을 v2 보다 크게 */
  /* v2.2 — 공개 예시에서는 명식의 「나」 표시만 뺀다(일주 강조 · 사주 금색은 그대로). 자기 결과로 읽히지 않게(T-05) — 실제 리포트의 「나」는 그대로 */
  @media (min-width: 720px) {
  }
  @media (min-width: 1024px) {
  }

  /* ==========================================================================
     4. 입력 구역 — 1024px 이상 · 첫 화면 상태에서 두 칸. 그 밖에는 한 칸(672px)
     ========================================================================== */
  html body :is(#formCard, .site-foot) { color: var(--s-body); font-family: var(--s-font); }
  html body #formCard {
    margin: 0 !important;
    padding: 48px 0 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
  }
  @media (min-width: 720px) { html body #formCard { padding-top: 64px !important; } }
  /* v2.2 — 첫 화면 상태에서는 구역 사이 간격을 입력 구역 안(padding)이 아니라 밖(margin)에 둔다(T-04).
     「무료로 시작」 · 온보딩 뒤에 입력 구역이 막대 아래 64px 에 올 때 그 자리가 곧 「四柱單子 · 출생 정보 기록」이 되고,
     앞 카드의 아랫조각은 막대 뒤로 들어간다. 결과가 열린 때는 위 규칙(안쪽 여백) 그대로 */
  html:not(:has(#result:not([hidden]))) body #formCard { padding-top: 0 !important; margin-top: 48px !important; }
  @media (min-width: 720px) { html:not(:has(#result:not([hidden]))) body #formCard { margin-top: 64px !important; } }
  html body #formCard .danja {
    max-width: 672px;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
  }
  html body #formCard .danja::before,
  html body #formCard .danja::after { display: none !important; }
  html body #formCard .danja-kicker {
    margin: 0 !important;
    font-family: var(--s-font) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    color: var(--s-gold) !important;
  }
  html body #formCard .danja-title {
    margin: 8px 0 0 !important;
    font-family: var(--s-font) !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.025em !important;
    color: var(--s-label) !important;
    word-break: keep-all;
  }
  html body #formCard .danja-lede {
    margin: 10px 0 0 !important;
    font-family: var(--s-font) !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: var(--s-label-2) !important;
  }
  /* 펼침(사주단자란 · 좌표 직접 입력 · 보관 범위) — 글자 + 아래 갈매기 */
  html body #formCard details > summary {
    list-style: none;
    cursor: pointer;
    font-family: var(--s-font) !important;
  }
  html body #formCard details > summary::-webkit-details-marker { display: none; }
  html body #formCard details.danja-lede-origin { margin-top: 8px !important; }
  html body #formCard details.danja-lede-origin > summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--s-label-2) !important;
  }
  html body #formCard details.danja-lede-origin > summary::after,
  html body #formCard details.coord-manual > summary::after,
  html body #formCard .privacy-contract details > summary::after {
    content: "";
    width: 12px;
    height: 8px;
    background: var(--s-chev-down) center / 12px 8px no-repeat;
    transition: transform .2s var(--s-ease);
  }
  html body #formCard details[open] > summary::after { transform: rotate(180deg); }
  html body #formCard details.danja-lede-origin > p { margin: 4px 0 0 !important; font-size: 14px !important; line-height: 1.6 !important; color: var(--s-label-3) !important; }

  /* 사주단자 카드 — 입력칸에 적은 값을 그대로 옮겨 보여 준다(계산 아님 · 화면 읽기에서는 숨김: 같은 정보가 입력칸에 있다) */
  html body .s2-card { display: none; }
  html body .s2-card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; }
  html body .s2-card-title span { color: var(--s-gold); font: 700 18px/1 var(--s-serif); letter-spacing: .14em; }
  html body .s2-card-title small { color: var(--s-label-3); font-size: 12px; font-weight: 500; }
  html body .s2-card-empty { display: none; margin: 14px 0 0; color: var(--s-label-2); font: 400 14px/1.5 var(--s-font); }
  html body .s2-card.is-empty .s2-card-empty { display: block; }
  html body .s2-card.is-empty :is(.s2-card-cols, .s2-card-place) { display: none; }
  html body .s2-card-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
  html body .s2-card-cols > li {
    display: grid;
    justify-items: center;
    gap: 10px;
    min-width: 0;
    padding: 16px 4px 14px;
    border-radius: 14px;
    background: rgba(214, 222, 238, .05);
    box-shadow: inset 0 0 0 1px rgba(214, 222, 238, .07);
    transition: background-color .25s ease, box-shadow .25s ease;
  }
  html body .s2-card-hj { color: var(--s-label-2); font: 700 22px/1 var(--s-serif); transition: color .25s ease; }
  html body .s2-card-v {
    max-width: 100%;
    overflow: hidden;
    color: var(--s-label-3);
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* v2.2 — 채워진 칸은 금색이 아니라 한 단 밝은 면 + 흰 글자. 입력을 옮겨 보여 줄 뿐인데 금색이면 「선택됨 · 확인됨」처럼 읽혔다(GPT B-4 · B-8).
     금색은 카드 이름 「四柱單子」(사주 체계 표지)에만 */
  html body .s2-card .is-filled { background: rgba(214, 222, 238, .09); box-shadow: inset 0 0 0 1px rgba(214, 222, 238, .16); }
  html body .s2-card .is-filled .s2-card-hj { color: var(--s-label); }
  html body .s2-card .is-filled .s2-card-v { color: var(--s-label); }
  html body .s2-card .is-invalid { box-shadow: inset 0 0 0 1px var(--s-danger); }
  html body .s2-card-place {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 12px 0 0;
    padding: 12px 8px;
    border-radius: 14px;
    transition: background-color .25s ease, box-shadow .25s ease;
  }
  html body .s2-card-place .s2-card-hj { font-size: 15px; letter-spacing: .08em; }
  html body .s2-card-place .s2-card-v { font-size: 15px; }

  @media (min-width: 1024px) {
    html:not(:has(#result:not([hidden]))) body #formCard { margin-top: 104px !important; }
    html:not(:has(#result:not([hidden]))) body #formCard .danja:not([hidden]) {
      display: grid;
      grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
      column-gap: clamp(48px, 6vw, 88px);
      align-items: start;
      max-width: none;
    }
    html:not(:has(#result:not([hidden]))) body #formCard .s2-entry-intro {
      grid-column: 1;
      grid-row: 1 / span 5;
      position: sticky;
      top: calc(var(--s2-bar-h) + 40px);
    }
    /* v2.2 — 왼쪽 설명 · 카드가 창(막대 · 여백을 뺀 높이)보다 길면 붙이지 않는다(site2.js 가 실제 높이로 판정 · GPT A-04) */
    html:not(:has(#result:not([hidden]))) body #formCard .s2-entry-intro.s2-intro-static { position: static; }
    html:not(:has(#result:not([hidden]))) body #formCard .danja > :is(#birthForm, #err, .notice, .archive-lite-import) { grid-column: 2; }
    html:not(:has(#result:not([hidden]))) body #formCard .danja > #birthForm.form-grid { margin-top: 0 !important; }
    html:not(:has(#result:not([hidden]))) body #formCard .danja-title { font-size: 36px !important; line-height: 1.25 !important; }
    html:not(:has(#result:not([hidden]))) body #formCard .danja-lede { font-size: 17px !important; }
    html:not(:has(#result:not([hidden]))) body .s2-card {
      display: block;
      margin-top: 28px;
      padding: 22px 20px 16px;
      border-radius: 24px;
      background: linear-gradient(180deg, #17213a, #101829);
      box-shadow: inset 0 0 0 1px rgba(213, 182, 129, .2), 0 30px 60px -40px rgba(0, 0, 0, .8);
    }
  }

  /* ==========================================================================
     5. 입력 폼 속 — v1.1 규칙(둥근 묶음 목록 · 스위치 · 체크박스 · 성별 선택 · 출생지 검색 · 오류)
     ========================================================================== */
  html body #birthForm.form-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
    margin-top: 24px !important;
  }
  html body #birthForm > .field,
  html body #birthForm > .privacy-contract {
    position: relative;
    grid-column: 1 / -1 !important;
    margin: 0 !important;
    padding: 12px 16px 13px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--s-group) !important;
    box-shadow: none !important;
  }
  html body #birthForm > .field + .field::before {
    content: "";
    position: absolute;
    top: 0;
    left: 16px;
    right: 0;
    height: 1px;
    background: var(--s-sep);
  }
  html body #birthForm > .field:has(#date) { border-radius: var(--s-r-card) var(--s-r-card) 0 0 !important; }
  html body #birthForm > .field:has(#genderSeg) { border-radius: 0 0 var(--s-r-card) var(--s-r-card) !important; margin-bottom: 16px !important; }
  html body #birthForm > .place-field { border-radius: var(--s-r-card) !important; margin-bottom: 16px !important; }
  html body #birthForm > .place-field::before { display: none; }
  html body #birthForm > .privacy-contract { border-radius: var(--s-r-card) !important; margin-bottom: 24px !important; }
  html body #birthForm > .field > label:first-child {
    display: block;
    margin: 0 0 4px !important;
    font-family: var(--s-font) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    color: var(--s-label-2) !important;
  }
  html body #birthForm > .field > label:first-child span { color: var(--s-label-3) !important; font-weight: 500 !important; }
  html body #birthForm input[type="date"],
  html body #birthForm input#time,
  html body #birthForm input#placeSearch {
    width: 100%;
    min-height: 44px;
    margin: 0 !important;
    padding: 6px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--s-label) !important;
    font-family: var(--s-font) !important;
    font-size: 17px !important;
    font-weight: 500 !important;
    color-scheme: dark;
    outline: none;
  }
  html body #birthForm input::placeholder { color: var(--s-label-3) !important; opacity: 1; }
  html body #birthForm > .field:has(.birth-date-parts input:focus, .field-row > input#time:focus):not(:has([aria-invalid="true"])) {
    background: var(--s-group-hi) !important;
    box-shadow: inset 0 0 0 2px var(--s-focus) !important;
  }
  html body #birthForm input#placeSearch:focus:not([aria-invalid="true"]),
  html body #birthForm .coord-grid input:focus { box-shadow: inset 0 0 0 2px var(--s-focus) !important; }
  html body #birthForm details.adv select:focus-visible { outline: 2px solid var(--s-gold-hi) !important; outline-offset: 2px; }
  html body #birthForm > .field:not(.place-field):not(.birth-date-field):has(input[aria-invalid="true"]) { box-shadow: inset 0 0 0 2px var(--s-danger) !important; }
  /* v1.1 — 출생지는 묶음 전체 대신 검색칸만 붉게(감사 B-8 · A-02) */
  html body #birthForm input#placeSearch[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--s-danger) !important; }
  /* v1.1 — 오류 칸에 초점이 오면 붉은 테두리는 그대로 두고 금색 윤곽을 더한다(감사 S-03) */
  html body #birthForm input[aria-invalid="true"]:focus-visible { outline: 2px solid var(--s-gold-hi) !important; outline-offset: 2px !important; }
  html body #birthForm .field-error {
    margin: 6px 0 0 !important;
    font-family: var(--s-font) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    color: var(--s-danger-text) !important;
  }
  html body #birthForm .field-hint {
    margin: 2px 0 0 !important;
    font-family: var(--s-font) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: var(--s-label-3) !important;
  }
  html body #birthForm .field-row { display: flex !important; flex-wrap: nowrap !important; align-items: center !important; gap: 12px !important; }
  html body #birthForm .field-row > input#time { flex: 1 1 auto !important; width: auto !important; min-width: 0 !important; }
  html body #birthForm .birth-date-parts {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    margin: 8px 0;
  }
  html body #birthForm .birth-date-parts > div { min-width: 0; }
  html body #birthForm .birth-date-parts label {
    display: block;
    margin: 0 0 4px;
    color: var(--s-label-2);
    font-family: var(--s-font);
    font-size: 13px;
  }
  html body #birthForm .birth-date-parts input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    padding: 8px;
    border: 0;
    border-radius: 10px;
    background: var(--s-fill);
    color: var(--s-label);
    font-family: var(--s-font);
    font-size: 18px;
    text-align: center;
  }
  html body #birthForm .birth-date-parts input:focus-visible {
    outline: 2px solid var(--s-gold-hi);
    outline-offset: 2px;
  }
  html body #birthForm :is(input#time, input#placeSearch) { text-overflow: ellipsis; }
  /* v1.1 — 「시각 모름」을 켜 계산에 쓰지 않게 된 시각 값은 흐리게. 값은 지우지 않는다(감사 S-04) */
  html body #birthForm input#time:disabled { color: var(--s-label-3) !important; -webkit-text-fill-color: var(--s-label-3) !important; opacity: 1 !important; cursor: default; }

  html body #birthForm label.chk-pill,
  html body #birthForm label.local-save-choice {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 44px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    font-family: var(--s-font) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--s-label) !important;
    white-space: nowrap;
    cursor: pointer;
  }
  html body #birthForm input#timeUnknown {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    flex: none;
    width: 51px !important;
    height: 31px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: rgba(120, 120, 128, .36) !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background-color .2s ease;
  }
  html body #birthForm input#timeUnknown::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 27px;
    height: 27px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .25), 0 0 0 .5px rgba(0, 0, 0, .06);
    transition: transform .22s var(--s-ease);
  }
  html body #birthForm input#timeUnknown::after { content: none !important; display: none !important; }
  html body #birthForm input#timeUnknown:checked { background: var(--s-gold) !important; }
  html body #birthForm input#timeUnknown:checked::before { transform: translateX(20px); }
  html body #birthForm input#timeUnknown:focus-visible { outline: 2px solid var(--s-gold-hi); outline-offset: 2px; }
  /* v1.1 — 제출과 함께 보내는 선택(서고 저장 · 진태양시 보정)은 체크박스 모양. 누르는 즉시 시각 칸을 끄는 「시각 모름」만 스위치(감사 B-2) */
  html body #birthForm :is(input#saveOnDevice, input#tst) {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    display: block;
    flex: none;
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    box-shadow: inset 0 0 0 1.5px var(--s-label-3) !important;
    cursor: pointer;
    transition: background-color .2s var(--s-ease), box-shadow .2s var(--s-ease);
  }
  html body #birthForm :is(input#saveOnDevice, input#tst)::after { content: none !important; display: none !important; }
  html body #birthForm :is(input#saveOnDevice, input#tst):checked {
    background: var(--s-gold) var(--s-check) center / 14px 14px no-repeat !important;
    box-shadow: none !important;
  }
  html body #birthForm :is(input#saveOnDevice, input#tst):focus-visible { outline: 2px solid var(--s-gold-hi); outline-offset: 2px; }

  /* 성별 — 애플 분할 선택(미끄러지는 선택 표시는 site2.js) */
  html body #birthForm #genderSeg.seg {
    position: relative;
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    width: 100% !important;
    max-width: none !important;
    gap: 0 !important;
    margin-top: 6px !important;
    padding: 2px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: rgba(118, 118, 128, .24) !important;
    box-shadow: none !important;
  }
  html body #birthForm #genderSeg.seg > button {
    position: relative;
    z-index: 1;
    min-height: 44px;
    margin: 0 !important;
    padding: 0 8px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--s-label) !important;
    font-family: var(--s-font) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer;
  }
  html body #birthForm #genderSeg.seg > button::before,
  html body #birthForm #genderSeg.seg > button::after { display: none !important; }
  html body #birthForm #genderSeg.seg:not(.s-seg-live) > button[aria-pressed="true"] { background: rgba(214, 222, 238, .24) !important; box-shadow: inset 0 0 0 2px var(--s-label-3) !important; }
  /* v1.1 — 고른 칸은 글자를 굵게 · 선택 표시에 2px 테두리(감사 S-05) */
  html body #birthForm #genderSeg.seg > button[aria-pressed="true"] { font-weight: 700 !important; }
  html body #birthForm #genderSeg .s-seg-thumb {
    position: absolute;
    top: 2px;
    bottom: 2px;
    left: 0;
    z-index: 0;
    border-radius: 8px;
    background: #3b4a66;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .28), inset 0 0 0 2px var(--s-label-3);
    pointer-events: none;
    transition: transform .26s var(--s-ease), width .26s var(--s-ease), opacity .15s ease;
  }
  html body #birthForm #genderSeg.seg > button:focus-visible { outline: 2px solid var(--s-gold-hi); outline-offset: -2px; }

  /* 출생지 — 검색칸(돋보기) · 결과 목록 · 외부 검색 · 좌표 직접 입력 */
  html body #birthForm .place-search { position: relative; margin-top: 6px !important; }
  html body #birthForm input#placeSearch {
    padding: 8px 12px 8px 36px !important;
    border-radius: 10px !important;
    background: var(--s-fill) var(--s-search) 12px 50% / 16px 16px no-repeat !important;
  }
  html body #birthForm input#placeSearch::-webkit-search-cancel-button { filter: invert(.7); }
  html body #birthForm input#time {
    height: 44px;
    padding: 8px 12px !important;
    border-radius: 10px !important;
    background: var(--s-fill) !important;
  }
  /* v1.1 — 결과 목록은 겹침 대신 흐름 안에(감사 S-01 · S-02) */
  html body #birthForm .place-results {
    position: static !important;
    max-height: min(280px, 40dvh) !important;
    margin-top: 8px !important;
    padding: 4px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: var(--s-group-hi) !important;
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8), inset 0 0 0 .5px rgba(255, 255, 255, .08) !important;
  }
  html body #birthForm .place-results .place-option {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 2px 10px;
    width: 100%;
    min-height: 48px;
    margin: 0 !important;
    padding: 8px 12px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: var(--s-label) !important;
    text-align: left;
    font-family: var(--s-font) !important;
    cursor: pointer;
  }
  html body #birthForm .place-results .place-option > span { font-size: 16px !important; font-weight: 600 !important; color: var(--s-label) !important; }
  html body #birthForm .place-results .place-option > em { grid-column: 1; font-style: normal; font-size: 13px !important; color: var(--s-label-2) !important; }
  html body #birthForm .place-results .place-option > b { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 12px !important; font-weight: 500 !important; color: var(--s-label-3) !important; font-variant-numeric: tabular-nums; }
  html body #birthForm .place-results .place-option[aria-selected="true"],
  html body #birthForm .place-results .place-option:hover { background: var(--s-fill-2) !important; }
  html body #birthForm .place-results .place-empty { padding: 12px !important; font-size: 14px !important; color: var(--s-label-2) !important; }
  html body #birthForm .geo-actions {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-top: 10px !important;
  }
  html body #birthForm .geo-actions #externalGeocode {
    min-height: 44px;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--s-fill-2) !important;
    color: var(--s-label) !important;
    font-family: var(--s-font) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    cursor: pointer;
  }
  html body #birthForm .geo-actions .share-status { font-family: var(--s-font) !important; font-size: 13px !important; color: var(--s-label-3) !important; }
  html body #birthForm :is(#placeHint, #geoStatus) { font-size: 14px !important; color: var(--s-label-3) !important; line-height: 1.5 !important; }
  html body #birthForm .form-secondary-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
  html body #birthForm .form-secondary-actions #sampleReportBtn { width: 100%; min-height: 44px; }
  html body #birthForm .form-secondary-actions .archive-lite-import { margin: 0 !important; }
  html body #birthForm .form-secondary-actions .archive-lite-import button { min-height: 44px; }
  html body #birthForm details.coord-manual {
    margin-top: 10px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
  }
  html body #birthForm details.coord-manual > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 !important;
    border: 0 !important;
    border-top: 1px solid var(--s-sep) !important;
    background: none !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: var(--s-label) !important;
  }
  html body #birthForm details.coord-manual > summary::before { display: none !important; }
  html body #birthForm .coord-grid { display: grid !important; grid-template-columns: 1fr 1fr auto; gap: 10px !important; align-items: end; padding: 4px 0 6px !important; }
  html body #birthForm .coord-grid label { display: grid; gap: 4px; font-family: var(--s-font) !important; font-size: 13px !important; font-weight: 600 !important; color: var(--s-label-2) !important; }
  html body #birthForm .coord-grid input {
    min-height: 44px;
    padding: 6px 10px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--s-fill) !important;
    color: var(--s-label) !important;
    font-family: var(--s-font) !important;
    font-size: 16px !important;
    font-variant-numeric: tabular-nums;
    color-scheme: dark;
  }
  html body #birthForm .coord-grid #applyCoords {
    min-height: 44px;
    margin: 0 !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--s-fill-2) !important;
    box-shadow: none !important;
    color: var(--s-label) !important;
    font-family: var(--s-font) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    white-space: nowrap;
    cursor: pointer;
  }

  /* 저장 선택 — 체크박스 · 글 한 줄(체크박스는 글 왼쪽), 아래 설명과 펼침 */
  html body #birthForm label.local-save-choice {
    display: flex !important;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px !important;
    width: 100%;
    white-space: normal;
    font-size: 16px !important;
  }
  html body #birthForm .privacy-contract > p {
    margin: 2px 0 0 !important;
    font-family: var(--s-font) !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
    color: var(--s-label-3) !important;
  }
  html body #birthForm .privacy-contract details { margin-top: 8px !important; border-top: 1px solid var(--s-sep); }
  html body #birthForm .privacy-contract details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: var(--s-label) !important;
  }
  html body #birthForm .privacy-contract details > summary::before { display: none !important; }
  html body #birthForm .privacy-contract details ul { margin: 0 0 8px !important; padding-left: 18px !important; font-size: 13px !important; line-height: 1.6 !important; color: var(--s-label-2) !important; }

  /* 좁은 폰 — 389px 이하는 입력 글 16px(아이폰 사파리는 16px 미만 입력칸에 초점이 오면 화면을 확대한다) */
  @media (max-width: 389px) {
    html body #birthForm :is(input[type="date"], input#time, input#placeSearch) { font-size: 16px !important; }
    html body #birthForm input#placeSearch { padding-left: 34px !important; padding-right: 10px !important; background-position: 11px 50% !important; }
  }
  /* 374px 이하 — 「시각 모름」은 입력칸 아래 제 줄로, 출생지 칸은 돋보기를 빼 글자 자리를 넓힌다 */
  @media (max-width: 374px) {
    html body #birthForm .field-row { flex-wrap: wrap !important; row-gap: 2px !important; }
    html body #birthForm .field-row > input#time { flex: 1 1 100% !important; }
    html body #birthForm .field-row > label.chk-pill { width: 100%; flex-direction: row-reverse; justify-content: space-between; border-top: 1px solid var(--s-sep) !important; }
    html body #birthForm input#placeSearch { padding-left: 12px !important; background-image: none !important; }
  }
  /* v1.1 — 479px 이하: 좌표 직접 입력은 위도 · 경도 · 적용을 한 줄에 하나씩(감사 S-07) */
  @media (max-width: 479px) {
    html body #birthForm .coord-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 12px !important; }
    html body #birthForm .coord-grid #applyCoords { width: 100%; }
  }

  /* D2 — 모바일 첫 입력에서 출생 시점, 계산용 선택, 출생지, 보관 선택을 구분한다.
     결과 화면과 인쇄, 1024px 이상 배치는 기존 규칙을 그대로 사용한다. */
  @media screen and (max-width: 1023px) {
    html:not([data-s2-route="report"]):not(:has(#result:not([hidden]))) body #birthForm > .field {
      padding: 14px 16px 15px !important;
    }
    html:not([data-s2-route="report"]):not(:has(#result:not([hidden]))) body #birthForm > .field:has(#time) {
      border-radius: 0 0 var(--s-r-card) var(--s-r-card) !important;
      margin-bottom: 12px !important;
    }
    html:not([data-s2-route="report"]):not(:has(#result:not([hidden]))) body #birthForm > .field:has(#genderSeg) {
      border-radius: var(--s-r-card) !important;
      margin-bottom: 12px !important;
    }
    html:not([data-s2-route="report"]):not(:has(#result:not([hidden]))) body #birthForm > .field:has(#genderSeg)::before {
      display: none;
    }
    html:not([data-s2-route="report"]):not(:has(#result:not([hidden]))) body #birthForm > .place-field {
      margin-bottom: 12px !important;
    }
    html:not([data-s2-route="report"]):not(:has(#result:not([hidden]))) body #birthForm > .field > label:first-child {
      margin-bottom: 6px !important;
      font-size: 14px !important;
    }
    html:not([data-s2-route="report"]):not(:has(#result:not([hidden]))) body #birthForm .field-hint {
      margin-top: 4px !important;
      font-size: 14px !important;
      color: var(--s-label-2) !important;
    }
    html:not([data-s2-route="report"]):not(:has(#result:not([hidden]))) body #birthForm #geoStatus {
      color: var(--s-label-2) !important;
    }
    html:not([data-s2-route="report"]):not(:has(#result:not([hidden]))) body #birthForm .privacy-contract > p {
      margin-top: 6px !important;
      font-size: 14px !important;
      line-height: 1.6 !important;
      color: var(--s-label-2) !important;
    }
  }

  /* ==========================================================================
     6. 단추 · 고급 관법 설정 · 안내 · 서고 불러오기
     ========================================================================== */
  html body #birthForm #submitBtn.btn-primary {
    grid-column: 1 / -1 !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    min-height: 60px;
    margin: 0 !important;
    padding: 10px 20px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--s-gold) !important;
    box-shadow: none !important;
    color: var(--s-on-gold) !important;
    font-family: var(--s-font) !important;
    cursor: pointer;
    transition: background-color .16s ease, transform .16s var(--s-ease);
  }
  html body #birthForm #submitBtn.btn-primary::before,
  html body #birthForm #submitBtn.btn-primary::after { display: none !important; }
  html body #birthForm #submitBtn.btn-primary:hover { background: var(--s-gold-hi) !important; }
  html body #birthForm #submitBtn.btn-primary:active { transform: scale(.98); }
  html body #birthForm #submitBtn .btn-label { font-size: 17px !important; font-weight: 700 !important; letter-spacing: -0.01em !important; color: var(--s-on-gold) !important; }
  html body #birthForm #submitBtn .btn-sub { opacity: 1 !important; font-size: 13px !important; font-weight: 600 !important; letter-spacing: 0 !important; color: rgba(16, 24, 42, .78) !important; }
  html body #birthForm #sampleReportBtn {
    grid-column: 1 / -1 !important;
    width: 100%;
    min-height: 52px;
    margin: 12px 0 0 !important;
    padding: 0 20px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--s-fill) !important;
    box-shadow: none !important;
    color: var(--s-label) !important;
    font-family: var(--s-font) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    cursor: pointer;
    transition: background-color .16s ease;
  }
  html body #birthForm #sampleReportBtn:hover { background: var(--s-fill-2) !important; }

  html body #birthForm details.adv {
    grid-column: 1 / -1 !important;
    margin: 24px 0 20px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: var(--s-r-card) !important;
    background: var(--s-group) !important;
    box-shadow: none !important;
    overflow: hidden;
  }
  html body #birthForm details.adv > summary {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 0 16px !important;
    border: 0 !important;
    background: none !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--s-label) !important;
  }
  html body #birthForm details.adv > summary::before { display: none !important; }
  html body #birthForm details.adv > summary::after {
    content: "" !important;
    display: block !important;
    width: 8px;
    height: 14px;
    border: 0 !important;
    background: var(--s-chev) center / 8px 14px no-repeat !important;
    transform: none;
    transition: transform .2s var(--s-ease);
  }
  html body #birthForm details.adv[open] > summary::after { transform: rotate(90deg); }
  html body #birthForm details.adv .adv-body {
    display: grid !important;
    gap: 12px !important;
    padding: 4px 16px 16px !important;
    border: 0 !important;
    border-top: 1px solid var(--s-sep) !important;
    background: none !important;
  }
  html body #birthForm details.adv .adv-body > label.chk-pill {
    width: 100% !important;
    white-space: normal !important; /* 디자인 고침 12(검수 Z-15): 320 폭에서 이 한 줄이 줄바꿈 없이 밀어 옆으로 17px 넘쳤다 */
    line-height: 1.35 !important;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px !important;
    padding-top: 6px !important;
    font-size: 16px !important;
  }
  html body #birthForm details.adv .adv-body .field {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
  }
  html body #birthForm details.adv .adv-body .field > label,
  html body #birthForm details.adv .lens-grid > label {
    display: grid !important;
    gap: 6px;
    margin: 0 !important;
    font-family: var(--s-font) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--s-label-2) !important;
  }
  html body #birthForm details.adv select {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    min-height: 44px;
    margin: 0 !important;
    padding: 8px 36px 8px 12px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: var(--s-fill) var(--s-chev-down) right 14px center / 12px 8px no-repeat !important;
    box-shadow: none !important;
    color: var(--s-label) !important;
    font-family: var(--s-font) !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color-scheme: dark;
    cursor: pointer;
  }
  html body #birthForm details.adv .lens-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
  }
  html body #birthForm details.adv .lens-grid > p {
    grid-column: 1 / -1;
    margin: 0 !important;
    font-family: var(--s-font) !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
    color: var(--s-label-3) !important;
  }
  @media (max-width: 479px) {
    html body #birthForm details.adv .lens-grid { grid-template-columns: 1fr; }
  }
  html body #formCard .notice {
    display: flex !important;
    gap: 8px !important;
    margin: 20px 0 0 !important;
    padding: 0 4px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    font-family: var(--s-font) !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
    color: var(--s-label-3) !important;
  }
  html body #formCard .notice .n-ico { color: var(--s-label-3) !important; }
  html body #formCard #err {
    margin: 16px 0 0 !important;
    padding: 12px 16px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: rgba(255, 69, 58, .12) !important;
    color: var(--s-danger-text) !important;
    font-family: var(--s-font) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    text-align: left !important;
  }
  html body #formCard .archive-lite-import {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin: 16px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
  html body #formCard .archive-lite-import[hidden] { display: none !important; }
  html body #formCard .archive-lite-import button {
    min-height: 44px;
    margin: 0 !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--s-fill) !important;
    box-shadow: none !important;
    color: var(--s-label) !important;
    font-family: var(--s-font) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer;
  }

  /* ==========================================================================
     7. 바닥글 · 주문 상태 · 서고 · 접힌 폼
     ========================================================================== */
  html body .site-foot {
    margin-top: 72px !important;
    padding: 24px 0 40px !important;
    border-top: 1px solid var(--s-sep) !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: var(--s-label-3) !important;
    text-align: left;
  }
  @media (min-width: 1024px) {
    html:not(:has(#result:not([hidden]))) body .site-foot { text-align: left; }
  }
  /* 첫 화면 상태에서 본문이 넓어져도, 제품이 그리는 주문 상태 · 서고 판은 원래 폭으로 */
  html body :is(.s2-h2, .danja-title) { text-wrap: balance; }
  html body .s2-nowrap { white-space: nowrap; }
  html:not(:has(#result:not([hidden]))) body #backToTop { display: none !important; }
  /* width: 100% — 주문 경로에서 제품은 본문을 세로 flex 로 바꾼다. 거기서 좌우 auto 여백만 주면 판이 글 폭으로 줄어든다(검증 M2 에서 찾음) */
  html:not(:has(#result:not([hidden]))) body main.wrap > :is(#orderStatusPanel, #archiveScene) {
    box-sizing: border-box;
    width: 100%;
    max-width: 672px;
    margin-left: auto;
    margin-right: auto;
  }
  /* 주문 상태 — 제품 문구 · 동작 · 상태 표시(data-tone)는 그대로, 모양만 v2 카드로. 머리 점 색이 상태를 따른다
     (진행 중 = 금색 · 끝남 = 흰색 · 확인 필요 = 붉은색 · 알 수 없음 = 회색) */
  html body #orderStatusPanel { padding-top: 32px; font-family: var(--s-font); }
  html body #orderStatusPanel .order-status {
    padding: 22px 20px 20px;
    border-radius: 24px;
    background: linear-gradient(180deg, var(--s2-tile), var(--s2-tile-2));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
    color: var(--s-body);
  }
  html body #orderStatusPanel .order-status-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 600; color: var(--s-label-2); }
  html body #orderStatusPanel .order-status-eyebrow::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--s-label-3); }
  html body #orderStatusPanel .order-status[data-tone="progress"] .order-status-eyebrow::before { background: var(--s-gold); }
  html body #orderStatusPanel .order-status[data-tone="done"] .order-status-eyebrow::before { background: var(--s-label); }
  html body #orderStatusPanel .order-status[data-tone="attention"] .order-status-eyebrow::before { background: var(--s-danger-text); }
  html body #orderStatusPanel .order-status-title { margin: 8px 0 0; font-family: var(--s-font); font-size: 22px; font-weight: 700; line-height: 1.35; letter-spacing: -0.02em; color: var(--s-label); word-break: keep-all; }
  html body #orderStatusPanel .order-status-desc { margin: 8px 0 0; font-size: 15px; line-height: 1.6; color: var(--s-label-2); word-break: keep-all; }
  html body #orderStatusPanel .order-status-meta { display: grid; margin: 16px 0 0; border-radius: 16px; background: rgba(214, 222, 238, .05); overflow: hidden; }
  html body #orderStatusPanel .order-status-meta > div { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 12px; min-height: 48px; padding: 8px 14px; }
  html body #orderStatusPanel .order-status-meta > div + div { box-shadow: inset 0 1px 0 var(--s-sep); }
  html body #orderStatusPanel .order-status-meta dt { font-size: 13px; font-weight: 600; color: var(--s-label-2); }
  html body #orderStatusPanel .order-status-meta dd { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin: 0; color: var(--s-label); font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
  html body #orderStatusPanel .order-status-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
  html body #orderStatusPanel :is(.order-status-actions > button, .order-status-actions > a, #orderStatusCopy) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--s-fill-2);
    box-shadow: none;
    color: var(--s-label);
    font: 600 15px/1 var(--s-font);
    text-decoration: none;
    cursor: pointer;
  }
  html body #orderStatusPanel #orderStatusCopy { padding: 0 14px; font-size: 13px; }
  html body #orderStatusPanel a#orderStatusOpen { background: var(--s-gold); color: var(--s-on-gold); font-weight: 700; }
  html body #orderStatusPanel .order-status-note { margin: 14px 0 0; font-size: 13px; line-height: 1.55; color: var(--s-label-3); }

  /* 결과가 나온 뒤 폼이 접힌 줄 */
  html body #formCard #formSummaryBar:not([hidden]) {
    max-width: 672px;
    margin: 0 auto;
    padding: 8px 8px 8px 18px;
    border: 0;
    border-radius: 18px;
    background: var(--s-group);
    font-family: var(--s-font);
  }
  html body #formCard #formSummaryBar .sum { color: var(--s-label-2); font-size: 14px; }
  html body #formCard #formSummaryBar .sum b { color: var(--s-label); }
  html body #formCard #formSummaryBar button {
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--s-fill-2);
    color: var(--s-label);
    font: 600 14px/1 var(--s-font);
  }

  /* ==========================================================================
     8. 초점
     ========================================================================== */
  html body :is(.s2-bar, .s2-top) :is(a, button):focus-visible,
  html body #formCard :is(button, summary, a):focus-visible { outline: 2px solid var(--s-gold-hi) !important; outline-offset: 2px; }
  html body .s2-bar-cta:focus-visible { outline-offset: -3px !important; border-radius: 999px; }
  html body #birthForm details > summary:focus-visible { outline-offset: -2px; border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html body #birthForm :is(input, button, summary)::before,
  html body #birthForm :is(input, button, summary),
  html body #birthForm details > summary::after,
  html body #birthForm #genderSeg .s-seg-thumb,
  html body .s2-bar::before,
  html body :is(.s2-btn, .s2-chip, .s2-bar-link, .s2-bar-cta::before),
  html body .s2-card :is(li, .s2-card-place, .s2-card-hj) { transition: none !important; }
  html body :is(#birthForm #submitBtn.btn-primary, .s2-btn):active { transform: none; }
}

/* 고대비(강제 색상) 모드 — 바탕 · 그림자로 그린 경계는 이 모드에서 사라진다. 시스템 색 테두리로 되살린다(v1.1 S-06 과 같은 원칙) */
@media (forced-colors: active) {
  html body .s2-bar { background: Canvas; border-bottom: 1px solid CanvasText; }
  html body .s2-hero::before { display: none; }   /* 뒤를 흐린 사진은 이 모드에서 그늘 없이 끊겨 보인다 — 뺀다(사진 창은 그대로) */
  html body #orderStatusPanel .order-status { border: 1px solid CanvasText; }
  html body #orderStatusPanel :is(.order-status-actions > button, .order-status-actions > a, #orderStatusCopy) { border: 1px solid ButtonText; }
  html body .s2-bar-cta::before { border: 1px solid ButtonText; }
  html body :is(.s2-btn, .s2-chip, #returningResume .returning-resume-button, #returningResume > p button, #formCard #formSummaryBar button) { border: 1px solid ButtonText; }
  html body :is(.s2-tile, #returningResume > p, #formCard #formSummaryBar:not([hidden])) { border: 1px solid CanvasText; }
  html body .s2-tile-text + .s2-tile-text::before { display: none; }
  /* v2.2 — 「불러오는 중…」 겹쳐 그리기는 이 모드에서 원래 글자와 겹친다(글자색이 시스템 색으로 돌아온다) — 끄고 원래 이름을 보인다. 읽기에는 #s2Status 가 알린다 */
  html body [data-s2-sample][aria-busy="true"]::after,
  html body #birthForm #sampleReportBtn:disabled::after { content: none !important; display: none !important; }
  html body .s2-card .is-filled { outline: 2px solid CanvasText; outline-offset: -2px; }
  html body #birthForm input#timeUnknown { -webkit-appearance: auto !important; appearance: auto !important; width: 24px !important; height: 24px !important; }
  html body #birthForm input#timeUnknown::before { content: none !important; display: none !important; }
  html body #birthForm :is(input#saveOnDevice, input#tst) { -webkit-appearance: auto !important; appearance: auto !important; width: 24px !important; height: 24px !important; }
  html body #birthForm #genderSeg .s-seg-thumb { display: none !important; }
  html body #birthForm #genderSeg.seg > button { border: 1px solid ButtonText !important; }
  html body #birthForm #genderSeg.seg > button[aria-pressed="true"] { outline: 2px solid CanvasText !important; outline-offset: -4px !important; }
  html body #birthForm :is(input, select, button, summary):focus-visible,
  html body #birthForm #genderSeg.seg > button[aria-pressed="true"]:focus-visible { outline: 2px solid Highlight !important; outline-offset: 2px !important; }
  html body #birthForm > .field,
  html body #birthForm > .privacy-contract,
  html body #birthForm details.adv { border: 1px solid CanvasText !important; }
  html body #birthForm > .field + .field { margin-top: -1px !important; }
  html body #birthForm > .field + .field::before { display: none !important; }
  html body #birthForm :is(input[type="date"], input#time) { border: 1px solid CanvasText !important; padding-inline: 8px !important; }
  html body #birthForm :is(input#placeSearch, .coord-grid input, details.adv select, .place-results) { border: 1px solid CanvasText !important; }
  html body #birthForm .geo-actions #externalGeocode,
  html body #birthForm .coord-grid #applyCoords,
  html body #birthForm #submitBtn.btn-primary,
  html body #birthForm #sampleReportBtn,
  html body #formCard .archive-lite-import button { border: 1px solid ButtonText !important; }
  html body #birthForm .place-results .place-option:is(.is-active, :hover) { outline: 2px solid Highlight !important; outline-offset: -2px !important; }
}

/* 인쇄 — 폼은 제품의 인쇄 규칙 그대로. 이 판이 더한 막대 · 사진 첫 화면 · 두 지도 그림은 종이에 싣지 않는다
   (유료 리포트 인쇄는 제품 규칙이 본문 밖을 모두 가린다) */
@media print {
  html body :is(.s2-bar, .s2-hero, .s2-maps, .s2-card) { display: none !important; }
  html body #birthForm #genderSeg .s-seg-thumb { display: none !important; }
}

/* G01/G02/G03/G05/G06 — glass only on floating controls, never reading/input surfaces. */
html body .s2-bar::before { display: none; }
html body .s2-bar-in {
  isolation: isolate;
  max-width: 1120px;
  width: calc(100% - 24px);
  padding-inline: 12px;
}
html body .s2-bar-in::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border: 1px solid var(--glass-edge);
  border-radius: 26px;
  background: var(--glass-sheen), var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-filter);
  backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-specular), var(--glass-shadow);
  transition: opacity .24s var(--glass-ease), transform .24s var(--glass-ease);
}
html body .s2-bar.is-top .s2-bar-in::before { opacity: 0; transform: translateY(-2px) scale(.995); }
html body .s2-bar-link { color: #d3d9e4; }
html body .s2-btn-glass {
  border: 1px solid var(--glass-edge);
  background: var(--glass-sheen), var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-filter);
  backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-specular), var(--glass-shadow);
}
html body .s2-btn-glass:hover { background: var(--glass-sheen), var(--glass-bg); border-color: rgba(235, 241, 255, .4); }
html body #result .s2-glass-reader-toolbar {
  top: 8px;
  margin-inline: 0;
  padding: 7px 10px;
  border: 1px solid var(--glass-edge);
  border-radius: 18px;
  background: var(--glass-sheen), var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-filter);
  backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-specular), var(--glass-shadow);
}
html body #result .s2-glass-reader-toolbar > button {
  min-height: 44px;
  min-width: 44px;
  font-size: 13px;
  color: var(--s-gold, #d5b681);
}
html body #result .s2-glass-reader-toolbar > p > strong { color: #f3f5fa; font-size: 13px; }
html body #result .s2-glass-reader-toolbar > p > span { color: #d5b681; font-size: 12px; }
html body #result .s2-glass-reader-toolbar > span { color: #d3d9e4; font-size: 12px; }
html body #result .s2-glass-reader-toolbar::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, #d5b681 0 var(--s2-read-progress, 0%), transparent var(--s2-read-progress, 0%) 100%);
}
html.s2-glass-reading body #readProgress { visibility: hidden; }
html body .s2-hero-img { transform: translateY(var(--s2-photo-offset, 0px)); }
@media (prefers-reduced-motion: reduce) {
  html body .s2-bar-in::before { transition: none; transform: none !important; }
  html body .s2-hero-img { transform: none; }
}
@media (forced-colors: active) {
  html body :is(.s2-btn-glass, #result .s2-glass-reader-toolbar) { background: Canvas; color: CanvasText; border-color: CanvasText; }
  html body #result .s2-glass-reader-toolbar :is(button, span, strong) { color: CanvasText; }
  html body #result .s2-glass-reader-toolbar::after { background: linear-gradient(90deg, Highlight 0 var(--s2-read-progress, 0%), transparent var(--s2-read-progress, 0%) 100%); }
}
@media print {
  html body #result .s2-glass-reader-toolbar { display: none !important; }
  html body #readProgress { display: none !important; }
}

/* Approved B: display copy/layout only; calculation, storage and primary CTA stay intact. */
html body .s2-sr-only,
html body #birthForm .birth-date-parts label {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0); white-space: nowrap !important; border: 0 !important;
}
html body #birthForm > .privacy-contract {
  display: grid !important; grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 8px; padding: 12px 16px !important;
}
html body #birthForm .privacy-contract label.local-save-choice {
  grid-column: 1 / -1; min-height: 44px; margin: 0 !important;
  padding: 0 !important; gap: 8px !important; font-size: 14px !important; line-height: 1.5 !important;
}
html body #birthForm .privacy-contract > p {
  grid-column: 1; align-self: center; margin: 0 !important; font-size: 13px !important; line-height: 1.5 !important;
}
html body #birthForm .privacy-contract > details {
  grid-column: 2; margin: 0 !important; border: 0 !important;
}
html body #birthForm .privacy-contract > details[open] { grid-column: 1 / -1; }
html body #birthForm .privacy-contract > details > summary {
  min-width: 44px; min-height: 44px; padding: 0 8px !important; font-size: 13px !important;
}
html body #birthForm .privacy-contract > details > summary::after { display: none !important; }
html body #birthForm .form-secondary-actions {
  flex-direction: row !important; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0 8px !important; margin-top: 12px;
}
html body #birthForm .form-secondary-actions .archive-lite-import { display: contents; }
html body #birthForm .form-secondary-actions :is(#sampleReportBtn, #archiveLiteImportBtn) {
  width: auto !important; min-width: 44px; min-height: 44px;
  margin: 0 !important; padding: 6px 12px !important; border: 0 !important; border-radius: 8px !important;
  background: transparent !important; box-shadow: none !important;
  color: var(--s-label-2) !important; font-size: 14px !important; font-weight: 600 !important;
}
html body #birthForm .form-secondary-actions :is(#sampleReportBtn, #archiveLiteImportBtn):hover { background: var(--s-fill) !important; }
html body .s2-action-separator { color: var(--s-label-3); }
html body #formCard .notice { display: block !important; text-align: center; }
html body .s2-bar { top: calc(8px + env(safe-area-inset-top, 0px)); }
html body .s2-bar::before {
  display: block; position: fixed; inset: 0 0 auto 0;
  height: calc(8px + env(safe-area-inset-top, 0px));
  background: var(--glass-bg); box-shadow: none;
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  pointer-events: none;
}
html:has(#result:not([hidden])) body .s2-bar::before { display: none; }
@media (min-width: 900px) {
}
@media (max-width: 359px) {
  html body #birthForm .form-secondary-actions { flex-direction: column !important; }
  html body .s2-action-separator { display: none; }
}
@media (prefers-reduced-motion: reduce) { html body .s2-bar::before { transition: none; } }
