:root {
  color-scheme: light;
  --bg: #f6f7f2;
  --ink: #16201c;
  --muted: #5d6963;
  --panel: #ffffff;
  --line: #d9ded6;
  --accent: #166b5f;
  --accent-strong: #0c4f47;
  --warm: #c4512d;
  --focus: #f2b84b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
}

button {
  min-height: 44px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0 18px;
  cursor: pointer;
}

button:disabled {
  border-color: var(--line);
  background: #dfe4dc;
  color: #7a837d;
  cursor: not-allowed;
}

button:not(:disabled):hover {
  background: var(--accent-strong);
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: stretch;
  padding: 28px 0 18px;
}

.eyebrow,
.metric {
  margin: 0 0 8px;
  color: var(--warm);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.15rem, 8vw, 4.5rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.summary {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.status-panel,
.active-break,
.break-card,
.schedule {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.status-panel {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 20px;
}

.state-dot {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.state-dot::before {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-right: 0.45em;
  border-radius: 999px;
  background: #a6aea8;
  content: "";
}

.state-dot[data-state="running"]::before {
  background: #2e9f72;
}

#next-label {
  font-size: 1.25rem;
}

#next-countdown,
#active-countdown {
  font-variant-numeric: tabular-nums;
  font-size: 2.4rem;
  font-weight: 900;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 24px;
}

.active-break {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
  padding: 18px;
  border-color: var(--focus);
}

.active-break.hidden {
  display: none;
}

.active-break p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.break-card {
  padding: 20px;
}

.break-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.schedule {
  padding: 20px;
}

.schedule ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.schedule li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.schedule li:first-child {
  border-top: 0;
}

.schedule small {
  color: var(--muted);
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 24px, 1040px);
    padding: 18px 0;
  }

  .hero,
  .grid,
  .active-break {
    grid-template-columns: 1fr;
  }

  .controls button {
    flex: 1 1 144px;
  }

  .schedule li {
    grid-template-columns: 1fr auto;
  }

  .schedule small {
    grid-column: 1 / -1;
  }
}
