/* =========================================================
   AURA — Minimal Dashboard
   Editorial / Linear-inspired. Less is more. No glass bling.
   ========================================================= */

:root {
  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Accent — the only chromatic color. Cycles through 3 tones. */
  --accent: #4bd6ff;
  --accent-soft: rgba(75, 214, 255, 0.12);
  --accent-strong: #4bd6ff;

  /* Neutrals — limited, intent-driven */
  --bg: #0a0a0a;
  --ink-0: #f5f5f4;            /* primary text */
  --ink-1: rgba(245, 245, 244, 0.62);
  --ink-2: rgba(245, 245, 244, 0.38);
  --ink-3: rgba(245, 245, 244, 0.22);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --surface: rgba(255, 255, 255, 0.025);
  --surface-strong: rgba(255, 255, 255, 0.06);

  /* Geometry — square-ish, intentional corners */
  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 6px;

  /* Motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 140ms;
  --t-med: 280ms;

  color-scheme: dark;
}

:root[data-theme="violet"] {
  --accent: #a78bfa;
  --accent-soft: rgba(167, 139, 250, 0.12);
  --accent-strong: #a78bfa;
}
:root[data-theme="rose"] {
  --accent: #ff7ad1;
  --accent-soft: rgba(255, 122, 209, 0.12);
  --accent-strong: #ff7ad1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--ink-0);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* =========================================================
   BACKGROUND CANVAS
   Particles still float, but the canvas itself is monochrome.
   ========================================================= */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  background: var(--bg);
}

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.03;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
}
.noise-overlay.disabled { display: none; }

/* =========================================================
   TOPBAR — wordmark + minimal utility buttons
   ========================================================= */
.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 36px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-0);
}
.brand-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn,
.kbtn {
  height: 32px;
  min-width: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-1);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.icon-btn:hover, .kbtn:hover {
  color: var(--ink-0);
  background: var(--surface-strong);
}
.icon-btn:focus-visible, .kbtn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.icon-btn svg { display: block; }
.kbtn[aria-pressed="true"], .kbtn.is-active {
  color: var(--accent);
}

.status-chip {
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-1);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
}

/* =========================================================
   STAGE — hero block at top of the page
   ========================================================= */
.stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px 96px;
}

.hero {
  margin-top: 8vh;
  margin-bottom: 8vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: fadeIn 700ms var(--ease) both;
}

.hero-date {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.clock {
  display: flex;
  align-items: baseline;
  font-size: clamp(72px, 16vw, 184px);
  font-weight: 200;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--ink-0);
  font-variant-numeric: tabular-nums;
}
.clock .colon {
  margin: 0 0.05em;
  color: var(--accent);
  animation: blink 1.2s steps(2, jump-none) infinite;
}
.clock-sec {
  font-size: 0.22em;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-2);
  margin-left: 12px;
  align-self: flex-start;
  margin-top: 0.05em;
  font-feature-settings: "tnum";
}

@keyframes blink { 50% { opacity: 0.25; } }

.greeting {
  color: var(--ink-1);
  font-size: 15px;
  font-weight: 400;
}

/* =========================================================
   COMMAND BAR — single line search/command
   ========================================================= */
.command-bar {
  margin-top: 8px;
  width: min(640px, 100%);
  height: 48px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-1);
  transition: border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.command-bar.focused {
  border-color: var(--accent);
  background: var(--surface-strong);
}
.command-bar input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink-0);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
}
.command-bar input::placeholder { color: var(--ink-2); }
.cmd-icon { color: var(--ink-2); flex-shrink: 0; }
.command-bar.focused .cmd-icon { color: var(--accent); }

.cmd-kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}

.cmd-panel {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  top: calc(100%);
  display: none;
  margin-top: 8px;
  width: min(640px, calc(100vw - 48px));
  padding: 6px;
  background: #111;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  max-height: 60vh;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
}
.cmd-panel.open { display: block; opacity: 1; transform: translateX(-50%) translateY(0); }
.cmd-empty {
  padding: 18px 14px;
  color: var(--ink-2);
  font-size: 13px;
  text-align: center;
}
.cmd-item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  color: var(--ink-0);
  cursor: pointer;
  font-size: 13px;
  transition: background var(--t-fast) var(--ease);
}
.cmd-item .num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  text-align: center;
}
.cmd-item.active, .cmd-item:hover {
  background: var(--surface-strong);
}
.cmd-item.active .num { color: var(--accent); }
.cmd-item.active { box-shadow: inset 2px 0 0 var(--accent); }
.cmd-item .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd-item .tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.cmd-foot {
  padding: 8px 10px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

/* =========================================================
   WIDGET GRID — 12-col bento, generous spacing
   ========================================================= */
.grid {
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: var(--ink-0);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
  animation: fadeIn 600ms var(--ease) both;
}
.card:hover { border-color: var(--line-strong); }
.card:focus-within { border-color: var(--line-strong); }

.card.dragging {
  opacity: 0.65;
  border-style: dashed;
  border-color: var(--accent);
}

.drag-handle {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  cursor: grab;
  user-select: none;
  opacity: 0.5;
  transition: opacity var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.card:hover .drag-handle { opacity: 1; color: var(--ink-1); }
.drag-handle:active { cursor: grabbing; }
.drag-handle svg { display: block; }

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-1);
}
.card-sub {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Grid placement */
.widget { grid-column: span 4; }
.widget-todo { grid-column: span 4; }
.widget-focus { grid-column: span 4; }
.widget-notes { grid-column: span 8; }
.widget-music { grid-column: span 8; }
.widget-quote { grid-column: span 4; }
.widget-habits { grid-column: span 4; }
.widget-speeddial { grid-column: span 4; }

/* =========================================================
   WEATHER
   ========================================================= */
.weather-now {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.weather-temp {
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 300;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.weather-icon {
  font-size: 36px;
  line-height: 1;
  color: var(--ink-1);
}
.weather-desc {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-1);
  font-weight: 500;
  text-transform: capitalize;
}
.weather-range {
  margin-top: 4px;
  display: flex;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
}
.weather-form {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}
.weather-form input {
  flex: 1;
  height: 34px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-0);
  font-family: inherit;
  font-size: 13px;
  outline: 0;
  transition: border-color var(--t-fast) var(--ease);
}
.weather-form input::placeholder { color: var(--ink-2); }
.weather-form input:focus { border-color: var(--accent); }
.weather-form button {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-1);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.weather-form button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* =========================================================
   POMODORO
   ========================================================= */
.pomodoro-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  flex: 1;
}
.timer-display-container {
  position: relative;
  width: 132px;
  height: 132px;
}
.timer-svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
  width: 100%; height: 100%;
}
.timer-track {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
}
.timer-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 283;
  transition: stroke-dashoffset 0.5s linear;
}
.timer-time {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-0);
}
.pomodoro-controls {
  display: flex;
  gap: 8px;
}
.pomo-btn {
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-1);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.pomo-btn:hover { color: var(--ink-0); border-color: var(--line-strong); }
.pomo-btn.is-running {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.pomo-btn.is-running:hover {
  background: transparent;
  color: var(--accent);
}
.focus-pills {
  display: flex;
  gap: 4px;
  margin-top: auto;
}
.focus-pill {
  flex: 1;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.focus-pill:hover { color: var(--ink-0); }
.focus-pill.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

/* =========================================================
   TASKS
   ========================================================= */
.todo-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.todo-form input {
  flex: 1;
  height: 34px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-0);
  font-family: inherit;
  font-size: 13px;
  outline: 0;
  transition: border-color var(--t-fast) var(--ease);
}
.todo-form input::placeholder { color: var(--ink-2); }
.todo-form input:focus { border-color: var(--accent); }
.todo-add {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-1);
  font-family: inherit;
  font-size: 18px;
  font-weight: 400;
  cursor: pointer;
  line-height: 1;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.todo-add:hover { color: var(--accent); border-color: var(--accent); }

.todo-list { list-style: none; flex: 1; overflow-y: auto; }
.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.todo-item:last-child { border-bottom: 0; }
.todo-check {
  width: 14px; height: 14px;
  border: 1px solid var(--ink-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.todo-check.checked {
  background: var(--accent);
  border-color: var(--accent);
}
.todo-check.checked::after {
  content: "";
  width: 6px; height: 3px;
  border-left: 1.5px solid var(--bg);
  border-bottom: 1.5px solid var(--bg);
  transform: rotate(-45deg) translate(1px, -1px);
}
.todo-text {
  flex: 1;
  font-size: 13px;
  color: var(--ink-0);
}
.todo-item.done .todo-text {
  color: var(--ink-2);
  text-decoration: line-through;
}
.todo-del {
  background: transparent;
  border: 0;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 6px;
  transition: color var(--t-fast) var(--ease);
}
.todo-del:hover { color: var(--ink-1); }

/* =========================================================
   SPEED DIAL
   ========================================================= */
.speeddial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  flex: 1;
}
.speeddial-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--ink-1);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.speeddial-item:hover {
  color: var(--ink-0);
  border-color: var(--line-strong);
  background: var(--surface-strong);
}
.speeddial-icon {
  width: 28px; height: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-0);
  text-transform: uppercase;
}
.speeddial-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.speeddial-del {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-2);
  width: 16px; height: 16px;
  font-size: 9px;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.speeddial-item:hover .speeddial-del { opacity: 1; }
.speeddial-del:hover { color: var(--accent); border-color: var(--accent); }

.shortcut-form {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}
.shortcut-form input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-0);
  font-family: inherit;
  font-size: 12px;
  outline: 0;
  transition: border-color var(--t-fast) var(--ease);
}
.shortcut-form input::placeholder { color: var(--ink-2); }
.shortcut-form input:focus { border-color: var(--accent); }
.shortcut-form input[type="text"] { flex: 0 0 80px; }
.shortcut-form button {
  height: 32px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-1);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.shortcut-form button:hover { color: var(--accent); border-color: var(--accent); }

/* =========================================================
   SPOTIFY MUSIC
   ========================================================= */
.music-body {
  display: flex;
  gap: 20px;
  flex: 1;
}
.music-art {
  position: relative;
  width: 88px; height: 88px;
  flex-shrink: 0;
}
.music-art-disk {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.music-art-disk img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.music-art.spin .music-art-disk::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  transform: translate(-50%, -50%);
}
.music-art.spin .music-art-disk img { animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.music-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.music-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-artist {
  font-size: 12px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.music-progress-wrapper {
  position: relative;
  margin-top: 8px;
  height: 2px;
  background: var(--line);
  border-radius: 999px;
}
.music-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--accent);
  border-radius: 999px;
  width: 0%;
  transition: width var(--t-fast) linear;
}
.music-progress-slider {
  position: absolute;
  inset: -8px 0;
  width: 100%;
  height: 18px;
  opacity: 0;
  cursor: pointer;
}
.music-times {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-2);
}

.music-control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
}
.music-controls {
  display: flex;
  gap: 4px;
}
.music-btn {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-0);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.music-btn:hover { border-color: var(--line-strong); }
.music-btn-play {
  width: 36px; height: 36px;
  border-color: var(--accent);
  color: var(--accent);
}
.music-btn-play:hover {
  background: var(--accent);
  color: var(--bg);
}
.visualizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.visualizer span {
  width: 2px; height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: height var(--t-fast) var(--ease);
}
.visualizer.active span { animation: bounce 0.7s ease-in-out infinite alternate; }
.visualizer.active span:nth-child(1) { animation-delay: 0s; }
.visualizer.active span:nth-child(2) { animation-delay: 0.12s; }
.visualizer.active span:nth-child(3) { animation-delay: 0.24s; }
.visualizer.active span:nth-child(4) { animation-delay: 0.36s; }
@keyframes bounce { from { height: 2px; } to { height: 14px; } }

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
}
.volume-icon { color: var(--ink-2); }
.volume-control input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 64px;
  height: 2px;
  background: var(--line);
  border-radius: 999px;
  outline: 0;
  cursor: pointer;
}
.volume-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ink-0);
  cursor: pointer;
}
.volume-control input[type="range"]::-moz-range-thumb {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ink-0);
  border: 0;
  cursor: pointer;
}

.spotify-auth-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  flex: 1;
}
.spotify-auth-text { color: var(--ink-1); font-size: 13px; }
.spotify-auth-note { color: var(--ink-3); font-size: 11px; }
.spotify-auth-btn {
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--accent);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.spotify-auth-btn:hover { background: var(--accent); color: var(--bg); }

.spotify-search-row {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.spotify-search-row input {
  flex: 1;
  height: 32px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-0);
  font-family: inherit;
  font-size: 12px;
  outline: 0;
}
.spotify-search-row input::placeholder { color: var(--ink-2); }
.spotify-search-row input:focus { border-color: var(--accent); }
.spotify-search-row button {
  height: 32px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-1);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.spotify-search-row button:hover { color: var(--accent); border-color: var(--accent); }
.spotify-search-results { margin-top: 8px; display: none; }
.spotify-search-results.open { display: block; }
.spotify-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  cursor: pointer;
  margin-bottom: 6px;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.spotify-search-item:hover { border-color: var(--accent); background: var(--surface-strong); }
.spotify-search-item img { width: 32px; height: 32px; border-radius: var(--r-sm); object-fit: cover; }
.spotify-search-item-info { flex: 1; min-width: 0; }
.spotify-search-item-title { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-0); }
.spotify-search-item-artist { font-size: 11px; color: var(--ink-2); margin-top: 2px; }

/* =========================================================
   NOTES (Quick Notes)
   ========================================================= */
.notes-area {
  flex: 1;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink-0);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: none;
}
.notes-area::placeholder { color: var(--ink-2); }

/* =========================================================
   QUOTE / DAILY SIGNAL
   ========================================================= */
.quote-text {
  margin: 8px 0 16px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-0);
  font-weight: 400;
  letter-spacing: -0.005em;
}
.quote-stats {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.quote-stat { display: flex; flex-direction: column; gap: 2px; }
.quote-stat-num {
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-0);
}
.quote-stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* =========================================================
   HABIT TRACKER (new)
   ========================================================= */
.habit-week {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.habit-week-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.habit-week-num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.habit-streak {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-2);
}
#habit-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.habit-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
.habit-row-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--ink-0);
  font-weight: 500;
}
.habit-row-del {
  background: transparent;
  border: 0;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 6px;
}
.habit-row-del:hover { color: var(--ink-1); }
.habit-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.habit-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-2);
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease);
}
.habit-cell:hover { color: var(--ink-1); border-color: var(--line-strong); }
.habit-cell .dot {
  width: 14px; height: 14px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.habit-cell.is-on {
  color: var(--accent);
  border-color: var(--accent);
}
.habit-cell.is-on .dot { background: var(--accent); border-color: var(--accent); }
.habit-cell.is-today {
  border-color: var(--accent);
}
.habit-cell.is-future {
  opacity: 0.4;
  cursor: not-allowed;
}
.habit-add {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}
.habit-add input {
  flex: 1;
  height: 28px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-0);
  font-family: inherit;
  font-size: 11px;
  outline: 0;
}
.habit-add input::placeholder { color: var(--ink-2); }
.habit-add input:focus { border-color: var(--accent); }
.habit-add button {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-1);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.habit-add button:hover { color: var(--accent); border-color: var(--accent); }
.habit-empty {
  color: var(--ink-2);
  font-size: 12px;
  text-align: center;
  padding: 18px 0;
}

/* =========================================================
   MODALS (settings + shortcuts)
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease);
}
.modal.open { opacity: 1; pointer-events: all; }
.modal-card {
  width: min(440px, calc(100vw - 48px));
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 24px;
  transform: translateY(8px);
  transition: transform var(--t-med) var(--ease);
}
.modal.open .modal-card { transform: translateY(0); }

.modal-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-1);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-close {
  background: transparent;
  border: 0;
  color: var(--ink-2);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.modal-close:hover { color: var(--ink-0); background: var(--surface-strong); }

.modal-section { margin-bottom: 16px; }
.modal-section label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.modal-section input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  background: var(--line);
  border-radius: 999px;
  outline: 0;
}
.modal-section input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}
.modal-section input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 0;
  cursor: pointer;
}
.modal-section select {
  width: 100%;
  height: 36px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-0);
  font-family: inherit;
  font-size: 13px;
  outline: 0;
  padding: 0 10px;
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-1);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.modal-btn:hover { color: var(--ink-0); border-color: var(--line-strong); }
.modal-btn.is-on {
  color: var(--accent);
  border-color: var(--accent);
}
.modal-btn-danger:hover { color: var(--accent); border-color: var(--accent); }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* Shortcuts modal — flat list of key|action rows */
.shortcut-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.shortcut-row:last-child { border-bottom: 0; }
.shortcut-row .label { color: var(--ink-0); }
.shortcut-row .keys { display: flex; gap: 6px; }
.kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-1);
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}

/* Import file picker — hidden */
.imp-file {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

/* =========================================================
   MODAL — dividers and accent swatches
   ========================================================= */
.modal-section-divider {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.theme-row { display: flex; flex-direction: column; gap: 10px; }
.swatch-row { display: flex; gap: 8px; }
.swatch {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: currentColor;
  cursor: pointer;
  padding: 0;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.swatch:hover { transform: scale(1.08); border-color: var(--line-strong); }
.swatch.is-on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.swatch[data-accent="cyan"]    { background: #4bd6ff; }
.swatch[data-accent="violet"]  { background: #a78bfa; }
.swatch[data-accent="rose"]    { background: #ff7ad1; }
.swatch[data-accent="amber"]   { background: #f5b14b; }
.swatch[data-accent="emerald"] { background: #6ee7b7; }
.swatch[data-accent="slate"]   { background: #94a3b8; }
.hex-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.micro-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0;
}
#accent-hex {
  width: 100px;
  height: 28px;
  padding: 0 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-0);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: 0;
  transition: border-color var(--t-fast) var(--ease);
}
#accent-hex:focus { border-color: var(--accent); }

/* =========================================================
   WIDGET GALLERY MODAL
   ========================================================= */
.modal-card--wide {
  width: min(720px, calc(100vw - 48px));
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.gallery-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.gallery-card:hover { border-color: var(--line-strong); }
.gallery-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.gallery-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-0);
}
.gallery-card-desc {
  font-size: 12px;
  color: var(--ink-1);
  line-height: 1.45;
}
.gallery-card-action {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gallery-card-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.toggle-switch {
  position: relative;
  width: 32px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  padding: 0;
}
.toggle-switch::after {
  content: "";
  position: absolute;
  left: 2px; top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ink-1);
  transform: translateY(-50%);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.toggle-switch.is-on { border-color: var(--accent); background: var(--accent-soft); }
.toggle-switch.is-on::after {
  background: var(--accent);
  transform: translate(14px, -50%);
}

/* =========================================================
   READING LIST WIDGET
   ========================================================= */
.reading-list { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.reading-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.reading-item:last-child { border-bottom: 0; }
.reading-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.reading-item-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-0);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease);
}
.reading-item-title:hover { color: var(--accent); }
.reading-item-note {
  font-size: 11px;
  color: var(--ink-2);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.reading-item-del {
  background: transparent;
  border: 0;
  color: var(--ink-3);
  cursor: pointer;
  font-size: 11px;
  padding: 2px 6px;
  flex-shrink: 0;
}
.reading-item-del:hover { color: var(--ink-1); }
.reading-form {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.reading-form input {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-0);
  font-family: inherit;
  font-size: 11px;
  outline: 0;
}
.reading-form input::placeholder { color: var(--ink-2); }
.reading-form input:focus { border-color: var(--accent); }
.reading-form button {
  height: 28px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-1);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.reading-form button:hover { color: var(--accent); border-color: var(--accent); }
.reading-empty { color: var(--ink-2); font-size: 12px; text-align: center; padding: 14px 0; }

/* =========================================================
   LIGHT MODE
   ========================================================= */
:root[data-mode="light"] {
  --bg: #f5f5f4;
  --ink-0: #0a0a0a;
  --ink-1: rgba(10, 10, 10, 0.62);
  --ink-2: rgba(10, 10, 10, 0.38);
  --ink-3: rgba(10, 10, 10, 0.22);
  --line: rgba(10, 10, 10, 0.1);
  --line-strong: rgba(10, 10, 10, 0.2);
  --surface: rgba(10, 10, 10, 0.025);
  --surface-strong: rgba(10, 10, 10, 0.06);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, transparent);
  color-scheme: light;
}
:root[data-mode="light"] .cmd-panel { background: #fff; }
:root[data-mode="light"] .modal-card { background: #fff; }
:root[data-mode="light"] body { background: var(--bg); }
:root[data-mode="light"] .todo-check.checked::after {
  border-left-color: #fff;
  border-bottom-color: #fff;
}
:root[data-mode="light"] .stat-dot { background: var(--accent); }
:root[data-mode="light"] #bg-canvas { display: none; }

/* =========================================================
   DIM MODE (widget opacity reducer)
   ========================================================= */
:root[data-dim="true"] .card { opacity: 0.72; }
:root[data-dim="true"] .card:hover { opacity: 1; }

/* =========================================================
   DRAG HINT (bottom-center)
   ========================================================= */
.drag-hint {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease);
  z-index: 5;
}
.drag-hint.show { opacity: 1; }

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}

/* =========================================================
   FOCUS RING — keyboard users only
   ========================================================= */
:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}
button:focus-visible { outline-offset: 1px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  .topbar { padding: 20px 24px; }
  .widget,
  .widget-todo,
  .widget-focus,
  .widget-notes,
  .widget-music,
  .widget-quote,
  .widget-habits,
  .widget-speeddial {
    grid-column: span 12;
  }
  .hero { margin-top: 4vh; margin-bottom: 5vh; }
}

@media (max-width: 600px) {
  .topbar { padding: 16px 16px; }
  .stage { padding: 0 16px 72px; }
  .clock { font-size: clamp(56px, 18vw, 132px); }
  .status-chip { display: none; }
  .grid { gap: 12px; }
  .card { padding: 18px; min-height: 200px; }
}
