/* MedVoice-JP recorder — 高齢協力者対応: 大きい文字・大きいボタン・1画面1アクション */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 20px;
  line-height: 1.7;
  color: #1a1a2e;
  background: #f5f7fa;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 20px 48px;
}

h1 {
  font-size: 30px;
  line-height: 1.4;
  margin: 16px 0;
}

.lead { font-size: 21px; }

/* 画面切替: .screen は active のみ表示 */
.screen { display: none; }
.screen.active { display: block; }
.hidden { display: none !important; }

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

/* ボタン: 最低60px高・全幅・大きい文字 */
.btn {
  display: block;
  width: 100%;
  min-height: 64px;
  margin: 16px 0;
  padding: 12px 16px;
  font-size: 24px;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

.btn:disabled {
  background: #c5cbd3;
  color: #6b7280;
  cursor: not-allowed;
}

.btn-primary { background: #1565c0; color: #fff; }
.btn-primary:not(:disabled):hover { background: #0d47a1; }

.btn-secondary { background: #e3e8ef; color: #1a1a2e; }
.btn-secondary:hover { background: #d2d9e3; }

.btn-danger { background: #fff; color: #b71c1c; border: 2px solid #b71c1c; }

.btn-record { background: #c62828; color: #fff; min-height: 80px; }
.btn-record:hover { background: #a31515; }

.btn-stop { background: #37474f; color: #fff; min-height: 80px; }
.btn-stop:hover { background: #263238; }

.file-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* 同意チェック */
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 24px 0;
  padding: 18px;
  font-size: 22px;
  font-weight: bold;
  background: #fff;
  border: 2px solid #1565c0;
  border-radius: 12px;
  cursor: pointer;
}

.consent-label input[type="checkbox"] {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  margin-top: 4px;
  cursor: pointer;
}

/* 属性フォーム */
.field { margin: 20px 0; }

.field label {
  display: block;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 8px;
}

.field select,
.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  min-height: 60px;
  font-size: 22px;
  padding: 8px 12px;
  border: 2px solid #90a4ae;
  border-radius: 10px;
  background: #fff;
  box-sizing: border-box;
}

/* 読み上げ文: 28px以上 */
.prompt-text {
  font-size: 32px;
  font-weight: bold;
  line-height: 1.8;
  background: #fff;
  border: 2px solid #cfd8dc;
  border-radius: 12px;
  padding: 24px;
  margin: 16px 0 24px;
}

/* フリートーク: お題カード (読み上げ文と区別する枠) */
.prompt-text.free-talk-card {
  background: #fff8e1;
  border: 3px solid #f9a825;
  margin-bottom: 8px;
}

/* フリートーク v2: 指示文 + 箇条書き (情報を「見て拾う」メモなので読み上げ文より小さめ) */
.free-talk-instruction {
  font-size: 20px;
  font-weight: normal;
  line-height: 1.6;
  color: #5d4a00;
  margin-bottom: 12px;
}

.free-talk-points {
  font-size: 22px;
  font-weight: normal;
  line-height: 1.7;
  margin: 0;
  padding-left: 1.4em;
}

.free-talk-points li {
  margin-bottom: 4px;
}

.prompt-keywords {
  font-size: 18px;
  color: #5d4a00;
  margin: 0 0 24px;
  padding: 0 6px;
}

/* フリートーク録音中の経過時間 */
.record-timer {
  font-size: 30px;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
  margin: 8px 0;
}

/* 1分未満で止めたときの非ブロック注意 */
.short-note {
  background: #e3f2fd;
  border: 2px solid #64b5f6;
  border-radius: 10px;
  color: #0d3c61;
  font-size: 18px;
  padding: 10px 14px;
  margin: 8px 0;
}

/* 進捗バー */
.progress-wrap { margin: 8px 0 16px; }

.progress-track {
  height: 22px;
  background: #dde3ea;
  border-radius: 11px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: #2e7d32;
  border-radius: 11px;
  transition: width 0.3s;
}

.progress-label {
  font-size: 20px;
  font-weight: bold;
  margin: 6px 0 0;
  text-align: right;
}

/* 録音中表示 */
.recording-indicator {
  font-size: 22px;
  font-weight: bold;
  color: #c62828;
}

.rec-dot {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #c62828;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

audio {
  display: block;
  width: 100%;
  margin: 12px 0;
}

/* メッセージ・エラー */
.message {
  background: #fff3e0;
  border: 2px solid #ef6c00;
  color: #5d3000;
  font-size: 20px;
  font-weight: bold;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 12px 0;
}

.error-text {
  color: #b71c1c;
  font-size: 20px;
  font-weight: bold;
}

/* やること案内（最初の画面・既存デザインに統一） */
.intro-tagline { margin: 0 0 20px; }

.intro-steps {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.intro-steps li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #fff;
  border: 2px solid #cfd8dc;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 12px 0;
}

.intro-step-no {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #1565c0;
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-step-body {
  font-size: 20px;
  line-height: 1.6;
}

.intro-note {
  background: #eef4fb;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 18px;
  color: #2a3b52;
}
