:root {
  --bg: #f5efe4;
  --panel: rgba(255, 251, 245, 0.82);
  --panel-strong: #fffaf2;
  --ink: #162521;
  --muted: #5f6c66;
  --line: rgba(22, 37, 33, 0.14);
  --focus: #0f766e;
  --focus-soft: rgba(15, 118, 110, 0.14);
  --rest: #c2410c;
  --rest-soft: rgba(194, 65, 12, 0.12);
  --alert: #a31f34;
  --shadow: 0 20px 60px rgba(49, 42, 30, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Trebuchet MS", "PingFang SC", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(194, 65, 12, 0.16), transparent 26%),
    linear-gradient(135deg, #f2ead9 0%, #f6f1e8 42%, #efe6d6 100%);
}

.app-shell {
  width: min(960px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.hero {
  margin-bottom: 24px;
}

.eyebrow,
.label,
.timer-label {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 10px 0 14px;
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.subtitle {
  max-width: 640px;
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--muted);
}

.panel {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 28px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.status-row,
.summary-grid,
.actions {
  display: grid;
  gap: 16px;
}

.status-row {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 20px;
}

.status {
  margin: 6px 0 0;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 700;
}

.pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.timer-card {
  padding: 28px;
  border-radius: 24px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.timer-card.is-focus {
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(255, 250, 242, 0.95));
  border-color: rgba(15, 118, 110, 0.24);
}

.timer-card.is-rest {
  background: linear-gradient(180deg, rgba(194, 65, 12, 0.09), rgba(255, 250, 242, 0.95));
  border-color: rgba(194, 65, 12, 0.24);
}

.timer-card.is-alert {
  background: linear-gradient(180deg, rgba(163, 31, 52, 0.12), rgba(255, 250, 242, 0.96));
  border-color: rgba(163, 31, 52, 0.28);
  transform: translateY(-2px);
}

.timer-value {
  margin: 10px 0;
  font-size: clamp(3rem, 11vw, 7rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.timer-note {
  margin: 0;
  max-width: 44rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.summary-item {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.summary-value {
  margin: 8px 0 0;
  font-size: 1.8rem;
  font-weight: 700;
}

.summary-value.small {
  font-size: 1rem;
  line-height: 1.5;
}

.actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

button {
  border: none;
  border-radius: 18px;
  padding: 16px 20px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease, color 140ms ease;
}

button:hover:enabled {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.primary {
  background: var(--ink);
  color: #fff;
}

.secondary {
  background: var(--focus-soft);
  color: var(--focus);
}

.ghost {
  background: var(--rest-soft);
  color: var(--rest);
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100vw - 20px, 960px);
    padding-top: 28px;
  }

  .panel {
    padding: 18px;
    border-radius: 24px;
  }

  .status-row,
  .summary-grid,
  .actions {
    grid-template-columns: 1fr;
  }

  .timer-card {
    padding: 22px 18px;
  }
}
