:root {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Theme tokens ---- */
.theme-light {
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --accent: #007AFF;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
  background-color: #fafafa;
  color: var(--text);
}

.theme-dark {
  --bg: #1C1C1E;
  --bg-elevated: #2c2c2e;
  --text: #F5F5F7;
  --text-muted: #98989d;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #0A84FF;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  background-color: #000000;
  color: var(--text);
}

/* ---- Card surface ---- */
.card {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-light .card {
  background-color: #ffffff;
}

.theme-dark .card {
  background-color: #1c1c1e;
}

/* ---- Todo item completion animation ---- */
.todo-item {
  animation: fadeInUp 0.25s ease-out;
}

.todo-item.is-completed .todo-text {
  opacity: 0.4;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  transition: opacity 0.4s ease, text-decoration-color 0.4s ease;
}

.todo-item.is-completed {
  opacity: 0.85;
}

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

/* ---- Color picker tweaks ---- */
.color-picker {
  padding: 2px;
  background: transparent;
}
.color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker::-webkit-color-swatch { border: none; border-radius: 6px; }
.color-picker::-moz-color-swatch { border: none; border-radius: 6px; }

/* ---- Custom scrollbar for horizontal filter rows ---- */
.overflow-x-auto::-webkit-scrollbar { height: 0; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Date input dark mode fix ---- */
.theme-dark input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.6;
}
