:root {
  --color-primary: #00E5FF;
  --color-secondary: #7DD3FC;
  --color-tertiary: #00E5FF;
  --accent-glow: rgba(0, 229, 255, 0.28);
  
  --bg: #07090e;
  --surface: rgba(15, 23, 42, 0.72);
  --surface-border: rgba(255, 255, 255, 0.08);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --surface-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --danger: #f43f5e;
  --success: #10b981;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 9999px;
  
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Roboto Mono", Consolas, monospace;
  --transition-fast: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 280ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Background Themes */
body.theme-solid-dark {
  --bg: #080b12;
  --surface: rgba(14, 20, 34, 0.82);
  --surface-border: rgba(255, 255, 255, 0.07);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

/* Pitch Black (#000000 OLED) */
body.theme-pitch-black {
  --bg: #000000;
  --surface: #000000;
  --surface-border: #161616;
  --surface-hover: #080808;
  --surface-shadow: 0 14px 36px rgba(0, 0, 0, 0.98), inset 0 1px 0 #1c1c1c;
  --text-main: #f3f4f6;
  --text-muted: #737373;
}

body.theme-solid-light {
  --bg: #f1f5f9;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-border: rgba(0, 0, 0, 0.07);
  --surface-hover: rgba(0, 0, 0, 0.03);
  --surface-shadow: 0 14px 32px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --accent-glow: rgba(0, 0, 0, 0.08);
}

body.theme-monochrome {
  --bg: #000000;
  --surface: #0e0e0e;
  --surface-border: #242424;
  --surface-hover: #181818;
  --surface-shadow: 0 14px 36px rgba(0, 0, 0, 0.8), inset 0 1px 0 #2a2a2a;
  --text-main: #ffffff;
  --text-muted: #888888;
  --color-primary: #ffffff !important;
  --color-secondary: #9ca3af !important;
  --color-tertiary: #ffffff !important;
  --accent-glow: rgba(255, 255, 255, 0.22) !important;
}

body.theme-gradient {
  --bg: radial-gradient(circle at 10% 20%, #1e1b4b 0%, #0c1222 55%, #020617 100%);
  --surface: rgba(15, 23, 42, 0.65);
  --surface-border: rgba(255, 255, 255, 0.09);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

/* Dynamic Ambient Glow Mode: Shifts with active clock color */
body.theme-ambient {
  --bg: radial-gradient(circle at 50% 38%, var(--accent-glow) 0%, rgba(6, 9, 18, 0.95) 55%, #04060c 100%);
  --surface: rgba(11, 17, 32, 0.72);
  --surface-border: rgba(255, 255, 255, 0.09);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text-main);
  font-family: var(--font-display);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

input, textarea {
  user-select: text;
  -webkit-user-select: text;
}

body.locked .app-wrap {
  visibility: hidden;
  pointer-events: none;
}

/* Passcode Gate Overlay */
.passcode-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 8, 17, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.passcode-gate.hidden {
  display: none;
}

.passcode-card {
  width: min(340px, 92vw);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--surface-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.passcode-icon {
  font-size: 1.8rem;
}

.passcode-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
}

.passcode-msg {
  font-size: 0.82rem;
  color: var(--text-muted);
  min-height: 1.2em;
}

.passcode-msg.error {
  color: var(--danger);
}

.passcode-dots {
  display: flex;
  gap: 14px;
  margin: 4px 0;
}

.passcode-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--surface-border);
  transition: all var(--transition-fast);
}

.passcode-dot.filled {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}

.lockout-countdown {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--danger);
  font-variant-numeric: tabular-nums;
}

.passcode-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}

.keypad-btn {
  appearance: none;
  border: 1px solid var(--surface-border);
  background: var(--surface-hover);
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  padding: 14px 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  touch-action: manipulation;
}

.keypad-btn:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.keypad-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.keypad-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.keypad-action {
  font-size: 0.85rem;
  color: var(--text-muted);
}

#ambientCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  display: none;
}
body.theme-ambient #ambientCanvas {
  display: block;
}

.app-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  padding: clamp(14px, 3.5vw, 32px);
  gap: clamp(16px, 3vw, 26px);
}

/* Floating Header / Control Dock */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 4px;
}

.header-left-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-ist {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: var(--surface-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary);
  animation: pulse 2.2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Secondary Timezone Pill */
.secondary-tz-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sec-tz-toggle-btn {
  font-size: 0.74rem;
  padding: 6px 12px;
  color: var(--text-muted);
}

.badge-secondary-tz {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 600;
  box-shadow: var(--surface-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.sec-tz-select {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  letter-spacing: 0.03em;
}

.sec-tz-time {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-secondary);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.01em;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  appearance: none;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text-main);
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--surface-shadow);
  transition: all var(--transition-fast);
  touch-action: manipulation;
}

.pill-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.pill-btn.active {
  background: var(--color-primary);
  color: #050811;
  border-color: var(--color-primary);
  font-weight: 600;
  box-shadow: 0 0 16px var(--accent-glow);
}

/* Active Palette Mini-Badge */
.palette-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.palette-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.palette-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

/* Slide-Out Side Settings Drawer (Non-blocking Backdrop) */
.settings-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 85vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--surface-border);
  box-shadow: -14px 0 44px rgba(0, 0, 0, 0.55), inset 1px 0 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 60;
  transform: translateX(105%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.settings-drawer.open {
  transform: translateX(0);
}

.settings-drawer-inner {
  padding: clamp(16px, 3vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--surface-border);
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
}
.drawer-title svg {
  stroke: var(--color-primary);
}

.drawer-close-btn {
  background: var(--surface-hover);
  border: 1px solid var(--surface-border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.drawer-close-btn:hover {
  color: var(--text-main);
  border-color: var(--color-primary);
}

.settings-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--text-muted);
}

.settings-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.settings-palette-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--surface-border);
  flex: 1;
  min-height: 0;
}

.shelf-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
}

.swatches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 7px;
  max-height: calc(100vh - 320px);
  overflow-y: auto;
  padding-right: 4px;
}

.swatches-grid::-webkit-scrollbar {
  width: 4px;
}
.swatches-grid::-webkit-scrollbar-thumb {
  background: var(--surface-border);
  border-radius: 4px;
}

.palette-chip {
  appearance: none;
  border: 1px solid var(--surface-border);
  background: var(--surface-hover);
  border-radius: var(--radius-pill);
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: all var(--transition-fast);
  touch-action: manipulation;
}

.palette-chip:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
}

.palette-chip.active {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 10px var(--accent-glow);
}

.chip-preview {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.chip-name {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.color-picker-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  background: var(--surface-hover);
  border: 1px solid var(--surface-border);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  transition: border-color var(--transition-fast);
}

.color-picker-label:hover {
  border-color: var(--color-primary);
}

input[type="color"] {
  appearance: none;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border-radius: 50%; border: 1px solid var(--surface-border); }

.theme-select {
  background: var(--surface-hover);
  color: var(--text-main);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast);
  width: 100%;
}
.theme-select:hover {
  border-color: var(--color-primary);
}

/* Hero Clock Section */
.clock-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 7vw, 64px) 20px clamp(24px, 5vw, 48px);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--surface-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  text-align: center;
  transition: all var(--transition-smooth);
}

.time-digits-wrap {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  user-select: all;
}

.time-main {
  font-size: clamp(3.8rem, 14vw, 9.2rem);
  color: var(--color-primary);
  text-shadow: 0 0 34px var(--accent-glow);
  transition: color var(--transition-smooth), text-shadow var(--transition-smooth);
  display: inline-block;
  min-width: 4.8ch;
  text-align: right;
}

.time-sec {
  font-size: clamp(1.8rem, 6vw, 4rem);
  color: var(--color-secondary);
  font-weight: 600;
  margin-left: clamp(2px, 0.8vw, 6px);
  opacity: 0.95;
  text-shadow: 0 0 22px var(--accent-glow);
  display: inline-block;
  min-width: 2.2ch;
  text-align: left;
  transition: color var(--transition-smooth);
}

.time-ampm {
  font-size: clamp(0.95rem, 2.5vw, 1.6rem);
  margin-left: clamp(6px, 1.6vw, 14px);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-secondary);
  letter-spacing: 0.05em;
  text-shadow: none;
  align-self: center;
  transition: all var(--transition-smooth);
}

.clock-date {
  margin-top: 14px;
  font-size: clamp(0.95rem, 2.4vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* Dashboard Layout: Cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(16px, 3vw, 24px);
  align-items: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: clamp(18px, 2.8vw, 24px);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--surface-shadow);
  transition: all var(--transition-smooth);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-title {
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-main);
}

.card-title svg {
  stroke: var(--color-primary);
}

/* Pomodoro / Focus Timer */
.timer-display {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.5vw, 3.6rem);
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.03em;
  margin: 10px 0 16px;
  color: var(--color-primary);
  text-shadow: 0 0 20px var(--accent-glow);
  font-variant-numeric: tabular-nums;
  transition: color var(--transition-smooth);
}

.timer-presets {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.custom-timer-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.custom-timer-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.custom-timer-input {
  width: 68px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  color: var(--text-main);
  font-size: 0.85rem;
  text-align: center;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

body.theme-solid-light .custom-timer-input {
  background: rgba(255, 255, 255, 0.92);
}

.custom-timer-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.custom-timer-btn {
  padding: 5px 12px;
  font-size: 0.76rem;
}

.timer-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* To-Do List Styles with Filters */
.todo-filter-group {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-pill);
  padding: 2px;
}

.filter-chip {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-chip.active {
  background: var(--surface);
  color: var(--color-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.todo-form {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.todo-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

body.theme-solid-light .todo-input {
  background: rgba(255, 255, 255, 0.92);
}

.todo-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.todo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}

.todo-list::-webkit-scrollbar {
  width: 4px;
}
.todo-list::-webkit-scrollbar-thumb {
  background: var(--surface-border);
  border-radius: 4px;
}

.todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-hover);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.todo-item:hover {
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateX(2px);
}

.todo-left {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-width: 0;
  min-width: 0;
  flex: 1;
}

/* Custom Sleek Checkbox */
.todo-checkbox {
  appearance: none;
  width: 19px;
  height: 19px;
  border: 1.5px solid var(--surface-border);
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.todo-checkbox::before {
  content: "";
  width: 9px;
  height: 9px;
  transform: scale(0);
  background-color: #050811;
  clip-path: polygon(14% 44%, 0 60%, 40% 100%, 100% 16%, 80% 0%, 35% 66%);
  transition: transform var(--transition-fast);
}

.todo-checkbox:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}

.todo-checkbox:checked::before {
  transform: scale(1);
}

.todo-text {
  font-size: 0.9rem;
  word-break: break-word;
  transition: color var(--transition-fast), text-decoration var(--transition-fast);
}

.todo-item.completed .todo-text {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.65;
}

.todo-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1.1rem;
  line-height: 1;
  border-radius: 4px;
  transition: color var(--transition-fast);
}

.todo-delete-btn:hover {
  color: var(--danger);
}

.todo-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}

.todo-actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.78rem;
  transition: color var(--transition-fast);
}
.btn-link:hover {
  color: var(--color-primary);
}

/* Collapsible Panel Controls */
.panel-toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}
.panel-toggle-btn:hover {
  color: var(--text-main);
  background: var(--surface-hover);
}

/* Pure Clock-Only Zen Mode */
body.zen-mode header,
body.zen-mode #clockDate,
body.zen-mode .dashboard-grid,
body.zen-mode footer,
body.zen-mode #settingsDrawer {
  display: none !important;
}

body.zen-mode .app-wrap {
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 0;
  gap: 0;
}

body.zen-mode .clock-hero {
  min-height: 100vh;
  height: 100vh;
  width: 100vw;
  box-shadow: none;
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

body.zen-mode .time-main {
  font-size: clamp(4.5rem, 18vw, 13rem);
}

body.zen-mode .time-sec {
  font-size: clamp(2.2rem, 8vw, 5.5rem);
}

body.zen-mode .time-ampm {
  font-size: clamp(1.1rem, 3.2vw, 2.2rem);
}

/* Footer & Shortcuts */
footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--surface-border);
}

.shortcuts-hint {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

kbd {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-main);
}

/* Toast Notification for Fallbacks */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface);
  border: 1px solid var(--color-primary);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.3s;
  z-index: 100;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
  .app-wrap {
    padding: 12px;
    gap: 14px;
  }
  .toolbar {
    width: 100%;
    justify-content: space-between;
  }
  .header-left-group {
    width: 100%;
    justify-content: space-between;
  }
  .settings-drawer {
    width: 85vw;
    max-width: 340px;
  }
  .swatches-grid {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 300px);
  }
  .time-main {
    min-width: unset;
  }
}
