* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

body {
  width: 100%;
  min-height: 100vh;
  font-family:
    'Noto Sans JP', 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  background: linear-gradient(135deg, #0f6e56 0%, #1d9e75 60%, #5dcaa5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.app {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  background-color: #fff;
  border-radius: 20px;
  padding: 36px 28px;
  width: 100%;
  max-width: 360px;
  min-height: 580px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(15, 110, 86, 0.18);
}

.title {
  font-size: 28px;
  font-weight: 700;
  color: #085041;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.subtitle {
  font-size: 13px;
  color: #1d9e75;
  font-weight: 500;
  margin-bottom: 36px;
  letter-spacing: 0.06em;
}

/* レベル選択 */
.level-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.level-btn {
  border: none;
  border-radius: 14px;
  padding: 22px 12px;
  cursor: pointer;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    background-color 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.level-btn:active {
  transform: scale(0.96);
}

.level-btn.beginner {
  background-color: #e1f5ee;
  color: #085041;
}

.level-btn.beginner:hover {
  background-color: #9fe1cb;
  box-shadow: 0 4px 14px rgba(29, 158, 117, 0.25);
}

.level-btn.advanced {
  background-color: #085041;
  color: #e1f5ee;
}

.level-btn.advanced:hover {
  background-color: #0f6e56;
  box-shadow: 0 4px 14px rgba(8, 80, 65, 0.35);
}

.level-icon {
  font-size: 32px;
}

.level-label {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.level-desc {
  font-size: 12px;
  opacity: 0.75;
  letter-spacing: 0.03em;
}

/* バッジ */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

.badge-beginner {
  background-color: #e1f5ee;
  color: #0f6e56;
}

.badge-advanced {
  background-color: #085041;
  color: #9fe1cb;
}

/* フラッシュ表示エリア */
.flash-box {
  background: linear-gradient(135deg, #085041, #1d9e75);
  border-radius: 18px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.flash-num {
  font-size: 72px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

/* 答えブロック */
.answer-block {
  background-color: #e1f5ee;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
  text-align: left;
}

.answer-eq {
  font-size: 14px;
  color: #0f6e56;
  margin-bottom: 8px;
  font-weight: 500;
}

.answer-val {
  font-size: 40px;
  font-weight: 700;
  color: #085041;
  text-align: center;
}

/* ボタン共通 */
.action-btn {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.15s,
    background-color-color 0.15s;
  font-family: inherit;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  display: block;
}

.action-btn:active {
  transform: scale(0.97);
}

.btn-reveal {
  background-color: #1d9e75;
  color: #fff;
}

.btn-reveal:hover {
  background-color: #0f6e56;
}

.btn-next {
  background-color: #085041;
  color: #fff;
}

.btn-next:hover {
  background-color: #04342c;
}

.btn-back {
  background-color: #e1f5ee;
  color: #085041;
  font-size: 14px;
  padding: 10px;
}

.btn-back:hover {
  background-color: #9fe1cb;
}

.hide {
  display: none;
}
