body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  background: #fafafa;
  color: #333;
}

#app {
  max-width: 800px;
  margin: 40px auto;
  padding: 24px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

h1,
h2,
h3 {
  margin-top: 0;
}

button {
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid #ddd;
  padding: 8px 16px;
  font-size: 14px;
  background: #fff;
  transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
}

button:hover {
  background: #f4f4f4;
}

button:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn-primary {
  background: #22c55e;
  border-color: #16a34a;
  color: white;
}

.btn-primary:hover {
  background: #16a34a;
}

.btn-outline {
  background: white;
}

.question-card {
  border-radius: 10px;
  border: 1px solid #eee;
  padding: 12px 16px;
  margin-bottom: 12px;
  background: #fcfcfc;
}

.question-text {
  margin-bottom: 8px;
  font-weight: 600;
}

.choice-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.choice-button.selected {
  background: #22c55e;
  border-color: #16a34a;
  color: white;
}

.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}

.result-image {
  max-width: 240px;
  width: 100%;
  border-radius: 16px;
  display: block;
  margin: 16px auto;
}

.type-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.type-card {
  border-radius: 10px;
  border: 1px solid #eee;
  padding: 12px;
  background: #fcfcfc;
}

.type-card h3 {
  margin: 0 0 4px;
}

.type-card img.type-image {
  width: 100%;
  max-width: 150px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 8px;
}

.type-tag {
  font-size: 12px;
  color: #16a34a;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  color: #2563eb;
  font-size: 14px;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

/* ブラックアウト用オーバーレイ */
.overlay-block {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  color: #fff;
}

.overlay-block-message {
  background: rgba(0, 0, 0, 0.75);
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 16px;
  text-align: center;
}

/* 「次のページへ」ボタンがまだ押せない状態の見た目 */
button.btn-primary.blocked {
  background: #111827;
  border-color: #111827;
  opacity: 0.7;
}

button.btn-primary.blocked:hover {
  background: #111827;
}

/* 商品提案セクション */
.product-section {
  margin-top: 32px;
  padding: 20px;
  border: 2px solid #22c55e;
  border-radius: 12px;
  background: #f0fdf4;
}

.product-section h3 {
  margin: 0 0 16px;
  color: #16a34a;
  font-size: 18px;
  text-align: center;
}

.product-card {
  display: flex;
  gap: 16px;
  align-items: center;
}

.product-image-wrapper {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  position: relative;
}

.product-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.product-placeholder {
  display: none;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  border: 1px dashed #ccc;
  background: #f5f5f5;
  color: #999;
  font-size: 12px;
  align-items: center;
  justify-content: center;
}

.product-info {
  flex: 1;
}

.product-name {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
}

.product-ingredients {
  font-size: 14px;
  color: #555;
  margin: 0 0 12px;
}

.btn-check {
  display: inline-block;
  padding: 10px 32px;
  background: #f97316;
  color: white;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s;
}

.btn-check:hover {
  background: #ea580c;
}

.btn-check-disabled {
  background: #ccc;
  cursor: default;
}

.btn-check-disabled:hover {
  background: #ccc;
}

@media (max-width: 480px) {
  .product-card {
    flex-direction: column;
    text-align: center;
  }
}