/* 예비 아빠 테스트 — 랜딩과 같은 결(흰 바탕 · 린넨 띠 · 세리프 제목). 라이트 한 가지로 고정하고 바탕색을 직접 칠한다. */
:root {
  --paper: #FFFFFF;
  --linen: #F4EFEA;
  --oat: #E5DFC9;
  --ink: #2B2B2B;
  --ink-soft: #5B5048;   /* 작은 글자용 갈색 — 흰 바탕 대비 7.9:1 (기존 #8C7A6B는 4.11:1이라 장식에만) */
  --earth: #8C7A6B;
  --ok-bg: #E9EFE4; --ok-ink: #2F4A2C; --ok-line: #A9BC9C;
  --no-bg: #F7EAE5; --no-ink: #7E2E1D; --no-line: #D9A898;
  --focus: #2B2B2B;
  --serif: 'Noto Serif KR', 'Apple SD Gothic Neo', serif;
  --sans: 'Noto Sans KR', 'Apple SD Gothic Neo', sans-serif;
}
html[lang="ja"] { --serif: 'Shippori Mincho', 'Hiragino Mincho ProN', serif; --sans: 'Noto Sans JP', 'Hiragino Sans', sans-serif; }
html[lang="en"] { --serif: 'Noto Serif', Georgia, serif; --sans: 'Noto Sans', -apple-system, 'Segoe UI', sans-serif; }

* { box-sizing: border-box; }
body.pt { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); letter-spacing: 0.02em; line-height: 1.75; -webkit-text-size-adjust: 100%; }
html[lang="en"] body.pt { letter-spacing: 0; }
html[lang="ko"] body.pt { word-break: keep-all; overflow-wrap: break-word; } /* 한국어는 단어 중간에서 줄이 끊기지 않게 */
/* 일본어는 띄어쓰기가 없어 낱말 중간에서 끊긴다 — 지원하는 브라우저(Chrome 119+)는 구 단위로 줄을 바꾼다 */
html[lang="ja"] :is(.pt-h1, .pt-sub, .pt-q, .pt-type, .pt-line, .pt-body, .pt-fb-fact, .pt-src, .pt-sbtn, .pt-share h2, .pt-review summary) { word-break: auto-phrase; }
/* 마지막 줄에 글자 한두 개만 남지 않게(지원 브라우저만) */
.pt :is(.pt-body, .pt-line, .pt-fb-exp, .pt-intro p) { text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* 우선순위 0 — 클래스가 붙은 링크 버튼(.pt-btn 등)의 글자색을 덮지 않게 (점검 10-22: 검은 버튼 위 갈색 글자 1.8:1) */
:where(.pt) a { color: var(--ink-soft); }
.pt [hidden] { display: none !important; }
/* width/height 속성이 있어도 CSS 폭에 맞춰 비율 유지(랜딩 main.css와 같은 규칙). 그림이 늦게 와도 자리가 고정된다 */
.pt img[width][height] { height: auto; }
.pt-art { aspect-ratio: 1 / 1; object-fit: cover; }
.pt :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.pt-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 600px; margin: 0 auto; padding: 18px 20px 6px; font-size: 13px; }
.pt-brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 15px; }
.pt-brand img { width: 26px; height: 26px; border-radius: 7px; }
.pt-lang { display: flex; gap: 4px; }
.pt-lang a { padding: 6px 8px; border-radius: 6px; text-decoration: none; color: var(--ink-soft); white-space: nowrap; }
.pt-brand span { white-space: nowrap; }
.pt-lang a[aria-current="page"] { background: var(--linen); color: var(--ink); }

.pt-main { max-width: 600px; margin: 0 auto; padding: 8px 20px 56px; }
.pt-screen { animation: ptIn .45s cubic-bezier(.16,1,.3,1); }
/* 투명도는 건드리지 않는다 — 애니메이션이 멈추거나 늦어도(백그라운드 탭·인앱 브라우저) 글은 처음부터 보인다 */
@keyframes ptIn { from { transform: translateY(8px); } to { transform: none; } }

/* 시작 */
.pt-hero { text-align: center; padding-top: 10px; }
.pt-hero .pt-art { width: 220px; max-width: 62%; margin: 0 auto 8px; display: block; border-radius: 50%; background: var(--linen); }
.pt-kicker { display: inline-block; font-size: 12px; letter-spacing: .12em; color: var(--ink-soft); background: var(--linen); padding: 4px 12px; border-radius: 999px; }
html[lang="en"] .pt-kicker { letter-spacing: .06em; text-transform: uppercase; }
.pt-h1 { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.35; margin: 14px 0 6px; text-wrap: balance; }
.pt-sub { font-size: 15px; color: var(--ink-soft); margin: 0 0 18px; text-wrap: balance; }
.pt-intro { font-size: 15px; margin: 0 auto 22px; max-width: 30em; }
.pt-intro p { margin: 0 0 6px; }
.pt-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; font-size: 13px; color: var(--ink-soft); }
.pt-chips li { border: 1px solid var(--oat); border-radius: 999px; padding: 4px 12px; }

.pt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 28px; border-radius: 10px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-size: 16px; font-weight: 500; cursor: pointer; text-decoration: none; transition: transform .15s ease, background .2s ease; }
.pt-btn:hover { background: #000; }
.pt-btn:active { transform: translateY(1px); }
.pt-btn.ghost { background: transparent; color: var(--ink); border-color: var(--oat); }
.pt-btn.ghost:hover { border-color: var(--ink); background: transparent; }
.pt-btn.wide { width: 100%; }
.pt-small { font-size: 12.5px; color: var(--ink-soft); line-height: 1.7; }

/* 문항 */
.pt-progress { display: flex; align-items: center; gap: 12px; margin: 6px 0 16px; font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.pt-bar { flex: 1; height: 6px; background: var(--linen); border-radius: 999px; overflow: hidden; }
.pt-bar > span { display: block; height: 100%; width: 0; background: var(--earth); border-radius: 999px; transition: width .4s cubic-bezier(.16,1,.3,1); }
.pt-qimg { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--linen); }
.pt-q { font-family: var(--serif); font-weight: 400; font-size: 23px; line-height: 1.55; margin: 20px 0 18px; text-wrap: balance; }
.pt-q-label { display: block; font-family: var(--sans); font-size: 12px; letter-spacing: .1em; color: var(--ink-soft); margin-bottom: 4px; }
.pt-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pt-choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 84px; border: 1.5px solid var(--oat); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .15s ease; }
.pt-choice .g { font-size: 28px; line-height: 1; font-family: var(--serif); }
.pt-choice:hover:not([disabled]) { border-color: var(--ink); }
.pt-choice:active:not([disabled]) { transform: translateY(1px); }
.pt-choice[disabled] { cursor: default; }
.pt-choice.is-right { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok-ink); }
.pt-choice.is-wrong { border-color: var(--no-line); background: var(--no-bg); color: var(--no-ink); }
.pt-choice.is-dim { opacity: .45; }
.pt-choice .badge { font-size: 12px; font-weight: 600; letter-spacing: .02em; margin-top: 4px; }

.pt-fb { margin-top: 16px; border-radius: 12px; padding: 18px 18px 16px; background: var(--linen); }
.pt-fb.ok { background: var(--ok-bg); }
.pt-fb.no { background: var(--no-bg); }
.pt-fb-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 8px; }
.pt-fb-verdict { font-weight: 600; font-size: 16px; }
.pt-fb.ok .pt-fb-verdict { color: var(--ok-ink); }
.pt-fb.no .pt-fb-verdict { color: var(--no-ink); }
.pt-fb-answer { font-size: 13.5px; color: var(--ink-soft); }
.pt-fb-fact { font-family: var(--serif); font-size: 18px; line-height: 1.55; margin: 0 0 6px; }
.pt-fb-exp { font-size: 15px; margin: 0 0 10px; }
.pt-src { font-size: 12.5px; color: var(--ink-soft); }
.pt-src a { text-decoration: underline; text-underline-offset: 3px; }
.pt-next { margin-top: 16px; }

/* 결과 */
.pt-res { text-align: center; }
.pt-score { font-family: var(--serif); font-size: 64px; line-height: 1; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.pt-score small { font-size: 26px; color: var(--ink-soft); }
.pt-res .pt-art { width: 260px; max-width: 72%; display: block; margin: 14px auto 8px; border-radius: 18px; background: var(--linen); }
.pt-type { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.4; margin: 6px 0 4px; text-wrap: balance; }
.pt-line { font-size: 15.5px; margin: 0 0 6px; }
.pt-body { font-size: 14.5px; color: var(--ink-soft); margin: 0 auto 22px; max-width: 30em; }

.pt-share { background: var(--linen); border-radius: 14px; padding: 18px 16px 16px; margin: 0 0 18px; }
.pt-share h2 { font-size: 14px; font-weight: 500; margin: 0 0 12px; text-wrap: balance; }
.pt-share-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 8px; }
/* 버튼이 5~6개면 3칸씩 — 4+1처럼 한 개만 아래로 떨어지지 않게 */
@media (max-width: 520px) { .pt-share-row:has(> :nth-child(5)) { grid-template-columns: repeat(3, 1fr); } }
.pt-sbtn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px 9px; word-break: keep-all; text-align: center; line-height: 1.3; border-radius: 10px; border: 1px solid var(--oat); background: var(--paper); color: var(--ink); font: inherit; font-size: 12.5px; text-decoration: none; cursor: pointer; }
.pt-sbtn:hover { border-color: var(--ink); }
.pt-sbtn svg { width: 22px; height: 22px; }
.pt-sbtn.kakao svg { color: #191600; }
.pt-sbtn.kakao .dot { background: #FEE500; }
.pt-sbtn .dot { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--linen); }
.pt-linkbox { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 12px 0 0; text-align: left; }
.pt-linkbox textarea { min-width: 0; resize: none; font: inherit; font-size: 16px; line-height: 1.5; padding: 10px 12px; border: 1px solid var(--oat); border-radius: 8px; background: var(--paper); color: var(--ink); }
.pt-linkbox .pt-btn { min-height: 44px; padding: 0 14px; font-size: 14px; }
.pt-linkbox p { grid-column: 1 / -1; margin: 0; }
.pt-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 14px; padding: 10px 16px; border-radius: 10px; max-width: calc(100% - 32px); text-align: center; z-index: 30; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.pt-toast:empty { padding: 0; }
.pt-toast.on { opacity: 1; }

.pt-review { text-align: left; margin: 0 0 18px; }
.pt-review > h2 { font-size: 15px; font-weight: 500; margin: 0 0 10px; }
.pt-review details { border-top: 1px solid var(--oat); padding: 10px 2px; }
.pt-review details:last-child { border-bottom: 1px solid var(--oat); }
.pt-review summary { cursor: pointer; font-size: 14.5px; list-style: none; display: flex; gap: 10px; align-items: baseline; }
.pt-review summary::-webkit-details-marker { display: none; }
.pt-review summary .mk { flex: 0 0 auto; font-size: 12px; padding: 1px 8px; border-radius: 999px; }
.pt-review .mk.ok { background: var(--ok-bg); color: var(--ok-ink); }
.pt-review .mk.no { background: var(--no-bg); color: var(--no-ink); }
.pt-review .body { padding: 8px 0 2px; font-size: 14px; }
.pt-review .body p { margin: 0 0 6px; }
.pt-review .body p.q { color: var(--ink-soft); }
.pt-fb-answer .g, .pt-review .g { font-family: var(--serif); }

.pt-app { border: 1px solid var(--oat); border-radius: 14px; padding: 18px; text-align: left; display: flex; gap: 14px; align-items: flex-start; margin: 0 0 18px; }
.pt-app img { width: 52px; height: 52px; border-radius: 12px; flex: 0 0 auto; }
.pt-app p { margin: 0 0 12px; font-size: 14.5px; }
.pt-app .stores { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-app .stores a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 9px; background: var(--ink); color: #fff; text-decoration: none; font-size: 13.5px; }
html.is-android .pt-app .store-play { order: -1; }

.pt-foot { max-width: 600px; margin: 0 auto; padding: 0 20px 40px; font-size: 12px; color: var(--ink-soft); line-height: 1.8; }
.pt-foot a { color: var(--ink-soft); }

/* 이미지 저장 시트 */
.pt-sheet { border: 0; padding: 0; border-radius: 16px; max-width: min(420px, calc(100% - 24px)); width: 100%; background: var(--paper); color: var(--ink); }
.pt-sheet::backdrop { background: rgba(43,43,43,.45); }
.pt-sheet .in { padding: 18px; text-align: center; }
.pt-sheet img { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 10px; background: var(--linen); -webkit-touch-callout: default; }
.pt-sheet p { font-size: 14px; margin: 12px 0; }
.pt-sheet .row { display: flex; gap: 8px; }
.pt-sheet .row > * { flex: 1; }

/* 친구 결과 */
.pt-friend { text-align: center; }
.pt-friend .pt-kicker { margin-top: 6px; }

@media (max-width: 420px) {
  .pt-brand span { display: none; } /* 좁은 화면은 아이콘만 — 언어 버튼이 줄바꿈되지 않게 */
  .pt-lang a { padding: 6px 7px; font-size: 12.5px; }
  .pt-h1 { font-size: 29px; }
  .pt-q { font-size: 21px; }
  .pt-score { font-size: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .pt-screen { animation: none; }
  .pt-bar > span, .pt-choice, .pt-btn, .pt-toast { transition: none; }
}
