:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #dfe5ec;
  --text: #1d2433;
  --subtle: #5d697d;
  --primary: #2f6fed;
  --primary-soft: #edf3ff;
  --success: #1d8f5f;
  --warning: #b7781a;
  --danger: #b94f4f;
  --shadow: 0 12px 30px rgba(19, 29, 45, 0.07);
  --high: #3257d6;
  --average: #7d8aa5;
  --low: #d38a4f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 16px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.brand-mark path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.brand-mark circle {
  fill: currentColor;
}

.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.text-link {
  color: var(--primary);
  font-weight: 600;
}

.home-shell {
  display: grid;
  gap: 24px;
  padding: 32px 0 48px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.8fr);
  gap: 24px;
  padding: 28px;
  background: linear-gradient(135deg, #f9fbff, #f1f5fc);
}

.hero-copy h2 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.15;
}

.hero-copy p {
  color: var(--subtle);
  max-width: 60ch;
}

.hero-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  background: rgba(47, 111, 237, 0.05);
  color: var(--text);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.primary-button,
.ghost-button,
.share-box a,
.share-box button {
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.primary-button {
  border: 0;
  background: var(--primary);
  color: white;
}

.ghost-button {
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
}

.primary-button:hover,
.ghost-button:hover,
.share-box a:hover,
.share-box button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled {
  background: #aab4c4;
  cursor: not-allowed;
  transform: none;
}

.mini-stats {
  margin-top: 24px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.mini-stats div {
  min-width: 90px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 14px;
}

.mini-stats strong {
  display: block;
  font-size: 1.3rem;
  color: var(--text);
}

.mini-stats span {
  color: var(--subtle);
  font-size: 0.85rem;
}

.hero-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}

.highlight-card {
  width: 100%;
  border-radius: 18px;
  background: linear-gradient(135deg, #1f2b46, #2f5fd2);
  color: white;
  padding: 22px 20px;
  box-shadow: var(--shadow);
}

.highlight-label {
  display: inline-block;
  font-size: 0.75rem;
  opacity: 0.8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.highlight-card ul {
  margin: 18px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  opacity: 0.95;
}

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

.info-card {
  padding: 20px;
}

.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.6fr);
  gap: 20px;
  padding: 32px 0 48px;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  padding: 32px 0 48px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.builder,
.result-summary,
.result-card,
.result-actions,
.ad-slot {
  padding: 24px;
}

.section-head {
  margin-bottom: 18px;
}

.section-head h3 {
  margin: 8px 0 0;
  font-size: clamp(1.3rem, 2vw, 1.9rem);
}

.diagnosis-notice {
  border: 1px solid rgba(47, 111, 237, 0.18);
  background: linear-gradient(135deg, #f7faff, #eef6ff);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 18px;
}

.diagnosis-notice strong {
  display: block;
  margin-bottom: 6px;
}

.diagnosis-notice p {
  margin: 0;
  color: var(--subtle);
}

.diagnosis-notice .muted {
  margin-top: 6px;
  color: var(--primary);
  font-weight: 600;
}

.note-list {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--subtle);
}

.diagnosis-form {
  display: block;
}

.trait-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px 6px;
  margin-bottom: 18px;
  background: #fbfcff;
}

.trait-panel h3 {
  margin-bottom: 6px;
}

.trait-panel > p {
  margin-bottom: 18px;
  color: var(--subtle);
}

.question-item {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.question-item:first-of-type {
  border-top: none;
}

.question-item p {
  margin-bottom: 10px;
  font-weight: 500;
}

.answer-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.answer-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.answer-option input {
  accent-color: var(--primary);
}

.action-row {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: flex-end;
  padding-top: 18px;
}

.answer-progress {
  margin: 0 auto 0 0;
  color: var(--subtle);
  font-size: 0.95rem;
}

.ad-slot {
  align-self: start;
}

.ad-box {
  min-height: 170px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, #f0f4fb, #edf4ef);
  color: var(--subtle);
}

.ad-box span {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
}

.footer-inner {
  padding: 18px 0 30px;
  color: var(--subtle);
}

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

.result-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.result-card.trait-high {
  border-color: rgba(50, 87, 214, 0.25);
  background: linear-gradient(180deg, #f8faff, #ffffff);
}

.result-card.trait-average {
  border-color: rgba(125, 138, 165, 0.28);
  background: linear-gradient(180deg, #f9fafb, #ffffff);
}

.result-card.trait-low {
  border-color: rgba(211, 138, 79, 0.28);
  background: linear-gradient(180deg, #fffaf5, #ffffff);
}

.result-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary);
}

.score-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-weight: 700;
}

.score-line strong {
  font-size: 1.4rem;
}

.meter {
  position: relative;
  height: 12px;
  width: 100%;
  background: #edf1f5;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}

.meter-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #7aa6ff);
}

.trait-summary {
  color: var(--subtle);
  margin: 6px 0 0;
}

.trait-insight {
  margin: 14px 0 0;
  color: var(--text);
}

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

.result-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: center;
}

.radar-chart {
  min-width: 0;
  padding-left: 28px;
  border-left: 1px solid var(--line);
  text-align: center;
}

.radar-chart h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.radar-chart svg {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  overflow: visible;
}

.radar-grid {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.radar-axis {
  stroke: var(--line);
  stroke-width: 1;
}

.radar-score {
  fill: rgba(47, 111, 237, 0.22);
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linejoin: round;
}

.radar-marker {
  fill: white;
  stroke: var(--primary);
  stroke-width: 3;
}

.radar-label {
  fill: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.radar-value {
  fill: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.result-badge {
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

.summary-text {
  margin-top: 14px;
  font-size: 1.05rem;
}

.summary-note {
  margin-top: 8px;
  color: var(--subtle);
}

.result-guidance {
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  background: var(--primary-soft);
}

.result-guidance strong {
  display: block;
  margin-bottom: 4px;
}

.result-guidance p {
  margin: 4px 0 0;
  color: var(--subtle);
}

.trait-detail {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.trait-detail h4 {
  margin: 0 0 4px;
  font-size: 0.85rem;
  color: var(--subtle);
}

.trait-detail h4:not(:first-child) {
  margin-top: 14px;
}

.trait-examples {
  display: grid;
  gap: 7px;
  margin: 6px 0 0;
  padding-left: 20px;
}

.trait-examples li::marker {
  color: var(--primary);
}

.share-box {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.share-box a,
.share-box button {
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
}

.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.result-actions h2 {
  margin: 6px 0 4px;
}

.result-actions p {
  margin-bottom: 0;
  color: var(--subtle);
}

.result-actions-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.result-actions .share-box {
  margin-top: 0;
}

.result-actions[hidden] {
  display: none;
}

.warning-text {
  color: var(--danger);
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .hero,
  .main-layout,
  .result-layout,
  .info-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .result-overview {
    grid-template-columns: 1fr;
  }

  .radar-chart {
    padding: 24px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .answer-scale {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .answer-option {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
    padding: 8px 4px;
  }

  .action-row,
  .result-actions,
  .result-actions-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .result-actions-controls .primary-button {
    text-align: center;
  }
}

/* Editorial layout inspired by the reference site, retaining the blue palette. */
:root {
  --bg: #ffffff;
  --card: #ffffff;
  --line: #dedede;
  --text: #172033;
  --subtle: #687080;
  --primary: #2f6fed;
  --primary-soft: #edf3ff;
  --shadow: none;
}

body {
  background: var(--bg);
  font-family: Inter, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  letter-spacing: 0.01em;
}

.container {
  width: min(1080px, calc(100% - 48px));
}

.site-header {
  position: static;
  background: #fff;
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
}

.header-inner {
  min-height: 72px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--primary);
  color: white;
}

.brand-mark svg {
  width: 19px;
  height: 19px;
}

.brand-wrap {
  gap: 11px;
}

.brand-wrap .eyebrow {
  display: none;
}

.brand-wrap h1 {
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.text-link {
  font-size: 0.86rem;
}

.card {
  border-radius: 0;
  box-shadow: none;
}

.home-shell {
  gap: 64px;
  padding: 92px 0 72px;
}

.hero {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
  padding: 0;
  border: 0;
  background: transparent;
}

.hero-copy h2 {
  max-width: 800px;
  margin: 14px 0 24px;
  font-size: clamp(3rem, 6vw, 5.4rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 650px;
  font-size: 1rem;
  line-height: 1.9;
}

.hero-copy .eyebrow,
.section-head .eyebrow,
.result-copy .eyebrow {
  color: var(--primary);
  font-weight: 700;
}

.hero-note {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.82rem !important;
}

.highlight-card {
  align-self: end;
  border-radius: 0;
  background: var(--primary-soft);
  color: var(--text);
  box-shadow: none;
}

.highlight-label {
  color: var(--primary);
  font-weight: 700;
}

.primary-button,
.ghost-button,
.share-box a,
.share-box button {
  border-radius: 5px;
  padding: 13px 20px;
}

.mini-stats {
  gap: 8px;
}

.mini-stats div {
  min-width: 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: #fff;
}

.mini-stats strong,
.mini-stats span {
  display: inline;
  font-size: 0.82rem;
}

.mini-stats strong {
  margin-right: 3px;
}

.info-grid {
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
}

.info-card {
  min-height: 190px;
  padding: 26px 24px;
  border: 0;
  border-right: 1px solid var(--line);
}

.info-card:last-child {
  border-right: 0;
}

.info-card h3 {
  margin: 8px 0 24px;
  font-size: 1.15rem;
  font-weight: 500;
}

.info-card p:last-child {
  color: var(--subtle);
  font-size: 0.88rem;
}

.ad-slot {
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.ad-box {
  min-height: 110px;
  border-radius: 0;
  background: #fafafa;
}

.main-layout,
.result-layout {
  padding: 64px 0 88px;
}

.main-layout {
  grid-template-columns: minmax(0, 1fr);
  max-width: 820px;
}

.builder,
.result-summary,
.result-card,
.result-actions {
  padding: 0;
  border: 0;
}

.section-head {
  margin-bottom: 30px;
}

.section-head h3,
.result-hero h2 {
  margin-top: 10px;
  font-size: clamp(2.4rem, 5vw, 4.3rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.diagnosis-notice {
  padding: 16px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.trait-panel {
  padding: 44px 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.trait-panel h3 {
  font-size: 1.6rem;
  font-weight: 500;
}

.question-item {
  padding: 20px 0;
}

.answer-option {
  min-width: 58px;
  justify-content: center;
  border-radius: 4px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.answer-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

.action-row {
  position: sticky;
  bottom: 0;
  margin-top: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.result-overview {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}

.result-guidance {
  border-radius: 0;
}

.radar-chart {
  border-left-color: var(--line);
}

.result-grid {
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.result-card {
  padding: 28px 24px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff !important;
}

.score-pill,
.result-badge {
  border-radius: 999px;
}

.result-actions {
  padding: 44px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.site-footer {
  background: #fff;
}

@media (max-width: 860px) {
  .container {
    width: min(100% - 32px, 1080px);
  }

  .header-inner {
    min-height: 64px;
    padding: 12px 0;
    flex-direction: row;
    align-items: center;
  }

  .home-shell {
    gap: 40px;
    padding: 56px 0;
  }

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

  .hero-copy h2 {
    font-size: clamp(2.7rem, 13vw, 4.2rem);
  }

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

  .info-card {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .info-card:last-child {
    border-bottom: 0;
  }

  .main-layout,
  .result-layout {
    padding: 48px 0 64px;
  }

  .section-head h3,
  .result-hero h2 {
    font-size: 2.6rem;
  }

  .result-hero h2 {
    font-size: 2.3rem;
  }

  .result-overview {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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