:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --ink: #172033;
  --muted: #5f6b7a;
  --panel: #ffffff;
  --line: #d8dee8;
  --accent: #ff6b6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.5;
}

main {
  width: min(880px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 16px;
}

header h1 { margin: 0; font-size: 28px; }
.muted { margin: 6px 0 20px; color: var(--muted); }

.timer-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  display: grid;
  gap: 16px;
  align-items: center;
}

.clock-wrap { display:flex; justify-content:center; }
.ring {
  --size: 220px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) var(--p), #e9eef6 0);
  box-shadow: 0 6px 20px rgba(23,32,51,0.06);
}
.ring .inner {
  width: calc(var(--size) - 36px);
  height: calc(var(--size) - 36px);
  border-radius: 50%;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.time { font-size: 42px; font-weight: 600; }
.mode { color: var(--muted); margin-top: 6px; }

.controls { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
button { padding:8px 12px; border-radius:8px; border:1px solid var(--line); background:transparent; cursor:pointer; }
button.primary { background: linear-gradient(180deg, #ff8a8a, #ff6b6b); color: white; border: none; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.settings { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.settings label { display:flex; gap:6px; align-items:center; font-size:14px; color:var(--muted); }
.settings input { width:64px; padding:6px; border-radius:6px; border:1px solid var(--line); }

.meta { text-align:center; color:var(--muted); }

.credits { margin-top:14px; text-align:center; color:var(--muted); }

@media (max-width:480px) {
  .ring { --size: 180px; }
  .time { font-size: 32px; }
}
