* {
  box-sizing: border-box;
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

body {
  background-color: #f0fdf4;
  color: #333;
  padding: 20px;
  margin: 0;
  display: flex;
  justify-content: center;
}

.app-container {
  background: white;
  max-width: 800px;
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  padding: 30px;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

h1 {
  color: #047857;
  font-size: 28px;
  margin-bottom: 5px;
}

.subtitle {
  color: #059669;
  font-weight: bold;
}

.mission-card {
  background: #fffbeb;
  border: 3px solid #fde68a;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 30px;
}

.name-card {
  background: #ecfdf5;
  border-color: #10b981;
  text-align: center;
}

.name-card h2 { color: #047857; }

.name-input {
  max-width: 400px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  border: 2px solid #10b981;
  margin: 0 auto;
  display: block;
}

.reflection-card {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.mission-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.badge {
  background-color: #f59e0b;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 14px;
}

h2 {
  margin: 0;
  color: #b45309;
  font-size: 22px;
}

.instruction {
  font-size: 16px;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.7);
  padding: 10px;
  border-radius: 8px;
}

/* クイズボタン */
.quiz-item {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px dashed #fcd34d;
}
.quiz-item:last-child { border-bottom: none; }

.quiz-q {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

.btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tool-btn {
  flex: 1;
  min-width: 140px;
  padding: 12px 10px;
  font-size: 16px;
  font-weight: bold;
  background: white;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: #4b5563;
}

.tool-btn:hover { background: #f3f4f6; }
.tool-btn.active-correct {
  background: #dcfce7;
  border-color: #10b981;
  color: #047857;
  box-shadow: 0 4px 0 #10b981;
}
.tool-btn.active-wrong {
  background: #fee2e2;
  border-color: #ef4444;
  color: #b91c1c;
}

.feedback {
  margin-top: 10px;
  font-weight: bold;
  font-size: 15px;
  padding: 10px;
  border-radius: 8px;
}
.fb-success { background: #dcfce7; color: #047857; }
.fb-error { background: #fee2e2; color: #b91c1c; }

/* テーブル */
.table-container { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
  background: white;
}
th, td {
  border: 2px solid #fde68a;
  padding: 10px;
  text-align: center;
}
th { background: #fef3c7; color: #b45309; }

.input-text, .input-select {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 16px;
}
.input-text:focus { outline: 2px solid #f59e0b; }

.action-btn {
  background: #f59e0b;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
}

.reflection-box {
  width: 100%;
  padding: 15px;
  border: 2px solid #93c5fd;
  border-radius: 8px;
  font-size: 18px;
  margin-bottom: 15px;
  resize: vertical;
}

.submit-area { text-align: center; margin-top: 20px; }
.submit-btn {
  width: 100%;
  max-width: 400px;
  background: #3b82f6;
  color: white;
  border: none;
  padding: 15px;
  font-size: 22px;
  font-weight: bold;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 0 #2563eb;
  transition: background 0.3s;
}
.submit-btn:active { transform: translateY(4px); box-shadow: none; }

.hidden { display: none; }