:root {
  --bg: #f7fafc;
  --surface: #ffffff;
  --surface-soft: #eef5f7;
  --ink: #17242d;
  --muted: #6d7c87;
  --line: #dbe5ea;
  --primary: #1fb7b0;
  --primary-dark: #168c87;
  --accent: #8bc34a;
  --warning: #ef8a62;
  --shadow: 0 20px 60px rgba(45, 72, 86, .10);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(31,183,176,.10), transparent 30%),
    radial-gradient(circle at 90% 14%, rgba(139,195,74,.08), transparent 28%),
    linear-gradient(180deg, #fbfdfe 0%, var(--bg) 100%);
  font-family: YakuHanJP, Inter, "Helvetica Neue", Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  overflow-wrap: anywhere;
}

button, input { font: inherit; }
button { cursor: pointer; }

.app-header,
.app-footer,
main {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
}

.app-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  width: min(1220px, calc(100% - 40px));
  min-height: 46px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
}

.breadcrumb a {
  color: var(--muted);
  text-underline-offset: 3px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--primary), #53d8d1);
  font-size: 11px;
}

.header-meta {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .14em;
}

.brand,
.intro-copy h1,
.section-heading h2,
.result-copy h2,
.form-header h2,
.result-card h2,
.result-card h3,
.usage-notice h2 {
  font-weight: 800;
}

.view { min-height: calc(100vh - 156px); }

.intro-view {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 64px;
  align-items: center;
  padding: 72px 0 68px;
}

.eyebrow,
.card-label,
.question-category {
  margin: 0 0 18px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}

.intro-copy h1,
.result-copy h2 {
  margin: 0;
  font-size: clamp(52px, 6.2vw, 86px);
  line-height: 1.08;
  letter-spacing: -.055em;
  font-weight: 800;
}

.intro-copy h1 span { color: var(--primary); }

.lead,
.result-summary,
.section-heading p,
.question-help {
  color: var(--muted);
  line-height: 1.9;
}

.lead {
  max-width: 660px;
  margin: 28px 0 0;
  font-size: 17px;
}

.intro-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.intro-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.button {
  border: 0;
  border-radius: 12px;
  padding: 15px 20px;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

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

.button-primary {
  min-width: 200px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: white;
  background: linear-gradient(135deg, var(--primary), #39cfc7);
  box-shadow: 0 12px 32px rgba(31,183,176,.22);
}

.button-primary:disabled {
  opacity: .35;
  cursor: not-allowed;
  transform: none;
}

.button-secondary {
  color: white;
  background: var(--primary);
}

.button-ghost {
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
}

.benefit-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 50px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255,255,255,.72);
}

.benefit-row div {
  padding: 18px;
  border-right: 1px solid var(--line);
}

.benefit-row div:last-child { border-right: 0; }

.benefit-row strong {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 11px;
}

.benefit-row span {
  font-size: 13px;
  font-weight: 700;
}

.intro-visual {
  display: flex;
  justify-content: center;
}

.visual-card {
  width: min(100%, 500px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.visual-label {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .16em;
}

.compass {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin: 18px 0;
}

.ring {
  position: absolute;
  inset: 50%;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  border: 1px solid var(--line);
}

.ring-1 { width: 92%; height: 92%; }
.ring-2 { width: 66%; height: 66%; border-color: rgba(31,183,176,.30); }
.ring-3 { width: 38%; height: 38%; border-color: rgba(139,195,74,.35); }

.needle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 100px;
  background: linear-gradient(var(--warning) 0 50%, #ccd8dc 50% 100%);
  transform: translate(-50%,-50%) rotate(32deg);
}

.point {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(139,195,74,.45);
}

.point-a { top: 22%; left: 60%; }
.point-b { top: 66%; left: 24%; }
.point-c { top: 74%; left: 72%; }

.center-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  color: var(--primary);
  font-size: 10px;
  letter-spacing: .16em;
}

.visual-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .14em;
}

.quiz-view {
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 0 72px;
}

.quiz-header {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: end;
  gap: 24px;
  margin-bottom: 24px;
}

.back-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  text-align: left;
}

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

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

.progress-bar {
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .25s ease;
}

.question-panel {
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
}

.question-panel fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.question-panel legend {
  max-width: 780px;
  padding: 0;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.35;
  letter-spacing: -.04em;
  font-weight: 800;
}

.question-help {
  margin: 16px 0 0;
}

.answer-list {
  display: grid;
  gap: 12px;
  margin-top: 36px;
}

.answer-label {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdfe;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.answer-label:hover {
  transform: translateX(3px);
  border-color: var(--primary);
}

.answer-label:has(input:checked) {
  border-color: var(--primary);
  background: rgba(31,183,176,.07);
}

.answer-label input {
  appearance: none;
  width: 19px;
  height: 19px;
  position: relative;
  border: 1px solid #9aabb4;
  border-radius: 50%;
}

.answer-label input:checked {
  border-color: var(--primary);
}

.answer-label input:checked::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--primary);
}

.question-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 32px;
}

.result-view { padding: 62px 0 80px; }

.result-hero {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 36px;
  align-items: center;
  margin-bottom: 54px;
}

.stage-badge {
  display: inline-flex;
  margin: 0 0 20px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(31,183,176,.09);
  border: 1px solid rgba(31,183,176,.18);
  font-size: 11px;
  font-weight: 800;
}

.result-copy h2 { font-size: clamp(46px, 6vw, 76px); }

.result-summary {
  max-width: 780px;
  margin-top: 22px;
  font-size: 16px;
}

.result-badge {
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  color: var(--ink);
  background: linear-gradient(145deg, #ffffff, #eaf5f6);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.result-badge span,
.result-badge small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .16em;
}

.result-badge strong {
  margin: 8px 0;
  color: var(--primary);
  font-size: 30px;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0 0 10px;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -.04em;
}

.section-heading p:last-child { margin: 0; }

.score-section { margin-bottom: 34px; }

.score-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 12px;
}

.score-card {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  box-shadow: 0 12px 34px rgba(45,72,86,.06);
}

.score-card.is-lowest {
  border-color: rgba(239,138,98,.55);
  background: #fff9f6;
}

.score-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.score-card h3 {
  margin: 0;
  font-size: 15px;
}

.score-number {
  color: var(--primary);
  font-size: 26px;
  font-weight: 800;
}

.score-label {
  min-height: 38px;
  margin: 8px 0 24px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.score-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eff2;
}

.score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.score-card.is-lowest .score-fill {
  background: linear-gradient(90deg, var(--warning), #f5bd6b);
}

.score-status {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .12em;
}

.score-card.is-lowest .score-status { color: var(--warning); }

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}

.result-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  box-shadow: 0 14px 40px rgba(45,72,86,.07);
}

.priority-card {
  background: linear-gradient(135deg, #eefafb, #ffffff);
  border-color: rgba(31,183,176,.22);
}

.plan-card { grid-column: 1 / -1; }

.result-card h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -.03em;
}

.result-card h3 { font-weight: 800; }

.priority-card .priority-title {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.03em;
}

.result-card p {
  color: var(--muted);
  line-height: 1.8;
}

.result-card ul,
.result-card ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.result-card li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  line-height: 1.7;
}

.plan-card ol {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.plan-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 10px;
  letter-spacing: .12em;
}

.next-step-section {
  margin-top: 60px;
  padding-top: 42px;
  border-top: 1px solid var(--line);
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
}

.recommendation-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  box-shadow: 0 14px 40px rgba(45,72,86,.07);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.recommendation-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 20px 46px rgba(45,72,86,.10);
}

.recommendation-type {
  color: var(--accent);
  font-size: 9px;
  letter-spacing: .16em;
  font-weight: 800;
}

.recommendation-card h3 {
  margin: 18px 0 12px;
  font-size: 23px;
  line-height: 1.4;
}

.recommendation-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.recommendation-arrow {
  margin-top: auto;
  padding-top: 20px;
  color: var(--primary);
  font-weight: 800;
}

.result-cta {
  margin-top: 18px;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border: 1px solid rgba(139,195,74,.28);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f7fbe9, #ffffff);
}

.result-cta h2 {
  margin: 0 0 10px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.result-cta p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.cta-link {
  flex: 0 0 auto;
  min-width: 230px;
  display: inline-flex;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 18px;
  color: #233214;
  text-decoration: none;
  font-weight: 800;
  border-radius: 12px;
  background: var(--accent);
}

.result-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.app-footer {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .14em;
}

.app-footer a {
  color: var(--muted);
  text-underline-offset: 3px;
}

[hidden] { display: none !important; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(31,183,176,.55);
  outline-offset: 3px;
}

.privacy-notice,
.prompt-notice,
.usage-notice {
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.76);
}

.privacy-notice {
  max-width: 680px;
  margin-top: 28px;
  padding: 16px 18px;
  font-size: 12px;
  line-height: 1.7;
}

.privacy-notice strong,
.prompt-notice strong { color: var(--ink); }
.privacy-notice p,
.prompt-notice p { margin: 6px 0 0; }

.prompt-section,
.related-apps-section {
  margin-top: 60px;
  padding-top: 42px;
  border-top: 1px solid var(--line);
}

.prompt-notice { padding: 16px 18px; line-height: 1.75; }

.prompt-box {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
}

.prompt-box textarea {
  width: 100%;
  min-height: 360px;
  padding: 16px;
  resize: vertical;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdfe;
  font: inherit;
  font-size: 13px;
  line-height: 1.75;
}

.prompt-box .button { margin-top: 14px; }

.related-app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.related-app-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  padding: 24px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
  box-shadow: 0 14px 40px rgba(45,72,86,.07);
}

.related-app-card > span { color: var(--primary); font-size: 11px; font-weight: 800; }
.related-app-card h3 { margin: 16px 0 10px; font-size: 20px; }
.related-app-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.related-app-card b { margin-top: auto; padding-top: 18px; color: var(--primary-dark); }
.related-app-card:hover { border-color: var(--primary); transform: translateY(-3px); }

.usage-notice {
  width: min(1220px, calc(100% - 40px));
  margin: 20px auto;
  padding: 22px 24px;
  background: #fbfdfe;
}

.usage-notice h2 {
  margin: 0 0 8px;
  color: #17242a;
  font-size: 16px;
  font-weight: 800;
}

.usage-notice p {
  margin: 0;
  color: #66777e;
  font-size: 12px;
  line-height: 1.8;
}

@media (max-width: 980px) {
  .intro-view {
    grid-template-columns: 1fr;
  }

  .intro-visual { order: 2; }

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

  .result-badge {
    width: 180px;
  }

  .score-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .recommendation-grid {
    grid-template-columns: 1fr;
  }

  .related-app-grid { grid-template-columns: 1fr; }

}

@media (max-width: 680px) {
  .app-header,
  .app-footer,
  main,
  .breadcrumb,
  .usage-notice {
    width: min(100% - 24px, 1220px);
  }

  .header-meta { display: none; }

  .intro-copy h1,
  .result-copy h2 { font-size: 48px; }

  .benefit-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .benefit-row div:nth-child(2) { border-right: 0; }
  .benefit-row div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

  .quiz-header {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .question-panel { padding: 24px; }
  .question-panel legend { font-size: 32px; }

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

  .plan-card { grid-column: auto; }
  .plan-card ol { grid-template-columns: 1fr; }

  .result-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .cta-link { width: 100%; }

  .app-footer {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
  }
}

@media print {
  .app-header,
  .app-footer,
  .result-actions,
  .next-step-section,
  .result-cta {
    display: none !important;
  }

  body { background: white; }

  main { width: 100%; }

  .result-card,
  .score-card {
    box-shadow: none;
    break-inside: avoid;
  }
}


.action-message {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

.footer-separator {
  margin: 0 8px;
}

.footer-link {
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.privacy-dialog {
  width: min(620px, calc(100% - 28px));
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 30px 100px rgba(45,72,86,.24);
}

.privacy-dialog::backdrop {
  background: rgba(23,36,45,.38);
  backdrop-filter: blur(4px);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
  border-bottom: 1px solid var(--line);
}

.dialog-header h2 {
  margin: 0;
  font-size: 24px;
}

.dialog-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: white;
  font-size: 20px;
}

.dialog-body {
  padding: 24px 26px 30px;
}

.dialog-body h3 {
  margin: 22px 0 6px;
  font-size: 15px;
}

.dialog-body h3:first-child {
  margin-top: 0;
}

.dialog-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

@media (max-width: 680px) {
  .result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .result-actions .button {
    width: 100%;
  }

  .app-footer > div {
    display: flex;
    flex-wrap: wrap;
  }
}

@media print {
  .action-message,
  .privacy-dialog {
    display: none !important;
  }
}



/* 結果画面は行動導線に絞る */
.result-cta {
  margin-bottom: 0;
}

.related-apps-section h2 {
  font-weight: 800;
  letter-spacing: -.04em;
}
