:root {
  color-scheme: light;
  --bg: #f8f7f6;
  --surface: #ffffff;
  --surface-soft: #f2f1f0;
  --surface-blue: #eef7ff;
  --surface-green: #edf8f4;
  --text: #23221e;
  --muted: #706d65;
  --line: #d6d3d0;
  --accent: #0077c7;
  --accent-dark: #005fa3;
  --accent-soft: #e5f4ff;
  --friendly: #00a887;
  --friendly-soft: #dff8f1;
  --navy: #003b8f;
  --pink: #e91e63;
  --yellow: #ffe44d;
  --warn: #a45f00;
  --focus: #ff9900;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", "Yu Gothic", YuGothic, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.6;
}

button,
input,
select {
  font: inherit;
}

a {
  color: #0071c1;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.site-header {
  background:
    linear-gradient(135deg, #ffffff 0%, #ffffff 42%, #eaf6ff 42%, #eaf6ff 100%);
  border-bottom: 1px solid var(--line);
  color: var(--text);
  padding: 36px 20px 30px;
}

.header-inner,
main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 28px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-header .eyebrow {
  color: var(--accent-dark);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--navy);
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 span {
  color: var(--pink);
}

h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.35;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.lead {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-note {
  width: fit-content;
  margin: 0 0 12px;
  padding: 7px 14px;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
  font-weight: 800;
}

.hero-visual {
  min-height: 270px;
  position: relative;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(238, 247, 255, 0.92) 100%),
    repeating-linear-gradient(135deg, transparent 0 12px, rgba(0, 59, 143, 0.06) 12px 14px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: auto -18px -52px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--friendly-soft);
}

.speech-bubble {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 2;
  padding: 8px 12px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
  font-weight: 800;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -10px;
  width: 16px;
  height: 16px;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  background: #fff;
  transform: rotate(45deg);
}

.person-card {
  position: absolute;
  left: 34px;
  bottom: 24px;
  width: 126px;
  height: 154px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: #fff;
}

.person-head {
  position: absolute;
  top: 26px;
  left: 43px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffd9b8;
}

.person-body {
  position: absolute;
  left: 29px;
  bottom: 24px;
  width: 68px;
  height: 58px;
  border-radius: 28px 28px 10px 10px;
  background: var(--navy);
}

.thought {
  position: absolute;
  min-width: 54px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border: 1px solid #cfe2ef;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
}

.thought-income {
  top: -14px;
  left: 12px;
}

.thought-sidejob {
  top: 30px;
  right: -44px;
  border-color: var(--pink);
  background: #fff0f6;
  color: var(--pink);
}

.thought-transfer {
  top: 78px;
  right: -32px;
  border-color: #e0c100;
  background: var(--yellow);
}

.mini-board {
  position: absolute;
  right: 26px;
  top: 66px;
  width: 150px;
  min-height: 150px;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: #fff;
  transform: rotate(2deg);
}

.mini-board p {
  margin: 0 0 3px;
  color: var(--navy);
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
  font-weight: 800;
}

.mini-board span {
  display: block;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--surface-blue);
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 800;
}

.mini-board span:nth-of-type(2) {
  background: var(--yellow);
}

.mini-board span:nth-of-type(3) {
  background: var(--friendly-soft);
}

.hint-seal {
  position: absolute;
  right: 20px;
  bottom: 18px;
  width: 104px;
  height: 104px;
  display: grid;
  place-content: center;
  gap: 2px;
  border: 2px dashed #e0c100;
  border-radius: 50%;
  background: #fff9bf;
  color: var(--navy);
  text-align: center;
  transform: rotate(-7deg);
}

.hint-seal strong {
  color: var(--pink);
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
  font-size: 1.2rem;
}

.hint-seal span {
  font-size: 0.82rem;
  font-weight: 800;
}

.header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.header-badges span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid #b9d8ec;
  border-radius: 999px;
  background: var(--surface-blue);
  color: #174762;
  font-size: 0.86rem;
  font-weight: 700;
}

main {
  padding: 24px 0 56px;
}

.tool-section {
  max-width: 900px;
  margin: 0 auto;
}

.diagnosis-panel,
.result-panel,
.source-section,
.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

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

.result-panel {
  max-width: 900px;
  margin: 20px auto 0;
  scroll-margin-top: 20px;
}

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

.questions {
  display: grid;
  gap: 18px;
}

.question-section {
  padding: 16px;
  border: 1px solid #cfe2ef;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.question-section-heading {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.question-section-heading h3 {
  margin: 0;
  color: var(--navy);
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
  font-size: 1.15rem;
}

.question-section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.question-section-heading .section-count {
  width: fit-content;
  margin: 0 0 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy);
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
  font-size: 0.75rem;
  font-weight: 800;
}

.question-section-items {
  display: grid;
  gap: 12px;
}

.question {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.question label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.question legend {
  margin-bottom: 8px;
  font-weight: 700;
}

.hint {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.option-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.option-row label {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
}

.option-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-row label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.option-row label:hover {
  border-color: var(--accent);
}

.select-control,
.number-control {
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

button {
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: var(--accent-dark);
}

button.secondary {
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent-dark);
}

.empty-state {
  padding: 18px;
  border-radius: 6px;
  background: var(--surface-blue);
  color: var(--muted);
}

.result-title {
  padding: 16px;
  border: 1px solid #b9d8ec;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--surface-blue), var(--surface-green));
  color: var(--text);
}

.result-title .result-kicker {
  width: fit-content;
  margin: 0 0 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy);
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
}

.result-title p {
  margin: 6px 0 0;
  color: var(--muted);
}

.score-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.score-item {
  display: grid;
  gap: 5px;
}

.score-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}

.bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.reason-list,
.next-list,
.avoid-list,
.public-check-list,
.sources-list {
  padding-left: 1.2rem;
}

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

.result-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.result-card-primary {
  border-color: #9ddfce;
  background: var(--friendly-soft);
}

.result-card h3 {
  color: var(--navy);
}

.result-note {
  margin-top: 14px;
  padding: 12px;
  border-left: 4px solid var(--warn);
  background: #fff7ed;
  color: #5d3b13;
  font-size: 0.92rem;
}

.source-section,
.notice {
  margin-top: 20px;
  padding: 22px;
}

.sources-list a {
  font-weight: 700;
}

.notice {
  border-color: #e9d8a6;
  background: #fffdf4;
}

.notice p {
  margin-bottom: 0;
}

.simple-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.simple-header-inner {
  width: min(960px, calc(100% - 32px));
  min-height: 64px;
  display: flex;
  align-items: center;
  margin: 0 auto;
}

.site-logo {
  color: var(--navy);
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
}

.page-main {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.page-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.page-panel h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.page-panel h2 {
  margin-top: 28px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdff;
}

.info-list dt {
  color: var(--navy);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
}

.contact-box {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid #b9d8ec;
  border-radius: 8px;
  background: var(--surface-blue);
}

.sitemap-list {
  display: grid;
  gap: 10px;
  padding-left: 1.2rem;
}

.tool-card-list {
  display: grid;
  gap: 12px;
}

.tool-card {
  display: block;
  padding: 16px;
  border: 1px solid #b9d8ec;
  border-radius: 8px;
  background: var(--surface-blue);
  color: var(--text);
  text-decoration: none;
}

.tool-card:hover {
  border-color: var(--accent);
}

.tool-card span {
  display: block;
  color: var(--navy);
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
  font-weight: 800;
}

.tool-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.mini-tool {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

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

.tool-field-grid label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-weight: 800;
}

.tool-field-grid input {
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

.mini-result {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #b9d8ec;
  border-radius: 8px;
  background: #fff;
  scroll-margin-top: 20px;
}

.metric {
  margin: 8px 0;
  color: var(--pink);
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
}

.compact-notice {
  box-shadow: none;
}

.related-action {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #9ddfce;
  border-radius: 8px;
  background: var(--friendly-soft);
}

.related-action a {
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 28px 16px;
}

.footer-inner {
  width: min(960px, 100%);
  margin: 0 auto;
}

.footer-title {
  margin: 0;
  color: var(--navy);
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
}

.footer-description {
  max-width: 680px;
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.site-footer a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

@media (max-width: 880px) {
  .header-inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 250px;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding-top: 34px;
  }

  .diagnosis-panel,
  .result-panel,
  .source-section,
  .notice {
    padding: 16px;
  }

  .option-row {
    grid-template-columns: 1fr;
  }

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

  .actions {
    display: grid;
  }

  .hero-visual {
    min-height: 240px;
  }

  .person-card {
    left: 18px;
    bottom: 18px;
    transform: scale(0.9);
    transform-origin: bottom left;
  }

  .mini-board {
    right: 16px;
    top: 62px;
    transform: rotate(3deg) scale(0.9);
    transform-origin: top right;
  }

  .speech-bubble {
    max-width: calc(100% - 32px);
  }

  .hint-seal {
    right: 14px;
    bottom: 16px;
    transform: rotate(-7deg) scale(0.86);
    transform-origin: bottom right;
  }

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

  .tool-field-grid {
    grid-template-columns: 1fr;
  }
}
