:root {
  --bg: #f7fafc;
  --surface: #ffffff;
  --ink: #17242d;
  --muted: #6d7c87;
  --line: #dbe5ea;
  --primary: #1fb7b0;
  --primary-dark: #168c87;
  --accent: #8bc34a;
  --danger: #d95f4c;
  --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;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.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);
}

.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: #fff;
  background: linear-gradient(135deg, var(--primary), #53d8d1);
  font-size: 11px;
  letter-spacing: .08em;
}

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

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

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

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

.intro-copy h1,
.form-header h2,
.result-hero h2 {
  margin: 0;
  font-size: clamp(48px, 4.5vw, 58px);
  line-height: 1.08;
  letter-spacing: -.045em;
  font-weight: 800;
  word-break: keep-all;
  overflow-wrap: normal;
}

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

.lead,
.result-summary,
.section-heading p,
.form-header p {
  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, border-color .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: #fff;
  background: linear-gradient(135deg, var(--primary), #39cfc7);
  box-shadow: 0 12px 32px rgba(31,183,176,.22);
}

.button-secondary {
  color: #fff;
  background: var(--ink);
}

.button-ghost {
  color: var(--ink);
  background: #fff;
  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;
}

.plan-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);
}

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

.plan-stack {
  display: grid;
  gap: 12px;
  margin: 26px 0;
}

.plan-step {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.plan-step.active {
  border-color: rgba(31,183,176,.35);
  background: #eefafa;
}
.plan-step span {
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}
.plan-step strong { line-height: 1.5; }

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

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

.form-header,
.result-hero {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 36px;
  align-items: center;
  margin-bottom: 42px;
}

.form-header h2,
.result-hero h2 {
  font-size: clamp(40px, 4.4vw, 60px);
  word-break: keep-all;
  overflow-wrap: normal;
}

.progress-box,
.result-badge {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.progress-box span,
.result-badge strong {
  color: var(--primary);
  font-size: 38px;
  font-weight: 800;
}
.progress-box small,
.result-badge span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .14em;
}

.privacy-notice,
.prompt-notice {
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid rgba(31,183,176,.24);
  border-radius: 14px;
  background: rgba(31,183,176,.06);
}
.privacy-notice strong,
.prompt-notice strong {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
}
.privacy-notice p,
.prompt-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.planner-form { display: grid; gap: 18px; }

.field-group {
  min-inline-size: 0;
  margin: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 14px 40px rgba(45,72,86,.06);
}

.field-label {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.6;
}

.field-description {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.field-group input[type="text"] {
  width: 100%;
  min-height: 52px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fbfdfe;
  outline: none;
}
.field-group input[type="text"]::placeholder { color: #a8b5bc; }
.field-group input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31,183,176,.10);
}
.field-group input[aria-invalid="true"] { border-color: var(--danger); background: #fffafa; }

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}
.choice-grid label {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfe;
  cursor: pointer;
}
.choice-grid label:has(input:checked) {
  border-color: var(--primary);
  background: rgba(31,183,176,.07);
}
.choice-grid input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}
.choice-grid span { line-height: 1.5; }

[data-invalid="true"] { border-color: rgba(217,95,76,.5); }
.field-error,
.soft-hint,
.form-alert,
.copy-status {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.7;
}
.field-error,
.form-alert { color: var(--danger); font-weight: 700; }
.soft-hint { color: #936c16; }
.form-alert {
  padding: 14px 16px;
  border: 1px solid rgba(217,95,76,.3);
  border-radius: 14px;
  background: rgba(217,95,76,.08);
}

.form-actions { display: flex; justify-content: flex-end; }

.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-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}

.result-card {
  position: relative;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}
.result-card::before {
  display: block;
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}
.result-card:nth-child(1) { grid-column: 1 / -1; background: linear-gradient(135deg, #eefafa, #ffffff); border-color: rgba(31,183,176,.22); }
.result-card:nth-child(1)::before { content: "PLAN"; }
.result-card:nth-child(2)::before { content: "TARGET"; }
.result-card:nth-child(3)::before { content: "CONTENT TYPE"; }
.result-card:nth-child(4)::before { content: "60% SCOPE"; }
.result-card:nth-child(5)::before { content: "TITLE IDEAS"; }
.result-card:nth-child(6)::before { content: "BUILD STEPS"; }
.result-card:nth-child(7)::before { content: "NOT NOW / NEXT"; }
.result-card:nth-child(7) { background: linear-gradient(135deg, #f7fbe9, #ffffff); border-color: rgba(139,195,74,.28); }

.result-card h3 {
  margin: 0 0 14px;
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1.4;
  letter-spacing: -.025em;
}
.result-card p { margin: 0; color: var(--muted); line-height: 1.8; }
.result-card p + p { margin-top: 10px; }
.result-card ul,
.result-card ol,
.summary-list {
  margin: 14px 0 0;
  padding-left: 1.2em;
  color: var(--ink);
  line-height: 1.8;
}
.summary-list { display: grid; gap: 8px; padding-left: 0; list-style: none; }
.summary-list strong { display: inline; color: var(--primary-dark); }
.result-card li { padding: 6px 0; }

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.result-actions .button-primary { margin-left: auto; }
.copy-status { min-height: 1.5em; color: var(--primary-dark); font-weight: 700; }

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

.section-heading { max-width: 900px; margin-bottom: 24px; }
.section-heading h2 {
  margin: 0 0 10px;
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1.2;
  letter-spacing: -.04em;
  word-break: keep-all;
  overflow-wrap: normal;
}
.section-heading p:not(.eyebrow) { margin: 0; }

.email-result-copy h2,
.result-cta h2 {
  word-break: keep-all;
  overflow-wrap: normal;
}

.prompt-box {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}
.prompt-box textarea {
  width: 100%;
  min-height: 520px;
  resize: vertical;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #f9fbfc;
  line-height: 1.8;
}
.prompt-box .button { margin-top: 14px; }

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px;
}
.recommendation-grid-two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.recommendation-card {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  padding: 26px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  transition: transform .18s ease, border-color .18s ease;
}
.recommendation-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.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.45; }
.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; }

.related-app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
}
.related-app-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  padding: 25px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  transition: transform .18s ease, border-color .18s ease;
}
.related-app-card:hover { transform: translateY(-2px); border-color: rgba(31,183,176,.42); }
.related-app-card > span { color: var(--primary); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.related-app-card h3 { margin: 18px 0 10px; font-size: 22px; line-height: 1.45; }
.related-app-card p { margin: 0; color: var(--muted); line-height: 1.75; }
.related-app-card b { margin-top: auto; padding-top: 18px; color: var(--primary); font-size: 13px; }

.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; line-height: 1.35; }
.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);
}

.myasp-form-status {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.breadcrumb,
.usage-notice {
  width: min(1220px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}
.breadcrumb {
  min-height: 46px;
  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; }

.usage-notice {
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  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; }

.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;
}
.footer-separator { margin: 0 8px; }
.footer-link, .app-footer a { color: var(--muted); text-underline-offset: 3px; }

noscript,
.noscript-message {
  display: block;
  padding: 14px 20px;
  color: #7a1f1f;
  background: #fff4f4;
  border-bottom: 1px solid #f1caca;
  text-align: center;
  font-size: 13px;
}

:focus-visible {
  outline: 3px solid rgba(31,183,176,.34);
  outline-offset: 4px;
}

@media (max-width: 980px) {
  .intro-view { grid-template-columns: 1fr; }
  .intro-visual { justify-content: flex-start; }
  .form-header,
  .result-hero { grid-template-columns: 1fr; }
  .progress-box,
  .result-badge { width: 160px; }
  .recommendation-grid,
  .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-view { padding: 52px 0 56px; gap: 42px; }
  .intro-copy h1 { font-size: 42px; }
  .form-header h2,
  .result-hero h2 { font-size: 40px; }
  .lead { font-size: 15px; }

  .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); }

  .choice-grid,
  .result-grid,
  .recommendation-grid-two { grid-template-columns: 1fr; }
  .result-card:nth-child(1) { grid-column: auto; }

  .result-hero,
  .result-hero > *,
  .section-heading,
  .email-result-copy,
  .result-cta,
  .result-cta > *,
  .prompt-box,
  .recommendation-card,
  .related-app-card {
    min-width: 0;
    max-width: 100%;
  }

  .result-hero h2,
  .section-heading h2,
  .email-result-copy h2,
  .result-cta h2 {
    max-width: 100%;
  }

  .field-group,
  .result-card,
  .prompt-box { padding: 20px; border-radius: 20px; }

  .form-actions,
  .result-actions { align-items: stretch; flex-direction: column; }
  .result-actions .button-primary { margin-left: 0; }
  .button { width: 100%; }

  .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 (max-width: 360px) {
  .intro-copy h1 { font-size: 38px; }
  .form-header h2,
  .result-hero h2 { font-size: 34px; }
}

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