:root {
  color-scheme: light;
  --ink: #17241f;
  --muted: #64716b;
  --paper: #fffdf7;
  --canvas: #f5f1e7;
  --line: #d9d7cd;
  --green: #0f5c4d;
  --green-dark: #09463a;
  --green-soft: #e4f0eb;
  --amber: #e5a73d;
  --amber-soft: #fff1d6;
  --white: #ffffff;
  --shadow: 0 28px 80px rgba(28, 52, 43, 0.11);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family:
    "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 15%, rgba(229, 167, 61, 0.14), transparent 25rem),
    linear-gradient(145deg, #faf7ef 0%, var(--canvas) 100%);
}

button,
input {
  font: inherit;
}

button {
  touch-action: manipulation;
}

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

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

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(1120px, calc(100% - 40px));
  min-height: 82px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--white);
  background: var(--green);
  border-radius: 50% 50% 50% 16%;
  font-size: 14px;
}

.privacy-label {
  color: var(--muted);
  font-size: 12px;
}

.app-shell {
  position: relative;
  display: grid;
  width: min(1120px, calc(100% - 40px));
  min-height: calc(100vh - 190px);
  margin: 0 auto;
  padding: 26px 0 56px;
  place-items: center;
  overflow: hidden;
}

.background-shape {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.shape-one {
  top: 7%;
  right: 1%;
  width: 150px;
  height: 150px;
  border: 30px solid rgba(15, 92, 77, 0.07);
}

.shape-two {
  bottom: 3%;
  left: 1%;
  width: 120px;
  height: 120px;
  background: rgba(229, 167, 61, 0.12);
  transform: rotate(20deg);
  border-radius: 38% 62% 64% 36%;
}

.app-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  min-height: 570px;
  padding: clamp(28px, 5vw, 58px);
  background: rgba(255, 253, 247, 0.96);
  border: 1px solid rgba(23, 36, 31, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 20px;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.eyebrow::before {
  width: 24px;
  height: 2px;
  content: "";
  background: var(--amber);
}

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

h1,
h2 {
  letter-spacing: -0.035em;
  line-height: 1.35;
}

h1:focus,
h2:focus {
  outline: none;
}

h1 {
  max-width: 610px;
  margin-bottom: 22px;
  font-size: clamp(36px, 7vw, 62px);
  font-weight: 800;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(27px, 5vw, 40px);
}

.lead {
  max-width: 590px;
  margin-bottom: 34px;
  color: #45534d;
  font-size: clamp(16px, 2.5vw, 19px);
  line-height: 1.9;
}

.calm-note {
  display: flex;
  margin: 30px 0 0;
  padding: 16px 18px;
  align-items: flex-start;
  gap: 12px;
  color: #405049;
  background: var(--green-soft);
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.7;
}

.calm-note svg,
.result-intro svg {
  flex: 0 0 auto;
}

.primary-button,
.secondary-button,
.text-button,
.feedback-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.primary-button {
  padding: 0 27px;
  color: var(--white);
  background: var(--green);
  box-shadow: 0 12px 24px rgba(15, 92, 77, 0.2);
}

.primary-button:hover:not(:disabled) {
  background: var(--green-dark);
  box-shadow: 0 15px 28px rgba(15, 92, 77, 0.25);
  transform: translateY(-2px);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.secondary-button {
  padding: 0 24px;
  color: var(--green);
  background: transparent;
  border: 1px solid rgba(15, 92, 77, 0.35);
}

.text-button {
  min-height: 44px;
  padding: 0 8px;
  color: var(--muted);
  background: transparent;
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.text-button:focus-visible,
.feedback-button:focus-visible,
.choice:focus-visible,
.check-item:focus-within,
.brand:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(229, 167, 61, 0.65);
  outline-offset: 3px;
}

.progress {
  margin-bottom: 40px;
}

.progress-meta {
  display: flex;
  margin-bottom: 10px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  background: #e5e3da;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 33.33%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), #2b806e);
  border-radius: inherit;
  transition: width 260ms ease;
}

.question-help {
  margin-bottom: 26px;
  color: var(--muted);
  line-height: 1.7;
}

.choices {
  display: grid;
  gap: 12px;
}

.choice {
  display: flex;
  width: 100%;
  min-height: 62px;
  padding: 15px 18px;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    transform 150ms ease;
}

.choice:hover {
  border-color: rgba(15, 92, 77, 0.5);
  transform: translateY(-1px);
}

.choice[aria-pressed="true"] {
  background: var(--green-soft);
  border-color: var(--green);
}

.choice-dot {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid #b9beb9;
  border-radius: 50%;
}

.choice[aria-pressed="true"] .choice-dot {
  border-color: var(--green);
}

.choice[aria-pressed="true"] .choice-dot::after {
  width: 11px;
  height: 11px;
  content: "";
  background: var(--green);
  border-radius: 50%;
}

.multi .choice-dot {
  border-radius: 7px;
}

.multi .choice[aria-pressed="true"] .choice-dot::after {
  width: 12px;
  height: 7px;
  background: transparent;
  border-bottom: 2px solid var(--green);
  border-left: 2px solid var(--green);
  border-radius: 0;
  transform: rotate(-45deg) translate(1px, -1px);
}

.actions {
  display: flex;
  margin-top: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.result-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.result-intro {
  display: flex;
  margin: 20px 0 0;
  padding: 18px;
  align-items: flex-start;
  gap: 12px;
  color: #3f4d47;
  background: var(--amber-soft);
  border-radius: var(--radius-sm);
  line-height: 1.75;
}

.summary-tags {
  display: flex;
  margin: 22px 0 0;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-tag {
  padding: 7px 11px;
  color: var(--green-dark);
  background: var(--green-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.result-group {
  padding: 30px 0 0;
}

.result-group h3 {
  display: flex;
  margin-bottom: 14px;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.number-badge {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  color: var(--white);
  background: var(--green);
  border-radius: 50%;
  font-size: 12px;
}

.check-list {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 10px;
  list-style: none;
}

.check-item {
  display: flex;
  min-height: 58px;
  padding: 14px 16px;
  align-items: flex-start;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.check-item input {
  width: 21px;
  height: 21px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: var(--green);
}

.check-item label {
  cursor: pointer;
  line-height: 1.65;
}

.result-actions {
  display: grid;
  margin-top: 34px;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.save-status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--green);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.feedback {
  margin-top: 34px;
  padding: 24px;
  text-align: center;
  background: #f2efe6;
  border-radius: var(--radius-md);
}

.feedback p {
  margin-bottom: 14px;
  font-weight: 700;
}

.feedback-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.feedback-button {
  min-width: 110px;
  padding: 0 18px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.feedback-button[aria-pressed="true"] {
  color: var(--white);
  background: var(--green);
  border-color: var(--green);
}

.site-footer {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 38px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.site-footer > p {
  margin-bottom: 8px;
  text-align: center;
}

.site-footer details {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
}

.site-footer summary {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer details p {
  padding: 12px 16px;
  text-align: left;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
}

.noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 20;
  padding: 16px;
  color: #7d2b1f;
  text-align: center;
  background: #fff0ed;
  border: 1px solid #e7a398;
  border-radius: 10px;
}

@media (max-width: 640px) {
  .site-header {
    width: min(100% - 28px, 1120px);
    min-height: 70px;
  }

  .privacy-label {
    display: none;
  }

  .app-shell {
    width: 100%;
    min-height: auto;
    padding: 8px 14px 40px;
    overflow: visible;
  }

  .app-card {
    min-height: 620px;
    padding: 28px 20px;
    border-radius: 22px;
  }

  h1 {
    font-size: 39px;
  }

  .lead {
    font-size: 16px;
  }

  .shape-one,
  .shape-two {
    display: none;
  }

  .choice {
    min-height: 58px;
    padding: 13px 14px;
  }

  .actions {
    align-items: stretch;
  }

  .actions .primary-button {
    flex: 1;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  .site-footer {
    width: min(100% - 32px, 760px);
  }
}

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