:root {
  --ink: #24211d;
  --muted: #6f6a61;
  --paper: #fffdf7;
  --paper-warm: #fff8e8;
  --line: #ded8ca;
  --accent: #f36b3f;
  --accent-soft: #ffd96a;
  --accent-deep: #b83b22;
  --cool: #1f7977;
  --shadow: 0 18px 50px rgba(71, 54, 24, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --font: ui-rounded, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

img,
canvas {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.wrap {
  width: min(100% - 40px, 1080px);
  margin-inline: auto;
}

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

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand-lockup small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.brand-symbol {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.brand-symbol i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.brand-symbol i:nth-child(1) { transform: translate(-8px, -5px); }
.brand-symbol i:nth-child(2) { transform: translate(8px, -5px); }
.brand-symbol i:nth-child(3) {
  width: 13px;
  height: 6px;
  border: 2px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: transparent;
  transform: translateY(8px);
}

.beta-label {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.08em;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 570px;
  padding-block: 48px 82px;
  gap: 52px;
}

.home-hero-copy {
  min-width: 0;
  max-width: 100%;
  align-self: center;
}

.home-hero-copy > * {
  max-width: 100%;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(42px, 12vw, 76px);
  line-height: 1.18;
  letter-spacing: -0.055em;
}

.home-hero h1 span {
  position: relative;
  z-index: 0;
  background: linear-gradient(to bottom, transparent 66%, var(--accent-soft) 66%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  white-space: normal;
  word-break: keep-all;
}

.home-hero h1 span::after {
  display: none;
  position: absolute;
  z-index: -1;
  right: -4px;
  bottom: 2px;
  left: -4px;
  height: 0.34em;
  border-radius: 999px;
  background: var(--accent-soft);
  content: "";
  transform: rotate(-1deg);
}

.hero-lead {
  max-width: 570px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

@media (min-width: 1100px) {
  .home-hero h1 span {
    background: none;
    white-space: nowrap;
    word-break: normal;
  }

  .home-hero h1 span::after {
    display: block;
  }
}

.lab-visual {
  position: relative;
  width: min(76vw, 320px);
  aspect-ratio: 1;
  align-self: center;
  justify-self: center;
}

.lab-core {
  position: absolute;
  z-index: 2;
  inset: 22%;
  display: grid;
  align-content: center;
  justify-items: center;
  border: 3px solid var(--ink);
  border-radius: 43% 57% 50% 50% / 45% 43% 57% 55%;
  background: var(--accent-soft);
  box-shadow: 12px 14px 0 var(--ink);
  transform: rotate(5deg);
}

.lab-core span {
  font-size: 14px;
  font-weight: 900;
}

.lab-core strong {
  font-size: 74px;
  line-height: 0.9;
}

.lab-orbit {
  position: absolute;
  border: 2px solid var(--line);
  border-radius: 50%;
}

.orbit-one {
  inset: 6%;
  transform: rotate(-13deg) scaleY(0.6);
}

.orbit-two {
  inset: 0 12%;
  border-color: var(--accent);
  transform: rotate(50deg) scaleY(0.48);
}

.spark {
  position: absolute;
  font-weight: 900;
}

.spark-a { top: 5%; right: 20%; color: var(--accent); font-size: 31px; }
.spark-b { right: 3%; bottom: 22%; color: var(--cool); font-size: 18px; }
.spark-c { bottom: 4%; left: 14%; color: var(--accent); font-size: 30px; }

.diagnosis-list-section {
  padding-block: 76px 88px;
  background: var(--paper-warm);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 20px;
}

.section-heading h2,
.lab-notes h2 {
  margin: 0;
  font-size: clamp(28px, 7vw, 46px);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.theme-count {
  display: none;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.theme-count strong {
  color: var(--ink);
  font-size: 32px;
}

.diagnosis-card {
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: 9px 11px 0 var(--ink);
}

.diagnosis-card + .diagnosis-card {
  margin-top: 42px;
}

.diagnosis-card-art {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  background: #ffd95c;
}

.diagnosis-card-art::before,
.diagnosis-card-art::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.diagnosis-card-art::before {
  width: 230px;
  height: 230px;
  top: -80px;
  right: -50px;
  border: 2px solid rgba(36, 33, 29, 0.28);
}

.diagnosis-card-art::after {
  width: 130px;
  height: 130px;
  bottom: -70px;
  left: -30px;
  background: var(--accent);
}

.card-sun {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 116px;
  height: 116px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 9px 10px 0 var(--ink);
  transform: translate(-50%, -50%);
}

.card-sun::before,
.card-sun::after {
  position: absolute;
  top: 42px;
  width: 8px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  content: "";
}

.card-sun::before { left: 30px; }
.card-sun::after { right: 30px; }

.heat-line {
  position: absolute;
  top: 26px;
  width: 3px;
  height: 42px;
  border-radius: 99px;
  background: var(--ink);
}

.heat-line-a { left: calc(50% - 50px); transform: rotate(-28deg); }
.heat-line-b { left: 50%; top: 14px; }
.heat-line-c { left: calc(50% + 50px); transform: rotate(28deg); }

.summer-meter {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 18px;
  height: 86px;
  padding: 3px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--paper);
}

.summer-meter i {
  display: block;
  width: 100%;
  height: 72%;
  margin-top: 20px;
  border-radius: 99px;
  background: var(--accent);
}

.diagnosis-card-koshien .diagnosis-card-art {
  background: #8dbc82;
}

.diagnosis-card-koshien .diagnosis-card-art::before {
  border-color: rgba(255, 253, 245, 0.72);
}

.diagnosis-card-koshien .diagnosis-card-art::after {
  background: #d69b5d;
}

.field-diamond {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 152px;
  height: 152px;
  border: 3px solid rgba(255, 253, 245, 0.72);
  background: rgba(255, 253, 245, 0.1);
  transform: translate(-50%, -50%) rotate(45deg);
}

.card-baseball {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 118px;
  height: 118px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fffdf5;
  box-shadow: 9px 10px 0 var(--ink);
  transform: translate(-50%, -50%) rotate(-9deg);
}

.card-baseball i {
  position: absolute;
  inset: 14px 25px;
  border-right: 3px solid #a83d2d;
  border-left: 3px solid #a83d2d;
  border-radius: 48%;
  transform: rotate(-18deg);
}

.card-baseball i::before,
.card-baseball i::after {
  position: absolute;
  top: 14px;
  width: 16px;
  height: 3px;
  border-radius: 99px;
  background: #a83d2d;
  box-shadow: 0 18px 0 #a83d2d, 0 36px 0 #a83d2d, 0 54px 0 #a83d2d;
  content: "";
}

.card-baseball i::before {
  left: -10px;
  transform: rotate(34deg);
}

.card-baseball i::after {
  right: -10px;
  transform: rotate(-34deg);
}

.koshien-art-label {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 18px;
  padding: 6px 11px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: #fffdf5;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.1em;
}

.diagnosis-card-koshien h3 {
  font-size: clamp(35px, 10vw, 52px);
}

.diagnosis-card-inu .diagnosis-card-art {
  background: #f5cf75;
}

.diagnosis-card-inu .diagnosis-card-art::before {
  border-color: rgba(32, 43, 40, 0.24);
  background: rgba(255, 253, 245, 0.2);
}

.diagnosis-card-inu .diagnosis-card-art::after {
  background: #4f7a68;
}

.dog-card-face {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 132px;
  height: 116px;
  border: 3px solid var(--ink);
  border-radius: 48% 48% 43% 43%;
  background: #fffdf5;
  box-shadow: 9px 10px 0 var(--ink);
  transform: translate(-50%, -48%) rotate(2deg);
}

.dog-card-face::before,
.dog-card-face::after {
  position: absolute;
  top: 41px;
  width: 9px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  content: "";
}

.dog-card-face::before { left: 34px; }
.dog-card-face::after { right: 34px; }

.dog-card-face i {
  position: absolute;
  top: 58px;
  left: 50%;
  width: 51px;
  height: 38px;
  border-radius: 50%;
  background: #f5cf75;
  transform: translateX(-50%);
}

.dog-card-face i::before {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 14px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
  content: "";
  transform: translateX(-50%);
}

.dog-card-face i::after {
  position: absolute;
  top: 18px;
  left: 50%;
  width: 25px;
  height: 12px;
  border-bottom: 3px solid var(--ink);
  border-radius: 0 0 50% 50%;
  content: "";
  transform: translateX(-50%);
}

.dog-card-ear {
  position: absolute;
  z-index: 1;
  top: calc(50% - 78px);
  width: 52px;
  height: 76px;
  border: 3px solid var(--ink);
  border-radius: 72% 20% 62% 35%;
  background: #e06f45;
}

.dog-card-ear-left {
  left: calc(50% - 73px);
  transform: rotate(-24deg);
}

.dog-card-ear-right {
  right: calc(50% - 73px);
  transform: scaleX(-1) rotate(-24deg);
}

.dog-card-tail {
  position: absolute;
  z-index: 1;
  top: calc(50% - 19px);
  left: calc(50% + 54px);
  width: 65px;
  height: 60px;
  border: 12px solid #e06f45;
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(19deg);
}

.inu-art-label {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 18px;
  padding: 6px 11px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: #fffdf5;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
}

.diagnosis-card-inu h3 {
  font-size: clamp(37px, 10.5vw, 55px);
}

.diagnosis-card-body {
  padding: 28px 24px 26px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 18px;
  gap: 7px;
}

.card-meta span {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.09em;
}

.diagnosis-card h3 {
  margin: 0 0 14px;
  font-size: clamp(38px, 11vw, 58px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.diagnosis-card-body > p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.primary-link,
.primary-button,
.secondary-button,
.share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border-radius: 999px;
  font-weight: 900;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
}

.primary-link {
  width: 100%;
  justify-content: space-between;
  padding: 0 20px 0 24px;
  color: #fff;
  background: var(--ink);
}

.primary-link span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--accent-soft);
  transition: transform 180ms ease;
}

.primary-link:hover span { transform: translateX(3px); }

.lab-notes {
  display: grid;
  padding-block: 92px;
  gap: 48px;
}

.lab-note-grid {
  display: grid;
  gap: 0;
}

.lab-note-grid article {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.lab-note-grid article:last-child { border-bottom: 1px solid var(--line); }

.lab-note-grid span {
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.lab-note-grid h3 {
  margin: 5px 0 2px;
  font-size: 18px;
}

.lab-note-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.site-footer {
  padding-block: 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.site-footer p { margin: 5px 0; }

.brand-footer-name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.operator-credit a {
  color: inherit;
  text-underline-offset: 3px;
}

.operator-credit a:hover { color: var(--ink); }

/* Diagnosis page */
.diagnosis-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 8%, color-mix(in srgb, var(--accent-soft) 42%, transparent) 0 110px, transparent 112px),
    var(--paper-warm);
}

.diagnosis-page .brand-header {
  width: min(100% - 32px, 760px);
  min-height: 74px;
}

.back-link {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.back-link:hover { color: var(--ink); }

.diagnosis-shell {
  width: min(100% - 28px, 680px);
  min-height: 640px;
  margin: 18px auto 56px;
}

.screen {
  animation: screen-in 320ms ease both;
}

.screen[hidden] { display: none !important; }

@keyframes screen-in {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

.loading-panel,
.error-panel,
.intro-panel,
.question-panel,
.result-panel {
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: 7px 9px 0 var(--ink);
}

.loading-panel,
.error-panel {
  display: grid;
  min-height: 380px;
  padding: 32px;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.loading-dots {
  display: flex;
  margin-bottom: 20px;
  gap: 7px;
}

.loading-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  animation: dot-bounce 900ms infinite alternate;
}

.loading-dots i:nth-child(2) { animation-delay: 150ms; }
.loading-dots i:nth-child(3) { animation-delay: 300ms; }

@keyframes dot-bounce { to { transform: translateY(-8px); } }

.intro-panel {
  overflow: hidden;
}

.intro-art {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  background: var(--accent-soft);
}

.intro-art::before,
.intro-art::after {
  position: absolute;
  border: 2px solid var(--ink);
  border-radius: 50%;
  content: "";
}

.intro-art::before {
  width: 190px;
  height: 190px;
  top: -82px;
  right: -55px;
  background: var(--accent);
}

.intro-art::after {
  width: 85px;
  height: 85px;
  bottom: -35px;
  left: -15px;
  background: var(--cool);
}

.intro-art-label {
  position: absolute;
  top: 22px;
  left: 22px;
  padding: 6px 11px;
  border: 2px solid var(--ink);
  border-radius: 99px;
  background: var(--paper);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.1em;
}

.intro-thermometer {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 148px;
  border: 3px solid var(--ink);
  border-radius: 99px;
  background: var(--paper);
  box-shadow: 8px 9px 0 var(--ink);
  transform: translate(-50%, -50%) rotate(8deg);
}

.intro-thermometer i {
  position: absolute;
  right: 9px;
  bottom: 9px;
  left: 9px;
  height: 72%;
  border-radius: 99px;
  background: var(--accent);
}

.intro-thermometer i::after {
  position: absolute;
  right: -5px;
  bottom: -2px;
  left: -5px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.theme-koshien .intro-art::before {
  background: var(--cool);
}

.theme-koshien .intro-art::after {
  background: var(--accent);
}

.theme-koshien .intro-thermometer {
  width: 142px;
  height: 142px;
  border-radius: 50%;
  background: var(--paper);
  transform: translate(-50%, -50%) rotate(-9deg);
}

.theme-koshien .intro-thermometer i {
  inset: 18px 30px;
  height: auto;
  border-right: 3px solid var(--accent-deep);
  border-left: 3px solid var(--accent-deep);
  border-radius: 48%;
  background: transparent;
  transform: rotate(-18deg);
}

.theme-koshien .intro-thermometer i::before,
.theme-koshien .intro-thermometer i::after {
  position: absolute;
  top: 18px;
  bottom: auto;
  width: 18px;
  height: 3px;
  border-radius: 99px;
  background: var(--accent-deep);
  box-shadow: 0 22px 0 var(--accent-deep), 0 44px 0 var(--accent-deep), 0 66px 0 var(--accent-deep);
  content: "";
}

.theme-koshien .intro-thermometer i::before {
  left: -11px;
  transform: rotate(34deg);
}

.theme-koshien .intro-thermometer i::after {
  right: -11px;
  left: auto;
  aspect-ratio: auto;
  transform: rotate(-34deg);
}

.intro-art-dog .intro-thermometer {
  width: 154px;
  height: 142px;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -46%) rotate(-5deg);
}

.intro-art-dog .intro-thermometer i {
  position: absolute;
  inset: auto auto 10px 45px;
  width: 75px;
  height: 67px;
  border: 3px solid var(--ink);
  border-radius: 54% 54% 46% 46%;
  background: var(--accent);
  box-shadow: 7px 8px 0 var(--ink);
}

.intro-art-dog .intro-thermometer i::before,
.intro-art-dog .intro-thermometer i::after {
  position: absolute;
  width: 31px;
  height: 38px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  content: "";
}

.intro-art-dog .intro-thermometer i::before {
  top: -52px;
  left: -20px;
  box-shadow: 38px -13px 0 var(--paper), 75px 0 0 var(--paper);
}

.intro-art-dog .intro-thermometer i::after {
  top: -55px;
  right: 8px;
  bottom: auto;
  left: auto;
  aspect-ratio: auto;
  background: var(--accent-soft);
}

.intro-copy {
  padding: 28px 24px 26px;
  text-align: center;
}

.intro-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 12vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.intro-description {
  margin: 0 auto 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.intro-facts {
  display: flex;
  justify-content: center;
  margin: 0 0 22px;
  padding: 0;
  gap: 7px;
  list-style: none;
}

.intro-facts li {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
}

.primary-button,
.secondary-button {
  width: 100%;
  padding: 0 22px;
  border: 2px solid var(--ink);
}

.primary-button {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--accent) 74%, #000);
}

.primary-button:hover { background: #3a3630; }
.primary-button:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--accent-deep); }

.secondary-button {
  color: var(--ink);
  background: var(--paper);
}

.privacy-note {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.question-panel {
  padding: 24px 18px 20px;
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 14px;
}

.progress-track {
  position: relative;
  height: 8px;
  flex: 1;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 99px;
  background: var(--paper-warm);
}

.progress-fill {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 280ms ease;
}

.progress-label {
  min-width: 54px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  text-align: right;
}

.question-number {
  margin: 0 0 8px;
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.question-title {
  min-height: 2.7em;
  margin: 0 4px 28px;
  font-size: clamp(25px, 7vw, 34px);
  line-height: 1.35;
  letter-spacing: -0.035em;
}

.choice-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 11px;
  border: 0;
}

.choice-button {
  display: grid;
  width: 100%;
  min-height: 68px;
  padding: 13px 16px;
  grid-template-columns: 28px 1fr 22px;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  color: var(--ink);
  background: var(--paper);
  font-weight: 800;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: transform 130ms ease, background 130ms ease, box-shadow 130ms ease;
}

.choice-button:hover,
.choice-button:focus-visible {
  background: var(--accent-soft);
  box-shadow: 4px 5px 0 var(--ink);
  transform: translate(-2px, -2px);
}

.choice-button.is-selected {
  color: #fff;
  background: var(--ink);
  transform: scale(0.985);
}

.choice-marker {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 10px;
}

.choice-arrow {
  font-size: 18px;
  text-align: right;
}

.question-footer {
  display: flex;
  min-height: 28px;
  margin-top: 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.back-question-button {
  padding: 2px 4px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.question-hint {
  margin: 0 4px 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.result-panel {
  overflow: hidden;
}

.result-copy {
  padding: 28px 22px 30px;
  text-align: center;
}

.result-kicker {
  display: inline-block;
  margin: 0 0 15px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--accent-deep);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.result-score {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.result-score-lead {
  display: block;
}

.result-score-value {
  display: flex;
  margin-top: 1px;
  align-items: baseline;
  justify-content: center;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.25;
}

.result-score-scale {
  margin-left: 6px;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.result-score strong {
  color: var(--accent-deep);
  font-size: 40px;
  line-height: 1;
}

.result-meter {
  width: min(100%, 430px);
  margin: 0 auto 24px;
  text-align: left;
}

.result-meter-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.result-meter-track {
  height: 20px;
  min-height: 20px;
  padding: 3px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
}

.result-meter-segments {
  display: grid;
  width: 100%;
  height: 100%;
  gap: 2px;
}

.result-meter-segments:empty {
  border-radius: 999px;
  background: var(--line);
}

.result-meter-segments i {
  display: block;
  min-width: 0;
  border-radius: 2px;
  background: var(--line);
}

.result-meter-segments i.is-filled {
  background: var(--accent);
}

.result-meter-range {
  display: grid;
  margin-top: 3px;
  align-items: baseline;
  grid-template-columns: 1fr auto 1fr;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
}

.result-meter-range > :last-child {
  text-align: right;
}

.result-meter-range > span {
  white-space: nowrap;
}

[data-result-score-block][hidden],
.result-axes[hidden],
[data-result-trait][hidden],
[data-result-composite][hidden],
[data-result-pattern-note][hidden] {
  display: none !important;
}

.result-axes {
  width: min(100%, 520px);
  margin: 0 auto 24px;
  padding: 17px 16px 19px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-warm);
  text-align: left;
}

.result-axes > h2 {
  margin: 0 0 14px;
  color: var(--accent-deep);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.result-axes-list {
  display: grid;
  gap: 13px;
}

.result-axis-heading,
.result-axis-poles {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.result-axis-heading strong {
  font-size: 11px;
  line-height: 1.4;
}

.result-axis-heading span {
  color: var(--accent-deep);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.result-axis-poles {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.35;
}

.result-axis-poles span:last-child {
  text-align: right;
}

.result-axis-track {
  --axis-position: 50%;
  position: relative;
  height: 13px;
  margin-top: 4px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--cool) 38%, var(--paper)) 0 50%, color-mix(in srgb, var(--accent) 38%, var(--paper)) 50% 100%);
}

.result-axis-track::before {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 50%;
  width: 2px;
  background: var(--ink);
  content: "";
  transform: translateX(-50%);
}

.result-axis-marker {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: var(--axis-position);
  width: 17px;
  height: 17px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 1px 0 var(--ink);
  transform: translate(-50%, -50%);
}

.result-type {
  margin: 0;
  font-size: clamp(31px, 9vw, 50px);
  line-height: 1.15;
  letter-spacing: -0.045em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.result-composite {
  display: inline-block;
  max-width: 100%;
  margin: 12px 0 0;
  padding: 6px 11px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.result-pattern-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.6;
}

.result-title {
  margin: 14px 0 20px;
  color: var(--accent-deep);
  font-size: 17px;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.result-summary,
.result-trait,
.result-advice {
  margin: 0;
  padding: 18px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  word-break: auto-phrase;
}

.result-summary {
  border: 1px solid var(--line);
  background: var(--paper-warm);
}

.result-trait {
  margin-top: 10px;
  border: 1px dashed var(--accent-deep);
  background: color-mix(in srgb, var(--accent-soft) 24%, var(--paper));
}

.result-trait strong,
.result-advice strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-deep);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.result-advice {
  margin-top: 10px;
  background: color-mix(in srgb, var(--cool) 9%, var(--paper));
}

.result-types-section {
  padding: 28px 18px 30px;
  border-top: 2px solid var(--ink);
  background: var(--paper-warm);
}

.result-types-section > h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.35;
  text-align: center;
}

.result-types-section > p {
  margin: 5px 0 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.result-types-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 9px;
  list-style: none;
}

.result-types-list.is-typology {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.result-types-list.is-typology .result-types-item {
  padding: 8px 5px;
  border-radius: 9px;
}

.result-types-list.is-typology .result-types-item-heading {
  display: block;
}

.result-types-list.is-typology .result-types-item-heading strong {
  display: block;
  font-size: 9px;
  line-height: 1.35;
}

.result-types-list.is-typology .result-types-current-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 3px;
  font-size: 6px;
  white-space: normal;
}

.result-types-list.is-typology .result-types-item > p {
  margin-top: 3px;
  font-size: 7px;
  line-height: 1.4;
}

.result-types-list.is-typology .result-types-item:last-child:nth-child(odd) {
  grid-column: auto;
}

.result-types-item {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.result-types-item.is-current {
  border: 2px solid var(--ink);
  background: var(--accent-soft);
  box-shadow: 3px 4px 0 var(--ink);
}

.result-types-item-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.result-types-item-heading strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.result-types-current-badge {
  flex: none;
  padding: 3px 7px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--paper);
  background: var(--ink);
  font-size: 8px;
  font-weight: 900;
  line-height: 1.3;
}

.result-types-item > p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
  word-break: auto-phrase;
}

.result-types-item.is-current > p {
  color: var(--ink);
}

.result-types-retry {
  min-height: 52px;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 900;
}

.share-area {
  padding: 28px 18px 30px;
  border-top: 2px solid var(--ink);
  background: #f4eee0;
}

.share-area h3 {
  margin: 0 0 5px;
  font-size: 21px;
  text-align: center;
}

.share-area > p {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.share-canvas-frame {
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 17px;
  background: var(--accent-soft);
  box-shadow: 5px 6px 0 var(--ink);
}

.share-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
}

.share-actions {
  display: grid;
  margin-top: 20px;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.download-button {
  grid-column: 1 / -1;
}

.share-link {
  min-height: 49px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: var(--paper);
  font-size: 13px;
}

.share-link-x {
  color: #fff;
  background: var(--ink);
}

.share-link:hover,
.secondary-button:hover { background: var(--accent-soft); }
.share-link-x:hover { background: #3a3630; }

.medical-disclaimer {
  margin: 18px 0 0;
  padding: 14px 15px;
  border-left: 3px solid var(--muted);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.7;
  text-align: left;
}

.error-panel h1 { margin-bottom: 5px; font-size: 27px; }
.error-panel p { color: var(--muted); font-size: 13px; }

.diagnosis-footer {
  width: min(100% - 28px, 680px);
  margin: 0 auto;
  padding-bottom: 42px;
  text-align: center;
}

.quiet-cta {
  margin-bottom: 30px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
}

.quiet-cta a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-underline-offset: 3px;
}

.diagnosis-footer > p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 10px;
}

@media (min-width: 680px) {
  .wrap { width: min(100% - 64px, 1080px); }

  .brand-header { min-height: 110px; }
  .brand-lockup { font-size: 17px; }
  .brand-symbol { width: 41px; height: 41px; }

  .home-hero {
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    min-height: 650px;
    padding-block: 80px 110px;
    gap: 30px;
  }

  .hero-lead { font-size: 16px; }
  .lab-visual { width: min(32vw, 360px); }
  .theme-count { display: block; }

  .diagnosis-card {
    display: grid;
    grid-template-columns: minmax(290px, 0.9fr) minmax(340px, 1.1fr);
    min-height: 460px;
  }

  .diagnosis-card-art {
    min-height: 100%;
    border-right: 2px solid var(--ink);
    border-bottom: 0;
  }

  .diagnosis-card-body {
    display: flex;
    padding: 48px;
    flex-direction: column;
    justify-content: center;
  }

  .primary-link { width: 250px; }

  .lab-notes {
    grid-template-columns: 0.85fr 1.15fr;
    padding-block: 130px;
    gap: 80px;
  }

  .question-panel { padding: 34px 38px 28px; }
  .question-title { margin-bottom: 32px; }
  .choice-button { min-height: 74px; padding-inline: 20px; }
  .intro-copy { padding: 40px 46px 34px; }
  .result-copy { padding: 40px 46px; }
  .result-types-section { padding: 38px 46px 42px; }
  .result-types-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-types-list.is-typology { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .result-types-list.is-typology .result-types-item { padding: 12px 10px; border-radius: 14px; }
  .result-types-list.is-typology .result-types-item-heading strong { font-size: 12px; }
  .result-types-list.is-typology .result-types-current-badge { padding: 3px 7px; font-size: 8px; white-space: nowrap; }
  .result-types-list.is-typology .result-types-item > p { font-size: 9px; }
  .result-types-item:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .result-types-list.is-typology .result-types-item:last-child:nth-child(odd) { grid-column: auto; }
  .share-area { padding: 38px 46px 42px; }
  .share-actions { grid-template-columns: 1.2fr 1fr 1fr; }
  .download-button { grid-column: auto; }
}

@media (hover: hover) {
  .diagnosis-card { transition: transform 180ms ease, box-shadow 180ms ease; }
  .diagnosis-card:hover { transform: translate(-2px, -2px); box-shadow: 12px 14px 0 var(--ink); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@supports not (color: color-mix(in srgb, black, white)) {
  .diagnosis-page { background: var(--paper-warm); }
  .result-axis-track { background: linear-gradient(90deg, #d9e7e3 0 50%, #f5d2c7 50% 100%); }
  .result-trait { background: #fff9e8; }
  .result-advice { background: #eef7f5; }
}
