/* ========================================
   pomo — Minimal, dark, startup aesthetic
   Inspired by: Linear, Vercel, Raycast, Arc
   ======================================== */

:root {
  /* Surface */
  --bg:          #0a0a0a;
  --surface:     #141414;
  --surface-2:   #1a1a1a;
  --surface-3:   #222222;
  --border:      rgba(255,255,255,0.06);
  --border-hi:   rgba(255,255,255,0.1);

  /* Text */
  --text:        #ececec;
  --text-2:      rgba(255,255,255,0.5);
  --text-3:      rgba(255,255,255,0.25);

  /* Accent — default: white */
  --accent:      #ffffff;
  --accent-dim:  rgba(255,255,255,0.12);
  --accent-glow: rgba(255,255,255,0.06);

  /* Fonts */
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono:  'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Themes */
[data-theme="violet"] {
  --accent: #a78bfa;
  --accent-dim: rgba(167,139,250,0.12);
  --accent-glow: rgba(167,139,250,0.06);
}
[data-theme="blue"] {
  --accent: #60a5fa;
  --accent-dim: rgba(96,165,250,0.12);
  --accent-glow: rgba(96,165,250,0.06);
}
[data-theme="green"] {
  --accent: #4ade80;
  --accent-dim: rgba(74,222,128,0.12);
  --accent-glow: rgba(74,222,128,0.06);
}
[data-theme="orange"] {
  --accent: #fb923c;
  --accent-dim: rgba(251,146,60,0.12);
  --accent-glow: rgba(251,146,60,0.06);
}

/* Light mode */
[data-appearance="light"] {
  --bg:          #f5f5f5;
  --surface:     #ffffff;
  --surface-2:   #ebebeb;
  --surface-3:   #e0e0e0;
  --border:      rgba(0,0,0,0.08);
  --border-hi:   rgba(0,0,0,0.15);
  --text:        #1a1a1a;
  --text-2:      rgba(0,0,0,0.55);
  --text-3:      rgba(0,0,0,0.3);
}

[data-appearance="light"][data-theme="white"] {
  --accent:      #1a1a1a;
  --accent-dim:  rgba(0,0,0,0.08);
  --accent-glow: rgba(0,0,0,0.04);
}

/* Mode overrides */
[data-mode="shortBreak"] { --mode-accent: #60a5fa; }
[data-mode="longBreak"]  { --mode-accent: #a78bfa; }
[data-mode="pomodoro"]   { --mode-accent: var(--accent); }

/* ===== RESET ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
}

/* Subtle noise texture */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

[data-appearance="light"] body::before,
body[data-appearance="light"]::before { opacity: 0; }

#app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  padding: 56px 24px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 10px 24px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-appearance="light"] .nav.scrolled {
  background: rgba(245, 245, 245, 0.7);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.nav-inner {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-dim);
}

.brand-name {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-2);
}

.nav-action {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease);
}

.nav-action:hover {
  border-color: var(--border-hi);
  color: var(--text-2);
  background: var(--surface);
}

.nav-action.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.nav-actions {
  display: flex;
  gap: 6px;
}

/* ===== MODES ===== */
.modes {
  display: flex;
  gap: 2px;
  background: var(--surface);
  padding: 3px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}

.mode {
  padding: 8px 20px;
  border: none;
  background: transparent;
  color: var(--text-3);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.mode:hover {
  color: var(--text-2);
}

.mode.active {
  background: var(--surface-3);
  color: var(--text);
}

/* ===== TIMER ===== */
.timer-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
}

/* ===== TOP PROGRESS BAR ===== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--surface-2);
  z-index: 50;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--mode-accent, var(--accent));
  transition: width 1s linear;
}

.timer-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.timer-time {
  font-family: var(--mono);
  font-size: 4.8rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  user-select: none;
}

.timer-colon {
  color: var(--text-3);
  margin: 0 -2px;
}

.timer-colon.blink {
  animation: blink 1s step-end infinite;
}

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



/* Tagline */
.tagline {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-3);
  text-align: center;
  min-height: 24px;
  transition: all 0.3s var(--ease);
}

.tagline.pop {
  animation: popFade 0.5s var(--ease);
  color: var(--accent);
}

@keyframes popFade {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== ACTIONS ===== */
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  padding: 12px 48px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  opacity: 0.8;
}

.btn-primary.running {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-hi);
}

[data-appearance="light"] .btn-primary:not(.running) {
  background: var(--text);
  color: var(--bg);
}

.btn-primary.running:hover {
  background: var(--surface);
  color: var(--text);
  opacity: 1;
}

.btn-ghost {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-3);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}

.btn-ghost:hover {
  border-color: var(--border-hi);
  color: var(--text-2);
  background: var(--surface);
}

/* ===== TASKS ===== */
.tasks-section {
  width: 100%;
}

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

.tasks-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tasks-clear {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.tasks-clear:hover {
  border-color: rgba(239,68,68,0.3);
  color: #ef4444;
  background: rgba(239,68,68,0.08);
}

.tasks-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: -0.01em;
}

.tasks-count {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-3);
}

/* Task list */
.task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s, opacity 0.2s, transform 0.2s;
  border-radius: 4px;
}

.task-item.dragging {
  opacity: 0.4;
}

.task-item.drag-over {
  border-top: 2px solid var(--accent);
}

.task-item:hover {
  background: var(--surface);
}

.task-item.active {
  background: var(--accent-dim);
  border-color: transparent;
}

.task-item.active + .task-item {
  border-top-color: transparent;
}

.task-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-hi);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 0;
  color: transparent;
}

.task-check:hover {
  border-color: var(--accent);
}

.task-check svg {
  width: 12px;
  height: 12px;
}

.task-item.done .task-check {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.task-body {
  flex: 1;
  min-width: 0;
}

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

.task-item.done .task-name {
  text-decoration: line-through;
  color: var(--text-3);
}

.task-pomos {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-3);
  margin-top: 2px;
}

.task-delete {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.15s;
}

.task-item:hover .task-delete {
  opacity: 1;
}

.task-delete:hover {
  background: rgba(239,68,68,0.1);
  color: #ef4444;
}

/* Task action buttons (edit/arrows) */
.task-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}

.task-item:hover .task-actions {
  opacity: 1;
}

.task-action-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 0;
}

.task-action-btn:hover {
  background: var(--surface-2);
  color: var(--text-2);
}

/* Task inline edit form */
.task-edit-form {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 6px;
  align-items: center;
}

.task-edit-input {
  flex: 1;
  min-width: 0;
  padding: 4px 8px;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  outline: none;
}

.task-edit-est {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.task-edit-est-btn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-3);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-edit-est-btn:hover {
  border-color: var(--border-hi);
  color: var(--text-2);
}

.task-edit-est-val {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  min-width: 16px;
  text-align: center;
}

.task-edit-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.task-edit-save, .task-edit-cancel {
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--sans);
  border-radius: 6px;
  cursor: pointer;
  border: none;
}

.task-edit-save {
  background: var(--accent);
  color: var(--bg);
}

.task-edit-cancel {
  background: transparent;
  color: var(--text-3);
  border: 1px solid var(--border);
}

/* Add task button */
.task-add-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px dashed var(--border-hi);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text-3);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 8px;
}

.task-add-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Task form */
.task-form {
  margin-top: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-md);
}

.task-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.task-input::placeholder {
  color: var(--text-3);
}

.task-input:focus {
  border-color: var(--accent);
}

.task-form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 12px;
}

.task-est {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-est-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-3);
}

.task-est-ctrl {
  display: flex;
  align-items: center;
  gap: 4px;
}

.task-est-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-3);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.task-est-btn:hover {
  border-color: var(--border-hi);
  color: var(--text-2);
  background: var(--surface-2);
}

.task-est-val {
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  min-width: 24px;
  text-align: center;
}

.task-form-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* ===== DAILY GOAL ===== */
.daily-goal {
  width: 100%;
}

.daily-goal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.daily-goal-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.daily-goal-count {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-3);
}

.daily-goal-bar {
  width: 100%;
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
}

.daily-goal-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.5s var(--ease);
}

.daily-goal-fill.complete {
  background: #4ade80;
}

/* ===== STATS ===== */
.stats {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  width: 100%;
  justify-content: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-val {
  font-family: var(--mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.stat-val--accent {
  color: var(--accent);
}

.stat-key {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-sep {
  width: 1px;
  height: 28px;
  background: var(--border);
}

/* ===== FOOTER ===== */
.footer {
  display: flex;
  gap: 16px;
}

.shortcut {
  font-size: 0.7rem;
  color: var(--text-3);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 2px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-3);
}

/* ===== OVERLAY / MODAL ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

.overlay.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 380px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.25s var(--ease);
}

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

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 0;
}

.panel-head h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.panel-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel-foot {
  padding: 0 24px 20px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}

.field-row label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
}

.field-row input[type="number"] {
  width: 64px;
  padding: 7px 10px;
  background: var(--bg);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-sm);
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: center;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.field-row input:focus {
  border-color: var(--accent);
}

/* Range slider */
.range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

.range-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

/* Toggle switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--surface-3);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--text-3);
  border-radius: 50%;
  transition: all 0.2s var(--ease);
}

.toggle input:checked + .toggle-track {
  background: var(--accent-dim);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(18px);
  background: var(--accent);
}

/* Tags */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 6px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s;
}

.tag:hover {
  border-color: var(--border-hi);
  color: var(--text-2);
}

.tag.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Color dots */
.dot-row {
  display: flex;
  gap: 10px;
}

.cdot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.cdot[data-theme="white"]  { background: #ffffff; border: 1px solid rgba(0,0,0,0.12); }
[data-appearance="light"] .cdot[data-theme="white"] { background: #1a1a1a; border-color: transparent; }
.cdot[data-theme="violet"] { background: #a78bfa; }
.cdot[data-theme="blue"]   { background: #60a5fa; }
.cdot[data-theme="green"]  { background: #4ade80; }
.cdot[data-theme="orange"] { background: #fb923c; }

.cdot:hover { transform: scale(1.1); }
.cdot:active { transform: scale(0.95); }

.cdot.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg), 0 0 12px var(--accent-glow);
}

.btn-save {
  width: 100%;
  padding: 12px;
  font-size: 0.88rem;
}

/* ===== UTILITY ===== */
.hidden { display: none !important; }

/* Glow on progress bar when running */
.progress-bar-fill.active {
  box-shadow: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 380px) {
  .timer-time { font-size: 3.8rem; }
  .btn-primary { padding: 12px 36px; }
}

/* ===== SCROLLBAR ===== */
.panel::-webkit-scrollbar { width: 4px; }
.panel::-webkit-scrollbar-track { background: transparent; }
.panel::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 2px; }

/* ===== CONFETTI (injected by JS) ===== */
@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(0) scale(1); opacity: 1; }
  100% { transform: translateY(100vh) rotate(540deg) scale(0.3); opacity: 0; }
}

/* ===== SEO CARDS ===== */
.seo-cards-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.seo-cards-header {
  text-align: center;
  margin-bottom: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.seo-cards-header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.seo-cards-header p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-3);
  max-width: 520px;
  margin: 0 auto;
}

.seo-cards-header strong {
  color: var(--text-2);
}

.seo-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.seo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.seo-card:hover {
  border-color: var(--border-hi);
  background: var(--surface-2);
}

.seo-card--wide {
  grid-column: span 3;
}

.seo-card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: var(--accent-dim);
  color: var(--accent);
  flex-shrink: 0;
}

.seo-card h2 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.seo-card p {
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--text-3);
}

.seo-card strong {
  color: var(--text-2);
}

.seo-card a,
.seo-faq-item a {
  color: var(--text-2);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

.seo-card a:hover,
.seo-faq-item a:hover {
  text-decoration-color: var(--text-2);
}

/* SEO steps list */
.seo-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.seo-steps li {
  counter-increment: step;
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--text-3);
  padding-left: 28px;
  position: relative;
}

.seo-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seo-steps li strong {
  color: var(--text-2);
}

/* SEO FAQ Section */
.seo-faq {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 0 0;
}

.seo-faq-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.seo-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.seo-faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color 0.3s var(--ease);
}

.seo-faq-item:hover {
  border-color: var(--border-hi);
}

.seo-faq-item[open] {
  border-color: var(--border-hi);
}

.seo-faq-item summary {
  padding: 16px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}

.seo-faq-item summary::-webkit-details-marker {
  display: none;
}

.seo-faq-item summary::after {
  content: '+';
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-3);
  flex-shrink: 0;
  transition: transform 0.2s var(--ease);
}

.seo-faq-item[open] summary::after {
  content: '−';
}

.seo-faq-item p {
  padding: 0 20px 16px;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-3);
  margin: 0;
}

@media (max-width: 720px) {
  .seo-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .seo-card--wide {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .seo-cards-grid {
    grid-template-columns: 1fr;
  }
  .seo-card--wide {
    grid-column: span 1;
  }
  .seo-cards-wrapper {
    padding: 0 16px 80px;
  }
  .seo-faq {
    padding: 24px 16px 0;
  }
}
