:root {
  --bg: #f3efe8;
  --panel: #fffdf8;
  --panel-strong: #f6f0e4;
  --border: #243746;
  --muted: #58636b;
  --text: #18242d;
  --accent: #c46a2c;
  --accent-soft: #efd9c5;
  --shadow: 0 18px 45px rgba(31, 43, 52, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Yu Gothic UI", "Hiragino Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(196, 106, 44, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(36, 55, 70, 0.12), transparent 32%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- Typography --- */
h1, h2, h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(1.8rem, 5vw, 3rem); line-height: 1.2; }
h2 { font-size: clamp(1.3rem, 3.5vw, 1.9rem); line-height: 1.3; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); line-height: 1.4; }

p { margin: 0; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
}

.lead {
  color: var(--muted);
  line-height: 1.8;
  font-size: 1.02rem;
}

.section-note {
  color: var(--muted);
  font-size: 0.88rem;
}

.br-md { display: none; }
@media (min-width: 600px) { .br-md { display: inline; } }

/* --- Cards / Panels --- */
.diagnosis-card,
.result-summary,
.recommendation-card,
.no-results {
  background: var(--panel);
  border: 1px solid rgba(36, 55, 70, 0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* --- LP Hero --- */
.lp-hero {
  padding: 12px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* --- Diagnosis Form --- */
.diagnosis-card {
  padding: 28px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.full-width {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
}

label span {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(36, 55, 70, 0.16);
  background: white;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2358636b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.primary-button,
.ghost-button {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  transition: opacity 0.15s, transform 0.1s;
}

.primary-button:hover, .ghost-button:hover { opacity: 0.82; }
.primary-button:active, .ghost-button:active { transform: scale(0.98); }

.primary-button {
  display: block;
  width: 100%;
  padding: 15px 20px;
  background: var(--border);
  color: white;
}

.ghost-button {
  background: transparent;
  border: 1px solid rgba(36, 55, 70, 0.2);
  color: var(--text);
  padding: 10px 18px;
}

/* --- Result Page --- */
.result-page {
  gap: 20px;
}

.result-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.result-summary {
  flex: 1;
  padding: 24px 28px;
}

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

.summary-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--panel-strong);
  border: 1px solid rgba(36, 55, 70, 0.1);
  color: var(--muted);
  font-size: 0.82rem;
}

.recommendation-section {}

.recommendation-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.recommendation-card {
  padding: 22px 24px;
}

.recommendation-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.recommendation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.recommendation-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(36, 55, 70, 0.1);
  color: var(--muted);
  font-size: 0.8rem;
}

.recommendation-text {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

.recommendation-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.recommendation-footer p {
  color: var(--muted);
  font-size: 0.88rem;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--border);
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.cta-link:hover { opacity: 0.82; }

/* --- No Results --- */
.no-results {
  padding: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.no-results .primary-button {
  width: auto;
  padding: 14px 32px;
  margin-top: 8px;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .page {
    padding: 24px 16px 48px;
  }

  .diagnosis-card {
    padding: 20px;
  }

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

  .section-head {
    flex-direction: column;
    gap: 4px;
  }

  .result-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .result-summary {
    padding: 20px;
  }

  .ghost-button {
    align-self: flex-start;
  }

  .recommendation-card {
    padding: 18px;
  }

  .recommendation-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-link {
    width: 100%;
    justify-content: center;
  }

  .share-section {
    flex-direction: column;
    gap: 10px;
  }

  .share-button {
    justify-content: center;
  }
}

/* --- シェアセクション (WBS 8.3) --- */
.share-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 0 8px;
  flex-wrap: wrap;
}

.share-label {
  font-size: .85rem;
  color: var(--muted);
  margin: 0;
  white-space: nowrap;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .15s;
}

.share-button:hover { opacity: .85; }

.share-x {
  background: #000;
  color: #fff;
}

.share-line {
  background: #06c755;
  color: #fff;
}
