:root {
  --main-green: #2ecc71;
  --light-green: #eafaf1;
  --dark-gray: #333;
  --wood-color: #d4a373;
}

body {
  font-family: "Hiragino Maru Gothic ProN", "Meiryo", sans-serif;
  background-color: #f4f7f6;
  color: var(--dark-gray);
  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 {
  text-align: center;
  background-color: var(--main-green);
  color: white;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 30px;
}

h1 { margin: 0; font-size: 24px; }
.subtitle { margin: 5px 0 0 0; font-size: 16px; font-weight: bold;}

.mission-card {
  background: white;
  border: 3px dashed var(--main-green);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
}

h2 {
  color: #27ae60;
  font-size: 20px;
  border-bottom: 2px solid var(--light-green);
  padding-bottom: 5px;
}

.flex-container {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
}

.item-box {
  text-align: center;
  padding: 15px;
  border: 2px solid #ddd;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s;
  width: 40%;
}

.item-box:hover {
  transform: scale(1.05);
  border-color: var(--main-green);
  background-color: var(--light-green);
}

.emoji-large { font-size: 60px; }

.hint-btn, .action-btn {
  background: #f1c40f;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  margin: 10px 0;
  font-family: inherit;
}
.action-btn { background: #3498db; color: white; display: block; margin: 0 auto;}

.hint-box {
  display: none;
  background: #fff3cd;
  border-left: 5px solid #ffc107;
  padding: 10px;
  margin-top: 10px;
  border-radius: 5px;
}

.result-message {
  text-align: center;
  font-weight: bold;
  color: #e74c3c;
  margin-top: 15px;
  font-size: 18px;
}

/* てんびんのスタイル */
.scale-area {
  margin: 40px auto;
  width: 300px;
  position: relative;
  height: 250px;
}

.scale-beam-container {
  position: absolute;
  top: 50px;
  left: 0;
  width: 100%;
  height: 20px;
  display: flex;
  justify-content: center;
}

.scale-beam {
  width: 260px;
  height: 10px;
  background: var(--wood-color);
  position: relative;
  transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center center;
  border-radius: 5px;
  z-index: 2;
}

.scale-string {
  position: absolute;
  width: 2px;
  height: 100px;
  background: #999;
  top: 10px;
}

.scale-string.left { left: 10px; }
.scale-string.right { right: 10px; }

.cup {
  position: absolute;
  bottom: -40px;
  left: -24px;
  width: 50px;
  height: 40px;
  border: 2px solid #ccc;
  border-top: none;
  background: rgba(255,255,255,0.8);
  border-radius: 0 0 10px 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  cursor: pointer;
}

.scale-pivot {
  position: absolute;
  top: 60px;
  left: 140px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 120px solid #7f8c8d;
  z-index: 1;
}

.scale-base {
  position: absolute;
  top: 180px;
  left: 100px;
  width: 100px;
  height: 15px;
  background: #7f8c8d;
  border-radius: 5px;
}

/* アイテムトレイ */
.items-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
  background: #eee;
  padding: 15px;
  border-radius: 10px;
}

.drag-item {
  background: white;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.1s;
}

.drag-item:active { transform: scale(0.9); }
.drag-item.hidden { display: none; }

.instruction { text-align: center; color: #666; font-size: 14px; }

.reflection-area {
  background: var(--light-green);
  padding: 20px;
  border-radius: 10px;
  margin-top: 20px;
}

textarea {
  width: 100%;
  height: 80px;
  border: 2px solid var(--main-green);
  border-radius: 5px;
  padding: 10px;
  font-size: 16px;
  box-sizing: border-box;
  resize: vertical;
  font-family: inherit;
}

.summary-box {
  background: white;
  padding: 15px;
  border-radius: 5px;
  border-left: 5px solid var(--main-green);
  font-size: 18px;
}

.fill-in-blank {
  width: 100px;
  font-size: 18px;
  border: none;
  border-bottom: 2px solid #333;
  text-align: center;
  outline: none;
  font-family: inherit;
}