/* =========================================================
   쿠키픽 스타일 — 깔끔하고 간결한 애플 감성
   폰트: Pretendard (SIL Open Font License 1.1, 상업적 사용 무료)
   ========================================================= */
:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --surface-3: #ececf0;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: rgba(0, 0, 0, .08);
  --line-2: rgba(0, 0, 0, .14);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, .08);
  --warm: #c46a1d;
  --grad: linear-gradient(90deg, #ff7a18 0%, #ff4f81 55%, #a259ff 100%);
  --nav-bg: rgba(251, 251, 253, .78);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 14px rgba(0, 0, 0, .05);
  --shadow: 0 2px 8px rgba(0, 0, 0, .04), 0 22px 48px rgba(0, 0, 0, .08);
  --r-xl: 32px;
  --r-lg: 24px;
  --r: 18px;
  --r-sm: 12px;
  --gutter: 20px;
  --maxw: 1080px;
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #161617;
    --surface-3: #2c2c2e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #8e8e93;
    --line: rgba(255, 255, 255, .1);
    --line-2: rgba(255, 255, 255, .18);
    --accent: #2997ff;
    --accent-hover: #47a6ff;
    --accent-soft: rgba(41, 151, 255, .14);
    --warm: #ffa94d;
    --nav-bg: rgba(22, 22, 23, .78);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 20px 48px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.012em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; border-radius: 10px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.narrow { max-width: 720px; }
.center { text-align: center; }
.muted { color: var(--text-2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 상단 내비 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { color: var(--text-2); font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 600; }

/* ---------- 타이포 ---------- */
.eyebrow { display: inline-block; font-size: 14px; font-weight: 600; color: var(--warm); letter-spacing: -0.01em; margin: 0 0 10px; }
.display { font-size: clamp(38px, 7.4vw, 80px); line-height: 1.06; font-weight: 800; letter-spacing: -0.045em; margin: 0; }
.headline { font-size: clamp(28px, 4.6vw, 48px); line-height: 1.12; font-weight: 750; letter-spacing: -0.035em; margin: 0; }
.title { font-size: clamp(22px, 3vw, 28px); line-height: 1.25; font-weight: 700; letter-spacing: -0.025em; margin: 0; }
.lead { font-size: clamp(17px, 2.2vw, 21px); line-height: 1.55; color: var(--text-2); margin: 16px 0 0; font-weight: 450; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px; border-radius: 999px; border: 0;
  font-size: 17px; font-weight: 600; letter-spacing: -0.015em; cursor: pointer;
  text-decoration: none !important; white-space: nowrap;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease, opacity .18s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover { opacity: .88; }
.btn-soft { background: var(--surface-2); color: var(--text); }
.btn-soft:hover { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--accent); padding: 0 10px; min-height: 44px; }
.btn-ghost:hover { text-decoration: underline !important; }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 18px; padding: 0 32px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- 칩/뱃지 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip.strong { background: var(--text); color: var(--bg); }
.chip.hot { background: #fff1e6; color: #c2410c; }
.chip.rising { background: #eaf6ec; color: #237a3a; }
.chip.past { background: #f2eefb; color: #6b46c1; }
.chip.steady { background: #fff7db; color: #9a6b00; }
.chip.retro { background: #e9f2fd; color: #1e5bb8; }
@media (prefers-color-scheme: dark) {
  .chip.hot { background: #3a2212; color: #ffb37a; }
  .chip.rising { background: #12301b; color: #7ee39a; }
  .chip.past { background: #261d3d; color: #c4b0ff; }
  .chip.steady { background: #332a0d; color: #ffd66b; }
  .chip.retro { background: #13263f; color: #8fbfff; }
}

/* ---------- 카드 ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.card + .card { margin-top: 16px; }
.section { padding-top: 72px; padding-bottom: 72px; }
.section-sm { padding-top: 40px; padding-bottom: 40px; }
.section-head { text-align: center; margin-bottom: 36px; }

/* ---------- 홈 히어로 ---------- */
.hero { padding-top: 64px; padding-bottom: 24px; text-align: center; overflow: hidden; }
.hero .btn-row { margin-top: 32px; }
.hero-meta { margin-top: 18px; font-size: 14px; color: var(--text-3); }
.parade { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: clamp(2px, 1.5vw, 22px); margin: 48px auto 0; max-width: 820px; }
.parade .p-item { width: clamp(48px, 15vw, 150px); flex: 0 0 auto; animation: bob 4.8s ease-in-out infinite; }
.parade .p-item:nth-child(2) { animation-delay: -1.1s; width: clamp(56px, 17vw, 172px); }
.parade .p-item:nth-child(3) { animation-delay: -2.3s; width: clamp(68px, 21vw, 210px); }
.parade .p-item:nth-child(4) { animation-delay: -3.1s; width: clamp(56px, 17vw, 172px); }
.parade .p-item:nth-child(5) { animation-delay: -.6s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(2deg); } }

/* ---------- 벤토 ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bento .card { margin: 0; padding: 30px 26px; }
.bento .num { font-size: 40px; line-height: 1; margin-bottom: 16px; }
.bento h3 { font-size: 21px; margin: 0 0 8px; letter-spacing: -0.025em; }
.bento p { margin: 0; color: var(--text-2); font-size: 15.5px; }
@media (max-width: 820px) { .bento { grid-template-columns: 1fr; } }

/* ---------- 가로 스크롤 쇼케이스 ---------- */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 180px); gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 18px; margin: 0 calc(var(--gutter) * -1); scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* ---------- 간식 카드 ---------- */
.ck { display: flex; flex-direction: column; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 16px; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; color: var(--text); width: 100%; }
.ck:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.ck .art { aspect-ratio: 1 / 1; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; padding: 6%; margin-bottom: 12px; }
.ck .art svg { width: 100%; height: 100%; }
.ck .nm { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; line-height: 1.3; }
.ck .al { font-size: 13px; color: var(--text-3); margin-left: 2px; font-weight: 500; }
.ck .meta { margin-top: 6px; font-size: 12.5px; color: var(--text-2); display: flex; gap: 6px; flex-wrap: wrap; }
.ck .pct { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--accent); }
.ck .ds { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ck .art:empty::after { content: ''; width: 46%; aspect-ratio: 1; border-radius: 50%; background: var(--surface-3); }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-weight: 600; font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 24px; font-weight: 300; color: var(--text-3); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--text-2); font-size: 15.5px; }

/* ---------- 퀴즈 ---------- */
.quiz { max-width: 680px; margin: 0 auto; padding: 20px 0 64px; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.back-btn { background: none; border: 0; color: var(--accent); font-size: 16px; font-weight: 500; padding: 8px 4px; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; }
.back-btn:disabled { opacity: .3; cursor: default; }
.q-count { font-size: 14px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.progress { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin: 6px 0 36px; }
.progress span { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 4px; transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.q-card { animation: qin .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes qin { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.q-card h2 { font-size: clamp(26px, 5vw, 38px); line-height: 1.2; font-weight: 750; letter-spacing: -0.035em; margin: 0; }
.q-card .q-sub { margin: 10px 0 28px; color: var(--text-2); font-size: 16px; }
.opts { display: grid; gap: 12px; }
.opts.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .opts.two { grid-template-columns: 1fr; } }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px;
  padding: 14px 18px; border-radius: var(--r); cursor: pointer; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: 17px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.35;
  transition: border-color .15s, background-color .15s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.opt:hover { border-color: var(--line-2); }
.opt:active { transform: scale(.985); }
.opt .em { font-size: 28px; line-height: 1; flex: 0 0 auto; width: 36px; text-align: center; }
.opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.mbti-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mbti-grid .opt { justify-content: center; min-height: 56px; padding: 10px 4px; font-size: 16px; font-weight: 700; letter-spacing: .02em; }
.mbti-skip { margin-top: 12px; justify-content: center; color: var(--text-2); }

/* ---------- 로딩 ---------- */
.loading { min-height: 62vh; display: grid; place-items: center; text-align: center; padding-top: 40px; padding-bottom: 40px; }
.loading .spin { width: 120px; margin: 0 auto 26px; animation: spin 1.6s cubic-bezier(.6, .1, .4, .9) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading p { font-size: 19px; font-weight: 600; margin: 0; }
.loading small { display: block; margin-top: 6px; color: var(--text-3); font-size: 14px; }

/* ---------- 결과 ---------- */
.result-hero { position: relative; text-align: center; padding: 48px 0 28px; background: var(--surface-2); background: linear-gradient(180deg, color-mix(in srgb, var(--tint, #d39b56) 22%, var(--bg)) 0%, var(--bg) 100%); }
.result-art { width: min(68vw, 320px); margin: 6px auto 4px; filter: drop-shadow(0 26px 30px rgba(60, 30, 0, .14)); animation: pop .7s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { transform: scale(.6) rotate(-10deg); opacity: 0; } to { transform: none; opacity: 1; } }
.result-name { font-size: clamp(36px, 8vw, 64px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.08; margin: 8px 0 0; }
.result-alias { font-size: 17px; color: var(--text-2); margin-top: 6px; font-weight: 500; }
.persona { margin: 14px auto 0; font-size: clamp(17px, 2.6vw, 20px); font-weight: 600; }
.result-hero .chips { margin-top: 18px; }
.match { font-size: 13px; font-weight: 700; }
.result-body { max-width: 680px; margin: 0 auto; padding-bottom: 72px; }
.result-body .desc { font-size: 18px; line-height: 1.65; margin: 8px 0 24px; color: var(--text); text-align: center; }
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.reasons li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.reasons li::before { content: ''; flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.card h3 { margin: 0 0 18px; font-size: 20px; letter-spacing: -0.025em; }
.traits { display: grid; gap: 14px; }
.trait { display: grid; grid-template-columns: 64px 1fr 28px; align-items: center; gap: 12px; font-size: 14.5px; }
.trait .lb { color: var(--text-2); font-weight: 600; }
.trait .bar { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.trait .bar i { display: block; height: 100%; border-radius: 8px; background: var(--grad); width: 0; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.trait .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); }
.buy-box { text-align: center; margin: 28px 0; }
.notice { margin-top: 10px; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }

/* 조르기 카드 */
.beg { background: linear-gradient(160deg, #fff4ea 0%, #ffeef3 55%, #f3efff 100%); border: 0; }
@media (prefers-color-scheme: dark) { .beg { background: linear-gradient(160deg, #2a1d14 0%, #2a1520 55%, #1d1830 100%); } }
.beg h3 { font-size: clamp(22px, 4vw, 26px); margin-bottom: 6px; }
.beg .sub { margin: 0 0 20px; color: var(--text-2); font-size: 15px; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field input { width: 100%; height: 50px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--text); padding: 0 16px; font: inherit; font-size: 16px; }
.field input:focus { outline: none; border-color: var(--accent); }
.msg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.msg-chips button { border: 1.5px solid var(--line-2); background: var(--surface); padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; }
.msg-chips button.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.bubble { position: relative; background: var(--surface); border-radius: 22px 22px 22px 6px; padding: 16px 18px; box-shadow: var(--shadow-sm); font-size: 16px; font-weight: 600; margin-bottom: 20px; }
.bubble b { display: block; font-size: 13px; color: var(--text-3); font-weight: 600; margin-bottom: 4px; }
.share-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.share-grid .btn { min-height: 52px; padding: 0 12px; font-size: 16px; }
.share-grid .wide { grid-column: 1 / -1; }
.btn-kakao { background: #fee500; color: #191919; }
.btn-kakao:hover { background: #fada0a; }

/* 친구 화면 */
.friend-hero { text-align: center; padding: 40px 0 8px; }
.friend-hero .bubble { display: inline-block; max-width: 520px; text-align: left; margin: 0 auto 4px; font-size: clamp(18px, 3.4vw, 22px); }
.friend-hero .result-art { width: min(64vw, 300px); }

/* ---------- 도감 ---------- */
.dex-head { padding-top: 56px; padding-bottom: 12px; text-align: center; }
.toolbar { position: sticky; top: calc(52px + env(safe-area-inset-top)); z-index: 20; background: var(--nav-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); padding: 12px 0 10px; border-bottom: 1px solid var(--line); }
.search { position: relative; max-width: 520px; margin: 0 auto 12px; }
.search input { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: 0 16px 0 42px; font: inherit; font-size: 16px; }
.search input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); }
.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: 0 0 auto; border: 0; background: var(--surface-2); color: var(--text-2); padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.filters button.sel { background: var(--text); color: var(--bg); }
.filters + .filters { margin-top: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; padding: 24px 0 8px; }
@media (max-width: 420px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .ck { padding: 10px 10px 12px; } .ck .nm { font-size: 15px; } }
.empty { text-align: center; color: var(--text-3); padding: 56px 0; }
.count { color: var(--text-3); font-size: 14px; margin-top: 10px; }

/* ---------- 상세 시트 ---------- */
dialog.sheet { border: 0; padding: 0; background: var(--surface); color: var(--text); border-radius: var(--r-xl); width: min(560px, calc(100vw - 32px)); max-height: min(88vh, 900px); box-shadow: var(--shadow); overflow: hidden; }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog.sheet[open] { animation: sheetIn .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet-inner { max-height: min(88vh, 900px); overflow-y: auto; padding: 28px 26px 26px; -webkit-overflow-scrolling: touch; }
.sheet-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); cursor: pointer; font-size: 20px; line-height: 1; color: var(--text-2); z-index: 2; }
.sheet .art-lg { width: min(56vw, 240px); margin: 0 auto; }
.sheet h2 { text-align: center; font-size: 30px; letter-spacing: -0.035em; margin: 8px 0 4px; }
.sheet .chips { margin: 12px 0 18px; }
.sheet .desc { font-size: 16.5px; line-height: 1.65; margin: 0 0 22px; text-align: center; }
.sheet .traits { margin-bottom: 24px; }
.sheet .btn-row .btn { flex: 1 1 200px; }
@media (max-width: 560px) {
  dialog.sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 28px 28px 0 0; max-height: 92vh; }
  dialog.sheet[open] { animation: sheetUp .35s cubic-bezier(.2, .8, .2, 1); }
  .sheet-inner { max-height: 92vh; padding-bottom: calc(26px + env(safe-area-inset-bottom)); }
  @keyframes sheetUp { from { transform: translateY(40%); } to { transform: none; } }
}

/* ---------- 광고 ---------- */
.ad-slot { display: none; margin: 36px auto; max-width: 728px; text-align: center; }
.ad-slot.on { display: block; }
.ad-label { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 6px; letter-spacing: .04em; }

/* ---------- 본문 문서(소개·정책) ---------- */
.doc { padding-top: 56px; padding-bottom: 80px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -0.035em; margin: 0 0 8px; line-height: 1.15; }
.doc h2 { font-size: 22px; letter-spacing: -0.025em; margin: 40px 0 10px; }
.doc p, .doc li { color: var(--text-2); font-size: 16.5px; line-height: 1.75; }
.doc ul { padding-left: 1.2em; }
.doc .updated { color: var(--text-3); font-size: 14px; margin-bottom: 28px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.doc th, .doc td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; color: var(--text-2); vertical-align: top; }
.doc th { color: var(--text); font-weight: 600; white-space: nowrap; }

/* ---------- 푸터 ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface-2); color: var(--text-3); font-size: 13px; padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); margin-top: 24px; }
.footer .links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; }
.footer .links a { color: var(--text-2); }
.footer p { margin: 6px 0 0; line-height: 1.6; }

/* ---------- 토스트 ---------- */
.toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: rgba(29, 29, 31, .92); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 15px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 100; max-width: calc(100vw - 40px); text-align: center; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .card { padding: 22px 18px; border-radius: 22px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .hero { padding-top: 44px; }
  .btn-row .btn { flex: 1 1 100%; }
  .nav-links a { padding: 6px 8px; font-size: 13.5px; }
  .brand { font-size: 17px; }
  .result-body .desc { font-size: 17px; }
  .trait { grid-template-columns: 56px 1fr 24px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
