/* ── CSS Variables ─────────────────────────────── */
:root {
  /* Base */
  --bg:           #0d0d12;
  --bg2:          #12121a;
  --surface:      rgba(255,255,255,0.035);
  --surface-b:    rgba(255,255,255,0.07);
  --border:       rgba(255,255,255,0.08);
  --text:         #e8e4dc;
  --text-dim:     rgba(232,228,220,0.45);
  --text-muted:   rgba(232,228,220,0.25);

  /* Mode colors */
  --work-hue:     30;
  --break-hue:    155;
  --long-hue:     210;

  --accent:       hsl(var(--work-hue), 90%, 62%);
  --accent-glow:  hsl(var(--work-hue), 90%, 62%, 0.3);
  --accent-dim:   hsl(var(--work-hue), 60%, 40%);
  --ring-color:   hsl(var(--work-hue), 90%, 62%);

  /* Sizes */
  --radius:       18px;
  --radius-sm:    10px;
  --radius-pill:  999px;
  --shadow:       0 8px 40px rgba(0,0,0,0.5);
  --shadow-sm:    0 2px 12px rgba(0,0,0,0.3);

  /* Transition */
  --t:            0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:       0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light theme */
[data-theme="light"] {
  --bg:           #f5f0e8;
  --bg2:          #ece7de;
  --surface:      rgba(0,0,0,0.04);
  --surface-b:    rgba(0,0,0,0.07);
  --border:       rgba(0,0,0,0.08);
  --text:         #1a1714;
  --text-dim:     rgba(26,23,20,0.5);
  --text-muted:   rgba(26,23,20,0.28);
  --shadow:       0 8px 40px rgba(0,0,0,0.12);
  --shadow-sm:    0 2px 12px rgba(0,0,0,0.08);
}

/* Mode themes */
[data-mode="work"]       { --work-hue: 30; }
[data-mode="shortBreak"] { --work-hue: 155; }
[data-mode="longBreak"]  { --work-hue: 210; }

/* ── Reset & Base ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Mono', monospace;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem 4rem;
  transition: background var(--t), color var(--t);
  overflow-x: hidden;
  position: relative;
}

/* ── Ambient Background ────────────────────────── */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-bg::before,
.ambient-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  transition: background var(--t) 0.1s;
}

.ambient-bg::before {
  width: 600px; height: 600px;
  top: -200px; left: -150px;
  background: hsl(var(--work-hue), 80%, 60%);
  animation: driftA 18s ease-in-out infinite alternate;
}

.ambient-bg::after {
  width: 500px; height: 500px;
  bottom: -200px; right: -150px;
  background: hsl(calc(var(--work-hue) + 40), 70%, 50%);
  animation: driftB 22s ease-in-out infinite alternate;
}

[data-theme="light"] .ambient-bg::before,
[data-theme="light"] .ambient-bg::after { opacity: 0.07; }

@keyframes driftA {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(80px, 60px) scale(1.15); }
}
@keyframes driftB {
  from { transform: translate(0,0) scale(1.1); }
  to   { transform: translate(-60px, -40px) scale(1); }
}

/* ── Confetti Canvas ───────────────────────────── */
#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

/* ── Glass Card ────────────────────────────────── */
.glass-card {
  background: var(--surface);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: background var(--t), border-color var(--t);
  position: relative;
  z-index: 1;
}

.glass-card:hover {
  border-color: rgba(255,255,255,0.12);
}

[data-theme="light"] .glass-card {
  background: rgba(255,255,255,0.65);
  border-color: rgba(0,0,0,0.08);
}

/* ── Header ────────────────────────────────────── */
.app-header {
  width: 100%;
  max-width: 680px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0 0.5rem;
  position: relative;
  z-index: 2;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-icon {
  color: var(--accent);
  font-size: 1.6rem;
  animation: spin 20s linear infinite;
  display: inline-block;
  transition: color var(--t);
}

@keyframes spin { to { transform: rotate(360deg); } }

.header-controls {
  display: flex;
  gap: 0.5rem;
}

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
  position: relative;
  overflow: hidden;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  transform: translateY(-1px);
}

.icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Sun/Moon toggle */
.icon-sun, .icon-moon {
  position: absolute;
  transition: all var(--t);
}
[data-theme="dark"] .icon-sun  { opacity: 1; transform: rotate(0); }
[data-theme="dark"] .icon-moon { opacity: 0; transform: rotate(-90deg); }
[data-theme="light"] .icon-moon { opacity: 1; transform: rotate(0); }
[data-theme="light"] .icon-sun  { opacity: 0; transform: rotate(90deg); }

/* ── Main Layout ───────────────────────────────── */
.app-main {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-top: 0.75rem;
  position: relative;
  z-index: 1;
}

/* ── Mode Nav ──────────────────────────────────── */
.mode-nav {
  display: flex;
  gap: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.3rem;
  backdrop-filter: blur(12px);
}

.mode-pill {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--t-fast);
  letter-spacing: 0.02em;
}

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

.mode-pill.active {
  background: var(--accent);
  color: #0d0d12;
  font-weight: 600;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.mode-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Timer Card ────────────────────────────────── */
.timer-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem 1.75rem;
  gap: 1.25rem;
}

/* ── Ring Timer ────────────────────────────────── */
.timer-ring-wrap {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 6;
  transition: stroke var(--t);
}

.ring-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke var(--t), stroke-dashoffset 1s linear;
}

.timer-display {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.timer-digits {
  font-family: 'Fraunces', serif;
  font-size: clamp(3rem, 12vw, 4.5rem);
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
  transition: color var(--t);
  user-select: none;
}

.timer-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  transition: color var(--t);
}

/* Pulse ring */
.pulse-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  pointer-events: none;
  transition: border-color var(--t);
}

.pulse-ring.pulsing {
  animation: pulseRing 1.5s ease-out infinite;
}

@keyframes pulseRing {
  0%   { transform: scale(1);    opacity: 0.6; }
  100% { transform: scale(1.06); opacity: 0; }
}

/* ── Progress Bar ──────────────────────────────── */
.progress-bar-wrap {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width 1s linear, background var(--t);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ── Timer Controls ────────────────────────────── */
.timer-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ctrl-btn {
  border: none;
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.ctrl-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.ctrl-btn.primary {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: #0d0d12;
  font-size: 1.5rem;
  box-shadow: 0 4px 24px var(--accent-glow), 0 2px 8px rgba(0,0,0,0.3);
}

.ctrl-btn.primary:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 30px var(--accent-glow), 0 2px 8px rgba(0,0,0,0.3);
}

.ctrl-btn.primary:active { transform: scale(0.97); }

.ctrl-btn.secondary {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--surface-b);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.ctrl-btn.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  transform: scale(1.05);
}

/* Play/Pause icon toggling */
.play-icon, .pause-icon { position: absolute; transition: all var(--t-fast); }
.play-icon  { opacity: 1; transform: translateX(2px); }
.pause-icon { opacity: 0; transform: scale(0.5); }
.ctrl-btn.primary { position: relative; }

body.running .play-icon  { opacity: 0; transform: scale(0.5); }
body.running .pause-icon { opacity: 1; transform: scale(1); }

/* ── Pomodoro Dots ─────────────────────────────── */
.pomodoro-counter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.counter-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pom-dots {
  display: flex;
  gap: 0.45rem;
}

.pom-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  transition: all var(--t);
}

.pom-dot.done {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}

.pom-dot.current {
  border-color: var(--accent);
  animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50%       { box-shadow: 0 0 0 4px transparent; }
}

/* ── Bottom Grid ───────────────────────────────── */
.bottom-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 540px) {
  .bottom-grid { grid-template-columns: 1fr; }
}

/* ── Panel Shared ──────────────────────────────── */
.panel {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 600;
  font-style: italic;
  color: var(--text);
}

/* ── Task Panel ────────────────────────────────── */
.task-count {
  background: var(--accent);
  color: #0d0d12;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  transition: background var(--t);
}

.task-input-wrap {
  display: flex;
  gap: 0.4rem;
}

.task-input {
  flex: 1;
  background: var(--surface-b);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  outline: none;
  transition: border-color var(--t-fast);
}

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

.task-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.add-task-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent);
  color: #0d0d12;
  font-size: 1.3rem;
  font-weight: 300;
  cursor: pointer;
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.add-task-btn:hover { transform: scale(1.07); box-shadow: 0 2px 10px var(--accent-glow); }

.task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 180px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--surface-b);
  border: 1px solid var(--border);
  transition: all var(--t-fast);
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.task-check {
  width: 16px; height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: all var(--t-fast);
  appearance: none;
  -webkit-appearance: none;
  position: relative;
}

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

.task-check:checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  color: #0d0d12;
  font-weight: 900;
}

.task-text {
  flex: 1;
  font-size: 0.76rem;
  color: var(--text);
  transition: all var(--t-fast);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.task-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all var(--t-fast);
  opacity: 0;
  flex-shrink: 0;
}

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

/* ── Sound Panel ───────────────────────────────── */
.volume-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.volume-slider {
  width: 70px;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: var(--radius-pill);
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  transition: background var(--t);
}

.sound-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.sound-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.6rem 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-b);
  color: var(--text-dim);
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  cursor: pointer;
  transition: all var(--t-fast);
}

.sound-icon { font-size: 1.2rem; }

.sound-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.sound-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ── Stats Bar ─────────────────────────────────── */
.stats-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.85rem 1.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.stat-value {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  font-style: italic;
}

.stat-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

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

/* ── Overlay ───────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
  padding: 1rem;
}

.overlay.open {
  opacity: 1;
  pointer-events: all;
}

.overlay-card {
  width: 100%;
  max-width: 420px;
  max-height: 90dvh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  transform: scale(0.95) translateY(12px);
  transition: transform var(--t);
}

.wide-card { max-width: 600px; }

.overlay.open .overlay-card {
  transform: scale(1) translateY(0);
}

.overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 1rem;
}

.overlay-header h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.25rem;
  font-weight: 700;
  font-style: italic;
}

.close-btn {
  background: var(--surface-b);
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
}

.close-btn:hover { border-color: #ff6b6b; color: #ff6b6b; }

/* ── Settings Body ─────────────────────────────── */
.settings-body {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.settings-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.setting-label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-dim);
}

.setting-input {
  background: var(--surface-b);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.6rem;
  color: var(--text);
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 700;
  font-style: italic;
  outline: none;
  text-align: center;
  width: 100%;
  transition: border-color var(--t-fast);
}

.setting-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.toggle-row:last-of-type { border-bottom: none; }

.toggle-switch {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.toggle-switch input { display: none; }

.toggle-track {
  width: 40px; height: 22px;
  background: var(--border);
  border-radius: var(--radius-pill);
  transition: background var(--t-fast);
  position: relative;
}

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

.toggle-thumb {
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 3px; left: 3px;
  transition: transform var(--t-fast);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.toggle-switch input:checked + .toggle-track .toggle-thumb {
  transform: translateX(18px);
}

.save-btn {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #0d0d12;
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--t-fast);
}

.save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* ── Stats Body ────────────────────────────────── */
.stats-body {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stats-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
}

.big-stat-value {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 900;
  font-style: italic;
  color: var(--accent);
}

.big-stat-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.chart-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

#statsChart {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.suggestion-text {
  font-size: 0.78rem;
  color: var(--accent);
  text-align: center;
  padding: 0.5rem 0.75rem;
  border: 1px dashed var(--accent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  transition: all var(--t);
  min-height: 0;
}

.suggestion-text:empty { display: none; }

/* ── Kbd Hint ───────────────────────────────────── */
.kbd-hint {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
}

kbd {
  background: var(--surface-b);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.63rem;
}

/* ── Mode Transition ───────────────────────────── */
body.mode-transition .timer-card {
  animation: modeFlash 0.4s ease;
}

@keyframes modeFlash {
  0%   { transform: scale(1); }
  30%  { transform: scale(0.98); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 480px) {
  .timer-ring-wrap { width: 240px; height: 240px; }
  .stats-summary { grid-template-columns: 1fr 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr 1fr 1fr; }
  .overlay-card { max-height: 95dvh; }
}

@media (max-width: 360px) {
  .timer-ring-wrap { width: 210px; height: 210px; }
  .mode-pill { padding: 0.4rem 0.7rem; font-size: 0.72rem; }
}

/* ── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ── Notification toast ────────────────────────── */
.toast {
  position: fixed;
  bottom: 3.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.6rem 1.25rem;
  font-size: 0.78rem;
  color: var(--text);
  z-index: 200;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  white-space: nowrap;
}

@keyframes toastIn  { from { opacity:0; transform: translateX(-50%) translateY(10px); } }
@keyframes toastOut { to   { opacity:0; transform: translateX(-50%) translateY(10px); } }
