:root {
  --waseda-red: #9e1b32;
  --waseda-red-dark: #7a1526;
  --waseda-red-light: #ffe3e8;
  --accent-yellow: #ffcb3c;
  --bg: #fff8ef;
  --card-bg: #ffffff;
  --text-main: #3a2a2a;
  --text-sub: #8a7a7a;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(158, 27, 50, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at top left, #fff2e0, var(--bg) 60%);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.app {
  width: 100%;
  max-width: 480px;
}

.screen {
  display: none;
}
.screen.active {
  display: block;
  animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
  text-align: center;
  border: 3px solid var(--waseda-red);
}

.emoji-badge {
  font-size: 48px;
  margin-bottom: 8px;
}

.score-badge {
  width: 88px;
  height: 88px;
  margin: 0 auto 10px;
}
.score-badge svg {
  width: 100%;
  height: 100%;
  display: block;
}

h1 {
  font-size: 26px;
  color: var(--waseda-red);
  margin: 4px 0 8px;
}

h2 {
  font-size: 20px;
  margin: 8px 0;
}

.subtitle {
  font-weight: bold;
  color: var(--waseda-red-dark);
  margin: 0 0 16px;
}

.desc {
  color: var(--text-sub);
  line-height: 1.7;
  font-size: 14px;
  margin-bottom: 24px;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px) scale(1.02);
}
.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  background: var(--waseda-red);
  color: #fff;
  box-shadow: 0 6px 0 var(--waseda-red-dark);
}
.btn-primary:active {
  box-shadow: 0 2px 0 var(--waseda-red-dark);
}

.btn-secondary {
  margin-top: 16px;
  background: var(--accent-yellow);
  color: var(--text-main);
  box-shadow: 0 6px 0 #c99a1e;
}
.btn-secondary:active {
  box-shadow: 0 2px 0 #c99a1e;
}

.hidden {
  display: none !important;
}

/* 進捗バー */
.progress-wrap {
  margin-bottom: 20px;
}
.progress-bar {
  background: var(--waseda-red-light);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.progress-fill {
  background: linear-gradient(90deg, var(--waseda-red), var(--accent-yellow));
  height: 100%;
  width: 10%;
  transition: width 0.35s ease;
}
.progress-label {
  font-size: 13px;
  color: var(--text-sub);
  margin: 6px 0 0;
  font-weight: bold;
}

.question-text {
  font-size: 18px;
  line-height: 1.6;
  min-height: 70px;
  margin: 8px 0 20px;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.choice-btn {
  padding: 14px 16px;
  border-radius: 14px;
  border: 2px solid #eeddc8;
  background: #fffaf2;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}
.choice-btn:hover {
  border-color: var(--waseda-red);
  background: var(--waseda-red-light);
}
.choice-btn.correct {
  background: #e5f7e0;
  border-color: #4caf50;
  font-weight: bold;
}
.choice-btn.wrong {
  background: #fde3e3;
  border-color: #e04b4b;
  font-weight: bold;
}
.choice-btn[disabled] {
  cursor: default;
}

.feedback {
  min-height: 44px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  margin: 8px 0 16px;
}

/* 結果画面 */
.result-label {
  font-weight: bold;
  color: var(--text-sub);
  margin: 0;
}
.result-score {
  font-size: 56px;
  font-weight: 900;
  color: var(--waseda-red);
  margin: 4px 0 0;
}
#result-title {
  color: var(--waseda-red-dark);
}

.review-list {
  text-align: left;
  margin: 20px 0;
  max-height: 220px;
  overflow-y: auto;
  border-top: 2px dashed #f0ddc8;
  padding-top: 12px;
}
.review-item {
  font-size: 13px;
  line-height: 1.6;
  padding: 8px 0;
  border-bottom: 1px dashed #f0ddc8;
}
.review-q {
  margin: 0;
}
.review-item .mark {
  font-weight: bold;
  margin-right: 4px;
}
.review-item.ok .mark { color: #4caf50; }
.review-item.ng .mark { color: #e04b4b; }
.review-exp {
  margin: 4px 0 0 20px;
  color: var(--text-sub);
  font-size: 12px;
  line-height: 1.6;
}

.share-box {
  background: var(--waseda-red-light);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 8px;
}
.share-heading {
  font-weight: bold;
  color: var(--waseda-red-dark);
  margin: 0 0 10px;
  font-size: 14px;
}
.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-share {
  box-shadow: none;
  font-size: 14px;
  padding: 12px;
}
.btn-x {
  background: #000;
  color: #fff;
}
.btn-line {
  background: #06c755;
  color: #fff;
}
.btn-copy {
  background: #fff;
  color: var(--waseda-red-dark);
  border: 2px solid var(--waseda-red);
}
