/* 高齢の方でも見やすいように：文字は大きく、色の差ははっきり（コントラスト4.5:1以上） */
:root {
  --green: #1f6e43;
  --blue: #1b5683;
  --red: #b3261e;
  --text: #1a1a1a;
  --muted: #4a4a4a;
  --bg: #ffffff;
  --panel: #f5f7f6;
  --line: #c9d1cc;
  --yellow: #fff4cc;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 2px solid var(--green);
}
.brand { font-size: 22px; font-weight: 700; color: var(--green); }
.mock-tag { font-size: 13px; background: var(--yellow); border: 1px solid #c9a400; padding: 2px 8px; border-radius: 6px; }
.page { max-width: 480px; margin: 0 auto; padding: 16px; }
.lead { font-size: 20px; font-weight: 700; margin: 8px 0 16px; }
.hint { color: var(--muted); margin: 12px 0 0; }
.hint.small { font-size: 16px; }

/* ボタン：指で押しやすい大きさ（高さ56px以上） */
button, .mid-btn { font-family: inherit; cursor: pointer; }
.big-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 100%; min-height: 140px; margin: 0 0 16px;
  font-size: 28px; font-weight: 700; color: #fff;
  border: none; border-radius: 16px;
}
.big-btn .icon { font-size: 40px; line-height: 1; }
.big-btn.green { background: var(--green); }
.big-btn.blue { background: var(--blue); }
.big-btn.recording { background: var(--red); }
.big-btn:disabled { background: #8a8f8c; cursor: not-allowed; }
#step-draft .big-btn, .page > .big-btn { min-height: 64px; font-size: 24px; }
.mid-btn {
  display: block; width: 100%; min-height: 56px; margin: 0 0 12px; padding: 12px;
  font-size: 20px; font-weight: 700; text-align: center; text-decoration: none;
  border-radius: 12px; border: none;
}
.mid-btn.blue { background: var(--blue); color: #fff; }
.mid-btn.blue.recording { background: var(--red); }
.mid-btn.outline { background: #fff; color: var(--text); border: 2px solid var(--text); }
.link-btn { display: block; margin: 4px auto; background: none; border: none; font-size: 18px; color: var(--blue); text-decoration: underline; min-height: 48px; }
:focus-visible { outline: 3px solid #e3a400; outline-offset: 2px; }

.photo-preview { display: flex; align-items: center; gap: 12px; margin: -4px 0 16px; font-weight: 700; color: var(--green); }
.photo-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 2px solid var(--green); }
.rec-status { font-weight: 700; color: var(--red); margin: -8px 0 8px; }

.loading { text-align: center; padding: 48px 0; }
.spinner { width: 56px; height: 56px; margin: 0 auto 16px; border: 6px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

.badge { display: inline-block; background: #e3a400; color: #1a1a1a; font-weight: 700; padding: 4px 14px; border-radius: 999px; margin-bottom: 8px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.card h1, .card h2 { margin: 0 0 8px; }
.card h2 { font-size: 18px; margin-top: 12px; }
.job-title { font-size: 22px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 8px 0; }
.facts dt { font-weight: 700; color: var(--muted); }
.facts dd { margin: 0; }
.facts .missing { color: var(--red); font-weight: 700; }
.cautions, .checklist { padding-left: 0; list-style: none; margin: 4px 0; }
.cautions li { color: var(--red); }
.tag { display: inline-block; border: 2px solid var(--green); color: var(--green); font-weight: 700; padding: 2px 10px; border-radius: 999px; margin: 4px 4px 0 0; }

.alert { background: #fdecea; border: 2px solid var(--red); color: var(--red); border-radius: 12px; padding: 12px; font-weight: 700; margin-bottom: 16px; }
.question { background: var(--yellow); border: 2px solid #c9a400; border-radius: 12px; padding: 12px; margin-bottom: 16px; }
.question p { margin: 0 0 8px; font-weight: 700; }

.done { text-align: center; padding-top: 24px; }
.done-mark { font-size: 64px; color: var(--green); margin: 0; line-height: 1; }

.stat-hint { background: var(--yellow); border-radius: 12px; padding: 16px; margin-top: 8px; }
.stat-hint h2 { font-size: 18px; margin: 0 0 8px; }
.stat-hint p { margin: 0 0 6px; }
.source { font-size: 14px; color: var(--muted); }

/* ---- 第2週：ログイン・高校生・教員の画面 ---- */
.topbar-right { display: flex; align-items: center; gap: 8px; }
.who { font-weight: 700; }
.inline { display: inline; margin: 0; }
.small-btn { min-height: 40px; padding: 4px 12px; font-size: 16px; border: 2px solid var(--text); background: #fff; border-radius: 8px; }
.mid-btn.green { background: var(--green); color: #fff; }
.muted { color: var(--muted); }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 20px; margin: 28px 0 12px; padding-bottom: 4px; border-bottom: 2px solid var(--line); }
.role-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-size: 18px; }
.role-icon.green { background: var(--green); }
.role-icon.blue { background: var(--blue); }
.role-icon.yellow { background: #e3a400; color: #1a1a1a; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.passcode-form label { display: block; font-weight: 700; margin-bottom: 4px; }
.passcode-form input { width: 100%; min-height: 52px; font-size: 20px; padding: 8px 12px; border: 2px solid var(--text); border-radius: 10px; margin-bottom: 12px; }

.notice-list, .job-list, .slot-list, .chat { list-style: none; padding: 0; margin: 0; }
.notice-list li, .job-list li { padding: 10px 0; border-bottom: 1px solid var(--line); white-space: pre-line; }
.job-list li { display: flex; flex-direction: column; gap: 2px; white-space: normal; }
.job-list a { font-weight: 700; color: var(--blue); }
.notice-time { display: block; font-size: 14px; color: var(--muted); }

/* LINE風のお知らせ */
.chat { display: flex; flex-direction: column; gap: 12px; }
.bubble { background: #e9f7ee; border: 1px solid #9fd3b2; border-radius: 4px 16px 16px 16px; padding: 12px; }
.bubble p { margin: 0 0 8px; white-space: pre-line; }
.bubble .mid-btn { margin-bottom: 6px; }

.ok-box { background: #e9f7ee; border: 2px solid var(--green); color: var(--green); font-weight: 700; font-size: 20px; text-align: center; border-radius: 12px; padding: 12px; }
.tag.gray { border-color: #5f6360; color: #5f6360; }

.approval-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.approval-head .state { margin-left: auto; font-weight: 700; }
.check { display: flex; align-items: center; gap: 10px; min-height: 48px; font-size: 18px; }
.check input { width: 28px; height: 28px; }

.slot-list li { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.slot-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 12px; }
.slot-form label { display: flex; flex-direction: column; font-weight: 700; font-size: 16px; }
.slot-form label:first-child, .slot-form button { grid-column: 1 / -1; }
.slot-form input { min-height: 48px; font-size: 18px; padding: 4px 8px; border: 2px solid var(--text); border-radius: 8px; }

.toast { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 448px; margin: 0 auto; z-index: 10; }

/* ---- 第3週：アンケート・試用結果・使い方案内 ---- */
.likert { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 0 0 16px; }
.likert legend { font-weight: 700; padding: 0 4px; }
.likert-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.likert-opt { position: relative; }
.likert-opt input { position: absolute; opacity: 0; inset: 0; }
.likert-opt span { display: flex; align-items: center; justify-content: center; min-height: 52px; border: 2px solid var(--text); border-radius: 10px; font-size: 20px; font-weight: 700; background: #fff; }
.likert-opt input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.likert-opt input:focus-visible + span { outline: 3px solid #e3a400; outline-offset: 2px; }
.likert-ends { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-top: 4px; }
.comment-label { display: block; font-weight: 700; margin-bottom: 4px; }
textarea { width: 100%; font: inherit; padding: 8px; border: 2px solid var(--text); border-radius: 10px; margin-bottom: 16px; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.stat-label { font-size: 15px; color: var(--muted); font-weight: 700; }
.stat-value { font-size: 28px; font-weight: 700; }
.stat-sub { font-size: 14px; color: var(--muted); }
.bar-list { list-style: none; padding: 0; margin: 0 0 8px; }
.bar-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; margin-bottom: 12px; }
.bar-q { grid-column: 1 / -1; font-weight: 700; }
.bar-track { height: 14px; background: var(--line); border-radius: 7px; overflow: hidden; align-self: center; }
.bar-fill { display: block; height: 100%; background: var(--green); }
.bar-v { font-weight: 700; }

.onboard { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.onboard-card { background: #fff; width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; padding: 24px 16px 16px; }
.onboard-step { text-align: center; }
.onboard-icon { font-size: 64px; line-height: 1.1; }
.onboard-title { font-size: 26px; font-weight: 700; margin: 8px 0; }
.onboard-dots { display: flex; justify-content: center; gap: 8px; margin: 12px 0; }
.onboard-dots span { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--green); }
.onboard-dots span.on { background: var(--green); }
.line-code { font-size: 40px; font-weight: 700; letter-spacing: 6px; text-align: center; margin: 4px 0; font-variant-numeric: tabular-nums; }
