:root {
  --ink: #25211c;
  --muted: #746c61;
  --paper: #fffdfa;
  --paper-strong: #ffffff;
  --line: #e7dfd3;
  --rice: #f6efe0;
  --leaf: #4f6f52;
  --leaf-dark: #314a36;
  --gold: #c98b32;
  --clay: #9f5e4d;
  --shadow: 0 24px 70px rgba(51, 39, 25, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(120deg, rgba(255, 253, 250, 0.94), rgba(246, 239, 224, 0.86)),
    url("https://images.unsplash.com/photo-1536304993881-ff6e9eefa2a6?auto=format&fit=crop&w=1800&q=80");
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}

button {
  font: inherit;
}

.app {
  display: grid;
  width: min(980px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 42px 0;
  align-content: center;
}

.hero {
  max-width: 760px;
  padding: 0 0 26px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 5.6rem);
  line-height: 0.95;
}

.lead {
  max-width: 650px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.85;
}

.diagnosis-form,
.result {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(231, 223, 211, 0.9);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.94);
  box-shadow: var(--shadow);
}

.diagnosis-form::before,
.result::before {
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--leaf), var(--gold), var(--clay));
  content: "";
}

.diagnosis-form {
  display: grid;
  gap: 28px;
  padding: 34px;
}

.progress {
  display: grid;
  gap: 10px;
}

.question-count {
  margin: 0;
  color: var(--leaf-dark);
  font-size: 0.92rem;
  font-weight: 800;
}

.progress-track {
  width: 100%;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e0d2;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--leaf), var(--gold));
  transition: width 0.28s ease;
}

.question-panel {
  display: grid;
  gap: 20px;
}

.question-panel h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1.7rem, 5vw, 3rem);
  line-height: 1.22;
}

.options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.option-button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 104px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper-strong);
  box-shadow: 0 10px 24px rgba(51, 39, 25, 0.06);
  text-align: left;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.55;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.option-button:hover,
.option-button.selected {
  border-color: var(--leaf);
  box-shadow: 0 16px 32px rgba(51, 39, 25, 0.14);
  transform: translateY(-2px);
}

.form-actions {
  display: flex;
  justify-content: flex-start;
}

.secondary-button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #cfc2af;
  border-radius: 8px;
  color: var(--leaf-dark);
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
}

.secondary-button:hover {
  border-color: var(--leaf);
  background: #f6faf1;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.share-button,
.result .secondary-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
}

.share-button {
  border: 1px solid var(--ink);
  color: #ffffff;
  background: var(--ink);
}

.share-button:hover {
  background: #000000;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.result {
  margin-top: 24px;
  padding: 34px;
}

.result h2 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  line-height: 1.2;
}

.brand {
  color: var(--leaf-dark);
}

.result .eyebrow {
  color: var(--gold);
}

.score {
  display: inline-flex;
  margin: 18px 0 0;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--leaf-dark);
  background: #eef5e8;
  font-size: 0.92rem;
  font-weight: 800;
}

.reason {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.85;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tag {
  padding: 7px 11px;
  border: 1px solid #ded4c5;
  border-radius: 999px;
  color: var(--ink);
  background: #fff8ec;
  font-size: 0.88rem;
  font-weight: 800;
}

.dish-section {
  margin-top: 28px;
}

.dish-section h3 {
  margin: 0 0 12px;
  color: var(--leaf-dark);
  font-size: 1rem;
}

.dish-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dish-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #fff8ec);
}

.dish-visual {
  display: block;
  width: 82px;
  height: 82px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(51, 39, 25, 0.1);
}

.dish-name {
  margin: 0;
  color: var(--clay);
  font-size: 1.08rem;
  font-weight: 800;
}

.dish-reason {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.selected-answers {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.selected-answers h3 {
  margin: 0 0 12px;
  color: var(--leaf-dark);
  font-size: 1rem;
}

.selected-answers ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.selected-answers li {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  font-size: 0.92rem;
  font-weight: 700;
}

.hidden {
  display: none;
}

@media (max-width: 760px) {
  .app {
    align-content: start;
    width: min(100% - 24px, 980px);
    padding: 26px 0;
  }

  .hero {
    padding-bottom: 20px;
  }

  .diagnosis-form,
  .result {
    padding: 22px;
  }

  .options {
    grid-template-columns: 1fr;
  }

  .option-button {
    min-height: 72px;
  }

  .dish-list {
    grid-template-columns: 1fr;
  }

  .dish-card {
    grid-template-columns: 70px 1fr;
  }

  .dish-visual {
    width: 66px;
    height: 66px;
    transform: scale(0.86);
    transform-origin: left center;
  }

  .secondary-button {
    width: 100%;
  }

  .share-button {
    width: 100%;
  }
}
