/* 하위 페이지 새 겉모양 — 2026-10-31 대표님 「서브페이지도 리뉴얼」. 첫 화면(site/_src/home.html)과 같은 결:
   옅은 하늘색→복숭아 바탕 · 떠 있는 유리 머리 막대 · 흰 유리 카드 · 알약 단추 · Pretendard.
   글·순서·움직임(motion.js)은 그대로 두고 겉모양만 덮는다. 짙은 단락(.kw-dark·이야기)은 그대로 어둡다 */
:root {
  --bg: #F5F2EE;
  --surface: rgba(255, 255, 255, .78);
  --line: #E9DFD4;
  --radius: 28px;
  --green-dark: #4E7F22;
}
body {
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  background: linear-gradient(180deg, #E6F0F8 0%, #F5F2EE 30%, #F9EEE3 100%) fixed;
}

/* 머리 막대 — 흰 유리, 아래 선 대신 옅은 그림자 */
header.top {
  background: rgba(255, 255, 255, .72);
  border-bottom: 1px solid rgba(255, 255, 255, .95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(33, 56, 74, .05);
}
.tabs { border-top-color: rgba(33, 56, 74, .06); }
.tabs a[aria-current="page"] { color: var(--navy); }

/* 카드 — 흰 유리 + 가는 흰 테두리, 떠오를 때 살짝 */
.card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(33, 56, 74, .05);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(33, 56, 74, .09); }

/* 단추 — 알약, 주 단추는 남색(첫 화면과 같이) */
.btn, a.btn, button.btn { border-radius: 999px; }
.btn-primary { background: #21384A; }
.btn-primary:hover { background: #2E4A61; }
.btn-ghost { background: rgba(255, 255, 255, .78); border-color: rgba(255, 255, 255, .95); }

/* 제목 — 조금 더 크고 단단하게 */
section h2 { letter-spacing: -.02em; }

/* 자주 묻는 질문·고지 — 흰 유리 판 */
.qa { background: var(--surface); border-radius: 20px; border: 1px solid rgba(255, 255, 255, .95); }
.notice { background: rgba(255, 255, 255, .7); border-radius: 20px; }

/* 바닥 — 바탕을 그대로 비치게 */
footer.bottom { background: transparent; border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; }
}

/* ── 머리 — 첫 화면처럼 둥글게 떠 있는 유리 막대 한 덩어리(10-31 「서브페이지들은 수정이 안 되었는데?」) ── */
header.top {
  position: sticky; top: 12px; z-index: 30;
  max-width: 1180px; margin: 12px auto 0; width: calc(100% - 32px);
  border-radius: 28px; border: 1px solid rgba(255, 255, 255, .95);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 14px 34px rgba(33, 56, 74, .08);
  /* overflow·backdrop-filter 를 쓰지 않는다 — ☰ 서랍(position: fixed)이 머리 안에 있어 잘린다 */
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
header.top .bar { border-radius: 28px 28px 0 0; }
header.top > nav:last-of-type, header.top .subtabs { border-radius: 0 0 28px 28px; }
header.top .bar .wrap { min-height: 60px; }
header.top .brand img { height: 30px; }
header.top .login-btn { border-radius: 999px; background: #21384A; }
header.top .login-btn:hover { background: #2E4A61; }
.tabs { border-top: 1px solid rgba(33, 56, 74, .06); }
.tabs a { position: relative; }
.tabs a[aria-current="page"] { color: #21384A; }
.subtabs { background: rgba(245, 239, 231, .55); border-top: 1px solid rgba(33, 56, 74, .05); }
.subtabs a[aria-current="page"] { background: #21384A; color: #fff; }

/* ── 배경에서 천천히 떠다니는 빛(첫 화면과 같음) ── */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%;
  filter: blur(70px); opacity: .45; animation: t2drift 30s ease-in-out infinite alternate;
}
body::before { width: 520px; height: 520px; background: #CFE6F7; left: -140px; top: -60px; }
body::after { width: 480px; height: 480px; background: #FFDCD3; right: -160px; top: 40%; animation-duration: 36s; }
@keyframes t2drift { to { transform: translate(80px, 60px) scale(1.1); } }

/* ── 첫 단락(쪽 머리) — 큰 제목, 줄 단위로 올라온다 ── */
main > section:first-child h1, .hero h1 {
  font-size: clamp(32px, 4.6vw, 52px); line-height: 1.22; letter-spacing: -.03em;
  animation: t2up .9s cubic-bezier(.2, .7, .2, 1) both;
}
main > section:first-child .lead, .hero p.lead { animation: t2up .9s .15s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes t2up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ── 단락 사이 여백 넉넉히, 제목 크게 ── */
section { padding: 56px 0; }
section h2 { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.28; }
.cards { gap: 18px; }
.card { padding: 28px; }
.table-wrap { border-radius: 24px; overflow: hidden; background: rgba(255, 255, 255, .78); }

@media (max-width: 760px) {
  header.top { width: calc(100% - 24px); margin-top: 8px; top: 8px; border-radius: 24px; }
  section { padding: 40px 0; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after, main > section:first-child h1, .hero h1, main > section:first-child .lead, .hero p.lead { animation: none; }
}

/* ── ChatGPT 그림(하위 페이지 맨 위) — 둥근 액자, 천천히 떠 있음 ── */
.t2-side, .t2-center, .t2-hero .t2-art, .how-photo img {
  border-radius: 28px; border: 6px solid #fff; box-shadow: 0 24px 50px rgba(33, 56, 74, .12);
  width: 100%; height: auto; animation: t2float 7s ease-in-out infinite;
}
.t2-center { display: block; max-width: 560px; margin: 28px auto 0; }
@keyframes t2float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
/* 기능 첫 화면 — 사진 바탕이던 자리를 글 + 그림 두 칸으로 */
.t2-hero { display: block; min-height: 0; padding: 48px 0 24px; background: none; }
.t2-hero .wrap { position: relative; }
.t2-hero .t2-art { max-width: 520px; margin: 24px auto 0; display: block; }
.t2-hero::after { display: none; }
@media (min-width: 900px) {
  .t2-hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; max-width: 1180px; margin: 0 auto; padding-inline: 24px; gap: 32px; }
  .t2-hero .t2-art { order: 2; margin: 0; }
  .t2-hero .wrap { order: 1; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { .t2-side, .t2-center, .t2-hero .t2-art, .how-photo img { animation: none; } }
.t2-pic { width: 100%; height: auto; border-radius: 24px; display: block; }
/* 작동 방식 쪽 큰 사진 띠 → 그림 띠: 그림이 작아 화면 폭으로 늘리면 흐려진다 — 가운데 둥근 액자로 */
.how-photo-band { max-width: 900px; margin: 24px auto; padding-inline: 24px; height: auto !important; }
.how-photo-band img, .how-photo-band .t2-pic { position: static; width: 100%; height: auto; object-fit: contain; border-radius: 28px;
  border: 6px solid #fff; box-shadow: 0 24px 50px rgba(33, 56, 74, .12); }

/* ── 모션그래픽(theme2.js) ── */
.t2-progress { position: fixed; left: 0; top: 0; z-index: 60; width: 100%; height: 3px; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, #A9D36B, #8EC5EB, #FF8A7A); pointer-events: none; }
/* 묶음 — 들어오면 하나씩 톡 커지며 자리 잡는다(떠오르기는 motion.js 가 하므로 크기만) */
.t2-group.t2-in > * { animation: t2pop .55s cubic-bezier(.2, .8, .2, 1) both; }
.t2-group.t2-in > *:nth-child(2) { animation-delay: .08s; } .t2-group.t2-in > *:nth-child(3) { animation-delay: .16s; }
.t2-group.t2-in > *:nth-child(4) { animation-delay: .24s; } .t2-group.t2-in > *:nth-child(5) { animation-delay: .32s; }
.t2-group.t2-in > *:nth-child(6) { animation-delay: .4s; }
@keyframes t2pop { from { transform: scale(.95); } to { transform: none; } }
/* 단계 묶음 위로 흐르는 선이 그려진다 — 워치 → 휴대폰 → 가족처럼 순서가 있는 곳 */
.how-flow.t2-group, .steps.t2-group, .ph-seq.t2-group { position: relative; }
.how-flow.t2-group::before, .steps.t2-group::before, .ph-seq.t2-group::before {
  content: ""; position: absolute; left: 4%; right: 4%; top: -14px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, #A9D36B, #8EC5EB, #FF8A7A); transform: scaleX(0); transform-origin: left;
  transition: transform 1.4s cubic-bezier(.2, .7, .2, 1) .15s; }
.how-flow.t2-in::before, .steps.t2-in::before, .ph-seq.t2-in::before { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .t2-progress { display: none; } }

/* ── 머리 막대 줄이기(10-31 대표님 「너무 커요」) — PC 는 한 줄(로고 · 큰 메뉴 · 로그인) + 얇은 작은 메뉴 줄.
   ☰ 는 휴대폰 폭에서만. 휴대폰은 지금 구조(☰ · 로고 · 로그인 / 가로로 미는 메뉴) 그대로 */
@media (min-width: 900px) {
  header.top { display: grid; grid-template-columns: auto 1fr; align-items: center; position: sticky; }
  header.top .bar { grid-column: 1; border-radius: 28px 0 0 0; }
  header.top .bar .wrap { min-height: 56px; max-width: none; padding: 0 8px 0 24px; }
  header.top .menu-btn { display: none; }
  header.top .login-btn { position: absolute; right: 14px; top: 10px; min-height: 36px; padding: 0 18px; font-size: 14px; }
  header.top .tabs { grid-column: 2; border-top: 0; }
  header.top .tabs .wrap { max-width: none; padding: 0 110px 0 12px; min-height: 56px; gap: 4px; }
  header.top .tabs a { padding: 8px 12px; font-size: 15px; }
  header.top .subtabs { grid-column: 1 / -1; }
  header.top .subtabs .wrap { max-width: none; padding: 6px 20px; min-height: 0; gap: 6px; }
  header.top .subtabs a { padding: 5px 14px; font-size: 14px; }
}
@media (max-width: 899px) {
  header.top .bar .wrap { min-height: 52px; }
  header.top .tabs a { font-size: 14.5px; }
  header.top .subtabs a { padding: 5px 12px; font-size: 13.5px; }
}
@media (max-width: 899px) {
  .t2-hero .t2-art { width: calc(100% - 32px); margin: 24px 16px 0; }
}

/* 휴대폰 — 내리면 메뉴 줄을 접는다(theme2.js 가 html.hdr-min). 「동작 줄이기」여도 접기는 한다(공간 문제) */
@media (max-width: 899px) {
  header.top .tabs, header.top .subtabs { max-height: 60px; overflow: hidden; transition: max-height .3s ease, opacity .25s ease; }
  html.hdr-min header.top .tabs, html.hdr-min header.top .subtabs { max-height: 0; opacity: 0; border-top-width: 0; }
  html.hdr-min header.top .bar { border-radius: 24px; }
}

/* 휴대폰 머리 막대를 첫 화면과 똑같이(10-31 대표님 「아직도 이렇게 나오는데?」) —
   로고 왼쪽 · 로그인 · ☰ 오른쪽 한 줄. 큰 메뉴 줄은 ☰ 서랍에 이미 있으므로 숨기고,
   그 묶음 안에서 옮겨 다니는 작은 메뉴 줄(주요 기능·작동 방식…)만 남긴다 */
@media (max-width: 899px) {
  header.top .bar .wrap { display: flex; align-items: center; gap: 10px; }
  header.top .bar .brand { order: 1; margin-right: auto; }
  header.top .bar .login-btn { order: 2; }
  header.top .bar .menu-btn { order: 3; }
  header.top .tabs { display: none; }
  header.top:not(:has(.subtabs)) .bar { border-radius: 24px; }
}
