@font-face {
  font-family: Pretendard;
  src: url("fonts/Pretendard-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Pretendard;
  src: url("fonts/Pretendard-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: Pretendard;
  src: url("fonts/Pretendard-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

body {
  margin: 0;
  color: #141414;
  background: #fff;
  font-family: Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

.visit {
  --visit-height: var(--visit-viewport, 100svh);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: min(714px, calc(100% - 40px));
  min-height: 100vh;
  min-height: var(--visit-height);
  margin: 0 auto;
  padding-block: clamp(16px, calc(var(--visit-height) * .0352), 26px) clamp(30px, calc(var(--visit-height) * .1162), 86px);
}

.visit-header {
  position: relative;
  margin-bottom: clamp(24px, 5.95svh, 44px);
}

.visit-progress {
  --fill: 20%;
  position: relative;
  overflow: hidden;
  height: 12px;
  margin: 0 clamp(72px, 12vw, 114px) clamp(24px, 5.4svh, 40px) 0;
  border-radius: 16px;
  background: #e5e5e5;
}

.visit-progress[data-stage="2"] { --fill: 40%; }
.visit-progress[data-stage="3"] { --fill: 60%; }
.visit-progress[data-stage="4"] { --fill: 80%; }
.visit-progress[data-stage="5"] { --fill: 100%; }

.visit-progress::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #ffbf00 10%, #ffbf00 20%, #62b121 40%, #3396d7 60%, #1565bf 80%, #003390);
  clip-path: inset(0 calc(100% - var(--fill)) 0 0 round 16px);
  transition: clip-path 320ms ease;
  content: "";
}

.visit-header h1 {
  margin: 0 72px 8px 0;
  color: #000;
  font-size: clamp(21px, 3.5vw, 28px);
  font-weight: 500;
  line-height: 1.43;
  letter-spacing: -.02em;
  word-break: keep-all;
}

.visit-header p {
  margin: 0;
  color: #000;
  font-size: clamp(16px, 2.5vw, 20px);
  line-height: 1.5;
  letter-spacing: -.02em;
}

.visit-form {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.visit-field {
  box-sizing: border-box;
  width: 100%;
  min-height: clamp(60px, 9.73svh, 72px);
  padding: 12px clamp(16px, 3vw, 24px);
  border: 2px solid #eee;
  border-radius: 16px;
  background: #fff;
  color: inherit;
  font: 500 clamp(22px, 3.5vw, 28px)/1.43 Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  letter-spacing: -.02em;
}

.visit-field:focus {
  border-color: #525252;
  outline: none;
}

.visit-field[data-initial]:not(:focus) { color: #a3a3a3; }

.visit-status {
  margin: 16px 0 0;
  color: #525252;
  font-size: clamp(16px, 2.3vw, 18px);
  line-height: 1.5;
}

.visit-status[data-error] { color: #d6291d; }

.visit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
}

.visit-button {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  min-height: clamp(48px, 8.11svh, 60px);
  padding: 0 16px;
  border: 2px solid #e5e5e5;
  border-radius: 16px;
  box-shadow: 0 6px #e5e5e5;
  background: #fff;
  color: #000;
  font: 600 clamp(18px, 3vw, 22px)/1.36 Pretendard, system-ui, sans-serif;
  letter-spacing: -.01em;
  text-decoration: none;
  cursor: pointer;
}

.visit-button:not(:disabled):active {
  transform: translateY(4px);
  box-shadow: 0 2px #e5e5e5;
}

.visit-button:disabled {
  background: #e5e5e5;
  color: #a3a3a3;
  box-shadow: none;
  cursor: default;
}

.visit-icon {
  width: clamp(48px, 8.11svh, 60px);
  padding: 0;
}

.visit-icon img { display: block; }

.visit-close {
  position: absolute;
  top: 0;
  right: 0;
}

.visit-confirm { width: clamp(100px, 30vw, 240px); }

@media (max-width: 480px) {
  .visit-progress { height: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .visit-progress::before { transition: none; }
}

.visit-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.visit-primary {
  border-color: #141414;
  box-shadow: 0 6px #141414;
  background: #424242;
  color: #fff;
}

.visit-primary:not(:disabled):active {
  box-shadow: 0 2px #141414;
}

.visit-action-group {
  display: flex;
  justify-content: flex-end;
  gap: clamp(8px, 2vw, 16px);
  min-width: 0;
  width: min(100% - 60px, 496px);
}

.visit-action-group .visit-button {
  flex: 1 1 0;
  min-width: 0;
  padding-inline: clamp(4px, 1vw, 12px);
  font-size: clamp(13px, 3.3vw, 22px);
  word-break: keep-all;
}

.draft-recovery {
  width: min(520px, calc(100% - 32px));
  padding: 24px;
  border: 2px solid #eee;
  border-radius: 16px;
  background: #fff;
  color: #141414;
}

.draft-recovery::backdrop {
  background: rgb(0 0 0 / 40%);
}

.draft-recovery h2 {
  margin-top: 0;
  font-size: clamp(20px, 4vw, 26px);
}

.draft-recovery .visit-action-group {
  flex-wrap: wrap;
  justify-content: flex-end;
}
