:root {
  color-scheme: light;
  --bg: #f6f3ec;
  --ink: #17211f;
  --muted: #65716f;
  --line: #d9d5ca;
  --panel: #fffdfa;
  --teal: #0f766e;
  --mint: #d8f3e8;
  --amber: #d97706;
  --rose: #be123c;
  --blue: #2563eb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px 104px;
}

.hero {
  min-height: 22vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(42px, 14vw, 74px);
  line-height: .92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.subtitle {
  margin-bottom: 0;
  max-width: 28rem;
  color: var(--muted);
  line-height: 1.65;
}

.icon-button {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-size: 28px;
  box-shadow: 0 12px 26px rgb(15 118 110 / 25%);
}

.timer-panel,
.reminder-panel,
.break-panel,
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 16px 38px rgb(23 33 31 / 7%);
}

.timer-panel {
  padding: 18px;
}

.reminder-panel {
  margin-top: 14px;
  padding: 16px;
}

.panel-heading,
.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: min(100%, 188px);
  padding: 4px;
  border-radius: 999px;
  background: #ece8dc;
}

.mode {
  display: grid;
  place-items: center;
  gap: 1px;
  min-height: 36px;
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.mode span {
  font-size: 11px;
  line-height: 1;
}

.mode strong {
  font-size: 15px;
  line-height: 1;
}

.mode.active {
  background: white;
  color: var(--teal);
  box-shadow: 0 4px 14px rgb(23 33 31 / 10%);
}

.timer-face {
  display: grid;
  place-items: center;
  padding: 26px 0 18px;
}

.ring {
  width: min(72vw, 280px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--teal) 0deg, #e9e3d6 0deg);
  position: relative;
}

.ring::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: var(--panel);
}

.ring span {
  position: relative;
  z-index: 1;
  font-variant-numeric: tabular-nums;
  font-size: clamp(44px, 15vw, 68px);
  font-weight: 900;
}

.timer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary,
.secondary,
.food,
.toggle {
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
}

.primary {
  background: var(--teal);
  color: white;
}

.secondary {
  background: #f0ece2;
  color: var(--ink);
  border-color: var(--line);
}

.hint,
.small {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.science-note {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid #eee9de;
  color: #40504d;
  font-size: 13px;
  line-height: 1.6;
}

.break-panel {
  margin-top: 14px;
  padding: 20px;
  background: #14312f;
  color: white;
}

.break-panel .eyebrow,
.break-panel p {
  color: #bfe9df;
}

.break-panel strong {
  display: block;
  margin: 12px 0;
  font-size: 64px;
  line-height: 1;
}

.grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.card {
  padding: 16px;
}

.card-title {
  justify-content: flex-start;
  margin-bottom: 14px;
}

.dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
}

.teal { background: var(--teal); }
.amber { background: var(--amber); }
.rose { background: var(--rose); }
.blue { background: var(--blue); }

label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-top: 1px solid #eee9de;
  color: #26312f;
}

input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--teal);
}

.food {
  width: 100%;
  margin-bottom: 8px;
  background: white;
  border-color: var(--line);
  color: var(--ink);
}

.food.done {
  background: var(--mint);
  border-color: #9dddc9;
  color: #07554f;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 48px;
  border-top: 1px solid #eee9de;
}

.toggle {
  width: 56px;
  min-height: 34px;
  border-radius: 999px;
  background: #f0ece2;
  color: var(--muted);
  border-color: var(--line);
}

.toggle.active {
  background: var(--teal);
  color: white;
  border-color: var(--teal);
}

.warning-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.9;
}

.full {
  width: 100%;
  margin-top: 12px;
}

.bottom-bar {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 680px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 10px;
  border: 1px solid rgb(255 255 255 / 50%);
  border-radius: 8px;
  background: rgb(23 33 31 / 88%);
  color: white;
  box-shadow: 0 16px 38px rgb(23 33 31 / 22%);
  backdrop-filter: blur(14px);
}

.bottom-bar div {
  display: grid;
  place-items: center;
  min-width: 0;
}

.bottom-bar strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.bottom-bar span {
  color: #cbd8d5;
  font-size: 12px;
}

@media (min-width: 680px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
