: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; }
#main-circular-scale { filter: drop-shadow(0px 5px 5px rgba(0,0,0,0.2)); }

/* スライダー */
input[type=range] {
  width: 80%; margin: 10px 0 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: 26px; font-weight: bold; color: var(--accent-red); margin-bottom: 20px; line-height: 1.2; }
.sub-weight-display { font-size: 18px; color: #7f8c8d; }

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

/* 入力欄と問題 */
.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; }

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; }

.hint-btn { background: #fff; border: 2px solid #f1c40f; padding: 5px 15px; border-radius: 20px; font-weight: bold; cursor: pointer; color: #d35400; margin-top: 5px;}
.hint-box { display: none; background: #fff9c4; border-radius: 5px; padding: 10px; margin-top: 10px; font-size: 15px; font-weight: bold; color: #333;}
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }

/* 練習エリア */
.practice-area { display: flex; align-items: flex-start; justify-content: space-around; flex-wrap: wrap; gap: 20px;}
.practice-item { flex: 1; min-width: 300px; background: #fdfefe; border: 1px solid #bdc3c7; border-radius: 10px; padding: 15px; text-align: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05);}
.item-name { margin: 0 0 15px 0; color: #2c3e50; border-bottom: 2px dashed #bdc3c7; padding-bottom: 5px;}
.static-scale-container { display: flex; justify-content: center; margin-bottom: 15px; }

/* 単位変換エリア */
.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: space-between; flex-wrap: wrap; border-bottom: 1px dashed #ccc; padding-bottom: 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;}