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

:root {
  --primary:       #6366f1;
  --primary-light: #e0e7ff;
  --primary-dark:  #4f46e5;
  --purple:        #8b5cf6;
  --success:       #10b981;
  --warning:       #f59e0b;
  --danger:        #ef4444;
  --bg:            #f1f4ff;
  --card:          #ffffff;
  --text:          #1e293b;
  --muted:         #64748b;
  --border:        #e2e8f0;
  --radius:        16px;
  --radius-sm:     10px;
  --shadow:        0 1px 4px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:     0 4px 16px rgba(0,0,0,.10);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo',
               'Malgun Gothic', 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 60px;
  line-height: 1.5;
}

/* ===== 레이아웃 ===== */
.app { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ===== 상단 헤더 ===== */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 20px;
}
.top-header .logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.date-badge {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

/* ===== 카드 공통 ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 14px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ===== 연간 카드 ===== */
.annual-card {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
}
.annual-card .card-label { color: rgba(255,255,255,.65); }
.annual-body { display: flex; align-items: center; gap: 24px; }
.annual-ring { flex-shrink: 0; }
.annual-info { flex: 1; min-width: 0; }
.annual-goal-text {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 14px;
}
.core-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.core-pill {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  color: white;
  border-radius: 20px;
  padding: 4px 13px;
  font-size: 13px;
  font-weight: 500;
}

/* ===== 분기 그리드 ===== */
.quarterly-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.q-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 16px 14px;
  text-align: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s;
}
.q-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.q-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light), var(--shadow);
}
.q-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.q-card.active .q-label { color: var(--primary); }
.q-ring { margin: 4px auto; }
.q-schedule { margin-top: 8px; text-align: left; }
.q-schedule-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 3px 0; font-size: 11px; border-bottom: 1px solid var(--border);
}
.q-schedule-row:last-child { border-bottom: none; }
.q-schedule-month { color: var(--muted); font-weight: 600; flex-shrink: 0; margin-right: 6px; }
.q-schedule-core { color: var(--text); font-weight: 500; text-align: right; }
.q-schedule-empty { color: #c8d0e0; font-style: italic; }
.q-goal {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.4;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}

/* ===== 2열 그리드 ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

/* ===== 진행률 바 ===== */
.progress-bar-wrap {
  background: var(--border);
  border-radius: 10px;
  height: 7px;
  overflow: hidden;
  margin: 6px 0 3px;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--primary), var(--purple));
  transition: width .7s ease;
}

/* ===== 월간 - 핵심목표별 서브 항목 ===== */
.core-goal-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.core-goal-item:first-child { padding-top: 2px; }
.core-goal-item:last-child { border-bottom: none; padding-bottom: 2px; }

.core-goal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.core-goal-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.core-goal-pct {
  font-size: 13px;
  font-weight: 700;
}
.core-goal-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 4px;
}
.core-goal-empty {
  color: var(--muted);
  font-style: italic;
}

/* ===== 주간 카테고리 ===== */
.week-cats { display: flex; flex-direction: column; gap: 11px; margin-top: 6px; }
.week-cat-row { display: flex; align-items: center; gap: 10px; }
.week-cat-row--core { border-left: 3px solid var(--primary); padding-left: 8px; border-radius: 0 6px 6px 0; background: rgba(99,102,241,.06); }
.week-cat-name { min-width: 90px; font-size: 13px; font-weight: 500; color: var(--text); }
.week-cat-bar { flex: 1; }
.week-cat-bar .progress-bar-wrap { margin: 0; }
.week-cat-count { font-size: 12px; color: var(--muted); min-width: 38px; text-align: right; }

/* ===== 카테고리 배지 (주간 모달, 매일 할일) ===== */
.cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== 달력 ===== */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cal-title { font-size: 16px; font-weight: 700; }
.cal-navs { display: flex; gap: 6px; }
.cal-nav {
  width: 30px; height: 30px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  transition: all .15s;
  display: flex; align-items: center; justify-content: center;
}
.cal-nav:hover { background: var(--primary-light); color: var(--primary); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 0;
  text-transform: uppercase;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all .15s;
  position: relative;
  color: var(--text);
}
.cal-day:hover { background: var(--primary-light); color: var(--primary); }
.cal-day.today { background: var(--primary); color: white; font-weight: 700; }
.cal-day.other-month { color: #c8d0e0; pointer-events: none; }
.cal-day.has-data::after {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--success);
  position: absolute;
  bottom: 4px;
}
.cal-day.today.has-data::after { background: rgba(255,255,255,.75); }

/* ===== 버튼 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 15px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition: all .15s;
  text-decoration: none;
}
.btn-edit { background: var(--primary-light); color: var(--primary); }
.btn-edit:hover { background: #c7d2fe; }
.btn-edit-white {
  background: rgba(255,255,255,.2);
  color: white;
  border: 1px solid rgba(255,255,255,.3);
}
.btn-edit-white:hover { background: rgba(255,255,255,.32); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-danger-sm {
  background: none; border: none;
  color: #cbd5e1; font-size: 16px;
  cursor: pointer; padding: 2px 5px;
  border-radius: 5px; transition: all .15s; line-height: 1; flex-shrink: 0;
}
.btn-danger-sm:hover { color: var(--danger); background: #fee2e2; }

.btn-edit-sm {
  background: none; border: none;
  color: #cbd5e1; font-size: 13px;
  cursor: pointer; padding: 2px 5px;
  border-radius: 5px; transition: all .15s; flex-shrink: 0; line-height: 1;
}
.btn-edit-sm:hover { color: var(--primary); background: var(--primary-light); }

.task-edit-input {
  flex: 1; min-width: 0;
  padding: 5px 9px;
  border: 1.5px solid var(--primary);
  border-radius: 7px;
  font-size: 14px; font-weight: 500;
  font-family: inherit;
  color: var(--text); background: white;
  outline: none;
}

/* ===== 인라인 편집 확인/취소 버튼 ===== */
.btn-save-sm {
  background: none; border: none;
  color: var(--success); font-size: 16px; font-weight: 700;
  cursor: pointer; padding: 4px 7px;
  border-radius: 6px; transition: all .15s;
  flex-shrink: 0; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.btn-save-sm:hover { background: #d1fae5; }

.btn-cancel-sm {
  background: none; border: none;
  color: #94a3b8; font-size: 16px;
  cursor: pointer; padding: 4px 7px;
  border-radius: 6px; transition: all .15s;
  flex-shrink: 0; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.btn-cancel-sm:hover { background: var(--bg); color: var(--text); }

/* 편집 중인 항목 강조 */
.task-item--editing {
  border-color: var(--primary) !important;
  background: white !important;
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* 모바일 터치 타겟 확대 */
@media (hover: none) and (pointer: coarse) {
  .btn-edit-sm, .btn-danger-sm, .btn-save-sm, .btn-cancel-sm {
    min-width: 36px; min-height: 36px;
    padding: 6px 8px;
    display: flex; align-items: center; justify-content: center;
  }
}

/* ===== 모달 ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,20,50,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  backdrop-filter: blur(4px);
}
.modal {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  width: 500px;
  max-width: 94vw;
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

/* ===== 폼 요소 ===== */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.input, .textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .15s;
}
.input:focus, .textarea:focus { border-color: var(--primary); background: white; }
.textarea { resize: vertical; min-height: 72px; }
.slider-row { display: flex; align-items: center; gap: 12px; }
.slider { flex: 1; accent-color: var(--primary); cursor: pointer; }
.slider-val {
  min-width: 44px;
  text-align: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 15px;
}

/* ===== 주간 모달 탭 ===== */
.week-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.week-tab {
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  transition: all .15s;
}
.week-tab.active { background: var(--primary); color: white; border-color: var(--primary); }
.week-tab--core { font-weight: 600; }
.week-tab--core.active { background: var(--primary); color: white; }

/* ===== 할일 추가 행 ===== */
.add-row { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.add-input {
  flex: 1;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .15s;
  min-width: 0;
}
.add-input:focus { border-color: var(--primary); background: white; }
.add-input::placeholder { color: #b0bec5; }

.add-select {
  padding: 9px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  outline: none;
  cursor: pointer;
  transition: border-color .15s;
  flex-shrink: 0;
  max-width: 130px;
}
.add-select:focus { border-color: var(--primary); background: white; }

/* ===== 매일 페이지 ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  margin-bottom: 16px;
}
.back-link:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }

.day-hero {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: var(--radius);
  padding: 22px 26px;
  color: white;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.day-hero-left .day-date { font-size: 20px; font-weight: 700; }
.day-hero-left .day-sub { font-size: 13px; opacity: .75; margin-top: 3px; }

/* 태스크 리스트 */
.task-list { display: flex; flex-direction: column; gap: 7px; margin: 12px 0 8px; }
.task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  transition: all .15s;
}
.task-item:hover { border-color: var(--border); background: white; }
.task-item.done { opacity: .55; }
.task-check {
  width: 17px; height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
.task-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  min-width: 0;
  word-break: break-all;
}
.task-item.done .task-text { text-decoration: line-through; color: var(--muted); }

/* 탭/클릭으로 편집 가능한 텍스트 */
.task-text--editable { cursor: text; }
@media (hover: hover) {
  /* 데스크톱: 호버 시 편집 가능 힌트 */
  .task-text--editable:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-color: #c8d0e0;
  }
}

/* 우선순위 번호 */
.prio-num {
  width: 22px; height: 22px;
  background: var(--warning);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== 타임 트래커 ===== */

/* 활성 타이머 카드 */
.timer-active-card {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1.5px solid #6ee7b7;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.timer-pulse {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  animation: pulse-ring 1.4s ease-out infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.55); }
  70%  { box-shadow: 0 0 0 9px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.timer-active-info { flex: 1; min-width: 0; }
.timer-active-name {
  font-size: 15px; font-weight: 600;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.timer-active-since { font-size: 12px; color: var(--muted); margin-top: 2px; }
.timer-active-elapsed {
  font-size: 22px; font-weight: 700;
  color: var(--success);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  margin-top: 4px;
}
.btn-stop {
  background: var(--danger); color: white;
  border: none; border-radius: 8px;
  padding: 9px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; flex-shrink: 0;
  font-family: inherit; transition: background .15s;
  white-space: nowrap;
}
.btn-stop:hover { background: #dc2626; }
@media (max-width: 420px) {
  .timer-active-card { flex-wrap: wrap; }
  .btn-stop { width: 100%; text-align: center; justify-content: center; }
}

/* 타임라인 */
.timeline {
  position: relative;
  padding-top: 4px;
  margin-top: 10px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 14px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--border);
  border-radius: 2px;
}
.timeline-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 7px 0 7px 38px;
  position: relative;
}
.timeline-entry::before {
  content: '';
  position: absolute;
  left: 9px; top: 13px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: white;
  border: 2.5px solid var(--success);
}
.timeline-entry-body { flex: 1; min-width: 0; }
.timeline-entry-name {
  font-size: 14px; font-weight: 500;
  color: var(--text); line-height: 1.4;
  word-break: break-all;
}
.timeline-entry-meta {
  display: flex; flex-wrap: wrap;
  gap: 6px; margin-top: 4px;
  align-items: center;
}
.time-chip {
  display: inline-flex; align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px; font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: .01em;
}
.duration-chip {
  display: inline-flex; align-items: center;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px; font-weight: 700;
  color: var(--success);
  white-space: nowrap;
}
.timer-total-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 4px 2px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}
.timer-total-label { font-size: 13px; color: var(--muted); }
.timer-total-value { font-size: 15px; font-weight: 700; color: var(--primary); }
.timer-core-row { padding-top: 4px; border-top: 1px dashed var(--border); margin-top: 4px; }
.no-timer-msg {
  text-align: center;
  padding: 20px 0 10px;
  font-size: 13px; color: var(--muted);
  font-style: italic; line-height: 1.7;
}

/* 타임라인 항목 편집 */
.timeline-entry--editable { cursor: pointer; border-radius: 8px; transition: background .15s; }
.timeline-entry--editable:hover { background: var(--bg); }
.timeline-entry--editing { align-items: flex-start; }
.timeline-edit-form { flex: 1; min-width: 0; }
.timeline-edit-times {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; flex-wrap: wrap;
}
.timeline-edit-time-label {
  font-size: 12px; color: var(--muted); white-space: nowrap;
}
.time-select {
  border: 1.5px solid var(--border); border-radius: 7px;
  padding: 7px 6px; font-size: 14px; font-family: inherit;
  background: var(--surface); color: var(--text);
  cursor: pointer; -webkit-appearance: none; appearance: none;
  text-align: center;
}
.time-select:focus { outline: none; border-color: var(--primary); }
.time-select--min { width: 58px; }
.time-select-colon { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1; }
.timeline-edit-arrow { font-size: 14px; color: var(--muted); margin: 0 2px; }
.timeline-edit-btns { display: flex; gap: 8px; margin-top: 10px; }
.timeline-edit-btns .btn-save-sm,
.timeline-edit-btns .btn-cancel-sm {
  padding: 7px 16px; font-size: 13px; border-radius: 7px;
}
@media (max-width: 480px) {
  .timeline-edit-times { gap: 5px; }
  .time-select { font-size: 15px; padding: 8px 5px; }
  .timeline-edit-btns .btn-save-sm,
  .timeline-edit-btns .btn-cancel-sm { flex: 1; padding: 11px; text-align: center; font-size: 14px; }
}

/* ===== 비전 카드 (나의 나침반) ===== */
.vision-card {
  border: 1.5px dashed var(--border);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}
.vision-empty {
  font-size: 13px; color: var(--muted);
  font-style: italic; line-height: 1.65; padding: 2px 0;
}
.vision-item { margin-bottom: 14px; }
.vision-item:last-child { margin-bottom: 0; }
.vision-item-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 5px;
}
.vision-item-text {
  font-size: 14px; font-weight: 500; color: var(--text);
  line-height: 1.65; white-space: pre-wrap;
}

/* ===== 로그인 화면 ===== */
#login-screen {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.login-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--shadow-md);
  max-width: 360px;
  width: 90%;
}
.login-logo { font-size: 22px; font-weight: 800; color: var(--primary); margin-bottom: 12px; }
.login-desc { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 28px; }
.btn-google {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px 20px;
  background: white; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500; font-family: inherit;
  color: var(--text); cursor: pointer;
  box-shadow: var(--shadow); transition: all .15s;
}
.btn-google:hover { box-shadow: var(--shadow-md); border-color: #c8d0e0; }
.login-error { color: var(--danger); font-size: 13px; margin-top: 12px; min-height: 18px; }

/* ===== 사용자 배지 ===== */
.user-badge { display: flex; align-items: center; gap: 8px; }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.user-avatar--initial {
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--primary);
}
.user-name {
  font-size: 13px; font-weight: 500; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px;
}
@media (max-width: 480px) { .user-name { display: none; } }

/* ===== 카테고리 관리 ===== */
.cat-manage-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--bg); border-radius: var(--radius-sm);
  border: 1.5px solid transparent; margin-bottom: 7px;
  transition: all .15s;
}
.cat-manage-item:last-child { margin-bottom: 0; }
.cat-manage-item:hover { border-color: var(--border); background: white; }
.cat-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.cat-manage-name { flex: 1; font-size: 14px; font-weight: 500; color: var(--text); }

.color-picker-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.color-swatch {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer; transition: transform .12s, border-color .12s;
}
.color-swatch.active { border-color: var(--text); transform: scale(1.18); }
.color-swatch:hover:not(.active) { transform: scale(1.1); }

/* ===== 반복 일정 ===== */
.recurring-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  margin-bottom: 7px;
  transition: all .15s;
}
.recurring-item:last-child { margin-bottom: 0; }
.recurring-item:hover { border-color: var(--border); background: white; }
.recurring-inactive { opacity: 0.45; }
.recurring-text { font-size: 14px; font-weight: 500; color: var(--text); }

.repeat-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.weekday-picker { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.weekday-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
}
.weekday-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.weekday-btn:hover:not(.active) { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

.btn-toggle-sm {
  background: none; border: none;
  color: #94a3b8; font-size: 13px;
  cursor: pointer; padding: 2px 5px;
  border-radius: 5px; transition: all .15s; flex-shrink: 0; line-height: 1;
}
.btn-toggle-sm:hover { color: var(--warning); background: #fef9c3; }

/* ===== 핵심목표 진척도 섹션 ===== */
.core-feat {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 16px; margin-bottom: 14px;
}
.core-feat-top {
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: 12px; margin-bottom: 12px;
}
.core-feat-name { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; }
.core-feat-goal-text { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.core-feat-pct {
  font-size: 34px; font-weight: 800; line-height: 1;
  white-space: nowrap; flex-shrink: 0;
}
.core-feat-track { height: 10px; background: var(--border); border-radius: 5px; overflow: hidden; }
.core-feat-fill  { height: 100%; border-radius: 5px; transition: width .7s ease; }

.core-sub-list { display: flex; flex-direction: column; gap: 9px; margin-top: 2px; }
.core-sub-row { display: flex; align-items: center; gap: 10px; }
.core-sub-tag {
  font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 10px;
  white-space: nowrap; min-width: 60px;
  text-align: center; flex-shrink: 0;
}
.core-sub-track { flex: 1; height: 7px; background: var(--border); border-radius: 4px; overflow: hidden; }
.core-sub-fill   { height: 100%; border-radius: 4px; transition: width .7s ease; }
.core-sub-pct {
  font-size: 13px; font-weight: 700;
  min-width: 38px; text-align: right; flex-shrink: 0;
}

/* 오늘 달성률 (카드 하단) */
.today-prog-wrap {
  display: flex; align-items: center; gap: 10px;
  padding-top: 12px; margin-top: 14px;
  border-top: 1px solid var(--border);
}
.today-prog-label { font-size: 12px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.today-prog-bar {
  flex: 1; height: 6px; background: var(--border);
  border-radius: 3px; overflow: hidden;
}
.today-prog-fill {
  height: 100%; background: var(--primary);
  border-radius: 3px; transition: width .6s ease;
}
.today-prog-num {
  font-size: 13px; font-weight: 700; color: var(--primary);
  min-width: 38px; text-align: right; flex-shrink: 0;
}
.today-prog-empty { font-size: 12px; color: var(--muted); font-style: italic; }

/* ===== 핵심 투자 시간 (index.html 대시보드) ===== */
.core-time-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.core-time-title {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 10px;
}
.core-time-grid {
  display: flex; gap: 0;
}
.core-time-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  padding: 8px 4px;
  background: var(--bg); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.core-time-item + .core-time-item { margin-left: 8px; }
.core-time-label { font-size: 11px; color: var(--muted); }
.core-time-val { font-size: 16px; font-weight: 700; color: var(--primary); }

/* 핵심목표 미완료 경고 배너 (daily.html) */
.core-warning-banner {
  display: flex; align-items: flex-start; gap: 8px;
  background: #fffbeb; border: 1.5px solid #fcd34d;
  border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 14px;
  font-size: 13px; font-weight: 600; color: #92400e;
  line-height: 1.45;
}
.core-warning-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }

/* ===== 할 일 타입 토글 (핵심 과업 / 루틴) ===== */
.task-type-toggle {
  display: flex; gap: 6px; margin-top: 10px;
}
.task-type-btn {
  flex: 1; padding: 7px 0; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer; transition: all .15s;
}
.task-type-btn--active {
  border-color: var(--primary); background: var(--primary);
  color: #fff;
}
.task-type-btn:not(.task-type-btn--active):hover {
  border-color: var(--primary); color: var(--primary);
}

/* ===== 할 일 그룹 헤더 ===== */
.task-group-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 700; color: var(--muted);
  padding: 10px 0 4px; text-transform: uppercase; letter-spacing: .04em;
}
.task-group-header--mt { margin-top: 6px; }
.task-group-count {
  font-size: 11px; font-weight: 600; color: var(--muted);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 20px; padding: 1px 8px;
}

/* ===== 반응형 ===== */
@media (max-width: 720px) {
  .quarterly-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .annual-body { flex-direction: column; text-align: center; }
  .core-actions { justify-content: center; }
  .day-hero { flex-direction: column; gap: 12px; align-items: flex-start; }
  .add-select { max-width: 100px; font-size: 12px; }
}
@media (max-width: 420px) {
  .app { padding: 0 12px; }
  .cal-day { font-size: 12px; border-radius: 8px; }
  .week-cat-name { min-width: 70px; }
  .add-row { flex-wrap: wrap; }
  .add-select { max-width: none; width: 100%; }
}
