/*
 * 妻の iPhone で、片手で・迷わず押せることだけを目的にした CSS。
 *
 * CSS フレームワークを入れない理由: 画面は 3 つ、ボタンは 2 つしかない。
 * 依存を 1 つ増やすたびに「iOS の PWA で動かない原因」の候補が増える。
 */

:root {
  --ink: #10221f;
  --paper: #f7f7f5;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --muted: #5b6b68;
  --line: #d8ddda;
  --alert: #9a3412;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.25rem max(1.5rem, env(safe-area-inset-bottom));
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

.screen[hidden],
[hidden] {
  display: none !important;
}

.headline {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.75rem;
  font-weight: 700;
}

.detail {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.hint {
  margin: 0.75rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.fatal {
  margin: 3rem 0;
  color: var(--alert);
  font-size: 1.25rem;
  font-weight: 700;
}

/* ボタンは指で押す前提の大きさにする。並べて置かないのは押し間違いを避けるため。 */
.button {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  padding: 1.4rem 1rem;
  border: none;
  border-radius: 1rem;
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

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

.secondary {
  background: #ffffff;
  border: 2px solid var(--line);
  color: var(--ink);
}

.button.disabled,
.button:disabled {
  opacity: 0.35;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.status {
  min-height: 1.7em;
  margin: 0.5rem 0 1.5rem;
  font-weight: 700;
}

.status[data-kind="WORKING"] {
  color: var(--muted);
}

.status[data-kind="DONE"] {
  color: var(--accent);
}

.status[data-kind="FAILED"] {
  color: var(--alert);
}

.link {
  padding: 0.75rem 0.25rem;
  border: none;
  background: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 1rem;
  text-decoration: underline;
  cursor: pointer;
}

.footer {
  display: flex;
  gap: 1.5rem;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
  padding-top: 0.5rem;
}

.setup {
  margin-top: 2rem;
  color: var(--muted);
}

.back {
  padding-left: 0;
}

.month {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}

.history {
  width: 100%;
  border-collapse: collapse;
}

.history th,
.history td {
  border-bottom: 1px solid var(--line);
  padding: 0.6rem 0.25rem;
  text-align: left;
}

.history th {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}
