:root {
  color-scheme: light;
  --bg-start: #fff1d6;
  --bg-end: #ffd7b5;
  --panel: #fffaf2;
  --text: #4a2f1d;
  --muted: #8a6246;
  --accent: #c7592d;
  --accent-dark: #a63f18;
  --danger: #a31515;
  --border: #f0c8a8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
  color: var(--text);
  background: linear-gradient(130deg, var(--bg-start), var(--bg-end));
  background-size: 220% 220%;
  animation: kitchenFlow 14s ease-in-out infinite;
}

@keyframes kitchenFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

h1 {
  margin: 0;
  color: #7f2f14;
}

.subtitle {
  margin-top: 0.5rem;
  color: var(--muted);
}

.timer-form {
  margin: 1.25rem 0 2rem;
  padding: 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(119, 56, 24, 0.12);
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) repeat(3, minmax(90px, 1fr)) auto;
  gap: 0.75rem;
  align-items: end;
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.9rem;
  min-width: 0;
}

input,
select,
button {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}

input {
  background: #fffef9;
  width: 100%;
}

#timer-name {
  max-width: 180px;
}

select {
  background: #fffef9;
  width: 100%;
}

button {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.timers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.9rem;
}

.timer-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
  box-shadow: 0 8px 20px rgba(120, 60, 29, 0.1);
}

.timer-title {
  margin: 0;
  font-size: 1rem;
}

.timer-meta {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.timer-clock {
  margin: 0.7rem 0;
  font-variant-numeric: tabular-nums;
  font-size: 1.9rem;
  font-weight: 700;
}

.timer-card.done .timer-clock {
  color: var(--danger);
}

.timer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.timer-actions button {
  background: #fff3e5;
  border-color: #f0c8a8;
  color: var(--text);
  padding: 0.42rem 0.58rem;
}

.timer-actions button.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.empty-state {
  margin-top: 1rem;
  color: var(--muted);
}

@media (max-width: 680px) {
  .timer-form {
    grid-template-columns: 1fr;
  }
}
