/* 제자과정 신청 화면 (/j) — 40~70대가 휴대폰으로 읽기 쉽게: 큰 글씨 · 높은 대비 · 큰 버튼
   CSP(style-src 'self') 때문에 style="..." 를 쓰지 않는다. 모양은 전부 여기에 둔다. */
:root {
  --bg: #f2f0e9; --card: #ffffff; --ink: #141414; --muted: #555; --line: #d6d1c3;
  --olive: #28321d; --olive-2: #43522f; --khaki: #e6e1cf; --red: #b3261e; --red-bg: #fbeceb;
  --ok: #1d6b34; --focus: #1f5fd6; --radius: 14px;
}
* { box-sizing: border-box; }
html { font-size: 18px; -webkit-text-size-adjust: 100%; }
@media (min-width: 700px) { html { font-size: 19px; } }
body {
  margin: 0; background: var(--bg); color: var(--ink); line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere;
  font-family: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif;
}
button, input, select, textarea { font: inherit; color: inherit; }
b, strong { font-weight: 800; }
[hidden] { display: none !important; }

.top { background: var(--olive); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 0 #1b2213; }
.top-in { max-width: 760px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { font-weight: 900; letter-spacing: .02em; font-size: 1.05rem; }
.brand small { display: block; font-weight: 600; font-size: .72rem; opacity: .75; letter-spacing: .12em; }
.step-pill { font-size: .8rem; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); padding: 4px 10px; border-radius: 99px; white-space: nowrap; }

.wrap { max-width: 760px; margin: 0 auto; padding: 18px 16px 64px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; margin: 14px 0; }
.card.left { text-align: left; }
h1 { font-size: 1.55rem; line-height: 1.35; margin: 10px 0 6px; }
h2 { font-size: 1.25rem; line-height: 1.4; margin: 0 0 10px; }
.lead { color: var(--muted); margin: 4px 0 10px; }
.sub { color: var(--muted); font-size: .9rem; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }

/* 시작 화면 */
.hero { background: var(--olive); color: #fff; border-radius: var(--radius); padding: 28px 20px; margin-top: 8px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 220px; height: 220px; border-radius: 50%; border: 18px solid rgba(255,255,255,.06); }
.hero .kicker { display: inline-block; font-size: .78rem; letter-spacing: .18em; font-weight: 800; background: var(--red); padding: 3px 10px; border-radius: 4px; }
.hero h1 { font-size: 2rem; margin: 14px 0 12px; }
.hero p { margin: 8px 0; font-size: 1.05rem; }
.hero p.big { font-size: 1.15rem; }
.hero strong { color: #ffd98a; }
.rules { list-style: none; padding: 0; margin: 16px 0 0; }
.rules li { padding: 10px 0 10px 34px; position: relative; border-top: 1px solid var(--line); }
.rules li::before { content: attr(data-n); position: absolute; left: 0; top: 11px; width: 24px; height: 24px; border-radius: 50%; background: var(--olive); color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center; }

/* 진행 표시 (막대 길이는 스크립트가 CSSOM 으로 넣는다) */
.progress { margin: 6px 0 4px; }
.progress-label { font-weight: 700; color: var(--olive-2); font-size: .95rem; }
.bar { height: 10px; background: var(--khaki); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; width: 0; height: 100%; background: var(--olive-2); border-radius: 99px; transition: width .4s; }

/* 질문 */
.q p { margin: 0 0 12px; font-size: 1.08rem; }
.q strong { color: var(--red); }
.qno { display: inline-block; background: var(--olive); color: #fff; font-size: .9rem; padding: 3px 12px; border-radius: 6px; margin-bottom: 14px; }
.ask { font-size: 1.35rem !important; font-weight: 900; margin-top: 18px !important; border-top: 2px dashed var(--line); padding-top: 14px; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.yn button { border-radius: var(--radius); min-height: 96px; border: 3px solid; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-weight: 800; font-size: 1rem; }
.yn .big { font-size: 2.3rem; line-height: 1; font-weight: 900; }
.btn-y { background: var(--olive); border-color: var(--olive) !important; color: #fff; }
.btn-y:active { background: #1b2213; }
.btn-n { background: #fff; border-color: var(--red) !important; color: var(--red); }
.btn-n:active { background: var(--red-bg); }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; padding: 12px 20px; border-radius: 12px; border: 2px solid var(--olive); background: #fff; color: var(--olive); font-weight: 800; font-size: 1.05rem; cursor: pointer; text-decoration: none; text-align: center; }
.btn.primary { background: var(--olive); color: #fff; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.block { display: flex; width: 100%; }
.btn.huge { min-height: 72px; font-size: 1.25rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.tg { background: #229ed9; border-color: #229ed9; color: #fff; }
.btn .y-big { font-size: 1.6rem; font-weight: 900; }
.btn-row { display: grid; gap: 10px; margin-top: 14px; }
@media (min-width: 560px) { .btn-row.two { grid-template-columns: 1fr 1fr; } }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* 입력 */
.field { margin: 0 0 18px; }
.field > label, .label { display: block; font-weight: 800; margin-bottom: 6px; }
.field .opt { font-weight: 500; color: var(--muted); font-size: .85rem; }
.inp { width: 100%; min-height: 56px; padding: 12px 14px; border: 2px solid #b9b3a3; border-radius: 10px; background: #fff; font-size: 1.1rem; }
.inp:focus { border-color: var(--olive-2); outline: none; box-shadow: 0 0 0 3px rgba(67,82,47,.2); }
.inp[readonly] { background: #f5f4ef; }
.row { display: flex; gap: 8px; align-items: center; }
.row .inp { flex: 1; min-width: 0; }
.dash { font-weight: 900; }
.show-row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.hint { color: var(--muted); font-size: .88rem; margin-top: 5px; }
.hint.tight { margin: -2px 0 8px; }
.won { color: var(--olive-2); font-weight: 800; font-size: .95rem; margin-top: 4px; min-height: 1.4em; }
.err { color: var(--red); font-weight: 700; font-size: .92rem; margin-top: 6px; }
.field.bad .inp, .field.bad .sigbox { border-color: var(--red); }
.alert { background: var(--red-bg); border: 2px solid var(--red); color: var(--red); border-radius: 10px; padding: 12px 14px; font-weight: 700; margin: 12px 0; }
.alert ul { margin: 8px 0 0; padding-left: 20px; }
.note { background: var(--khaki); border-radius: 10px; padding: 12px 14px; font-size: .92rem; }

/* 체크 */
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 12px; border: 2px solid var(--line); border-radius: 12px; margin: 8px 0; cursor: pointer; background: #fff; }
.check input { width: 28px; height: 28px; flex: none; margin: 2px 0 0; accent-color: var(--olive); }
.check.on { border-color: var(--olive-2); background: #f5f7ef; }
.check.all { background: var(--olive); color: #fff; border-color: var(--olive); font-weight: 800; }
.check.all input { accent-color: #ffd98a; }
.consent-text { white-space: pre-line; font-size: .85rem; color: var(--muted); background: #f7f6f1; border-radius: 8px; padding: 10px 12px; margin: -2px 0 10px; }
.agree-line { font-weight: 800; margin-top: 14px; }

/* 계약서 본문 */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--khaki); padding: 5px; border-radius: 12px; margin: 12px 0; }
.tabs button { border: 0; background: transparent; min-height: 48px; border-radius: 9px; font-weight: 800; cursor: pointer; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.doc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; }
.doc h2 { text-align: center; font-size: 1.2rem; margin-bottom: 16px; }
.doc h3 { font-size: 1.08rem; margin: 22px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.doc p { margin: 0 0 10px; white-space: pre-line; }
.doc p.indent { padding-left: 1em; }
.doc strong { color: #7a1c15; }
.doc-note { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.orig img { width: 100%; display: block; border: 1px solid var(--line); border-radius: 8px; margin: 0 0 10px; background: #fff; }
.contract-img { margin: 12px 0; }
.contract-img img { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; display: block; }
.contract-img a { display: block; text-align: center; font-weight: 800; margin-top: 6px; color: var(--olive-2); }

/* 서명 */
.sigbox { border: 3px dashed #9d9683; border-radius: 12px; background: #fffef9; position: relative; }
.sigbox canvas { display: block; width: 100%; height: 230px; touch-action: none; cursor: crosshair; }
.sigbox .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #b1ab99; font-size: 1.4rem; font-weight: 800; pointer-events: none; text-align: center; }
.sigbox .ph small { display: block; font-size: .8rem; font-weight: 600; }
.sig-tools { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.sig-tools button { border: 0; background: none; color: var(--red); font-weight: 800; min-height: 44px; cursor: pointer; }
.stamp-in { color: var(--red); font-weight: 900; }

/* 올리기 */
.upload { border: 3px dashed #9d9683; border-radius: var(--radius); padding: 16px; background: #fffef9; text-align: center; }
.upload .prev { max-width: 100%; max-height: 340px; border-radius: 8px; margin: 0 auto 12px; display: block; }
.upload .pdf { font-weight: 800; padding: 22px; background: var(--khaki); border-radius: 8px; margin-bottom: 12px; }
.upload .empty { color: var(--muted); padding: 22px 0 14px; }

/* 검토 */
.review-list { list-style: none; padding: 0; margin: 10px 0; }
.review-list li { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); font-weight: 700; }
.review-list .ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--khaki); color: var(--muted); font-size: .9rem; }
.review-list li.ok .ic { background: var(--ok); color: #fff; }
.review-list li.no .ic { background: var(--red); color: #fff; }
.spin { width: 30px; height: 30px; border-radius: 50%; border: 4px solid var(--khaki); border-top-color: var(--olive-2); animation: sp 0.8s linear infinite; margin: 20px auto; }
.spin.sm { width: 22px; height: 22px; border-width: 3px; margin: 0; }
@keyframes sp { to { transform: rotate(360deg); } }

/* 완료 */
.done-mark { width: 96px; height: 96px; margin: 18px auto 8px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 3rem; font-weight: 900; }
.center { text-align: center; }
.done-msg { font-size: 1.3rem; font-weight: 900; }

/* 팝업 */
.modal-back { position: fixed; inset: 0; background: rgba(10,10,10,.62); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .15s; }
.modal { background: #fff; border-radius: 18px; max-width: 440px; width: 100%; padding: 26px 20px 20px; text-align: center; border-top: 8px solid var(--red); }
.modal-icon { width: 60px; height: 60px; border-radius: 50%; background: var(--red); color: #fff; font-size: 2.2rem; font-weight: 900; display: grid; place-items: center; margin: 8px auto 10px; }
.modal h3 { font-size: 1.35rem; margin: 6px 0; }
.modal .modal-q { font-weight: 800; font-size: 1.1rem; margin: 14px 0 4px; }
.modal .btn-row { margin-top: 16px; }
@keyframes fade { from { opacity: 0; } }

.toast { pointer-events: none; position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); background: #141414; color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 700; z-index: 60; max-width: calc(100% - 32px); }
.foot { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 30px; }

/* 0. 음성 설명 — 끝까지 들어야 질문이 열린다 (들은 부분 막대 길이는 스크립트가 CSSOM 으로 넣는다) */
.voice h1 { margin-top: 4px; }
.voice p { margin: 0 0 10px; }
.voice strong { color: var(--red); }
.player { display: flex; gap: 14px; align-items: center; background: var(--olive); color: #fff; border-radius: var(--radius); padding: 16px; margin: 16px 0 10px; }
.play { flex: none; width: 72px; height: 72px; border-radius: 50%; border: 0; background: #ffd98a; color: var(--olive); font-size: 1.7rem; font-weight: 900; cursor: pointer; display: grid; place-items: center; }
.play:active { transform: scale(.96); }
.ptrack { flex: 1; min-width: 0; }
.pbar { position: relative; height: 16px; background: rgba(255,255,255,.22); border-radius: 99px; cursor: pointer; }
.pbar .heard { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #ffd98a; border-radius: 99px; }
.pbar .now { position: absolute; top: 50%; left: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.ptime { display: flex; justify-content: space-between; gap: 6px; font-size: .85rem; margin-top: 10px; font-variant-numeric: tabular-nums; }
.ptime #vPct { font-weight: 800; color: #ffd98a; }
.pctrl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pstate { color: var(--olive-2); font-weight: 800; font-size: .95rem; }
.btn.sm { min-height: 44px; padding: 6px 14px; font-size: .95rem; }

/* 대표에게 보낼 문자 */
.sms-box { background: #f5f7ef; border: 2px dashed var(--olive-2); border-radius: 12px; padding: 14px; font-weight: 800; font-size: 1.08rem; white-space: pre-line; -webkit-user-select: all; user-select: all; }
.copy-ghost { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* 질문 미리 보기 · 다시 듣기 */
details.preview summary { font-weight: 800; cursor: pointer; min-height: 32px; }
details.preview[open] summary { margin-bottom: 10px; }
details.preview audio { width: 100%; }
.pq { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.pq b { display: inline-block; background: var(--olive); color: #fff; font-size: .8rem; padding: 2px 10px; border-radius: 6px; margin-bottom: 6px; }
.pq p { margin: 0 0 6px; font-size: .95rem; }
.pq strong { color: var(--red); }
.pq .ask-s { font-weight: 900; }

/* 테스트 기기(대표 PC)에서만 보이는 음성 건너뛰기 */
.card.tester { border: 3px dashed #1f5fd6; background: #eef4ff; }
.card.tester b { color: #1f5fd6; }
.card.tester .sub { margin: 4px 0 10px; }
.card.tester .btn { border-color: #1f5fd6; color: #1f5fd6; }

/* 2026-09-25 새 흐름: 음성 설명 대신 안내 글 */
.guide h2 { margin-bottom: 10px; }
.guide-list { margin: 0; padding-left: 1.3em; }
.guide-list li { margin: 0 0 10px; line-height: 1.6; }
.guide-list li strong { color: #0f1f6b; }
/* 약정서 v5 Y/N 항목 (2026-10-07) */
.check.ynq { cursor: default; }
.check.ynq > input { pointer-events: none; }
.yn-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.yn-pick .btn { min-height: 44px; font-weight: 800; }
/* 제자방 비밀번호 (2026-10-10) */
.pw-big { font-size: 2.6rem; font-weight: 900; letter-spacing: .3em; text-align: center; margin: 6px 0 10px; color: var(--olive); }
/* 약정서 부분 수정 동의서 (2026-10-15) — 60~70대도 읽기 쉽게 큰 글자 */
.amend-big .doc { font-size: 1.22rem; line-height: 1.75; }
.amend-big .doc h2 { font-size: 1.45rem; }
.amend-big .doc h3 { font-size: 1.3rem; }
.amend-big .lead, .amend-big .field label, .amend-big .label { font-size: 1.15rem; }
.amend-big .inp { font-size: 1.2rem; min-height: 52px; }
.amend-yn { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; margin-top: 12px; }
.amend-yn .btn { min-height: 64px; font-size: 1.25rem; font-weight: 900; }
.amend-yn .btn-y.on { box-shadow: 0 0 0 4px #f2c94c; }

/* 통합 신청 페이지 — 기존 제자 업데이트 작은 링크 (2026-10-17) */
.exlink{display:inline-block;margin:18px 0 6px;font-size:13px;color:#8A93A0;text-decoration:underline}

/* 3분 신청 (v3 · 2026-10-22) */
.v3-rows .r3{display:flex;gap:12px;padding:10px 0;border-bottom:1px solid #e3e6ec}.v3-rows .r3:last-child{border:0}
.v3-rows .r3 b{min-width:76px;color:#1f4fa0}
.v3-lead{font-size:1.2em;font-weight:700;color:#1f4fa0;margin:4px 0 8px}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{border:2px solid #cfd6e2;background:#fff;border-radius:22px;padding:9px 14px;font-size:1em;cursor:pointer;color:#222}
.chip.on{border-color:#1f4fa0;background:#e3f0ff;color:#1f4fa0;font-weight:700}
.v3-sum{background:#eef4fc;border-radius:12px;padding:12px 14px}.v3-sum p{margin:6px 0}.v3-sum b{color:#1f4fa0}
.v3-paid{background:#eef4fc;border-radius:12px;padding:12px 14px;margin-top:12px}
.v3-timer{font-weight:800;color:#2e7d32;font-size:2.2em;text-align:center;margin:6px 0}
.v3-full{max-height:60vh;overflow:auto;text-align:left;font-size:.92em}
.bot-btn{flex-direction:column;gap:2px}
.bot-btn small{display:block;font-weight:400;font-size:.8em;opacity:.85}
