:root {
  color-scheme: light dark;
  --bg: #f6f7f8;
  --card: #ffffff;
  --text: #1c2126;
  --muted: #5b6570;
  --line: #d9dde2;
  --accent: #1f6feb;
  --accent-text: #ffffff;
  --warn: #9a5b00;
  --error: #b3261e;
  --done: #1a7f4b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --card: #1c2126;
    --text: #e8ebee;
    --muted: #a3adb8;
    --line: #333a42;
    --accent: #6ea8fe;
    --accent-text: #0d1117;
    --warn: #e3b341;
    --error: #ff8a80;
    --done: #56d48f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  padding: 24px 16px;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  line-height: 1.7;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

h1 { margin: 0 0 12px; font-size: 1.25rem; line-height: 1.5; overflow-wrap: anywhere; }

.message { margin: 0 0 16px; min-height: 1.7em; }
.message.warn { color: var(--warn); }
.message.error { color: var(--error); font-weight: 600; }

.stages { list-style: none; margin: 0 0 16px; padding: 0; }
.stages li {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.stages li:first-child { border-top: 0; }
.stages li.active { color: var(--text); font-weight: 600; }
.stages li.done { color: var(--text); }
.note { font-size: .8rem; color: var(--muted); font-weight: 400; white-space: nowrap; }

.mark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-radius: 50%;
  display: inline-block;
}
.done .mark { background: var(--done); border-color: var(--done); position: relative; }
.done .mark::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  width: 5px;
  height: 10px;
  border: solid var(--card);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.active .mark {
  border-color: var(--accent);
  border-right-color: transparent;
  animation: spin 1.1s linear infinite;
}
.skipped .mark { border-style: dashed; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .active .mark { animation: none; border-right-color: var(--accent); background: var(--accent); }
}

.times { display: flex; gap: 24px; margin: 0 0 16px; }
.times dt { font-size: .8rem; color: var(--muted); }
.times dd { margin: 0; font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.hint, .contact { font-size: .9rem; color: var(--muted); margin: 0 0 12px; }

.actions { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.actions:empty { display: none; }

button, .button {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
button:disabled { opacity: .6; cursor: default; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); }

[hidden] { display: none !important; }
