* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: linear-gradient(160deg, #ffe4ec 0%, #e0f0ff 100%);
  min-height: 100vh;
  color: #2a2a35;
}

.center-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  padding: 32px;
  width: 100%;
  max-width: 420px;
}

.card h1 {
  font-size: 22px;
  margin: 0 0 4px;
  text-align: center;
}
.sub {
  text-align: center;
  color: #888;
  font-size: 13px;
  margin-bottom: 24px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #555;
}
.field input[type=text],
.field input[type=password],
.field input[type=number],
.field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #e0e0e8;
  border-radius: 10px;
  font-size: 14px;
  background: #fafafd;
}
.field input[type=file] { width: 100%; font-size: 13px; }
.field .hint, .hint { font-size: 12px; color: #999; margin-top: 4px; }

.nickname-row { display: flex; gap: 8px; }
.nickname-row input { flex: 1; }
.btn-small {
  padding: 0 14px;
  border: none;
  border-radius: 10px;
  background: #eef1ff;
  color: #4a53c4;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}

.gender-toggle { display: flex; gap: 10px; }
.gender-toggle label {
  flex: 1;
  text-align: center;
  padding: 12px;
  border: 2px solid #e8e8f0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  color: #888;
  font-size: 14px;
}
.gender-toggle input { display: none; }
.gender-toggle input:checked + span { color: inherit; }
.gender-toggle label.male.active { border-color: #5b8dee; color: #5b8dee; background: #f0f5ff; }
.gender-toggle label.female.active { border-color: #ef7ab0; color: #ef7ab0; background: #fff0f6; }

.btn-primary {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 12px;
  background: #ff7a9c;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-top: 8px;
}
.btn-primary:hover { background: #ff6188; }
.btn-primary:disabled { background: #ddd; cursor: not-allowed; }

.divider {
  display: flex; align-items: center; gap: 10px;
  color: #bbb; font-size: 12px; margin: 20px 0 4px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #eee; }

.social-row { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.btn-social {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 12px; border-radius: 12px;
  font-weight: 700; font-size: 14px; cursor: pointer;
  text-decoration: none; border: 1px solid transparent;
}
.btn-kakao { background: #FEE500; color: #191600; }
.btn-kakao:hover { background: #fada00; }
.btn-google { background: #fff; color: #444; border-color: #e0e0e8; }
.btn-google:hover { background: #f7f7fa; }

.link-row { text-align: center; margin-top: 14px; font-size: 13px; color: #999; }
.link-row a { color: #ff7a9c; cursor: pointer; text-decoration: none; font-weight: 600; }

.error-box {
  background: #fff1f1;
  color: #d33;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}

.two-col { display: flex; gap: 12px; }
.two-col .field { flex: 1; }

.optional-tag { color: #bbb; font-weight: 400; }

.band-card {
  border: 2px solid #ffd3de;
  background: #fff8fa;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  margin-bottom: 20px;
}
.band-card .age { font-size: 13px; color: #999; margin-bottom: 6px; }
.band-card .band-label { font-size: 19px; font-weight: 800; color: #ff5d87; }

.profile-preview { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.profile-preview img {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #eee;
}
.profile-preview .name { font-weight: 700; font-size: 16px; }
.profile-preview .meta { font-size: 12px; color: #999; }

.btn-secondary {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e8;
  border-radius: 12px;
  background: #fff;
  color: #555;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  margin-top: 10px;
  text-align: center;
  text-decoration: none;
  display: block;
}
.btn-secondary:hover { background: #faf9fb; }

/* ---- profile edit page: 2-column layout ---- */
.profile-page {
  max-width: 980px; margin: 0 auto; padding: 32px 20px 80px;
}
.profile-page .top-row {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px;
}
.profile-page .top-row h1 { font-size: 22px; margin: 0; }
.profile-layout {
  display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start;
}
@media (max-width: 760px) {
  .profile-layout { grid-template-columns: 1fr; }
  .preview-col { order: -1; }
}
.preview-col { position: sticky; top: 24px; }

.section-card {
  background: #fff; border-radius: 18px; padding: 24px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.05); margin-bottom: 18px;
}
.section-card h2 { font-size: 15px; margin: 0 0 16px; color: #333; }
.section-card .section-hint { font-size: 12px; color: #aaa; margin: -12px 0 16px; }

.field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #e0e0e8; border-radius: 10px;
  font-size: 14px; background: #fafafd; resize: vertical; font-family: inherit;
}

.photo-picker {
  display: flex; align-items: center; gap: 16px;
}
.photo-picker .photo-preview {
  width: 96px; height: 96px; border-radius: 50%; overflow: hidden;
  background: #f1f1f5; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.photo-picker .photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-picker .photo-preview span { font-size: 11px; color: #bbb; }

.verify-block { border-top: 1px dashed #eee; padding-top: 16px; margin-top: 16px; }
.verify-block:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.verify-block .vb-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; color: #444; }

/* ---- photo crop modal ---- */
#cropOverlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.6);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
#cropModal {
  background: #fff; border-radius: 18px; padding: 20px; width: 100%; max-width: 420px;
}
#cropModal h3 { margin: 0 0 12px; font-size: 16px; text-align: center; }
#cropCanvasWrap {
  width: 100%; height: 320px; background: #222; border-radius: 12px; overflow: hidden;
}
#cropImage { max-width: 100%; display: block; }
.crop-controls {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin: 14px 0;
}
.crop-controls button {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid #e0e0e8;
  background: #fff; font-size: 16px; cursor: pointer; color: #555;
}
.crop-actions { display: flex; gap: 10px; }
.crop-actions .btn-primary, .crop-actions .btn-secondary { margin-top: 0; }
