/* ═══════════════════════════════════════════════
   운동 건강 분석 토스 미니앱 — 민트 그린 테마
   TDS(Toss Design System) 커스텀 + 민트 오버라이드
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Pretendard:wght@400;500;600;700;800&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* ── 컬러 시스템 (민트 그린 팔레트) ── */
:root {
  --mint-50: #F0FDF9;
  --mint-100: #CCFBEF;
  --mint-200: #A8F5E0;
  --mint-300: #6EEAC8;
  --mint-400: #36D9AD;
  --mint-500: #00C896;
  --mint-600: #00A87A;
  --mint-700: #00896A;
  --mint-800: #006D55;
  --mint-900: #005A47;

  --color-primary: #00C896;
  --color-primary-dark: #00A87A;
  --color-primary-light: #F0FDF9;
  --color-primary-border: #A8F5E0;

  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  --badge-good-bg: #E0FAF4;
  --badge-good-text: #00896A;
  --badge-warn-bg: #FAEEDA;
  --badge-warn-text: #854F0B;
  --badge-bad-bg: #FEE2E2;
  --badge-bad-text: #991B1B;

  --amber: #D97706;
  --white: #FFFFFF;
  --black: #111827;

  --gradient-hero: linear-gradient(135deg, #00C896 0%, #00A87A 50%, #00896A 100%);
  --gradient-hero-soft: linear-gradient(180deg, #00C896 0%, #36D9AD 100%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-mint: 0 4px 20px rgba(0, 200, 150, 0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;
}

/* ── 리셋 & 기본 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;  /* Bug #24: 전역 가로 스크롤 방지 */
}

/* ═══════════════════════════════════════════════
   디자인 토큰 — 카드 간격·마진 통일
   ═══════════════════════════════════════════════ */
:root {
  --card-margin-x: 16px;
  --card-gap-y: 10px;
  --card-padding: 16px;
}

body {
  /* Bug #25: 한글 우선 Pretendard, latin은 Inter */
  font-family: 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;  /* Bug #20: iOS Safari 동적 주소창 대응 */
  position: relative;
  overflow-x: hidden;
  /* Bug #7: 노치·Dynamic Island·홈 인디케이터 안전 영역 */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

/* Bug #8: 모달 떠 있을 때 뒷화면 스크롤 잠금 */
body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* ── 화면 전환 ── */
.screen {
  display: none;
  min-height: 100vh;
  padding-bottom: 80px;
  animation: fadeSlideIn 0.4s ease;
}
.screen.active { display: block; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes checkPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 200, 150, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(0, 200, 150, 0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── 프로그레스 바 ── */
.progress-bar-container {
  padding: 16px 20px 0;
  background: var(--white);
}

.progress-bar {
  height: 6px;  /* Bug #22: 두께 ↑ */
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-hero);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 6px rgba(0, 200, 150, 0.4);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
}

/* ── 온보딩 공통 ── */
.onboarding-header {
  padding: 24px 20px 16px;
  background: var(--white);
}

.onboarding-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.4;
}

.onboarding-header p {
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 6px;
}

.onboarding-body {
  padding: 8px 20px 24px;
}

/* ── 목표 선택 카드 ── */
.goal-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.goal-option:hover {
  border-color: var(--mint-300);
  background: var(--mint-50);
}

.goal-option.selected {
  border-color: var(--color-primary);
  background: var(--mint-50);
}

.goal-option .emoji {
  font-size: 28px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  transition: background 0.25s;
}

.goal-option.selected .emoji {
  background: var(--mint-100);
}

.goal-option .text h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
}

.goal-option .text p {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

.goal-option .check-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}

.goal-option.selected .check-circle {
  background: var(--color-primary);
  border-color: var(--color-primary);
  animation: checkPop 0.35s ease;
}

.goal-option.selected .check-circle::after {
  content: '✓';
  color: white;
  font-size: 13px;
  font-weight: 700;
}

/* ── 칩 (상세 선택) ── */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  padding: 10px 16px;
  min-height: 38px;  /* Bug #16: 터치 타깃 확대 (Apple HIG 44px 권장) */
  border-radius: var(--radius-full);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  display: inline-flex;
  align-items: center;
}

.chip:hover { border-color: var(--mint-300); }

.chip.selected {
  background: var(--mint-50);
  border-color: var(--color-primary);
  color: var(--color-primary-dark);
  font-weight: 600;
}

/* ── 기타 토글 입력 ── */
.other-toggle {
  margin-top: 20px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.25s;
}

.other-toggle.open { border-color: var(--mint-200); }

.other-toggle-header {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: var(--gray-50);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
}

.other-toggle-header .arrow {
  transition: transform 0.3s;
  font-size: 12px;
  color: var(--gray-400);
}

.other-toggle.open .arrow { transform: rotate(180deg); }

.other-toggle-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.other-toggle.open .other-toggle-body {
  max-height: 200px;
}

.other-textarea {
  width: 100%;
  border: none;
  padding: 14px 16px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  height: 80px;
  color: var(--gray-800);
  outline: none;
}

.other-textarea::placeholder { color: var(--gray-400); }

.char-counter {
  text-align: right;
  padding: 4px 16px 10px;
  font-size: 11px;
  color: var(--gray-400);
}

/* ── 확인 카드 ── */
.confirm-card {
  background: var(--mint-50);
  border: 1.5px solid var(--mint-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 16px 0;
}

.confirm-card .label {
  font-size: 12px;
  font-weight: 600;
  color: var(--mint-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.confirm-card .value {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-top: 6px;
}

.confirm-card .detail {
  font-size: 13px;
  color: var(--gray-600);
  margin-top: 8px;
}

.confirm-card .other-quote {
  font-size: 13px;
  color: var(--mint-800);
  background: var(--mint-100);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  font-style: italic;
}

/* ── 버튼 ── */
.btn-area {
  padding: 12px 20px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, var(--white) 30%);
  padding-top: 32px;
}

.btn-primary {
  width: 100%;
  padding: 16px;
  background: var(--color-primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: var(--shadow-mint);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) { transform: scale(0.98); }

.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-ghost {
  width: 100%;
  padding: 14px;
  background: transparent;
  color: var(--gray-500);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.btn-ghost:hover { border-color: var(--gray-400); color: var(--gray-700); }

.btn-row {
  display: flex;
  gap: 10px;
}

.btn-row .btn-ghost, .btn-row .btn-primary {
  flex: 1;
  margin-top: 0;
}

/* ── 히어로 섹션 ── */
.hero {
  background: var(--gradient-hero);
  padding: 32px 20px;
  color: var(--white);
  text-align: center;
}

.hero .score {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hero .score-label {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
  margin-top: 6px;
}

.hero .badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
}

.hero .headline {
  font-size: 15px;
  font-weight: 500;
  margin-top: 10px;
  opacity: 0.9;
  padding: 0 12px;
  word-break: keep-all;  /* Bug #17: 한글 단어 단위 줄바꿈 */
  line-height: 1.5;
  max-width: 100%;
}

/* ── 스트릭 행 ── */
.streak-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.streak-row .fire { font-size: 18px; }

/* ── 최근 분석 목록 ── */
.section-title {
  padding: 20px 20px 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
}

.analysis-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background 0.15s;
}

.analysis-item:hover { background: var(--gray-50); }

.analysis-item .left .date {
  font-size: 11px;
  color: var(--gray-400);
}

.analysis-item .left .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin-top: 2px;
}

.analysis-item .score-badge {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-primary);
}

/* ── 탭바 ── */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: flex;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 10px;
  font-weight: 600;
  transition: color 0.2s;
  border: none;
  background: none;
  font-family: inherit;
}

.tab-item .icon { font-size: 22px; margin-bottom: 2px; }
.tab-item.active { color: var(--color-primary); }

/* ── 입력 탭 ── */
.input-tabs {
  display: flex;
  background: var(--white);
  border-bottom: 2px solid var(--gray-100);
}

.input-tab {
  flex: 1;
  padding: 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-400);
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  font-family: inherit;
  transition: color 0.2s;
}

.input-tab.active { color: var(--color-primary); }

.input-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 20%;
  width: 60%;
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
}

/* ── 업로드 존 ── */
.upload-zone {
  margin: 20px;
  padding: 40px 20px;
  border: 2px dashed var(--color-primary);
  border-radius: var(--radius-lg);
  background: var(--mint-50);
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
}

.upload-zone:hover {
  background: var(--mint-100);
  border-color: var(--color-primary-dark);
}

.upload-zone .icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.upload-zone .text {
  font-size: 14px;
  font-weight: 600;
  color: var(--mint-700);
}

.upload-zone .sub {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 4px;
}

.app-chips {
  padding: 12px 20px;
}

.app-chips .label {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 8px;
}

/* ── 직접 입력 폼 ── */
.form-section { padding: 20px; }

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

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-label .required { color: var(--color-primary); }

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  color: var(--gray-900);
  outline: none;
  transition: border-color 0.2s;
  background: var(--white);
}

.form-input:focus { border-color: var(--color-primary); }
.form-input::placeholder { color: var(--gray-400); }

.form-unit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-unit .unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  white-space: nowrap;
}

/* ── 분석 결과 ── */
.analysis-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  margin: 12px 20px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.analysis-card .item-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}

.analysis-card .item-row:last-child { border-bottom: none; }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.status-dot.good { background: var(--color-primary); }
.status-dot.warn { background: var(--amber); }
.status-dot.bad { background: #EF4444; }

.item-content { flex: 1; }
.item-content .item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

.item-content .item-desc {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

.status-badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-badge.good { background: var(--badge-good-bg); color: var(--badge-good-text); }
.status-badge.warn { background: var(--badge-warn-bg); color: var(--badge-warn-text); }
.status-badge.bad { background: var(--badge-bad-bg); color: var(--badge-bad-text); }

/* 색맹 대응 아이콘 — 색만으로 의존 X (Bug #3) */
.status-badge .badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}
.status-badge.good .badge-icon { background: var(--badge-good-text); color: white; }
.status-badge.warn .badge-icon { background: var(--badge-warn-text); color: white; }
.status-badge.bad .badge-icon { background: var(--badge-bad-text); color: white; }

/* 가장 중요한 분석 항목 강조 (Bug #4) */
.analysis-card .item-row.primary {
  background: linear-gradient(180deg, var(--mint-50), transparent);
  margin: 0 -16px 6px;
  padding: 16px 16px 14px;
  border-radius: var(--radius-md);
  border-bottom: none;
}
.analysis-card .item-row.primary .simple {
  font-size: 17px;
  font-weight: 800;
  color: var(--gray-900);
}

/* ── 가이드 박스 ── */
.guide-box {
  background: var(--mint-50);
  border: 1.5px solid var(--mint-200);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 12px 20px;
}

.guide-box .guide-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--mint-700);
  margin-bottom: 6px;
}

.guide-box .guide-text {
  font-size: 14px;
  color: var(--gray-700);
  line-height: 1.5;
}

/* ── 면책 문구 ── */
.disclaimer {
  text-align: center;
  padding: 16px 20px;
  font-size: 11px;
  color: var(--gray-400);
}

/* ── 로딩 ── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(4px);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--mint-200);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  margin-top: 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-700);
}

.loading-sub {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 4px;
}

/* ── 빈 상태 ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}

.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state .text { font-size: 14px; font-weight: 500; }

/* Bug #17: 친근한 빈 상태 — 첫 사용자 환영 */
.empty-state.friendly {
  padding: 40px 20px 32px;
  margin: 8px 16px;
  background: linear-gradient(135deg, var(--mint-50), #F0FDF9);
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--mint-200);
}
.empty-state.friendly .big-emoji {
  font-size: 56px;
  margin-bottom: 16px;
  animation: scaleIn 0.5s ease;
}
.empty-state.friendly .text-lg {
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
}
.empty-state.friendly .text-sm {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.5;
  max-width: 280px;
  margin: 0 auto;
}

/* ── 기타 유틸 ── */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.text-center { text-align: center; }
.text-hint {
  font-size: 13px;
  color: var(--gray-500);
  padding: 12px 20px;
  text-align: center;
}

/* 이미지 미리보기 */
.upload-preview {
  margin: 0 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.upload-preview img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.upload-preview .remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── 완료 체크 애니메이션 ── */
.completion-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 32px auto 20px;
  animation: scaleIn 0.5s ease;
  box-shadow: var(--shadow-mint);
}

.completion-icon::after {
  content: '✓';
  font-size: 36px;
  color: white;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════
   홈 화면 확장 — 인사·목표·주간통계·점수추이
   ═══════════════════════════════════════════════ */

/* 헤더 인사 — v0.5: 스타트업 톤 세련 */
.home-greeting {
  padding: 24px 20px 8px;
  background: var(--white);
}
.home-greeting .brand-mini {
  font-size: 16px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #00C896, #00896A);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  display: inline-block;
}
.home-greeting .hi {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
  letter-spacing: -0.2px;
}
.home-greeting .name {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  margin-top: 4px;
  letter-spacing: -0.7px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}
.home-greeting .goal-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--mint-50);
  color: var(--mint-700);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--mint-200);
  margin-top: 8px;
}

/* 홈 히어로 개선 */
.hero.home-hero {
  margin: 12px 16px;
  border-radius: var(--radius-xl);
  padding: 28px 20px 24px;
  box-shadow: var(--shadow-mint);
  position: relative;
  overflow: hidden;
}
.hero.home-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.hero.home-hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.hero .score-wrap {
  position: relative;
  z-index: 1;
}
.hero .score-unit {
  font-size: 20px;
  font-weight: 600;
  opacity: 0.85;
  margin-left: 4px;
}
.hero .score-empty {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}

/* 스트릭 + 주간 통계 행 */
.summary-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 0 16px;
  margin-top: -8px;
}
.summary-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.summary-card .icon {
  font-size: 18px;
  line-height: 1;
}
.summary-card .num {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
  margin-top: 4px;
}
.summary-card .label {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 500;
  margin-top: 2px;
}

/* 홈 CTA 버튼 영역 */
.home-cta {
  padding: 16px 20px 4px;
}
.home-cta .btn-primary {
  position: relative;
}
.home-cta .btn-primary .arrow {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
}

/* 점수 추이 미니 차트 */
.trend-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  margin: 8px 16px 0;
  padding: 16px;
  border: 1px solid var(--gray-100);
}
.trend-card .trend-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.trend-card .trend-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
}
.trend-card .trend-sub {
  font-size: 11px;
  color: var(--gray-400);
}
.trend-chart {
  width: 100%;
  height: 80px;
  display: block;
}
.trend-empty {
  text-align: center;
  font-size: 12px;
  color: var(--gray-400);
  padding: 20px 0;
}

/* 최근 분석 — 카드형 개선 */
.analysis-item {
  margin: 8px 16px;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.analysis-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.analysis-item .left .exercise-emoji {
  font-size: 16px;
  margin-right: 4px;
}
.analysis-item .score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.analysis-item .score-badge .num {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}
.analysis-item .score-badge .lbl {
  font-size: 10px;
  color: var(--gray-400);
  margin-top: 2px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════
   기록 화면 확장 — 헤더·진행 단계·강조
   ═══════════════════════════════════════════════ */

.app-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-header .back-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.app-header .back-btn:hover {
  background: var(--gray-200);
}
.app-header .title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
}

/* 업로드 안내 카드 */
.input-hint {
  background: var(--mint-50);
  border: 1px solid var(--mint-200);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 16px 20px 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.input-hint .icon {
  font-size: 18px;
  flex-shrink: 0;
}
.input-hint .text {
  font-size: 12px;
  color: var(--mint-800);
  line-height: 1.5;
}

/* 입력 폼 강조 */
.form-input:hover:not(:focus) {
  border-color: var(--gray-300);
}

/* 분석하기 버튼 위 운동 미리보기 */
.workout-preview {
  margin: 0 20px 12px;
  padding: 12px 14px;
  background: var(--mint-50);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--mint-700);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.workout-preview .dot {
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
  animation: pulseGlow 1.8s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════
   분석 결과 화면 확장 — 데이터 카드·점수 링
   ═══════════════════════════════════════════════ */

.hero.result-hero {
  padding: 36px 20px 32px;
  position: relative;
  overflow: hidden;
}
.hero.result-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}
.hero.result-hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}
.hero.result-hero .score-ring {
  width: 140px;
  height: 140px;
  margin: 0 auto 8px;
  position: relative;
  z-index: 1;
}
.hero.result-hero .score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.hero.result-hero .score-ring .ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 10;
}
.hero.result-hero .score-ring .ring-fg {
  fill: none;
  stroke: var(--white);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero.result-hero .score-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--white);
}
.hero.result-hero .score-center .num {
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Bug #23: 90+ 엘리트 점수 — 빛나는 효과 */
.hero.result-hero.elite .score-ring {
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.5));
}
.hero.result-hero.elite .score-center .num::after {
  content: ' ✨';
  font-size: 20px;
  vertical-align: top;
  margin-left: -4px;
}
.hero.result-hero.elite::before {
  background: rgba(255, 215, 0, 0.15);
}
.hero.result-hero .score-center .sub {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
  margin-top: 4px;
}

/* 운동 데이터 요약 카드 */
.workout-summary {
  background: var(--white);
  border-radius: var(--radius-lg);
  margin: -20px 16px 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 5;
}
.workout-summary .cell {
  text-align: center;
}
.workout-summary .cell .v {
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
}
.workout-summary .cell .u {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-400);
  margin-top: 1px;
}
.workout-summary .cell .l {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 6px;
  font-weight: 500;
}
.workout-summary .cell + .cell {
  border-left: 1px solid var(--gray-100);
}

/* 분석 카드 강화 */
.analysis-card .item-row {
  padding: 14px 0;
  align-items: center;
}
.analysis-card .item-row .item-content .item-name {
  font-size: 14px;
}
.analysis-card .item-row .item-content .item-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary-dark);
}

/* 분석 카드 헤더 */
.section-title.with-sub {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 6px;
}
.section-title .sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
}

/* 가이드 박스 강조 */
.guide-box {
  position: relative;
  padding-left: 48px;
}
.guide-box .guide-icon {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 24px;
  height: 24px;
  font-size: 18px;
  line-height: 1;
}

/* 토스트 알림 */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* 점수 색상 변형 */
.score-color-good { color: var(--color-primary); }
.score-color-warn { color: var(--amber); }
.score-color-bad { color: #EF4444; }

/* 점수 추이 응답형 */
.trend-card .legend {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: var(--gray-400);
}

/* ═══════════════════════════════════════════════
   결과 화면 카드 마진·간격 통일 (Bug #1, #2)
   ═══════════════════════════════════════════════ */
#screen-result > .mock-banner,
#screen-result > .insight-card,
#screen-result > .zone-card,
#screen-result > .impact-card,
#screen-result > .analysis-card,
#screen-result > .warning-card,
#screen-result > .prescription-card,
#screen-result > .weekplan-card,
#screen-result > .cumulative-card,
#screen-result > .guide-box,
#screen-result > .oneline-card,
#screen-result > .intent-card {
  margin-left: var(--card-margin-x);
  margin-right: var(--card-margin-x);
  margin-top: var(--card-gap-y);
  margin-bottom: 0;
}
#screen-result > #milestoneList .milestone-card {
  margin-left: var(--card-margin-x);
  margin-right: var(--card-margin-x);
  margin-top: var(--card-gap-y);
}

/* ═══════════════════════════════════════════════
   분석 결과 v3 — 5-Tier 풍부한 인사이트
   ═══════════════════════════════════════════════ */

/* Mock 모드 배너 */
.mock-banner {
  margin: 8px 16px 0;
  padding: 10px 14px;
  background: #FFF8E6;
  border: 1px solid #FBBF24;
  border-radius: var(--radius-md);
  font-size: 12px;
  color: #854F0B;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.5;
}
.mock-banner .icon { font-size: 16px; }
.mock-banner b { font-weight: 700; }

/* AI 인사이트 카드 */
.insight-card {
  margin: 8px 16px;
  padding: 16px;
  background: linear-gradient(135deg, #F0FDF9 0%, #E0FAF4 100%);
  border: 1px solid var(--mint-200);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.insight-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: var(--mint-100);
  border-radius: 50%;
  opacity: 0.4;
}
.insight-card .label {
  font-size: 11px;
  font-weight: 700;
  color: var(--mint-700);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  position: relative;
  z-index: 1;
}
.insight-card .text {
  font-size: 14px;
  color: var(--gray-800);
  line-height: 1.6;
  margin-top: 6px;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

/* 강도 존 카드 */
.zone-card {
  margin: 12px 16px;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
}
.zone-card .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.zone-card .head .title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
}
.zone-card .head .now {
  font-size: 12px;
  color: var(--color-primary);
  font-weight: 700;
}
.zone-bar {
  display: flex;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  gap: 2px;
}
.zone-cell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-500);
  background: var(--gray-100);
  position: relative;
  transition: all 0.3s;
}
.zone-cell.z1 { background: #E0F2FE; color: #075985; }
.zone-cell.z2 { background: #CCFBEF; color: #00896A; }
.zone-cell.z3 { background: #FEF3C7; color: #854F0B; }
.zone-cell.z4 { background: #FED7AA; color: #9A3412; }
.zone-cell.z5 { background: #FECACA; color: #991B1B; }
.zone-cell.active {
  transform: scaleY(1.15);
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  font-weight: 800;
}
.zone-cell.active::after {
  content: '▼';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-primary);
  font-size: 10px;
}
.zone-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--gray-500);
}
.zone-legend .desc {
  font-size: 12px;
  color: var(--gray-700);
  font-weight: 600;
  margin-top: 4px;
  background: var(--mint-50);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

/* 목표별 영향 카드 (핵심 차별화) */
.impact-card {
  margin: 12px 16px;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
}
.impact-card .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.impact-card .head .title {
  font-size: 14px;
  font-weight: 800;
  color: var(--gray-900);
}
.impact-card .head .pro-tag {
  font-size: 10px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #00C896, #00896A);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.4px;
}
.impact-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.impact-cell {
  background: var(--mint-50);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
}
.impact-cell .v {
  font-size: 16px;
  font-weight: 800;
  color: var(--mint-700);
  line-height: 1.1;
}
.impact-cell .k {
  font-size: 10px;
  color: var(--gray-500);
  margin-top: 4px;
  font-weight: 600;
}
.impact-cell .hint {
  font-size: 9px;
  color: var(--gray-400);
  margin-top: 2px;
  line-height: 1.3;
}
.impact-scenario {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--gray-50);
  border-left: 3px solid var(--color-primary);
  border-radius: 6px;
  margin-bottom: 10px;
}
.impact-tip {
  font-size: 12px;
  color: var(--mint-800);
  line-height: 1.5;
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.impact-tip::before {
  content: '💡';
  flex-shrink: 0;
}

/* 처방 카드 */
.prescription-card {
  margin: 12px 16px;
  padding: 16px;
  background: var(--gradient-hero);
  color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-mint);
  position: relative;
  overflow: hidden;
}
.prescription-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}
.prescription-card .kind {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.25);
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}
.prescription-card .title {
  font-size: 18px;
  font-weight: 800;
  position: relative;
  z-index: 1;
}
.prescription-card .summary {
  font-size: 13px;
  opacity: 0.95;
  margin-top: 4px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}
.prescription-card .items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
  position: relative;
  z-index: 1;
}
.prescription-card .item {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  padding: 10px;
}
.prescription-card .item .lbl {
  font-size: 10px;
  opacity: 0.85;
  font-weight: 600;
}
.prescription-card .item .val {
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
}

/* 경고 카드 */
.warning-card {
  margin: 8px 16px;
  padding: 12px 14px;
  background: #FEF3C7;
  border: 1px solid #FBBF24;
  border-radius: var(--radius-md);
  font-size: 12px;
  color: #854F0B;
  line-height: 1.5;
}
.warning-card .title {
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.warning-card ul {
  margin-left: 14px;
  padding-left: 0;
}

/* 마일스톤 카드 */
.milestone-card {
  margin: 8px 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #FEF3C7, #FED7AA);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  color: #92400E;
  text-align: center;
  animation: pulseGlow 2.4s ease-in-out infinite;
}

/* 누적 통계 그리드 */
.cumulative-card {
  margin: 12px 16px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.cumulative-card .title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 10px;
}
.cumulative-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.cum-cell {
  text-align: center;
  padding: 4px;
}
.cum-cell + .cum-cell {
  border-left: 1px solid var(--gray-100);
}
.cum-cell .v {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}
.cum-cell .u {
  font-size: 11px;
  color: var(--gray-500);
  margin-left: 2px;
  font-weight: 600;
}
.cum-cell .l {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 6px;
  font-weight: 500;
}

/* 주간 계획 */
.weekplan-card {
  margin: 8px 16px;
  padding: 12px 14px;
  background: var(--mint-50);
  border: 1px solid var(--mint-200);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--mint-800);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.5;
}
.weekplan-card .icon { flex-shrink: 0; }
.weekplan-card .label {
  font-weight: 700;
  color: var(--mint-700);
}

/* 결과 화면 섹션 헤더 */
.result-section-label {
  padding: 18px 20px 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ═══════════════════════════════════════════════
   v4 — 친근한 설명 카드들 (토스 PO 톤)
   ═══════════════════════════════════════════════ */

/* 점수 링 아래 한 줄 요약 — 가장 위 핵심 메시지 */
.oneline-card {
  margin: 12px 16px 0;
  padding: 18px 18px;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--mint-200);
  box-shadow: 0 4px 16px rgba(0, 200, 150, 0.08);
  position: relative;
  overflow: hidden;
}
.oneline-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-hero);
}
.oneline-card .icon {
  font-size: 22px;
  margin-bottom: 4px;
}
.oneline-card .label {
  font-size: 11px;
  font-weight: 700;
  color: var(--mint-700);
  letter-spacing: 0.6px;
}
.oneline-card .text {
  font-size: 15px;
  color: var(--gray-900);
  line-height: 1.6;
  margin-top: 6px;
  font-weight: 600;
}
.oneline-card .text b {
  color: var(--mint-700);
  font-weight: 800;
}

/* 운동 데이터 카드 — 비유 한 줄 추가 */
.workout-summary .cell .hint {
  font-size: 10px;
  color: var(--mint-700);
  font-weight: 500;
  margin-top: 4px;
  display: block;
  line-height: 1.4;
}

/* 강도 존 카드 — 감각/효능 설명 강화 */
.zone-feeling {
  margin-top: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #F0FDF9, #E0FAF4);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-primary);
}
.zone-feeling .feeling {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.5;
}
.zone-feeling .benefit {
  font-size: 12px;
  color: var(--mint-800);
  margin-top: 4px;
  line-height: 1.5;
}
.zone-feeling .warning {
  font-size: 12px;
  color: var(--amber);
  margin-top: 6px;
  font-weight: 600;
  display: flex;
  gap: 4px;
  align-items: flex-start;
}
.zone-feeling .warning::before {
  content: '⚠️';
  flex-shrink: 0;
}

/* 목표 영향 카드 v2 — plain 설명 추가 */
.impact-card .subtitle {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 500;
  margin-top: 2px;
}
.impact-plain {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--mint-50);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--mint-800);
  line-height: 1.6;
}
.impact-plain b {
  color: var(--mint-700);
  font-weight: 800;
}

/* 상세 분석 v2 — simple 한 줄 + value + desc + tip 구조 */
.analysis-card .item-row {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 16px 0 14px;
}
.analysis-card .item-row .row-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.analysis-card .item-row .row-top .status-dot {
  margin-top: 0;
}
.analysis-card .item-row .row-top .item-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
}
.analysis-card .item-row .row-top .status-badge {
  margin-left: auto;
}
.analysis-card .item-row .simple {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  margin-top: 6px;
  line-height: 1.4;
}
.analysis-card .item-row .item-value-2 {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-top: 4px;
}
.analysis-card .item-row .desc-2 {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 6px;
  line-height: 1.5;
}
.analysis-card .item-row .tip-2 {
  font-size: 12px;
  color: var(--mint-700);
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--mint-50);
  border-radius: 6px;
  line-height: 1.5;
  display: flex;
  gap: 6px;
}
.analysis-card .item-row .tip-2::before {
  content: '💡';
  flex-shrink: 0;
}

/* 처방 카드 v2 — items 4개로 + why */
.prescription-card .items {
  grid-template-columns: 1fr 1fr;
}
.prescription-card .why {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}
.prescription-card .why .label {
  font-size: 10px;
  font-weight: 800;
  opacity: 0.9;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}
.prescription-card .why b {
  color: white;
  font-weight: 800;
}

/* 강조 텍스트 (마크다운 b처럼) — 모든 plain 카드에 적용 */
.plain-bold {
  color: var(--mint-700);
  font-weight: 800;
}

/* ═══════════════════════════════════════════════
   🚀 runfit — 스플래시 + 브랜드 (v0.5 최종 디자인)
   ═══════════════════════════════════════════════ */

/* 스플래시 스크린 — 진입 시 1.5초 노출 */
.splash-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #F0FDF9 0%, #FFFFFF 50%, #ECFDF5 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  gap: 16px;
  animation: splashFadeOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) 1.6s forwards;
}
.splash-screen.gone {
  display: none;
}
.splash-logo {
  animation: logoIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.splash-wordmark {
  width: 240px;
  height: auto;
  filter: drop-shadow(0 6px 20px rgba(0, 200, 150, 0.18));
}
/* 속도 라인 — 좌측에서 우측으로 흘러가는 애니 */
.splash-wordmark .speed-line {
  animation: speedLine 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.splash-wordmark .sl-1 { animation-delay: 0s; }
.splash-wordmark .sl-2 { animation-delay: 0.15s; }
.splash-wordmark .sl-3 { animation-delay: 0.3s; }
.splash-tagline {
  font-size: 13px;
  font-weight: 600;
  color: var(--mint-700);
  letter-spacing: 0.6px;
  opacity: 0;
  animation: taglineIn 0.6s ease 0.3s forwards;
}
@keyframes logoIn {
  0% { transform: scale(0.5) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes taglineIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 0.85; transform: translateY(0); }
}
@keyframes splashFadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes speedLine {
  0% { transform: translateX(-8px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateX(20px); opacity: 0; }
}

/* Quick Start 화면 브랜드 로고 (큰) */
.brand-logo {
  width: 180px;
  height: auto;
  margin: 0 auto 24px;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 200, 150, 0.15));
}

/* 공유 카드 브랜드 (PNG로 변환됨) */
.share-card-template .sc-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.share-card-template .sc-brand-mark {
  font-size: 26px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -1px;
  color: white;
}
.share-card-template .sc-brand-sub {
  font-size: 11px;
  opacity: 0.7;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════
   v0.2 — TOP-5 진입 작전 (30초 온보딩 + DAU 트리거)
   ═══════════════════════════════════════════════ */

/* 🆕 Quick Start 화면 */
.quickstart-hero {
  padding: 56px 24px 24px;
  text-align: center;
  background: linear-gradient(180deg, var(--mint-50) 0%, var(--white) 100%);
}
.quickstart-hero .qs-emoji {
  font-size: 64px;
  margin-bottom: 16px;
  animation: scaleIn 0.5s ease;
  display: none;  /* v0.5: 로고로 대체 */
}
.quickstart-hero h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--gray-900);
  margin-bottom: 8px;
  letter-spacing: -0.6px;
}
.quickstart-hero h1 .hl {
  background: linear-gradient(135deg, #00C896, #00896A);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.quickstart-hero p {
  font-size: 14px;
  color: var(--gray-600);
}
/* (옛 grid 유지 - 호환성) */
.qs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 16px 24px;
}
.qs-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  font-size: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.qs-card:hover {
  border-color: var(--color-primary);
  background: var(--mint-50);
  transform: translateY(-2px);
}
.qs-card:active { transform: scale(0.97); }
.qs-card span {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
}

/* v0.5: runfit 달리기 전용 큰 CTA */
.qs-running {
  padding: 24px 20px 16px;
}
.qs-run-card {
  width: 100%;
  background: linear-gradient(135deg, #00C896 0%, #00896A 100%);
  color: white;
  border: none;
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  box-shadow: 0 8px 28px rgba(0, 200, 150, 0.32);
  position: relative;
  overflow: hidden;
}
.qs-run-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,0.10);
  border-radius: 50%;
}
.qs-run-card:active {
  transform: scale(0.98);
  box-shadow: 0 4px 14px rgba(0, 200, 150, 0.28);
}
.qs-run-card .qs-run-emoji {
  font-size: 48px;
  line-height: 1;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.qs-run-card .qs-run-text {
  flex: 1;
  text-align: left;
  position: relative;
  z-index: 1;
}
.qs-run-card .qs-run-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.3;
}
.qs-run-card .qs-run-sub {
  font-size: 12px;
  opacity: 0.92;
  margin-top: 4px;
  line-height: 1.5;
}
.qs-run-card .qs-run-arrow {
  font-size: 28px;
  font-weight: 600;
  opacity: 0.8;
  position: relative;
  z-index: 1;
}
.qs-coming-soon {
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
  padding: 12px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
}
.qs-coming-soon b {
  color: var(--mint-700);
  font-weight: 700;
}

/* 기록 입력 — 고정 운동 라벨 (운동 종류 칩 대체) */
.exercise-fixed {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--mint-50), #ECFDF5);
  border: 1.5px solid var(--mint-200);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.exercise-fixed .ef-emoji {
  font-size: 28px;
}
.exercise-fixed .ef-text {
  flex: 1;
  font-size: 15px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.3px;
}
.exercise-fixed .ef-tag {
  font-size: 11px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #00C896, #00896A);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.qs-footer {
  text-align: center;
  padding: 8px 24px 24px;
}
.qs-footer .btn-ghost {
  border: none;
  background: none;
  color: var(--gray-500);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}

/* 🪙 포인트 잔액 배지 (홈 상단) */
.points-badge {
  margin: 8px 16px 0;
  padding: 12px 16px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 1.5px solid #FBBF24;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.25);
  transition: transform 0.15s;
}
.points-badge:active { transform: scale(0.97); }
.points-badge .icon { font-size: 18px; }
.points-badge .bal {
  font-size: 18px;
  color: #92400E;
}
.points-badge .label {
  font-size: 12px;
  color: #92400E;
  margin-right: 4px;
}
.points-badge .today {
  font-size: 11px;
  color: #B45309;
  background: rgba(255,255,255,0.6);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* 🌅 일일 한 줄 메시지 카드 */
.daily-msg-card {
  margin: 12px 16px 0;
  padding: 16px 18px;
  background: linear-gradient(135deg, #F0FDF9, #E0FAF4);
  border: 1.5px solid var(--mint-200);
  border-radius: var(--radius-lg);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.daily-msg-card .emoji {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.daily-msg-card .body { flex: 1; min-width: 0; }
.daily-msg-card .msg {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.5;
}
.daily-msg-card .extra {
  font-size: 12px;
  color: var(--mint-800);
  margin-top: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  line-height: 1.5;
}

/* 🌅 일일 컨디션 체크인 카드 */
.checkin-card {
  margin: 12px 16px 0;
  padding: 18px;
  background: var(--white);
  border: 1.5px solid var(--mint-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.checkin-header {
  font-size: 15px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 14px;
}
.checkin-header b {
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 4px;
}
.checkin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.checkin-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-600);
  width: 36px;
  flex-shrink: 0;
}
.checkin-options {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  flex: 1;
}
.opt-btn {
  flex: 1;
  min-width: 32px;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--gray-700);
  font-family: inherit;
}
.opt-btn:active { transform: scale(0.95); }
.opt-btn.sel {
  background: var(--mint-50);
  border-color: var(--color-primary);
  color: var(--mint-700);
  font-weight: 800;
}
.checkin-card .btn-primary {
  margin-top: 10px;
  font-size: 14px;
  padding: 12px;
}

/* 🎉 포인트 적립 토스트 */
.point-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  color: white;
  font-size: 14px;
  font-weight: 800;
  padding: 14px 22px;
  border-radius: var(--radius-full);
  z-index: 320;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 6px 24px rgba(251, 191, 36, 0.45);
  display: flex;
  align-items: center;
  gap: 8px;
}
.point-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}
.point-toast .coin {
  font-size: 22px;
  animation: spinCoin 0.6s ease;
}
@keyframes spinCoin {
  0% { transform: rotateY(0); }
  100% { transform: rotateY(720deg); }
}

/* ═══════════════════════════════════════════════
   결제 완료 축하 풀스크린 (Bug #16)
   ═══════════════════════════════════════════════ */
.success-splash {
  position: fixed;
  inset: 0;
  background: var(--gradient-hero);
  z-index: 400;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 40px;
  animation: fadeIn 0.4s ease;
}
.success-splash.show { display: flex; }
.success-splash .crown {
  font-size: 100px;
  line-height: 1;
  margin-bottom: 20px;
  animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}
.success-splash .title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.7px;
}
/* 결제 성공 splash에 runfit 브랜드 */
.success-splash::before {
  content: 'runfit';
  position: absolute;
  top: 60px;
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.5px;
  color: rgba(255,255,255,0.5);
}
.success-splash .sub {
  font-size: 15px;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.6;
  max-width: 320px;
}
.success-splash button {
  background: white;
  color: var(--mint-700);
  border: none;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  font-family: inherit;
}
.success-splash button:active {
  transform: scale(0.97);
}

/* ═══════════════════════════════════════════════
   v7 — 통계 탭 / 프로필 / 축하 모달 / 공유
   ═══════════════════════════════════════════════ */

/* 통계 탭 */
.stats-hero {
  background: var(--gradient-hero);
  color: white;
  padding: 28px 20px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.stats-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}
.stats-hero .num {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}
.stats-hero .lbl {
  font-size: 13px;
  opacity: 0.9;
  margin-top: 6px;
  font-weight: 500;
}

/* 4-cell 누적 통계 */
.stats-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: -16px 16px 0;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 5;
}
.stats-totals .total-cell {
  text-align: center;
  padding: 8px 6px;
}
.stats-totals .total-cell:nth-child(odd) {
  border-right: 1px solid var(--gray-100);
}
.stats-totals .total-cell:nth-child(-n+2) {
  border-bottom: 1px solid var(--gray-100);
  padding-bottom: 12px;
}
.stats-totals .total-cell:nth-child(n+3) {
  padding-top: 12px;
}
.stats-totals .total-cell .icon {
  font-size: 18px;
  margin-bottom: 4px;
}
.stats-totals .total-cell .v {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
}
.stats-totals .total-cell .u {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 600;
  margin-left: 2px;
}
.stats-totals .total-cell .l {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 4px;
  font-weight: 500;
}

/* 카드 공통 (통계 탭) */
.stats-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  margin: 12px 16px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.stats-card .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.stats-card .head .title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
}
.stats-card .head .sub {
  font-size: 11px;
  color: var(--gray-400);
}

/* 점수 추이 큰 차트 */
.score-chart {
  width: 100%;
  height: 140px;
  display: block;
}

/* 도넛 + 범례 */
.donut-row {
  display: flex;
  gap: 16px;
  align-items: center;
}
.donut-row svg {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}
.donut-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.donut-legend .row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}
.donut-legend .swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.donut-legend .row .name {
  flex: 1;
  color: var(--gray-700);
  font-weight: 600;
}
.donut-legend .row .pct {
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 700;
}

/* 운동 종류 막대 */
.bar-list .bar-row {
  margin-bottom: 10px;
}
.bar-list .bar-row:last-child { margin-bottom: 0; }
.bar-list .bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}
.bar-list .bar-label .name {
  color: var(--gray-700);
  font-weight: 600;
}
.bar-list .bar-label .cnt {
  color: var(--gray-500);
  font-weight: 600;
}
.bar-list .bar-track {
  height: 8px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.bar-list .bar-fill {
  height: 100%;
  background: var(--gradient-hero);
  border-radius: var(--radius-full);
}

/* 주별 비교 */
.compare-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.compare-col {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}
.compare-col.now { background: var(--mint-50); border: 1px solid var(--mint-200); }
.compare-col .lbl {
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 600;
  margin-bottom: 6px;
}
.compare-col .v {
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-900);
}
.compare-col .delta {
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
}
.delta.up { color: var(--color-primary); }
.delta.down { color: #DC2626; }
.delta.same { color: var(--gray-400); }

/* 프로필 화면 */
.profile-head {
  background: var(--gradient-hero);
  color: white;
  padding: 28px 20px;
  text-align: center;
}
.profile-head .avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 12px;
}
.profile-head .name {
  font-size: 16px;
  font-weight: 700;
}
.profile-head .joined {
  font-size: 11px;
  opacity: 0.85;
  margin-top: 2px;
}

.profile-section {
  background: var(--white);
  margin: 12px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  overflow: hidden;
}
.profile-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer;
  transition: background 0.15s;
  gap: 12px;
}
.profile-row:last-child { border-bottom: none; }
.profile-row:hover { background: var(--gray-50); }
.profile-row .label {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}
.profile-row .value {
  font-size: 13px;
  color: var(--gray-500);
}
.profile-row .chev {
  color: var(--gray-300);
  font-size: 16px;
  font-weight: 700;
  margin-left: 4px;
}
.profile-row.danger .label { color: #DC2626; }

/* 모달 (편집·축하 공통) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.42);  /* Bug #12: 토스 스타일로 더 부드럽게 */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 250;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-backdrop.show { display: flex; }
.modal-sheet {
  background: var(--white);
  width: 100%;
  max-width: 480px;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px calc(20px + env(safe-area-inset-bottom));
  max-height: 88vh;
  max-height: 88dvh;
  overflow-y: auto;
  animation: slideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-overflow-scrolling: touch;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-sheet .handle {
  width: 44px;
  height: 5px;
  background: var(--gray-200);
  border-radius: 4px;
  margin: -10px auto 16px;
}
.modal-sheet .modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
}
.modal-sheet .modal-sub {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* 챌린지 완료 축하 모달 */
.celebrate-modal .icon {
  font-size: 56px;
  text-align: center;
  margin: 8px 0 12px;
  animation: scaleIn 0.5s ease;
}
.celebrate-modal .stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}
.celebrate-modal .stats-row .cell {
  background: var(--mint-50);
  border-radius: var(--radius-md);
  padding: 10px;
  text-align: center;
}
.celebrate-modal .stats-row .v {
  font-size: 18px;
  font-weight: 800;
  color: var(--mint-700);
}
.celebrate-modal .stats-row .l {
  font-size: 10px;
  color: var(--gray-500);
  margin-top: 2px;
}

/* 다음 챌린지 옵션 카드 */
.next-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.next-opt {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  gap: 12px;
  align-items: center;
}
.next-opt:hover {
  border-color: var(--color-primary);
  background: var(--mint-50);
}
.next-opt .emoji { font-size: 22px; flex-shrink: 0; }
.next-opt .info { flex: 1; }
.next-opt .ttl {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
}
.next-opt .desc {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
  line-height: 1.4;
}

/* 공유 버튼 */
.share-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.25);
  color: white;
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.share-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* 공유용 결과 카드 (다운로드 이미지) */
.share-card-template {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 720px;
  background: linear-gradient(135deg, #00C896 0%, #00896A 100%);
  color: white;
  padding: 48px 40px;
  border-radius: 32px;
  font-family: 'Inter', sans-serif;
}
.share-card-template .sc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.share-card-template .sc-brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.4px;
}
.share-card-template .sc-date {
  font-size: 14px;
  opacity: 0.85;
}
.share-card-template .sc-score {
  font-size: 120px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  text-align: center;
  margin: 12px 0 8px;
}
.share-card-template .sc-score .unit {
  font-size: 36px;
  opacity: 0.6;
  margin-left: 4px;
}
.share-card-template .sc-headline {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 28px;
}
.share-card-template .sc-row {
  display: flex;
  justify-content: space-around;
  background: rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}
.share-card-template .sc-cell { text-align: center; }
.share-card-template .sc-cell .v {
  font-size: 26px;
  font-weight: 800;
}
.share-card-template .sc-cell .l {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 4px;
}
.share-card-template .sc-foot {
  text-align: center;
  font-size: 12px;
  opacity: 0.75;
  margin-top: 12px;
}

/* ═══════════════════════════════════════════════
   v8 — 결제 / 업셀 / 의향 설문
   ═══════════════════════════════════════════════ */

/* 분석 횟수 카운터 (홈 우상단 작은 뱃지) */
.usage-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--gray-100);
  color: var(--gray-600);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-top: 8px;
}
.usage-pill.warn {
  background: #FEF3C7;
  color: #92400E;
}
.usage-pill.pro {
  background: linear-gradient(135deg, #00C896, #00896A);
  color: white;
}

/* 프로 뱃지 (프로필 헤더) */
.pro-badge {
  display: inline-block;
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.6px;
  margin-left: 6px;
}

/* 업셀 모달 */
.upsell-modal .crown {
  text-align: center;
  font-size: 56px;
  margin: 8px 0 12px;
  animation: scaleIn 0.5s ease;
}
.upsell-modal .pro-title {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #00C896, #00896A);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}
.upsell-modal .pro-sub {
  text-align: center;
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 22px;
  line-height: 1.5;
}
.upsell-modal .price-card {
  background: linear-gradient(135deg, #00C896, #00896A);
  color: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.upsell-modal .price-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
}
.upsell-modal .price-card .month {
  font-size: 12px;
  opacity: 0.9;
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.upsell-modal .price-card .amount {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  margin: 6px 0 4px;
  position: relative;
  z-index: 1;
}
.upsell-modal .price-card .amount .unit {
  font-size: 16px;
  font-weight: 600;
  opacity: 0.85;
  margin-left: 2px;
}
.upsell-modal .price-card .small {
  font-size: 11px;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}
.upsell-modal .feature-list {
  margin-bottom: 20px;
}
.upsell-modal .feature-list .row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
}
.upsell-modal .feature-list .row .check {
  color: var(--color-primary);
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

/* 결제 의향 카드 (4회째에 결과 화면 하단) */
.intent-card {
  margin: 12px 16px;
  padding: 18px;
  background: linear-gradient(135deg, #FFF7E6 0%, #FEE9D1 100%);
  border: 1.5px solid #FBBF24;
  border-radius: var(--radius-lg);
}
.intent-card .head {
  font-size: 14px;
  font-weight: 800;
  color: #92400E;
  margin-bottom: 6px;
}
.intent-card .question {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
  margin-bottom: 14px;
}
.intent-card .question b { color: #B45309; }
.intent-stars {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 12px;
}
.intent-star {
  flex: 1;
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: 10px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-600);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
}
.intent-star .face { font-size: 20px; display: block; margin-bottom: 2px; }
.intent-star:hover {
  border-color: #FBBF24;
  transform: translateY(-1px);
}
.intent-star.selected {
  background: #FBBF24;
  color: white;
  border-color: #F59E0B;
}
.intent-card textarea {
  width: 100%;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  font-family: inherit;
  resize: none;
  height: 56px;
  background: rgba(255,255,255,0.7);
  outline: none;
  margin-bottom: 10px;
}
.intent-card .submit {
  width: 100%;
  background: #B45309;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.intent-card .submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.intent-card.done {
  text-align: center;
}
.intent-card.done .done-msg {
  font-size: 14px;
  font-weight: 700;
  color: #92400E;
  padding: 8px 0;
}

/* ═══════════════════════════════════════════════
   v9 — 손실 회피 업셀 + 트라이얼/연구독 + 러너 등급
   ═══════════════════════════════════════════════ */

/* 손실 회피 섹션 (업셀 모달 안) */
.loss-aversion {
  background: linear-gradient(135deg, #1F2937, #374151);
  color: white;
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.loss-aversion::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.loss-aversion .la-title {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.85;
  margin-bottom: 4px;
  position: relative;
}
.loss-aversion .la-headline {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 14px;
  line-height: 1.4;
  position: relative;
}
.loss-aversion .la-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  position: relative;
}
.loss-aversion .la-cell {
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 12px;
}
.loss-aversion .la-cell .v {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.loss-aversion .la-cell .v .u {
  font-size: 11px;
  opacity: 0.7;
  font-weight: 600;
  margin-left: 2px;
}
.loss-aversion .la-cell .l {
  font-size: 10px;
  opacity: 0.75;
  margin-top: 4px;
  font-weight: 600;
}
.loss-aversion .la-warn {
  font-size: 12px;
  font-weight: 700;
  color: #FBBF24;
  margin-top: 12px;
  position: relative;
}

/* 플랜 토글 (월·연·트라이얼) */
.plan-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  background: var(--gray-100);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}
.plan-toggle.two-cols {
  grid-template-columns: 1fr 1fr;
}
.plan-toggle .opt .head .best-badge {
  display: inline-block;
  margin-left: 4px;
  font-size: 9px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, #00C896, #00896A);
  padding: 2px 5px;
  border-radius: 6px;
  letter-spacing: 0.4px;
  vertical-align: middle;
}
.plan-toggle .opt {
  text-align: center;
  padding: 10px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-600);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  line-height: 1.3;
  position: relative;
}
.plan-toggle .opt .head { font-size: 12px; }
.plan-toggle .opt .sub { font-size: 10px; opacity: 0.75; margin-top: 2px; font-weight: 600; }
.plan-toggle .opt.active {
  background: white;
  color: var(--mint-700);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.plan-toggle .opt.active .sub { color: var(--gray-500); }
.plan-toggle .opt .save-tag {
  position: absolute;
  top: -6px;
  right: -2px;
  background: #EF4444;
  color: white;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 8px;
  letter-spacing: 0.3px;
}

/* 러너 등급 뱃지 (홈) */
.rank-card {
  margin: 12px 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #FAEEDA, #FEF3C7);
  border: 1px solid #FBBF24;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.15s;
}
.rank-card:hover { transform: translateY(-1px); }
.rank-card .rank-emoji {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
}
.rank-card .rank-body {
  flex: 1;
  min-width: 0;
}
.rank-card .rank-label {
  font-size: 10px;
  font-weight: 800;
  color: #92400E;
  letter-spacing: 0.6px;
}
.rank-card .rank-name {
  font-size: 18px;
  font-weight: 800;
  color: #1a1a2e;
  line-height: 1.2;
  margin-top: 2px;
}
.rank-card .rank-progress-track {
  height: 5px;
  background: rgba(255,255,255,0.7);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 8px;
}
.rank-card .rank-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #F59E0B, #B45309);
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.rank-card .rank-hint {
  font-size: 11px;
  color: #92400E;
  margin-top: 6px;
  font-weight: 600;
}

/* 러너 등급 (프로필 헤더에 작게) */
.profile-rank-badge {
  display: inline-block;
  background: linear-gradient(135deg, #FBBF24, #B45309);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-top: 8px;
  letter-spacing: 0.4px;
}

/* 온보딩 — 신체정보 화면 가치 설명 박스 */
.info-why {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--mint-50);
  border: 1px solid var(--mint-200);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}
.info-why .icon {
  font-size: 18px;
  flex-shrink: 0;
}
.info-why .text {
  font-size: 13px;
  color: var(--mint-800);
  line-height: 1.6;
}
.info-why b {
  color: var(--mint-700);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════
   v5 — Retention 무기 (오늘 추천 / 챌린지 / 잔디)
   ═══════════════════════════════════════════════ */

/* 🌅 오늘 추천 카드 — DAU 트리거 */
.today-rec-card {
  margin: 12px 16px 0;
  padding: 18px;
  background: linear-gradient(135deg, #FFF7E6 0%, #FEE9D1 100%);
  border-radius: var(--radius-xl);
  border: 1.5px solid #FBBF24;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.today-rec-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(251, 191, 36, 0.18);
}
.today-rec-card .emoji {
  font-size: 32px;
  flex-shrink: 0;
  line-height: 1;
}
.today-rec-card .body {
  flex: 1;
}
.today-rec-card .label {
  font-size: 11px;
  font-weight: 800;
  color: #92400E;
  letter-spacing: 0.6px;
}
.today-rec-card .title {
  font-size: 16px;
  font-weight: 800;
  color: var(--gray-900);
  margin-top: 4px;
  line-height: 1.4;
}
.today-rec-card .message {
  font-size: 13px;
  color: var(--gray-700);
  margin-top: 4px;
  line-height: 1.5;
}
.today-rec-card .arrow {
  color: #B45309;
  font-size: 20px;
  font-weight: 700;
  align-self: center;
  flex-shrink: 0;
}

/* 🏆 챌린지 카드 — 4주 도전 */
.challenge-card {
  margin: 12px 16px;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--mint-200);
  box-shadow: var(--shadow-sm);
}
.challenge-card .head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.challenge-card .head .title {
  font-size: 14px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.4;
}
.challenge-card .head .days {
  font-size: 11px;
  font-weight: 700;
  color: var(--mint-700);
  background: var(--mint-50);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}
.challenge-card .progress-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
.challenge-card .progress-row .current {
  font-size: 22px;
  font-weight: 800;
  color: var(--mint-700);
  line-height: 1;
}
.challenge-card .progress-row .current .target {
  font-size: 14px;
  color: var(--gray-400);
  font-weight: 600;
  margin-left: 2px;
}
.challenge-card .progress-row .pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-500);
}
.challenge-card .progress-bar-wrap {
  height: 12px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}
.challenge-card .progress-bar-fill-c {
  height: 100%;
  background: var(--gradient-hero);
  border-radius: var(--radius-full);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 6%;  /* 첫 분석 후도 시각적 보상 (Bug #14) */
  box-shadow: 0 0 8px rgba(0, 200, 150, 0.35);
}
.challenge-card .why-row {
  margin-top: 12px;
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}
.challenge-card.completed {
  background: linear-gradient(135deg, var(--mint-50), var(--mint-100));
  border-color: var(--color-primary);
}
.challenge-card.completed .badge-done {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-left: 6px;
  letter-spacing: 0.4px;
}

/* 🌱 잔디 캘린더 — GitHub 컨트리뷰션 스타일 */
.calendar-card {
  margin: 12px 16px;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
}
.calendar-card .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.calendar-card .head .title {
  font-size: 14px;
  font-weight: 800;
  color: var(--gray-800);
}
.calendar-card .head .streak {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
/* v0.7: 요일 헤더 (월~일) */
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-500);
  text-align: center;
}
.cal-weekdays .sun {
  color: #E55353;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.cal-cell {
  aspect-ratio: 1;
  border-radius: 5px;
  background: var(--gray-100);
  position: relative;
  transition: transform 0.15s;
  cursor: default;
}
.cal-cell:hover {
  transform: scale(1.15);
  z-index: 2;
}
.cal-cell.lv0 { background: var(--gray-100); }
.cal-cell.lv1 { background: var(--mint-100); }
.cal-cell.lv2 { background: var(--mint-200); }
.cal-cell.lv3 { background: var(--mint-400); }
.cal-cell.lv4 { background: var(--mint-600); }

/* v0.7: 미래(예정) 칸은 점선 */
.cal-cell.future {
  background: transparent;
  border: 1.5px dashed var(--gray-200);
}
.cal-cell.future:hover { transform: none; }

/* v0.7: 오늘 — 짙은 outline + 작은 dot */
.cal-cell.today {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
  box-shadow: 0 2px 8px rgba(0, 200, 150, 0.32);
}
.cal-cell .today-dot {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 6px; height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--white);
}
.cal-cell.today.lv0 .today-dot {
  background: var(--color-primary);
}
.cal-cell.today.lv3 .today-dot,
.cal-cell.today.lv4 .today-dot {
  background: var(--white);
  box-shadow: 0 0 0 2px var(--color-primary);
}

/* v0.7: 범례 — 점수 명시 */
.cal-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
  font-size: 10px;
  color: var(--gray-500);
}
.cal-legend .lv-item {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.cal-legend .lv-box {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* 마일스톤 진행 bar — 스트릭 다음 목표 */
.streak-milestone {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--mint-50);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
}
.streak-milestone .fire {
  font-size: 22px;
  flex-shrink: 0;
}
.streak-milestone .body {
  flex: 1;
}
.streak-milestone .text {
  font-size: 12px;
  font-weight: 700;
  color: var(--mint-800);
  margin-bottom: 4px;
}
.streak-milestone .bar {
  height: 4px;
  background: white;
  border-radius: var(--radius-full);
  overflow: hidden;
}
.streak-milestone .bar-fill {
  height: 100%;
  background: var(--gradient-hero);
}

/* ═══════════════════════════════════════════════
   v0.6 — 가입 화면 + 오늘 컨디션 카드 + 이름 호명
   ═══════════════════════════════════════════════ */

/* 가입 화면 — 미니멀, 토스 스러운 단일 카드 */
.signup-hero {
  padding: 64px 24px 12px;
  text-align: center;
  background: linear-gradient(180deg, var(--mint-50) 0%, var(--white) 100%);
}
.signup-hero .brand-logo {
  width: 200px;
  height: auto;
  margin: 0 auto 24px;
  display: block;
}
.signup-hero h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}
.signup-hero p {
  font-size: 14px;
  color: var(--gray-600);
}
.signup-form {
  padding: 20px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.signup-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.signup-form .form-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 4px;
}
.signup-form .form-label .required {
  color: var(--color-primary);
  font-weight: 800;
}
.signup-form .form-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: border 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.signup-form .form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.12);
}
.signup-form .form-hint {
  font-size: 11px;
  color: var(--gray-500);
  line-height: 1.45;
}
.signup-disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 12px;
  line-height: 1.5;
}
.signup-disclaimer a {
  color: var(--gray-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* v0.7.6: 친구 초대 배너 (가입 화면 — invited_by 있을 때만) */
.invite-banner {
  margin: 12px 20px 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, #FFFCEC 0%, #FFF8DC 100%);
  border: 1.5px solid #F5C44A;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 12px;
}
.invite-banner .ib-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.invite-banner .ib-body {
  flex: 1;
}
.invite-banner .ib-title {
  font-size: 13px;
  font-weight: 800;
  color: #8C6A00;
  margin-bottom: 2px;
}
.invite-banner .ib-sub {
  font-size: 11px;
  color: #A88810;
  line-height: 1.4;
}
.invite-banner .ib-sub b {
  color: #6B4F00;
  font-weight: 800;
}

/* 🆕 v0.6: 매 분석 전 오늘 컨디션 카드 */
.run-condition-card {
  margin: 16px 16px 8px;
  padding: 16px 16px 14px;
  background: linear-gradient(135deg, #FFFCEC 0%, #FFF8DC 100%);
  border: 1px solid #F5E9A8;
  border-radius: var(--radius-lg);
}
.run-condition-card .rcc-head {
  font-size: 13px;
  font-weight: 800;
  color: #8C6A00;
  margin-bottom: 12px;
  letter-spacing: -0.2px;
}
.run-condition-card .rcc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.run-condition-card .rcc-row:last-of-type {
  margin-bottom: 4px;
}
.run-condition-card .rcc-label {
  flex-shrink: 0;
  width: 44px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-700);
}
.run-condition-card .rcc-options {
  flex: 1;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.run-condition-card .rcc-opt {
  flex: 1;
  min-width: 44px;
  padding: 8px 4px;
  font-size: 20px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  line-height: 1;
}
.run-condition-card .rcc-opt.sm {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-700);
  padding: 10px 4px;
}
.run-condition-card .rcc-opt:active {
  transform: scale(0.94);
}
.run-condition-card .rcc-opt.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 200, 150, 0.25);
}
.run-condition-card .rcc-opt.active.sm {
  color: white;
}
.run-condition-card .rcc-hint {
  margin-top: 10px;
  font-size: 11px;
  color: #A88810;
  text-align: center;
}

/* v0.7.3: RPE 1~7 버튼 (작게, 7개 균등) */
.run-condition-card .rcc-rpe {
  gap: 4px;
}
.run-condition-card .rcc-opt.num {
  flex: 1;
  min-width: 30px;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--gray-700);
  font-variant-numeric: tabular-nums;
}
.run-condition-card .rcc-opt.num.active {
  color: white;
}
.run-condition-card .rcc-rpe-legend {
  margin: 2px 0 8px 54px;
  font-size: 10px;
  color: var(--gray-500);
  line-height: 1.3;
}

/* 홈 — 이름 호명 라인 (v0.6) */
.home-greet-name {
  color: var(--color-primary);
  font-weight: 800;
}

/* v0.7.9: 쿠폰 모달 */
.coupon-hero {
  text-align: center;
  padding: 8px 0 14px;
}
.coupon-hero .coupon-icon {
  font-size: 44px;
  margin-bottom: 8px;
}
.coupon-hero .coupon-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 4px;
}
.coupon-hero .coupon-sub {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.45;
  padding: 0 12px;
}
.coupon-form {
  padding: 12px 0;
}
.coupon-form .form-input {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.coupon-form .coupon-msg {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  min-height: 16px;
}
.coupon-form .coupon-msg.error { color: #E55353; }
.coupon-form .coupon-msg.success { color: var(--mint-700); }

/* v0.7.9: 캡처 PRO 사전 안내 */
.pro-required-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #FFF8DC 0%, #FFE4B5 100%);
  border: 1px solid #E8C77B;
  border-radius: var(--radius-lg);
}
.pro-required-banner .prb-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.pro-required-banner .prb-body {
  flex: 1;
}
.pro-required-banner .prb-title {
  font-size: 13px;
  font-weight: 800;
  color: #8C6A00;
  margin-bottom: 2px;
}
.pro-required-banner .prb-sub {
  font-size: 11px;
  color: #A88810;
  line-height: 1.4;
}
.pro-required-banner .prb-tag {
  background: linear-gradient(135deg, #FFB800, #F59E0B);
  color: white;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.32);
}

.cap-pro-hero {
  text-align: center;
  padding: 8px 0 14px;
}
.cap-pro-hero .cap-pro-icon {
  font-size: 44px;
  margin-bottom: 8px;
}
.cap-pro-hero .cap-pro-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.cap-pro-hero .cap-pro-sub {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.45;
  padding: 0 12px;
}
.cap-pro-features {
  background: var(--mint-50);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 12px 0;
}
.cap-pro-features .cpf-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-800);
  padding: 4px 0;
}
.cap-pro-features .cpf-check {
  color: var(--color-primary);
  font-weight: 900;
  font-size: 14px;
}

/* v0.7.5: 결과 화면 "더 보기" 토글 (시니어 PO 의견 — 정보 위계 정리) */
.more-toggle {
  width: calc(100% - 32px);
  margin: 16px;
  padding: 14px 18px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 800;
  color: var(--gray-700);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  transition: background 0.15s;
}
.more-toggle:active { background: var(--gray-100); }
.more-toggle.open {
  background: var(--mint-50);
  border-color: var(--color-primary);
  color: var(--mint-700);
}
.more-toggle .more-arrow {
  font-size: 11px;
  transition: transform 0.2s;
}
.more-toggle.open .more-arrow {
  transform: rotate(180deg);
}
.more-details {
  animation: fadeInDown 0.25s ease;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* v0.7.5: 공유 CTA 카드 — 바이럴 엔진 (컴퍼니빌더 의견) */
.share-cta-card {
  margin: 16px;
  padding: 18px 18px;
  background: linear-gradient(135deg, #00C896 0%, #00896A 100%);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 200, 150, 0.32);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.share-cta-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  background: rgba(255,255,255,0.10);
  border-radius: 50%;
}
.share-cta-card:active {
  transform: scale(0.98);
  box-shadow: 0 4px 14px rgba(0, 200, 150, 0.28);
}
.share-cta-card .scc-icon {
  font-size: 36px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.share-cta-card .scc-body {
  flex: 1;
  position: relative;
  z-index: 1;
}
.share-cta-card .scc-title {
  color: white;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.share-cta-card .scc-sub {
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}
.share-cta-card .scc-arrow {
  color: white;
  font-size: 24px;
  font-weight: 300;
  position: relative;
  z-index: 1;
  opacity: 0.85;
}

/* v0.7.4: 광고 슬롯 (무료 사용자만) */
.ad-slot {
  margin: 16px 16px 8px;
  padding: 8px;
  background: var(--gray-50, #FAFAFA);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  min-height: 100px;
  position: relative;
}
.ad-slot .ad-label {
  position: absolute;
  top: 6px; left: 8px;
  font-size: 9px;
  font-weight: 700;
  color: var(--gray-400);
  letter-spacing: 0.5px;
}
.ad-slot .ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--mint-50), white);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-600);
  text-align: center;
  cursor: pointer;
}
.ad-slot .ad-placeholder:hover {
  background: linear-gradient(135deg, var(--mint-100), var(--mint-50));
}

/* v0.7.3: 결과지 컨디션 배지 카드 */
.condition-badges {
  margin: 12px 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #FFFCEC 0%, #FFF8DC 100%);
  border: 1px solid #F5E9A8;
  border-radius: var(--radius-lg);
}
.condition-badges .cb-label {
  font-size: 11px;
  font-weight: 800;
  color: #8C6A00;
  margin-bottom: 8px;
}
.condition-badges .cb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.condition-badges .cb-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: var(--white);
  border: 1px solid #F0E0A8;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-800);
}
.condition-badges .cb-badge .cb-k {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-500);
}
