:root {
  color-scheme: light;
  --ink: #17213a;
  --muted: #5e6880;
  --blue: #0142ac;
  --blue-dark: #003586;
  --blue-soft: #edf4ff;
  --line: #dbe4f2;
  --surface: rgba(255, 255, 255, 0.94);
  --shadow: 0 24px 70px rgba(27, 56, 105, 0.13);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(1, 66, 172, 0.09), transparent 30rem),
    radial-gradient(circle at 88% 86%, rgba(115, 155, 221, 0.13), transparent 34rem),
    #f8fbff;
}

button, input { font: inherit; }
button { touch-action: manipulation; }

.page-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: min(100% - 2rem, 960px);
  margin: 0 auto;
  padding: 1.1rem 0;
  color: #31415e;
  font-size: 0.86rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-family: Georgia, serif;
  font-size: 1rem;
}

.app {
  display: grid;
  width: min(100% - 2rem, 760px);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2.5rem) 0 4rem;
  align-items: center;
}

.card {
  width: 100%;
  padding: clamp(1.45rem, 5vw, 3.5rem);
  border: 1px solid rgba(219, 228, 242, 0.86);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.welcome-card { text-align: center; }

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 1rem;
  font-size: clamp(1.85rem, 6vw, 3.15rem);
  line-height: 1.35;
  letter-spacing: -0.03em;
}

h1 span {
  display: block;
  margin-top: 0.18em;
  font-size: 0.72em;
  font-weight: 700;
}

h2 {
  margin-bottom: 0.9rem;
  font-size: clamp(1.3rem, 4vw, 1.85rem);
  line-height: 1.55;
  letter-spacing: -0.02em;
  white-space: pre-line;
}

.lead {
  margin: 0 auto 1.8rem;
  color: var(--muted);
  font-size: clamp(0.98rem, 2.5vw, 1.08rem);
  line-height: 1.9;
}

.duration {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.83rem;
}

.duration::before { content: "◷"; color: var(--blue); }

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-track {
  height: 7px;
  margin-bottom: 2rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf7;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #4c83d4);
  transition: width 240ms ease;
}

.description {
  margin-bottom: 1.35rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.75;
}

.choices {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice {
  position: relative;
  display: flex;
  min-height: 3.45rem;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  color: #25314a;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.choice:hover {
  border-color: #91afe0;
  transform: translateY(-1px);
}

.choice:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.choice input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--blue);
  flex: 0 0 auto;
}

.choice span { line-height: 1.55; }

.actions {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: 1.7rem;
}

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover { transform: translateY(-1px); }

.button-primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 24px rgba(1, 66, 172, 0.22);
}

.button-primary:hover { background: var(--blue-dark); }

.button-secondary {
  color: #31415e;
  border-color: var(--line);
  background: #fff;
}

.welcome-card .button { min-width: 12rem; }

.result-card {
  align-self: start;
  margin-top: clamp(0.5rem, 3vw, 2rem);
}

.result-card h1 {
  margin-bottom: 0.75rem;
  color: var(--blue-dark);
  font-size: clamp(1.75rem, 6vw, 2.7rem);
}

.result-content {
  margin-top: 1.7rem;
  color: #27334b;
  font-size: 0.98rem;
  line-height: 1.95;
}

.result-content p { margin-bottom: 1rem; }
.result-content .section-title {
  margin-top: 1.9rem;
  margin-bottom: 0.6rem;
  color: var(--blue-dark);
  font-weight: 750;
}
.result-content .bullet {
  position: relative;
  margin: 0.2rem 0;
  padding-left: 1.15rem;
}
.result-content .bullet::before {
  position: absolute;
  left: 0;
  color: var(--blue);
  content: "•";
}
.result-content .closing {
  margin-top: 1.5rem;
  padding: 1.15rem 1.2rem;
  border-left: 3px solid var(--blue);
  border-radius: 0 10px 10px 0;
  background: var(--blue-soft);
}

.result-actions {
  display: flex;
  justify-content: center;
  margin-top: 2.2rem;
}

.site-footer {
  width: min(100% - 2rem, 960px);
  margin: 0 auto;
  padding: 1.2rem 0 1.6rem;
  color: #7a859b;
  font-size: 0.72rem;
  text-align: center;
}

.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 (max-width: 560px) {
  .site-header { padding-top: 0.85rem; }
  .app { width: min(100% - 1rem, 760px); padding-top: 0.35rem; }
  .card { padding: 1.35rem 1.05rem 1.5rem; border-radius: 18px; }
  .actions { position: sticky; bottom: 0; padding-top: 0.8rem; background: linear-gradient(transparent, white 32%); }
  .actions .button { flex: 1; }
  .choice { padding: 0.8rem 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
