:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  background: #f4f5f7;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

button,
textarea {
  font: inherit;
}

main {
  display: grid;
  gap: 12px;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.progress-track {
  position: relative;
  width: min(560px, 100%);
  height: 12px;
  border-radius: 999px;
  background: #dfe2e7;
}

.progress-fill {
  width: 0;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: #4a5568;
  transition: width 0.25s linear;
  will-change: width;
}

.progress-marker {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 18px;
  border-radius: 999px;
  background: #8b95a5;
  opacity: 0.72;
  animation: marker-breathe 3s ease-in-out infinite;
}

.progress-marker-first {
  left: 66.6667%;
}

.progress-marker-second {
  left: 83.3333%;
  animation-delay: 1.5s;
}

.progress-value {
  color: #4a5568;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

.progress-next-point {
  min-height: 1.1em;
  color: #8b95a5;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

@keyframes marker-breathe {
  0%,
  100% {
    opacity: 0.48;
  }
  50% {
    opacity: 0.9;
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill,
  .progress-marker {
    animation: none;
    transition: none;
  }
}

.mission-panel {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(244 245 247 / 92%);
  z-index: 10;
}

.mission-panel[hidden] {
  display: none;
}

.mission-card {
  position: relative;
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid #dfe2e7;
  border-radius: 14px;
  background: #f8f9fa;
  box-shadow: 0 16px 50px rgb(55 65 81 / 10%);
}

.mission-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  color: #8b95a5;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.mission-kicker,
.mission-progress,
.mission-hint,
.mission-error {
  margin: 0;
}

.mission-kicker {
  color: #8b95a5;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mission-card h1 {
  margin: 10px 0 12px;
  color: #374151;
  font-size: 1.35rem;
  font-weight: 500;
}

.mission-hint {
  color: #8b95a5;
  font-size: 0.78rem;
  line-height: 1.5;
}

.mission-input {
  display: block;
  width: 100%;
  margin: 18px 0 12px;
  padding: 11px;
  resize: vertical;
  border: 1px solid #dfe2e7;
  border-radius: 8px;
  outline: 0;
  background: #fff;
  color: #374151;
}

.mission-input:focus {
  border-color: #8b95a5;
}

.mission-start,
.mission-complete,
.mission-reset-timer {
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.mission-start,
.mission-complete {
  padding: 9px 14px;
  background: #4a5568;
  color: #fff;
}

.mission-reset-timer {
  padding: 8px 10px;
  background: transparent;
  color: #8b95a5;
  font-size: 0.75rem;
}

.mission-new {
  margin-top: 20px;
  padding: 9px 14px;
  border: 1px solid #dfe2e7;
  border-radius: 7px;
  background: transparent;
  color: #4a5568;
  cursor: pointer;
}

.mission-error {
  margin-top: 10px;
  color: #9a5b5b;
  font-size: 0.75rem;
}

.mission-progress {
  margin-top: 18px;
  color: #8b95a5;
  font-size: 0.75rem;
}

.mission-task {
  min-height: 2.7em;
}

.mission-timer {
  margin: 24px 0 12px;
  color: #4a5568;
  font-variant-numeric: tabular-nums;
  font-size: 2.4rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-align: center;
}

.mission-timer-done {
  color: #8b95a5;
}

.mission-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}
