body {
  font-family: 'Hiragino Maru Gothic ProN', 'Rounded M+ 1c', 'Meiryo', sans-serif;
  background-color: #f4fae6; /* やさしい緑系の背景 */
  color: #333;
  margin: 0;
  padding: 20px;
}

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

h1 {
  text-align: center;
  color: #4CAF50;
  font-size: 24px;
}

.instruction {
  text-align: center;
  font-size: 18px;
  margin-bottom: 20px;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.item-card {
  border: 3px solid #ddd;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background-color: #fafafa;
}

.item-card:hover {
  transform: scale(1.05);
}

.item-card.selected {
  border-color: #FF9800;
  background-color: #FFF3E0;
  box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

.item-card .emoji {
  font-size: 40px;
  margin-bottom: 10px;
}

.item-card .name {
  font-weight: bold;
  font-size: 14px;
}

.item-card .price {
  color: #E91E63;
  font-size: 18px;
  font-weight: bold;
  margin-top: 5px;
}

.action-area {
  background-color: #E3F2FD;
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 20px;
}

.hidden {
  display: none;
}

h2 {
  font-size: 20px;
  text-align: center;
  color: #1976D2;
}

.calc-box {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  font-size: 18px;
  font-weight: bold;
}

input[type="number"] {
  width: 80px;
  font-size: 20px;
  padding: 8px;
  border: 2px solid #ccc;
  border-radius: 8px;
  text-align: right;
}

.btn {
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.primary-btn {
  background-color: #FF5722;
  color: white;
}
.primary-btn:hover { background-color: #E64A19; }

.hint-btn {
  background-color: #03A9F4;
  color: white;
}
.hint-btn:hover { background-color: #0288D1; }

.reset-btn {
  background-color: #9E9E9E;
  color: white;
  display: block;
  width: 100%;
  margin-top: 20px;
}
.reset-btn:hover { background-color: #757575; }

.message {
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  min-height: 27px;
}

.message.success { color: #4CAF50; }
.message.error { color: #F44336; }

.hint-box {
  margin-top: 25px;
  background: white;
  padding: 15px;
  border-radius: 10px;
  border: 2px dashed #03A9F4;
}

.hint-box h3 {
  margin-top: 0;
  color: #03A9F4;
}

.hint-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.hint-text {
  font-size: 16px;
  color: #333;
  font-weight: bold;
  padding: 10px;
  background-color: #FFF9C4;
  border-radius: 8px;
}