/* 元気でんき ブランドトークン（genki-design skill 準拠・実測値） */
:root {
  --genki-orange: #EB6600;
  --genki-yellow: #FFCB00;
  --charcoal: #333333;
  --warm-gray: #F4F4F1;
  --gray-text: #666666;
  --line: #CCCCCC;
  --line-light: #EDEDED;
  --panel-orange: #FBE0CC;
  --error-bg: #FFE2CF;
  --link: #1183C0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Noto Sans JP", "Noto Sans Japanese", "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, Verdana, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--charcoal);
  background: var(--warm-gray);
}

.num, .roboto { font-family: "Roboto", sans-serif; }

/* ヘッダー */
.site-header {
  background: #fff;
  border-bottom: 3px solid var(--genki-orange);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo { color: var(--genki-orange); display: inline-flex; }
.brand-logo svg { width: 130px; height: auto; display: block; }
.site-header .app-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--charcoal);
  border-left: 1px solid var(--line);
  padding-left: 14px;
}

.container { max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; }
.container.wide { max-width: 1000px; }

h1 { font-size: 22px; font-weight: 900; margin: 0 0 4px; }
h2 { font-size: 18px; font-weight: 700; }
.sub { color: var(--gray-text); font-size: 13px; }

/* カード（白パネル） */
.panel {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(51, 51, 51, 0.06);
}

/* ボタン（角丸40px＝本家の丸型ラベル準拠） */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 40px;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  background: var(--genki-orange);
  color: #fff;
  transition: transform 0.12s, opacity 0.12s;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:disabled { background: var(--line); cursor: not-allowed; transform: none; }
.btn.ghost { background: #fff; color: var(--genki-orange); border: 2px solid var(--genki-orange); }
.btn.dark { background: var(--charcoal); }
.btn.small { padding: 7px 18px; font-size: 13px; }

/* フォーム（本家実測: 2px枠・角丸5px） */
input[type="text"], input[type="password"], textarea, select {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 5px;
  padding: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--charcoal);
  background: #fff;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--genki-orange); border-color: var(--genki-orange); }
label.field { display: block; font-weight: 700; margin: 14px 0 4px; }
label.field .req { color: var(--genki-orange); font-size: 12px; margin-left: 6px; }

/* ステータスバッジ */
.badge {
  display: inline-block;
  border-radius: 20px;
  padding: 2px 12px;
  font-size: 12px;
  font-weight: 700;
}
.badge.published { background: var(--genki-orange); color: #fff; }
.badge.draft { background: var(--line-light); color: var(--gray-text); }
.badge.closed { background: var(--charcoal); color: #fff; }

/* 選択肢カード（4択・ゲーム風） */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
@media (max-width: 560px) { .choice-grid { grid-template-columns: 1fr; } }

.choice-card {
  position: relative;
  border: 3px solid var(--line-light);
  border-radius: 16px;
  background: #fff;
  padding: 18px 16px 18px 58px;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--charcoal);
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
  min-height: 68px;
}
.choice-card:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: var(--genki-orange);
  box-shadow: 0 6px 14px rgba(235, 102, 0, 0.18);
}
.choice-card:disabled { cursor: default; }
.choice-card .letter {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--warm-gray);
  color: var(--genki-orange);
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.choice-card.correct {
  border-color: var(--genki-orange);
  background: var(--panel-orange);
  animation: pop 0.35s;
}
.choice-card.correct .letter { background: var(--genki-orange); color: #fff; }
.choice-card.wrong {
  border-color: var(--line);
  background: var(--line-light);
  opacity: 0.75;
}
.choice-card.faded { opacity: 0.45; }

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* 稲妻（本家の hurueru アニメーション準拠の微振動） */
.thunder { color: var(--genki-orange); display: inline-flex; }
.thunder svg { width: 22px; height: auto; }
.thunder.big svg { width: 44px; }
.thunder.shake { animation: hurueru 0.35s infinite; }
@keyframes hurueru {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(1px, -1px) rotate(1.5deg); }
  50% { transform: translate(0, 1px) rotate(0deg); }
  75% { transform: translate(-1px, -1px) rotate(-1.5deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* 正誤フィードバック */
.feedback { border-radius: 16px; padding: 16px 20px; margin-top: 16px; }
.feedback.ok { background: var(--panel-orange); border: 3px solid var(--genki-orange); }
.feedback.ng { background: var(--line-light); border: 3px solid var(--line); }
.feedback .verdict { font-size: 18px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.feedback.ok .verdict { color: var(--genki-orange); }
.feedback .explanation { margin-top: 6px; }

/* 進捗バー */
.progress-track { height: 10px; border-radius: 20px; background: var(--line-light); overflow: hidden; margin: 10px 0 4px; }
.progress-fill { height: 100%; border-radius: 20px; background: var(--genki-orange); transition: width 0.3s; }
.progress-label { font-size: 12px; color: var(--gray-text); }

/* メディア表示 */
.media-box { margin: 12px 0; text-align: center; }
.media-box img, .media-box video { max-width: 100%; max-height: 420px; border-radius: 16px; }

/* 結果画面のスコア */
.score-circle {
  width: 160px;
  height: 160px;
  margin: 12px auto;
  border-radius: 50%;
  border: 6px solid var(--genki-orange);
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-circle .big { font-family: "Roboto", sans-serif; font-size: 44px; font-weight: 700; color: var(--genki-orange); line-height: 1.1; }
.score-circle .of { font-size: 13px; color: var(--gray-text); }

/* 一覧アイテム */
.survey-item { display: flex; align-items: center; gap: 14px; padding: 16px 4px; border-bottom: 1px solid var(--line-light); }
.survey-item:last-child { border-bottom: none; }
.survey-item .info { flex: 1; min-width: 0; }
.survey-item .title { font-weight: 700; font-size: 15px; }
.survey-item .meta { font-size: 12px; color: var(--gray-text); }

/* 表（本家準拠: 下線のみ・縦罫線なし） */
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #808080; font-size: 13px; }
table.list th { font-weight: 700; }

/* 正答率バー */
.rate-track { height: 14px; background: var(--line-light); border-radius: 20px; overflow: hidden; }
.rate-fill { height: 100%; background: var(--genki-orange); border-radius: 20px; }

.error-msg { background: var(--error-bg); border-radius: 5px; padding: 10px 14px; color: var(--charcoal); font-weight: 700; margin: 10px 0; }
.center { text-align: center; }
.mt { margin-top: 16px; }
a { color: var(--link); }

footer.site-footer {
  background: var(--charcoal);
  color: #fff;
  text-align: center;
  font-size: 12px;
  padding: 20px;
  margin-top: 40px;
}
