/* ── 라이트 모드 변수 ── */
[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f8f7f4;
  --surface2: #f0ede6;
  --border: rgba(0,0,0,0.08);
  --border2: rgba(0,0,0,0.15);
  --text: #111110;
  --text2: #3d3c3a;
  --text3: #888680;
  --accent: #6b5520;
  --accent2: #8a7040;
  --green: #0d6e3a;
  --green-bg: rgba(13,110,58,0.1);
  --red: #a82020;
  --red-bg: rgba(168,32,32,0.1);
  --amber: #7a5010;
  --amber-bg: rgba(122,80,16,0.08);
}

/* ── 설정 버튼 ── */
.settings-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text3); font-size: 18px; line-height: 1;
  padding: 4px; transition: color 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.settings-btn:hover { color: var(--text2); }

/* ── 모달 오버레이 ── */
.settings-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.settings-overlay.open {
  opacity: 1; pointer-events: all;
}

/* ── 모달 패널 ── */
.settings-panel {
  width: 100%; max-width: 560px;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border2);
  padding: 0 0 env(safe-area-inset-bottom);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 90vh; overflow-y: auto;
}
.settings-overlay.open .settings-panel {
  transform: translateY(0);
}

/* ── 모달 헤더 ── */
.settings-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 20px 0;
  position: sticky; top: 0;
  background: var(--surface);
  z-index: 1;
}
.settings-header-title {
  font-size: 16px; font-weight: 500; color: var(--text);
}
.settings-close-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text3); font-size: 13px;
  font-family: 'Noto Sans KR', sans-serif;
  padding: 4px 8px; border-radius: 6px;
  transition: background 0.15s;
}
.settings-close-btn:hover { background: var(--surface2); color: var(--text2); }

/* ── 구분선 ── */
.settings-divider {
  height: 1px; background: var(--border);
  margin: 16px 0;
}

/* ── 설정 섹션 ── */
.settings-body { padding: 16px 20px 32px; }
.settings-section { margin-bottom: 28px; }
.settings-section-label {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text3); margin-bottom: 10px;
}

/* ── 인풋 ── */
.settings-input {
  width: 100%; height: 40px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text);
  font-family: 'Noto Sans KR', sans-serif; font-size: 14px;
  outline: none; transition: border-color 0.2s;
}
.settings-input::placeholder { color: var(--text3); }
.settings-input:focus { border-color: var(--accent2); }

/* ── 프로필 사진 영역 ── */
.photo-row { display: flex; gap: 10px; align-items: center; }
.photo-row .settings-input { flex: 1; }
.photo-preview {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--surface2); flex-shrink: 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500; color: var(--accent);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ── 테마 토글 ── */
.theme-row { display: flex; align-items: center; justify-content: space-between; }
.theme-label-wrap { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.theme-icon { font-size: 16px; }

.toggle-switch {
  position: relative; width: 44px; height: 24px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 99px;
  background: var(--surface2); border: 1px solid var(--border2);
  cursor: pointer; transition: background 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--text3); top: 2px; left: 2px;
  transition: transform 0.2s, background 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent2); border-color: var(--accent2); }
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px); background: #fff;
}

/* ── 알림 ── */
.notif-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notif-left { display: flex; flex-direction: column; gap: 4px; }
.notif-text { font-size: 14px; color: var(--text); }
.notif-status { font-size: 12px; color: var(--text3); }

.notif-btn {
  height: 32px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--border2);
  background: transparent; color: var(--text2);
  font-family: 'Noto Sans KR', sans-serif; font-size: 12px;
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s;
}
.notif-btn:hover { background: var(--surface2); }

/* ── 언어 선택 ── */
.lang-row { display: flex; gap: 8px; }
.lang-btn {
  flex: 1; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text3); font-family: 'Noto Sans KR', sans-serif;
  font-size: 13px; cursor: pointer; transition: all 0.15s;
}
.lang-btn:hover { border-color: var(--border2); color: var(--text2); }
.lang-btn.active {
  background: var(--accent); border-color: var(--accent);
  color: #0f0f0e; font-weight: 500;
}

/* ── 저장 버튼 ── */
.settings-save {
  width: 100%; height: 44px; border-radius: 12px;
  border: 1px solid var(--accent2); background: transparent;
  color: var(--accent); font-family: 'Noto Sans KR', sans-serif;
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background 0.15s, color 0.15s; margin-top: 8px;
}
.settings-save:hover { background: var(--accent2); color: #0f0f0e; }
