:root {
  --navy: #203a5c;
  --navy-deep: #16293f;
  --cream: #f3ede0;
  --cream-soft: #faf7f0;
  --teal: #0f766e;
  --teal-soft: #ccfbf1;
  --text: #13201f;
  --muted: #55625f;
  --line: #dde3e1;
  --surface: #ffffff;
  --bg: #fbfaf7;
  --danger: #b91c1c;
  --ok: #15803d;
  --focus: #2563eb;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 8px 24px rgb(16 24 40 / 8%);
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8eeec;
    --muted: #a3b1ae;
    --line: #2b3a38;
    --surface: #152321;
    --bg: #0e1918;
    --cream-soft: #18272c;
    --teal-soft: #134e4a;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 30%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 머리글 */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.2rem; }
.brand img { width: 32px; height: 32px; }
.brand small { font-weight: 600; color: var(--muted); font-size: 0.8rem; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a { color: var(--text); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: 0.95rem; }
.nav a:hover { background: var(--cream-soft); }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform 0.15s ease, background 0.15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-deep); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--cream-soft); }
.nav .btn { min-height: 40px; padding: 0 16px; font-size: 0.95rem; }
.nav .btn-primary, .nav .btn-primary:hover { color: #fff; }
.nav .btn-primary:hover { background: var(--navy-deep); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* 첫 화면 */
.hero { padding: clamp(40px, 7vw, 88px) 0 40px; background: radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--cream) 70%, transparent), transparent 60%); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; font-size: 0.9rem; font-weight: 700; color: var(--teal); background: var(--teal-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 18px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 18px; }
.trust { font-size: 0.9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; list-style: none; }
.trust li::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.phones { display: flex; justify-content: center; gap: 16px; }
.phone { width: min(260px, 44vw); border-radius: 34px; border: 8px solid #0b1214; box-shadow: var(--shadow); background: #0b1214; overflow: hidden; }
.phone.back { transform: translateY(36px); width: min(220px, 38vw); opacity: 0.96; }
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .phone.back { display: none; }
}

/* 구역 */
section { padding: clamp(48px, 7vw, 84px) 0; }
section.alt { background: var(--cream-soft); border-block: 1px solid var(--line); }
.section-head { max-width: 46em; margin-bottom: 32px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { display: flex; align-items: center; gap: 10px; }
.card .ico { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--cream); color: var(--navy); font-size: 1.1rem; flex: none; }
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.shot { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.figure { margin: 0; }
.figure img { max-width: 340px; margin-inline: auto; }
.figure figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 8px; text-align: center; }

table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); font-size: 0.96rem; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: var(--cream-soft); font-weight: 700; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.table-note { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }
.scroll-x { overflow-x: auto; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { padding-left: 30px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px; border-radius: 6px; background: var(--teal-soft); box-shadow: inset 0 0 0 2px var(--teal); }
.forms-list { columns: 2 280px; column-gap: 32px; padding-left: 1.1em; margin: 0; }
.forms-list li { break-inside: avoid; margin-bottom: 6px; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding: 0; list-style: none; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; margin-bottom: 10px; }
.steps strong { display: block; margin-bottom: 4px; }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.4rem; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-bottom: 16px; margin: 0; }

/* 문의 양식 (페이지·상담창 공통) */
.contact-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow); }
.inquiry { display: grid; gap: 14px; }
.inquiry .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .inquiry .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field span { font-weight: 700; font-size: 0.95rem; }
.field em { font-style: normal; color: var(--danger); }
.field input, .field textarea {
  font: inherit; font-size: 16px; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; min-height: 46px; width: 100%;
}
.field textarea { min-height: 110px; resize: vertical; }
.consent { display: grid; gap: 6px; background: var(--cream-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 0.92rem; }
.consent label { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.consent details summary { cursor: pointer; color: var(--muted); font-size: 0.88rem; }
.consent dl { margin: 8px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; color: var(--muted); font-size: 0.86rem; }
.consent dt { font-weight: 700; }
.consent dd { margin: 0; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.4em; font-size: 0.95rem; margin: 0; }
.status.err { color: var(--danger); }
.status.ok { color: var(--ok); font-weight: 700; }
.ts-box:empty { display: none; }

/* 바닥글 */
.foot { padding: 36px 0 120px; border-top: 1px solid var(--line); font-size: 0.92rem; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.foot a { color: var(--muted); }

/* 문서 (처리방침·약관) */
.doc { padding: 40px 0 80px; }
.doc .wrap { max-width: 820px; }
.doc h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); }
.doc h2 { font-size: 1.25rem; margin-top: 2em; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: 4px; }
.doc table { font-size: 0.92rem; margin: 10px 0; }

/* 상담창 */
.chat-launch {
  position: fixed; right: 18px; bottom: 18px; z-index: 50; display: inline-flex; align-items: center; gap: 8px;
  min-height: 54px; padding: 0 20px 0 16px; border-radius: 999px; border: 0; background: var(--navy); color: #fff;
  font: inherit; font-weight: 800; box-shadow: var(--shadow); cursor: pointer;
}
.chat-launch svg { width: 22px; height: 22px; }
.chat-launch[aria-expanded="true"] { display: none; }
.chat {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; width: min(400px, calc(100vw - 36px)); height: min(640px, calc(100vh - 36px));
  display: none; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden;
}
.chat.open { display: flex; }
@media (max-width: 560px) {
  .chat { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .chat-launch { right: 12px; bottom: 12px; }
}
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--navy); color: #fff; }
.chat-head img { width: 28px; height: 28px; border-radius: 8px; }
.chat-head strong { display: block; line-height: 1.2; }
.chat-head small { opacity: 0.8; font-size: 0.78rem; }
.chat-head button { margin-left: auto; background: transparent; border: 0; color: #fff; font-size: 1.5rem; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; }
.chat-head button:hover { background: rgb(255 255 255 / 12%); }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; font-size: 0.96rem; line-height: 1.55; }
.msg.bot { background: var(--surface); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--navy); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.typing { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 0.88rem; cursor: pointer; min-height: 36px; }
.chip:hover { background: var(--cream-soft); }
.chip.strong { border-color: var(--navy); color: var(--navy); font-weight: 700; }
@media (prefers-color-scheme: dark) { .chip.strong { border-color: var(--cream); color: var(--cream); } }
.chat-note { font-size: 0.75rem; color: var(--muted); padding: 6px 14px 0; background: var(--surface); border-top: 1px solid var(--line); margin: 0; }
.chat-form { display: flex; gap: 8px; padding: 8px 12px 12px; background: var(--surface); }
.chat-form textarea { flex: 1; font: inherit; font-size: 16px; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 46px; max-height: 120px; background: var(--bg); color: var(--text); }
.chat-form button { flex: none; min-width: 64px; border-radius: 12px; border: 0; background: var(--navy); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.chat-inquiry { padding: 14px; overflow-y: auto; flex: 1; background: var(--bg); }
.chat-inquiry .inquiry .row { grid-template-columns: 1fr; }
.chat-inquiry h3 { margin-bottom: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
