:root {
  --main-blue: #3498db;
  --dark-blue: #2980b9;
  --main-green: #2ecc71;
  --accent-red: #e74c3c;
  --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(--main-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;
}

/* インタラクティブエリア */
.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: #e67e22; margin-top: 0; }

.scale-container { display: flex; justify-content: center; margin-bottom: 20px; }
#circular-scale { filter: drop-shadow(0px 5px 5px rgba(0,0,0,0.2)); }

/* スライダー */
input[type=range] {
  width: 80%; margin: 20px 0; -webkit-appearance: none; background: transparent;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; height: 30px; width: 30px; border-radius: 50%;
  background: var(--accent-red); cursor: pointer; margin-top: -10px; box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
input[type=range]::-webkit-slider-runnable-track {
  width: 100%; height: 10px; cursor: pointer; background: #bdc3c7; border-radius: 5px;
}
.current-weight-display { font-size: 24px; font-weight: bold; color: var(--accent-red); margin-bottom: 20px; }

/* 吹き出し */
.character-insight {
  background: #fff3cd; border: 2px solid #ffc107; padding: 15px; border-radius: 20px;
  display: inline-block; font-weight: bold; margin-top: 15px;
}

/* 入力欄と問題 */
.question-box { background: #eafaf1; padding: 20px; border-radius: 10px; }
.input-row { font-size: 18px; font-weight: bold; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

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: 80px; }
.large-input { width: 100px; font-size: 24px; }

/* 拡大数直線 */
.zoom-number-line { background: white; border: 2px solid #e91e63; border-radius: 10px; padding: 15px; margin-bottom: 15px; position: relative;}
.hint-btn { background: #fff; border: 2px solid #f1c40f; padding: 5px 15px; border-radius: 20px; font-weight: bold; cursor: pointer; color: #d35400; margin-top: 10px;}
.hint-box { display: none; background: #fff9c4; border-radius: 5px; padding: 10px; margin-top: 10px; font-size: 14px;}

/* 練習エリア */
.practice-area { display: flex; align-items: center; justify-content: space-around; flex-wrap: wrap; }
.inline-q { flex: 1; min-width: 250px; margin-left: 20px; }

/* 注意事項エリア */
.alert-bg { background: #fdfefe; border-color: #2ecc71; }
.rules-container { display: flex; flex-direction: column; gap: 15px; }
.rule-box { display: flex; align-items: center; background: #f4f7f6; padding: 10px 20px; border-radius: 8px; }
.rule-num { background: var(--main-green); color: white; width: 30px; height: 30px; display: flex; justify-content: center; align-items: center; border-radius: 50%; font-weight: bold; margin-right: 15px; font-size: 18px;}
.rule-box p { margin: 0; font-size: 18px; }
.fill-in-blank { width: 100px; border: none; border-bottom: 2px solid #333; background: transparent; border-radius: 0; }
.small-blank { width: 50px; }
.mt-20 { margin-top: 20px; }