body { background: var(--white); }

.funnel {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
}

.funnel-top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  padding: 0 12px;
  background: var(--white);
}
.back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--grey-800);
}
.back:hover { background: var(--grey-100); }
.back svg { width: 24px; height: 24px; }
.progress { flex: 1; height: 4px; margin-right: 12px; border-radius: 2px; background: var(--grey-100); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--blue-500); border-radius: inherit; transition: width 0.5s var(--ease); }

.funnel-body { flex: 1; padding: 24px 24px 140px; }
.funnel-body.enter { animation: step-in 0.45s var(--ease); }
@keyframes step-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

.step-title { color: var(--grey-900); font-size: 26px; line-height: 1.4; letter-spacing: -0.02em; font-weight: 400; }
.step-desc { margin-top: 10px; color: var(--grey-600); font-size: 16px; }
.step-label { margin: 36px 0 12px; color: var(--grey-600); font-size: 15px; }
.step-title + .options, .step-desc + .options { margin-top: 32px; }

.options { display: grid; gap: 10px; }
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 20px;
  border-radius: 16px;
  background: var(--grey-50);
  text-align: left;
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: background-color 0.2s, box-shadow 0.2s;
}
.option:hover { background: var(--grey-100); }
.option[aria-pressed="true"] { background: var(--blue-50); box-shadow: inset 0 0 0 1.5px var(--blue-500); }
.option-title { display: block; color: var(--grey-900); font-size: 18px; }
.option-sub { display: block; margin-top: 2px; color: var(--grey-600); font-size: 14px; }
.option[aria-pressed="true"] .option-title { color: var(--blue-700); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--grey-100);
  color: var(--grey-700);
  font-size: 16px;
  transition: background-color 0.2s, color 0.2s;
}
.chip:hover { background: var(--grey-200); }
.chip[aria-pressed="true"] { background: var(--blue-500); color: var(--white); }

.swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.swatch { padding: 12px 12px 16px; flex-direction: column; align-items: stretch; gap: 12px; }
.swatch-colors { display: flex; height: 72px; border-radius: 10px; overflow: hidden; }
.swatch-colors span { flex: 1; }
.swatch-colors.unknown { background: repeating-linear-gradient(45deg, var(--grey-100) 0 8px, var(--grey-200) 8px 16px); }
.swatch .option-title { font-size: 16px; padding: 0 4px; }

.field { display: block; margin-top: 16px; }
.field-label { display: block; margin-bottom: 8px; color: var(--grey-600); font-size: 14px; }
.input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--grey-100);
  color: var(--grey-900);
  font-size: 18px;
  outline: none;
  box-shadow: inset 0 0 0 1.5px transparent;
  transition: box-shadow 0.2s, background-color 0.2s;
}
.input::placeholder { color: var(--grey-400); }
.input:focus { background: var(--white); box-shadow: inset 0 0 0 1.5px var(--blue-500); }
.field-error { display: block; min-height: 1.4em; margin-top: 6px; color: #f04452; font-size: 14px; }

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  padding: 40px 20px;
  border-radius: 20px;
  border: 1.5px dashed var(--grey-300);
  background: var(--grey-50);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--blue-500); background: var(--blue-50); }
.dropzone svg { width: 44px; height: 44px; margin-bottom: 4px; }
.dropzone strong { color: var(--grey-900); font-size: 17px; font-weight: 400; }
.dropzone span { color: var(--grey-500); font-size: 14px; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.files { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 16px;
  border-radius: 14px;
  background: var(--grey-50);
}
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--grey-800); font-size: 15px; }
.file-size { color: var(--grey-500); font-size: 13px; }
.file-remove { width: 32px; height: 32px; border-radius: 8px; color: var(--grey-500); font-size: 20px; line-height: 1; }
.file-remove:hover { background: var(--grey-200); }

.text-link { display: inline-block; margin-top: 20px; padding: 6px 2px; color: var(--grey-600); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }

.reveal-box { margin-top: 16px; }
.note { margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--grey-50); color: var(--grey-600); font-size: 15px; }

.agree { display: flex; align-items: center; gap: 12px; margin-top: 28px; padding: 4px 0; cursor: pointer; color: var(--grey-700); font-size: 15px; }
.agree input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.agree-box { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--grey-200); transition: background-color 0.2s; }
.agree-box svg { width: 14px; height: 14px; }
.agree input:checked + .agree-box { background: var(--blue-500); }
.agree input:focus-visible + .agree-box { outline: 3px solid var(--blue-500); outline-offset: 2px; }

.funnel-bottom {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 520px;
  transform: translateX(-50%);
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--white) 70%, rgba(255, 255, 255, 0));
}
.cta { width: 100%; }

/* 완료 화면 */
.done { text-align: center; padding-top: 40px; }
.done-mark { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 28px; border-radius: 50%; background: var(--blue-500); animation: pop 0.6s var(--ease); }
.done-mark svg { width: 36px; height: 36px; }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.summary { margin-top: 40px; padding: 8px 20px; border-radius: 20px; background: var(--grey-50); text-align: left; }
.summary-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--grey-200); font-size: 15px; }
.summary-row:last-child { border-bottom: 0; }
.summary-row dt { color: var(--grey-500); flex: none; }
.summary-row dd { margin: 0; color: var(--grey-900); text-align: right; }

@media (prefers-reduced-motion: reduce) {
  .funnel-body.enter, .done-mark { animation: none; }
}
@media (min-width: 640px) {
  .funnel-body { padding-top: 48px; }
  .step-title { font-size: 28px; }
}

/* 단지 검색 */
.muted { margin-top: 12px; color: var(--grey-500); font-size: 14px; }
.hits { display: grid; gap: 4px; margin-top: 8px; }
.hit {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  text-align: left;
  transition: background-color 0.2s;
}
.hit:hover, .hit:focus-visible { background: var(--grey-50); }
.hit strong { display: block; color: var(--grey-900); font-size: 17px; font-weight: 400; }
.hit span { display: block; margin-top: 2px; color: var(--grey-500); font-size: 14px; }

.apt-picked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--blue-50);
}
.apt-picked strong { display: block; color: var(--grey-900); font-size: 18px; font-weight: 400; }
.apt-picked span { display: block; margin-top: 2px; color: var(--grey-600); font-size: 14px; }
.apt-picked button { flex: none; padding: 8px 12px; border-radius: 10px; background: var(--white); color: var(--blue-700); font-size: 14px; }

.plan { margin: 28px 0 0; animation: step-in 0.45s var(--ease); }
.plan figcaption { margin-top: 12px; color: var(--grey-600); font-size: 14px; line-height: 1.5; }
.plan figcaption b { display: block; margin-bottom: 2px; color: var(--grey-900); font-size: 15px; font-weight: 400; }

/* 네이버 부동산 평면도 가져오기 */
.naver { margin-top: 28px; padding: 20px; border-radius: 20px; background: var(--grey-50); }
.naver-title { color: var(--grey-900); font-size: 18px; }
.naver-desc { margin-top: 4px; color: var(--grey-600); font-size: 14px; }
.plan-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.plan-actions .btn { height: 48px; padding: 0 10px; border-radius: 12px; font-size: 15px; white-space: nowrap; }
.naver .btn-grey { background: var(--white); }
.import { margin-top: 16px; animation: step-in 0.35s var(--ease); }
.import-steps { margin: 0; padding-left: 20px; color: var(--grey-700); font-size: 14px; line-height: 1.7; }
.import-zone { margin-top: 12px; padding: 28px 16px; background: var(--white); scroll-margin-bottom: 120px; }
.plan-image { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--grey-200); background: var(--white); }
.import-steps b { color: var(--grey-900); font-weight: 400; }
.import-open { width: 100%; height: 48px; margin-top: 16px; border-radius: 12px; font-size: 15px; }
.naver .import { margin-top: 20px; }
.naver-link { display: flex; width: fit-content; height: 40px; margin: 8px 0 4px; padding: 0 14px; border-radius: 10px; background: var(--white); font-size: 14px; }
.import-steps li + li { margin-top: 6px; }
.agree-link { display: inline-block; margin: 4px 0 0 36px; color: var(--grey-500); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.submit-error { margin-top: 20px; }
