:root {
  --toss-blue: #3182f6; 
  --toss-blue-hover: #1b64da; 
  --toss-blue-light: #e8f3ff;
  --toss-bg: #f9fafb; 
  --toss-card: #ffffff; 
  --toss-text: #191f28;
  --toss-text-sec: #8b95a1; 
  --toss-text-light: #b0b8c1; 
  --toss-border: #f2f4f6;
  --toss-red: #f04452; 
  --toss-green: #00c853;
  --kakao-yellow: #FEE500;
  --kakao-text: #191919;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  background-color: var(--toss-bg);
  color: var(--toss-text);
  line-height: 1.5;
}

.app-container {
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: var(--toss-bg);
  padding-bottom: 150px;
  position: relative;
}

.header {
  padding: 20px;
  background-color: var(--toss-card);
  text-align: center;
  border-bottom: 1px solid var(--toss-border);
}


.fp-welcome {
  background-color: var(--toss-blue-light);
  color: var(--toss-blue);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  word-break: keep-all;
}

.progress-bar-container {
  padding: 24px 20px;
  background: var(--toss-card);
  margin-bottom: 12px;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--toss-border);
  color: var(--toss-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.3s;
}

.step.active {
  background-color: var(--toss-blue);
  color: white;
}

.progress-line {
  height: 4px;
  background-color: var(--toss-border);
  position: relative;
  top: -18px;
  z-index: 1;
  margin: 0 16px;
}

.progress-line-fill {
  height: 100%;
  background-color: var(--toss-blue);
  width: 0%;
  transition: width 0.3s;
}

.step-labels {
  display: flex;
  justify-content: space-between;
  margin-top: -8px;
  font-size: 12px;
  color: var(--toss-text-sec);
}

.form-content {
  padding: 0 20px;
}

.step-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hidden {
  display: none !important;
}

.card {
  background-color: var(--toss-card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 8px; }
.w-full { width: 100%; }

.input-group {
  margin-bottom: 16px;
}

.input-group:last-child {
  margin-bottom: 0;
}

.input-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--toss-text);
  margin-bottom: 8px;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--toss-border);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  background-color: var(--toss-bg);
  transition: border-color 0.2s;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--toss-blue);
  background-color: #fff;
}

.row-group {
  display: flex;
  gap: 12px;
}
.half {
  flex: 1;
}

.ssn-group, .car-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ssn-group input, .car-group input, .car-group select {
  flex: 1;
}

.radio-group {
  display: flex;
  gap: 16px;
}
.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 400;
  margin-bottom: 0 !important;
}

.health-q {
  margin-bottom: 20px;
}
.health-q:last-child { margin-bottom: 0; }
.health-q p {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
.detail-input {
  margin-top: 8px;
}

.drink-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.drink-group input { width: 60px; text-align: center; }

.treatment-item {
  background: var(--toss-bg);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.treatment-row {
  display: flex;
  gap: 8px;
}
.treatment-row input {
  padding: 10px;
  font-size: 14px;
}
.btn-remove {
  align-self: flex-end;
  color: var(--toss-red);
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.privacy-card {
  margin-top: 20px;
}
.privacy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.privacy-agree {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s;
  font-family: inherit;
}

.btn-primary {
  background-color: var(--toss-blue);
  color: white;
}
.btn-primary:active { background-color: var(--toss-blue-hover); }

.btn-secondary {
  background-color: var(--toss-border);
  color: var(--toss-text);
}

.btn-group {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}

.btn-small {
  padding: 6px 12px;
  font-size: 13px;
  width: auto;
  background-color: var(--toss-blue-light);
  color: var(--toss-blue);
}

.btn-text {
  background: none;
  border: none;
  color: var(--toss-text-sec);
  text-decoration: underline;
  font-size: 13px;
  cursor: pointer;
}

.btn-action-group {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 500px;
  padding: 16px 20px 24px;
  background: var(--toss-card);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10;
}

.btn-kakao-bench {
  background-color: var(--kakao-yellow);
  color: var(--kakao-text);
  line-height: 1.2;
}
.btn-kakao-bench:disabled {
  background-color: #E5E7EB;
  color: #9CA3AF;
  cursor: not-allowed;
}

.btn-sms-bench {
  background-color: white;
  color: var(--toss-text);
  border: 1px solid var(--toss-border);
}
.btn-sms-bench:disabled {
  background-color: #F9FAFB;
  color: #D1D5DB;
  cursor: not-allowed;
  border-color: #E5E7EB;
}

.modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-title {
  padding: 20px;
  font-size: 18px;
  font-weight: 700;
  border-bottom: 1px solid var(--toss-border);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: 60vh;
  font-size: 14px;
  color: var(--toss-text-sec);
  line-height: 1.6;
}

.modal-footer {
  padding: 20px;
  border-top: 1px solid var(--toss-border);
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 200;
  transition: opacity 0.3s;
}

#step3 {
  padding-bottom: 120px;
}

.detail-group { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.detail-group input { font-size: 14px; }
