/* =========================================================
   오세요 — 서비스 화면 공통 스타일 (애플 감성)
   폰트: Pretendard (SIL Open Font License 1.1)
   ========================================================= */
:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --surface-3: #e8e8ed;
  --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);
  --danger: #e5383b;
  --nav-bg: rgba(251, 251, 253, .8);
  --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);
  --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);
    --danger: #ff6b6b;
    --nav-bg: rgba(22, 22, 23, .8);
    --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%; }
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, input, select, textarea { 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: 750; 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: 2px; align-items: center; }
.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; }
.nav-links a.nav-cta { background: var(--accent); color: #fff; font-weight: 600; margin-left: 4px; }
.nav-links a.nav-cta:hover { background: var(--accent-hover); }

/* ---------- 타이포 ---------- */
.eyebrow { display: inline-block; font-size: 15px; font-weight: 600; color: var(--accent); margin: 0 0 12px; letter-spacing: -0.01em; }
.display { font-size: clamp(40px, 7.4vw, 80px); line-height: 1.06; font-weight: 800; letter-spacing: -0.045em; margin: 0; }
.headline { font-size: clamp(30px, 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(18px, 2.2vw, 21px); line-height: 1.55; color: var(--text-2); margin: 16px 0 0; font-weight: 450; }
.grad-text { background: linear-gradient(90deg, #ff6b8b 0%, #a259ff 55%, #4f7cff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 버튼 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; 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, opacity .18s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-soft { background: var(--surface-3); color: var(--text); }
.btn-soft:hover { opacity: .86; }
.btn-ghost { background: transparent; color: var(--accent); padding: 0 12px; }
.btn-danger { background: transparent; color: var(--danger); }
.btn-kakao { background: #fee500; color: rgba(0, 0, 0, .86); }
.btn-kakao svg { width: 20px; height: 20px; }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 14.5px; }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 18px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.link-more { font-size: 17px; font-weight: 500; white-space: nowrap; }
.link-more::after { content: ' ›'; }

/* ---------- 문서 ---------- */
.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 h3 { font-size: 18px; margin: 26px 0 6px; }
.doc p, .doc li { color: var(--text-2); font-size: 16.5px; line-height: 1.75; }
.doc ul, .doc ol { 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; }
.doc details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.doc summary { cursor: pointer; font-weight: 600; color: var(--text); font-size: 16.5px; }
.doc details p { margin: 8px 0 0; }
.maker { display: flex; gap: 20px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px; margin-top: 12px; }
.maker img { width: 112px; height: 112px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 8px 24px rgba(0, 0, 0, .08); flex: 0 0 auto; }
.maker strong { display: block; font-size: 22px; letter-spacing: -0.02em; color: var(--text); }
.maker p { margin: 4px 0 10px; font-size: 15.5px; }

/* ---------- 푸터 ---------- */
.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; }
.kz-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--text-2); text-decoration: none !important; line-height: 1.4; }
.kz-brand img { width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 2px 8px rgba(0, 0, 0, .06); flex: 0 0 auto; }
.kz-brand b { color: var(--text); font-weight: 700; font-size: 14px; }
.kz-brand small { display: block; font-size: 12.5px; color: var(--text-3); }
.kz-brand:hover b { text-decoration: underline; }

/* ---------- 광고 자리 ---------- */
.ad-box { margin: 32px auto; max-width: 728px; }
.ad-label { margin: 0 0 4px; font-size: 11px; color: var(--text-3); text-align: center; }

/* ---------- 대화상자 ---------- */
.dlg-back { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .42); opacity: 0; transition: opacity .2s; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dlg-back.show { opacity: 1; }
.dlg { width: 100%; max-width: 460px; max-height: calc(100dvh - 24px); overflow: auto; margin: 0; padding: 26px 22px calc(22px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow); transform: translateY(24px); transition: transform .25s ease; }
.dlg-back.show .dlg { transform: none; }
@media (min-width: 640px) { .dlg-back { align-items: center; } .dlg { border-radius: 26px; padding-bottom: 22px; } }
.dlg h2 { margin: 0 0 6px; font-size: 21px; letter-spacing: -0.025em; }
.dlg p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.dlg .btn-row { margin-top: 20px; flex-wrap: nowrap; }
.dlg .btn-row .btn { flex: 1; padding: 0 12px; }

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

@media (max-width: 480px) {
  .nav-links a { padding: 6px 8px; font-size: 13.5px; }
  .maker { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
