:root {
  --main-blue: #3498db;
  --dark-blue: #2980b9;
  --main-green: #2ecc71;
  --accent-red: #e74c3c;
  --accent-orange: #e67e22;
  --unit-gold: #f1c40f;
  --text-dark: #333;
  --bg-color: #f4f7f6;
}

body {
  font-family: "Hiragino Maru Gothic ProN", "Meiryo", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  margin: 0;
  padding: 20px;
}

.app-container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

header {
  border-bottom: 4px solid var(--main-green);
  padding-bottom: 10px;
  margin-bottom: 25px;
}

.page-title-group { display: flex; align-items: center; }
.page-num {
  background: var(--dark-blue); color: white; font-size: 24px; font-weight: bold;
  padding: 5px 15px; border-radius: 8px 8px 0 8px; margin-right: 15px;
}
h1 { margin: 0; font-size: 24px; color: #2c3e50; }
.subtitle { margin: 10px 0 0 0; font-size: 16px; color: #7f8c8d; font-weight: bold; }

.mission-card {
  background: white; border: 2px solid #ecf0f1; border-radius: 10px;
  padding: 25px; margin-bottom: 30px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section-title {
  color: var(--dark-blue); font-size: 20px; border-bottom: 2px solid var(--main-blue);
  padding-bottom: 8px; margin-top: 0; line-height: 1.4;
}

.interactive-workspace {
  background: #f8f9fa; border-radius: 10px; padding: 20px; text-align: center;
  border: 2px dashed var(--main-blue); margin-bottom: 20px;
}
.instruction { font-weight: bold; color: var(--accent-orange); margin-top: 0; font-size: 18px;}

/* 動物選択ボタン */
.animal-selectors { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap;}
.animal-btn {
  background: #fff; border: 2px solid #bdc3c7; color: #2c3e50;
  padding: 10px 15px; font-size: 16px; font-weight: bold; border-radius: 10px;
  cursor: pointer; transition: all 0.2s; min-width: 120px;
}
.animal-btn:hover { background: #ecf0f1; border-color: var(--main-blue); }
.animal-btn.active { background: #dff9fb; border-color: var(--main-blue); color: var(--main-blue); box-shadow: 0 0 10px rgba(52, 152, 219, 0.3); }

/* ブロック表示エリア */
.block-visual-area {
  background: #fff; border: 1px solid #bdc3c7; border-radius: 10px;
  padding: 20px; min-height: 200px; display: flex; flex-direction: column; align-items: center;
}
.animal-name-display { font-size: 20px; font-weight: bold; margin-bottom: 15px; color: var(--text-dark); border-bottom: 2px solid var(--main-green); padding-bottom: 5px; }

.weight-blocks-container {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: 100%; min-height: 100px; align-items: center;
}

/* 質量ブロックのスタイリング */
.mass-block {
  display: flex; align-items: center; justify-content: center;
  font-weight: bold; border-radius: 8px; color: white;
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* 弾むようなアニメーション */
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.block-1000kg {
  width: 80px; height: 80px; background: #95a5a6; border: 2px solid #7f8c8d; font-size: 16px;
}

.block-1t {
  width: 60px; height: 60px; background: #f39c12; border: 2px solid #d35400; font-size: 24px;
  transform: scale(1.1); /* 少し強調 */
  box-shadow: 0 0 15px rgba(243, 156, 18, 0.5);
}

.block-small {
  width: 50px; height: 50px; background: #3498db; border: 2px solid #2980b9; font-size: 14px;
}

/* ボタン類 */
.action-btn {
  border: none; padding: 12px 20px; font-size: 18px; font-weight: bold; border-radius: 25px;
  cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,0.2); transition: transform 0.1s, box-shadow 0.1s, background-color 0.3s;
}
.action-btn:active:not(:disabled) { transform: translateY(4px); box-shadow: none; }
.action-btn:disabled { background: #bdc3c7; color: #7f8c8d; cursor: not-allowed; box-shadow: none; transform: none; }
.convert-btn { background: var(--unit-gold); color: #8e44ad; }
.convert-btn:not(:disabled):hover { background: #f39c12; }

/* 共通パーツ（設問・入力欄） */
.question-box { background: #eafaf1; padding: 15px 20px; border-radius: 10px; }
.input-row { font-size: 18px; font-weight: bold; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.input-row-multi { font-size: 18px; font-weight: bold; display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap;}
input[type="text"] { font-family: inherit; font-size: 18px; text-align: center; border: 2px solid #bdc3c7; border-radius: 5px; padding: 8px; transition: all 0.3s; }
input[type="text"]:focus { border-color: var(--main-blue); outline: none; background: #eef7ff; }
.correct-input { background-color: #d4edda !important; border-color: #28a745 !important; color: #155724; font-weight: bold;}
.table-input { width: 60px; }
.large-input { width: 90px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.character-insight { background: #fff3cd; border: 2px solid #ffc107; padding: 15px; border-radius: 20px; display: inline-block; font-weight: bold; text-align: left; }

/* 単位変換エリア */
.alert-bg { background: #fdfefe; border-color: #2ecc71; }
.conversion-grid { display: flex; flex-direction: column; gap: 15px; background: #f4f7f6; padding: 20px; border-radius: 10px;}
.conv-item { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; border-bottom: 1px dashed #ccc; padding-bottom: 10px; gap: 10px;}
.conv-item:last-child { border-bottom: none; padding-bottom: 0;}
.conv-label { font-size: 18px; font-weight: bold; }
.conv-input { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: bold;}

/* ノートまとめエリア */
.notebook-section { background: #fdfefe; border: 3px dashed var(--accent-red); padding: 25px; border-radius: 15px; margin-top: 30px; }
.notebook-section h2 { margin-top: 0; color: var(--accent-red); }
.notebook-section ul { font-weight: bold; color: #2c3e50; line-height: 1.8;}