/* ===== デザイントークン（設計書 22.9 準拠） ===== */
:root {
  --green-main: #7BA98C;
  --green-deep: #4F7A5E;
  --green-light: #C4DCC9;
  --green-soft: #EAF3EC;
  --paper: #FAF6EE;
  --paper-deep: #F2EAD8;
  --warm: #D89968;
  --warm-light: #F5E6D4;
  --text: #2C3A2E;
  --text-mute: #6B7A6C;
  --text-light: #9BAA9C;
  --white: #FFFFFF;
  --red: #E05252;
  --red-light: #FEF0F0;
  --blue: #5B8BB4;
  --blue-light: #EAF1F8;
  --shadow-sm: 0 1px 4px rgba(44,58,46,0.08);
  --shadow-md: 0 4px 16px rgba(44,58,46,0.12);
  --shadow-lg: 0 8px 32px rgba(44,58,46,0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --f-display: 'Zen Maru Gothic', sans-serif;
  --f-body: 'Noto Sans JP', sans-serif;
  --f-num: 'Inter', sans-serif;
  --bottom-nav-h: 60px;
}

/* ===== リセット・基本 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body);
  background: var(--paper);
  color: var(--text);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
}

/* ===== 画面管理 ===== */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav-h) + 8px);
  animation: fadeIn 0.2s ease;
}
.screen.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===== ヘッダー ===== */
.app-header {
  background: var(--green-deep);
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.app-logo { font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; color: var(--white); letter-spacing: 0.02em; }
.header-stats { display: flex; gap: 10px; align-items: center; }
.streak-badge, .xp-badge {
  font-family: var(--f-num);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--white);
  background: rgba(255,255,255,0.15);
  padding: 4px 10px;
  border-radius: 20px;
}

.sub-header {
  background: var(--green-deep);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.sub-header h2 { font-family: var(--f-display); font-weight: 700; color: var(--white); font-size: 1rem; }
.back-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  font-family: var(--f-body);
  transition: background 0.15s;
}
.back-btn:hover { background: rgba(255,255,255,0.15); }

/* ===== ホーム画面 ===== */
.home-main { padding: 16px; display: flex; flex-direction: column; gap: 16px; }

.capybara-greeting { display: flex; align-items: flex-end; gap: 12px; }
.capybara-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(79,122,94,0.2));
  transition: transform 0.3s ease;
}
.capybara-img:hover { transform: scale(1.05) rotate(-2deg); }
.speech-bubble {
  background: var(--white);
  border: 2px solid var(--green-light);
  border-radius: 16px 16px 16px 4px;
  padding: 12px 16px;
  position: relative;
  box-shadow: var(--shadow-sm);
  flex: 1;
}
.speech-bubble::before {
  content: '';
  position: absolute;
  left: -10px;
  bottom: 10px;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-right-color: var(--green-light);
}
.speech-bubble p { font-size: 0.9rem; line-height: 1.6; color: var(--text); font-weight: 500; }

.today-card {
  background: linear-gradient(135deg, var(--green-main), var(--green-deep));
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-md);
}
.today-label { font-size: 0.75rem; color: rgba(255,255,255,0.8); font-weight: 500; margin-bottom: 8px; letter-spacing: 0.05em; }
.today-stats { display: flex; align-items: center; gap: 16px; }
.today-stat { display: flex; align-items: baseline; gap: 4px; }
.today-num { font-family: var(--f-num); font-size: 2rem; font-weight: 700; color: var(--white); }
.today-unit { font-size: 0.8rem; color: rgba(255,255,255,0.85); }
.today-divider { width: 1px; height: 32px; background: rgba(255,255,255,0.3); }

.home-nav { display: flex; flex-direction: column; gap: 10px; }
.nav-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 2px solid var(--green-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.nav-card:active { transform: scale(0.98); }
.nav-card:hover { border-color: var(--green-main); box-shadow: var(--shadow-md); }
.nav-card--accent {
  background: linear-gradient(135deg, var(--warm), #C8834A);
  border-color: transparent;
}
.nav-card--accent .nav-label { color: var(--white); }
.nav-card--accent .nav-arrow { color: rgba(255,255,255,0.7); }
.nav-icon { font-size: 1.4rem; flex-shrink: 0; }
.nav-label { font-family: var(--f-display); font-weight: 700; font-size: 0.95rem; color: var(--text); flex: 1; }
.nav-arrow { color: var(--text-mute); font-size: 1.2rem; }
.nav-badge {
  background: var(--red);
  color: var(--white);
  font-family: var(--f-num);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}
.nav-badge:empty { display: none; }

/* ===== 教材選択画面 ===== */
.learn-main { padding: 16px; }
.deck-list { display: flex; flex-direction: column; gap: 12px; }
.deck-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 2px solid var(--green-light);
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
}
.deck-card:hover { border-color: var(--green-main); box-shadow: var(--shadow-md); }
.deck-icon { font-size: 1.8rem; flex-shrink: 0; }
.deck-info { flex: 1; }
.deck-name { font-family: var(--f-display); font-weight: 700; font-size: 0.95rem; color: var(--text); margin-bottom: 4px; }
.deck-meta { font-size: 0.78rem; color: var(--text-mute); }
.deck-progress-wrap { margin-top: 6px; }
.deck-progress-bar-bg { height: 5px; background: var(--green-soft); border-radius: 3px; overflow: hidden; }
.deck-progress-bar-fill { height: 100%; background: var(--green-main); border-radius: 3px; transition: width 0.4s ease; }
.deck-arrow { color: var(--text-mute); font-size: 1.2rem; }

/* ===== 単元一覧画面 ===== */
.units-main { padding: 16px; }
.units-header-card {
  background: var(--green-soft);
  border: 2px solid var(--green-light);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.units-total { font-size: 0.85rem; color: var(--text-mute); }
.btn-all-start {
  background: var(--green-main);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-all-start:hover { background: var(--green-deep); }

.unit-list { display: flex; flex-direction: column; gap: 8px; }
.unit-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  border: 2px solid var(--green-light);
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}
.unit-card:hover { border-color: var(--green-main); }
.unit-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.unit-name { font-family: var(--f-display); font-weight: 700; font-size: 0.88rem; color: var(--text); flex: 1; }
.unit-count { font-family: var(--f-num); font-size: 0.78rem; color: var(--text-mute); white-space: nowrap; }
.unit-rate { font-family: var(--f-num); font-size: 0.78rem; font-weight: 600; color: var(--green-deep); }
.unit-bar-bg { height: 4px; background: var(--green-soft); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.unit-bar-fill { height: 100%; background: var(--green-main); border-radius: 2px; transition: width 0.4s; }

/* ===== クイズ画面 ===== */
.quiz-header {
  background: var(--green-deep);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.quiz-exit-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  flex-shrink: 0;
}
.quiz-progress-wrap { flex: 1; display: flex; align-items: center; gap: 8px; }
.quiz-progress-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.2); border-radius: 3px; overflow: hidden; }
.quiz-progress-fill { height: 100%; background: var(--warm); border-radius: 3px; transition: width 0.3s ease; }
.quiz-progress-text { font-family: var(--f-num); font-size: 0.8rem; color: rgba(255,255,255,0.85); white-space: nowrap; flex-shrink: 0; }
.quiz-streak-mini { font-family: var(--f-num); font-size: 0.82rem; font-weight: 700; color: rgba(255,255,255,0.9); flex-shrink: 0; }

.quiz-main { padding: 16px; display: flex; flex-direction: column; gap: 14px; min-height: calc(100vh - 60px - var(--bottom-nav-h)); }

.question-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--green-light);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.question-meta { display: flex; justify-content: space-between; align-items: center; }
.question-unit { font-size: 0.72rem; color: var(--text-mute); background: var(--green-soft); padding: 2px 8px; border-radius: 20px; }
.question-num { font-family: var(--f-num); font-size: 0.72rem; color: var(--text-light); }
.question-text { font-size: 1rem; line-height: 1.75; font-weight: 500; white-space: pre-wrap; word-break: break-word; }

.choices-grid { display: flex; flex-direction: column; gap: 10px; }
.choice-btn {
  background: var(--white);
  border: 2px solid var(--green-light);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  font-family: var(--f-body);
  font-size: 0.93rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.12s;
  box-shadow: var(--shadow-sm);
  line-height: 1.5;
}
.choice-btn:hover:not(:disabled) { border-color: var(--green-main); background: var(--green-soft); }
.choice-btn:active:not(:disabled) { transform: scale(0.98); }
.choice-label {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-num);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--green-deep);
  flex-shrink: 0;
}
.choice-btn.correct {
  background: #E8F5EC;
  border-color: #5AA86E;
  animation: correctPop 0.3s ease;
}
.choice-btn.correct .choice-label { background: #5AA86E; color: var(--white); }
.choice-btn.wrong { background: var(--red-light); border-color: var(--red); }
.choice-btn.wrong .choice-label { background: var(--red); color: var(--white); }
.choice-btn.missed { border-color: #5AA86E; border-style: dashed; }
.choice-btn:disabled { cursor: default; }
@keyframes correctPop {
  0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); }
}

.explanation-panel {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  border: 2px solid var(--green-light);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.exp-header { display: flex; align-items: center; gap: 8px; }
.exp-icon { font-size: 1.3rem; }
.exp-title { font-family: var(--f-display); font-weight: 700; font-size: 1rem; }
.exp-title.correct-title { color: #5AA86E; }
.exp-title.wrong-title { color: var(--red); }
.exp-text { font-size: 0.88rem; line-height: 1.7; color: var(--text); white-space: pre-wrap; }
.btn-next {
  background: var(--green-main);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  align-self: stretch;
  transition: background 0.15s;
  margin-top: 4px;
}
.btn-next:hover { background: var(--green-deep); }

/* ===== インターバル ===== */
.interval-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44,58,46,0.65);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}
.interval-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  max-width: 360px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-lg);
}
.interval-capybara { width: 100px; height: 100px; object-fit: contain; }
.interval-speech {
  background: var(--green-soft);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  text-align: center;
  width: 100%;
}
.interval-speech p { font-family: var(--f-display); font-size: 0.92rem; line-height: 1.6; color: var(--text); }
.interval-stats { display: flex; gap: 20px; }
.istat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.istat-num { font-family: var(--f-num); font-size: 1.8rem; font-weight: 700; color: var(--green-deep); }
.istat-label { font-size: 0.72rem; color: var(--text-mute); }
.btn-interval-next {
  background: var(--green-main);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 32px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  width: 100%;
  transition: background 0.15s;
}
.btn-interval-next:hover { background: var(--green-deep); }

/* ===== 結果画面 ===== */
.result-main {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-height: calc(100vh - var(--bottom-nav-h));
}
.result-capybara-wrap { position: relative; width: 130px; height: 130px; }
.result-video, .result-capybara { width: 130px; height: 130px; object-fit: contain; }
.result-speech {
  background: var(--white);
  border: 2px solid var(--green-light);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  text-align: center;
  max-width: 320px;
  width: 100%;
}
.result-speech p { font-family: var(--f-display); font-weight: 500; font-size: 0.95rem; color: var(--text); line-height: 1.6; }
.result-score-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 320px;
  border: 2px solid var(--green-light);
}
.result-score-big { display: flex; align-items: baseline; gap: 4px; }
.result-score-big span:first-child { font-family: var(--f-num); font-size: 3rem; font-weight: 700; color: var(--green-deep); }
.result-score-sep { font-family: var(--f-num); font-size: 1.5rem; color: var(--text-mute); }
.result-score-big span:nth-child(3) { font-family: var(--f-num); font-size: 1.8rem; color: var(--text-mute); }
.result-score-unit { font-size: 0.85rem; color: var(--text-mute); }
.result-rate-circle { position: relative; width: 70px; height: 70px; }
.result-rate-circle svg { width: 70px; height: 70px; }
.result-rate-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--f-num);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--green-deep);
}
.result-xp-gain {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--warm);
  background: var(--warm-light);
  padding: 8px 20px;
  border-radius: var(--radius-md);
}
.result-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 320px; }
.btn-result-review, .btn-result-retry, .btn-result-home {
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-result-review { background: var(--red-light); color: var(--red); border: 2px solid var(--red); }
.btn-result-retry { background: var(--green-soft); color: var(--green-deep); border: 2px solid var(--green-light); }
.btn-result-home { background: var(--green-main); color: var(--white); }
.btn-result-home:hover { background: var(--green-deep); }

/* ===== 復習画面 ===== */
.review-main { padding: 16px; }
.review-tabs { display: flex; gap: 0; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 16px; border: 2px solid var(--green-light); }
.review-tab {
  flex: 1;
  padding: 10px 4px;
  border: none;
  background: var(--white);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-mute);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.review-tab.active { background: var(--green-main); color: var(--white); }
.tab-badge {
  background: var(--red);
  color: var(--white);
  font-family: var(--f-num);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.review-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  text-align: center;
}
.review-empty img { width: 90px; opacity: 0.9; }
.review-empty p { font-family: var(--f-display); font-size: 0.92rem; color: var(--text-mute); }
.review-item {
  background: var(--white);
  border: 2px solid var(--green-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.review-item:hover { border-color: var(--green-main); }
.review-item-info { flex: 1; }
.review-item-unit { font-size: 0.72rem; color: var(--text-mute); margin-bottom: 3px; }
.review-item-q { font-size: 0.85rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.review-item-badge { font-family: var(--f-num); font-size: 0.72rem; color: var(--text-light); white-space: nowrap; }
.review-start-all {
  background: var(--green-main);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  width: 100%;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  margin-bottom: 14px;
  transition: background 0.15s;
}
.review-start-all:hover { background: var(--green-deep); }

/* ===== 成績画面 ===== */
.stats-main { padding: 16px; display: flex; flex-direction: column; gap: 20px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.stat-card {
  background: var(--white);
  border: 2px solid var(--green-light);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.stat-icon { font-size: 1.3rem; }
.stat-value { font-family: var(--f-num); font-size: 1.3rem; font-weight: 700; color: var(--green-deep); }
.stat-label { font-size: 0.68rem; color: var(--text-mute); }
.chart-section { background: var(--white); border-radius: var(--radius-md); padding: 16px; border: 2px solid var(--green-light); box-shadow: var(--shadow-sm); }
.chart-title { font-family: var(--f-display); font-weight: 700; font-size: 0.88rem; color: var(--text); margin-bottom: 12px; }
.chart-wrap { position: relative; }
.weak-section { background: var(--white); border-radius: var(--radius-md); padding: 16px; border: 2px solid var(--green-light); box-shadow: var(--shadow-sm); }
.weak-title { font-family: var(--f-display); font-weight: 700; font-size: 0.88rem; color: var(--text); margin-bottom: 12px; }
.weak-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--green-soft); }
.weak-item:last-child { border-bottom: none; }
.weak-rank { font-family: var(--f-num); font-weight: 700; font-size: 0.8rem; color: var(--text-mute); width: 20px; }
.weak-name { font-size: 0.85rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weak-rate { font-family: var(--f-num); font-size: 0.85rem; font-weight: 700; color: var(--red); }
.weak-bar-bg { height: 4px; background: var(--green-soft); border-radius: 2px; overflow: hidden; margin-top: 4px; width: 100%; }
.weak-bar-fill { height: 100%; background: var(--red); border-radius: 2px; }

/* ===== 設定画面 ===== */
.settings-main { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.settings-section {
  background: var(--white);
  border: 2px solid var(--green-light);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.settings-section h3 { font-family: var(--f-display); font-weight: 700; font-size: 0.88rem; color: var(--text); margin-bottom: 12px; }
.settings-options { display: flex; gap: 8px; flex-wrap: wrap; }
.settings-opt {
  background: var(--green-soft);
  border: 2px solid var(--green-light);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s;
}
.settings-opt.active { background: var(--green-main); border-color: var(--green-main); color: var(--white); }
.btn-danger {
  background: var(--red-light);
  color: var(--red);
  border: 2px solid var(--red);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-danger:hover { background: var(--red); color: var(--white); }
.settings-info p { font-size: 0.83rem; color: var(--text-mute); margin-bottom: 6px; }
.disclaimer { font-size: 0.75rem !important; color: var(--text-light) !important; line-height: 1.6; }
.feedback-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--green-deep);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}
.feedback-link:hover { text-decoration: underline; }

/* ===== ボトムナビ ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--bottom-nav-h);
  background: var(--white);
  border-top: 1px solid var(--green-light);
  display: flex;
  z-index: 300;
  box-shadow: 0 -2px 10px rgba(44,58,46,0.08);
}
.bnav-btn {
  flex: 1;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-mute);
  transition: color 0.15s;
  padding: 0;
}
.bnav-btn.active { color: var(--green-deep); }
.bnav-icon { font-size: 1.2rem; }
.bnav-label { font-family: var(--f-display); font-size: 0.62rem; font-weight: 700; }

/* ===== ローディング ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 999;
}
.loading-capybara { width: 80px; animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.loading-text { font-family: var(--f-display); font-size: 0.9rem; color: var(--text-mute); }

/* ===== レスポンシブ追加 ===== */
@media (max-width: 380px) {
  .question-text { font-size: 0.93rem; }
  .choice-btn { font-size: 0.88rem; padding: 12px 14px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
