:root {
  --card-width: 350px;
  --radius: 16px;
  --gap: 14px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  margin-top: 12px;
  -webkit-text-size-adjust: 100%;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background: #f6f7f9;
  color: #222;
}

/* 컨테이너: 가로 가운데 + 위쪽 여유 (키보드에 안 가리도록 위쪽 배치) */
.wrap {
  max-width: var(--card-width);
  width: calc(100% - 32px);
  margin: clamp(24px, 8vh, 72px) auto 0;
  margin-top: 10px;
}

.card {
  background: #fff;
  border: 1px solid #e8e9ee;
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(0,0,0,.06);
  padding: 20px;
  overflow: hidden;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.sub {
  margin: 0 0 18px;
  font-size: 12px;
  color: #7a7f87;
  text-align: center;
}

/* 기존 .row 수정 */
.row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: var(--gap);
}

/* 그리드 아이템이 줄어들 수 있게 */
.row > * { min-width: 0; }

.prefix {
  background: #f1f3f6;
  border: 1px solid #e0e3e8;
  border-radius: 10px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.5px;
  user-select: none;
}

.input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d9dde3;
  border-radius: 10px;
  outline: none;
  font-size: 16px;
  background: #fff;
  text-align: center;
  width: 100%;
  max-width: 100%;
}

.input:focus {
  border-color: #6aa8ff;
  box-shadow: 0 0 0 3px rgba(77,147,255,.15);
}

.hint {
  font-size: 12px;
  color: #7a7f87;
  margin-top: 6px;
  text-align: right;
}

.btn {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
}

.btn:disabled {
  background: #c9d3e8;
  cursor: not-allowed;
}

.meta {
  margin-top: 16px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  line-height: 1.6;
  word-break: break-all;
}

/* iOS 키보드 대비: 하단 안전영역 확보 */
@supports (padding: max(0px)) {
  .wrap {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}
