:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f0f4f8;
  --text: #18212b;
  --muted: #5f6b78;
  --line: #d9e0e7;
  --accent: #2356a8;
  --accent-dark: #173d7a;
  --accent-soft: #eaf1fc;
  --success: #216e46;
  --warning: #8a5a00;
  --danger: #a42b2b;
  --shadow: 0 10px 30px rgba(24, 33, 43, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}
button, input { font: inherit; }
button, label, input, summary, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
fieldset { min-inline-size: 0; }
.container { width: min(100% - 32px, 980px); margin-inline: auto; }
.noscript-warning { padding: 14px 16px; background: #fff1f1; color: #8b1f1f; font-weight: 700; border-bottom: 1px solid #d9a7a7; }

.site-header {
  background: linear-gradient(180deg, #eef4ff 0%, #f6f7f9 100%);
  border-bottom: 1px solid var(--line);
}
.hero { padding: 50px 0 40px; text-align: center; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
h1, h2, h3 { line-height: 1.35; letter-spacing: -0.02em; overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.4rem); }
.hero-title-line { display: block; }
h2 { margin: 0; font-size: clamp(1.45rem, 4vw, 2rem); }
h3 { margin: 0 0 8px; font-size: 1.12rem; }
.lead { max-width: 720px; margin: 18px auto 24px; color: var(--muted); font-size: clamp(1rem, 2.8vw, 1.12rem); }
.hero-notes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
}
.hero-notes li::before { content: "✓ "; color: var(--success); font-weight: 800; }

.diagnosis-section { padding: 48px 0; }
.section-heading { margin-bottom: 22px; }
.section-heading p:last-child { color: var(--muted); margin-bottom: 0; }
.compact-heading { margin-bottom: 18px; }
.question-card {
  margin: 0 0 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.question-card legend {
  width: 100%;
  max-width: 100%;
  padding: 0 0 14px;
  font-weight: 800;
  line-height: 1.5;
}
.step-number {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.9rem;
  vertical-align: middle;
}
.choice-grid { display: grid; gap: 12px; }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice-card {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 78px;
  padding: 15px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  background: var(--surface);
  user-select: none;
  touch-action: manipulation;
}
.choice-card:hover { border-color: #aebbd0; }
.choice-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.choice-card input[type="radio"] {
  width: 24px;
  height: 24px;
  margin: 0;
  flex: 0 0 24px;
  accent-color: var(--accent);
  cursor: pointer;
}
.choice-card span { min-width: 0; }
.choice-card strong { display: block; line-height: 1.45; font-size: 1rem; }
.choice-card small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.45; font-size: 0.86rem; }

.conditional-panel {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-soft);
}
.dimension-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dimension-grid label { font-weight: 700; }
.input-with-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.input-with-unit input {
  width: 100%;
  min-height: 50px;
  padding: 11px 12px;
  border: 1px solid #aeb8c4;
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
}
.helper-text { margin: 8px 0 0; color: var(--muted); font-size: 0.88rem; }
.form-error { min-height: 28px; margin: 4px 0 10px; color: var(--danger); font-weight: 700; }
.primary-button {
  min-height: 56px;
  border: 0;
  border-radius: 14px;
  padding: 14px 22px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 1.02rem;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 7px 18px rgba(35, 86, 168, 0.22);
}
.primary-button:hover { background: var(--accent-dark); }
.primary-button:focus-visible, .choice-card:has(input:focus-visible), .size-tab:focus-visible, .affiliate-slot > a:focus-visible, .input-with-unit input:focus-visible {
  outline: 3px solid #111;
  outline-offset: 3px;
}
.full-width { width: 100%; }

.result-section { padding: 48px 0; background: #edf2f8; border-block: 1px solid var(--line); }
.result-summary {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}
.result-kicker { margin: 0 0 4px; color: var(--muted); font-weight: 700; }
.result-name { margin: 0; font-size: clamp(2.1rem, 7vw, 3.6rem); color: var(--accent-dark); }
.result-description { max-width: 700px; margin: 12px auto 0; }
.result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.result-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.result-card h3 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.rank-label { color: var(--accent); font-size: 0.8rem; white-space: nowrap; }
.axis-list { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 0.92rem; }
.axis-list li { padding-top: 8px; border-top: 1px solid var(--line); }
.axis-title { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.status-ok { color: var(--success); font-weight: 800; }
.status-tight { color: var(--warning); font-weight: 800; }
.status-no { color: var(--danger); font-weight: 800; }
.status-unknown { color: var(--muted); font-weight: 800; }
.disclaimer-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-left: 4px solid #75859b;
  border-radius: 10px;
  background: #fff;
  color: #46515e;
  font-size: 0.9rem;
}
.visual-section, .comparison-section, .cta-section { margin-top: 38px; }
.size-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.size-tab {
  min-height: 48px;
  padding: 10px 8px;
  border: 1px solid #aeb8c4;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}
.size-tab[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.svg-card { padding: 16px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.placement-meta { margin-bottom: 10px; font-size: 0.92rem; overflow-wrap: anywhere; }
.placement-meta strong { display: block; margin-bottom: 3px; }
.svg-container { width: 100%; min-height: 300px; display: grid; place-items: center; overflow: hidden; }
.svg-container svg { width: 100%; height: auto; max-height: 480px; display: block; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f7f9fc; font-size: 0.85rem; }
tr:last-child td { border-bottom: 0; }

.cta-section {
  padding: 24px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.cta-section > p:not(.eyebrow):not(.helper-text) { color: var(--muted); }
.cta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.affiliate-slot > a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  touch-action: manipulation;
}
.affiliate-slot.secondary > a { background: #243447; }
.affiliate-slot > img { position: absolute; width: 1px; height: 1px; overflow: hidden; }
.seo-section { padding: 54px 0; }
.seo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.seo-grid article { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.seo-grid p { margin: 0; color: var(--muted); }
.faq { margin-top: 36px; }
.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 800; }
.faq p { color: var(--muted); }
.site-footer { padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.86rem; }

@media (max-width: 720px) {
  body { line-height: 1.65; }
  .container { width: min(100% - 24px, 980px); }
  .hero { padding: 28px 0 24px; text-align: left; }
  .eyebrow { font-size: 0.76rem; }
  h1 { font-size: clamp(1.58rem, 7vw, 2.05rem); line-height: 1.34; }
  .hero-title-line { white-space: nowrap; }
  h2 { font-size: clamp(1.35rem, 6.5vw, 1.75rem); }
  h3 { font-size: 1.08rem; }
  .lead { margin: 14px 0 18px; font-size: 0.98rem; line-height: 1.65; }
  .hero-notes { justify-content: flex-start; gap: 4px 14px; margin-top: 10px; font-size: 0.82rem; }
  .diagnosis-section { padding: 32px 0 40px; }
  .section-heading { margin-bottom: 18px; }
  .section-heading > p:last-child { font-size: 0.94rem; }

  .three-columns, .two-columns, .dimension-grid, .result-grid, .seo-grid, .cta-grid { grid-template-columns: 1fr; }
  .question-card { padding: 17px 13px 14px; margin-bottom: 14px; border-radius: 15px; }
  .question-card legend { padding-bottom: 12px; font-size: 1rem; }
  .step-number { width: 28px; height: 28px; margin-right: 7px; font-size: 0.84rem; }
  .choice-grid { gap: 9px; }
  .choice-card { min-height: 68px; padding: 13px 14px; gap: 12px; border-radius: 12px; }
  .choice-card input[type="radio"] { width: 26px; height: 26px; flex-basis: 26px; }
  .choice-card strong { font-size: 1rem; }
  .choice-card small { font-size: 0.84rem; margin-top: 2px; }
  .conditional-panel { padding: 13px; }
  .input-with-unit input { min-height: 54px; font-size: 1.05rem; }
  .primary-button { min-height: 58px; font-size: 1.05rem; }

  .result-section { padding: 36px 0 42px; }
  .result-summary { padding: 20px 15px; text-align: left; }
  .result-name { font-size: clamp(2rem, 11vw, 2.8rem); }
  .result-description { margin-top: 10px; font-size: 0.95rem; }
  .result-card { padding: 16px; }
  .result-card h3 { align-items: flex-start; }
  .axis-list { font-size: 0.9rem; }
  .disclaimer-box { padding: 14px; font-size: 0.86rem; }
  .visual-section, .comparison-section, .cta-section { margin-top: 30px; }
  .size-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .size-tab { min-height: 52px; font-size: 0.95rem; }
  .svg-card { padding: 10px; border-radius: 14px; }
  .placement-meta { font-size: 0.86rem; }
  .svg-container { min-height: 220px; }

  .table-wrap { border: 0; border-radius: 0; background: transparent; overflow: visible; }
  table { min-width: 0; border-collapse: separate; }
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  tbody { display: grid; gap: 10px; }
  tr { display: block; padding: 6px 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
  td {
    display: grid;
    grid-template-columns: minmax(6.7rem, 36%) minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.9rem;
  }
  td:last-child { border-bottom: 0; }
  td::before { content: attr(data-label); color: var(--muted); font-weight: 700; }

  .cta-section { padding: 18px 14px; }
  .affiliate-slot > a { min-height: 58px; }
  .seo-section { padding: 40px 0; }
  .seo-grid article { padding: 16px; }
  .faq { margin-top: 30px; }
}

@media (max-width: 380px) {
  .container { width: min(100% - 20px, 980px); }
  .hero-notes { display: grid; gap: 2px; }
  .question-card { padding-inline: 11px; }
  .choice-card { padding: 12px; }
  .choice-card small { font-size: 0.82rem; }
  td { grid-template-columns: minmax(6.2rem, 35%) minmax(0, 1fr); gap: 8px; font-size: 0.86rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* v1.5: first-result CTA */
.result-top-cta {
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid #cbd7e8;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}
.result-top-cta-label {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}
.result-top-cta-note {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 0.92rem;
}
.affiliate-slot.compact > a {
  min-height: 52px;
  justify-content: center;
  text-align: center;
}
@media (max-width: 720px) {
  .result-top-cta { padding: 14px; }
  .result-top-cta-note { font-size: 0.9rem; }
  .affiliate-slot.compact > a { min-height: 56px; }
}
