:root {
  --bg: #f8f6ef;
  --ink: #23211c;
  --muted: #6a6257;
  --line: #ddd2c1;
  --panel: #fffdf8;
  --accent: #c63f4a;
  --accent-dark: #9f2533;
  --gold: #d59e35;
  --mint: #27756d;
  --shadow: 0 22px 55px rgba(83, 55, 35, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Noto Sans JP", system-ui, sans-serif;
  background:
    linear-gradient(135deg, rgba(198, 63, 74, 0.13), transparent 34%),
    linear-gradient(315deg, rgba(39, 117, 109, 0.12), transparent 36%),
    var(--bg);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 28px;
  align-items: stretch;
}

.hero-copy,
.diagnosis-form,
.result-panel {
  border: 1px solid rgba(221, 210, 193, 0.88);
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hero-copy {
  min-height: 360px;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 8px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--mint);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 10em;
  margin: 0;
  font-size: clamp(2.45rem, 8vw, 5rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.lead {
  max-width: 42rem;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.9;
}

.top-hero,
.diagnosis-list,
.footer-diagnosis-guide {
  border: 1px solid rgba(221, 210, 193, 0.88);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.top-hero {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px;
}

.top-hero h1 {
  max-width: none;
}

.diagnosis-list,
.footer-diagnosis-guide {
  margin-top: 28px;
  padding: 30px;
}

.diagnosis-list h2,
.footer-diagnosis-guide h2 {
  margin: 0 0 18px;
  font-size: 1.35rem;
}

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

.diagnosis-card {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.diagnosis-card:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.86);
  transform: translateY(-2px);
}

.diagnosis-card-title {
  color: var(--accent-dark);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.45;
}

.diagnosis-card-text {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.guide-list {
  display: grid;
  gap: 14px;
}

.guide-item {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.guide-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.guide-item h3 {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 1rem;
}

.guide-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.diagnosis-form {
  padding: 30px;
  align-self: end;
  border-radius: 8px;
}

.diagnosis-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 15px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(198, 63, 74, 0.14);
}

button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

a {
  color: inherit;
}

.site-header,
.site-footer {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  padding-top: 18px;
}

.site-header-inner {
  min-height: 58px;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border: 1px solid rgba(221, 210, 193, 0.88);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
  box-shadow: 0 12px 28px rgba(83, 55, 35, 0.08);
  backdrop-filter: blur(8px);
}

.site-logo {
  flex: 0 0 auto;
  color: var(--accent-dark);
  font-weight: 900;
  text-decoration: none;
}

.site-nav,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}

.site-nav a,
.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.footer-links a:hover {
  color: var(--accent-dark);
}

.ad-slot {
  min-height: 90px;
  display: grid;
  place-items: center;
  margin-top: 14px;
  border: 1px dashed rgba(106, 98, 87, 0.38);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.58);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}

.ad-slot-header {
  min-height: 96px;
}

.site-footer {
  padding-bottom: 28px;
}

.ad-slot-footer {
  margin-top: 0;
}

.footer-links {
  justify-content: center;
  margin-top: 18px;
}

.copyright {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.result-panel {
  margin-top: 28px;
  min-height: 258px;
  border-radius: 8px;
  overflow: hidden;
}

.empty-state,
.result-card {
  min-height: 258px;
  padding: 34px;
}

.empty-state {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.spark {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin-bottom: 14px;
  border-radius: 50%;
  color: #fff;
  background: var(--mint);
  font-size: 1.8rem;
  font-weight: 900;
}

.result-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  background: linear-gradient(120deg, rgba(198, 63, 74, 0.1), rgba(213, 158, 53, 0.12));
}

.result-number {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--accent-dark);
  background: #fffaf0;
  font-size: 2rem;
  font-weight: 900;
}

.result-name {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.result-title {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: 0;
}

.result-description {
  margin: 18px 0 0;
  color: #4d463d;
  line-height: 2;
  text-align: justify;
}

.share-text {
  margin-top: 22px;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

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

.share-button {
  background: var(--mint);
}

.share-button:hover {
  background: #1f625b;
}

.x-share-link {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.x-share-link:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

@media (max-width: 760px) {
  .site-header,
  .site-footer {
    width: min(100% - 22px, 560px);
  }

  .site-header {
    padding-top: 12px;
  }

  .site-header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .ad-slot {
    min-height: 82px;
  }

  .app-shell {
    width: min(100% - 22px, 560px);
    padding: 22px 0 34px;
  }

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

  .hero-copy,
  .diagnosis-form,
  .empty-state,
  .result-card,
  .top-hero,
  .diagnosis-list,
  .footer-diagnosis-guide {
    padding: 22px;
  }

  .hero-copy {
    min-height: 280px;
  }

  .input-row,
  .result-card {
    grid-template-columns: 1fr;
  }

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

  .result-number {
    width: 72px;
    height: 72px;
    font-size: 1.55rem;
  }
}
