/* ===== 기본 설정 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  /* 하루보카 브랜드 컬러 (아이콘 보라색 #967BD9 기준) */
  --primary: #967BD9;
  --primary-light: #F1ECFA;
  --primary-dark: #6A4DC4;
  --green: #10b981;
  --green-light: #ecfdf5;
  --red: #ef4444;
  --red-light: #fef2f2;
  --amber: #f59e0b;
  --amber-light: #fffbeb;
  --bg: #F6F4FB;
  --card: #ffffff;
  --text: #1f2937;
  --text-sub: #6b7280;
  --border: #e5e7eb;
  --radius: 16px;
}
html, body { height: 100%; }
body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ===== 상단바 ===== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(150, 123, 217, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .logo { height: 40px; display: block; }
.topbar-streak {
  font-size: 14px;
  font-weight: 600;
  background: var(--amber-light);
  color: #b45309;
  padding: 6px 12px;
  border-radius: 999px;
}

/* ===== 메인 화면 ===== */
#screen {
  flex: 1;
  padding: 20px 16px 24px;
  overflow-y: auto;
}

.greeting { margin-bottom: 16px; }
.greeting h2 { font-size: 20px; margin-bottom: 4px; }
.greeting p { color: var(--text-sub); font-size: 14px; }

/* ===== 카드 공통 ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(150, 123, 217, 0.06);
}
.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.card-sub { font-size: 13px; color: var(--text-sub); }
.card.done { opacity: 0.65; }

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.badge-new { background: var(--primary-light); color: var(--primary); }
.badge-r1 { background: var(--green-light); color: #047857; }
.badge-r2 { background: var(--amber-light); color: #b45309; }
.badge-r3 { background: var(--red-light); color: #b91c1c; }
.badge-done { background: var(--border); color: var(--text-sub); }

/* ===== 버튼 ===== */
.btn {
  display: inline-block;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 20px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.1s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(150, 123, 217, 0.35);
}
.btn-ghost { background: var(--primary-light); color: var(--primary); }
.btn-green { background: var(--green); color: #fff; }
.btn-danger { background: var(--red-light); color: var(--red); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ===== 발음 듣기 버튼 ===== */
.speak-btn {
  border: none;
  background: var(--primary-light);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  font-size: 16px;
  cursor: pointer;
  vertical-align: middle;
  margin-left: 4px;
  transition: transform 0.1s;
}
.speak-btn:active { transform: scale(0.88); }
.speak-btn.sm { width: 27px; height: 27px; font-size: 12px; }

/* ===== 학습 카드 (단어 암기) ===== */
.word-card {
  background: var(--card);
  border-radius: 20px;
  padding: 28px 22px;
  border: 1px solid var(--border);
  text-align: center;
  margin-bottom: 16px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.word-card .word { font-size: 34px; font-weight: 800; color: var(--primary-dark); }
.word-card .pron { font-size: 14px; color: var(--text-sub); margin: 6px 0 14px; }
.word-card .mean { font-size: 18px; font-weight: 600; margin-bottom: 18px; }
.example {
  text-align: left;
  background: var(--primary-light);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 8px;
}
.example .en { font-size: 15px; font-weight: 600; color: var(--primary-dark); }
.example .ko { font-size: 13px; color: var(--text-sub); margin-top: 3px; }

.learn-progress {
  text-align: center;
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 12px;
  font-weight: 600;
}
.learn-nav { display: flex; gap: 10px; }
.learn-nav .btn { flex: 1; }

/* ===== 퀴즈 ===== */
.quiz-q {
  text-align: center;
  margin: 24px 0;
}
.quiz-q .label { font-size: 13px; color: var(--text-sub); margin-bottom: 8px; }
.quiz-q .word { font-size: 32px; font-weight: 800; color: var(--primary-dark); }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}
.choice.correct { border-color: var(--green); background: var(--green-light); }
.choice.wrong { border-color: var(--red); background: var(--red-light); }
.choice:disabled { cursor: default; }
.quiz-feedback {
  text-align: center;
  font-weight: 700;
  margin: 14px 0;
  font-size: 16px;
  min-height: 24px;
}
.quiz-feedback.ok { color: var(--green); }
.quiz-feedback.no { color: var(--red); }

/* ===== 결과 화면 ===== */
.result-box { text-align: center; padding: 40px 0 20px; }
.result-box .emoji { font-size: 56px; }
.result-box h2 { margin: 14px 0 6px; }
.result-box p { color: var(--text-sub); font-size: 14px; margin-bottom: 24px; }

/* ===== 통계 ===== */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.stat-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.stat-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat-box .num { font-size: 26px; font-weight: 800; color: var(--primary); }
.stat-box .lbl { font-size: 12px; color: var(--text-sub); margin-top: 4px; }

.batch-list .card { padding: 14px 16px; }
.batch-words { font-size: 14px; font-weight: 600; margin-top: 2px; }

/* ===== 설정 ===== */
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: none; }
.setting-row select {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
}

/* ===== 광고 배너 ===== */
.ad-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  background: #ffffff;
  border-top: 1px dashed var(--border);
  color: var(--text-sub);
  font-size: 13px;
}
.ad-label {
  font-size: 10px;
  font-weight: 800;
  border: 1px solid var(--text-sub);
  border-radius: 4px;
  padding: 1px 5px;
}

/* ===== 하단 탭바 (2026 트렌드: pill 활성 표시 + 글래스 블러) ===== */
.tabbar {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  position: sticky;
  bottom: 0;
  z-index: 10;
}
.tab {
  flex: 1;
  background: none;
  border: none;
  min-height: 50px; /* 터치 영역 48px+ 확보 */
  padding: 7px 0 6px;
  border-radius: 14px;
  color: var(--text-sub);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: inherit;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}
.tab:active { transform: scale(0.94); }
.tab svg { width: 23px; height: 23px; }
.tab span { font-size: 11px; font-weight: 600; letter-spacing: -0.2px; }
.tab.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.tab.active svg { stroke-width: 2.4; }
.tab.active span { font-weight: 800; }

/* ===== 캐릭터 & 레벨 ===== */
.char-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #F1ECFA 0%, #ffffff 70%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(150, 123, 217, 0.08);
  text-align: left;
}
.char-card.compact { padding: 12px 16px; }
.char-icon { font-size: 44px; line-height: 1; }
.char-card.compact .char-icon { font-size: 34px; }
.char-info { flex: 1; min-width: 0; }
.char-name { font-weight: 800; font-size: 15px; }
.char-lv { color: var(--primary-dark); }
.xp-bar {
  height: 8px;
  background: #e7e1f3;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #b9a3e8);
  border-radius: 999px;
  transition: width 0.4s;
}
.xp-text { font-size: 11px; color: var(--text-sub); margin-top: 4px; }
.xp-gain {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 15px;
  padding: 8px 16px;
  border-radius: 999px;
  margin: 4px 0 10px;
}

/* ===== 섹션 제목 ===== */
.section-title {
  font-size: 16px;
  margin: 18px 0 10px;
}
.section-sub { font-size: 13px; color: var(--text-sub); font-weight: 600; }

/* ===== 뱃지 ===== */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.badge-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 6px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(150, 123, 217, 0.05);
}
.badge-item .bi-icon { font-size: 26px; }
.badge-item .bi-name { font-size: 12px; font-weight: 800; margin-top: 4px; }
.badge-item .bi-desc { font-size: 10px; color: var(--text-sub); margin-top: 2px; }
.badge-item.locked { opacity: 0.4; filter: grayscale(1); }

/* ===== 테마 칩 ===== */
.theme-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.theme-chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-sub);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ===== 단어장 테마 그룹 (접이식) ===== */
.top-chips { margin-bottom: 10px; }
.theme-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}
.theme-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
}
.theme-group > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.theme-group > summary::-webkit-details-marker { display: none; }
.theme-group > summary .tg-name { flex: 1; }
.theme-group > summary .tg-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  background: var(--bg);
  border-radius: 999px;
  padding: 2px 9px;
}
.theme-group > summary::after {
  content: "▾";
  color: var(--text-sub);
  font-size: 12px;
  transition: transform 0.2s;
}
.theme-group[open] > summary::after { transform: rotate(180deg); }
.theme-group[open] > summary { color: var(--primary); }
.theme-group .theme-chips {
  flex-wrap: wrap;
  overflow: visible;
  padding: 0 12px 12px;
  margin: 0;
}

/* ===== 단어장 ===== */
.search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  font-family: inherit;
  font-size: 15px;
  margin-bottom: 12px;
}
.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(150, 123, 217, 0.2);
}
.word-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 8px;
  box-shadow: 0 2px 10px rgba(150, 123, 217, 0.05);
}
.word-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}
.word-item summary::-webkit-details-marker { display: none; }
.word-item summary .badge { margin: 0; flex-shrink: 0; }
.wi-word { font-weight: 800; font-size: 16px; color: var(--primary-dark); }
.wi-pron { font-weight: 400; font-size: 12px; color: var(--text-sub); }
.wi-mean { font-size: 13px; margin-top: 2px; }
.wi-body { padding: 0 14px 12px; }

/* ===== PC(데스크톱) 화면 — 모바일 앱이 가운데 떠 있는 스타일 ===== */
@media (min-width: 540px) {
  body {
    background: linear-gradient(160deg, #ece5f9 0%, #f6f4fb 60%, #efeafa 100%);
  }
  .app {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: 0 10px 50px rgba(150, 123, 217, 0.22);
  }
}

/* ===== 빈 상태 ===== */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-sub);
}
.empty .emoji { font-size: 44px; margin-bottom: 10px; }

/* ===== 단어장 카테고리 카드 ===== */
.cat-section {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  margin: 18px 2px 8px;
}
.cat-grid { display: flex; flex-direction: column; gap: 8px; }
.cat-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 14px 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.cat-card:active { transform: scale(0.99); }
.cat-card.all {
  background: var(--primary-light);
  border-color: var(--primary-light);
  margin-bottom: 4px;
}
.cat-emoji { font-size: 22px; }
.cat-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cat-name { font-size: 15px; font-weight: 700; color: var(--text); }
.cat-count { font-size: 12px; color: var(--text-sub); }
.cat-arrow { font-size: 20px; color: var(--text-sub); font-weight: 700; }

/* 뒤로가기 버튼 */
.back-btn {
  border: none;
  background: none;
  color: var(--primary-dark);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 2px 10px;
}
.badge-known { background: var(--green-light); color: #047857; }

/* ===== 레벨 테스트 (온보딩) ===== */
body.onboarding .tabbar,
body.onboarding .ad-banner { display: none; }
.onb { text-align: center; padding: 8px 4px 30px; animation: onbIn 0.3s ease; }
@keyframes onbIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.onb h2 { font-size: 22px; margin: 6px 0 10px; }
.onb-sub { color: var(--text-sub); font-size: 14px; line-height: 1.6; }
.onb-emoji { font-size: 60px; margin-top: 24px; }
.onb-emoji.pop { animation: pop 0.5s ease; }
@keyframes pop { 0% { transform: scale(0.3); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
.onb-hooks {
  display: flex; flex-direction: column; gap: 10px;
  margin: 24px 0; text-align: left;
}
.onb-hook {
  background: var(--primary-light); color: var(--primary-dark);
  border-radius: 12px; padding: 13px 16px; font-size: 14px; font-weight: 600;
}
.onb-hook span { margin-right: 8px; }
.onb.intro .btn-primary { margin-top: 8px; }

/* 테스트 진행 */
.onb.test { text-align: center; }
.onb-bar { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; margin: 6px 0 14px; }
.onb-bar-fill { height: 100%; background: var(--primary); border-radius: 999px; transition: width 0.3s; }
.onb-qnum { font-size: 13px; font-weight: 700; color: var(--text-sub); }
.onb-recall {
  font-size: 13px; color: var(--text-sub);
  background: var(--bg); border-radius: 10px; padding: 8px 12px; margin: 12px 0 22px;
}
.onb-recall.hint { background: none; }
.onb-recall b { color: var(--primary-dark); }
.onb-word { font-size: 38px; font-weight: 800; color: var(--primary-dark); }
.onb-pron { color: var(--text-sub); font-size: 15px; margin-top: 6px; }
.onb-ask { font-size: 15px; font-weight: 600; margin: 26px 0 14px; }
.onb-choices { display: flex; gap: 10px; }
.onb-choices .btn {
  flex: 1; padding: 18px 10px; font-size: 16px; font-weight: 700; border: 2px solid var(--border);
}
.onb-know { background: var(--green-light); color: #047857; border-color: var(--green-light) !important; }
.onb-no { background: var(--bg); color: var(--text-sub); }

/* 분석 중 */
.onb.analyzing { padding-top: 70px; }
.onb-spinner { font-size: 56px; animation: spin 1.1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 결과 */
.onb-level { font-size: 30px; color: var(--primary-dark); margin: 4px 0 8px; }
.onb-vocab { font-size: 15px; color: var(--text); }
.onb-vocab b { color: var(--primary); }
.onb-desc { color: var(--text-sub); font-size: 14px; margin: 10px 0 20px; }
.onb-plan {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 6px 16px; margin-bottom: 20px; text-align: left;
}
.onb-plan-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; font-size: 14px; color: var(--text-sub);
  border-bottom: 1px solid var(--border);
}
.onb-plan-row:last-child { border-bottom: none; }
.onb-plan-row b { color: var(--primary-dark); font-size: 15px; }

/* ===== 알림 토글 스위치 ===== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 26px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

.notif-hour-sel {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--card);
  cursor: pointer;
  outline: none;
}

/* ===== 카테고리 필터 토글 버튼 ===== */
.theme-filter-group { margin-bottom: 18px; }
.theme-filter-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--primary-dark);
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1.5px solid var(--primary-light);
}
.theme-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.theme-btn {
  background: #ede9f8;
  color: #7a6aab;
  border: none;
  border-radius: 10px;
  padding: 9px 4px;
  font-size: 11.5px;
  font-weight: 500;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  line-height: 1.35;
  word-break: keep-all;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.theme-btn:active { transform: scale(0.93); }
.theme-btn.active {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(150, 123, 217, 0.35);
}

/* ===== 환영 화면 ===== */
.welcome-screen {
  display: flex; flex-direction: column; align-items: center;
  padding: 32px 24px 40px; min-height: 100vh; text-align: center;
}
.welcome-icon { width: 88px; height: 88px; border-radius: 22px; margin-bottom: 16px; box-shadow: 0 4px 16px rgba(150,123,217,.3); }
.welcome-title { font-size: 28px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.welcome-sub { font-size: 15px; color: var(--text-sub); line-height: 1.6; margin-bottom: 28px; }
.welcome-feats { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-bottom: 32px; }
.welcome-feat { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 10px; padding: 12px 14px; font-size: 14px; color: var(--text); }
.welcome-feat span { font-size: 20px; }
.btn-google-login {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: #fff; color: #3c4043; border: 1.5px solid #dadce0;
  font-weight: 600; font-size: 15px;
}
.btn-google-login:hover { background: #f8f9fa; }

/* ===== 닉네임 설정 ===== */
.nickname-screen {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 24px; text-align: center;
}
.nickname-emoji { font-size: 48px; margin-bottom: 16px; }
.nickname-screen h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.nickname-sub { font-size: 14px; color: var(--text-sub); line-height: 1.6; margin-bottom: 24px; }
.nickname-input-wrap { width: 100%; margin-bottom: 16px; }
.nickname-input {
  width: 100%; padding: 13px 16px; font-size: 16px;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text); outline: none;
}
.nickname-input:focus { border-color: var(--primary); }
.nick-status { font-size: 13px; margin-top: 6px; min-height: 18px; text-align: left; }
.nick-status.ok { color: #2e7d32; }
.nick-status.error { color: #c62828; }
.nick-status.checking { color: var(--text-sub); }

/* ===== 튜토리얼 ===== */
.tutorial-screen {
  display: flex; flex-direction: column; align-items: center;
  padding: 28px 24px 40px; min-height: 100vh; text-align: center;
}
.tut-dots { display: flex; gap: 7px; margin-bottom: 28px; }
.tut-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background .2s; }
.tut-dot.on { background: var(--primary); width: 22px; border-radius: 4px; }
.tut-emoji { font-size: 52px; margin-bottom: 14px; }
.tut-title { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.tut-body { font-size: 14px; color: var(--text-sub); line-height: 1.7; margin-bottom: 20px; }
.tut-btns { width: 100%; margin-top: auto; padding-top: 20px; }

/* 망각곡선 */
.tut-curve { width: 100%; max-width: 280px; margin: 0 auto 8px; }
.tut-curve svg { width: 100%; height: auto; }

/* 복습 타임라인 */
.tut-timeline { display: flex; align-items: center; justify-content: center; gap: 0; flex-wrap: nowrap; overflow-x: auto; padding: 8px 0; }
.tl-node { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tl-node span.tl-day { font-size: 11px; font-weight: 700; color: var(--primary); }
.tl-node span.tl-lbl { font-size: 10px; color: var(--text-sub); }
.tl-node.new .tl-day::before, .tl-node.r1 .tl-day::before,
.tl-node.r2 .tl-day::before, .tl-node.r3 .tl-day::before,
.tl-node.grad .tl-day::before { content: ""; }
.tl-node { background: var(--surface); border: 2px solid var(--primary); border-radius: 10px; padding: 6px 8px; min-width: 42px; }
.tl-node.grad { border-color: #f0c040; }
.tl-line { width: 12px; height: 2px; background: var(--border); flex-shrink: 0; }

/* 카테고리 칩 */
.tut-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 8px 0; }
.tut-chip { padding: 7px 14px; border-radius: 20px; font-size: 13px; background: var(--surface); border: 1.5px solid var(--border); color: var(--text-sub); }
.tut-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* 설정 박스 */
.tut-setting-box { width: 100%; background: var(--surface); border-radius: 12px; padding: 16px; }
.tut-setting-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 8px; }
.tut-setting-row strong { color: var(--primary); }
.tut-setting-tip { font-size: 12px; color: var(--text-sub); text-align: center; }
.tut-setting-tip b { color: var(--primary); }

/* 알림 목업 */
.tut-notif-mock { width: 100%; background: #f2f2f7; border-radius: 14px; padding: 12px 14px; text-align: left; }
.tut-notif-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.tut-notif-app { font-size: 12px; font-weight: 600; color: #555; }
.tut-notif-time { font-size: 11px; color: #999; }
.tut-notif-body { font-size: 14px; color: #222; line-height: 1.5; }
