:root {
  --navy: #09265a;
  --navy-soft: #edf2fb;
  --red: #c9001c;
  --gold: #d99a00;
  --gold-soft: #fff3ce;
  --ink: #172033;
  --muted: #6e7788;
  --line: #e6e8ee;
  --surface: #ffffff;
  --background: #fffaf2;
  --danger: #b42318;
  --shadow: 0 14px 38px rgba(9, 38, 90, 0.1);
}

* { box-sizing: border-box; }

html { background: var(--background); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 5%, rgba(217, 154, 0, 0.09), transparent 28rem),
    linear-gradient(180deg, #fffdf9 0%, var(--background) 100%);
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-shell {
  width: min(100%, 680px);
  min-height: 100vh;
  margin: 0 auto;
  background: rgba(255,255,255,0.78);
  border-inline: 1px solid rgba(230,232,238,0.8);
  position: relative;
}

.topbar {
  height: 64px;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(230,232,238,0.8);
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--navy);
  font-size: 24px;
  cursor: pointer;
}
.icon-button:hover { background: var(--navy-soft); }
.icon-button:disabled { opacity: 0; pointer-events: none; }

.brand-mini { justify-self: center; font-weight: 900; letter-spacing: -0.04em; }
.brand-jy { color: var(--red); font-size: 22px; margin-right: 5px; }
.brand-express { color: var(--navy); font-size: 18px; }

.progress-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 22px 0;
}
.progress-track { height: 7px; background: #eceef3; border-radius: 999px; flex: 1; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), #f1b925); border-radius: inherit; transition: width .3s ease; }
.progress-label { min-width: 45px; color: var(--muted); font-size: 13px; font-weight: 700; text-align: right; }

.screen { padding: 34px 22px 130px; }
.eyebrow { color: var(--gold); font-weight: 900; font-size: 14px; letter-spacing: .04em; margin: 0 0 10px; }
.screen h1 { margin: 0; color: var(--navy); font-size: clamp(28px, 7.2vw, 38px); line-height: 1.22; letter-spacing: -0.045em; }
.description { margin: 14px 0 28px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.required-note { color: var(--muted); font-size: 13px; }

.intro { text-align: center; padding-top: 12px; }
.hero-logo {
  width: 168px;
  height: 168px;
  object-fit: cover;
  border-radius: 44px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}
.intro h1 { font-size: clamp(32px, 9vw, 44px); }
.intro .description { max-width: 430px; margin-inline: auto; }
.time-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--gold-soft); color: #7b5700; border-radius: 999px; font-weight: 800; font-size: 14px; }

.choice-list { display: grid; gap: 12px; }
.choice-card {
  min-height: 72px;
  width: 100%;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(9,38,90,0.045);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.choice-card:hover { transform: translateY(-1px); border-color: #b8c4d9; }
.choice-card.selected { border-color: var(--navy); background: var(--navy-soft); box-shadow: 0 0 0 3px rgba(9,38,90,.06); }
.choice-icon { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-soft); font-size: 22px; flex: 0 0 auto; }
.choice-copy { flex: 1; }
.choice-title { display: block; font-size: 17px; font-weight: 850; letter-spacing: -.02em; }
.choice-subtitle { display: block; color: var(--muted); margin-top: 4px; font-size: 13px; line-height: 1.45; }
.checkmark { color: var(--navy); font-weight: 900; opacity: 0; }
.choice-card.selected .checkmark { opacity: 1; }

.field-group { display: grid; gap: 10px; margin: 0 0 22px; }
.field-label { font-size: 15px; font-weight: 850; color: var(--ink); }
.field-label small { color: var(--muted); font-weight: 600; }
.text-input, .text-area, .select-input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 15px;
  background: #fff;
  padding: 15px 16px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.text-input:focus, .text-area:focus, .select-input:focus { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(9,38,90,.08); }
.text-area { min-height: 108px; resize: vertical; line-height: 1.55; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.address-search-row { display: grid; grid-template-columns: 112px 1fr; gap: 10px; }
.postcode-input { text-align: center; background: #f7f8fa; color: var(--muted); }
.address-search-button { min-height: 52px; border: 0; border-radius: 15px; background: var(--navy); color: #fff; font-weight: 900; cursor: pointer; }
.address-selected { background: #f7f8fa; color: var(--ink); cursor: pointer; }
.address-selected::placeholder { color: #8a93a3; }
.input-with-unit { position: relative; }
.input-with-unit .text-input { padding-right: 50px; }
.input-unit { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 11px 15px;
  color: var(--ink);
  background: #fff;
  font-weight: 750;
  cursor: pointer;
}
.chip.selected { color: #fff; background: var(--navy); border-color: var(--navy); }

.section-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; margin-bottom: 16px; }
.section-card h2 { font-size: 17px; color: var(--navy); margin: 0 0 16px; }
.helper { margin: -4px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }

.item-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.item-card { border: 1.5px solid var(--line); border-radius: 16px; background: #fff; padding: 14px; min-height: 90px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; }
.item-card.selected { border-color: var(--navy); background: var(--navy-soft); }
.item-name { font-weight: 850; }
.counter { margin-top: 12px; display: flex; justify-content: space-between; align-items: center; }
.counter button { width: 30px; height: 30px; border: 0; border-radius: 10px; background: #fff; color: var(--navy); font-size: 20px; font-weight: 900; box-shadow: 0 2px 8px rgba(9,38,90,.1); cursor: pointer; }
.counter strong { color: var(--navy); }

.upload-box { border: 2px dashed #bdc7d8; border-radius: 20px; padding: 28px 18px; background: #fff; text-align: center; }
.upload-icon { font-size: 38px; }
.upload-box h2 { margin: 12px 0 8px; color: var(--navy); font-size: 19px; }
.upload-box p { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.secondary-button { display: inline-flex; justify-content: center; align-items: center; border: 1.5px solid var(--navy); color: var(--navy); background: #fff; border-radius: 14px; min-height: 48px; padding: 0 18px; font-weight: 850; cursor: pointer; }
.file-input { display: none; }
.file-list { margin-top: 14px; display: grid; gap: 8px; }
.file-pill { padding: 10px 12px; background: var(--navy-soft); color: var(--navy); border-radius: 12px; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.summary { display: grid; gap: 14px; }
.summary-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.summary-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.summary-head h2 { margin: 0; font-size: 17px; color: var(--navy); }
.edit-link { border: 0; background: transparent; color: var(--red); font-weight: 850; cursor: pointer; }
.summary-row { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 7px 0; font-size: 14px; line-height: 1.5; }
.summary-row span:first-child { color: var(--muted); }
.summary-row span:last-child { font-weight: 700; overflow-wrap: anywhere; }
.consent { display: flex; align-items: flex-start; gap: 11px; margin-top: 18px; padding: 16px; border-radius: 16px; background: var(--gold-soft); line-height: 1.55; font-size: 14px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--navy); flex: 0 0 auto; }

.info-notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 4px;
  padding: 15px 16px;
  border: 1px solid #dbe4f3;
  border-radius: 16px;
  background: var(--navy-soft);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.info-notice p { margin: 0; }
.info-notice strong { color: var(--navy); }

.privacy-detail {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.privacy-detail summary { padding: 13px 15px; color: var(--navy); font-weight: 800; cursor: pointer; }
.privacy-detail dl { margin: 0; padding: 0 15px; }
.privacy-detail dl div { display: grid; grid-template-columns: 72px 1fr; gap: 8px; padding: 8px 0; border-top: 1px solid #f0f1f4; }
.privacy-detail dt { color: var(--ink); font-weight: 800; }
.privacy-detail dd { margin: 0; }
.privacy-detail p { margin: 8px 15px 14px; }

.bottom-action {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 680px);
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 25%);
  z-index: 15;
}
.primary-button { width: 100%; min-height: 58px; border: 0; border-radius: 17px; background: var(--navy); color: #fff; font-size: 18px; font-weight: 900; box-shadow: 0 12px 24px rgba(9,38,90,.22); cursor: pointer; }
.primary-button:disabled { background: #c9ced7; box-shadow: none; cursor: not-allowed; }

.success { text-align: center; padding-top: 38px; }
.success-mark { width: 86px; height: 86px; border-radius: 50%; background: #e8f7ed; color: #147a38; display: grid; place-items: center; margin: 0 auto 24px; font-size: 42px; font-weight: 900; }
.request-number { display: inline-flex; padding: 12px 16px; background: var(--navy-soft); color: var(--navy); border-radius: 14px; font-weight: 850; margin: 6px 0 22px; }
.notice-card { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; margin-top: 18px; line-height: 1.65; color: var(--muted); }
.notice-card strong { display: block; color: var(--ink); margin-bottom: 8px; }
.notice-card p { margin: 0; }
.notice-card p + p { margin-top: 8px; }
.no-break { white-space: nowrap; }

.toast { position: fixed; left: 50%; bottom: 92px; transform: translate(-50%, 15px); opacity: 0; pointer-events: none; padding: 12px 16px; border-radius: 12px; background: #212733; color: #fff; font-size: 14px; font-weight: 700; transition: .2s ease; z-index: 100; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.postcode-modal[hidden] { display: none; }
.postcode-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(9, 22, 45, .58);
  backdrop-filter: blur(6px);
}
.postcode-panel {
  width: min(100%, 560px);
  height: min(760px, calc(100dvh - 32px));
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
}
.postcode-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.postcode-header strong { display: block; color: var(--navy); font-size: 19px; }
.postcode-header span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.postcode-close { width: 42px; height: 42px; border: 0; border-radius: 14px; background: var(--navy-soft); color: var(--navy); font-size: 28px; line-height: 1; cursor: pointer; }
.postcode-layer { min-height: 0; width: 100%; height: 100%; overflow: auto; -webkit-overflow-scrolling: touch; }

@media (min-width: 700px) {
  body { padding: 26px 0; }
  .app-shell { min-height: calc(100vh - 52px); border-radius: 28px; box-shadow: var(--shadow); overflow: hidden; }
  .bottom-action { bottom: 26px; border-radius: 0 0 28px 28px; }
  .screen { padding-inline: 46px; }
  .progress-wrap { padding-inline: 46px; }
}

@media (max-width: 420px) {
  .field-row { grid-template-columns: 1fr; }
  .address-search-row { grid-template-columns: 96px 1fr; }
  .item-grid { grid-template-columns: 1fr 1fr; }
  .summary-row { grid-template-columns: 78px 1fr; }
  .postcode-modal { padding: 0; }
  .postcode-panel { width: 100%; height: 100dvh; border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
