/* 文字は20px以上、押すところは高さ80px以上、白地に濃い色（高齢の方が見やすいように） */
:root {
  --ink: #111111;
  --muted: #333333;
  --green: #14532d;
  --green-press: #0b3a1f;
  --ok: #15803d;
  --warn: #92400e;
  --error: #991b1b;
  --line: #9ca3af;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 22px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  max-width: 720px;
  margin: 0 auto;
}

.greeting {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
}

.status {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 12px 0;
}

.status-mark {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin-bottom: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  font-weight: 700;
  color: #ffffff;
}

.status-mark.is-ok { display: flex; background: var(--ok); }
.status-mark.is-busy {
  display: block;
  border: 12px solid #d1d5db;
  border-top-color: var(--green);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .status-mark.is-busy { animation: none; } }

.status-text { margin: 0; font-size: 26px; font-weight: 700; }
.status-text.is-error { color: var(--error); }
.status-text.is-warn { color: var(--warn); }
.today-count { margin: 8px 0 0; font-size: 24px; color: var(--muted); }
.pending-text { margin: 8px 0 0; font-size: 22px; color: var(--warn); font-weight: 700; }
.today-count:empty, .pending-text:empty { display: none; }

/* 画面の下半分を占める大きな押すところ */
.shoot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: max(45vh, 120px);
  border-radius: 24px;
  background: var(--green);
  color: #ffffff;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.shoot:active { background: var(--green-press); }
.shoot.is-disabled { background: #6b7280; pointer-events: none; }

/* Android 用のページ内カメラ：画面いっぱいに映像、下に大きな「撮る」 */
.camera {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background: #000000;
}
.camera[hidden] { display: none; }
.camera-video {
  flex: 1;
  width: 100%;
  min-height: 0;
  object-fit: cover;
}
.camera-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom));
  background: #000000;
}
.camera-shoot {
  flex: 1;
  min-height: 96px;
  border: 0;
  border-radius: 20px;
  background: #ffffff;
  color: var(--green);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.camera-shoot:active { background: #d1d5db; }
.camera-cancel {
  min-width: 96px;
  min-height: 80px;
  border: 2px solid #ffffff;
  border-radius: 16px;
  background: transparent;
  color: #ffffff;
  font-size: 22px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.manual {
  margin-top: 24px;
  padding: 20px;
  border: 2px solid var(--line);
  border-radius: 16px;
}
.manual h2 { margin: 0 0 4px; font-size: 26px; }
.manual-note { margin: 0 0 12px; color: var(--muted); font-size: 20px; }
.field { display: block; margin-bottom: 12px; font-size: 22px; font-weight: 700; }
.field input {
  display: block;
  width: 100%;
  min-height: 64px;
  margin-top: 4px;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  font-size: 24px;
}
.manual-submit {
  width: 100%;
  min-height: 80px;
  border: 0;
  border-radius: 16px;
  background: var(--green);
  color: #ffffff;
  font-size: 26px;
  font-weight: 700;
  cursor: pointer;
}
.manual-submit:disabled { background: #6b7280; }
