@charset "utf-8";
/* ─────────────────────────────────────────────────────────────
   이사산정신청 — 디자인 토큰 + 접수 폼
   모바일 우선. 카카오 챗봇 인앱 브라우저에서 열리는 것을 기준으로 설계.
   사용자 상당수가 어르신이라 글자·터치영역을 크게 잡았다.
   브랜드 색은 화성시 로고에서 추출(#3050A0 / #F07020).
   ───────────────────────────────────────────────────────────── */

:root {
  /* 브랜드 */
  --brand:        #2f4f9e;
  --brand-strong: #24407f;
  --brand-tint:   #eef2fb;
  --accent:       #f07020;
  --accent-tint:  #fff2e8;

  /* 중립 */
  --bg:      #f4f6fa;
  --surface: #ffffff;
  --line:    #e2e6ee;
  --line-strong: #cfd6e4;
  --text:    #1a1f2b;
  --text-sub:#5c6577;
  --text-mute:#8b93a5;

  /* 상태 */
  --danger:      #d4342c;
  --danger-tint: #fdeeed;
  --success:     #17794a;
  --success-tint:#e9f7ef;

  /* 형태 */
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 60, .06);
  --shadow:    0 4px 16px rgba(20, 30, 60, .08);
  --shadow-lg: 0 12px 32px rgba(20, 30, 60, .14);

  /* 치수 */
  --tap: 52px;              /* 최소 터치 영역 */
  --gutter: 16px;
  --header-h: 60px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

/* hidden 속성이 항상 이긴다 (아래 .notice 등이 display 를 지정하므로 필요) */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard",
               "Malgun Gothic", "맑은 고딕", "Noto Sans KR", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── 헤더 ───────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: 720px;
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 10px var(--gutter);
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-header__logo { height: 32px; width: auto; flex: none; }

.site-header__title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-left: auto;
  color: var(--brand-strong);
}

/* ── 레이아웃 ───────────────────────────────────────── */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px var(--gutter) 140px;
}

.page-intro { margin-bottom: 20px; }

.page-intro h1 {
  font-size: clamp(24px, 6vw, 30px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.3;
}

.page-intro p {
  margin-top: 8px;
  color: var(--text-sub);
  font-size: 15.5px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 18px;
  margin-bottom: 16px;
}

.card__head { margin-bottom: 16px; }

.card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.card__step {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 14px; font-weight: 700;
}

.card__desc {
  margin-top: 6px;
  padding-left: 34px;
  color: var(--text-sub);
  font-size: 14.5px;
}

.req { color: var(--accent); font-weight: 700; }

/* ── 사진 첨부 ──────────────────────────────────────── */

.photo-input { display: none; }

.dropzone {
  width: 100%;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  background: var(--brand-tint);
  border: 2px dashed var(--line-strong);
  border-radius: var(--r);
  color: var(--brand-strong);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.dropzone:hover, .dropzone.is-over {
  border-color: var(--brand);
  background: #e6ecfa;
}

.dropzone__icon { width: 34px; height: 34px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.dropzone__hint { font-size: 13.5px; font-weight: 500; color: var(--text-sub); }

.dropzone[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.photo-grid:empty { display: none; }

.photo-item {
  position: relative;
  padding-top: 100%;            /* aspect-ratio 미지원 구형 웹뷰 폴백 */
  border-radius: var(--r-sm);
  overflow: hidden;
  background: #eceff5;
  border: 1px solid var(--line);
}

@supports (aspect-ratio: 1) {
  .photo-item { padding-top: 0; aspect-ratio: 1; }
}

.photo-item img { position: absolute; inset: 0; }

.photo-item img { width: 100%; height: 100%; object-fit: cover; }

.photo-item__del {
  position: absolute;
  top: 4px; right: 4px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: rgba(15, 20, 35, .68);
  color: #fff;
  font-size: 19px; line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(2px);
}

.photo-item__del:hover { background: var(--danger); }

.photo-count {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-sub);
  text-align: right;
}

/* ── 폼 필드 ────────────────────────────────────────── */

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

.field__label {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.input, .field input[type="text"], .field input[type="tel"] {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--text);
  font: inherit;
  font-size: 17px;   /* 16px 미만이면 iOS 가 자동 확대한다 */
  transition: border-color .15s, box-shadow .15s;
}

.input::placeholder { color: var(--text-mute); }

.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 79, 158, .14);
}

.input[readonly] { background: #f7f8fb; color: var(--text-sub); }

.input.is-error { border-color: var(--danger); background: var(--danger-tint); }

.field__error {
  display: none;
  margin-top: 6px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}

.field.has-error .field__error { display: block; }

.zip-row { display: flex; gap: 8px; }
.zip-row .input { flex: 1; min-width: 0; }

.btn-inline {
  flex: none;
  min-height: var(--tap);
  padding: 0 16px;
  border: 1.5px solid var(--brand);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--brand);
  font-size: 15.5px; font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s;
}

.btn-inline:hover { background: var(--brand-tint); }

/* 체크박스 */

.check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  padding: 10px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
}

/* :has() 미지원 웹뷰를 위해 JS 가 .is-checked 를 함께 토글한다 */
.check.is-checked {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.check input {
  width: 24px; height: 24px;
  flex: none;
  accent-color: var(--brand);
  cursor: pointer;
}

.check span { font-size: 16.5px; font-weight: 600; }

/* ── 인앱 브라우저 안내 ─────────────────────────────── */

.inapp {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 40px 14px 16px;
  margin-top: 4px;
  background: var(--accent-tint);
  border: 1px solid #f6d0ac;
  border-radius: var(--r);
}

.inapp__text { flex: 1; min-width: 180px; font-size: 14.5px; line-height: 1.5; color: #8a4610; }
.inapp__text strong { display: block; font-size: 15.5px; color: #7a3d0c; margin-bottom: 2px; }

.inapp__btn {
  flex: none;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.inapp__btn:hover { background: #d85f14; }

.inapp__close {
  position: absolute;
  top: 6px; right: 6px;
  width: 32px; height: 32px;
  border: 0; background: none;
  color: #a06030;
  font-size: 22px; line-height: 1;
  cursor: pointer;
}

/* ── 제출 바 ────────────────────────────────────────── */

.submit-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}

.submit-bar__inner { max-width: 720px; margin: 0 auto; }

.btn-primary {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: var(--r);
  background: var(--brand);
  color: #fff;
  font-size: 18.5px;
  font-weight: 800;
  letter-spacing: -.02em;
  cursor: pointer;
  transition: background .15s, transform .06s;
}

.btn-primary:hover:not(:disabled) { background: var(--brand-strong); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled { background: #a9b2c6; cursor: default; }

.btn-primary .spinner {
  width: 18px; height: 18px;
  margin-right: 8px;
  vertical-align: -3px;
  border: 2.5px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
  animation: spin .7s linear infinite;
}

.is-busy .btn-primary .spinner { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── 전체 화면 로딩 (중복 접수 차단) ────────────────── */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 22, 38, .62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  /* 아래 요소로 터치가 새어 나가지 않게 한다 */
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

/* inset 미지원 구형 웹뷰 폴백 */
@supports not (inset: 0) {
  .overlay { top: 0; right: 0; bottom: 0; left: 0; }
}

.overlay__box {
  width: 100%;
  max-width: 320px;
  padding: 32px 24px 28px;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.overlay__spinner {
  width: 46px; height: 46px;
  margin: 0 auto 18px;
  border: 4px solid var(--brand-tint);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.overlay__title { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.overlay__desc  { margin-top: 8px; font-size: 14.5px; color: var(--text-sub); line-height: 1.5; }

.overlay__bar {
  height: 8px;
  margin-top: 18px;
  border-radius: 99px;
  background: var(--brand-tint);
  overflow: hidden;
}

.overlay__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--brand);
  transition: width .25s ease;
}

/* 로딩 중에는 배경 스크롤을 잠근다 */
body.is-locked { overflow: hidden; position: relative; }

/* ── 알림 배너 ──────────────────────────────────────── */

.notice {
  display: flex;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}

.notice--error   { background: var(--danger-tint);  color: var(--danger);  border: 1px solid #f3c9c6; }
.notice--success { background: var(--success-tint); color: var(--success); border: 1px solid #bfe6d0; }
.notice--info    { background: var(--accent-tint);  color: #9a4a10;        border: 1px solid #f6d8bf; }

/* ── 완료 페이지 ────────────────────────────────────── */

.done {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px var(--gutter);
  text-align: center;
}

.done__icon {
  width: 84px; height: 84px;
  margin: 0 auto 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--success-tint);
  color: var(--success);
}

.done__icon svg { width: 42px; height: 42px; stroke: currentColor; fill: none; stroke-width: 2.5; }

.done h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.done p  { margin-top: 12px; color: var(--text-sub); font-size: 16px; }

.done__box {
  margin: 26px 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  text-align: left;
}

.done__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
}

.done__row:last-child { border-bottom: 0; }
.done__row dt { color: var(--text-sub); flex: none; }
.done__row dd { margin: 0; font-weight: 700; text-align: right; }

/* ── 반응형 ─────────────────────────────────────────── */

@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .card { padding: 26px 24px; }
  .site-header__logo { height: 38px; }
  .site-header__title { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.done__foot { margin-top: 8px; font-size: 14.5px; color: var(--text-mute); }
.done__foot a { color: var(--brand); font-weight: 700; text-decoration: none; }


/* ── 자주 하는 질문 ─────────────────────────────────── */

.page--faq { padding-bottom: 120px; }

.faq-filter {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.faq-chip {
  min-height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 99px;
  background: var(--surface);
  color: var(--text-sub);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.faq-chip span { opacity: .6; font-weight: 600; margin-left: 2px; }
.faq-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.faq-chip.on span { opacity: .85; }

.faq-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 0; }

.faq-q {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 16px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  line-height: 1.45;
}

.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { background: #fafbfe; }

.faq-q__mark {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 14px; font-weight: 800;
  margin-top: 1px;
}

.faq-q__text { flex: 1; font-size: 16px; letter-spacing: -.02em; }

.faq-q__arrow { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--text-mute); transition: transform .2s; }
.faq-q__arrow svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 2.2; }
.faq-item[open] .faq-q__arrow { transform: rotate(180deg); }
.faq-item[open] .faq-q { background: var(--brand-tint); }

.faq-a {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 4px 16px 20px;
}

.faq-a__mark {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent);
  font-size: 14px; font-weight: 800;
}

.faq-a__text { flex: 1; min-width: 0; }
.faq-a__text p { margin: 0 0 7px; font-size: 15.5px; line-height: 1.65; color: var(--text-sub); }
.faq-a__text p:last-child { margin-bottom: 0; }
.faq-a__text a { color: var(--brand); font-weight: 700; word-break: break-all; }

.faq-a__text p.faq-note {
  padding: 9px 12px;
  margin: 8px 0;
  background: #f7f8fb;
  border-left: 3px solid var(--line-strong);
  border-radius: 0 6px 6px 0;
  font-size: 14.5px;
}

.faq-empty { padding: 40px 20px; text-align: center; color: var(--text-mute); }

.faq-contact {
  margin-top: 20px;
  padding: 20px 18px;
  background: var(--brand-tint);
  border-radius: var(--r-lg);
  text-align: center;
}

.faq-contact strong { display: block; font-size: 16px; margin-bottom: 8px; }
.faq-contact p { font-size: 15.5px; color: var(--text-sub); margin-bottom: 4px; }
.faq-contact a { color: var(--brand); font-weight: 800; text-decoration: none; }
.faq-contact__sub { font-size: 13.5px !important; color: var(--text-mute) !important; margin-top: 8px; }

/* 접수 폼 하단의 도움말 링크 */
.help-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--brand-strong);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.help-link:hover { background: var(--brand-tint); }
.help-link svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; }
