/* ===== おしるこアンケート シニア向けスタイル ===== */
/* 設計方針:
   - スマホファースト (iPhone 12 mini 〜 Galaxy S22)
   - 文字大きめ (本文18px / 設問22px / 見出し26px)
   - タップ領域最低56px
   - 高コントラスト (白背景 / 黒文字 / 強調 #1976d2)
*/

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  color: #111111;
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 18px 60px;
  min-height: 100vh;
}

.screen {
  animation: none;
}

/* ===== 共通テキスト ===== */
.title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.5;
  margin: 16px 0 24px;
  color: #111111;
  text-align: center;
}

.lead {
  font-size: 18px;
  line-height: 1.7;
  margin: 0 0 24px;
}

/* ===== ウェルカム画面 ===== */
.info-box {
  background: #f3f8fd;
  border: 2px solid #1976d2;
  border-radius: 12px;
  padding: 20px 16px;
  margin: 0 0 24px;
  text-align: center;
}

.info-line {
  font-size: 20px;
  margin: 8px 0;
  line-height: 1.6;
}

.privacy-box {
  background: #fafafa;
  border-radius: 8px;
  padding: 16px;
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.7;
  color: #333333;
}

.privacy-box p {
  margin: 0 0 8px;
}

.privacy-box p:last-child {
  margin-bottom: 0;
}

/* ===== ボタン ===== */
.primary-btn,
.secondary-btn {
  display: block;
  width: 100%;
  min-height: 60px;
  padding: 14px 16px;
  font-size: 20px;
  font-weight: 700;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  line-height: 1.4;
}

.primary-btn {
  background: #1976d2;
  color: #ffffff;
  border-color: #1976d2;
}

.primary-btn:disabled {
  background: #bdbdbd;
  border-color: #bdbdbd;
  color: #ffffff;
  cursor: not-allowed;
}

.primary-btn:not(:disabled):active {
  background: #115293;
}

.secondary-btn {
  background: #ffffff;
  color: #1976d2;
  border-color: #1976d2;
}

.secondary-btn:disabled {
  color: #bdbdbd;
  border-color: #bdbdbd;
  cursor: not-allowed;
}

.secondary-btn:not(:disabled):active {
  background: #e3f2fd;
}

.close-hint {
  margin: 16px 0 0;
  font-size: 16px;
  color: #555555;
  text-align: center;
  line-height: 1.6;
}

/* ===== プログレス ===== */
.progress-wrap {
  position: sticky;
  top: 0;
  background: #ffffff;
  padding: 12px 0 16px;
  margin: 0 -18px 16px;
  padding-left: 18px;
  padding-right: 18px;
  border-bottom: 1px solid #eeeeee;
  z-index: 10;
}

.progress-text {
  font-size: 16px;
  margin: 0 0 8px;
  color: #555555;
  font-weight: 500;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #1976d2;
  transition: width 0.2s ease;
  width: 0%;
}

/* ===== 質問 ===== */
.question-text {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.6;
  margin: 8px 0 24px;
  color: #111111;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 32px;
}

.option {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 12px 16px;
  background: #ffffff;
  border: 2px solid #cccccc;
  border-radius: 10px;
  cursor: pointer;
  font-size: 19px;
  line-height: 1.5;
  transition: border-color 0.1s, background 0.1s;
}

.option input[type="radio"] {
  width: 28px;
  height: 28px;
  margin: 0 14px 0 0;
  flex-shrink: 0;
  accent-color: #1976d2;
  cursor: pointer;
}

.option:active {
  background: #f3f8fd;
}

.option.selected {
  border-color: #1976d2;
  background: #f3f8fd;
}

.option-label {
  flex: 1;
}

/* ===== ナビゲーションボタン ===== */
.nav-buttons {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.nav-buttons .secondary-btn,
.nav-buttons .primary-btn {
  flex: 1;
}

/* ===== ニックネーム入力 ===== */
.nickname-label {
  display: block;
  font-size: 18px;
  font-weight: 500;
  margin: 8px 0 8px;
}

#nickname-input {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  font-size: 20px;
  border: 2px solid #cccccc;
  border-radius: 10px;
  font-family: inherit;
  background: #ffffff;
  color: #111111;
  margin: 0 0 16px;
}

#nickname-input:focus {
  outline: none;
  border-color: #1976d2;
}

.error-text {
  color: #c62828;
  font-size: 16px;
  margin: 0 0 16px;
  font-weight: 500;
}

/* ===== ローディング・エラー ===== */
.loading {
  text-align: center;
  margin: 24px 0;
  font-size: 18px;
  color: #555555;
}

.error-box {
  background: #fff3f3;
  border: 2px solid #c62828;
  border-radius: 10px;
  padding: 16px;
  margin: 24px 0 0;
}

.error-box .error-text {
  margin: 0 0 12px;
  font-size: 18px;
}

/* ===== レスポンシブ調整 ===== */
@media (min-width: 480px) {
  #app {
    padding: 32px 24px 60px;
  }
  .title {
    font-size: 28px;
  }
  .question-text {
    font-size: 24px;
  }
}
