/* 접수 웹 — 모바일 우선 (기준 폭 390px). 포스터 KV(밤바다·황금빛 함선) 톤 */
:root {
  --pad: 16px; --radius: 16px; --nav-h: 76px;
  --sea-deep: #061020; --sea: #0B1626; --sea-2: #12243D; --sea-3: #183156;
  --gold-hi: #FFE9A6; --gold: #F0B94B; --gold-2: #C98F1E; --gold-deep: #8A5E0E;
  --glow: rgba(63, 184, 201, 0.35);
  --font-title: "Black Han Sans", "Do Hyeon", "Noto Sans KR", sans-serif;
}
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh; display: flex; flex-direction: column; color: var(--ink);
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.9) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 9%, rgba(255,255,255,0.8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 30%, rgba(255,232,170,0.9) 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 62%, rgba(255,255,255,0.7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 48%, rgba(255,232,170,0.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 84%, rgba(255,255,255,0.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 76%, rgba(255,255,255,0.7) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 42% 92%, rgba(255,232,170,0.7) 50%, transparent 51%),
    radial-gradient(140% 70% at 50% -20%, rgba(240,185,75,0.22) 0%, transparent 60%),
    linear-gradient(180deg, #0E1E3A 0%, var(--sea) 45%, var(--sea-deep) 100%);
  background-attachment: fixed;
}

/* 상단 */
.top { position: sticky; top: 0; z-index: 5; background: rgba(6, 16, 32, 0.86); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(240,185,75,0.25); padding: calc(10px + env(safe-area-inset-top)) var(--pad) 10px; }
.brand { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.brand .disp { font-family: var(--font-title); font-size: 17px; letter-spacing: 0.02em; background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 55%, var(--gold-2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { color: var(--gold); font-size: 11px; letter-spacing: 0.14em; opacity: 0.85; }
.progress { height: 3px; margin-top: 9px; border-radius: 2px; background: rgba(255,255,255,0.08); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-2), var(--gold-hi)); box-shadow: 0 0 8px rgba(240,185,75,0.7); transition: width 0.35s ease; }

.stage { flex: 1; width: min(560px, 100%); margin: 0 auto; padding: var(--pad) var(--pad) calc(var(--nav-h) + 24px); display: grid; gap: 14px; align-content: start; }
.stage.enter > * { animation: rise 0.32s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* 카드: 금테 + 유리 */
.card { position: relative; background: linear-gradient(180deg, rgba(24,49,86,0.85), rgba(13,26,48,0.92)); border: 1px solid rgba(240,185,75,0.28); border-radius: var(--radius); padding: 18px var(--pad); box-shadow: 0 10px 30px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06); }
.card h2 { margin: 0 0 14px; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; color: var(--gold-hi); }
.chip { display: inline-block; background: linear-gradient(180deg, var(--gold-hi), var(--gold-2)); color: var(--gold-ink); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; }

/* 히어로 (첫 화면) */
.hero { text-align: center; padding-top: 22px; overflow: hidden; }
.hero.kv { padding-top: 0; }
.kv-img { position: relative; margin: -1px calc(-1 * var(--pad)) 6px; aspect-ratio: 4 / 3; overflow: hidden; }
.kv-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kv-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,26,48,0) 55%, rgba(13,26,48,0.75) 85%, rgba(13,26,48,0.96) 100%); }
.eyebrow { display: inline-block; color: var(--gold); font-size: 11.5px; letter-spacing: 0.32em; font-weight: 600; margin: 2px 0 6px; }
.title { margin: 0 0 6px; font-family: var(--font-title); font-weight: 400; font-size: 32px; line-height: 1.15; letter-spacing: -0.01em; background: linear-gradient(180deg, #FFF4CC 0%, var(--gold) 50%, #B9800F 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(90,60,5,0.6)) drop-shadow(0 6px 18px rgba(240,185,75,0.35)); }
.title-en { display: block; color: var(--gold); font-family: var(--font-body); font-weight: 600; font-size: 11px; letter-spacing: 0.4em; margin: 6px 0 12px; opacity: 0.9; }
.hero h1 { margin: 6px 0 10px; font-size: 27px; line-height: 1.25; color: var(--ink); }
.hero h1 b { color: var(--gold); font-weight: 400; }
.emblem { font-size: 46px; line-height: 1; filter: drop-shadow(0 0 14px rgba(240,185,75,0.55)); }
.emblem.big { font-size: 72px; }
.emblem.spin { display: inline-block; animation: spin 2.4s ease-in-out infinite; }
@keyframes spin { 0% { transform: rotate(-20deg); } 50% { transform: rotate(380deg); } 100% { transform: rotate(340deg); } }
.lead { color: var(--ink); font-size: 15px; line-height: 1.65; margin: 0 0 12px; }
.lead b { color: var(--gold); }
.note { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 8px 0 0; }
.rule { height: 1px; margin: 14px auto; width: 72%; background: linear-gradient(90deg, transparent, rgba(240,185,75,0.7), transparent); }
.info { margin: 14px 0 0; display: grid; gap: 9px; text-align: left; }
.info div { display: grid; grid-template-columns: 44px 1fr; gap: 10px; font-size: 14px; }
.info dt { color: var(--gold); font-weight: 700; letter-spacing: 0.08em; }
.info dd { margin: 0; color: var(--ink); }

/* 아이 화면: 함선 배경 */
.kid { background: linear-gradient(180deg, rgba(24,49,86,0.9), rgba(13,26,48,0.95)); }
.kid .ship { margin: -18px calc(-1 * var(--pad)) 8px; height: 180px; overflow: hidden; position: relative; }
.kid .ship img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.kid .ship::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,26,48,0) 50%, rgba(13,26,48,0.95) 100%); }

/* 동의·체크 */
.check { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; padding: 10px 0; font-size: 14px; line-height: 1.45; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--gold); }
.check small { color: var(--muted); }
.req { font-size: 11px; color: var(--gold-hi); background: rgba(240,185,75,0.16); border: 1px solid rgba(240,185,75,0.4); border-radius: 999px; padding: 2px 8px; font-weight: 700; margin-left: auto; }
.consent { border-top: 1px solid rgba(240,185,75,0.14); padding: 6px 0; }
.consent:first-of-type { border-top: 0; }
.consent .check { padding: 6px 0; }
.consent .more { display: inline-block; margin-left: 36px; font: inherit; font-size: 13px; color: var(--teal); background: none; border: 0; padding: 2px 0; text-decoration: underline; text-underline-offset: 3px; }
.consent .detail { margin: 8px 0 4px 36px; padding: 12px 14px; background: rgba(6,16,32,0.7); border: 1px solid rgba(240,185,75,0.2); border-radius: 10px; font-size: 13px; line-height: 1.55; color: var(--ink); max-height: 260px; overflow-y: auto; }
.consent .detail p { margin: 0 0 8px; }
.consent .detail p:last-child { margin: 0; }
.consent .detail b { color: var(--gold); margin-right: 4px; }
.consent .detail .org { color: var(--muted); font-size: 12px; }
.consent.error { box-shadow: inset 3px 0 0 var(--boss); padding-left: 8px; }

/* 입력 */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label { font-size: 13.5px; font-weight: 700; color: var(--gold-hi); letter-spacing: 0.02em; }
.field label em { color: var(--muted); font-style: normal; font-weight: 400; }
.field small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.field input[type=text], .field input[type=tel] { width: 100%; font: inherit; font-size: 17px; color: var(--ink); background: rgba(6,16,32,0.75); border: 1px solid rgba(240,185,75,0.3); border-radius: 12px; padding: 13px 14px; box-shadow: inset 0 2px 6px rgba(0,0,0,0.35); }
.field input::placeholder { color: #5E738F; }
.field input:focus { outline: 2px solid var(--gold); outline-offset: -1px; box-shadow: 0 0 0 4px rgba(240,185,75,0.18); }
.field.error input, .field.error .seg { border-color: var(--boss); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: rgba(6,16,32,0.75); border: 1px solid rgba(240,185,75,0.3); border-radius: 12px; padding: 4px; }
.seg button { font: inherit; font-size: 15px; font-weight: 700; color: var(--muted); background: transparent; border: 0; border-radius: 9px; padding: 11px 0; }
.seg button.on { background: linear-gradient(180deg, var(--gold-hi), var(--gold-2)); color: var(--gold-ink); }

.photo { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; }
.photo-box { width: 96px; height: 96px; border-radius: 14px; background: rgba(6,16,32,0.75); border: 1px dashed rgba(240,185,75,0.5); display: grid; place-items: center; font-size: 30px; overflow: hidden; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-btns { display: grid; gap: 6px; }

/* 버튼: 황금 */
.btn { font: inherit; font-weight: 800; font-size: 16px; border-radius: 14px; padding: 14px 18px; border: 1px solid transparent; cursor: pointer; text-align: center; letter-spacing: 0.02em; }
.btn.primary { background: linear-gradient(180deg, #FFDD8A 0%, var(--gold) 45%, #D89A25 100%); color: var(--gold-ink); border-color: rgba(255,244,204,0.6); box-shadow: 0 6px 18px rgba(240,185,75,0.35), inset 0 1px 0 rgba(255,255,255,0.5); }
.btn.primary:active { transform: translateY(1px); box-shadow: 0 3px 10px rgba(240,185,75,0.3); }
.btn.primary:disabled { opacity: 0.45; cursor: default; }
.btn.ghost { background: rgba(255,255,255,0.03); color: var(--ink); border-color: rgba(240,185,75,0.35); }
.btn.small { padding: 9px 12px; font-size: 14px; font-weight: 700; background: rgba(24,49,86,0.9); color: var(--gold-hi); border-color: rgba(240,185,75,0.35); }
.btn.small.ghost { background: transparent; color: var(--ink); }
.btn.wide { width: 100%; margin-top: 6px; }

.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; padding: 10px var(--pad) calc(10px + env(safe-area-inset-bottom)); background: rgba(6,16,32,0.92); backdrop-filter: blur(10px); border-top: 1px solid rgba(240,185,75,0.25); }
.nav > * { max-width: 560px; }
.nav.single { grid-template-columns: 1fr; }
.nav.single #btnPrev { display: none; }
.nav[hidden] { display: none; }

/* 설문 */
.q { display: grid; gap: 18px; padding-top: 8px; }
.q-head { text-align: center; }
.q-num { display: inline-block; color: var(--gold); font-weight: 700; font-size: 13px; letter-spacing: 0.3em; margin-bottom: 8px; }
.q h1 { margin: 0; font-family: var(--font-title); font-weight: 400; font-size: 32px; line-height: 1.2; background: linear-gradient(180deg, #FFF4CC, var(--gold) 60%, #C98F1E); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(90,60,5,0.5)); }
.q-opts { display: grid; gap: 12px; }
.opt { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 14px; min-height: 96px; padding: 12px 18px; background: linear-gradient(180deg, rgba(24,49,86,0.9), rgba(13,26,48,0.95)); border: 2px solid rgba(240,185,75,0.35); border-radius: 20px; color: var(--ink); font: inherit; font-size: 22px; font-weight: 800; text-align: left; cursor: pointer; box-shadow: 0 8px 22px rgba(0,0,0,0.35); transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease; }
.opt .e { font-size: 48px; line-height: 1; text-align: center; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.45)); }
.opt:active { transform: scale(0.97); }
.opt.on { border-color: var(--gold-hi); background: linear-gradient(180deg, rgba(240,185,75,0.28), rgba(24,49,86,0.95)); box-shadow: 0 0 0 4px rgba(240,185,75,0.25), 0 0 28px var(--glow); }
.q-hint { text-align: center; color: var(--muted); font-size: 14px; margin: 0; }
@media (min-height: 720px) { .opt { min-height: 110px; } }

/* 확인·완료 */
.review { display: grid; gap: 10px; }
.review .row { display: grid; grid-template-columns: 82px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid rgba(240,185,75,0.14); font-size: 14px; }
.review .row:first-child { border-top: 0; }
.review .row b { color: var(--gold); }
.review .row button { font: inherit; font-size: 13px; color: var(--teal); background: none; border: 0; padding: 0; }
.review .thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; vertical-align: middle; margin-right: 8px; }
.regnos { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 16px; }
.regnos span { background: rgba(6,16,32,0.75); border: 1px solid var(--gold-2); color: var(--gold-hi); border-radius: 12px; padding: 8px 14px; font-size: 15px; box-shadow: 0 0 18px rgba(240,185,75,0.25); }
.regnos span b { font-size: 24px; font-family: var(--font-title); font-weight: 400; margin-left: 8px; color: var(--gold); }
.sibling h2 { margin-bottom: 6px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px); transform: translateX(-50%); background: var(--boss); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 9; box-shadow: 0 6px 20px rgba(0,0,0,0.4); animation: rise 0.2s ease; white-space: nowrap; }
.badge-proxy { position: fixed; top: 6px; right: 8px; z-index: 6; background: var(--teal); color: #05202a; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }

/* 임시 개발용 버튼 */
.dev-skip { position: fixed; right: 10px; bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom)); z-index: 8; font: inherit; font-size: 12px; font-weight: 700; color: #05202a; background: var(--teal); border: 0; border-radius: 999px; padding: 8px 12px; box-shadow: 0 4px 14px rgba(0,0,0,0.4); opacity: 0.9; }

/* 이어서 하기 안내 (이전 입력 복원) */
.resume-note { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: rgba(240,185,75,0.14); border: 1px solid rgba(240,185,75,0.45); font-size: 13px; line-height: 1.4; }
.resume-note .btn.small, .btn.small { padding: 8px 12px; font-size: 13px; white-space: nowrap; }
.sibling .btn + .btn { margin-top: 8px; }

.detail .doc-title { font-weight: 700; text-align: center; margin-bottom: 8px; }
.detail p.small { font-size: 12px; opacity: .85; }

/* 언어 국기 줄 (헤더 아래) */
.top-tools { display: flex; justify-content: flex-end; margin-top: 6px; }
.top-tools .i18n-switch { margin-left: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.top-tools .i18n-switch::-webkit-scrollbar { display: none; }
.top-tools .i18n-switch button { flex: 0 0 auto; padding: 4px 7px; font-size: 12px; }
@media (max-width: 420px) { .top-tools .i18n-switch button span { display: none; } .top-tools .i18n-switch .flag { width: 22px; height: 15px; } }
