:root {
  --bg: #0f172a;
  --card: #111827;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --stand: #22c55e;
  --sit: #38bdf8;
  --danger: #ef4444;
  --line: rgba(255, 255, 255, .10);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --card: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --accent: #0ea5e9;
    --stand: #10b981;
    --sit: #0ea5e9;
    --danger: #ef4444;
    --line: rgba(0, 0, 0, .10);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, #1e293b, var(--bg));
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app {
  width: min(380px, calc(100vw - 32px));
  padding: 22px;
  border-radius: 24px;
  background: rgba(17, 24, 39, .90);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .08);
  text-align: center;
}

@media (prefers-color-scheme: light) {
  .app {
    background: rgba(255, 255, 255, .90);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .10);
    border: 1px solid rgba(0, 0, 0, .08);
  }
}

h1 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, .12);
  color: var(--accent);
  font-size: 14px;
  font-weight: 750;
  margin-bottom: 14px;
}

.mode.stand {
  background: rgba(34, 197, 94, .12);
  color: var(--stand);
}

.mode.sit {
  background: rgba(56, 189, 248, .12);
  color: var(--sit);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 18px currentColor;
}

.timer {
  font-size: 64px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: -0.08em;
  margin: 8px 0;
  font-variant-numeric: tabular-nums;
}

.next {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.controls button {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.controls button:hover {
  background: #2daee4;
}

.settings {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.settings label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 14px;
}

.settings input {
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 16px;
}

.settings button {
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: var(--muted);
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.settings button:hover {
  background: #475569;
}

@media (prefers-color-scheme: light) {
  .controls button {
    background: #0ea5e9;
  }
  
  .controls button:hover {
    background: #0284c7;
  }
  
  .settings input {
    background: white;
    border: 1px solid #e2e8f0;
    color: var(--text);
  }
  
  .settings button {
    background: #64748b;
  }
  
  .settings button:hover {
    background: #475569;
  }
}