:root {
  color-scheme: light;
  --paper: #f8f6f1;
  --paper-deep: #eeebe4;
  --ink: #071b3d;
  --muted: #657084;
  --line: #dedfdc;
  --white: #ffffff;
  --blue: #0a5bf5;
  --blue-deep: #0645c6;
  --green: #1d9c69;
  --shadow: 0 18px 44px rgba(7, 27, 61, 0.09);
  --display: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --body: "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(7, 27, 61, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 27, 61, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

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

.ambient {
  position: fixed;
  z-index: -1;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.16;
  pointer-events: none;
}

.ambient-one { top: -170px; right: -160px; background: #3b82f6; }
.ambient-two { bottom: -190px; left: -160px; background: #deb970; }

.site-shell {
  width: min(100%, 680px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 46px;
}

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

.brand-mark { position: relative; width: 31px; height: 24px; }
.brand-mark i { position: absolute; display: block; width: 20px; height: 10px; border: 3px solid var(--blue); transform: skewX(-28deg); }
.brand-mark i:first-child { top: 1px; left: 7px; border-bottom: 0; }
.brand-mark i:last-child { bottom: 1px; left: 2px; border-top: 0; }

.step-indicator {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 0;
  color: #9098a5;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.step-indicator span:first-child { color: var(--blue); font-size: 17px; }

.panel { animation: panel-in 440ms cubic-bezier(.2,.75,.2,1) both; }
.panel[hidden] { display: none; }

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

.hero-copy { margin-bottom: 30px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 15px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.eyebrow span { width: 26px; height: 2px; background: currentColor; }

h1, h2 { font-family: var(--display); }

h1 {
  margin: 0;
  font-size: clamp(34px, 10.3vw, 64px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.22;
}

h1 em { color: var(--blue); font-style: normal; }

.hero-lead, .section-lead {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.8;
}

.task-list { display: grid; gap: 11px; }

.task-card {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255,255,255,0.86);
  box-shadow: 0 10px 28px rgba(7, 27, 61, 0.045);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background 180ms ease;
}

.task-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.task-card.is-selected { border: 2px solid var(--blue); padding: 13px; background: #f8fbff; box-shadow: 0 14px 34px rgba(10, 91, 245, 0.12); }

.task-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  background: #edf4ff;
  color: var(--blue);
}

.task-icon svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.task-copy { min-width: 0; }
.task-copy strong { display: block; font-size: 14px; font-weight: 900; line-height: 1.5; }
.task-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.45; }

.radio-dot { width: 23px; height: 23px; border: 2px solid var(--blue); border-radius: 999px; }
.is-selected .radio-dot { position: relative; border: 0; background: var(--blue); }
.is-selected .radio-dot::after { content: ""; position: absolute; top: 5px; left: 7px; width: 6px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 68px;
  margin-top: 24px;
  padding: 13px 16px 13px 22px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(120deg, var(--blue-deep), #1874ff);
  box-shadow: 0 18px 40px rgba(10, 91, 245, 0.25);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.primary-button:hover { transform: translateY(-2px); box-shadow: 0 22px 48px rgba(10, 91, 245, 0.32); }
.primary-button svg { flex: 0 0 auto; width: 41px; height: 41px; padding: 10px; border-radius: 999px; background: #fff; fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: -18px 0 30px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.back-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

h2 { margin: 0; font-size: clamp(30px, 8vw, 46px); font-weight: 900; letter-spacing: -0.045em; line-height: 1.28; }

.question-block { margin: 32px 0 0; padding: 0; border: 0; }
.question-block legend, .text-question > span { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 900; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.choice-grid button { min-height: 52px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; font-size: 12px; font-weight: 800; }
.choice-grid button.is-selected { border: 2px solid var(--blue); padding: 9px; background: #edf4ff; color: var(--blue-deep); }

.text-question { display: block; margin-top: 28px; }
.text-question textarea { width: 100%; resize: vertical; min-height: 112px; padding: 15px; border: 1px solid var(--line); border-radius: 16px; outline: none; background: rgba(255,255,255,.9); color: var(--ink); font-size: 13px; line-height: 1.7; }
.text-question textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(10, 91, 245, 0.1); }
.text-question small { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }

.result-heading { padding: 24px; border: 1px solid #cdddf8; border-radius: 24px; background: linear-gradient(145deg, #fff, #edf4ff); }
.result-heading .section-lead { margin-top: 14px; }
.result-steps { display: grid; gap: 10px; margin-top: 18px; }
.result-step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.88); }
.result-step b { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; background: var(--ink); color: #fff; font-size: 12px; }
.result-step strong { display: block; font-size: 13px; font-weight: 900; }
.result-step span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.65; }

.measurement-note { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; margin-top: 18px; padding: 16px; border-radius: 16px; background: #eaf6f0; color: #155c43; }
.measurement-note svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.measurement-note p { margin: 0; }
.measurement-note strong, .measurement-note span { display: block; }
.measurement-note strong { font-size: 11px; line-height: 1.6; }
.measurement-note span { margin-top: 4px; font-size: 10px; line-height: 1.6; opacity: .8; }

.consultation-button { margin-top: 18px; }
.contact-note { margin: 9px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.restart-button { display: block; margin: 22px auto 0; padding: 9px 12px; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 800; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 46px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
footer a { color: inherit; letter-spacing: 0; }

:focus-visible { outline: 3px solid rgba(10, 91, 245, 0.38); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (min-width: 680px) {
  .site-shell { padding: 34px 36px 42px; }
  .brand-row { margin-bottom: 62px; }
  .task-card { grid-template-columns: 60px minmax(0, 1fr) 28px; min-height: 98px; padding: 17px; border-radius: 22px; }
  .task-card.is-selected { padding: 16px; }
  .task-icon { width: 60px; height: 60px; border-radius: 18px; }
  .task-copy strong { font-size: 16px; }
  .task-copy small { font-size: 11px; }
  .radio-dot { width: 26px; height: 26px; }
}

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