/* 한국지역재난안전학회 창립회원 신청. 휴대폰 화면을 먼저 생각한 한 장짜리 화면. CI: 짙은 주황 #C2531B, 먹 #2B2B2B
   글꼴은 기기에 있는 것만 쓴다(바깥 글꼴을 받지 않아 첫 화면이 빨리 뜬다). */
:root {
  --brand: #C2531B;
  --brand-dark: #9E4214;
  --brand-soft: #FBF1EB;
  --ink: #2B2B2B;
  --ink-2: #4A4A4A;
  --ink-3: #66605B;        /* 흰 바탕 대비 약 6:1 */
  --line: #E6E2DE;         /* 구획선 */
  --field-line: #8F8780;   /* 입력 칸 경계, 흰 바탕 대비 약 3.6:1 */
  --bg: #FFFFFF;
  --bg-2: #F7F5F3;
  --err: #B3261E;
  --radius: 14px;
  --gutter: 20px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* 클래스 규칙이 hidden을 덮지 않게 */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "맑은 고딕", sans-serif;
  font-size: 17px; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere;
}
body.locked { overflow: hidden; }
img { max-width: 100%; }
.top { padding: 18px var(--gutter) 6px; max-width: 640px; margin: 0 auto; }
.logo { display: block; width: 220px; height: auto; }
main { max-width: 640px; margin: 0 auto; padding: 0 var(--gutter) 40px; }

.hero { padding: 18px 0 18px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 6px; color: var(--brand); font-weight: 700; font-size: 15px; }
h1 { margin: 0 0 12px; font-size: 27px; line-height: 1.33; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 22px; line-height: 1.35; margin: 30px 0 14px; }
.lead { margin: 0 0 10px; color: var(--ink-2); font-size: 16px; }
.doc-links, .foot-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 12px; border: 1.5px solid var(--brand);
  font: inherit; font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:active { background: var(--brand-dark); }
.btn.ghost { background: #fff; color: var(--brand-dark); }
.btn.small { min-height: 46px; padding: 0 16px; font-size: 16px; white-space: nowrap; }
.btn.block { display: flex; width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.link { background: none; border: 0; padding: 10px 2px; min-height: 44px; color: var(--brand-dark); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link.inline { padding: 4px 2px; min-height: 0; margin-right: 8px; }

.form { padding-top: 6px; }
.group { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }
legend { font-weight: 800; font-size: 18px; margin: 0 0 10px; padding: 0; }
.sub { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.sub-legend { font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.hint { color: var(--ink-3); font-size: 15px; margin: 4px 0 10px; }
.hint.center { text-align: center; }
.req, .opt { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 99px; vertical-align: 2px; margin-left: 4px; }
.req { color: var(--brand-dark); background: var(--brand-soft); }
.opt { color: var(--ink-3); background: var(--bg-2); }
.req-t { color: var(--brand-dark); }
.opt-t { color: var(--ink-3); }

.field { margin: 0 0 16px; }
.field > label { display: block; font-weight: 700; margin: 0 0 6px; }
input[type=text], input[type=tel], input[type=email], input[type=password] {
  display: block; width: 100%; min-height: 52px; padding: 12px 14px; margin: 0 0 8px;
  border: 1.5px solid var(--field-line); border-radius: 12px; background: #fff; color: var(--ink);
  font: inherit; font-size: 17px; -webkit-appearance: none; appearance: none;
}
input::placeholder { color: #8C847D; }
input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(194, 83, 27, .2); }
input[aria-invalid=true] { border-color: var(--err); }
.row { display: flex; gap: 8px; align-items: flex-start; }
.row .zip { flex: 0 0 120px; }
.err { color: var(--err); font-size: 15px; margin: 2px 0 0; }
.err:empty { display: none; }

.choices { display: grid; gap: 10px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--field-line); border-radius: var(--radius); cursor: pointer; background: #fff; }
.choice input { margin-top: 5px; width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.choice .c-body b { display: block; font-size: 17px; }
.choice .c-body small { display: block; color: var(--ink-2); font-size: 15px; line-height: 1.55; margin-top: 2px; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choices.compact .choice { padding: 12px 14px; font-size: 16px; }
.choices.grid2 { grid-template-columns: 1fr 1fr; gap: 8px; }
.choices.grid2 .choice { padding: 12px 10px; gap: 8px; }
.choices.grid2 .choice input { margin-top: 3px; }
.choices.grid2 .c-body small { font-size: 13px; }
.invalid .choice { border-color: var(--err); }

.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label, .tags label { position: relative; }
.seg input, .tags input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span, .tags span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 16px; border: 1.5px solid var(--field-line); border-radius: 99px; cursor: pointer; font-size: 16px; background: #fff; }
.seg input:checked + span, .tags input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.seg input:focus-visible + span, .tags input:focus-visible + span { box-shadow: 0 0 0 3px rgba(194, 83, 27, .3); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }

.consent .check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 6px 0; font-weight: 700; }
.consent .check input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.consent .check.all { padding: 14px 16px; border: 1.5px solid var(--brand); border-radius: var(--radius); background: var(--brand-soft); margin-bottom: 10px; }
.agree { border-bottom: 1px solid var(--line); padding: 8px 0 10px; }
.agree-sum { margin: 2px 0 4px 32px; font-size: 15px; color: var(--ink-2); }
dl.agree-sum { background: var(--bg-2); border-radius: 10px; padding: 10px 12px; }
dl.agree-sum dt { font-weight: 700; color: var(--ink); margin-top: 4px; }
dl.agree-sum dt:first-child { margin-top: 0; }
dl.agree-sum dd { margin: 0; }
.agree-note { margin: 4px 0 0 32px; font-size: 14px; color: var(--ink-3); }
.agree-note .link.inline { margin-right: 0; padding: 0; font-size: 14px; }

.sign-box { border: 1.5px dashed var(--field-line); border-radius: var(--radius); padding: 12px; background: #fff; }
.sign-box img { display: block; max-height: 110px; margin: 0 auto 10px; }
.invalid .sign-box { border-color: var(--err); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.submit-area { margin-top: 8px; }
#form-err { text-align: center; margin-bottom: 10px; }

.addr-layer { border: 1.5px solid var(--field-line); border-radius: var(--radius); overflow: hidden; margin: 0 0 10px; }
.addr-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 12px; background: var(--bg-2); font-weight: 700; font-size: 15px; }
#addr-embed { height: 420px; }

.done { text-align: center; padding: 36px 0 20px; outline: none; }
.done-mark { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--brand); position: relative; }
.done-mark::after { content: ""; position: absolute; left: 22px; top: 15px; width: 16px; height: 28px; border: solid #fff; border-width: 0 5px 5px 0; transform: rotate(45deg); }
.done h2 { margin-top: 0; }
.receipt { font-size: 18px; }
.receipt b { color: var(--brand-dark); letter-spacing: 0.02em; }
.done-actions { display: grid; gap: 10px; margin-top: 22px; }

.foot { max-width: 640px; margin: 0 auto; padding: 18px var(--gutter) calc(30px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px; }
.foot p { margin: 2px 0; }

/* 약관·정관·처리방침 보기와 서명 창 */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-panel { background: #fff; width: 100%; max-width: 680px; max-height: 92vh; max-height: 92dvh; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px 10px 20px; border-bottom: 1px solid var(--line); }
.sheet-head b { font-size: 18px; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 20px 24px; font-size: 16px; outline: none; }
.sign-panel { padding: 0 20px 20px; }
.sign-panel .sheet-head { margin: 0 -20px 10px; }
.sign-tabs { display: flex; gap: 8px; margin-bottom: 4px; }
.sign-tabs button { flex: 1; min-height: 44px; border: 1.5px solid var(--field-line); border-radius: 10px; background: #fff; font: inherit; font-size: 15px; cursor: pointer; }
.sign-tabs button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
#sign { display: block; width: 100%; height: 220px; border: 1.5px dashed var(--field-line); border-radius: var(--radius); touch-action: none; background: #fff; }
#sign-text { font-size: 22px; }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet-panel { border-radius: 18px; } }

/* 문서(약관·정관·처리방침) 본문 */
.doc h2 { font-size: 19px; margin: 22px 0 8px; }
.doc h3 { font-size: 17px; margin: 18px 0 6px; }
.doc p, .doc li { color: var(--ink-2); }
.doc p { margin: 6px 0; }
.doc ol, .doc ul { padding-left: 1.3em; margin: 6px 0; }
.doc .art { margin: 12px 0 4px; font-weight: 700; color: var(--ink); }
.doc .note { background: var(--bg-2); border-radius: 10px; padding: 10px 14px; font-size: 15px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0; }
.doc th, .doc td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.doc th { background: var(--bg-2); }
.page { max-width: 680px; margin: 0 auto; padding: 0 var(--gutter) 40px; }

/* PDF로 만들 신청서(화면 밖에 그린다) */
#paper-host { position: fixed; left: -10000px; top: 0; }
.paper { width: 794px; padding: 40px 56px 36px; background: #fff; color: #111; font-family: -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; font-size: 14px; line-height: 1.5; word-break: keep-all; }
.paper .p-logo { width: 220px; display: block; margin-bottom: 14px; }
.paper h1 { font-size: 24px; text-align: center; margin: 0 0 4px; letter-spacing: 0.3em; }
.paper .p-sub { text-align: center; color: #555; margin: 0 0 16px; font-size: 13px; }
.paper table { width: 100%; border-collapse: collapse; margin: 0 0 12px; }
.paper th, .paper td { border: 1px solid #999; padding: 6px 9px; text-align: left; vertical-align: middle; }
.paper th { width: 170px; background: #F4F1EE; font-weight: 700; }
.paper .p-agree td, .paper .p-agree th { font-size: 13px; }
.paper .p-end { break-inside: avoid; page-break-inside: avoid; }
.paper .p-sign { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 14px; font-size: 15px; }
.paper .p-sign img { height: 64px; border-bottom: 1px solid #999; }
.paper .p-to { text-align: center; font-size: 17px; font-weight: 700; margin-top: 20px; }
.paper .p-meta { color: #666; font-size: 12px; margin-top: 12px; text-align: center; }

@media (min-width: 700px) {
  h1 { font-size: 32px; }
  .logo { width: 260px; }
}
