:root {
  --ink: #12353b;
  --muted: #4f666a;
  --teal: #0b827a;
  --teal-dark: #08665f;
  --mint: #dff6ed;
  --cream: #fffaf0;
  --coral: #ff8a6b;
  --sun: #ffc857;
  --sky: #55b8df;
  --violet: #8f8de8;
  --line: #d7e5e2;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(27, 81, 78, 0.14);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 14px;
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 22%, rgba(255, 200, 87, 0.2), transparent 25rem),
    radial-gradient(circle at 92% 82%, rgba(85, 184, 223, 0.16), transparent 28rem),
    linear-gradient(145deg, #f7fcf9 0%, #fffaf2 52%, #f7f6ff 100%);
  font-family: "Noto Sans JP", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

button, input, select { font: inherit; }
button, a, select, .agree-row, summary { cursor: pointer; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(85, 184, 223, 0.48);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(1px);
  pointer-events: none;
}

.ambient-one {
  top: -100px;
  right: -80px;
  width: 310px;
  height: 310px;
  background: linear-gradient(145deg, rgba(255, 138, 107, 0.17), rgba(255, 200, 87, 0.18));
}

.ambient-two {
  bottom: -120px;
  left: -100px;
  width: 360px;
  height: 360px;
  background: linear-gradient(145deg, rgba(117, 201, 167, 0.16), rgba(143, 141, 232, 0.12));
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  min-height: 82px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand-mark { width: 35px; height: 35px; flex: 0 0 auto; }

.header-label {
  padding: 7px 13px;
  border: 1px solid rgba(11, 130, 122, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.page-main {
  display: block;
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 142px);
  margin: 0 auto;
  padding: 16px 0 54px;
}

#slide-color-form { width: min(960px, 100%); margin: 0 auto; }

.screen {
  width: 100%;
  animation: screen-in 260ms ease both;
}

.diagnosis-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
  gap: 32px;
  width: min(960px, 100%);
  margin: 0 auto 32px;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.hero-question {
  margin: 0 0 3px;
  font-size: clamp(23px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.035em;
}
.hero-question span { display: inline-block; }
.hero-copy h1 {
  margin: 0;
  font-size: clamp(40px, 5.1vw, 62px);
  line-height: 1.25;
  letter-spacing: 0.005em;
  white-space: nowrap;
  background: linear-gradient(100deg, var(--teal-dark), #278978 55%, #25809a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}

.primary-button {
  display: inline-flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 25px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(100deg, var(--teal-dark), var(--teal));
  box-shadow: 0 12px 26px rgba(11, 130, 122, 0.23);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.primary-button:hover { box-shadow: 0 15px 30px rgba(11, 130, 122, 0.3); transform: translateY(-2px); }
.primary-button:disabled { cursor: wait; opacity: 0.68; transform: none; }
.primary-button svg, .text-button svg, .mail-note svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.color-visual {
  display: grid;
  min-height: 260px;
  place-items: center;
}

.visual-center { position: relative; width: 260px; aspect-ratio: 1; }

.visual-center::before,
.visual-center::after {
  content: "";
  position: absolute;
  border: 1px dashed rgba(11, 130, 122, 0.2);
  border-radius: 50%;
  inset: 13%;
}

.visual-center::after { inset: 29%; border-style: solid; border-color: rgba(11, 130, 122, 0.1); }

.visual-core {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  width: 94px;
  height: 94px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
}

.visual-core svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2; }
.visual-core span { margin-top: -17px; font-size: 8px; font-weight: 800; letter-spacing: 0.1em; }

.color-orbit { position: absolute; width: 62px; height: 62px; border: 6px solid rgba(255,255,255,.84); border-radius: 50%; box-shadow: 0 17px 35px rgba(24, 73, 78, 0.14); }
.orbit-red { top: 1%; left: 38%; background: var(--coral); }
.orbit-amber { top: 25%; right: 0; background: var(--sun); }
.orbit-orange { right: 13%; bottom: 3%; background: #ffad72; }
.orbit-green { bottom: 3%; left: 13%; background: #75c9a7; }
.orbit-teal { top: 25%; left: 0; background: #45b6ac; }

.progress-shell { width: 100%; margin: 0 auto 14px; }
.progress-copy { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #e0ece8; }
.progress-bar { display: block; width: 4%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--coral), var(--sun), var(--teal)); transition: width 250ms ease; }

.question-screen, .contact-screen { width: 100%; margin: 0 auto; }

.question-card,
.contact-card,
.thanks-card {
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.91);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.question-card { min-height: 350px; padding: 30px 40px 22px; }
.diagnosis-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.diagnosis-meta span {
  padding: 5px 11px;
  border: 1px solid rgba(11, 130, 122, 0.16);
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}
.question-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; }
.question-category { margin: 0; color: var(--teal); font-size: 13px; font-weight: 800; letter-spacing: 0.06em; }
.question-number { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.question-card h2 { min-height: 52px; margin: 0; font-size: clamp(24px, 2.8vw, 32px); line-height: 1.5; letter-spacing: -0.025em; }
.question-hint { margin: 10px 0 22px; color: var(--muted); font-size: 14px; }

.answer-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }

.answer-button {
  display: flex;
  min-width: 0;
  min-height: 92px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: var(--white);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.answer-button:hover { border-color: rgba(11, 130, 122, 0.45); background: #f3fbf8; }
.answer-button[aria-checked="true"] { border-color: var(--teal); background: var(--mint); box-shadow: inset 0 0 0 1px var(--teal); }
.answer-value { font-size: 23px; font-weight: 800; line-height: 1; }
.answer-label { color: var(--muted); font-size: 12px; line-height: 1.5; }

.question-footer { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 20px; margin-top: 14px; }
.text-button { display: inline-flex; min-height: 44px; align-items: center; gap: 5px; padding: 8px 4px; border: 0; color: var(--muted); background: transparent; font-size: 13px; font-weight: 700; }
.text-button:hover { color: var(--teal-dark); }
.key-help { color: #708185; font-size: 11px; }

.contact-card { padding: clamp(26px, 5.5vw, 52px); }
.contact-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.contact-heading .eyebrow { margin-bottom: 3px; }
.contact-heading h2 { margin: 0; font-size: clamp(25px, 4vw, 38px); line-height: 1.35; }
.contact-heading p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 14px; }

.complete-mark { display: grid; width: 58px; height: 58px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--white); background: linear-gradient(145deg, #69c5a3, var(--teal)); box-shadow: 0 12px 24px rgba(11, 130, 122, 0.22); }
.complete-mark svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 700; }
.field label span, .agree-row b { color: #c34631; }

.field input,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fbfefd;
  font-size: 16px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.field input:focus,
.field select:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(11, 130, 122, 0.1); outline: 0; }
.field input.invalid, .field select.invalid { border-color: #d65a47; background: #fff9f7; }
.field small { color: var(--muted); font-size: 11px; }

.terms-details { margin-top: 22px; border: 1px solid var(--line); border-radius: 12px; background: #fbfefd; }
.terms-details summary { min-height: 48px; padding: 12px 15px; color: var(--teal-dark); font-size: 13px; font-weight: 700; }
.terms-body { max-height: 240px; overflow-y: auto; padding: 0 16px 16px; color: var(--muted); font-size: 12px; }
.terms-body h3 { color: var(--ink); font-size: 13px; }
.terms-body a { color: var(--teal-dark); }
.terms-notice { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

.agree-row { display: flex; align-items: flex-start; gap: 11px; margin-top: 17px; font-size: 13px; font-weight: 600; }
.agree-row input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--teal); }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

.form-error { margin-top: 17px; padding: 12px 15px; border: 1px solid #efb4a9; border-radius: 11px; color: #8d2d1d; background: #fff4f1; font-size: 13px; white-space: pre-line; }
.contact-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 25px; }
.submit-button { min-width: 250px; }

.site-footer { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 18px 0 24px; color: #708185; font-size: 11px; text-align: center; }

.thanks-main { display: flex; align-items: center; justify-content: center; }
.thanks-card { width: min(720px, 100%); padding: clamp(34px, 7vw, 68px); text-align: center; }
.thanks-card h1 { margin: 4px 0 17px; font-size: clamp(30px, 5vw, 48px); line-height: 1.35; }
.thanks-lead { margin: 0 auto; color: var(--muted); font-size: 16px; }
.thanks-visual { position: relative; display: flex; width: 160px; height: 90px; align-items: center; justify-content: center; margin: 0 auto 24px; }
.thanks-visual > span { position: absolute; width: 22px; height: 22px; border-radius: 50%; }
.thanks-visual > span:nth-child(1) { top: 5px; left: 8px; background: var(--coral); }
.thanks-visual > span:nth-child(2) { top: 0; right: 14px; background: var(--sun); }
.thanks-visual > span:nth-child(3) { bottom: 4px; left: 1px; background: var(--sky); }
.thanks-visual > span:nth-child(4) { right: 0; bottom: 8px; background: var(--violet); }
.thanks-visual > span:nth-child(5) { bottom: -3px; left: 70px; background: #75c9a7; }
.complete-mark.large { width: 72px; height: 72px; }

.mail-note { display: flex; align-items: center; gap: 14px; max-width: 480px; margin: 30px auto; padding: 15px 18px; border: 1px solid rgba(255, 200, 87, 0.45); border-radius: 15px; background: #fffaf0; text-align: left; }
.mail-note svg { width: 27px; height: 27px; flex: 0 0 auto; color: #a26b00; }
.mail-note div { display: flex; flex-direction: column; }
.mail-note strong { font-size: 13px; }
.mail-note span { color: var(--muted); font-size: 12px; }
.thanks-button { min-width: 220px; }

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

@media (max-width: 900px) {
  .diagnosis-hero { grid-template-columns: minmax(0, 1fr) 180px; gap: 18px; }
  .color-visual { min-height: 180px; }
  .visual-center { width: 180px; }
  .color-orbit { width: 46px; height: 46px; border-width: 4px; }
  .visual-core { width: 68px; height: 68px; }
  .visual-core svg { width: 27px; height: 27px; }
  .visual-core span { margin-top: -10px; font-size: 6px; }
  .hero-lead br { display: none; }
}

@media (max-width: 640px) {
  .site-header, .page-main, .site-footer { width: min(100% - 28px, 1180px); }
  .site-header { min-height: 68px; }
  .brand { font-size: 14px; }
  .brand-mark { width: 30px; height: 30px; }
  .header-label { padding: 5px 9px; font-size: 10px; }
  .page-main { min-height: calc(100vh - 118px); padding: 16px 0 36px; }
  .diagnosis-hero { display: block; margin-bottom: 27px; padding: 0 5px; }
  .hero-copy .eyebrow { margin-bottom: 10px; font-size: 11px; }
  .hero-question { font-size: clamp(20px, 5.5vw, 28px); }
  .hero-copy h1 { margin-top: 4px; font-size: clamp(36px, 9.5vw, 54px); }
  .hero-lead { margin-top: 12px; font-size: 13px; }
  .diagnosis-meta { gap: 6px; margin-top: 13px; }
  .diagnosis-meta span { padding: 5px 8px; font-size: 10px; }
  .color-visual { display: none; }
  .primary-button { width: 100%; }
  .progress-shell { margin-bottom: 13px; }
  .question-card, .contact-card, .thanks-card { border-radius: 22px; }
  .question-card { min-height: 0; padding: 24px 19px 18px; }
  .question-heading { flex-wrap: wrap; gap: 4px 12px; margin-bottom: 15px; }
  .question-category { font-size: 11px; letter-spacing: 0; }
  .question-number { font-size: 10px; }
  .question-card h2 { min-height: 72px; font-size: 23px; }
  .question-hint { font-size: 12px; margin-bottom: 18px; }
  .answer-options { grid-template-columns: 1fr; gap: 8px; }
  .answer-button { min-height: 52px; flex-direction: row; justify-content: flex-start; gap: 13px; padding: 9px 14px; text-align: left; }
  .answer-value { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #eef6f3; font-size: 16px; }
  .answer-button[aria-checked="true"] .answer-value { color: var(--white); background: var(--teal); }
  .answer-label { font-size: 12px; }
  .question-footer { margin-top: 19px; }
  .key-help { display: none; }
  .form-grid { grid-template-columns: 1fr; gap: 15px; }
  .field-wide { grid-column: auto; }
  .contact-heading { align-items: flex-start; }
  .complete-mark { width: 48px; height: 48px; }
  .contact-actions { flex-direction: column-reverse; }
  .contact-actions .text-button { align-self: flex-start; }
  .submit-button { min-width: 0; }
  .thanks-lead br { display: none; }
}

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