/* 시민(일반 고객/어르신) 가입 · 허브 · 주소 화면 공통 스타일
   - 모든 글씨 20px 이상, 터치 영역 72px 이상
   - 스크롤 없이 한 화면에 들어오도록 100dvh 기준 */
:root {
  --ink: #1B1B1F;
  --sub: #4A4F5A;
  --cream: #FFF9E8;
  --kakao: #FEE500;
  --kakao-edge: #E3CC00;
  --kakao-shadow: #C9B400;
  --courier: #D9480F;
  --courier-edge: #A63608;
  --market: #17803F;
  --market-edge: #0F5F2D;
  --danger: #B42318;
  --danger-bg: #FEF3F2;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

html { font-size: 20px; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background: #F8F9FA;
  display: flex;
  justify-content: center;
  line-height: 1.5;
}

.screen {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 22px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; }

/* ---------- 가입 화면 ---------- */
.login { justify-content: center; align-items: center; text-align: center; gap: 26px; }
.logo {
  width: 104px; height: 104px; border-radius: 26px; background: #fff;
  box-shadow: 0 12px 28px rgba(80, 60, 0, 0.18);
  animation: rise 0.6s ease both;
}
.brand { font-size: 1.15rem; font-weight: 800; color: #8A6A00; letter-spacing: 0.04em; margin-top: -12px; }
.headline { font-size: 1.6rem; font-weight: 800; line-height: 1.4; letter-spacing: -0.02em; word-break: keep-all; animation: rise 0.6s 0.08s ease both; }
.lead { font-size: 1.15rem; color: var(--sub); line-height: 1.6; word-break: keep-all; animation: rise 0.6s 0.14s ease both; }
.lead b { color: var(--ink); }

.alert {
  width: 100%; padding: 16px 18px; border-radius: 16px; font-size: 1rem; font-weight: 700; line-height: 1.5;
  background: var(--danger-bg); color: var(--danger); border: 2px solid #FDA29B; word-break: keep-all;
}

.btn-kakao {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 96px; padding: 14px 18px;
  background: var(--kakao); color: #191919; border: 3px solid var(--kakao-edge); border-radius: 22px;
  font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.3; text-align: center;
  box-shadow: 0 6px 0 var(--kakao-shadow), 0 16px 28px rgba(120, 100, 0, 0.22);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s;
  touch-action: manipulation; cursor: pointer; animation: rise 0.6s 0.2s ease both;
}
.btn-kakao:hover { background: #F7DC00; }
.btn-kakao:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--kakao-shadow), 0 6px 12px rgba(120, 100, 0, 0.2); }
.btn-kakao .ico { font-size: 1.7rem; line-height: 1; }

.secure { font-size: 1rem; color: var(--sub); line-height: 1.6; word-break: keep-all; }
.secure .lock { font-size: 1.15rem; }

/* ---------- 허브 (카드 2개가 화면을 꽉 채움) ---------- */
.hub { gap: 16px; height: 100vh; height: 100dvh; padding-top: 18px; }
.welcome { text-align: center; flex: 0 0 auto; }
.welcome h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; word-break: keep-all; }
.welcome p { font-size: 1.05rem; color: var(--sub); margin-top: 2px; }

.cards { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.card {
  flex: 1 1 0; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 16px; text-align: center; color: #1F2937;
  border-radius: 24px; border: 2px solid #E5E7EB; background: #FFFFFF;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.04);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.15s ease; touch-action: manipulation;
  animation: rise 0.55s ease both;
}
.card:nth-child(2) { animation-delay: 0.1s; }
.card:active { transform: translateY(3px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); }
.card-courier { background: #F1F3F5; border-color: #E2E8F0; }
.card-courier:hover { background: #E9ECEF; }
.card-market { background: #F1F3F5; border-color: #E2E8F0; }
.card-market:hover { background: #E9ECEF; }
.card .emoji { font-size: clamp(2.8rem, 10dvh, 4.5rem); line-height: 1; filter: grayscale(100%) opacity(0.8); }
.card .title { font-size: clamp(1.4rem, 4.5dvh, 1.9rem); font-weight: 800; color: #111827; letter-spacing: -0.02em; line-height: 1.2; }
.card .desc { font-size: 0.95rem; font-weight: 500; color: #4B5563; line-height: 1.4; word-break: keep-all; }

/* ---------- 하단 사업자 정보 푸터 ---------- */
.citizen-footer {
  flex: 0 0 auto;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #E5E7EB;
  text-align: center;
  font-size: 0.65rem;
  line-height: 1.6;
  color: #6B7280;
  word-break: keep-all;
}
.citizen-footer .biz-title {
  font-weight: 700;
  color: #374151;
  margin-bottom: 2px;
}
.citizen-footer .biz-links {
  margin-top: 6px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.citizen-footer .biz-links a {
  color: #4B5563;
  text-decoration: underline;
}

/* ---------- 주소 입력 ---------- */
.address { gap: 18px; }
.address h1 { font-size: 1.55rem; font-weight: 800; line-height: 1.4; word-break: keep-all; text-align: center; letter-spacing: -0.02em; }
.address .hint { text-align: center; font-size: 1.05rem; color: var(--sub); word-break: keep-all; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 1.05rem; font-weight: 800; }
.input {
  width: 100%; min-height: 72px; padding: 12px 16px; font-size: 1.15rem; border: 3px solid #C7CBD3;
  border-radius: 16px; background: #fff; color: var(--ink);
}
.input[readonly] { background: #F3F4F6; }
.input:focus { border-color: var(--ink); outline: none; }
.btn-main, .btn-sub {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 80px; padding: 12px 16px;
  border-radius: 20px; font-size: 1.3rem; font-weight: 800; border: 0; cursor: pointer; touch-action: manipulation;
}
.btn-main { background: var(--ink); color: #fff; box-shadow: 0 5px 0 #000; }
.btn-main:active { transform: translateY(4px); box-shadow: 0 1px 0 #000; }
.btn-main:disabled { background: #9AA0AA; box-shadow: none; cursor: not-allowed; }
.btn-sub { background: #fff; color: var(--ink); border: 3px solid var(--ink); }
.form-error { min-height: 1.5em; color: var(--danger); font-weight: 700; font-size: 1rem; text-align: center; word-break: keep-all; }

.postcode-layer { position: fixed; inset: 0; z-index: 50; background: #fff; display: flex; flex-direction: column; }
.postcode-layer .bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 2px solid #E5E7EB; font-size: 1.15rem; font-weight: 800; }
.postcode-layer .bar button { min-height: 56px; padding: 0 20px; font-size: 1.05rem; font-weight: 800; border: 2px solid var(--ink); border-radius: 14px; background: #fff; }
.postcode-layer .box { flex: 1; min-height: 0; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 키가 작은 폰(SE 등)에서도 카드 2개가 한 화면에 들어오도록 */
@media (max-height: 640px) {
  .hub { gap: 10px; padding-top: 12px; }
  .cards { gap: 10px; }
  .welcome h1 { font-size: 1.3rem; }
  .card .desc { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
