:root {
  --bg: #f6fbfa;
  --panel: rgba(255,255,255,.86);
  --ink: #132726;
  --muted: #6c7f7d;
  --line: rgba(19,39,38,.11);
  --accent: #0f766e;
  --accent-2: #2b9c91;
  --accent-pale: #dff4f1;
  --warm: #f6a55c;
  --danger: #b44d5e;
  --shadow: 0 24px 70px rgba(13, 74, 69, .12);
  --radius-xl: 30px;
  --radius-lg: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 12%, rgba(43,156,145,.08), transparent 34%),
    radial-gradient(circle at 88% 78%, rgba(246,165,92,.08), transparent 30%),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  overflow-x: hidden;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(4px);
  pointer-events: none;
  z-index: -1;
}
.ambient-a { width: 320px; height: 320px; left: -140px; top: 18%; background: rgba(69,180,169,.10); }
.ambient-b { width: 250px; height: 250px; right: -90px; bottom: 8%; background: rgba(246,165,92,.10); }

.site-header, .site-footer {
  width: min(100% - 32px, 920px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header { padding: 24px 0 10px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.02em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: var(--accent);
  font-size: 14px;
}
.header-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  color: var(--accent);
  border: 1px solid rgba(15,118,110,.2);
  padding: 7px 10px;
  border-radius: 999px;
}

.shell {
  width: min(100% - 32px, 820px);
  margin: 0 auto;
  min-height: calc(100vh - 150px);
  display: grid;
  place-items: center;
  padding: 28px 0 60px;
}
.screen { width: 100%; animation: fadeUp .45s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.start-screen { text-align: center; padding: 42px 0 30px; }
.hero-kicker {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-pale);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 20px;
}
h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 72px);
  line-height: 1.08;
  letter-spacing: -.06em;
}
h1 span { color: var(--accent); }
.hero-copy {
  margin: 24px auto 0;
  max-width: 600px;
  color: var(--muted);
  line-height: 1.9;
  font-size: 16px;
}
.feature-row {
  width: min(100%, 520px);
  margin: 34px auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.feature {
  padding: 18px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.68);
}
.feature strong { display: block; font-size: 21px; }
.feature span { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; letter-spacing: .1em; font-weight: 800; }

.primary-btn, .secondary-btn {
  border: 0;
  min-height: 56px;
  border-radius: 18px;
  padding: 0 26px;
  cursor: pointer;
  font-weight: 800;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 28px rgba(15,118,110,.22);
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 18px 34px rgba(15,118,110,.26); }
.primary-btn:active { transform: translateY(1px); }
.primary-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.primary-btn span { margin-left: 10px; }
.secondary-btn { color: var(--ink); background: white; border: 1px solid var(--line); }
.microcopy { margin-top: 18px; color: #8a9a98; font-size: 11px; line-height: 1.7; }

.quiz-screen { max-width: 680px; }
.quiz-topline { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.icon-btn {
  width: 46px; height: 46px; flex: 0 0 46px;
  border: 1px solid var(--line); border-radius: 15px;
  background: white; color: var(--ink); cursor: pointer; font-weight: 800;
}
.progress-wrap { flex: 1; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .09em; margin-bottom: 8px; }
.progress-track { height: 7px; border-radius: 999px; overflow: hidden; background: #dfebe9; }
.progress-bar { height: 100%; width: 10%; background: linear-gradient(90deg, var(--accent), #56b8ad); border-radius: inherit; transition: width .25s ease; }

.question-card {
  padding: clamp(28px, 6vw, 54px);
  border: 1px solid rgba(255,255,255,.65);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.question-number { color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: .1em; }
.question-card h2 { margin: 12px 0 8px; font-size: clamp(28px, 6vw, 44px); letter-spacing: -.04em; line-height: 1.25; }
.question-hint { margin: 0 0 34px; color: var(--muted); line-height: 1.7; }
.answer-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.answer-input {
  width: 100%;
  padding: 17px 18px;
  border: 1.5px solid #cedfdd;
  border-radius: 16px;
  outline: none;
  background: white;
  color: var(--ink);
  font-size: 18px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.answer-input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 4px rgba(43,156,145,.10); }
.input-error { min-height: 20px; margin-top: 7px; color: var(--danger); font-size: 12px; }
.question-next { width: 100%; margin-top: 12px; }

.loading-screen { text-align: center; padding: 70px 0; }
.orb {
  width: 96px; height: 96px; margin: 0 auto 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(from 0deg, var(--accent), #8ad1c9, var(--warm), var(--accent));
  animation: spin 2.2s linear infinite;
}
.orb span { width: 70px; height: 70px; border-radius: 50%; background: var(--bg); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-kicker { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.loading-screen h2 { margin: 12px 0 28px; font-size: clamp(30px, 6vw, 48px); letter-spacing: -.04em; }
.loading-lines { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.loading-lines span { animation: pulse 1.6s ease-in-out infinite; }
.loading-lines span:nth-child(2) { animation-delay: .25s; }
.loading-lines span:nth-child(3) { animation-delay: .5s; }
@keyframes pulse { 50% { opacity: .35; } }

.result-screen { max-width: 760px; }
.result-heading { text-align: center; margin-bottom: 28px; }
.result-heading > span { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.result-heading h2 { margin: 10px 0 10px; font-size: clamp(34px, 7vw, 58px); letter-spacing: -.05em; line-height: 1.16; }
.one-liner { margin: 0 auto; max-width: 600px; color: var(--muted); font-size: 17px; line-height: 1.8; font-weight: 700; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.result-card {
  padding: 24px;
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 35px rgba(19,39,38,.05);
}
.result-card.wide { grid-column: 1 / -1; }
.card-label { display: inline-block; margin-bottom: 12px; color: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .05em; }
.result-card p, .result-card li { color: #435957; line-height: 1.85; font-size: 14px; }
.result-card p { margin: 0; }
.result-card ul { margin: 0; padding-left: 1.25em; }
.good-card { background: linear-gradient(180deg, #ffffff, #f2fbf8); }
.bad-card { background: linear-gradient(180deg, #ffffff, #fff9f3); }
.hidden-trait-card { border-style: dashed; }
.components { display: grid; gap: 18px; }
.component-row { display: grid; grid-template-columns: 110px 1fr 42px; gap: 12px; align-items: center; }
.component-name { font-size: 13px; font-weight: 800; }
.component-track { height: 9px; border-radius: 999px; background: #e4eeed; overflow: hidden; }
.component-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #59bfb4); }
.component-percent { font-size: 12px; font-weight: 900; text-align: right; }
.component-note { grid-column: 2 / 4; color: var(--muted); font-size: 11px; margin-top: -7px; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.result-note { text-align: center; }

.error-screen { text-align: center; max-width: 560px; margin: auto; padding: 50px 24px; background: white; border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.error-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; background: #fff0f1; color: var(--danger); font-size: 24px; font-weight: 900; }
.error-screen h2 { margin: 0 0 12px; }
.error-screen p { color: var(--muted); line-height: 1.8; }
.error-screen .primary-btn { margin-top: 10px; }

.site-footer { padding: 20px 0 34px; color: #90a09e; font-size: 10px; letter-spacing: .06em; }

@media (max-width: 640px) {
  .site-header { padding-top: 18px; }
  .header-badge { display: none; }
  .shell { padding-top: 10px; }
  .start-screen { padding-top: 26px; }
  .hero-copy br { display: none; }
  .feature-row { gap: 7px; margin: 26px auto; }
  .feature { padding: 14px 4px; border-radius: 15px; }
  .feature strong { font-size: 18px; }
  .question-card { border-radius: 24px; }
  .result-grid { grid-template-columns: 1fr; }
  .result-card.wide { grid-column: auto; }
  .result-actions { grid-template-columns: 1fr; }
  .component-row { grid-template-columns: 82px 1fr 38px; gap: 8px; }
  .component-note { grid-column: 1 / -1; margin-top: -6px; }
}

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